Courses
SQL Intermediate: Queries That Survive Real Data
Check Yourself: Joins Beyond the Basics
Five scenario questions on fan-out, pre-aggregation, EXISTS and NOT IN with NULL. 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 report joins customers, orders and order_items, then adds up a shipping fee that is stored on each order. The shipping total is too high, while the item totals are right. What happened?
2.
You want the shipping total per customer to be right. Which fix is correct?
3.
You need every customer with the number of orders they placed, including customers who have none, shown as 0. Which query is right?
4.
A query lists customers whose city is NOT IN a subquery that returns cities. It returns no rows, although you know some customers qualify. One customer in the subquery has no city. What is the cause?
5.
Ben bought a backpack in two separate orders. You want each customer who bought from the bags category listed once. Which form says that directly?
About
Five scenario questions on fan-out, pre-aggregation, EXISTS and NOT IN with NULL. If you miss more than one, reread the lessons in this section.
- Duration
- 5 min
- Last update
- 09/27/2026
Was this helpful?
0
0
Comments (0)
Sign in to commentNo comments yet.