walemathsUser Balance Changes
    Updated 2024-07-11
    WITH balance_changes AS (
    SELECT
    date,
    address AS user_id,
    balance_type,
    balance
    FROM
    axelar.core.fact_daily_balances
    WHERE
    date >= DATEADD(day, -3000000, CURRENT_DATE())
    ),
    daily_balance_changes AS (
    SELECT
    date,
    balance_type,
    SUM(balance) AS total_balance
    FROM
    balance_changes
    GROUP BY
    date, balance_type
    )
    SELECT
    date,
    balance_type,
    total_balance
    FROM
    daily_balance_changes
    ORDER BY
    date, balance_type;

    QueryRunArchived: QueryRun has been archived