Skip to content

Instantly share code, notes, and snippets.

@medvedev1088
Last active June 16, 2019 16:56
Show Gist options
  • Save medvedev1088/d33e145f0ff1a82b5d303ae916aeb631 to your computer and use it in GitHub Desktop.
Save medvedev1088/d33e145f0ff1a82b5d303ae916aeb631 to your computer and use it in GitHub Desktop.
with ether_emitted_by_date as (
select date(block_timestamp) as date, sum(value) as value
from `bigquery-public-data.crypto_ethereum.traces`
where trace_type in ('genesis', 'reward')
group by date(block_timestamp)
)
select date, sum(value) OVER (ORDER BY date) / power(10, 18) AS supply
from ether_emitted_by_date
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment