Unit 13.00: Framing the eight business questions
Unit ID: SQL-M13-U01 - Estimated active time: 25-35 minutes Objective: turn vague requests into questions with a defined population, grain, and measure.
A question is not answerable until three things are fixed
"How are sales doing?" cannot be answered. "How many orders did we complete in June 2026, and what was their total value?" can - because it fixes:
- Population - completed orders placed in June 2026
- Grain - one order
- Measure - count, and sum of
order_total
Every capstone question must pin all three before you write SQL.
Your eight questions
Use these, or replace any with your own provided they meet the same standard.
| # | Question | Population | Grain | Measure |
|---|---|---|---|---|
| 1 | How many orders were placed in June 2026, and how many completed? | all June orders | order | count |
| 2 | What was completed revenue, and how does it compare to booked revenue? | June orders by status | order | sum |
| 3 | What is the average order value, and over what population? | completed orders | order | mean |
| 4 | How does revenue split by customer country? | completed orders with a customer | order | sum by country |
| 5 | Which city has the most customers? | all customers | customer | count by normalised city |
| 6 | How many customers have never ordered? | all customers | customer | count |
| 7 | How many items were sold, and how does that relate to orders? | order items | item | count |
| 8 | Did all money owed get paid? | completed orders vs payments | measure comparison | sum |
Each names its population and grain, which is what makes the answer checkable.
The trap in question 4
"Revenue by country" needs a decision you must state: 300 customers have no recorded country (Module 3). Do they form their own bucket, or are they excluded?
There is no correct answer, only a documented one. Excluding them means your country figures will not sum to total revenue - and a reviewer will notice.
Practice
Take question 5 and write its population, grain, and measure precisely enough that two analysts would produce the same number.
Check your answer
- Population: all 4,812 customers, including those with no orders
- Grain: one customer
- Measure: count per city, where city is normalised with
LOWER(TRIM(city))
The normalisation clause is the part that makes two analysts agree. Without it one reports New Delhi at 535 and the other at 1,604 (Module 9) - both "correct", neither reproducible.
Takeaway
Fix population, grain, and measure before writing SQL. A question missing any of the three has more than one right answer.
---
