SQL practice: write queries and have them checked directly
SELECT, GROUP BY, HAVING, JOIN and subqueries: write the query and run it straight away. The result counts, also on data you can’t see. Five problems, new every day.
- 1 · Aggregate functions
- 2
- 3
- 4
- 5
How many students are there?
students
| id | name | major | semester | city |
|---|---|---|---|---|
| 1 | Ben | Business | 7 | Bern |
| 2 | Jonas | Business | 3 | Zürich |
| 3 | Max | Computing | 6 | Bern |
| 4 | Clara | Chemistry | 5 | Basel |
| 5 | Lena | Law | 5 | Bern |
| 6 | Hannah | Chemistry | 2 | Zürich |
| 7 | Greta | Computing | 5 | Basel |
+ − More tables: courses, grades
courses
| id | title | credits | lecturer |
|---|---|---|---|
| 1 | Calculus | 4 | Meier |
| 2 | Marketing | 4 | Huber |
| 3 | Databases | 3 | Keller |
| 4 | Statistics | 4 | Keller |
grades
| student_id | course_id | grade |
|---|---|---|
| 2 | 3 | 2.3 |
| 5 | 4 | 1.7 |
| 2 | 2 | 4 |
| 4 | 1 | 1 |
| 2 | 1 | 3.7 |
| 3 | 2 | 3.3 |
| 6 | 3 | 2.7 |
| 2 | 4 | 2 |
| 6 | 2 | 1.3 |
| 3 | 3 | 3.3 |
| 1 | 3 | 1 |
SQL
Any equivalent query counts. It is also checked on data you can’t see.
Keep practising for free, with your progress
The basics without a daily limit in a free account, plus one exam-level task a day. Every level, the exam mode and the AI tutor from €4.99 once or with Plus.
Topics with rules and practiceSELECT & WHERE · ORDER BY · Aggregate functions · Reading queries …
How the trainer works
Real queries, not multiple choice
Write SQL and run it at once. Any equivalent query counts; the result is checked on the sample data and on hidden data.
With worked solutions
After each problem you see the solution step by step and the typical mistake that costs marks in the exam.
Always new problems
Every problem is generated with new numbers, without AI and always computed correctly. You practise the method, not memorising answers.
