sarathsushi_uni 10
Updated 2022-10-17Copy Reference Fork
99
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
›
⌄
with t1 as (select date(block_timestamp) as date,
count(DISTINCT(ORIGIN_FROM_ADDRESS)) as total_seller,
sum(total_seller) over (order by date asc) as cumulative_seller
from polygon.sushi.ez_swaps
where date >= CURRENT_DATE - 90
group by date),
t2 as (select date(block_timestamp) as date,
count(DISTINCT(ORIGIN_TO_ADDRESS)) as total_buyer,
sum(total_buyer) over (order by date asc) as cumulative_buyer
from polygon.sushi.ez_swaps
where date >= CURRENT_DATE - 90
group by date)
select b.date,
total_buyer,
cumulative_buyer,
total_seller,
cumulative_seller
from t2 b join t1 a on b.date=a.date
order by date
Run a query to Download Data