Learning path

SQL

The language for storing and querying data in databases like MySQL and PostgreSQL.

  1. 1

    SQL Introduction

    What databases and SQL are, why almost every app uses them, the main database systems, and how to practise SQL for free in your browser.

    4 min read
  2. 2

    SQL Databases and Tables

    Create tables with CREATE TABLE, choose data types, understand primary keys and NULL, and load the practice shop database used in every lesson of this course.

    5 min read
  3. 3

    SQL SELECT

    Read data with SELECT: choose columns, avoid SELECT * in real code, rename columns with AS, calculate new columns, remove duplicates with DISTINCT and limit results.

    3 min read
  4. 4

    SQL WHERE

    Filter rows with WHERE using comparison operators, AND, OR and NOT, IN, BETWEEN, LIKE patterns and IS NULL, and learn why NULL needs special handling.

    4 min read
  5. 5

    SQL ORDER BY

    Sort query results with ORDER BY, ascending and descending, by several columns and by calculated values, handle NULLs, and get top-N results with LIMIT.

    4 min read
  6. 6

    SQL INSERT

    Add rows with INSERT INTO, list columns explicitly, insert several rows at once, use defaults and auto-generated ids, copy rows with INSERT ... SELECT, and avoid SQL injection.

    4 min read
  7. 7

    SQL UPDATE

    Change existing rows with UPDATE and SET, always target rows with WHERE, update several columns and calculated values, and use transactions as a safety net.

    4 min read
  8. 8

    SQL DELETE

    Remove rows with DELETE safely, understand how foreign keys protect related data, compare DELETE, TRUNCATE and DROP, and when to use soft deletes instead.

    4 min read
  9. 9

    SQL Functions (COUNT, SUM, AVG)

    Summarise data with aggregate functions COUNT, SUM, AVG, MIN and MAX, understand how they treat NULL, and use common text, number and date functions.

    4 min read
  10. 10

    SQL GROUP BY

    Calculate totals per category, per customer and per month with GROUP BY, filter groups with HAVING, and understand the full order in which a query runs.

    4 min read
  11. 11

    SQL JOINs (INNER JOIN)

    Combine rows from related tables with INNER JOIN, use table aliases, join three or four tables, and build real reports like order totals per customer.

    5 min read
  12. 12

    SQL LEFT JOIN

    Keep every row from the first table with LEFT JOIN, find rows without matches, count zero values correctly, and meet RIGHT, FULL and self joins.

    5 min read
  13. 13

    SQL Constraints and Keys

    Protect data quality with PRIMARY KEY, FOREIGN KEY, UNIQUE, NOT NULL, CHECK and DEFAULT constraints, choose ON DELETE behaviour, and design one-to-many and many-to-many relationships.

    5 min read
  14. 14

    SQL Indexes

    How indexes make queries fast, when to create them, composite indexes and column order, reading EXPLAIN plans, and the costs of too many indexes.

    5 min read
  15. 15

    SQL Project: Library Database

    Design, build and query a complete library database with authors, books, members and loans, using tables, constraints, joins, grouping and indexes.

    7 min read