SQLQuokka
Start practicing
QuestionsLearnSandboxFeaturesRoadmapFAQ

Amazon: Late Shipments Audit

Unsolved

Amazon logistics monitors on-time delivery guarantees. Write a SQL query to find all orders delivered after their promised date. For each late order, report `order_id`, `customer_id`, `promised_date`, `delivered_date`, and `days_late` (calculated as delivery date minus promised date). Exclude orders that have not yet been delivered (`delivered_date` is NULL). Sort the results by `days_late` descending, then by `order_id` ascending.

SQL Query Editor (Ctrl+Enter to run)
0 characters · Valid
Canonical Solution Official

Official Solution is Hidden

Try solving the question with the schema explorer and hints first. When ready, reveal the verified canonical query and step-by-step logic breakdown.

Community Q&A & Discussion

Ask questions, share alternate queries, and explore solutions

0 comments
Asked By:
🏢 Amazon

Submission History

Your recent query executions and answer checks

Execution Pipeline:
FROM orders
Full source dataset
10 rows total
Ready. Type a query to see live execution.
Clause: Auto-Sync · AlaSQL Engine