RamaharNew vs Existing
    Updated 2022-11-07
    With newWallet as (select
    MIN(block_timestamp) as earliest_time,
    DATE(earliest_time) as dt,
    from_address
    from optimism.core.fact_transactions
    where status = 'SUCCESS'
    group by 3),

    newUsers as (select
    dt,
    count(distinct from_address) as newWallets
    from newWallet
    group by 1 )

    select
    DATE(block_timestamp) as dayz,
    count (distinct t.from_address) as Users,
    newWallets as new_users,
    users - coalesce(newWallets, 0) as existing_users
    from optimism.core.fact_transactions t
    left join newUsers ON dt = t.block_timestamp::date
    group by 1 , 3
    having dayz >= '2022-05-01'
    Run a query to Download Data