post https://api.zettablock.com/api/v1/dataset/sq_2aad72ab35e1483ca05b0ce4a366b4c1/graphql
Returns a collection of Ethereum historical gas information.
API detailed page: [link]
Transformation Logic:
SELECT
DATE_TRUNC('hour', b.process_time) AS datetime,
AVG(gas_limit) AS gas_limit,
AVG(gas_used) AS gas_used,
AVG(gas_used) / AVG(gas_limit) AS utilization,
SUM(num_of_transactions) as total_transactions_count
FROM
ethereum_mainnet.blocks b
WHERE
process_time >= NOW() - INTERVAL '10' YEAR
GROUP BY
1
ORDER BY
datetime DESC;