SQL, one lesson at a time.
79 short lessons, each with runnable examples and a quick check. Free, in order, and saved as you go.
Start here Introduction to SELECT Basics · 0 of 79 lessons done
Basics
Your first queries: SELECT, WHERE, ORDER BY, NULLs and CASE.
0/19
- 1 Introduction to SELECT
- 2 Selecting Specific Columns
- 3 Filtering with WHERE
- 4 Multiple Conditions with AND/OR
- 5 Sorting with ORDER BY
- 6 Limiting Results with LIMIT
- 7 Range Queries with BETWEEN
- 8 Multiple Values with IN
- 9 Pattern Matching with LIKE
- 10 Column Aliases with AS
- 11 Sorting by Several Columns
- 12 Paging with OFFSET
- 13 NULL Values and IS NULL
- 14 Excluding Rows with NOT
- 15 COALESCE - Handling NULLs
- 16 CASE WHEN - Conditional Logic
- 17 Type Casting with CAST
- 18 Math Functions
- 19 Working with Dates
Intermediate
Combine tables and summarize data with JOINs and GROUP BY.
0/20
- 1 Counting with COUNT
- 2 SUM and AVG
- 3 MIN and MAX
- 4 Grouping with GROUP BY
- 5 Filtering Groups with HAVING
- 6 Unique Values with DISTINCT
- 7 Introduction to Subqueries
- 8 Subqueries with IN
- 9 Subqueries in FROM
- 10 Combining Tables with INNER JOIN
- 11 LEFT JOIN - Keep All Left Rows
- 12 Finding Rows Without a Match
- 13 Joining Three or More Tables
- 14 UNION and UNION ALL
- 15 INTERSECT and EXCEPT
- 16 String Functions
- 17 Grouping by Dates
- 18 Conditional Aggregation
- 19 Finding Duplicates
- 20 The Order SQL Runs In
Advanced
Window functions, CTEs, recursion and the patterns interviews love.
0/18
- 1 Introduction to Window Functions
- 2 RANK and DENSE_RANK
- 3 PARTITION BY
- 4 LAG and LEAD
- 5 Introduction to CTEs
- 6 CTEs with Window Functions
- 7 Self Joins
- 8 Recursive CTEs
- 9 Query Optimization Basics
- 10 NTILE - Dividing into Buckets
- 11 Aggregate Window Functions
- 12 Running Totals and Moving Averages
- 13 Percent of Total
- 14 Growth Rates with LAG
- 15 EXISTS and NOT EXISTS
- 16 Correlated Subqueries
- 17 Finding the Median
- 18 Gaps and Islands: Finding Streaks
Extras
How SQL is used on the job: roles, tools, dialects and habits.
0/22
- 1 SQL Terminology
- 2 Views - Virtual Tables
- 3 Indexes - Speed Up Queries
- 4 Snowflake - Cloud Data Warehouse
- 5 dbt - Transform Data with SQL
- 6 Databricks - Unified Analytics
- 7 Transactions & ACID
- 8 Databases vs Data Warehouses
- 9 Career: Data Analyst
- 10 Career: Analytics Engineer
- 11 Career: Data Engineer
- 12 Career: Business Analyst
- 13 SQL Dialects: Overview
- 14 PostgreSQL vs MySQL
- 15 SQLite: The Embedded Database
- 16 Cloud SQL: BigQuery, Redshift, Snowflake
- 17 SQL is Everywhere
- 18 SQL Interview Tips
- 19 Building a SQL Portfolio
- 20 SQL Salary Guide 2026
- 21 SQL in AI and Machine Learning
- 22 Real-World SQL - Day in the Life