0-MIDnew bridgers poly
Updated 2023-09-14
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
›
⌄
with tab1 as (
select date_trunc('minute',BLOCK_TIMESTAMP) as time
,AMOUNT_USD
,TO_ADDRESS
from polygon.core.ez_token_transfers
where ORIGIN_TO_ADDRESS='0x88dcdc47d2f83a99cf0000fdf667a468bb958a78'
and ORIGIN_FUNCTION_SIGNATURE in ('0xcdd1b25d')
and AMOUNT_USD is not null
),
tab2 as (
select date_trunc('week',time) as week
,AMOUNT_USD
,TO_ADDRESS
,row_number()over(partition by TO_ADDRESS order by week) as times_row
from tab1)
select week
,sum(AMOUNT_USD) as "VOLUME IN"
,count(TO_ADDRESS) as "NEW DEPOSITORS"
,sum("VOLUME IN") over(order by week) as "TOTAL VOLUME IN"
from tab2
where times_row=1
group by 1
Run a query to Download Data