Last active
February 22, 2019 03:53
-
-
Save YazzyYaz/28f45c94a282e3748310fd8ca3608fda to your computer and use it in GitHub Desktop.
Daily Mined Blocks Ethereum Classic
This file contains 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 characters
WITH greater_than_million AS ( | |
SELECT TIMESTAMP_TRUNC(timestamp, DAY) AS block_day, | |
COUNT(*) AS gtm_blocks_mined | |
FROM `bigquery-public-data.crypto_ethereum_classic.blocks` | |
WHERE gas_used > 1000000 | |
GROUP BY block_day | |
), | |
total_blocks AS ( | |
SELECT TIMESTAMP_TRUNC(timestamp, DAY) AS day, | |
COUNT(*) AS total_blocks_mined | |
FROM `bigquery-public-data.crypto_ethereum_classic.blocks` | |
GROUP BY day | |
), | |
combined_book AS ( | |
SELECT * | |
FROM total_blocks tot | |
LEFT JOIN greater_than_million gtm ON tot.day = gtm.block_day | |
) | |
SELECT gtm_blocks_mined, | |
total_blocks_mined, | |
day | |
FROM combined_book | |
ORDER BY day ASC |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment