BlockTrackernew vs returning users
    Updated 2025-05-26
    with DAU_u as (
    SELECT
    date_trunc('{{granularity}}', block_timestamp) as date,
    count(DISTINCT from_address) as DAU
    FROM monad.testnet.fact_transactions
    where date >= '2025-02-18'
    GROUP BY date
    )
    ,new as (
    SELECT
    date_trunc('{{granularity}}', first_tx) as date,
    count(DISTINCT user) as new_user
    FROM (
    SELECT
    from_address as user,
    min(block_timestamp) as first_tx
    FROM monad.testnet.fact_transactions
    GROUP BY 1)
    where date >= '2025-02-18'
    GROUP BY 1)

    SELECT
    a.date,
    Dau,
    coalesce(new_user,0) as new_account,
    sum(new_account) over (ORDER by date) as cum_account,
    Dau - new_account as returning_account,
    100 * new_account / Dau as new_account_percent,
    100 * returning_account / Dau as returning_account_percent
    -- avg(Dau)over(ORDER BY date) as "daily avg DAU",
    -- AVG(Dau) over (ORDER BY date ROWS BETWEEN 7 PRECEDING AND CURRENT ROW) as avarage_7_Dau,
    -- avg(new_account)over(ORDER BY date) as "daily avg new account",
    -- AVG(new_account) over (ORDER BY date ROWS BETWEEN 7 PRECEDING AND CURRENT ROW) as avarage_7_new_account
    FROM DAU_u a
    LEFT JOIN new b using(date)
    ORDER BY 1 DESC
    Last run: 13 days ago
    DATE
    DAU
    NEW_ACCOUNT
    CUM_ACCOUNT
    RETURNING_ACCOUNT
    NEW_ACCOUNT_PERCENT
    RETURNING_ACCOUNT_PERCENT
    1
    2025-05-25 00:00:00.000911156297953052362378813613.27002296.729978
    2
    2025-05-24 00:00:00.000948725315113052064429172143.32140596.678595
    3
    2025-05-23 00:00:00.00010664353342330517493110330123.13408796.865913
    4
    2025-05-22 00:00:00.0001025306517383051415089735685.04610394.953897
    5
    2025-05-21 00:00:00.0001034655646473050897709700086.2481793.75183
    6
    2025-05-20 00:00:00.0001026536772173050251239493197.52209492.477906
    7
    2025-05-19 00:00:00.00011118218482830494790610269937.62964592.370355
    8
    2025-05-18 00:00:00.0001013339879063048630789254338.67488691.325114
    9
    2025-05-17 00:00:00.00097704811006030477517286698811.26454488.735456
    10
    2025-05-16 00:00:00.000105511710714230466511294797510.15451489.845486
    11
    2025-05-15 00:00:00.0001043035959303045579709471059.19719990.802801
    12
    2025-05-14 00:00:00.000898436361023044620408623344.01831695.981684
    13
    2025-05-13 00:00:00.00010300162254930442593810074672.18918997.810811
    14
    2025-05-12 00:00:00.000971027485973044033899224305.00470194.995299
    15
    2025-05-11 00:00:00.000954873356763043547929191973.73620496.263796
    16
    2025-05-10 00:00:00.000963251787213043191168845308.17242991.827571
    17
    2025-05-09 00:00:00.000117274010987430424039510628669.36899990.631001
    18
    2025-05-08 00:00:00.000117444911322530413052110612249.64069190.359309
    19
    2025-05-07 00:00:00.0001267324234313304017296103301118.488881.5112
    20
    2025-05-06 00:00:00.000103093712737430378298390356312.35516887.644832
    97
    8KB
    134s