fantasySolana Cohort Retention by Last Activity
    Updated 2025-04-08
    WITH user_cohorts AS (
    SELECT
    signer,
    DATE_TRUNC('month', first_tx_date) AS cohort_month,
    first_tx_date,
    last_tx_date,
    DATEDIFF('day', first_tx_date, last_tx_date) AS retention_days,
    num_days_active,
    num_txs,
    total_fees,
    programs_used
    FROM
    solana.core.ez_signers
    ),
    cohort_activity AS (
    SELECT
    cohort_month,
    signer,
    DATEDIFF('day', cohort_month, last_tx_date) AS days_since_signup
    FROM
    user_cohorts
    ),
    retention_flags AS (
    SELECT
    cohort_month,
    signer,
    MIN(days_since_signup) AS min_days_since_signup,
    MAX(days_since_signup) AS max_days_since_signup,
    MAX(
    CASE
    WHEN days_since_signup BETWEEN 1
    AND 30 THEN 1
    ELSE 0
    END
    ) AS retained_30d,
    MAX(
    Last run: about 2 months ago
    COHORT_MONTH
    NEW_USERS
    RETAINED_30D
    URR_30D
    RETAINED_60D
    URR_60D
    RETAINED_90D
    URR_90D
    1
    2025-04-01 00:00:00.000209170561786645385.420000
    2
    2025-03-01 00:00:00.000927809158959764996.5710606071.1400
    3
    2025-02-01 00:00:00.0001016532609724978095.6713100981.2900
    4
    2025-01-01 00:00:00.00013419835212584738393.7826429461.9710173130.76
    5
    2024-12-01 00:00:00.00012930061512121762493.7525640681.987649220.59
    6
    2024-11-01 00:00:00.00015454146914677315194.9715197920.9810661660.69
    7
    2024-10-01 00:00:00.00013455989512853963095.5313242170.988194190.61
    8
    2024-09-01 00:00:00.000970608249432786897.184358130.456219560.64
    9
    2024-08-01 00:00:00.000395786893689561393.223620230.9110640552.69
    10
    2024-07-01 00:00:00.000299932372730993491.058973442.9911093633.7
    11
    2024-06-01 00:00:00.000249103902211575288.788813903.5410604954.26
    12
    2024-05-01 00:00:00.000208593721839729088.29336584.489157074.39
    13
    2024-04-01 00:00:00.000163995651356643082.727987894.8712422707.58
    14
    2024-03-01 00:00:00.000224627421955618287.065740132.5618093298.05
    15
    2024-02-01 00:00:00.000203908331836064790.041896830.938340894.09
    16
    2024-01-01 00:00:00.000188221441743971492.661334610.717651374.07
    17
    2023-12-01 00:00:00.000197241351838718493.221073540.548621804.37
    18
    2023-11-01 00:00:00.0006921808624881490.28517160.753832175.54
    19
    2023-10-01 00:00:00.0005113459481864994.23197650.391150392.25
    20
    2023-09-01 00:00:00.0004000166368901492.22132640.33993092.48
    56
    4KB
    299s