Last active
November 12, 2018 17:41
-
-
Save PhABC/60f0e8cee8c4a37ada9be5e28089620c to your computer and use it in GitHub Desktop.
Revisions
-
PhABC revised this gist
Nov 12, 2018 . 1 changed file with 0 additions and 2 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -8,8 +8,6 @@ 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 -
PhABC revised this gist
Nov 12, 2018 . 1 changed file with 7 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,3 +1,10 @@ /* 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 -
PhABC created this gist
Nov 12, 2018 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,8 @@ SELECT SUM(gas_price/10 * receipt_gas_used) / POWER(10, 17) * 492 FROM `bigquery-public-data.ethereum_blockchain.logs` AS logs JOIN UNNEST(topics) AS topic, `bigquery-public-data.ethereum_blockchain.transactions` AS transactions WHERE TRUE AND transactions.hash = logs.transaction_hash and transactions.block_number >= 2912407