ORACLE · POSTGRESQL · MYSQL

SQL — Foundation
to Pro

8 levels. Built for a data engineering career. Banking and stock market examples throughout. No filler.

Start at L1 Foundations if you're new. Skip to L4 Window Functions if you know basic SELECT/JOIN. Every level builds on the previous.
LEVEL 01

Foundations

SELECT, FROM, WHERE, JOINs, ORDER BY. The anatomy of every SQL query.

SELECTWHERE JOINORDER BY
LEVEL 02

Aggregations & Grouping

GROUP BY, HAVING, aggregate functions, CASE WHEN, COALESCE, date functions.

GROUP BYHAVING CASE WHENCOALESCE
LEVEL 03

Subqueries & CTEs

Scalar, inline, correlated subqueries. WITH clause, recursive CTEs. EXISTS vs IN.

CTEWITH EXISTSRECURSIVE
LEVEL 04

Window Functions

ROW_NUMBER, RANK, LAG/LEAD, running totals, moving averages, NTILE.

OVER()PARTITION BY LAG/LEADRANK
LEVEL 05

Advanced Joins & Set Ops

FULL OUTER, CROSS, SELF, non-equi joins. UNION, INTERSECT, EXCEPT/MINUS.

FULL OUTERCROSS JOIN UNIONINTERSECT
LEVEL 06

Performance & Optimization

EXPLAIN PLAN, indexes, partitioning, materialized views, anti-patterns.

EXPLAININDEX PARTITIONMVIEW
LEVEL 07

DE Pipeline Patterns

SCD Type 1 & 2, MERGE/UPSERT, incremental loads, deduplication, pivot, JSON.

SCD2MERGE UPSERTDEDUP
LEVEL 08

Pro & Interview Mastery

Gaps & islands, session analysis, cohort retention, ROLLUP, mock interview questions.

GAPS/ISLANDSCOHORT ROLLUPINTERVIEW

Dataset used across all levels

Every level uses the same two core tables so you can focus on SQL, not on understanding new data.

-- Table 1: transactions
txn_id | account_id | txn_date | txn_type | amount | status | branch

-- Table 2: accounts
account_id | customer | segment | city

-- Table 3 (L4+): daily_stock (NSE)
symbol | trade_date | open | high | low | close | volume

How to use this course

Read the concept
Each section explains the idea before showing SQL.
Study the examples
All examples use banking or stock market data you know.
Solve the problems
Every level ends with 5 graded practice problems.
Repeat
Come back to any level anytime — it's yours forever.