Blockchains are, at their essence, a distributed database. Thetransactions in a blockchain are an example of time-series data. You can useTimescale to query transactions on a blockchain, in exactly the same way as youmight query time-series transactions in any other database.
In this tutorial, you use Timescale to ingest, store, and analyze transactionson the Bitcoin blockchain. You can use these skills to query any data on ablockchain, including other cryptocurrencies, smart contracts, or health data.
Prerequisites
Before you begin, make sure you have:
- Signed up for a free Timescale account.
Steps in this tutorial
This tutorial covers:
About querying the Bitcoin blockchain with Timescale
This tutorial uses a sample Bitcoin dataset to show you how to construct queriesfor blockchain data. The queries you do in this tutorial is used to do thingslike determine if a cryptocurrency is performing as expected, graph currencyvalues over time, and compare currencies.
It starts by teaching you how to set up and connect to a Timescale database,create tables, and load data into the tables using psql
.
You then learn how to conduct analysis on your dataset. It walks you throughusing PostgreSQL queries to obtain information, including finding the mostrecent transactions on the blockchain, and gathering information about thetransactions using aggregation functions.
When you've completed this tutorial, you can use the same dataset to completethe advanced blockchain tutorial, which shows you how toanalyze the blockchain data using Timescale hyperfunctions.
Keywords
Found an issue on this page?Report an issueor Edit this page in GitHub.