Lessons16
0/16 modules masteredLevel 0: Start Here
4 lessons · 60 minRead a table as rows and columns, act out a query by hand, catch the missing-value trap, then run your first SELECT, WHERE and ORDER BY in the browser.
SQL: Start Here
Up NextWhat it means to ask a table a question, how to read a table as rows and columns, and how to act out a query by hand before you run it. No code needed to begin.
Reading a Query Before You Run It
How to read a query clause by clause, why a missing value (NULL) drops rows without warning, and a short checklist for SQL that a colleague or an AI tool wrote for you.
Your First SQL Query
Understand what databases are, why SQL matters, and write your first SELECT query. See results instantly in the built-in SQL playground.
Filtering & Sorting Data
Filter rows with WHERE, use comparison operators, combine conditions with AND/OR/NOT, and sort results with ORDER BY.
Level 1: Core Queries
3 lessons · 50 minSummarise with GROUP BY, combine tables with joins, and build multi-step queries with subqueries and CTEs.
Aggregate Functions & GROUP BY
Summarize data with aggregate functions. Group results with GROUP BY and filter groups with HAVING.
JOINs: Combining Tables
Learn INNER JOIN, LEFT JOIN, RIGHT JOIN, FULL JOIN, and CROSS JOIN. Understand when to use each type and how to avoid row-multiplying traps.
Subqueries & CTEs: Queries Inside Queries
Write subqueries in WHERE, FROM, and SELECT clauses. Use Common Table Expressions (WITH) for readable, reusable query logic.
Level 2: Real Data
3 lessons · 45 minCASE, NULLs, strings, dates and set operations, window functions, and changing data safely.
Advanced SQL: CASE, String Functions, Dates & Set Operations
Transform data with CASE expressions, handle NULLs with COALESCE, manipulate strings, work with dates, and combine results with UNION, INTERSECT and EXCEPT.
Window Functions: Analytics Without Collapsing Rows
Calculate running totals, rankings, and moving averages without collapsing rows. The step from intermediate to advanced SQL.
INSERT, UPDATE, DELETE: Modifying Data
Add new rows, update existing data, and delete records safely. Understand transactions and the importance of WHERE in UPDATE/DELETE.
Level 3: Design and Speed
3 lessons · 50 minCreate tables, model data (normalisation and star schemas), and make queries fast with indexes.
CREATE TABLE: Designing Your Database Schema
Design tables with proper data types, constraints (PRIMARY KEY, NOT NULL, UNIQUE, FOREIGN KEY), and defaults.
Data Modeling: Normalization, Star Schemas & ER Diagrams
Design databases with normalization (1NF-3NF), star schema for analytics, and entity-relationship diagrams.
Indexes & Performance: Making Queries Fast
Understand how indexes speed up queries, when to create them, and how to read query plans to optimize slow queries.
Level 4: Analytics and Interviews
3 lessons · 2 hrCohorts, funnels, A/B tests and growth, then the patterns SQL interviews reuse.
SQL for Data Science: Cohorts, Funnels, A/B Tests & Growth
Cohort analysis, funnel metrics, retention rates, and A/B test analysis. SQL patterns for product and data teams.
SQL Interview Patterns: Top-N, Gaps & Islands, Pivots & More
Learn the SQL patterns that interviews reuse: top-N per group, gap analysis, pivot tables, and recursive queries.
SQL Practice Lab
Eight autograded query exercises on one small shop database: filter and sort, GROUP BY and HAVING, joins, LEFT JOIN with missing values, a subquery, a running total with a window function, a CTE, and fixing a broken query.
Practice labs
12 interactive labs — hands-on exercises for this track
SQL Playground
Write SQL queries and see results instantly — SQLite running in your browser with sample data
SQL JOIN Animator
Watch INNER, LEFT, RIGHT, FULL, and CROSS JOINs animate row-by-row. See exactly which rows survive each join — and why LEFT JOIN keeps unmatched rows with NULLs.
EXPLAIN Plan Visualizer
See how adding indexes collapses a query plan. Toggle indexes and watch Sequential Scans turn into Index Scans — cost drops from 10,000 to 12.
Window Functions Visualizer
Animate ROW_NUMBER, RANK, LAG, LEAD, and SUM-OVER row-by-row. Toggle PARTITION BY to watch the function restart at each group boundary.
Normalization Steps (1NF → 3NF)
Transform a denormalized Orders table into clean relational schema step-by-step. Each step animates the change and explains which redundancy it removes.
CTE Chain Visualizer
See how Common Table Expressions break a complex query into named steps. Toggle between CTEs and nested subqueries to feel the readability difference.
Transaction Isolation Levels
Watch two concurrent transactions collide. Pick Read Uncommitted → Serializable and see exactly what T1 reads, which anomalies fire.
Deadlock Visualizer
Watch two transactions lock rows in opposite orders and form a wait-for cycle — the database's definition of a deadlock. Flip to consistent ordering and the cycle disappears.
SQL Views vs Materialized Views
Same complex query on 3 tabs — regular view, materialized view, no view. See freshness-vs-speed tradeoff in live timings.
SQL Triggers Visualizer
BEFORE INSERT computes tax. AFTER UPDATE writes audit log. Toggle triggers off and see how 'app-level code' forgets.
SQL Partitioning Visualizer
1M-row orders table split by Range (date) or Hash (customer_id). See why partitioning only helps when filter matches partition key.
SQL JSON Operations
Nested JSONB document with 5 ops: ->>, ->, @>, jsonb_set, jsonb_path_query. See the traversed path highlighted.
Test your knowledge
363 questions across 16 modules — check how well you understood this track.