elsina2024-10-05: Daily new users vs old users
    Updated 2025-02-07
    WITH users AS (
    SELECT
    origin_from_address,
    MIN(block_timestamp) AS min_date
    FROM
    swell.core.ez_decoded_event_logs
    where
    event_name = 'Deposit'
    GROUP BY
    origin_from_address
    ),

    new_users AS (
    SELECT
    date_trunc('day', min_date) AS date,
    COUNT(DISTINCT origin_from_address) AS new_user_count
    FROM
    users
    GROUP BY
    date
    ),

    old_users AS (
    SELECT
    date_trunc('day', block_timestamp) AS date,
    COUNT(DISTINCT origin_from_address) AS old_user_count
    FROM
    swell.core.ez_decoded_event_logs
    WHERE
    origin_from_address IN (
    SELECT origin_from_address
    FROM users
    WHERE min_date < date_trunc('day', block_timestamp)
    )
    GROUP BY
    date
    Last run: about 2 months ago
    DAILY
    OLD_USERS
    NEW_USERS
    PERCENT_NEW_USERS
    PERCENT_OLD_USERS
    1
    2025-01-01 00:00:00.000211338.23529411861.764705882
    2
    2025-01-02 00:00:00.00022724.13793103475.862068966
    3
    2025-01-03 00:00:00.00021519.23076923180.769230769
    4
    2025-01-04 00:00:00.000221337.14285714362.857142857
    5
    2025-01-05 00:00:00.000251841.86046511658.139534884
    6
    2025-01-06 00:00:00.000311431.11111111168.888888889
    7
    2025-01-07 00:00:00.000351225.53191489474.468085106
    8
    2025-01-08 00:00:00.00038715.55555555684.444444444
    9
    2025-01-09 00:00:00.000371224.48979591875.510204082
    10
    2025-01-10 00:00:00.000301126.82926829373.170731707
    11
    2025-01-11 00:00:00.000341022.72727272777.272727273
    12
    2025-01-12 00:00:00.000341429.16666666770.833333333
    13
    2025-01-13 00:00:00.000441221.42857142978.571428571
    14
    2025-01-14 00:00:00.0007178.97435897491.025641026
    15
    2025-01-15 00:00:00.00048611.11111111188.888888889
    16
    2025-01-16 00:00:00.00052813.33333333386.666666667
    17
    2025-01-17 00:00:00.00040102080
    18
    2025-01-18 00:00:00.00038000
    19
    2025-01-19 00:00:00.0005023.84615384696.153846154
    20
    2025-01-20 00:00:00.0004461288
    38
    2KB
    1s