zackmendelETH Txes Before & After Blobs
    Updated 2024-10-24
    WITH eth_price AS (
    SELECT
    hour::date AS timespan,
    avg (price) AS price
    FROM ethereum.price.ez_prices_hourly
    WHERE symbol = 'WETH'
    GROUP BY 1
    ),

    base AS (
    SELECT
    DISTINCT tx_hash,
    block_number,
    block_timestamp,

    CASE
    WHEN block_timestamp::date < '2024-03-13' THEN 'Before Blob'
    ELSE 'After Blob'
    END AS stats,
    -- gas_price,
    -- gas_used,
    -- (gas_price * gas_used) / pow(10,9) AS base_fees,
    tx_fee,
    tx_fee * price AS tx_fee_usd,
    tx_fee_precise
    FROM ethereum.core.fact_transactions f JOIN eth_price p
    ON f.block_timestamp::date = timespan
    -- WHERE tx_type = '3'
    WHERE block_timestamp::date >= '2024-01-01'
    )

    SELECT
    stats,
    COUNT (DISTINCT tx_hash) AS transactions,
    COUNT (DISTINCT block_number) AS blocks,
    QueryRunArchived: QueryRun has been archived