Write confident queries with SELECT, JOIN, GROUP BY, and subqueries.
Learn the fundamental SQL building blocks that every data professional needs. Master SELECT, FROM, and WHERE clauses with real-world examples, avoid common pitfalls, and build production-ready queries that deliver precise results every time.
Master enterprise-level SQL filtering and sorting with advanced WHERE clauses, complex ORDER BY logic, and query optimization strategies that scale to millions of rows. Learn index design, performance tuning, and edge case handling.
Learn sophisticated SQL aggregation patterns including ROLLUP, CUBE, statistical functions, and performance optimization techniques for enterprise-scale analytics. Master complex GROUP BY logic, conditional aggregation, and common pitfalls.
Learn to transform raw data into business insights using SQL aggregate functions. Master GROUP BY, HAVING, COUNT, SUM, and AVG with real-world examples and hands-on practice.
Master advanced subquery patterns and CTE architectures for complex analytical queries. Learn performance optimization, recursive patterns, and integration with window functions through real-world examples.
Learn expert-level SQL techniques for building sophisticated analytical queries. Master subquery optimization, recursive CTEs, and performance tuning for real-world data challenges.
Learn to architect complex analytical queries using subqueries and CTEs, from basic patterns to recursive operations and performance optimization strategies for production systems.
Learn to add, modify, and remove database records with confidence. Master INSERT, UPDATE, and DELETE commands with practical examples and safety best practices that prevent data disasters.
Master the art of SQL schema design from data type internals to advanced patterns. Learn how storage decisions affect performance, design constraints that enforce business rules, and build schemas that evolve gracefully with your applications.
Learn to clean messy data, parse inconsistent formats, and build robust data quality systems using advanced SQL string and date functions with real-world examples.
Master string manipulation, date arithmetic, and timezone handling with performance optimization techniques for enterprise SQL systems. Learn advanced patterns, cross-platform compatibility, and memory-efficient processing strategies.
Master SQL's essential NULL handling functions to clean messy data, provide fallback values, and prevent common bugs that trip up even experienced analysts.
Master the internal mechanics of database indexes, from B-tree structures to advanced optimization strategies. Learn when indexes help, when they hurt, and how to design indexing strategies that scale.
Learn how to use SQL's most essential aggregate functions — COUNT, SUM, and AVG — combined with GROUP BY to transform raw data into meaningful summaries. This hands-on lesson walks you from first principles to writing real analytical queries with confidence.
CASE expressions let you embed if-then-else logic directly inside SQL queries — not just in SELECT, but in WHERE filters, GROUP BY buckets, and aggregate functions. This lesson teaches every form with production-realistic examples so you can write smarter queries without touching application code.
Learn how to combine JOIN and GROUP BY to aggregate data across multiple related tables in a single SQL query. This expert-level lesson covers fan-out inflation, LEFT JOIN with aggregation, conditional aggregation, ROLLUP, and performance strategies for production-scale data.
Learn how to write SQL subqueries that dynamically filter rows, look up calculated values, and check for related data — all inside a single query. This hands-on lesson builds from scalar subqueries to correlated subqueries with realistic examples and exercises.
Learn how to write production-quality SQL that combines GROUP BY, HAVING, and CASE WHEN in a single query. This lesson goes beyond the basics to cover conditional counts, rate calculations, performance tier classification, and the subtle bugs that cause silently wrong results.
Most complex analytical questions can't be answered in a single flat query — they require computing something, and then computing something on top of that. This lesson teaches you how to structure multi-step SQL using derived tables and inline views, with realistic examples, optimizer internals, and a complete hands-on exercise.
Duplicate rows in SQL results are one of the most common — and most fixable — problems in data work. This lesson teaches you exactly how DISTINCT, GROUP BY, and COUNT work, when to use each, and how to audit your data for duplicates like a pro.
Self-joins are one of SQL's most versatile — and most misunderstood — patterns. Learn how to query a table against itself to navigate hierarchies, compare rows, detect duplicates, and find sequential relationships, with realistic examples and clear guidance on when to use this technique versus window functions.
EXISTS and NOT EXISTS are among the most powerful and misunderstood filtering tools in SQL. Learn how correlated subqueries work under the hood, why NOT EXISTS beats NOT IN every time, and how to compose multi-criteria existence checks that would tie a JOIN in knots.
SQL set operations let you stack and compare results from multiple queries — without a single JOIN. Learn how UNION, UNION ALL, INTERSECT, and EXCEPT work, when to use each one, and how to avoid the mistakes that trip up beginners.