petertherockAverage Gas Fee per Transaction
    Updated 2022-08-06
    SELECT
    -- block_number,
    DATE_TRUNC('hour', block_timestamp) AS hour,
    COUNT(*) AS number_of_transactions,
    SUM(gas_price*gas_used/1e9) AS total_gas_fee,
    AVG(gas_price*gas_used/1e9) AS avg_gas_fee,
    status
    FROM gnosis.core.fact_transactions
    -- WHERE block_timestamp >= '2022-06-20'
    -- AND block_timestamp < CURRENT_DATE
    GROUP BY 1,5
    Run a query to Download Data