How to Learn SQL for Free: A 30-Day Path From Zero
You can learn SQL for free, and you need nothing more than a browser to start. The language that runs most business databases is small: around a dozen keywords cover the bulk of everyday work. What takes time is not the syntax but learning to think in tables. This plan gets you from zero to answering real questions about a real dataset in 30 days, at about 30 to 45 minutes a day.
You will get the free tools to use, a day-by-day progression, a starter project, and a short guide to what “knowing SQL” means to an employer.
Pick your free practice setup (10 minutes, once)
| Option | Install? | Best for |
|---|---|---|
| Browser lessons such as SQLBolt | No | Days 1 to 10: instant feedback while you learn the basics |
| SQLite with DB Browser for SQLite | Yes, small | Your own project: a whole database in a single file |
| PostgreSQL | Yes, larger | Later, if job ads you are targeting ask for it |
SQLBolt runs interactive lessons and exercises in the browser, starting with SELECT and moving through joins, aggregates and changing tables. For your own work, SQLite is the easiest real database to own. The SQLite project describes it as serverless and zero-configuration, with the whole database held in one ordinary file, and the code is public domain. DB Browser for SQLite is a free, open source desktop app for Windows, macOS and Linux that lets you create tables, import CSV files and run queries with a spreadsheet-like view.
PostgreSQL is also free and open source. You do not need it in the first month, but it is common in industry, and the queries you learn on SQLite carry over with only minor differences.
The 30-day path
Week 1: asking a single table questions
- Day 1: SELECT and FROM. Pull every row, then only chosen columns.
- Day 2: WHERE with =, <, >, AND, OR.
- Day 3: LIKE, IN, BETWEEN, and NULL with IS NULL.
- Day 4: ORDER BY and LIMIT.
- Day 5: DISTINCT and simple calculations in the SELECT list.
- Days 6 and 7: review. Write ten questions in plain English about a lesson table and answer each one with a query, without looking at notes.
Week 2: summarising
- Day 8: COUNT, SUM, AVG, MIN, MAX.
- Day 9: GROUP BY. This is the first big conceptual leap; give it two sessions if needed.
- Day 10: HAVING, and why it is not the same as WHERE.
- Day 11: install DB Browser for SQLite and import your first CSV file.
- Days 12 to 14: answer ten summary questions about your own imported data.
Week 3: joining tables
- Days 15 and 16: INNER JOIN on two tables. Draw the tables on paper first.
- Day 17: LEFT JOIN, and what the NULLs in the result mean.
- Day 18: joining three tables.
- Day 19: CASE expressions to label rows.
- Days 20 and 21: subqueries, then the same answer written with a join.
Week 4: building and finishing a project
- Day 22: CREATE TABLE, data types, primary keys.
- Day 23: INSERT, UPDATE and DELETE on a copy of your data, never the only copy.
- Days 24 to 28: the project below.
- Days 29 and 30: write it up.
If you miss days, do not skip ahead. Shift the plan. Our template for a self-study plan you will actually finish has a simple way to absorb missed sessions without abandoning the schedule.
Worked example: how GROUP BY changes a question
Suppose you have a table called orders with columns customer, product and amount. The question “how much did each customer spend?” needs one row per customer, so the query is:
SELECT customer, SUM(amount) AS total FROM orders GROUP BY customer ORDER BY total DESC;
Now change the question to “which customers spent more than 500?” You cannot put SUM(amount) in a WHERE clause, because WHERE filters rows before they are grouped. You need HAVING, which filters the groups afterwards:
SELECT customer, SUM(amount) AS total FROM orders GROUP BY customer HAVING SUM(amount) > 500;
If that distinction clicks for you, you are past the point where most beginners stall.
A starter project that shows real skill
Pick a dataset you care about. Public open-data portals, sports statistics and your own exported bank or fitness data (kept private) all work. Then:
- Import it into SQLite as two or three related tables.
- Write ten questions in plain English before writing any SQL.
- Answer each with a query, saving the queries in a text file with comments.
- Include at least two joins, two GROUP BY summaries and one CASE expression.
- Write a one-page summary of what you found, with the three most interesting results.
That file of commented queries is something you can show. Our guide to listing self-taught skills on a resume explains how to describe a project like this without overstating it.
How long does it take to learn SQL?
| Goal | Realistic time at 30 to 45 minutes a day |
|---|---|
| Read and write basic queries on one table | 1 to 2 weeks |
| Comfortable with GROUP BY and joins | 4 to 6 weeks |
| Useful at work for reporting and analysis | 2 to 3 months of regular practice on real data |
| Database design and performance tuning | Much longer; this is professional territory |
These ranges are planning estimates rather than research findings. The biggest single factor is practising on data you want to understand, which keeps you writing queries after the tutorials run out.
Mistakes that slow SQL learners down
Do write the question in English first. Don’t start typing SQL and hope the question emerges.
Do check row counts after every join. Don’t assume a join worked because it returned something; duplicated rows are the classic silent error.
Do practise on a copy. Don’t run UPDATE or DELETE without a WHERE clause on data you care about.
Do learn one database well. Don’t switch between three engines in your first month.
Where SQL can take you
SQL shows up in analyst, marketing, finance, operations and developer roles, often as one skill among several rather than a job title. If you are curious about the roles where it is the core skill, the profile of what database administrators do and earn sets out the work and the outlook using official US data.
Frequently Asked Questions
Is SQL hard to learn for a complete beginner?
The basics are among the easiest parts of programming to pick up, because the keywords read almost like English and you see results instantly. The harder parts are joins, grouping and thinking about data as related tables. Expect a few frustrating sessions around week two or three; they pass with practice.
Do I need to learn Python before SQL?
No. SQL is a separate language and is often learned first, because it is smaller and gives quick, visible results. Many analysts use SQL to pull and summarise data and only later add Python or a spreadsheet for further work. Learning both eventually is common, but either order works.
Which version of SQL should I learn?
Start with whatever your first course or tool uses, often SQLite or PostgreSQL. The core of SELECT, WHERE, GROUP BY and joins is shared across major databases, with small differences in functions and dates. If a job you want names a specific database, switch to it once the basics feel comfortable.
Can I get a job with only SQL?
Occasionally, for reporting or data support roles, but SQL usually works as one skill in a wider role such as analyst or administrator. Pair it with spreadsheet skills, clear writing about findings, and one or two projects you can show. That combination is more convincing than SQL on its own.
Tonight, open a browser lesson and write your first SELECT. Day 1 takes about 20 minutes, and it is the only day that requires no decisions at all.
Continue in this guideHow to Teach Yourself Anything →
This article was drafted with AI assistance and reviewed by the Life Learning Journey editorial team. Read our editorial standards.