Learn By Example · Beginner to Advanced

Learn SQL

A clear, example-first guide to SQL. Every topic has its own page with plain-English explanations, runnable queries shown next to their actual output, practical tips, common mistakes to avoid, and at least one advanced example. Start at the top and work down, or jump straight to what you need.

Start Learning →
How this guide works: each topic below opens its own dedicated page. Every page follows the same format — explanation, query, output, tips, and an advanced example — and has Previous/Next links at the bottom so you can work through everything in order without coming back here each time.
Getting Started
2 topics

The absolute basics — what SQL is, how tables work, and your first query.

Filtering & Sorting
4 topics

Narrow down and order the rows a query returns.

Aggregation
3 topics

Summarise many rows into meaningful totals, averages, and group-level statistics.

Joins
3 topics

Combine data spread across multiple related tables.

Data Modification
3 topics

Define table structure and add, change, or remove data safely.

Advanced Queries
4 topics

Conditional logic, nested queries, named intermediate results, and analytical window functions.

Statistical Analysis for Research
1 topic

A research-focused walkthrough computing descriptive statistics directly inside the database.