SQL Course: Learn SQL in 66 Interactive Lessons

By Owen Middleton · Updated October 2026 · We ran the examples on PostgreSQL 17

SQLMaxx Learn is a SQL course for beginners, with 66 lessons in order, from your first SELECT to funnel analysis and query debugging. You need no SQL experience. You write every query in a real PostgreSQL database that runs in your browser, and SQLMaxx Learn grades each answer. The course is free, and you do not need an account to start.

Try lesson 1 here

Lesson 1 is SELECT and Column Expressions. With a SELECT statement, you pick columns from a table, and you can calculate a new column. The products table holds the items of an online store. Run the query. Then change it.

Schema · ecommerce1 table? = nullable
products
idinteger
nametext
category_id?integer
pricenumeric
stock_qtyinteger
attributes?jsonb
SELECT name, price, price * 0.9 AS sale_price
FROM products;

Write your first SQL query

How does SQLMaxx Learn work?

SQLMaxx Learn has two modes, Learn and Review.

  • Learn: SQLMaxx Learn picks your next lesson from the lessons whose prerequisites you have mastered. You can read any lesson page at any time.
  • Review: SQLMaxx Learn shows you earlier lessons again when it predicts that you will forget them soon. Review needs an account.

Each lesson has a mastery score, and SQLMaxx Learn updates it as you practice. To earn the certificate, you master all 66 lessons and solve at least one problem in each.

Which SQL topics does SQLMaxx Learn cover?

SQLMaxx Learn has 66 lessons in 5 tiers and 615 practice problems. It starts with SELECT and Column Expressions (lesson 1) and ends with Analyst Debugging Patterns (lesson 66). The lessons include joins, CTEs, window functions, and analyst topics such as funnel analysis. Each lesson has its own page with the full lesson and its problems.

To use the first lessons in a game, play the SQL Murder Mystery, a free detective case. In our SQL Murder Mystery solution, each step names the lesson for its SQL.

Tier 1 · Foundations

12 lessons
  1. 1 SELECT and Column Expressions
  2. 2 FROM and Table References
  3. 3 WHERE Clause and Comparison Operators
  4. 4 Literal Values, Data Types, and Type Casting
  5. 5 NULL Semantics and IS NULL
  6. 6 Boolean Logic in WHERE (AND, OR, NOT)
  7. 7 ORDER BY and Result Sorting
  8. 8 LIMIT and OFFSET
  9. 9 Column Aliases and Expression Naming
  10. 10 DISTINCT
  11. 11 Arithmetic and Comparison Expressions
  12. 12 BETWEEN, IN, and LIKE

Tier 2 · Core SQL

15 lessons
  1. 13 Aggregate Functions (COUNT, SUM, AVG, MIN, MAX)
  2. 14 GROUP BY
  3. 15 HAVING
  4. 16 CASE WHEN Expressions
  5. 17 INNER JOIN
  6. 18 LEFT JOIN and RIGHT JOIN
  7. 19 FULL OUTER JOIN
  8. 20 CROSS JOIN
  9. 21 Self-Joins
  10. 22 Joining Multiple Tables
  11. 23 UNION, UNION ALL, INTERSECT, EXCEPT
  12. 24 Scalar Subqueries
  13. 25 Subqueries in WHERE (IN, EXISTS, ANY, ALL)
  14. 26 Derived Tables (Subqueries in FROM)
  15. 27 Conditional Aggregation (CASE inside Aggregates)

Tier 3 · Intermediate

14 lessons
  1. 28 COALESCE and NULLIF
  2. 29 NULL Handling in Joins and Aggregates
  3. 30 Common Table Expressions (CTEs)
  4. 31 Chained CTEs
  5. 32 Date and Time Types in PostgreSQL
  6. 33 Date Truncation and Extraction
  7. 34 Date Arithmetic and Intervals
  8. 35 String Functions (LENGTH, UPPER, LOWER, TRIM, SUBSTRING)
  9. 36 String Concatenation and Formatting
  10. 37 Pattern Matching (LIKE, ILIKE, SIMILAR TO, Regex)
  11. 38 Window Functions Introduction (OVER, PARTITION BY)
  12. 39 ROW_NUMBER, RANK, DENSE_RANK
  13. 40 Aggregate Window Functions (SUM, AVG, COUNT OVER)
  14. 41 Temp Tables and CREATE TABLE AS SELECT

Tier 4 · Advanced

16 lessons
  1. 42 LAG and LEAD
  2. 43 FIRST_VALUE, LAST_VALUE, NTH_VALUE
  3. 44 Window Frames (ROWS, RANGE, GROUPS)
  4. 45 NTILE and Percentile Functions
  5. 46 DISTINCT ON
  6. 47 Correlated Subqueries
  7. 48 LATERAL Joins
  8. 49 FILTER Clause on Aggregates
  9. 50 STRING_AGG and ARRAY_AGG
  10. 51 generate_series() for Sequences and Date Spines
  11. 52 Recursive CTEs
  12. 53 JSONB Field Extraction
  13. 54 JSONB Aggregation (jsonb_agg, json_build_object)
  14. 55 Date Spine Construction and Zero-Fill Patterns
  15. 56 Period-over-Period Analysis
  16. 57 Grouping by Date Periods

Tier 5 · Expert

9 lessons
  1. 58 Multi-CTE Query Architecture
  2. 59 Join Fanout and Aggregate Correctness
  3. 60 Reading EXPLAIN Output
  4. 61 Query Structure Patterns for Performance
  5. 62 Choosing Between Subqueries, CTEs, and Joins
  6. 63 NULL Propagation in Complex Queries
  7. 64 Running Totals and Cumulative Metrics
  8. 65 Sessionization and Funnel Analysis Patterns
  9. 66 Analyst Debugging Patterns

Does SQLMaxx Learn give a certificate?

Yes. SQLMaxx Learn gives you the SQLMaxx Certificate of Completion. One certificate, awarded when you have mastered all 66 lessons in the curriculum and solved at least one problem in each. Mastery is measured by the engine as you practice, against a live PostgreSQL database. There is no exam and no fee. A certificate needs an account.

SQLMaxx is not an accredited body and this is not a professional license. No certificate from anyone gets you a job on its own. It records what you did, on the date shown, under the conditions described.

Every certificate has a public page at sqlmaxx.com/verify/ followed by its ID. It shows who holds it, when it was issued, and whether it is still valid. No account is needed to open it, and the QR code on the document goes to the same place.

Read more about it: SQL Course With Certificate: How the SQLMaxx Learn Certificate Works.

SQLMaxx CERTIFICATE OF COMPLETION THE SQLMAXX SQL CURRICULUM ISSUED TO Your name here Awarded for demonstrating mastery of all 66 lessons of the SQLMaxx curriculum, graded against a live PostgreSQL database. Date of issue Not yet issued Lessons mastered 66 Verify at sqlmaxx.com/verify/ followed by your certificate ID SQLMaxx is not an accredited body and this is not a professional license. It records what was demonstrated, on the date shown, under the conditions described.
A sample certificate. Yours shows your name, the issue date and a certificate ID.

Compare SQL courses and plan your next step

SQL guides to use with SQLMaxx Learn

In each guide, we answer one PostgreSQL question in more detail than in the lessons. Next to each guide, you see the number of the course lesson on the same topic.

SQL dates and times in PostgreSQL

Write PostgreSQL date code in place of DATEDIFF, DATEADD and GETDATE. Find the date bugs that give a wrong answer with no error.

Aggregation and query output in PostgreSQL

Put rows into a list, a JSON document or a pivot. Learn what happens to the answer when a column has nulls.

Window functions

How OVER, PARTITION BY and the window functions actually behave.

Questions about SQLMaxx Learn

Is SQL still worth learning in 2026?

Yes. In the 2026 Stack Overflow Developer Survey, 58.4% of the developers who answered did extensive development work in SQL over the past year. Only JavaScript had a larger share, at 62.0%. Source: Stack Overflow Developer Survey 2026, Technology. Read more about whether SQL is still relevant.

Can SQL be self-taught?

Yes. You can learn SQL on your own with SQLMaxx Learn. SQLMaxx Learn grades each answer, so you do not need a teacher to check your work.

Do you need an account to use SQLMaxx Learn?

No. You can start lesson 1 of SQLMaxx Learn without an account, and SQLMaxx Learn saves your progress in this browser. With an account, you can use Review and earn the certificate. When you sign up, SQLMaxx Learn moves your progress to your account.

Which SQL dialect does SQLMaxx Learn teach?

PostgreSQL 17. PostgreSQL runs every query in your browser, so you have nothing to install. SQLMaxx Learn does not teach the MySQL or SQL Server dialects.

How much does SQLMaxx Learn cost?

Nothing. All 66 lessons, all 615 practice problems and the certificate are free.

What does SQLMaxx Learn not include?

SQLMaxx Learn has no video lessons and no instructor. You learn from written lessons, examples that you run, and graded problems. Without an account, you can continue only in the browser where you started.