superflyOptimism users that have used Arbitrum Percentage of Optimism users that have used Arbitrum
    Updated 2023-01-13
    with opti_new as (select min(block_timestamp) as opti_first_tx,
    from_address as new_user
    from optimism.core.fact_transactions
    group by 2),

    opti_arbi as (select min(block_timestamp) as arbi_first_tx,
    from_address
    from arbitrum.core.fact_transactions a
    join opti_new b on a.from_address = b.new_user
    group by 2),

    total_opti as (select count(distinct(new_user)) as total_opti_users
    from opti_new),

    final as (select count(distinct(from_address)) as opti_arbi_users
    from opti_arbi a
    join opti_new b on a.from_address = b.new_user
    where arbi_first_tx > opti_first_tx)

    select total_opti_users - opti_arbi_users, 'Have not used Arbitrum'
    from total_opti, final
    union
    select opti_arbi_users, 'Have used Arbitrum'
    from final
    Run a query to Download Data