How to query Ethereum data in google bigquery and how to write sql

Document introduction

https://console.cloud.google.com/marketplace/details/ethereum/crypto-ethereum-blockchain?project=aqueous-tesla-294801

Such as query

What are the 10 most popular Ethereum collectibles (ERC721 contracts), by number of transactions?

SELECT contracts.address, COUNT(1) AS tx_count
FROM `bigquery-public-data.crypto_ethereum.contracts` AS contracts
JOIN `bigquery-public-data.crypto_ethereum.transactions` AS transactions ON (transactions.to_address = contracts.address)
WHERE contracts.is_erc721 = TRUE
GROUP BY contracts.address
ORDER BY tx_count DESC
LIMIT 10

Other query methods

https://ethereum-etl.readthedocs.io/en/latest/commands/

kaggle data format

Ethereum Blockchain | KaggleComplete live historical Ethereum blockchain data (BigQuery)https://www.kaggle.com/datasets/bigquery/ethereum-blockchain?utm_medium=partner&utm_source=cloud&utm_campaign=big+data+blog+ethereum&select=contracts

Guess you like

Origin blog.csdn.net/u013288190/article/details/127678420
Recommended