0-MIDnew bridgers poly
    Updated 2023-09-14
    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