A structured collection of SQL exercise solutions based on the interactive lessons from SQLBolt. Each lesson covers a core SQL concept, with the original question, reference table, queries, and expected output all documented in one place.
| # | Lesson | Topic |
|---|---|---|
| 01 | SELECT queries 101 | Selecting columns from a table |
| 02 | Queries with constraints (Pt. 1) | Filtering rows with WHERE and numerical operators |
sql-exercises/
├── README.md
└── lessons/
├── lesson-01-select-queries.md
├── lesson-02-constraints-pt1.md
└── ...
Every lesson markdown file follows the same consistent format:
- Concept overview — a brief explanation of the SQL topic covered
- Reference table — the dataset used in the exercise
- Tasks & Solutions — each task listed with its query and output
Most exercises use a Pixar movies database. The main tables include:
movies— title, director, year, length_minutesboxoffice— movie_id, rating, domestic_sales, international_sales
Some later lessons introduce additional tables for JOIN exercises.
All exercises are sourced from SQLBolt — a free, interactive SQL learning site. This repository exists purely for learning and reference purposes.