Starknet reportsretdrop - OP new users total
    Updated 2024-01-24
    -- forked from retdrop - OP new users weekly @ https://flipsidecrypto.xyz/edit/queries/db7c5238-366f-424f-b36b-cb934901593a

    -- forked from retdrop - arb new users weekly @ https://flipsidecrypto.xyz/edit/queries/d0d009a5-e53e-4bba-bafd-18fe8d4ccf51

    -- forked from retdrop - arb WAU @ https://flipsidecrypto.xyz/edit/queries/9dd5c188-6f51-4a3e-baa0-02e6077b706d

    with arb_n as (select
    DISTINCT from_address as addy, min(block_timestamp::date) as f_date
    from optimism.core.fact_transactions
    where nonce = '0'
    GROUP by all
    ),

    final as
    (SELECT
    date_trunc('day',f_date) as date, count(DISTINCT addy) as "New addresses", case
    when f_date < '2022-06-01' then 'A.Before airdrop #1'
    when f_date >= '2022-06-01' and f_date < '2023-02-09' then 'B.Between airdrop #1 & #2'
    when f_date >= '2023-02-09' and f_date < '2023-09-18' then 'C.Between airdrop #2 & #3'
    when f_date >= '2023-09-18' then 'D.After airdrop #3'
    end as period
    from arb_n
    GROUP by all)


    SELECT DISTINCT period , sum("New addresses")/count(DISTINCT date) as avg_new
    from final
    GROUP by all



    Last run: over 1 year ago
    PERIOD
    AVG_NEW
    1
    D.After airdrop #312634.953488
    2
    B.Between airdrop #1 & #25460.86166
    3
    C.Between airdrop #2 & #314774.99095
    4
    A.Before airdrop #1791.262376
    4
    155B
    35s