SQL from tables to your first report
Inspect the data, select columns, filter carefully, understand NULL, sort ties, aggregate and join. Each new idea builds on the same small dataset.
Prerequisite: None. No programming or database setup needed. · 109 minutes of guided study
8 published lessons, from first principles to a small project.
Start first lesson →What you’ll be able to do
- Read a table before writing a query
- Keep matching rows with WHERE
- Combine conditions without guessing precedence
- Understand unknown values and NULL
- Sort ties and choose a small result
- Count rows before grouping them
- Build a grouped report and filter groups
- Project · Join learners to enrollment counts
How to study this course
Follow the numbered modules. Read the example, explain why it works, attempt the exercise, then compare your result with the supplied checks.
Setup: Run directly in the CodingNeed browser lesson. SQLite is used for these exercises. Each Run starts with a fresh copy of the displayed practice tables.
Times estimate guided reading and practice. Projects and revision can take longer.
Course syllabus · 8 lessons
1 · Read the data
- Read a table before writing a query12 min · Browser exercise →
A table holds rows of the same shape; a result is another table.
- Keep matching rows with WHERE12 min · Browser exercise →
WHERE keeps a row only when its condition is true.
- Combine conditions without guessing precedence12 min · Browser exercise →
AND requires both conditions; OR accepts either.
2 · Handle real values
- Understand unknown values and NULL12 min · Browser exercise →
NULL means missing or unknown; it is different from zero and empty text.
- Sort ties and choose a small result12 min · Browser exercise →
A stable order needs an explicit tie-breaker.
- Count rows before grouping them12 min · Browser exercise →
An aggregate summarizes several rows into a single value.