How to Actually Learn SQL (and How to Pick a Free SQL Course)
The best way to learn SQL is to write a lot of it: one query at a time, with a right-or-wrong answer after each one, and then again on later days until the patterns are automatic. Reading and watching help you understand SQL. Only repetition makes you fluent in it. So the best free SQL course is the one that makes you write the most SQL and checks every answer.
I learned that the expensive way.
What a $60 SQL course taught me about learning SQL
I paid about $60 for my first SQL course. I watched every video. I typed along with the teacher, and every query worked. By the end of each section, I was sure that I knew SQL.
Then I got to subqueries, and my mind went blank.
A query inside another query. I could follow the teacher when the teacher explained one. But when I tried to picture it on my own, which part to read first, what I got back from the inner part, how to use that in the outer part, I had nothing. I went back and watched the video again. I followed it again. And I still could not picture it the next time.
Here is what I understand now. I was trying to see subqueries, when what I needed was to write them. Many of them. Badly at first, and then less badly, until I stopped thinking about them at all.
Why watching SQL tutorials is not the same as knowing SQL
When you watch someone write a JOIN, you recognize each step. Recognition feels like knowledge. It is a different skill.
You can watch a fast typist all day and you will not type faster. Your fingers have to find the keys themselves, thousands of times, before you stop looking at the keyboard. SQL is the same. The first time you write GROUP BY, you think about every word. The two-hundredth time, you think about the question you want to answer, and you write the syntax without thinking about it.
That is the difference between SQL that you look up and SQL that you know. The only way across is repetition.
SQL has a sandbox and an instant verdict, so use them
With most skills, you wait for feedback. You write an essay and a teacher grades it next week. You give a presentation and you guess how it went.
SQL is different, and I think people underrate how lucky that is. You get a safe place to try, and you get an answer in about a second. Write a query, run it, and PostgreSQL shows you the rows. It is like a free throw: you see the ball go in, or you see it miss, and you know right away.
But there is one catch. A query that runs is not the same as a query that is right. If you practice with no correct answer to compare against, you only find out that your syntax is valid. You need the verdict too: is this the right result?
The SQL learning loop: repetition until automatic
This is the loop that I wish someone had given me on day one:
- Learn one idea. Read or watch just enough to understand one concept, for example LEFT JOIN. Stop there.
- Write the query yourself, from an empty editor. Do not copy. Do not paste. The empty editor is where the learning happens.
- Check the result against a correct answer. Not "it ran without an error". The right rows, in the right columns.
- If you got it wrong, find out why, then do another problem of the same kind. You do not learn a pattern from one fix. You learn it from five or ten problems.
- Come back on a later day. When the pattern is a little harder to remember, do it again. That is the repetition that makes it stick.
You know that a pattern is automatic when you stop thinking about the SQL and start thinking about the data.
What 39,424 graded SQL answers showed me
After that course, I built a free SQL course around this loop, and I can now see how real learners do. From August 19 to November 15, 2026, 382 learners with accounts sent 39,424 graded answers. For each answer, we record the lesson and whether it was right or wrong. We do not see the SQL that people type. Three things stood out.
The first lesson is the hardest one. Across all lessons, 74% of answers were correct. In lesson 1, which is plain SELECT, only 51% were. The hard problems are not about keywords. They are about turning a business sentence into arithmetic. In one problem, you take a $400 rebate off a $3,600 invoice, and then add a 5% fee to the rest:
SELECT (3600 - 400) * 1.05 AS net_payment; -- 3360
SELECT 3600 - 400 * 1.05 AS net_payment; -- 3180
Without the parentheses, PostgreSQL multiplies first, and you get 3180 instead of 3360. The SQL is easy. The thinking is the hard part, and you only get better at it by doing it.
I was not the only one who got stuck on subqueries. In the lesson on scalar subqueries, where you get one value back from the inner query, 92% of answers were correct. In the lesson on subqueries in WHERE, where you often get a whole list back, it was 74%. A single value is easy to picture. A list is not, until you have written enough of them.
Coming back works. 279 times, a learner got a problem wrong on the first try and then met the same problem again on a later day. On that later day, they got it right 63% of the time. That is the loop in one number: try, miss, return, get it.
These are small numbers from one course, so read them as a signal, not as proof. But I felt the same thing with my $60 course.
How to picture a subquery in SQL
If subqueries stop you too, here is the trick that makes them easier. Run the inner query on its own first.
SELECT name FROM customers WHERE id IN (
SELECT customer_id FROM orders WHERE total > 100
);
Copy just the inner part, SELECT customer_id FROM orders WHERE total > 100, and run it. You get a list of customer IDs. Now read the full query again: "give me the names of customers whose id is in that list". The picture that I could not build in my head is right there on the screen.
Then write ten more, without the trick. That is how a subquery stops being a puzzle.
What to look for in a free SQL course
There are many free SQL courses, and most of them look the same from the outside. Before you start one, open the first lesson and ask three questions:
- Do you write SQL yourself in every lesson? If you can finish a lesson by watching or reading only, you practice recognition, not SQL.
- Do you get a verdict on each answer? You need to compare your result with a correct result, not only see that your query ran without an error.
- Do you come back to old lessons on later days? If the course never brings a topic back, you must plan that repetition yourself.
A course that passes all three is worth your time, even with no video and no certificate. A course that fails the first one is a course to watch, not a course to learn from.
Why I made a free interactive SQL course
When I finished my course and wanted more practice, the good practice cost money, month after month. That felt backwards to me. The part of learning SQL that matters most, the repetition, was the part behind the paywall.
So I built SQLMaxx Learn, a free interactive SQL course, around the loop above. It has 66 lessons and 615 practice problems. You write every query yourself, real PostgreSQL runs it in your browser, and you get a right-or-wrong on every answer. In Review mode, you get earlier lessons back on later days. Everything is free, including a certificate when you master all 66 lessons, and you do not need an account to start.
It is not the only good place to practice. SQLBolt has short interactive lessons, and SQLZoo has many more problems after that. What matters is less the site and more the habit.
Where to start learning SQL today
Open an empty editor today and write ten queries. Check each one against a correct answer. Tomorrow, write ten more, and include two of yesterday's.
I watched a lot of SQL before I learned any. You do not have to.
