MLDZMNgain3
    Updated 2022-11-05
    select
    date_trunc('{{Time_basis}}',BLOCK_TIMESTAMP) as date,
    case
    when CONTRACT_ADDRESS=lower('0xfc5A1A6EB076a2C7aD06eD22C90d7E710E35ad0a') then 'GMX'
    else 'Other tokens' end as gp,
    count(tx_hash) as no_sent,
    count(distinct ORIGIN_FROM_ADDRESS) as no_users,
    sum(no_sent) over (partition by gp order by date) as cum_transfer,
    sum(no_users) over (partition by gp order by date) as cum_users

    from arbitrum.core.fact_token_transfers
    where BLOCK_TIMESTAMP>=CURRENT_DATE- {{Time_period}}
    group by 1,2
    Run a query to Download Data