sqlEASYSQL
Find duplicate checkout transactions
Easy SQL arena: GROUP BY, HAVING, tie-safe ordering, and read-only analysis
XP reward
90
Coins
8
Target time
12m
Payments noticed duplicate checkout events after a retry storm. You need a query that highlights affected users without mutating production data.
Learning objective
Learn to apply GROUP BY, HAVING, tie-safe ordering, and read-only analysis in an analytics warehouse while explaining the invariant, safety constraints, and hidden edge cases.
Mission order
Return `user_id` and `duplicate_count` for users with more than one checkout transaction. Use grouping and deterministic ordering.Visible checks
returns read-only result set
Expected: no mutation statements
uses deterministic ordering
Expected: stable review output
Clear requirements
- Demonstrates GROUP BY, HAVING, tie-safe ordering, and read-only analysis
- Handles the visible sample and hidden edge cases
- Keeps output deterministic and explainable
- Stays read-only
Secure validation contract
Judge type
SQL
Complexity target
Readable single-pass aggregate or join
SQL schema
transactions(id, user_id, order_id, status, amount_cents, created_at).
Workspace
SQL query console
sqlsafe mock judge
Charging editor core
Test Results
Run the visible checks when your first pass is ready.
Clear Protocol
1Read the scenario and restate the expected output shape.
2Run visible checks before chasing hidden edge cases.
3Use Genie for one nudge if stuck, then explain the invariant.
4Submit only when the result is deterministic and safe.
Rewards
XP
90
Coins
8
Mission Route
Hints
Hints are metered and logged for No Hint Hero runs.
Genie Mentor Core
Hint protocol / contextual guardrails active
Progressive hints
Failed-test aware
Solution guarded
Mission: sql-easy-duplicate-transactions0 attempts0 failed tests0 hints used
Progressive hint depth
Genie: Genie online. I use your mission, attempts, failed tests, hints, and path context to coach the next rep without dumping answers first.