Software Testing / Learning brief
Tom compares two lists with set operators
In simple terms / 01
What this means in plain language
Tom joins and compares two Daily List task lists and learns why UNION and UNION ALL give different counts.
Complete lesson / 02
Understand the full idea, step by step
Analogy: two guest lists. You can put both lists together, keep the names on both, or find the names on the first list only. Whether you keep a name twice depends on the question.
A total of guests is wrong if a person is on both lists and is counted twice.
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.
Set operators on made-up lists. The people and data are invented.
What this brief simplifies: Fiction labelled SYNTHETIC / TRAINING ONLY. Sources were seen only as search excerpts. Tools and screens change, and each team sets its own.
Sources for this brief — 3 sources
- Market practice
Combining Queries: UNION, INTERSECT, EXCEPT (PostgreSQL documentation) ↗ — PostgreSQL Global Development Group · PostgreSQL documentation: UNION, INTERSECT and EXCEPT combine the results of two queries, drop repeated rows unless ALL is used, and need queries with matching columns (search excerpt, page not opened)
PostgreSQL18 publisher documentation opened on6November2026: §7.4 UNION/INTERSECT/EXCEPT and ALL. No execution on PostgreSQL is claimed; engine-specific examples remain scoped to18.
- Market practice
SELECT: compound select statements (SQLite documentation) ↗ — SQLite project · SQLite documentation: compound select statements combine queries with UNION, UNION ALL, INTERSECT and EXCEPT (search excerpt, page not opened)
SQLite rolling SELECT documentation opened6November2026; §§2–5 joins/grouping/bare columns/compound queries/order/limit. UNION ALL supported; INTERSECT ALL/EXCEPT ALL are not. Synthetic fixtures rechecked on3.53.1; historical3.40.1 observations retain their date/version.
- 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.