Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
/*
Calculate the total amount of transaction fee since January 1st 2017 (block 2912407), with weithed
average price of Ether as 492.
NOTE: Need to divide gas_price by 10 to prevent overflow in BigQuery.
*/
SELECT
SUM(gas_price/10 * receipt_gas_used) / POWER(10, 17) * 492
FROM
`bigquery-public-data.ethereum_blockchain.transactions` AS transactions
WHERE TRUE
and transactions.block_number >= 2912407
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.