shengyi-chiuUntitled Query
    Updated 2022-07-28
    with Guzz as (select TX_RECEIVER, sum(GAS_USED)/1e12 as Gass
    from flipside_prod_db.mdao_near.transactions where BLOCK_TIMESTAMP BETWEEN '2022-06-27' and '2022-07-27'
    group by TX_RECEIVER order by Gass desc limit 10)
    select date_trunc(day,BLOCK_TIMESTAMP) as daily, TX_RECEIVER ,
    sum(GAS_USED)/1e12 as Gass ,
    sum(Gass)over(partition by TX_RECEIVER order by daily
    rows between unbounded preceding and current row) as cum
    from flipside_prod_db.mdao_near.transactions where TX_RECEIVER in
    (select TX_RECEIVER from Guzz )
    and daily BETWEEN '2022-06-27' and '2022-07-27'
    group by 1 ,2 order by 1
    Run a query to Download Data