SQL from Scratch

🎓 All tutorials free · no login required · sample data included
Learn  ›  SQL  ›  SQL from Scratch
✦ Free · written step-by-step tutorial · no login

SQL from Scratch: the free course

Go from zero to writing real queries — SELECT, WHERE, JOINs, GROUP BY and more. Every lesson is a written, step-by-step guide with copy-paste code examples and the exact output you’ll see.

📖 32 chapters · 7 modules ~4 hrs of reading 🟢 Beginner friendly 🆓 Free · no login 🔄 Updated 2026
PK
Written by PKMicrosoft Certified Professional · 15+ yrs · @PK-AnExcelExpert · 297K+ subscribers

What you’ll learn

By the end you’ll be comfortable writing everyday SQL — the kind you’d actually use at work.
Write SELECT queries to pull exactly the data you need
Filter and sort results with WHERE and ORDER BY
Summarise data with GROUP BY and aggregate functions
Combine tables with every type of JOIN
Modify data safely with INSERT, UPDATE and DELETE
Tackle subqueries, EXISTS and window functions
Read real code examples with the exact output shown
Practise with exercises at the end of every chapter

Who this course is for

No programming background needed. You only need to be comfortable with the idea of a table with rows and columns.
Excel, Google Sheets and Power BI users who want to pull data straight from a database
Aspiring data analysts preparing for interviews where SQL is the first test
Marketers, finance and operations staff who wait on IT for every report
Developers who know one language and need solid SQL foundations

How to practise (free tools)

Every chapter uses the same two tables, Customers and Orders, so you can create them once and run every example yourself.
  1. Online, nothing to install: open SQLite Online or DB Fiddle, paste the CREATE TABLE script below and start with Chapter 1.
  2. On your computer: install the free DB Browser for SQLite, or MySQL / PostgreSQL if your workplace uses them. Each chapter notes the syntax differences.
  3. Type, do not paste: retyping each example fixes the clause order in memory. Then attempt the practice exercise before opening the answer.
CREATE TABLE Customers (CustomerID INT PRIMARY KEY, Name TEXT, City TEXT, Country TEXT);
CREATE TABLE Orders (OrderID INT PRIMARY KEY, CustomerID INT, Product TEXT, Amount INT, OrderDate TEXT);
INSERT INTO Customers VALUES (1,'Anita Sharma','Mumbai','India'),(2,'John Smith','London','UK'),
 (3,'Maria Garcia','Madrid','Spain'),(4,'Wei Chen','Singapore','Singapore'),(5,'Emma Brown','Sydney','Australia');
INSERT INTO Orders VALUES (101,1,'Laptop',1200,'2026-01-05'),(102,2,'Mouse',25,'2026-01-07'),(103,1,'Monitor',300,'2026-01-12'),
 (104,3,'Keyboard',45,'2026-02-02'),(105,6,'Headset',80,'2026-02-15'),(106,4,'Laptop',1150,'2026-03-01');
Follow along

One dataset, all the way through

Every example uses the same simple Customers & Orders tables, shown right in the lesson — so you can read the query, see the exact result, then copy the code and run it in your own SQL tool.

Your instructor

PK
PK
Founder, Neotech Navigators · Microsoft Certified Professional

PK is a Microsoft Certified Professional with 15+ years in data visualization, Excel automation and dashboard creation. Through Neotech Navigators and the @PK-AnExcelExpert YouTube channel (297K+ subscribers), PK has taught practical data skills to learners around the world. The approach here is simple: clear explanations, real code you can copy, and a short practice at the end of every lesson.

Microsoft Certified15+ years experience297K+ YouTube subscribers500+ tutorials published

Frequently asked

Is this SQL course really free?+

Yes. All 32 chapters are free with no login or signup. The site is supported by advertising, so the tutorials stay open to everyone.

Do I need to install any software?+

No. Every example shows its output on the page. To practise, paste the CREATE TABLE script above into a free online SQLite editor, or install DB Browser for SQLite, MySQL or PostgreSQL.

Which SQL dialect does the course teach?+

Standard SQL that runs in MySQL, SQL Server, PostgreSQL and SQLite. Wherever the four differ, for example LIMIT versus TOP, the chapter shows each version.

How long does it take to finish?+

About four hours of reading plus practice time. Most learners finish the first two modules in an evening and the whole course in one to two weeks.

Is there a certificate or a test?+

There is no certificate, but the final chapter is a 75-question SQL quiz with instant feedback so you can check what you have learned.

Is there a video version?+

Matching walkthroughs are on the @NeotechNavigators YouTube channel.