Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Ethereum gas price by date from BigQuery
SELECT CAST('2019-04-01' AS DATE) AS d, AVG(gas_used) AS gas
FROM `bigquery-public-data.crypto_ethereum.blocks`
WHERE TRUE
AND timestamp >= TIMESTAMP('2019-04-01')
AND timestamp <= TIMESTAMP(DATE_ADD(CAST('2019-04-01' AS DATE), INTERVAL 1 DAY))
GROUP BY d
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.