Courses
SQL Intermediate: Queries That Survive Real Data
Check Yourself: Thinking in Sets
Five scenario questions on CTE steps, materialization, UNION ALL, INTERSECT and EXCEPT. If you miss more than one, reread the lessons in this section.
Course content
Join this Course
Sign in to save your progress.
-
Joins Beyond the Basics
-
Three-Table Joins Without Double Counting
-
Subqueries, EXISTS and IN: Which One When
-
-
-
Thinking in Sets
-
CTEs: Break a Long Query Into Named Steps
-
UNION, INTERSECT and EXCEPT
-
-
-
Windows and Dates
-
Window Functions: ROW_NUMBER, RANK and Running Totals
-
Dates, Times and Time Zones in PostgreSQL
-
-
-
Schema Design That Holds
-
Normalization: Where to Split and Where to Stop
-
UNIQUE, CHECK and Foreign Key Actions
-
-
-
Indexes and Transactions
-
Indexes and EXPLAIN: Why That Query Is Slow
-
Transactions and What Two Users Can See
-
-
- Final Check: SQL Intermediate
1.
A long query is written with WITH order_totals AS (...), and the final answer looks wrong. How do you check just the first step?
2.
A CTE is used in two places in the same statement. By default, what does PostgreSQL do?
3.
Two tables hold sales for different years and you add the amounts. Two real sales on the same day have the same customer and amount. Which operator is right?
4.
You have a query for September buyers and a query for August buyers. How do you list the customers who bought in September and not in August?
5.
Two queries each return a row where the city is NULL. What does INTERSECT do with those rows?
About
Five scenario questions on CTE steps, materialization, UNION ALL, INTERSECT and EXCEPT. If you miss more than one, reread the lessons in this section.
- Duration
- 5 min
- Last update
- 10/07/2026
Was this helpful?
0
0
Comments (0)
Sign in to commentNo comments yet.