The free home of SQL
Everything you need to learn SQL. Free.
SQLMaxx is a free website for learning SQL. You get 66 lessons in the order they build on each other, 600+ practice problems, and a real PostgreSQL database in your browser that checks every answer you write.
Four ways to get better at SQL.
SQLMaxx Learn
Our free online SQL course. Start at SELECT and work through 66 lessons in order.
Start learning
The SQL Library
Read any of the 66 lessons and run the examples. Every problem comes with a full answer.
New tools
Coming soonWe are building more free SQL tools.
66 lessons 600+ problems 3 schemas $0
Nothing to install. No account needed to start.
How to Actually Learn SQL
The SQLMaxx Philosophy: You learn SQL by doing it (over and over, with an instant right-or-wrong), and that loop is where both the understanding and the fluency get built. Seeing the same patterns enough times, and finding out immediately whether you got them, is what turns SQL from something you look up to, into something you know. SQL is one of the few skills where this even works, because it has a sandbox and an instant verdict. We built this entire platform around that loop.
Learn SQL for free with SQLMaxx Learn
Our complete online SQL course. Start at SELECT with no experience and work through all 66 lessons. Free forever, and you can start without an account.
Start learningSQLMaxx Learn
How SQLMaxx Learn works.
You read a short lesson, write a query, and find out immediately whether it is right. Here is what happens at each step.
600+ problems · 66 lessons · 3 schemas
Practice on the questions analysts get asked at work.
You work against real ecommerce, HR, and analytics databases, the same shapes you meet on the job. There are 600+ problems across all 66 lessons, enough repetition for SQL to become automatic.
Instant feedback
Write a query. Know in one second whether it is right.
Run your answer and a real PostgreSQL database checks it on the spot. You never have to read someone else's solution and hope it clicked.
Mastery tracking
See which lessons you have locked in.
We keep a score for each of the 66 lessons and update it on every answer. So you can see which ones are solid and which are still shaky, and "I think I get joins" becomes something you can check.
Spaced review
Come back to a lesson right before you would forget it.
Most of what you learn this week fades by next week. So we bring each lesson back on a schedule, and when one comes due you get a fresh problem and a blank editor, not a card to re-read. Your SQL is still there months later.
But is SQL even enough to get hired?
Honest answer: SQL is the skill entry-level analyst interviews actually screen for. It shows up in more analyst job descriptions than any other tool, because you need it before you can build a dashboard, a model, or a report.
SQL appeared in 52.9% of 855 US data analyst postings on Indeed, ahead of Excel at 50.5%. 365 Data Science, 2026.
Python and Power BI matter too, and both get easier once SQL is solid. Learn SQL first and you shorten everything after it.
Every lesson
All 66 lessons, free to read.
Tier 1 · Foundations
The shape of a query: choose columns, filter rows, sort, and limit what comes back.
- N001 SELECT and Column Expressions
- N002 FROM and Table References
- N003 WHERE Clause and Comparison Operators
- N004 Literal Values, Data Types, and Type Casting
- N005 NULL Semantics and IS NULL
- N006 Boolean Logic in WHERE (AND, OR, NOT)
- N007 ORDER BY and Result Sorting
- N008 LIMIT and OFFSET
- N009 Column Aliases and Expression Naming
- N010 DISTINCT
- N011 Arithmetic and Comparison Expressions
- N012 BETWEEN, IN, and LIKE
Tier 2 · Core SQL
Aggregation, grouping, joins, and your first subqueries. The everyday analyst toolkit.
- N013 Aggregate Functions (COUNT, SUM, AVG, MIN, MAX)
- N014 GROUP BY
- N015 HAVING
- N016 CASE WHEN Expressions
- N017 INNER JOIN
- N018 LEFT JOIN and RIGHT JOIN
- N019 FULL OUTER JOIN
- N020 CROSS JOIN
- N021 Self-Joins
- N022 Joining Multiple Tables
- N023 UNION, UNION ALL, INTERSECT, EXCEPT
- N024 Scalar Subqueries
- N025 Subqueries in WHERE (IN, EXISTS, ANY, ALL)
- N026 Derived Tables (Subqueries in FROM)
- N027 Conditional Aggregation (CASE inside Aggregates)
Tier 3 · Intermediate
CTEs, date and string work, conditional logic, and an introduction to window functions.
- N028 COALESCE and NULLIF
- N029 NULL Handling in Joins and Aggregates
- N030 Common Table Expressions (CTEs)
- N031 Chained CTEs
- N032 Date and Time Types in PostgreSQL
- N033 Date Truncation and Extraction
- N034 Date Arithmetic and Intervals
- N035 String Functions (LENGTH, UPPER, LOWER, TRIM, SUBSTRING)
- N036 String Concatenation and Formatting
- N037 Pattern Matching (LIKE, ILIKE, SIMILAR TO, Regex)
- N038 Window Functions Introduction (OVER, PARTITION BY)
- N039 ROW_NUMBER, RANK, DENSE_RANK
- N040 Aggregate Window Functions (SUM, AVG, COUNT OVER)
- N041 Temp Tables and CREATE TABLE AS SELECT
Tier 4 · Advanced
The full window-function range, lateral joins, JSON, and recursive queries.
- N042 LAG and LEAD
- N043 FIRST_VALUE, LAST_VALUE, NTH_VALUE
- N044 Window Frames (ROWS, RANGE, GROUPS)
- N045 NTILE and Percentile Functions
- N046 DISTINCT ON
- N047 Correlated Subqueries
- N048 LATERAL Joins
- N049 FILTER Clause on Aggregates
- N050 STRING_AGG and ARRAY_AGG
- N051 generate_series() for Sequences and Date Spines
- N052 Recursive CTEs
- N053 JSONB Field Extraction
- N054 JSONB Aggregation (jsonb_agg, json_build_object)
- N055 Date Spine Construction and Zero-Fill Patterns
- N056 Period-over-Period Analysis
- N057 Grouping by Date Periods
Tier 5 · Expert
Analytical patterns and query reasoning: running totals, sessionization, reading EXPLAIN.
- N058 Multi-CTE Query Architecture
- N059 Join Fanout and Aggregate Correctness
- N060 Reading EXPLAIN Output
- N061 Query Structure Patterns for Performance
- N062 Choosing Between Subqueries, CTEs, and Joins
- N063 NULL Propagation in Complex Queries
- N064 Running Totals and Cumulative Metrics
- N065 Sessionization and Funnel Analysis Patterns
- N066 Analyst Debugging Patterns
Questions
The questions you've been asking, answered.
What is SQLMaxx?
Is SQL enough to get a data analyst job?
Do I need to install anything?
Is SQLMaxx really free?
Do I need to know any SQL to start?
Is it too late to learn SQL?
How is this different from a tutorial?
The first lesson is SELECT. Start it today.
Free forever. No account needed to start.