mlhUntitled Query
    Updated 2022-09-18
    select min(a.block_timestamp) as min_date,
    count(distinct a.tx_hash ) as trxs,
    count(distinct a.from_address) as distinct_users,
    sum(a.eth_value) as volume,
    sum(a.tx_fee) as fee,
    sum(trxs) OVER(ORDER BY week asc ROWS BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW) AS cum_,
    sum(n_new_address_that_claims) OVER(ORDER BY week asc ROWS BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW) AS cum_,
    case when min_date>=CURRENT_DATE- 30 then 'last 30 days'
    else 'last 90 days' end as type
    from arbitrum.core.fact_transactions as a
    inner join arbitrum.core.fact_event_logs as b on a.TX_HASH= b.TX_HASH
    where b.contract_address='0xabbc5f99639c9b6bcb58544ddf04efa6802f4064'
    group by 6
    having min_date>= CURRENT_DATE- 90
    Run a query to Download Data