Bitcoin ClickHouse tables
Note the Order column - use this column for joins
Transactions Table (txs
)
Column Name |
Data Type |
Order |
Description |
height |
UInt32 |
* |
Block height |
txid |
String |
* |
Transaction ID |
in_total_sats |
UInt64 |
|
Total input in satoshis |
out_total_sats |
UInt64 |
|
Total output in satoshis |
raw |
String |
|
Raw transaction data |
weight |
UInt32 |
|
Transaction weight |
Column Name |
Data Type |
Order |
Description |
txid |
String |
* |
Transaction ID |
vin |
UInt64 |
|
Input sequence number |
prev_txid |
String |
|
Previous transaction ID |
prev_vout |
UInt64 |
|
Previous output sequence number |
in_coinbase |
Bool |
|
Is coinbase transaction |
script_sig |
String |
|
Script signature |
witnesses |
Array(String) |
|
Witnesses array |
Outputs Table (outputs
)
Column Name |
Data Type |
Order |
Description |
txid |
String |
* |
Transaction ID |
vout |
UInt32 |
|
Output sequence number |
value |
UInt64 |
|
Value in satoshis |
script |
String |
|
Output script |
address |
String |
|
Associated address |
address_type |
String |
|
Address type |
Blocks Table (blocks
)
Column Name |
Data Type |
Order |
Description |
height |
UInt32 |
* |
Block height |
hash |
String |
|
Block hash |
time |
DateTime |
|
Timestamp of block |
size |
UInt64 |
|
Size of block |
weight |
UInt64 |
|
Weight of block |
tx_count |
UInt64 |
|
Transaction count in block |
Ordinals Transactions Table (ordinals
)
Column Name |
Data Type |
Order |
Description |
txid |
String |
* |
Transaction ID |
Runes Transactions Table (runes
)
Column Name |
Data Type |
Order |
Description |
txid |
String |
* |
Transaction ID |
txid -> height Table (txs_txid
)
Use this table when a fast join required by txid
| Column Name | Data Type | Order | Description |
|————-|———–|——-|———————-|
| txid
| String | * | Transaction ID |
| height
| UInt32 | | Block height |