Public dataset · Economy, finance and crypto
Ethereum Blockchain (crypto_ethereum) in BigQuery
The Ethereum blockchain as 11 views: blocks, transactions, logs, traces, token transfers, contracts, tokens and balances. Traces alone scan 13.53 TiB with SELECT *, so always filter on block_timestamp: one month of daily transaction stats costs about 0.55 GiB.
The dataset description calls it a community dataset of Ethereum blockchain data, maintained by Google, and links to the Ethereum Blockchain listing in BigQuery sharing (Analytics Hub). All 11 objects are views, so BigQuery shows no row count or storage size; the sizes below are dry-run estimates of a SELECT *.
blocks and transactions hold the chain itself, with gas, fee and blob fields (base_fee_per_gas, receipt_effective_gas_price, max_fee_per_blob_gas). logs holds event logs, traces internal calls and value transfers, and token_transfers decoded token transfers (token_address, from_address, to_address, value as a STRING). contracts has deployed bytecode with is_erc20 and is_erc721 flags, tokens, tokens_latest, amended_tokens and token_supply_latest describe tokens, and balances has the ETH balance per address.
Amounts in value, gas_price and eth_balance are in wei (10^18 wei per ether), so divide before presenting.
Tables and sizes
| Table | Rows | Size | Full scan | Layout |
|---|---|---|---|---|
tracesView: BigQuery reports no row count for views; size is the dry-run estimate for SELECT *. | View | 13.5 TiB | $84.54 | None |
logsView: BigQuery reports no row count for views; size is the dry-run estimate for SELECT *. | View | 3.9 TiB | $24.11 | None |
transactionsView: BigQuery reports no row count for views; size is the dry-run estimate for SELECT *. | View | 3.6 TiB | $22.64 | None |
token_transfersView: BigQuery reports no row count for views; size is the dry-run estimate for SELECT *. | View | 1.2 TiB | $7.78 | None |
contractsView: BigQuery reports no row count for views; size is the dry-run estimate for SELECT *. | View | 98.0 GiB | $0.60 | None |
blocksView: BigQuery reports no row count for views; size is the dry-run estimate for SELECT *. | View | 38.7 GiB | $0.24 | None |
balancesView: BigQuery reports no row count for views; size is the dry-run estimate for SELECT *. | View | 19.4 GiB | $0.12 | None |
token_supply_latestView: BigQuery reports no row count for views; size is the dry-run estimate for SELECT *. | View | 8.2 GiB | $0.05 | None |
tokens_latestView: BigQuery reports no row count for views; size is the dry-run estimate for SELECT *. | View | 6.2 GiB | $0.04 | None |
tokensView: BigQuery reports no row count for views; size is the dry-run estimate for SELECT *. | View | 3.8 GiB | $0.02 | None |
amended_tokensView: BigQuery reports no row count for views; size is the dry-run estimate for SELECT *. | View | 181 MiB | under $0.01 | None |
Example queries
Every transaction with SELECT * (very expensive)
Dry run: 3.62 TiB, about $22.64 at on-demand list price. The input calldata column alone is 2.38 TiB of it.
SELECT *
FROM `bigquery-public-data.crypto_ethereum.transactions`;Daily transactions and average gas price, full history (expensive)
Two columns, no time filter: 57.62 GiB as an upper bound.
SELECT
DATE(block_timestamp) AS day,
COUNT(*) AS transactions,
ROUND(AVG(receipt_effective_gas_price) / 1e9, 2) AS avg_gas_price_gwei
FROM `bigquery-public-data.crypto_ethereum.transactions`
GROUP BY day
ORDER BY day;Daily transactions and average gas price for one month (cheap)
Same query with a block_timestamp range for April 2024: 558 MiB, about 100 times less.
SELECT
DATE(block_timestamp) AS day,
COUNT(*) AS transactions,
ROUND(AVG(receipt_effective_gas_price) / 1e9, 2) AS avg_gas_price_gwei
FROM `bigquery-public-data.crypto_ethereum.transactions`
WHERE block_timestamp >= '2024-04-01'
AND block_timestamp < '2024-05-01'
GROUP BY day
ORDER BY day;Daily USDT transfers in one month
Filters token_transfers by the USDT contract address and a month: 2.48 GiB upper bound.
SELECT
DATE(block_timestamp) AS day,
COUNT(*) AS transfers
FROM `bigquery-public-data.crypto_ethereum.token_transfers`
WHERE token_address = '0xdac17f958d2ee523a2206206994597c13d831ec7'
AND block_timestamp >= '2024-04-01'
AND block_timestamp < '2024-05-01'
GROUP BY day
ORDER BY day;Addresses with the largest ETH balance
balances has no time column to prune, so this always scans the whole 19.42 GiB.
SELECT
address,
eth_balance / 1e18 AS eth
FROM `bigquery-public-data.crypto_ethereum.balances`
ORDER BY eth_balance DESC
LIMIT 10;Querying it cheaply
- The big views are
traces(13.53 TiB),logs(3.86 TiB),transactions(3.62 TiB) andtoken_transfers(1.24 TiB). A single unfilteredSELECT *ontracescosts more than 13 months of free tier. - Filter every query on
block_timestamp(onblocks, ontimestamp). In dry runs the month filter cut a daily transaction query from 57.62 GiB to 558 MiB. - Avoid
inputintransactionsanddataandtopicsinlogsunless you decode them. In dry runsinputis 2.38 of the 3.62 TiB oftransactions, anddataplustopicsare 2.33 of the 3.86 TiB oflogs. - These are views, so dry runs report an upper bound. Billed bytes can be lower but not higher.
- Set a maximum bytes billed limit before exploring.
FAQ
How much does it cost to query Ethereum data in BigQuery?
With a one-month block_timestamp filter, queries on transactions or blocks scan about 0.5 to 0.6 GiB. Full-history aggregates scan tens of GiB, and SELECT * on transactions scans 3.62 TiB, about $16.39 beyond the free tier.
Is the crypto_ethereum dataset free?
Google pays for storing public datasets, so you never pay storage for them. You pay only for the bytes your queries scan, billed to your own project at the on-demand rate, and the first 1 TiB scanned each month is free. See BigQuery pricing.
Why is token_transfers.value a STRING?
Token amounts can exceed the range of INT64 and NUMERIC. Cast with SAFE_CAST(value AS BIGNUMERIC) (values beyond BIGNUMERIC's range return NULL) and divide by 10^decimals from the tokens view to get human units.
Why do the tables show 0 rows?
All 11 objects are views, and BigQuery reports no row count or size for views. Use a dry run to see what a query will scan.
Related datasets
All public datasets · BigQuery cost queries · Pricing calculator
