ABONVERO LEARN · SQL
Write the query.
See the rows it returns.
SQL is how reports get their numbers. Type real queries against a small shop database of customers, orders and products; your query runs in the browser and the result is compared with the right one. 13 lessons from a first SELECT to three-table revenue reports: 3 free, 10 more with Pro. Nothing to install.
What the course covers
Beginner
- SELECT: asking a table for columnsSELECT, FROM, ASFree
- WHERE: keeping only the rows you needWHERE, AND, OR, comparisonsFree
- ORDER BY and LIMIT: sorting and top-NORDER BY, DESC, LIMITFree
- IN, BETWEEN and LIKE: lists, ranges and patternsIN, BETWEEN, LIKEPro
- NULL: the value that is not thereIS NULL, IS NOT NULL, COALESCEPro
Intermediate
- COUNT, SUM, AVG, MIN and MAXAggregate functionsPro
- GROUP BY: one result row per groupGROUP BY with aggregatesPro
- HAVING: filtering the groupsHAVING versus WHEREPro
- JOIN: combining two tablesINNER JOIN, ON, table aliasesPro
- LEFT JOIN: keeping rows with no matchLEFT JOIN, finding missing rowsPro
Expert
- Expert: revenue reports across three tablesChained joins, calculated columns, GROUP BYPro
- Expert: CASE and conditional totalsCASE WHEN, SUM(CASE …)Pro
- Expert: DISTINCT and counting each thing onceDISTINCT, COUNT(DISTINCT …)Pro
How answers are checked
Your query is graded by the rows it returns, not by how it is written, so any correct query passes: with or without aliases, in capitals or not. It is then run a second time on a changed copy of the data. A query that only worked by luck, or an answer typed in as a number, fails that second run and you are told why.
When a query is wrong, the message names the problem: text in double quotes instead of single, a count tested in WHERE instead of HAVING, a column that exists in two joined tables, a join that silently dropped rows.
Does it match a real database?
Yes. The practice engine follows SQLite, and every lesson answer is replayed against real SQLite in our tests. It is stricter in one place on purpose: a column selected next to a COUNT or SUM must be in GROUP BY, as PostgreSQL and SQL Server require, so the habits you build here carry over. Each lesson notes where databases differ, such as LIMIT versus TOP. Subqueries and window functions are not covered yet.
Coming from spreadsheets?
WHERE is a filter, GROUP BY with SUM is a pivot table, and a JOIN is what VLOOKUP does, for every row at once. If those spreadsheet ideas are new, start with the spreadsheet lessons.
Abonvero Learn is independent and not affiliated with or endorsed by the SQLite, PostgreSQL or MySQL projects, Microsoft or Oracle. Product names are trademarks of their respective owners. Operated by Andronykus Technologies LLC · contact@abonvero.com · Terms · Privacy