Skip to content
BR Academy

Crypto Analytics: On-Chain Data with Dune, SQL and Python

Master on-chain analytics: SQL on Dune, Python export, dashboards, and publish research.

Beginner23 lessons4.97 hoursCertificate

About this course

**Block Relations Academy — Crypto Analytics: On-Chain Data with Dune, SQL and Python**

Blockchain data is public, but reading it requires skill. Every block, transaction, log, and trace sits out in the open — yet most people still outsource their understanding of on-chain activity to third-party dashboards and APIs that hide the methodology behind the numbers. This course teaches you to query that data yourself: SQL on Dune, Python for deeper analysis, and the judgment to turn raw tables into published research.

You’ll start with blockchain fundamentals — how blocks, transactions, the mempool, logs, events, and traces are structured, and how to navigate Dune’s decoded-table schema instead of guessing at column names. From there you move into SQL built for scale: SELECT and WHERE filtering, JOINs and UNIONs across blockchain tables, GROUP BY with window functions, and CTEs and subqueries that keep complex queries readable instead of unmaintainable.

With SQL in hand, you’ll build inside Dune itself — writing and testing queries in the query editor, assembling multi-chart dashboards, and setting up real-time alerts and refresh schedules so a dashboard keeps working long after you publish it. Two analytical modules put those skills to work on real questions: wallet and cohort analysis (tracking balance changes, grouping wallets by first-transaction date, clustering by behavior) and DEX & stablecoin flow analysis (DEX trade volume and pricing, liquidity pool composition, stablecoin transfers and redemptions, and token holder concentration).

The Python module takes your Dune queries further than the UI allows: exporting results via the Dune API, cleaning and reshaping data with pandas, running statistical tests on cohort differences, and writing up findings as reproducible research — queries included, methodology stated, so someone else can check your work.

The capstone is yours: design an original research question, write optimized queries, build a dashboard, run the statistics, and publish findings with full methodology — graded on query correctness, methodology clarity, visualization quality, reproducibility, and the novelty of the insight.

By the end, you’ll be able to answer your own on-chain questions instead of waiting for someone else’s dashboard to answer them for you — and publish the answer as work other analysts can trust and rebuild. No third-party APIs. No black boxes. Just you, SQL, Python, and the blockchain.

Includes 23 lessons across 7 modules, module quizzes, a graded capstone project, and a shareable Block Relations Academy certificate on completion.

What you will be able to do

  • Can explain blockchain data structure (blocks, transactions, logs, traces, decoded tables) and navigate Dune's schema
  • Can write intermediate SQL queries (CTEs, window functions, joins across tables) to extract wallet and transaction patterns
  • Can build multi-chart dashboards in Dune that track DEX volume, stablecoin flows, and token holder distribution
  • Can perform cohort analysis and wallet clustering to identify user behavior patterns
  • Can export Dune query results to Python and perform statistical analysis and visualization
  • Can publish on-chain research findings with reproducible queries and methodology
  • Can optimize queries for performance and cost on large blockchain datasets

Curriculum 7 modules · 23 lessons

1Blockchain Data Fundamentals4 lessons
  1. Blocks, transactions, and the mempool Preview8 min
  2. Logs, events, and event decoding 10 min
  3. Traces and internal calls 8 min
  4. Dune's data model and table structure 12 min
2SQL Foundations for On-Chain Data4 lessons
  1. SELECT, WHERE, and filtering 10 min
  2. JOINs and UNIONs across blockchain tables 12 min
  3. GROUP BY, COUNT, SUM, and window functions 12 min
  4. CTEs and subqueries for readable queries 10 min
3Dune Dashboards & Visualization3 lessons
  1. Writing and testing queries in Dune 10 min
  2. Building multi-chart dashboards 12 min
  3. Real-time alerts and dashboard refresh 8 min
4Wallet & Cohort Analysis3 lessons
  1. Tracking wallet activity and balance changes 12 min
  2. Cohort analysis by first-transaction date 10 min
  3. Clustering wallets by behavior (transaction frequency, value, token holdings) 12 min
5DEX & Stablecoin Flow Analysis4 lessons
  1. Extracting DEX trade volume and pricing 12 min
  2. Analyzing liquidity pool composition and swaps 12 min
  3. Tracking stablecoin transfers and redemptions 12 min
  4. Token holder distribution and concentration 10 min
6Python & Advanced Analytics4 lessons
  1. Exporting Dune queries to Python 10 min
  2. Data cleaning and analysis with pandas 12 min
  3. Statistical tests on on-chain cohorts 12 min
  4. Writing and publishing reproducible research 12 min
7Capstone Project1 lesson
  1. Design and publish an original on-chain research report 60 min

Taught by Block Relations

Research & Education · Built for a data analyst, researcher, or trader who wants to understand on-chain activity directly. They need to read blockchain data, write SQL queries, build dashboards, and publish findings without relying on third-party APIs or dashboards.

Contact us →