i_danSwellChain: Churn Rate
    Updated 2025-04-02
    WITH last_activity AS (
    SELECT
    from_address
    , MAX(DATE_TRUNC('week', block_timestamp)) AS last_active_week
    FROM swell.core.fact_transactions
    GROUP BY 1
    )
    SELECT
    last_active_week AS "Week"
    , COUNT(DISTINCT l.from_address) AS "Churned Users"
    , COUNT(DISTINCT t.from_address) AS "Total Users"
    FROM last_activity l
    JOIN swell.core.fact_transactions t ON date_trunc('week', t.block_timestamp) = l.last_active_week
    WHERE last_active_week < DATE_TRUNC('week', CURRENT_DATE) - INTERVAL '1 week'
    GROUP BY 1
    ORDER BY 1

    Last run: about 1 month ago
    Week
    Churned Users
    Total Users
    1
    2024-12-02 00:00:00.000114256
    2
    2024-12-09 00:00:00.00040109
    3
    2024-12-16 00:00:00.000106450
    4
    2024-12-23 00:00:00.000249868
    5
    2024-12-30 00:00:00.0003771235
    6
    2025-01-06 00:00:00.0006031465
    7
    2025-01-13 00:00:00.0003451465
    8
    2025-01-20 00:00:00.00041296164
    9
    2025-01-27 00:00:00.00014102445
    10
    2025-02-03 00:00:00.0008991753
    11
    2025-02-10 00:00:00.00011411950
    12
    2025-02-17 00:00:00.0008321515
    13
    2025-02-24 00:00:00.0004591062
    14
    2025-03-03 00:00:00.0005031082
    15
    2025-03-10 00:00:00.0004711003
    16
    2025-03-17 00:00:00.0006241094
    16
    591B
    40s