SQL Course L3 Track / Index PostgreSQL
Data & engineering track · 6 modules

Learn SQL properly

A focused path from what a table is to why a query is slow. Built for someone who wants to say, with a straight face, that they are proficient in SQL: joins, aggregation, window functions, and the index reasoning that separates a scripter from an engineer.

6Modules
L3Target level
~11hTotal focused
1Shared schema
01

The path

00
Foundations · ~1.5h

Relational Foundations & SELECT

Tables, keys, types. SELECT / WHERE / ORDER BY, the NULL trap, and the logical order every query runs in.

Start here
01
Combining tables · ~2h

Joins

INNER, LEFT, RIGHT, FULL, CROSS, and self-joins. Anti-joins, NULLs, and the WHERE-vs-ON outer-join trap.

Open module
02
Summarizing · ~1.5h

Aggregation

COUNT / SUM / AVG, GROUP BY mechanics, HAVING vs WHERE, and how NULLs behave inside aggregates.

Open module
03
Composition · ~2h

Subqueries & CTEs

Scalar & correlated subqueries, EXISTS, the NOT IN + NULL trap, CTEs, and recursive org-chart queries.

Open module
04
Across rows · ~2h

Window Functions

OVER / PARTITION BY, ranking, top-N-per-group, LAG/LEAD, running totals, and the ROWS-vs-RANGE frame.

Open module
05
Performance · ~2h

Indexing & Query Reasoning

B-tree indexes, EXPLAIN ANALYZE, sargability, composite indexes, and a workflow for debugging slow queries.

Open module
02

The schema you'll use throughout

Every module runs on the same tiny company database, so you focus on technique, not on re-reading a new schema each time. People work in departments, some manage others, and they place orders.

departments
dept_id (PK) · dept_name · location
employees
emp_id (PK) · name · dept_id (FK→departments) · manager_id (FK→employees, self-ref) · salary · hire_date
orders
order_id (PK) · emp_id (FK→employees) · customer · amount · order_date · status