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.

Loading SQL controls…

Beginner · SELECT, FROM, AS

SELECT: asking a table for columns

A database table is like a sheet with fixed columns. SELECT says which columns you want, FROM says which table. The star means every column. AS gives a column a clearer label in the result.

Example: SELECT name, city FROM customers

Tables for this lesson
customers (6 rows)
idnamecityjoined
1Ana SilvaAustin2025-01-15
2Ben OkaforDenver2025-02-03
3Cy TranAustin2025-03-20
4Dee NovakBoston2025-05-11
5Eli ParkDenver2025-06-30
6Fay RuizSeattle2025-08-09

1/3 Show every column of the customers table.

The same in SQLite, PostgreSQL, MySQL and SQL Server. Keywords are not case-sensitive; writing them in capitals is a habit that makes queries easier to read. Answers are graded by the rows they return, so any query that gives the right result passes. Press Ctrl+Enter to check.

What the course covers

Beginner

  1. SELECT: asking a table for columnsSELECT, FROM, ASFree
  2. WHERE: keeping only the rows you needWHERE, AND, OR, comparisonsFree
  3. ORDER BY and LIMIT: sorting and top-NORDER BY, DESC, LIMITFree
  4. IN, BETWEEN and LIKE: lists, ranges and patternsIN, BETWEEN, LIKEPro
  5. NULL: the value that is not thereIS NULL, IS NOT NULL, COALESCEPro

Intermediate

  1. COUNT, SUM, AVG, MIN and MAXAggregate functionsPro
  2. GROUP BY: one result row per groupGROUP BY with aggregatesPro
  3. HAVING: filtering the groupsHAVING versus WHEREPro
  4. JOIN: combining two tablesINNER JOIN, ON, table aliasesPro
  5. LEFT JOIN: keeping rows with no matchLEFT JOIN, finding missing rowsPro

Expert

  1. Expert: revenue reports across three tablesChained joins, calculated columns, GROUP BYPro
  2. Expert: CASE and conditional totalsCASE WHEN, SUM(CASE …)Pro
  3. 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