Afonso_Diazliquidity provider grouping users
Updated 2023-12-31
99
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
›
⌄
with t as (
select
tx_hash,
action,
block_timestamp,
iff(block_timestamp::date >= '2023-08-27', 'Bull Market', 'Bear Market') as timespan,
liquidity_provider,
amount0_usd + amount1_usd as amount_usd
from
ethereum.uniswapv3.ez_lp_actions
where amount_usd < 1e7
and block_timestamp::date >= '2023-01-01'
)
select
timespan,
case
when amount_usd < 10 then 'a. Less than 10$'
when amount_usd <= 50 then 'b. 10$ - 50 $'
when amount_usd <= 100 then 'c. 50$ - 100 $'
when amount_usd <= 500 then 'd. 100$ - 500 $'
when amount_usd <= 1000 then 'e. 500$ - 1000 $'
when amount_usd <= 5000 then 'f. 1000$ - 5000 $'
when amount_usd <= 10000 then 'g. 5000$ - 10,000 $'
when amount_usd <= 100000 then 'h. 10,000$ - 100,000 $'
else 'i. More than 100,000$'
end as type,
count(distinct tx_hash) as transactions
from t
group by 1, 2
order by 1, 2
QueryRunArchived: QueryRun has been archived