All practice problems Bug of the Day: a new problem every midnight, free for everyone. Keep a streak with your friends.
Data Engineering · SQL · Intermediate
SQL interview question: Out of Order
What is the latest tracking status of order 5244? The app is sure about the status. The app is wrong.
The problem
- What is the latest tracking status of order 5244?
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
Is the highest event_id really the latest event?
What this teaches (spoiler)
Order events by event time, never by insert order or auto-increment IDs: late data is normal.