Skip to content

Instantly share code, notes, and snippets.

@allenday
Created July 22, 2020 07:24
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save allenday/c5cddaa76ebd18208af9764c79b682f8 to your computer and use it in GitHub Desktop.
Save allenday/c5cddaa76ebd18208af9764c79b682f8 to your computer and use it in GitHub Desktop.
SELECT transfers.block_timestamp,transfers.from_address, transfers.to_address, tokens.symbol, tokens.address, SAFE_CAST(transfers.value AS INT64) / POW(10,SAFE_CAST(tokens.decimals AS INT64)) AS token_value
FROM
`bigquery-public-data.crypto_ethereum.token_transfers` AS transfers,
`bigquery-public-data.crypto_ethereum.tokens` AS tokens
WHERE
transfers.token_address = tokens.address
AND tokens.address IN('0x514910771af9ca656af840dff83e8264ecf986ca','0x2260fac5e5542a773aa44fbcfedf7c193bc2c599')
ORDER BY transfers.block_timestamp DESC
LIMIT 1000
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment