Everyone writes the join and the ratio. Then the result comes back dominated by people who bought one thing and sent it back, and the list is useless to the person who asked for it.
Find the customers whose return rate exceeded 30% last quarter.
Everyone writes the join and the ratio. Then the result comes back dominated by people who bought one thing and sent it back, and the list is useless to the person who asked for it.
Updated Aug 2026 · Grounded in real Forward Deployed Engineer interview loops and written to a senior-engineer editorial bar.
The SQL is not the test. Three decisions inside the question change the answer completely and none of them are stated: whether the rate is by order count or by value, whether a return is attributed to the quarter of the order or the quarter of the return, and what to do about tiny denominators. The last one is what makes the output usable, because without a minimum-order threshold the top of the list is entirely customers with two orders and one return, which is noise that looks like a finding.
No comments yet — be the first to share your approach.
