SQL
Web3 / infrastructure applications
Structured Query Language, the standard programming language used to create, read, update, and delete data stored in relational databases, which has become the primary interface for analyzing indexed blockchain data through platforms like Dune Analytics. SQL allows analysts to express complex data retrieval operations in a declarative syntax, specifying what data they want rather than how to retrieve it, enabling users with no blockchain engineering background to extract insights from on-chain data. In the Dune Analytics context, users write SQL queries against decoded blockchain data stored in database tables organized by event type, contract, and chain, then publish the resulting charts and metrics as public dashboards. SQL's ubiquity as a data analysis language, with millions of analysts trained on it from traditional data science and business intelligence contexts, made it a natural choice for making blockchain data accessible to a broad analytical community. Example: A typical Dune Analytics SQL query might join the Uniswap v3 swap events table with the token metadata table and an ETH price oracle table to calculate daily trading volume in USD for a specific token pair over the past 30 days, a query that would take a backend engineer days to build from raw blockchain data but can be written in a few minutes by anyone with basic SQL knowledge using Dune's decoded data layer. Why it matters for Web3: SQL's role in blockchain analytics demonstrates how the crypto ecosystem benefits from building on existing technical standards rather than inventing new ones. By using SQL as the query interface for blockchain data, Dune Analytics and similar platforms tapped into an existing global analyst community, enabling rapid ecosystem-wide adoption and producing more analytical content about on-chain activity than would have been possible with a proprietary query language.
Explore the full Web3 Glossary — 2,000+ expert-curated definitions. Need guidance? Talk to our consultants.