Skip to content

Instantly share code, notes, and snippets.

@rifkiamil
Created February 19, 2021 12:36
Show Gist options
  • Save rifkiamil/b2be164a845097a68f7814b0f4603803 to your computer and use it in GitHub Desktop.
Save rifkiamil/b2be164a845097a68f7814b0f4603803 to your computer and use it in GitHub Desktop.
Top 20 balances on Ethereum with correct decimal place
## Below is the query that will give you top 20 balances on Ethereum
SELECT Address as EthAddress,
CAST(eth_balance as NUMERIC)/1000000000000000000 as EthBalance
FROM `bigquery-public-data.crypto_ethereum.balances`
ORDER BY Eth_balance DESC
LIMIT 20
@rifkiamil
Copy link
Author

https://github.com/blockchain-etl is the code that extract the data of the blockchain. Should be some place in the Repository. Does that help?

@ctrl-f-sebi
Copy link

Yeah, I think. I did not specifically find it in the code that extracts the data (I am not advanced enough), however, if balances are measured in Wei then that would explain division by 1000000000000000000

Thanks!

@rifkiamil
Copy link
Author

If you try the following discord group https://discord.com/invite/wukrezR you will find a channel for Ethereum ETL

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment