Rowcount
Menu

How to Learn SQL, Starting From the Free Route

Published Sep 24, 2026Prices read Sep 24, 2026
=

Start free, and stay free until you hit something the free resources cannot teach you. SQL is unusual among data skills in that the best introductory material costs nothing, the language has barely changed in decades, and you can practise it in a browser tab without installing anything.

What follows is an order rather than a shopping list. The order matters more than the resource.

Step one: the shape of a query, in a browser

Before anything else, get the shape of a SELECT statement into your hands. SQLBolt describes itself as "a series of interactive lessons and exercises designed to help you quickly learn SQL right in your browser" — it runs the lessons in the page, and when we read it on 24 September 2026 its front page asked for neither payment nor an account.

An afternoon of that gets you SELECT, WHERE, ORDER BY and the beginnings of aggregation. That is not nothing: it is most of what a great many working analysts use on a normal day. Do not skip ahead to joins before this feels automatic, because every later difficulty in SQL is a difficulty about which rows you are looking at.

Step two: a real database, with your own questions

The second step is the one people skip, and it is the one that makes the difference. Get hold of a dataset you actually care about — anything with more rows than you can eyeball — load it into a database, and ask it questions you do not already know the answer to.

freeCodeCamp's Relational Databases certification is one of its eleven certifications, and freeCodeCamp's own page states that every part of it is free, courses and certifications included. It is a 501(c)(3) public charity. The certification is stated as roughly 300 hours with five required projects, which is a serious commitment and an honest one — the projects are the part that teaches you.

Step three: joins, and then window functions

Joins are where SQL stops being a search box and becomes a language. Give them their own week and do not move on while you are still guessing which join type to use. The test of whether you understand a join is whether you can predict the number of rows it returns before you run it.

After joins come window functions, which are what separate people who can query a database from people who can analyse one. Running totals, rankings within a group, period-on-period comparisons — these are the questions real work asks, and they are all window functions. Most free introductions stop before this point, which is the honest moment to consider paying for something.

When paying starts to make sense

Pay when you need either repetition or sequence, and you know which. For repetition, DataCamp's interactive drills are built for exactly this and its first chapter of every course is free to try; its pricing is unpicked in the DataCamp review. Codecademy — a partner link, and the only one on this page — listed Plus at $11.99 a month billed annually or $14.99 billed monthly, and Pro at $15.99 or $19.99, on 24 September 2026, alongside a free Basic plan. Try the free plan before paying for either.

For sequence and a credential, SQL comes inside the broader analytics certificates rather than on its own — both the Google and IBM Coursera certificates name SQL in their published skills lists. What each one costs at its own stated pace is set out on the page comparing the analytics routes.

What not to bother with

  • Memorising syntax for databases you do not use. The differences between PostgreSQL, MySQL and SQL Server matter in a job and not at all while you are learning.
  • Certificate-collecting before you can write a join unprompted. The credential is worth what the skill behind it is worth.
  • Long video courses for the basics. SQL is a doing skill and the basics are small; watching someone else type is the slowest route through them.

The question everybody asks next is how long all of this takes, and the honest answer is more interesting than the numbers usually quoted — that is covered in how long it really takes to learn SQL.

Step four: read other people's queries

The step that turns competence into fluency is reading SQL you did not write. Open a query someone else built, work out what it returns before you run it, then run it and find out whether you were right. Being wrong is the useful outcome, because it identifies exactly which assumption you hold that the database does not share.

This is also how you learn the habits that make queries maintainable: common table expressions instead of nested subqueries, explicit column lists instead of SELECT *, and aliases that mean something. None of that is taught well by exercises, because exercises are short and the point of these habits only appears at length.

The wrong turns that cost the most time

  • Learning a specific database's extensions before the standard language. Vendor-specific functions are memorisable in an afternoon once the core is solid, and confusing before.
  • Treating NULL as if it were zero or an empty string. It is neither, it propagates through comparisons in ways that surprise people for months, and understanding it early prevents a category of silent wrong answers.
  • Avoiding the query plan. You do not need to optimise anything as a learner, but seeing what the database actually does with your query demystifies why some of them are instant and some hang.
  • Collecting courses instead of writing queries. The ratio that matters is time spent typing SQL against time spent watching or reading about SQL, and it should be lopsided in favour of typing.

How to know you have learned it

Three checks, none of which involves a certificate. You can predict a join's row count before running it. You can write a grouped aggregate with a filter on the aggregate itself without looking up whether that goes in WHERE or HAVING. And when a number comes out wrong, your first instinct is to check what the join did to your rows rather than to rewrite the query from scratch.

Get to those three and you are past the point where any beginner course has more to teach you. What comes after is either depth in one database or breadth into Python, and both are covered inside the broader certificate programmes rather than as standalone SQL products.

Learning SQL

Can I learn SQL for free?
Yes, and further than most people expect. SQLBolt runs interactive SQL lessons in the browser and asked for neither payment nor an account when we read it on 24 September 2026. freeCodeCamp offers a Relational Databases certification among its eleven certifications and states on its own page that everything it offers, certifications included, is free. Neither has an affiliate programme, so neither pays this site anything.
Is SQL hard to learn?
The first half is unusually easy and the second half is where people stall. Filtering, sorting and aggregating read almost like English and can be picked up in an afternoon. Joins require you to think about which rows exist rather than which values you want, and window functions require you to think about rows in relation to other rows. Neither is conceptually deep, but both need practice on data you did not tidy yourself.
Do I need to learn Python as well?
Not to start, and not for a great deal of analytical work. SQL alone answers most questions you can ask of data that already lives in a database. Python becomes necessary when you need to reshape data that will not fit a query, automate something repetitive, or move into modelling — which is why the certificate programmes teach them together.

Costing a whole route rather than one course? Start from the data analytics certificates, priced side by side, or read what the big AI courses actually contain. Figures here are stamped with the date we read them, and not one of them is a claim about what happens to your career afterwards.