Afonso_Diaz2023-09-09 07:28 PM
Updated 2023-09-27
99
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
›
⌄
with t as (
select
liquidity_provider as user
from ethereum.uniswapv3.ez_lp_actions
group by 1
having count(distinct iff(action = 'INCREASE_LIQUIDITY', tx_hash, null))
- count(distinct iff(action = 'DECREASE_LIQUIDITY', tx_hash, null)) > 0
)
select
'Active users' as type,
count(distinct user) as users
from t
group by 1
union all
select
'Inactive users' as type,
count(distinct liquidity_provider) as users
from ethereum.uniswapv3.ez_lp_actions
where liquidity_provider not in (select distinct user from t)
group by 1
Run a query to Download Data