SQL Programming
Master SQL from scratch — 50 lessons covering queries, joins, optimisation, and advanced database engineering.
Sign in to track your progress through this course
👋 New to SQL? It's essential for every developer.
SQL is how you talk to databases. Start with Lesson 1 — you'll be writing real queries in minutes.
Beginner Track
✦ Start Here ~2–3 hoursLearn to query databases — SELECT, filter, sort, and retrieve the data you need from any table.
Introduction to SQL
What SQL is, what databases are, and why you need to learn SQL
Database Basics & Tables
Create databases and tables, understand rows, columns, and data types
SELECT Statement
Retrieve data from tables with SELECT — the most important SQL statement
WHERE Clause & Filtering
Filter rows by conditions using WHERE, AND, OR, and comparison operators
ORDER BY & Sorting
Sort query results in ascending or descending order with ORDER BY
Intermediate Track
~3–4 hoursCombine tables with JOINs, group and aggregate data, use subqueries, and modify data confidently.
JOIN Operations
Combine data from multiple tables using INNER, LEFT, RIGHT, and FULL JOINs
Aggregate Functions
Calculate totals, averages, and counts with SUM, AVG, COUNT, MIN, MAX
GROUP BY & HAVING
Group results and filter groups with GROUP BY and HAVING
Subqueries
Nest queries inside other queries for complex data retrieval
INSERT, UPDATE, DELETE
Add, change, and remove data in your database tables
Expert Track
~2–3 hoursOptimise queries with indexes, write stored procedures, manage transactions, and tackle advanced SQL patterns.
Indexes & Performance
Speed up queries dramatically by creating the right indexes
Views & Stored Procedures
Create reusable views and stored procedures for complex query logic
Transactions & ACID
Ensure data integrity with transactions, rollbacks, and ACID guarantees
Advanced Queries
CTEs, window functions, and advanced SQL patterns for real-world data
Advanced Track
~12–16 hoursDatabase engineering at scale — internals, replication, warehousing, security, and distributed SQL.
Advanced Relational Database Theory & Normalization (BCNF, 4NF, 5NF)
Eliminate data anomalies with higher normal forms beyond 3NF
Indexing Internals: B-Trees, Hash Indexes, Bitmap Indexes & When to Use Them
Understand index data structures and choose the right index for each query
Query Optimization Deep Dive: Execution Plans, Cost Estimation & Hints
Read EXPLAIN plans, understand cost estimation, and apply optimiser hints
Advanced JOIN Patterns: Anti-Joins, Semi-Joins, Cross & Lateral Joins
Use NOT EXISTS, EXISTS, CROSS APPLY, and LATERAL for complex join patterns
Window Functions Mastery: PARTITION, ORDER, Frames, Ranking Functions
ROW_NUMBER, RANK, LAG, LEAD, and running totals with window functions
Stored Procedures, Functions & Triggers (Advanced Use-Cases)
Write complex stored procedures, scalar functions, and audit triggers
Transactions, Isolation Levels & Concurrency Control (ACID Deep Dive)
Read uncommitted to serializable — choose the right isolation level
Locking, Deadlocks & High-Concurrency Performance Patterns
Understand row locks, table locks, and how to detect and prevent deadlocks
Partitioning: Range, Hash, List & Composite Strategies
Partition large tables for query performance and maintenance efficiency
Sharding & Distributed SQL Concepts (Vitess, Yugabyte, CockroachDB)
Scale SQL horizontally with sharding strategies and distributed databases
Materialized Views, Caching Layers & Query Acceleration
Pre-compute expensive queries with materialized views and refresh strategies
Advanced Aggregations & Pivot/Unpivot Techniques
GROUPING SETS, ROLLUP, CUBE, and pivot tables in SQL
Recursive CTEs: Graph Traversal, Hierarchies & Path Queries
Traverse trees and graphs with recursive CTEs and anchor members
Temporal Tables & Time-Travel Queries
Track historical data with system-versioned temporal tables and time-travel queries
Full-Text Search & Fuzzy Matching Across SQL Engines
Implement full-text search with MATCH AGAINST, tsvectors, and fuzzy matching
JSON & Semi-Structured Data Handling in SQL
Store, query, and index JSON data in PostgreSQL, MySQL, and SQL Server
Advanced Data Types: Arrays, HSTORE, Geography, UUID
Use PostgreSQL's powerful extended types for arrays, key-value, and geo data
Database Security: Roles, Privileges, Policies & Row-Level Security
Implement RBAC, column-level privileges, and row-level security policies
SQL Injection Defenses & Secure Query Practices
Prevent SQL injection with parameterised queries and input validation
Backup, Restore & High Availability Strategies
Plan database backups, test restores, and set up high availability
Database Replication: Synchronous vs Asynchronous, Failover & Clustering
Set up primary/replica replication and automatic failover for your database
Advanced Views & Virtual Tables for Reusable Query Logic
Build updatable views, security views, and virtual table patterns
Analytical SQL for BI: Cubes, Rollups, Grouping Sets
Write BI-grade SQL with ROLLUP, CUBE, and GROUPING SETS
Query Profiling Tools Across PostgreSQL, MySQL & SQL Server
Use EXPLAIN, ANALYZE, Performance Schema, and Query Store to profile queries
Understanding Buffer Pool, Caches, Memory & I/O Optimization
Tune the buffer pool, shared buffers, and memory for faster query I/O
Massive Data Handling: Bulk Inserts, Batching, ETL Patterns
Load millions of rows efficiently with COPY, bulk insert, and ETL patterns
Triggers vs Application Logic — Architectural Best Practices
When to use DB triggers vs application code and how to avoid trigger pitfalls
Schema Versioning, Migration Tools & CI/CD for Databases
Version database schemas with Flyway, Liquibase, and CI/CD pipelines
Database Design Patterns for Large Systems (OLTP vs OLAP)
Choose between OLTP and OLAP schema designs for your workload
Cross-Database Queries, Foreign Data Wrappers & Federated SQL
Query remote databases with FDWs, linked servers, and federated queries
Performance Testing: Benchmarking, Stress Testing & Load Tools
Benchmark SQL performance with pgbench, sysbench, and custom load tests
Designing Multi-Tenant Databases (Shared, Isolated, Hybrid Models)
Model multi-tenant SaaS databases with row-level, schema, or database isolation
Data Warehousing Architecture & Star/Snowflake Schemas
Design analytical data warehouses with star schemas, fact tables, and dimensions
Using SQL with Big Data Tools (Hive, SparkSQL, DuckDB, Presto)
Run SQL at massive scale with Hive, SparkSQL, DuckDB, and Presto
Final Project – Build a Full Production-Ready SQL Database System
Design, build, and optimise a complete production database from scratch