Bitcoin

Bitcoin data tables available in SQL query

Bitcoin base type tables available to query

Table NameDescription

Block headers

Block headers from the last 30 minutes, ~3 blocks

Block transactions

Block transactions from the last 30 minutes, ~3 blocks

All inputs to transactions

Inputs to transactions from the last 30 minutes, ~3 blocks

All outputs from transactions

Outputs from transactions from the last 30 minutes, ~3 blocks

The table list is also available as a SQL query using show tables. For example:

SHOW TABLES IN btc

The columns and their schema available for each table can be viewed with the describe <table> command. For example:

/* Show the columns available */
DESCRIBE btc.blocks;
DESCRIBE btc.transactions;
DESCRIBE btc.transaction_inputs;
DESCRIBE btc.transaction_outputs;

Improving query performance - indexed columns

Table NameIndexed Columns

btc.blocks

number timestamp

btc.transactions

block_number block_timestamp

btc.transaction_inputs

block_number block_timestamp

btc.transaction_outputs

block_number block_timestamp

Last updated