mo115BNB Chain Blocks copy
    Updated 2024-03-08
    -- forked from Litoshi / BNB Chain Blocks @ https://flipsidecrypto.xyz/Litoshi/q/adfRuCHIIMgX/bnb-chain-blocks

    SELECT
    date_trunc('day',block_timestamp) as Date,
    count(block_number) as Blocks,
    sum(tx_count) as Transactions,
    avg(transactions/blocks) over (order by 'day') as tx_per_block,
    sum(gas_used) as Cum_Gas_Used,
    avg(cum_gas_used/blocks) over (order by 'day') as gas_per_block
    from bsc.core.fact_blocks
    where date BETWEEN '2024-02-01' and '2024-02-29'
    group by 1
    order by 3


    QueryRunArchived: QueryRun has been archived