hessTotal New Users
    Updated 2023-02-04
    with new_pol as ( select min(block_timestamp::date) as date, from_address
    from polygon.core.fact_transactions
    group by 2)
    ,
    new_arbi as (select min(block_timestamp::date) as date, from_address
    from arbitrum.core.fact_transactions
    group by 2)
    ,
    new_opti as (select min(block_timestamp::date) as date, from_address
    from optimism.core.fact_transactions
    group by 2)
    ,
    new_p as ( select count(DISTINCT(from_address)) as total_eth
    from new_pol
    where date >= CURRENT_DATE - 180
    )
    ,
    new_a as ( select count(DISTINCT(from_address)) as total_arbi
    from new_arbi
    where date >= CURRENT_DATE - 180
    )
    ,
    new_o as ( select count(DISTINCT(from_address)) as total_opti
    from new_opti
    where date >= CURRENT_DATE - 180
    )

    select 'Optimism' as chain, total_opti as total_user
    from new_o
    UNION
    select 'Arbitrum' as chain, total_arbi as total_user
    from new_a
    UNION
    select 'Polygon' as chain, total_eth as total_user
    from new_p
    Run a query to Download Data