zakkisyedBlast Block Stats
    Updated 2024-08-09
    WITH Enhanced_Transactions AS (
    SELECT
    COUNT(DISTINCT t.from_address) AS "Unique Wallets Engaged",
    COUNT(t.tx_hash) AS "Total Transaction Count",
    SUM(t.gas_used) AS "Cumulative Gas Consumed",
    AVG(t.tx_fee) AS "Average Transaction Fee (ETH)",
    MEDIAN(t.tx_fee) AS "Median Transaction Fee (ETH)",
    SUM(t.value) AS "Total ETH Transferred",
    AVG(t.gas_price) AS "Average Gas Price",
    MEDIAN(t.gas_price) AS "Median Gas Price",
    100.0 * SUM(CASE WHEN t.status = 'SUCCESS' THEN 1 ELSE 0 END) / COUNT(t.tx_hash) AS "Success Transaction Rate (%)"
    FROM
    blast.core.fact_transactions t
    ),
    eth_price_avg AS (
    SELECT
    DATE_TRUNC('hour', e.hour) AS hour,
    AVG(e.price) AS avg_price_usd
    FROM
    crosschain.price.ez_prices_hourly e
    WHERE
    e.blockchain = 'ethereum' AND
    e.symbol = 'WETH'
    GROUP BY 1
    ),
    Transaction_Fees_USD AS (
    SELECT
    et."Unique Wallets Engaged",
    et."Total Transaction Count",
    et."Cumulative Gas Consumed",
    et."Average Transaction Fee (ETH)",
    et."Median Transaction Fee (ETH)",
    et."Total ETH Transferred",
    et."Average Gas Price",
    et."Median Gas Price",
    et."Success Transaction Rate (%)",
    QueryRunArchived: QueryRun has been archived