Teaching SQL? Take what helps
Everything here is free, needs no accounts for your students, and runs in the browser on real PostgreSQL and SQLite. The data and the study are openly licensed (CC BY 4.0), so you can put them in your own course material.
Worksheets with answer keys
Each practice set prints as a worksheet (questions and space to write) or as an answer key (every solution and its result). Open a set and use the Worksheet or Answer key button. Online, students check their own answers on a real database.
- SQL SELECT practice (7)
- SQL WHERE practice (9)
- SQL ORDER BY and LIMIT practice (7)
- SQL NULL practice (6)
- SQL text practice (6)
- SQL GROUP BY and HAVING practice (8)
- SQL JOIN practice (6)
- SQL LEFT JOIN practice (6)
- SQL subquery practice (6)
- SQL CTE practice (6)
- SQL window functions practice (8)
- SQL date practice (7)
- SQL data cleaning practice (6)
Sample databases (CC BY 4.0)
Three small, fictional databases, each as a SQL script for PostgreSQL and SQLite, a ready SQLite file and CSV files, with a diagram and twelve questions with answers.
Please credit with a link, e.g. “Data: sqlstreak.com/datasets/pizza”.
Runnable SQL in your own pages
Write a query in the playground, then Share for a link that opens with your query in place, or Embed for a snippet that puts a runnable editor in your LMS or course site.
Printable references
The two-page SQL cheat sheet, one-page sheets for joins, window functions, PostgreSQL and SQLite, and the order SQL runs a query.
A level check
The free SQL test takes about ten minutes and places a student on one of eight levels, with strengths and gaps. No signup.
Data for a lesson on dialects
The PostgreSQL vs SQLite study lists every query in our course that needed different SQL in the two engines, with the raw data as CSV.
Using sqlstreak with a class? Tell us at hello@sqlstreak.com: it helps us decide what to build next. There's no classroom dashboard yet; students learn on their own accounts or none at all.