Software Testing / Learning brief

Lily's query counts every reminder twice

What this means in plain language

An assistant's query runs without error but doubles a total. Tom tests it on a tiny sample he counted by hand, finds a join that repeats rows, and tests a time pattern with a long input.

Understand the full idea, step by step

A calculator always gives an answer. Press the wrong key and you still get a number. It does not warn you, and the number looks as sure as any other.

So you test it on sums you already know, like two plus two, before you trust it with a bill. Tom plans to treat an assistant's query the same way. He will not ask whether it runs. He will ask whether it is right.

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.

General teaching about checking assistant-written queries, text patterns and small scripts. Historical research excerpts remain scoped to their original tools and dates. Selected SQLite count documentation was later opened and the fictional join example checked separately. No assistant brand or universal database guarantee is claimed.

What this brief simplifies: Fiction labelled SYNTHETIC / TRAINING ONLY. Historical regex and reporting-tool excerpts retain their access limits. Selected SQLite count rules were checked against the publisher documentation; the seven-versus-five example is a separate classroom fixture. The recipe still needs checking on your own material.

Sources for this brief — 10 sources
  1. Market practice

    Fan-out resolution (Holistics documentation) ↗ — Holistics · When a one-to-many join runs before a sum or count, the single side is repeated and the total counts the copies, which gives a wrong number with no error (search excerpt, page not opened)

    Documentation for one reporting product, used only for the plain description of how a join can repeat rows. · 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; read at the time of writing. 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.

  2. Market practice

    Understanding Regular Expression Denial of Service (ReDoS): Insights from Regexes Written by Language Models and Developer Forums (International Conference on Program Comprehension, 2024) ↗ — Institute of Electrical and Electronics Engineers (IEEE) and Association for Computing Machinery (ACM), International Conference on Program Comprehension · Regular expressions written by language models were tested for being correct and for being open to denial of service; the generated ones mainly showed a slow, polynomial kind of weakness (search excerpt, page not opened)

    A research paper on the models tested then. Newer tools may differ. · 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; read at the time of writing. 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

    Re(gEx|DoS)Eval: Evaluating Generated Regular Expressions and their Proneness to DoS (ICSE 2024) ↗ — International Conference on Software Engineering (ICSE) · A benchmark of real user regular-expression requests scores generated patterns on whether they work and on whether they are open to denial of service (search excerpt, page not opened)

    A short research paper that proposes a way to score generated patterns. It is not advice for a team. · 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; read at the time of writing. 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

    Test::Regexp (Perl module documentation) ↗ — MetaCPAN · It is important to test which strings do not match a regular expression as well as which do (search excerpt, page not opened)

    Documentation for one test module in one language, used for the general habit of testing non-matches. · 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; read at the time of writing. 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

    PostgreSQL documentation ↗ — The PostgreSQL Global Development Group · The reference for SELECT, JOIN, GROUP BY and aggregate functions, with the exact rules for how joins combine rows (registry source, general description, page not opened in this batch)

    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.

  6. Market practice

    Regular Expression HOWTO (Python documentation) ↗ — Python · Explains how regular-expression patterns are built, including quantifiers, groups and anchors (registry source, general description, page not opened in this batch)

    Explains greedy matching and backtracking, and the difference between search and match, in Python's re module. Practitioner or vendor guidance, not a standard unless stated. · 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.

  7. Market practice

    Open Worldwide Application Security Project cheat sheet series: input validation ↗ — Open Worldwide Application Security Project (OWASP) · Advice on checking input, including with regular expressions (registry source, general description, page not opened in this batch)

    The Open Worldwide Application Security Project's cheat sheet on input validation. Cited for three points: check both the syntax and the meaning of a value, reject invalid input with a clear error, and check data again where it crosses a trust boundary. · Checked 2026-10-18

    Search excerpt, page not opened: returned by WebSearch on 2026-10-18. The excerpts did not use the phrase as early as possible in the data flow, so this site does not quote it. It is guidance for software in general, not for payments.

    V34 review, 6 November 2026: Read complete official repository sheet. Syntax, semantic business rules, server checks and safe handling of legitimate Unicode/punctuation have distinct roles.

  8. Market practice

    Date and Time on the Internet: Timestamps (Request for Comments 3339) ↗ — IETF · Describes the internet timestamp format, which writes a date, a time and an offset from universal time (registry source, general description, page not opened in this batch)

    Per the search excerpt, a Proposed Standard from July 2002 that profiles International Organization for Standardization (ISO) 8601 for timestamps. Each time has a stated offset from Coordinated Universal Time, the suffix Z means offset zero, and it recommends UTC because local zone rules can change. · Checked 2026-10-18

    Found through a web search; the page was not opened (search excerpt, page not opened). Version: Request for Comments (RFC) 3339, July 2002. 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.

  9. 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.

  10. Implementation-specific

    SQLite aggregate functions ↗ — SQLite project · SQLite rolling publisher aggregate-functions documentation §§1–3, especially count(X), count(*) and DISTINCT; opened7November2026. Synthetic7-versus5 classroom result separately executed, not a universal SQL or generated-helper guarantee.

    Selected AI-assisted testing teaching claims only; see scoped evidence notes. · Checked 2026-11-07

    §§1–3 incl count(X)/count(*) read7November2026. Actual classroom SQL re-executed separately; SQLite behaviour, not all-database promise.

Learn this properly

START HERESQL, regex and small parsing helpers written by AIA recipe for having an assistant write a database query, a text pattern or a small script, then proving it on a hand-checked sample, row counts and a long input before you use it.Opens at L0 Explain simply · about 17 min

Also covered in Looking at data with SQL SELECT.

Related briefs

Tom counts the calls for every team

Daily List offers a free month to some users. Tom checks it like a league checks a referee: split the results by group, count, and compare. He finds a gap that one accuracy number had hidden.

READ BRIEF

Every column of a test case, in plain words

Tom finds three test sheets with three sets of columns. Mei asks for one table that says what every column means. It splits the columns into those written before a run and those filled in during it, with six use cases and eleven sample cases for Daily List.

READ BRIEF