Business Analysis / Learning brief

The rank that skipped two

What this means in plain language

Tom spots a missing rank in a Daily List report and Nina asks for the soonest task per user. Sam shows that ties decide which ranking function is right. A short story about ranking in Structured Query Language (SQL).

Understand the full idea, step by step

A rank looks simple until two things tie.

This brief follows a tester who finds a gap in a ranking and an analyst who explains that the gap was the rule at work.

What matters is deciding what a tie should do before the first query is written. A rank is a rule about order, and every rule needs an answer for the case where two rows are equal.

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.

Window functions and ranking as taught in this academy. The app, the data and the people are invented.

What this brief simplifies: Fiction labelled SYNTHETIC / TRAINING ONLY. Real reports have more columns and many more rows.

Sources for this brief — 3 sources
  1. Market practice

    Window Functions (PostgreSQL function reference) ↗ — PostgreSQL Global Development Group · Window Functions (PostgreSQL function reference): row_number, rank with gaps and dense_rank without gaps (search excerpt, page not opened)

    §9.22 rank, ROW_NUMBER bigint, LAG/LEAD. PostgreSQL18 implementation, not a universal SQL mandate. · Checked 2026-11-06

    PostgreSQL18 publisher documentation opened on6November2026: §9.22 rank, ROW_NUMBER bigint, LAG/LEAD. No execution on PostgreSQL is claimed; engine-specific examples remain scoped to18.

  2. Market practice

    Window Functions (PostgreSQL tutorial) ↗ — PostgreSQL Global Development Group · Window Functions (PostgreSQL tutorial): a window function keeps every row; PARTITION BY; window functions cannot be used in WHERE (search excerpt, page not opened)

    §3.5 window placement, partition/order/frame. PostgreSQL18 implementation, not a universal SQL mandate. · Checked 2026-11-06

    PostgreSQL18 publisher documentation opened on6November2026: §3.5 window placement, partition/order/frame. No execution on PostgreSQL is claimed; engine-specific examples remain scoped to18.

  3. 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 HERESQL for BAs: window functions and rankingRank rows inside groups, pick the top row per group, and decide in advance how ties are treated, using ROW_NUMBER, RANK and DENSE_RANK.Opens at L0 Explain simply · about 15 min

Related briefs

The word that meant two things

Two teams use the word member and write tests that do not match. Sam draws the ideas on one page and finds the clash. A short story about concept models and a shared vocabulary.

READ BRIEF

The review that moved by two days

Leo falls ill and a review moves by two days. Sam must decide what to tell Nina. A short story about tracking, a calm response to a slip and one small improvement.

READ BRIEF

The two documents that both said done

Two Daily List documents use the word done in two ways. Sam asks an artificial intelligence (AI) tool to quote the clash, ranks the findings by risk and learns why a quiet result is not proof.

READ BRIEF