Skip to content

Instantly share code, notes, and snippets.

@garethtdavies
Last active July 21, 2019 23:21
Show Gist options
  • Save garethtdavies/e6f79897f53618603373307389e035fa to your computer and use it in GitHub Desktop.
Save garethtdavies/e6f79897f53618603373307389e035fa to your computer and use it in GitHub Desktop.
Google BigQuery Zcash Migration Transactions
SELECT
block_number,
`hash`,
input_value,
output_value,
fee,
i.type AS input_type,
o.type AS output_type,
block_timestamp
FROM
`bigquery-public-data.crypto_zcash.transactions`,
UNNEST(inputs) AS i,
UNNEST(outputs) AS o
WHERE
block_timestamp_month > "2019-05-01"
AND is_coinbase = FALSE
AND input_count = 1
AND output_count = 1
AND i.type = "shielded"
AND o.type = "shielded"
ORDER BY
block_number ASC
@garethtdavies
Copy link
Author

garethtdavies commented Jul 21, 2019

Query starts May 1st 2019 as there were no migration tx on mainnet before that month.

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