cryptonerd-iBCnogbsc_VRF_cumulative
    Updated 2024-09-17
    -- forked from polygon_VRF_cummulative @ https://flipsidecrypto.xyz/edit/queries/dfef16a7-5f7d-4710-9b86-9dd0735b4241

    -- forked from Ethereum_VRF_cummulative @ https://flipsidecrypto.xyz/edit/queries/a472f791-ff32-45fc-baff-0b5fef200b43

    SELECT
    EVENT_DATE,
    daily_event_count,
    SUM(daily_event_count) OVER (ORDER BY EVENT_DATE) AS cumulative_event_count
    FROM (
    SELECT
    DATE(BLOCK_TIMESTAMP) AS EVENT_DATE,
    COUNT(*) AS daily_event_count
    FROM
    bsc.core.fact_decoded_event_logs
    WHERE
    CONTRACT_ADDRESS = '0xc587d9053cd1118f25f645f9e08bb98c9712a4ee'
    AND EVENT_NAME = 'RandomWordsRequested'
    GROUP BY
    DATE(BLOCK_TIMESTAMP)
    ) AS daily_counts
    ORDER BY
    EVENT_DATE;


    QueryRunArchived: QueryRun has been archived