Query Ethereum Blockchain with SQL in Google BigQuery

Evgeny Medvedev
2 min readJun 25, 2018

You can query the Ethereum blockchain in this public dataset https://bigquery.cloud.google.com/dataset/bigquery-public-data:crypto_ethereum (updated in real-time)

Note that the data has been moved to bigquery-public-data.crypto_ethereum from bigquery-public-data.ethereum_blockchain.

The above query shows the token balance for a particular address. You can run it in BigQuery yourself if you follow this link: https://bigquery.cloud.google.com/savedquery/610425971344:5f2291716a5c4f178befb95f59d9005d

You will need to create a project before you can use BigQuery (free). You pay $5 per 1TB of data processed, the first 1TB is free. Google Cloud Platform gives you $300 credit so you can query 60TB of data for free even after you exceeded 1TB limit.

Interestingly, the same query ran in AWS Athena requires only 2.65GB data scanned, as opposed to 9.43GB for BigQuery:

You can check out the tool that I used for exporting the blockchain here https://github.com/medvedev1088/ethereum-etl.

Also read:

--

--