The raw data schema includes blocks, transactions, transactions input, and transaction output of Bitcoin data.
Anatomy of Bitcoin UTXO. Image Source: Liu, Y., Zhang, L. & Zhao, Y.To select for all inputs and outputs a user is involved in, you can use the following query for inputs
Copy
Ask AI
select spent_utxo_id, transaction_hash from bitcoin.raw.inputs where address0 = 'bc1...'
and the following query for outputs:
Copy
Ask AI
select utxo_id, transaction_hash from bitcoin.raw.ouptuts where address0 = 'bc1...'
and union the two results if you want both
Raw
Description
blocks
Blocks data, including block size, difficulty and confirmations.