MLDZMNnext6
    Updated 2022-10-03
    select
    block_timestamp::date as day,
    'Avalanche' as L2,
    count(distinct FROM_ADDRESS) as active_wallets,
    count(distinct tx_hash) as count_TXN,
    sum(active_wallets) over (order by day) as cum_wallets
    from avalanche.core.fact_transactions
    WHERE tx_hash is not null
    and block_timestamp>=CURRENT_DATE-60
    group by 1
    union all
    select
    block_timestamp::date as day,
    'Arbitrum' as L2,
    count(distinct FROM_ADDRESS) as active_wallets,
    count(distinct tx_hash) as count_TXN,
    sum(active_wallets) over (order by day) as cum_wallets
    from Arbitrum.core.fact_transactions
    WHERE tx_hash is not null
    and block_timestamp>=CURRENT_DATE-60
    group by 1
    --union all
    -- select
    -- block_timestamp::date as day,
    -- 'Optimism' as L2,
    -- count(distinct FROM_ADDRESS) as active_wallets,
    -- count(distinct tx_hash) as count_TXN,
    -- sum(active_wallets) over (order by day) as cum_wallets
    --from Optimism.core.fact_transactions
    -- WHERE tx_hash is not null
    --and block_timestamp>=CURRENT_DATE-60
    -- group by 1
    union all
    select
    block_timestamp::date as day,
    'Polygon' as L2,
    Run a query to Download Data