A query returning a number is not the same as a query returning the right number. This lesson is the single highest-leverage habit in the entire course.
Every time you get a result, run it through this checklist before you trust it enough to act on or share it.
Check | The question | What it catches |
|---|---|---|
Order of magnitude | Does this number's scale make sense, given what I already know about total users or revenue | A join that fanned out and inflated a total by 10x |
Zero check | If the answer is zero or suspiciously round, is that plausible, or is it a filter excluding everything | A timestamp comparison that accidentally matched nothing |
Denominator check | Am I confident what the total, the "out of how many," actually represents | An INNER JOIN that silently dropped the rows I needed in the denominator |
Time window check | Does my date range actually cover what I think it covers, including timezone | An off-by-one-day error near a month or week boundary |
Cross-check against something known | Does a related, already-trusted number roughly agree with this one | A number that's directionally impossible given something you already know to be true |
Duplicate check | If I'm counting distinct entities, did I actually use DISTINCT, or could one entity be counted more than once | Fan-out from a join inflating a count |
FIELD NOTE
The fastest sanity check that catches the most problems: before trusting any new number, ask "if this number were wrong by 10x in either direction, would I have noticed?" If the honest answer is no, because you don't have any independent sense of the right ballpark, that's worth pausing on before you build a slide around it.
YOUR MOVE THIS WEEK
Take the last query result you personally trusted enough to share with someone else. Run it through this six-item checklist retroactively. You will likely find at least one check you skipped, even if the number turns out to have been correct.