datavortexA g fee per block
    Updated 2024-12-08
    WITH usd_conversion AS (
    SELECT
    AVG(price) AS eth_price_usd
    FROM
    base.price.ez_prices_hourly
    WHERE
    symbol = 'ETH'
    AND hour >= '2024-01-01'
    AND hour <= '2024-12-31'
    ),
    transactions_with_gas AS (
    SELECT
    tx_hash,
    block_hash,
    tx_fee,
    block_timestamp
    FROM
    base.core.fact_transactions
    WHERE
    block_timestamp >= '2024-01-01'
    AND block_timestamp <= '2024-12-31'
    AND status = 'SUCCESS'
    ),
    transactions_with_price AS (
    SELECT
    t.tx_hash,
    t.block_hash,
    t.tx_fee,
    t.block_timestamp,
    u.eth_price_usd
    FROM
    transactions_with_gas t
    CROSS JOIN usd_conversion u
    )
    SELECT
    COUNT(DISTINCT block_hash) AS total_blocks,
    QueryRunArchived: QueryRun has been archived