datavortexDaily Sar=takes
    Updated 2024-11-30
    /*
    WITH daily_stakes AS (
    SELECT
    DATE_TRUNC('DAY', block_timestamp) AS transaction_date,
    SUM(amount) AS total_staked_amount,
    COUNT(DISTINCT delegator) AS total_delegators,
    COUNT(DISTINCT tx_id) AS distinct_transactions
    FROM
    flow.gov.ez_staking_actions
    WHERE
    action IN ('TokensStaked', 'DelegatorTokensCommitted', 'TokensCommitted')
    AND block_timestamp >= '2024-11-20'
    AND block_timestamp < '2024-11-27'
    GROUP BY
    transaction_date
    )
    SELECT
    transaction_date,
    total_staked_amount,
    total_delegators,
    distinct_transactions
    FROM
    daily_stakes
    ORDER BY
    transaction_date;
    */
    WITH epoch_boundaries AS (
    SELECT
    DATE '2024-11-06' AS epoch_start,
    DATE '2024-11-13' AS epoch_end
    UNION
    ALL
    SELECT
    DATE '2024-11-13',
    DATE '2024-11-20'
    UNION
    QueryRunArchived: QueryRun has been archived