SQL Course
SQL is the language of data. Almost every application stores its information in a relational database, and SQL is how you ask it questions and change what it holds. This course takes you from your first SELECT to joins, window functions, transactions, database design and performance — with a real database running in your browser on every page.
What you'll learn
The course has 53 lessons in nine parts:
- Getting Started — the demo database,
SELECT, filtering, logic, sorting, limits andDISTINCT. - Filtering & Expressions —
IN,BETWEEN,LIKE,NULL,CASEand operators. - Functions — text, numbers, dates and type conversion.
- Grouping & Aggregation —
COUNT,SUM,GROUP BY,HAVINGand pivot-style reports. - Joins & Set Operations — keys, every join type, self joins and
UNION. - Subqueries, CTEs & Window Functions — nested queries,
EXISTS,WITH, recursion, ranking and running totals. - Changing Data —
INSERT,UPDATE,DELETE, upserts and transactions. - Database Design — tables, types, constraints, keys, normalization, indexes and views.
- Advanced & Practical SQL — triggers, JSON, security, performance, dialects and a final analysis project.
Every Try it yourself editor runs real SQL (SQLite, compiled to WebAssembly) against a fresh copy of the course's demo shop database — so experiment freely; nothing you do can break it. Every query result shown in the lessons was produced by running the query.
No previous experience is needed. The course teaches standard SQL and points out where PostgreSQL, MySQL, SQL Server and Oracle differ.
Practice
- Playground — a blank SQL editor connected to the demo database.
- Exercises — fill-in-the-blank tasks and query challenges with solutions.
- Quiz — test your understanding across the whole course.
- Syllabus & Study Plan — learning outcomes and a week-by-week schedule.
Lessons
Getting Started
- Introduction to SQL
- The Demo Database
- SELECT
- Filtering with WHERE
- AND, OR & NOT
- Sorting with ORDER BY
- LIMIT & OFFSET
- DISTINCT
Filtering & Expressions
Functions
Grouping & Aggregation
Joins & Set Operations
- Keys & Relationships
- INNER JOIN
- LEFT & RIGHT JOIN
- FULL & CROSS JOIN
- Self Join
- Joining Multiple Tables
- UNION, INTERSECT & EXCEPT
Subqueries, CTEs & Window Functions
- Subqueries
- Correlated Subqueries & EXISTS
- Common Table Expressions (WITH)
- Recursive CTEs
- Window Functions
- Ranking & Running Totals
Changing Data
Database Design
- Creating Tables
- Data Types
- Constraints
- Primary & Foreign Keys
- Altering & Dropping Tables
- Normalization
- Indexes
- Views
Advanced & Practical SQL
- Triggers
- Working with JSON
- SQL Injection & Security
- Query Performance
- SQL Dialects
- Project: Analysing a Shop