Afonso_Diazsushiswap-3
Updated 2023-03-04
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
›
⌄
with t as (
select
pool_name,
contract_address,
count(distinct tx_hash) as transactions
from ethereum.core.ez_dex_swaps
where platform = 'sushiswap'
group by 1, 2
order by 3 desc
limit 5
),
t1 as (
select
origin_from_address as user,
min(block_timestamp::date) as min_date
from ethereum.core.ez_dex_swaps a
join t
using(contract_address)
where platform = 'sushiswap'
group by 1
)
select
min_date as day,
count(distinct user) as new_users,
sum(new_users) over (order by day) as cumulative_new_users
from t1
where day > current_date - interval '6 months'
group by 1
order by 1
Run a query to Download Data