Query editor
-- DUNE Query to fetch Average Gas Price in the last 24 hours--> Helps in determining the immediate cost implications for transactions.--> Assists users in setting competitive gas prices for faster transaction confirmation.-- Start of the query to retrieve hourly average gas prices from Ethereum transactions over the past daySELECT-- Truncate block_time to an hourly precision, effectively aggregating data on an hourly basisDATE_TRUNC('hour', block_time) AS hour,-- Calculate the average gas price, converting it from wei to Gwei and rounding to 2 decimal placesROUND(AVG(gas_price)/1e9, 2) AS avg_gas_price-- Specify the data source (ethereum.transactions table)FROM ethereum.transactions-- Apply a filter to consider only the transactions from the past 24 hoursWHERE DATE_TRUNC('hour', block_time) >= (NOW() - INTERVAL '1' DAY)-- Group the results by the hour to get aggregated metrics for each hourGROUP BY DATE_TRUNC('hour', block_time)-- Sort the results by hour in ascending orderORDER BY hour;