Problem Statement
Why should you include a tiebreaker column in the ORDER BY of window functions?
Explanation
If two rows share the same sort key, the engine may return them in any order. Adding a stable tiebreaker like id keeps rankings and running totals deterministic.
This prevents odd jumps in running metrics and inconsistent test results.
Code Solution
SolutionRead Only
ROW_NUMBER() OVER (ORDER BY created_at DESC, id DESC) AS rn
