SocioAnalyticaNew and Returning Users copy
    Updated 2025-02-09
    with DAU_u as (
    SELECT
    date_trunc('d', block_timestamp) as date,
    count(DISTINCT origin_from_address) as DAU
    FROM arbitrum.core.ez_decoded_event_logs
    WHERE contract_address IN (SELECT address FROM arbitrum.core.dim_labels where project_name ilike '%beefy%')
    AND date >= dateadd('month', -12, current_date)
    GROUP BY date
    )

    ,new as (
    SELECT
    date_trunc('d', first_tx) as date,
    count(DISTINCT user) as new_user
    FROM (
    SELECT
    origin_from_address as user,
    min(block_timestamp) as first_tx
    FROM arbitrum.core.ez_decoded_event_logs
    WHERE contract_address IN (SELECT address FROM arbitrum.core.dim_labels where project_name ilike '%beefy%')
    AND block_timestamp::DATE >= '2021-07-22'
    GROUP BY 1)
    WHERE date >= dateadd('month', -12, current_date)
    GROUP BY 1
    )

    SELECT
    a.date,
    Dau,
    coalesce(new_user,0) as n_new_user,
    Dau - n_new_user as recurring_user,
    100 * n_new_user / Dau as new_user_percent,
    100 * recurring_user / Dau as recurring_user_percent
    FROM DAU_u a
    LEFT JOIN new b using(date)
    ORDER BY 1 DESC
    Last run: 3 months ago
    DATE
    DAU
    N_NEW_USER
    RECURRING_USER
    NEW_USER_PERCENT
    RECURRING_USER_PERCENT
    1
    2025-02-09 00:00:00.00011868211046.91399793.086003
    2
    2025-02-08 00:00:00.000210420818969.88593290.114068
    3
    2025-02-07 00:00:00.0002029266176313.10990686.890094
    4
    2025-02-06 00:00:00.0002051256179512.48171687.518284
    5
    2025-02-05 00:00:00.0002158242191611.21408788.785913
    6
    2025-02-04 00:00:00.000216121319489.85654890.143452
    7
    2025-02-03 00:00:00.0002565278228710.83820789.161793
    8
    2025-02-02 00:00:00.0002346235211110.0170589.98295
    9
    2025-02-01 00:00:00.0002159232192710.74571689.254284
    10
    2025-01-31 00:00:00.0002057229182811.13271888.867282
    11
    2025-01-30 00:00:00.0002240256198411.42857188.571429
    12
    2025-01-29 00:00:00.0002017226179111.2047688.79524
    13
    2025-01-28 00:00:00.0001931233169812.06628787.933713
    14
    2025-01-27 00:00:00.0002277274200312.03337787.966623
    15
    2025-01-26 00:00:00.0002253279197412.38348987.616511
    16
    2025-01-25 00:00:00.0002360306205412.96610287.033898
    17
    2025-01-24 00:00:00.0001983282170114.22087785.779123
    18
    2025-01-23 00:00:00.0001952283166914.49795185.502049
    19
    2025-01-22 00:00:00.0002033271176213.33005486.669946
    20
    2025-01-21 00:00:00.0002134312182214.62043185.379569
    ...
    367
    22KB
    218s