permaryDaily new users
    Updated 2025-03-08
    WITH user_first_activity AS (
    -- Find the first day each user interacted with fantasy contracts
    SELECT
    origin_from_address as user_address,
    MIN(date_trunc('day', block_timestamp)) as first_date
    FROM monad.testnet.fact_event_logs
    WHERE contract_address IN (
    LOWER('0x04edB399CC24a95672BF9B880EE550dE0b2D0B1e'),
    LOWER('0x9077D31A794D81c21b0650974d5F581F4000CD1a'),
    LOWER('0xfA4D5a9ceA2822BA08d0266F121011aC527ced64')
    )
    GROUP BY user_address
    ),
    daily_new_users AS (
    -- Count new users for each day
    SELECT
    first_date as "Date",
    COUNT(*) as "New Users"
    FROM user_first_activity
    GROUP BY first_date
    )

    SELECT
    "Date",
    "New Users",
    SUM("New Users") OVER (ORDER BY "Date" ROWS BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW) as "Cumulative Users"
    FROM daily_new_users
    ORDER BY "Date" DESC;
    Last run: about 2 months ago
    Date
    New Users
    Cumulative Users
    1
    2025-03-08 00:00:00.00014845634148
    2
    2025-03-07 00:00:00.00019341619303
    3
    2025-03-06 00:00:00.00022498599962
    4
    2025-03-05 00:00:00.00034201577464
    5
    2025-03-04 00:00:00.00033490543263
    6
    2025-03-03 00:00:00.0007617509773
    7
    2025-03-02 00:00:00.00031568502156
    8
    2025-03-01 00:00:00.00070219470588
    9
    2025-02-28 00:00:00.00028930400369
    10
    2025-02-27 00:00:00.00042973371439
    11
    2025-02-26 00:00:00.000103823328466
    12
    2025-02-25 00:00:00.00032983224643
    13
    2025-02-24 00:00:00.00014812191660
    14
    2025-02-23 00:00:00.00025065176848
    15
    2025-02-22 00:00:00.00035966151783
    16
    2025-02-21 00:00:00.00089319115817
    17
    2025-02-20 00:00:00.0002309326498
    18
    2025-02-19 00:00:00.00033873405
    19
    2025-02-18 00:00:00.000818
    20
    2025-02-17 00:00:00.000210
    27
    1KB
    10s