datavortexGames cummulative
    Updated 2025-01-29
    WITH project_data AS (
    SELECT address, project_name
    FROM Kaia.core.dim_labels
    WHERE label_type = 'games'
    ),

    transactions AS (
    SELECT
    from_address,
    to_address,
    DATE_TRUNC('month', block_timestamp) AS month
    FROM Kaia.core.fact_transactions
    WHERE to_address IN (SELECT address FROM project_data)
    ),

    monthly_users AS (
    SELECT
    t.month,
    p.project_name AS project,
    COUNT(DISTINCT t.from_address) AS new_users
    FROM transactions t
    JOIN project_data p ON t.to_address = p.address
    GROUP BY t.month, p.project_name
    ),

    cumulative_growth AS (
    SELECT
    month,
    project,
    SUM(new_users) OVER (PARTITION BY project ORDER BY month) AS total_users
    FROM monthly_users
    )

    SELECT
    month AS "Month",
    project AS "Game Name",
    QueryRunArchived: QueryRun has been archived