Runtyme
All practice problems

Data Engineering · SQL · Hard

SQL interview question: Who Signed Off

Which staff member gave the FINAL approval on the most ghost refunds? Every refund needs an approval. Some got approved twice.

The problem

  • Which staff member gave the FINAL approval on the most ghost refunds?

You'll use: SQL (SQLite) · SELECT & WHERE · JOIN · GROUP BY · TRIM & datetime() · Data cleaning

Solve it (expert level)3–6 min · You write SQL
Show a hint

Some refunds have more than one approval row: a first approval, then a final one after edits.

What this teaches (spoiler)

When a table holds a history of events, decide which event the question is about. Window functions like ROW_NUMBER() pick the latest (or first) row per group cleanly.

Bug of the Day: a new problem every midnight, free for everyone. Keep a streak with your friends.