BlockTrackernew vs returning users
    Updated 2025-04-06
    with DAU_u as (
    SELECT
    date_trunc('day', block_timestamp) as date,
    count(DISTINCT from_address) as DAU
    FROM ink.core.fact_transactions
    GROUP BY date
    )
    ,new as (
    SELECT
    date_trunc('day', first_tx) as date,
    count(DISTINCT user) as new_user
    FROM (
    SELECT
    from_address as user,
    min(block_timestamp) as first_tx
    FROM ink.core.fact_transactions
    GROUP BY 1)
    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: 16 days ago
    DATE
    DAU
    NEW_ACCOUNT
    CUM_ACCOUNT
    RETURNING_ACCOUNT
    NEW_ACCOUNT_PERCENT
    RETURNING_ACCOUNT_PERCENT
    daily avg DAU
    AVARAGE_7_DAU
    daily avg new account
    AVARAGE_7_NEW_ACCOUNT
    1
    2025-04-06 00:00:00.00053893234349251536590.43419499.56580656688.352459125965.6252862.713115683.75
    2
    2025-04-05 00:00:00.00095546650349017948960.68030199.31969956711.454545137641.6252884.438017748
    3
    2025-04-04 00:00:00.0001550156463483671543690.41673499.58326656387.833333138459.8752903.058333777.75
    4
    2025-04-03 00:00:00.0001459398173477211451220.55982399.44017755559.033613136028.1252922.02521799.875
    5
    2025-04-02 00:00:00.0001548957643469041541310.49323799.50676354793.101695137431.52939.864407748
    6
    2025-04-01 00:00:00.0001557076973461401550100.44763699.55236453937.529915130452.252958.461538698.375
    7
    2025-03-31 00:00:00.00094010830345443931800.88288599.11711553060.206897123214.752977.956897665.625
    8
    2025-03-30 00:00:00.0001527208323446131518880.54478899.45521252704.121739121100.52996.634783615.875
    9
    2025-03-29 00:00:00.0001473017483437811465530.50780499.49219651826.7894741143493015.622807557.75
    10
    2025-03-28 00:00:00.0001020928883430331012040.86980499.13019650981.884956108588.753035.690265518
    11
    2025-03-27 00:00:00.0001355618233421451347380.60710799.39289350525.544643106782.753054.866071470
    12
    2025-03-26 00:00:00.0001571664023413221567640.25578199.74421949759.459459108763.8753074.972973666.875
    13
    2025-03-25 00:00:00.00099061367340920986940.37047999.62952148783.036364100749.6253099.272727754
    14
    2025-03-24 00:00:00.00097807435340553973720.44475399.55524748321.77064299879.1253124.33945836.875
    15
    2025-03-23 00:00:00.00077096432340118766640.5603499.4396647863.574074106706.753149.2407411960.375
    16
    2025-03-22 00:00:00.00098708367339686983410.37180499.62819647590.373832107432.6253174.6355141974.25
    17
    2025-03-21 00:00:00.0001012194303393191007890.42482199.57517947108.132075112125.253201.1226427260.25
    18
    2025-03-20 00:00:00.00087644504338889871400.57505499.42494646592.790476110948.3753227.5142867544.125
    19
    2025-03-19 00:00:00.00015141023983383851490121.58377998.41622146198.067308110380.1253253.7019237579.125
    20
    2025-03-18 00:00:00.000930521099335987919531.1810698.8189445176.592233101513.8753262.0097097525.125
    ...
    122
    13KB
    3s