Kodewick
SQL course · Beginner

Learn SQL

From your first SELECT to JOINs, grouping and window functions, with the data of one online shop all the way through. Every query runs on the page; step through it to see which rows each step keeps.

Start with lesson 1 →21 lessons · about 6 hours · free · runs in your browser
  1. Part 1Querying dataSELECT, WHERE, sorting, NULL and CASE.6 lessons · 1.5 h
    1. Lesson 1Tables and SELECT15 minStart
    2. Lesson 2WHERE: picking rows15 minStart
    3. Lesson 3AND, OR, IN, BETWEEN, LIKE15 minStart
    4. Lesson 4ORDER BY, LIMIT and DISTINCT15 minStart
    5. Lesson 5NULL: no value15 minStart
    6. Lesson 6Expressions, aliases and CASE15 minStart
  2. Part 2SummarizingAggregate functions, GROUP BY, HAVING, and the order a query runs in.4 lessons · 1 h
    1. Lesson 7Aggregate functions15 minStart
    2. Lesson 8GROUP BY15 minStart
    3. Lesson 9HAVING: filtering groups15 minStart
    4. Lesson 10The order a query runs in15 minStart
  3. Part 3More than one tableINNER JOIN, LEFT JOIN, joining several tables, UNION.4 lessons · 1 h
    1. Lesson 11INNER JOIN15 minStart
    2. Lesson 12LEFT JOIN15 minStart
    3. Lesson 13Joining several tables15 minStart
    4. Lesson 14UNION15 minStart
  4. Part 4Stronger queriesSubqueries, WITH and window functions.3 lessons · 1 h
    1. Lesson 15Subqueries15 minStart
    2. Lesson 16WITH: naming a subquery15 minStart
    3. Lesson 17Window functions20 minStart
  5. Part 5Changing data and tablesINSERT, UPDATE, DELETE, tables, transactions, and an online shop to analyze.4 lessons · 1 h
    1. Lesson 18INSERT, UPDATE, DELETE15 minStart
    2. Lesson 19Tables and constraints20 minStart
    3. Lesson 20Transactions15 minStart
    4. Lesson 21Project: analyzing an online shop20 minStart

Questions

Is it really free?

Yes. Every lesson, query and exercise is free, and there is no account to make.

Do I need to install a database?

No. The database is in your browser, so it works at once, and you can step through every query.

Is it real MySQL?

It is MySQL 8 SQL. Every query in the course is checked against real MySQL 8, results and error messages included. The course sticks to SQL that works in most databases and says so where it doesn't.

Can I learn SQL without coding before?

Yes. SQL needs no other language first; lesson 1 starts with a single table.

How long does it take?

Each lesson takes 15 to 20 minutes. One or two a day and you are done in two or three weeks. Step through JOINs and GROUP BY a lot.

Can I learn on my phone?

Yes. Reading, running, stepping and the exercises all work on a phone.

Where is my progress saved?

In this browser, with no account. On another device, or after clearing your browser data, it is gone.

What comes after SQL?

Lots of practice on real data; to work with data in code, learn Python.