SQL Foundations for On-Chain Data·Lesson 6 of 23·12 min
JOINs and UNIONs across blockchain tables
This lesson is for enrolled learners
Almost no useful on-chain question is answerable from a single table. You need the swap event, plus the token's symbol and decimals, plus maybe the transaction's gas cost, plus the same data from a second chain. JOIN combines tables side by side on a matching key; UNION ALL stacks same-shaped tables on top of each other. Both are used constantly……
Enroll to continue Already enrolled? Sign in