Business Analysis / Learning brief
The second-latest date
In simple terms / 01
What this means in plain language
Nina asks Sam for the second-latest due date and a list of tasks saved twice. Sam breaks each question into two steps. A short story about subqueries and named steps in Structured Query Language (SQL).
Complete lesson / 02
Understand the full idea, step by step
Some questions have two steps hidden inside them.
This brief follows an analyst who is asked for the second-latest date and for tasks saved twice, and who answers each by breaking it in two.
What matters is writing the steps in plain words first, then in Structured Query Language (SQL).
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.
Subqueries and common table expressions as taught in this academy. The app, the data and the people are invented.
What this brief simplifies: Fiction labelled SYNTHETIC / TRAINING ONLY. Real tables hold millions of rows and need a look at the query plan.
Sources for this brief — 3 sources
- Market practice
WITH Queries (Common Table Expressions) (PostgreSQL documentation) ↗ — PostgreSQL Global Development Group · WITH Queries (Common Table Expressions) (PostgreSQL documentation): WITH gives auxiliary statements for a larger query, with MATERIALIZED and NOT MATERIALIZED options (search excerpt, page not opened)
PostgreSQL18 publisher documentation opened on6November2026: §7.8 WITH, materialization, recursion and cycle detection. No execution on PostgreSQL is claimed; engine-specific examples remain scoped to18.
- Market practice
Subquery Expressions (PostgreSQL documentation) ↗ — PostgreSQL Global Development Group · Subquery Expressions (PostgreSQL documentation): EXISTS, IN and ANY, and the rule that IN can give null and not false (search excerpt, page not opened)
PostgreSQL18 publisher documentation opened on6November2026: §9.24 EXISTS/IN/NOT IN NULL semantics. No execution on PostgreSQL is claimed; engine-specific examples remain scoped to18.
- 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.