FreeSQL Foundations — your first real data skill. Start querying for free today. Start SQL →
CoursesData & AnalyticsSQL Foundations: Subqueries & CTEs
Data & AnalyticsIntermediate

SQL Foundations: Subqueries & CTEs

Write complex multi-step queries using subqueries, CTEs, and UNION — the professional SQL toolkit.

~9h total
5 lessons
~3h content
Pro Access
✦ Includes mini project
⭐ Certificate of completion

No setup required · 100% browser-based

What You'll Learn

Write subqueries in WHERE and FROM clauses
Structure multi-step queries with CTEs
Use UNION and UNION ALL to combine results
Organize complex queries for readability

Course Syllabus

5 lessons · ~180 minutes
01
Subqueries in WHERE
30 min
Code-Along
02
Subqueries in FROM
30 min
Code-Along
03
CTEs with WITH
40 min
Code-Along
04
UNION & UNION ALL
25 min
Code-Along
05
Project: Multi-Step Reporting Query
55 min
Project

Prerequisites

  • SQL Foundations: Joins & Relationships

Tools Used

PostgreSQLBrowser SQL Editor
Continue Your Journey

This course is part of the SQL Foundations Track

Learn the core SQL skills needed to query, summarise, and combine relational data with confidence.

Ready to start SQL Foundations: Subqueries & CTEs?