Updated 2024-11-20
    -- forked from Alex_Dyan / Daily Transactions @ https://flipsidecrypto.xyz/Alex_Dyan/q/e0RnMpx7nIVV/daily-transactions

    select 'Base' as chain,
    date_trunc('DAY', BLOCK_TIMESTAMP) as day,
    count(*) as daily_transactions,
    sum(daily_transactions) over(order by day) as cummulative_transactions
    from base.core.fact_transactions
    where BLOCK_TIMESTAMP >= '2024-06-01'
    -- and BLOCK_TIMESTAMP <= CURRENT_DATE - interval '1 day'
    group by 2


    QueryRunArchived: QueryRun has been archived