Reputation: 648
I am trying to download bitcoin data from bigquery public dataset. I want to download in pandas dataframe with three columns
transaction_hash, transaction_timestamp, inputaddress
My query
SELECT
hash,
block_timestamp,
input.addresses
FROM bigquery-public-data.crypto_bitcoin.transactions,
UNNEST(inputs) input
WHERE block_timestamp < 1588879614 AND block_timestamp > 1572480000
I am getting unknown error repeatedly. how to resolve. i tried even in bigquery ui. hash is a field in the table.
BadRequest: 400 Syntax error: Unexpected keyword HASH at [3:3]
Upvotes: 0
Views: 777
Reputation: 173190
Try below instead (for BigQuery Standard SQL)
#standardSQL
SELECT
`hash`,
block_timestamp,
input.addresses
FROM bigquery-public-data.crypto_bitcoin.transactions,
UNNEST(inputs) input
WHERE block_timestamp < '2017-09-07 13:43:30 UTC' AND block_timestamp > '2017-09-06 13:43:30 UTC'
Upvotes: 3