winnie-fseth-gas-share copy
    Updated 2024-06-26
    -- forked from charliemarketplace / eth-gas-share @ https://flipsidecrypto.xyz/charliemarketplace/q/dSLp0XhRmbFV/eth-gas-share

    select
    date_trunc('week', block_timestamp) as week_,
    count(tx_hash) as n_tx,
    sum(case when blob_versioned_hashes IS NOT NULL then 1 else 0 end) as n_blob_tx,
    sum(case when blob_versioned_hashes IS NOT NULL then ARRAY_SIZE(blob_versioned_hashes) else 0 end)
    as n_blobs,
    sum(tx_fee) as total_tx_fees,
    sum(case when blob_versioned_hashes IS NOT NULL then tx_fee else 0 end) as blob_related_tx_fees,
    DIV0(blob_related_tx_fees, total_tx_fees)*100 as blob_fee_percent
    from ethereum.core.fact_transactions
    where block_timestamp >= '2024-01-01'
    group by week_



    QueryRunArchived: QueryRun has been archived