SQL Learning - Free Structured Course
Free structured SQL course across 11 modules: foundations, fundamentals, advanced filtering, aggregates, joins, subqueries and CTEs, window functions, query optimization and more. Practice PostgreSQL, MySQL, SQL Server and Oracle in your browser — no installation required.
Start here
Topical guides
- SQL Joins — complete guide (INNER, LEFT, RIGHT, FULL, CROSS, SELF, ANTI)
- SQL Window Functions — complete guide (OVER, PARTITION BY, RANK, LAG, LEAD)
- SQL CTEs and the WITH Clause (WITH, recursive CTEs, hierarchical queries)
- SQL Subqueries — complete guide (scalar, correlated, EXISTS, IN, derived tables)
- SQL Aggregate Functions and GROUP BY (COUNT, SUM, AVG, HAVING, conditional aggregation)
- SQL Data Types — complete guide (VARCHAR, DECIMAL, TIMESTAMP, JSON; PostgreSQL/MySQL/SQL Server comparison)
- SQL Indexes — complete guide (B-tree, composite, covering, partial, GIN, expression indexes)
- PostgreSQL vs MySQL — complete comparison (features, performance, JSON, replication, migration)
- SQL Interview Questions — complete guide (200+ problems by topic, difficulty, company)
- SQL Cheat Sheet (one-page reference for every SQL clause)
Modules
JavaScript is required to use the interactive lessons. See also Practice Mode and Interview Mode.