Runtyme
All practice problems

Data Engineering · SQL · Warm-up

SQL interview question: Last Seen

Where was shipment 7731 last scanned? Every box gets scanned. So where was it scanned last?

The problem

  • Where was shipment 7731 last scanned?

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

Solve it free in your browser3–6 min · You write SQL
Show a hint

The starter query sorts by scan_id. Is the highest scan_id really the latest scan?

What this teaches (spoiler)

Order events by when they happened (event time), never by insert order or auto-increment IDs — late-arriving data is normal in pipelines.

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