Skip to content

Instantly share code, notes, and snippets.

@AdvaithD
Created January 7, 2019 08:18
Show Gist options
  • Save AdvaithD/86b7341602a798ee88e0bf22b5c0c994 to your computer and use it in GitHub Desktop.
Save AdvaithD/86b7341602a798ee88e0bf22b5c0c994 to your computer and use it in GitHub Desktop.
SELECT contracts.address, COUNT(1) AS tx_count
FROM `bigquery-public-data.ethereum_blockchain.contracts` AS contracts
JOIN `bigquery-public-data.ethereum_blockchain.transactions` AS transactions ON (transactions.to_address = contracts.address)
WHERE contracts.is_erc20 = TRUE
GROUP BY contracts.address
ORDER BY tx_count DESC
LIMIT 10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment