Hosseingrouping users
Updated 2024-01-03
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
32
33
34
35
36
›
⌄
with main as (
select
tx_hash,
block_timestamp,
case
when block_timestamp :: date between '2020-09-01'
and '2021-04-17' then 'Bull'
when block_timestamp :: date between '2020-04-17'
and '2021-07-18' then 'Bear'
when block_timestamp :: date between '2021-07-18'
and '2021-11-14' then 'Bull'
when block_timestamp :: date between '2021-11-14'
and '2023-01-03' then 'Bear'
else 'Bull'
end as type,
abs(amount0_usd) as amount,
liquidity_provider as user
from
ethereum.uniswapv3.ez_lp_actions
where
amount < 1000000
and block_timestamp :: date >= '2020-09-01'
),
txns as (
select
type,
user,
count(distinct tx_hash) as txns
from
main
group by
1,
2
)
select
QueryRunArchived: QueryRun has been archived