Business Analysis / Learning brief
The report that counted everyone twice
In simple terms / 01
What this means in plain language
A report says too many users have open tasks. Sam joins two tables and finds that each user was counted once for every task. A short story about keys, joins and counting rows.
Complete lesson / 02
Understand the full idea, step by step
A number can be exact and still answer the wrong question.
This brief follows an analyst who finds that a report counts tasks and calls them users. The query runs, the number looks sensible, and the label is still wrong.
What matters is knowing what one row of a result stands for.
Evidence & review / 03
Evidence & review
The date on this lesson is when it went up on Payments Signal, not when its material was written — most of these were brought across from an earlier catalogue in a single run, which is why so many of them share a date. What the lesson says about the world is dated by the review above and by the sources below it.
Joins as taught in this academy. The tables, the report and the people are invented.
What this brief simplifies: Fiction labelled SYNTHETIC / TRAINING ONLY. Real reports join many more tables.
Sources for this brief — 3 sources
- Market practice
PostgreSQL documentation ↗ — The PostgreSQL Global Development Group · PostgreSQL documentation, current manual: chapter 7.2 on table expressions covers joined tables; using EXPLAIN shows the plan with index scans; the index introduction says the planner uses an index when that is cheaper than reading every row (search excerpt, page not opened)
An implementation, not the standard — which is the point. ISO/IEC 9075-2 is paywalled, and this documents the same constructs in text anybody can open. Its isolation-level chapter attributes to the standard explicitly, so it can carry a standard-level claim as long as the citation says which document it is quoting.
Cited as market practice rather than an official standard by kind: an engine's manual is authoritative about that engine and is not the obligation. Where a question turns on behaviour PostgreSQL chose rather than behaviour SQL requires, the answer has to say so.
One correction carried here because it circulates widely: the sentence "The fundamental difference between WHERE and HAVING…", quoted all over the internet as PostgreSQL documentation, is not in the current documentation. It was searched for in the source tree and is not there.
Read through a mirror, because the publisher's own domain could not be fetched (a reachability gap, not a statement about the publisher). A 403 there is a policy refusal and says nothing about whether the document exists or is reachable elsewhere.
Anyone on an unrestricted network should open the canonical URL above and confirm the section and page numbers cited against it. Every claim drawn from this entry is written so that it can be checked against a numbered page.
Read from the
postgres/postgresdocumentation source tree (doc/src/sgml), which the project itself maintains and which carries the section ids the published URLs are derived from — so a cited section id can be checked against the rendered page. - Simplified educational illustration
Payments Signal editorial teaching models — Payments Signal
What this simplifies: Daily List, its two tables and the people are invented. The queries were written for PostgreSQL. A real database has many more tables, and tuning a slow query takes tools and skill that this lesson only names. The advice on what to ask about a slow query is common practice.
Used wherever diagrams, scenarios, figures, or example values are didactic constructions rather than sourced facts; every such use carries a simplifications disclosure. All people, companies, banks, and list entries in examples are fictional.
- Simplified educational illustration
Payments Signal editorial teaching models — Payments Signal
Used wherever diagrams, scenarios, figures, or example values are didactic constructions rather than sourced facts; every such use carries a simplifications disclosure. All people, companies, banks, and list entries in examples are fictional.