Unit 13.04: Reviewing your own work as a sceptic would
Unit ID: SQL-M13-U05 - Estimated active time: 25-35 minutes Objective: attack your own analysis before someone else does.
Change role deliberately
You have spent hours making this work. Now spend twenty minutes trying to break it - not re-reading it approvingly, which is a different and useless activity.
The questions a sceptic asks
Work through these against your own memo:
- "What does one row mean?" - can you state the grain of every result? *(Module 1)*
- "Which rows did your filter drop?" - especially NULLs. *(Modules 2, 3)*
- "Did any join change the row count?" - and did you check? *(Module 5)*
- "Is that average weighted correctly?" *(Module 4)*
- "Does your date range include the last day?" *(Module 8)*
- "How did you normalise the text?" *(Module 9)*
- "What does this figure reconcile against?" *(Module 10)*
- "Would I get the same number tomorrow?" *(Module 11)*
Eight questions, each with a query that settles it. If any answer is "I assume so", that is the next thing to check.
Run the adversarial checks
-- Would a different date style change the answer?
SELECT COUNT(*) FROM orders WHERE placed_at BETWEEN '2026-06-01' AND '2026-06-30'; -- 967
SELECT COUNT(*) FROM orders WHERE placed_at >= '2026-06-01' AND placed_at < '2026-07-01'; -- 1000
-- Would a naive join change the revenue?
SELECT SUM(o.order_total) FROM orders o JOIN order_items i ON i.order_id=o.order_id; -- 9147789.00
SELECT SUM(order_total) FROM orders; -- 2701463.00
-- Does the raw city column change the ranking?
SELECT COUNT(DISTINCT city), COUNT(DISTINCT LOWER(TRIM(city))) FROM customers; -- 6 | 4
Each shows a plausible alternative choice producing a different answer. Knowing those alternatives - and being able to say why you rejected them - is what makes your figure defensible rather than merely stated.
The final self-review checklist
- [ ] Every figure in the memo appears in the reconciliation table
- [ ] Every join has a documented row count before and after
- [ ] Every filter's NULL behaviour is stated or irrelevant
- [ ] Every text grouping names its normalisation rule
- [ ] Every date range is half-open
- [ ] The limitations section names at least one thing you could not resolve
- [ ] A colleague could rerun it from the query file and get the same numbers
What "done" means
Not "the numbers look right". Done is: someone who does not trust you can follow the memo, rerun the queries, reach the same figures, and see exactly which decisions you made and why.
That is the standard the whole course has been building toward.
Practice
Find one figure in your memo you cannot fully defend, and either resolve it or add it to limitations.
Check your answer
There is no single right answer - the exercise is the discipline.
The most common honest addition for this dataset: "timezone is not recorded in the source data, so daily boundaries assume the timestamps are already in the reporting timezone." That is unresolvable with the data available, which is exactly why it belongs in limitations rather than being quietly ignored.
Takeaway
Attack your own work with the eight sceptic's questions before publishing. An analysis you have genuinely tried to break is the only kind worth defending.
---
