Software Testing / Learning brief

Tom asks the librarian

What this means in plain language

Tom wants to see the row Daily List really stored. A librarian shows him how to ask a read-only question with a select, a filter and a join, so the shelves stay as they were and he can spot a fault.

Understand the full idea, step by step

Ask a librarian for all red books of a recent year, newest first, and a short list comes back. No book moves and no shelf changes.

Tom, the tester at Daily List, a to-do list app, wants the same kind of answer from the database. He wants to look and not to touch.

Evidence & review

REVIEWED 2026-10-18

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.

Structured Query Language (SQL), select query and filter as taught in this academy. The people, the Daily List app and the rows are invented.

What this brief simplifies: Fiction labelled SYNTHETIC / TRAINING ONLY. Sources were seen only as search excerpts. The queries follow PostgreSQL style and other products differ.

Sources for this brief — 6 sources
  1. Market practice

    PostgreSQL documentation ↗ — The PostgreSQL Global Development Group · The PostgreSQL manual covers SELECT, WHERE and the rules for NULL: a comparison with NULL gives unknown, so IS NULL is used to test for it (search excerpt, page not opened)

    A free, precise, section-numbered description of the SQL a payments practitioner actually writes. Join types and what happens to unmatched rows, GROUP BY and HAVING against WHERE, window functions and the de-duplication and running-total idioms built on them. Transaction isolation levels and the anomalies each permits, index use, and null three-valued logic.

    Used here for the data-and-SQL questions a Payment Operations Analyst, a Production Support Analyst and a Sanctions Screening Analyst are asked. · Checked 2026-08-18

    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/postgres documentation 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.

  2. Market practice

    PostgreSQL WHERE (Neon PostgreSQL tutorial) ↗ — Neon · SELECT returns rows and the WHERE clause, placed after FROM, keeps only rows whose condition is true (search excerpt, page not opened)

    Per the search excerpt, a vendor tutorial: select returns rows and the where clause, placed after from, keeps only the rows whose condition is true. Practitioner guidance, not a standard. · Checked 2026-10-18

    Found through a web search; the page was not opened (search excerpt, page not opened). Version: Web page, no edition number. Licence terms were not read, so put it in your own words and do not quote it. Open the page and confirm what it says before relying on any detail.

  3. Market practice

    PostgreSQL left join (Hyring learning pages) ↗ — Hyring · A left join with a test for a missing key on the right side finds rows that have no match (search excerpt, page not opened)

    Per the search excerpt, a tutorial: a left join with a test for a missing key on the right side finds rows that have no match, such as customers with no orders. Practitioner guidance, not a standard. · Checked 2026-10-18

    Found through a web search; the page was not opened (search excerpt, page not opened). Version: Web page, no edition number. Licence terms were not read, so put it in your own words and do not quote it. Open the page and confirm what it says before relying on any detail.

  4. Market practice

    How to find duplicate rows in PostgreSQL (Command Prompt education) ↗ — Command Prompt · Group by the columns that should be unique, keep groups with a count above one, and leave the primary key out of the grouping (search excerpt, page not opened)

    Per the search excerpt, a vendor guide: group rows by the columns that should be unique, keep groups with a count above one, and leave out the primary key from the grouping. Practitioner guidance, not a standard. · Checked 2026-10-18

    Found through a web search; the page was not opened (search excerpt, page not opened). Version: Web page, no edition number. Licence terms were not read, so put it in your own words and do not quote it. Open the page and confirm what it says before relying on any detail.

  5. Market practice

    Structured Query Language (SQL) injection prevention cheat sheet (Open Worldwide Application Security Project) ↗ — Open Worldwide Application Security Project (OWASP) · Building a query by pasting user text into it opens the door to injection; use parameters instead (registry entry staged in batch 11)

    Per the search excerpt, parameterized queries are the main defence because the database can tell code from data. Escaping all input is strongly discouraged. Practitioner guidance, not a standard. · Checked 2026-10-18

    Found through a web search; the page was not opened (search excerpt, page not opened). Version: Web page, no edition number. Licence terms were not read, so put it in your own words and do not quote it. Open the page and confirm what it says before relying on any detail.

    V34 review, 6 November 2026: Read complete official repository sheet. Bind values; dynamic SQL structure requires separate safe handling, and object authorisation remains distinct.

  6. Simplified educational illustration

    Payments Signal editorial teaching models — Payments Signal

    This site's own simplified teaching models. · Checked 2026-07-12

    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.

Learn this properly

START HERELooking at data with SQL SELECTA select query only looks and never changes. With a few clauses a tester can find one row, count rows, spot repeats and find rows with no match.Opens at L0 Explain simply · about 14 min

Related briefs

Tom asks the three questions

Tom practises questions on DevOps, shift left and retrospectives. A school year with weekly quizzes shows him why testing early helps, why later testing still counts, and what a retrospective asks.

READ BRIEF

Tom asks where the tests come from

Tom practises questions on the three families of test technique and on white-box coverage. A house check shows him that the family follows the source of the tests, and he learns which one includes the other.

READ BRIEF