This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"bigquery-public-data.crypto_ethereum.balances" as Bal | |
- | |
address STRING | |
eth_balance NUMERIC | |
"bigquery-public-data.crypto_ethereum.blocks" as B | |
-- | |
column_name data_type | |
timestamp TIMESTAMP | |
number INT64 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SELECT bi.transaction_hash, | |
bi.block_number, | |
bi.block_timestamp, | |
bi.addresses, | |
bi.value | |
FROM `bigquery-public-data.crypto_bitcoin.inputs` as bi | |
WHERE bi.transaction_hash = 'f4184fc596403b9d638783cf57adfe4c75c605f6356fbc91338530e9831e9e16' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SELECT et.hash, | |
et.nonce, | |
et.from_address, | |
et.to_address, | |
et.block_hash, | |
et.block_timestamp | |
FROM `bigquery-public-data.crypto_ethereum.transactions` as et | |
WHERE et.hash = '0x523542d3bbca5d8fce33c933b6bf169723b49294319227e145c48e5b4ce13f11' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SELECT di.transaction_hash, | |
di.block_number, | |
di.block_timestamp, | |
di.addresses, | |
di.value | |
FROM `bigquery-public-data.crypto_dogecoin.inputs` as di | |
WHERE di.transaction_hash = 'c2941b764e5436aa4bb39eaa1360cf7156f80d831141c0d352e950d7f2427325' | |
LIMIT 1000 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Find Bitcoin transaction | |
SELECT | |
bt.hash, | |
bt.block_timestamp, | |
CAST(bi.value AS NUMERIC)/100000000 as InputValueBTC, | |
CAST(bo.value AS NUMERIC)/100000000 as OutputValueBTC | |
FROM | |
`bigquery-public-data.crypto_bitcoin.transactions` AS bt | |
left outer join (Select transaction_hash, Sum(value) as value From `bigquery-public-data.crypto_bitcoin.inputs` GROUP BY transaction_hash) AS bi ON bt.HASH = bi.transaction_hash | |
left outer join (Select transaction_hash, Sum(value) as value From `bigquery-public-data.crypto_bitcoin.outputs` GROUP BY transaction_hash) AS bo ON bt.HASH = bo.transaction_hash |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SELECT CURRENT_DATETIME() as now |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SELECT | |
transactions.hash as transaction_hash, | |
transactions.block_hash, | |
transactions.block_number, | |
transactions.block_timestamp, | |
inputs.index, | |
inputs.spent_transaction_hash, | |
inputs.spent_output_index, | |
inputs.script_asm, | |
inputs.script_hex, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SELECT | |
transactions.hash as transaction_hash, | |
transactions.block_hash, | |
transactions.block_number, | |
transactions.block_timestamp, | |
outputs.index, | |
outputs.script_asm, | |
outputs.script_hex, | |
outputs.required_signatures, | |
outputs.type, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SELECT | |
transactions.hash as transaction_hash, | |
transactions.block_hash, | |
transactions.block_number, | |
transactions.block_timestamp, | |
outputs.index, | |
outputs.script_asm, | |
outputs.script_hex, | |
outputs.required_signatures, | |
outputs.type, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SELECT block_timestamp, block_timestamp_month, output_value | |
FROM `bigquery-public-data.crypto_bitcoin.transactions` |
OlderNewer