SQL in Practice: Joins, Subqueries, CTEs & Set Operations
Combine tables with every join type, filter with subqueries and EXISTS, structure queries with CTEs and CASE, and merge results with UNION, INTERSECT and EXCEPT, with every answer checked as you go.
- One-time payment
- Instant access right after payment
- Secure checkout with Stripe
About this course
This intermediate SQL course takes you beyond single-table queries. In 20 hands-on labs you combine tables with INNER, LEFT, RIGHT, FULL OUTER, self and range joins, and you learn to spot the bugs that hide in real reports: filters that cancel a LEFT JOIN, one-to-many fan-out, and the NULL trap of NOT IN. You write scalar, correlated and EXISTS subqueries, build derived tables and step-by-step CTEs, segment data with CASE and conditional aggregation, and merge results with UNION, INTERSECT and EXCEPT. Every lab shows the real SQL next to fictional data; you work out the exact result yourself and every answer is checked instantly. A final project and exam lead to your certificate.
Lessons
- INNER JOIN: Matching Rows Across Two TablesFree
- Joins with WHERE, GROUP BY and ORDER BY Locked
- LEFT JOIN: Keeping Rows Without a Match Locked
- ON vs WHERE: The Filter That Cancels a LEFT JOIN Locked
- RIGHT and FULL OUTER JOIN: Reconciling Two Lists Locked
- One-to-Many Joins: Fan-Out and Double Counting Locked
- Joining Three Tables: Following the Key Path Locked
- Self-Joins: A Table Joined to Itself Locked
- CROSS JOIN and Range Joins Locked
- Scalar Subqueries: One Value Inside Another Query Locked
- IN and NOT IN Subqueries (and the NULL Trap) Locked
- Correlated Subqueries: Comparing Each Row With Its Own Group Locked
- EXISTS and NOT EXISTS: Semi-Joins and Anti-Joins Locked
- Derived Tables: Subqueries in FROM Locked
- CTEs: Building a Query Step by Step With WITH Locked
- CASE Expressions and Conditional Aggregation Locked
- UNION vs UNION ALL: Stacking Results Locked
- INTERSECT and EXCEPT: Comparing Two Results Locked
- Dates in Queries: Ranges, Differences and Dialects Locked
- Final Project: A Customer Segment Report Locked