Data & Databases
Beginner → Advanced
12 chapters
Free certificate

SQL & Relational Database Mastery

Relational theory, bulletproof schema design, complex analytical queries, query optimization and transactions.

Almost every app stores its data in tables. SQL is the short sentence you use to ask those tables a question, and you will run every query live in your browser.

Your progress (saved in this browser)0/12

Try it in 10 seconds

Every chapter teaches like this: guess first, then see why.

Predict first

A row has city = NULL. Does WHERE city <> 'Paris' return it?

SELECT * FROM users WHERE city <> 'Paris';

Your roadmap

  1. Chapter 1

    Your First Database Table & Queries

    Learn how databases store data, how to create tables with CREATE TABLE, add records with INSERT INTO, and query rows using SELECT and WHERE.

  2. Chapter 2

    Filtering, Sorting & The NULL Trap

    Master multi-condition filtering with WHERE, pattern matching with LIKE and IN, sorting with ORDER BY, pagination with LIMIT, and avoid the classic NULL comparison trap.

  3. Chapter 3 · coming soon

    Aggregations & GROUP BY Conveyor Belt

    Grouping mechanics, COUNT, SUM, AVG, and HAVING vs. WHERE.

  4. Chapter 4 · coming soon

    JOINs Visualized Row by Row

    INNER, LEFT, RIGHT, FULL, and CROSS joins; preventing unexpected duplicate explosions.

  5. Chapter 5 · coming soon

    Database Design & Normalization (1NF to 3NF)

    Entity relationships (1:1, 1:N, N:M), ER diagrams, normalization rules, and intentional denormalization.

  6. Chapter 6 · coming soon

    Subqueries & Common Table Expressions (CTEs)

    Correlated subqueries, readable CTE pipelines, and recursive CTEs for tree/hierarchical data.

  7. Chapter 7 · coming soon

    Window Functions Demystified

    OVER(), PARTITION BY, ORDER BY, ROW_NUMBER(), RANK(), DENSE_RANK(), LAG(), and LEAD().

  8. Chapter 8 · coming soon

    Running Totals, Moving Averages & Percentiles

    Frame clauses (ROWS BETWEEN), rolling 7-day averages, cumulative distributions, and NTILE.

  9. Chapter 9 · coming soon

    Indexes & The B-Tree Engine

    How B-Trees search in O(log n), clustered vs. secondary indexes, composite index column order, and index overhead.

  10. Chapter 10 · coming soon

    Reading Execution Plans & Query Tuning

    EXPLAIN / EXPLAIN ANALYZE, table scans vs. index seeks, join algorithms (nested loop, hash join), and eliminating bottlenecks.

  11. Chapter 11 · coming soon

    Transactions, ACID & Locking

    Atomicity, Isolation levels (Read Committed, Repeatable Read, Serializable), deadlocks, and row locks.

  12. Chapter 12 · coming soon

    SQL Capstone & Senior Technical Interview Prep

    Solving LeetCode-style hard SQL problems, optimizing slow queries, and architecture interview questions.

Related courses