Chapter 5 · JOINs
19. Orders with Shipping Delays
Medium20 XPE-Commerce
Find orders where shipping took longer than 3 days (from order_date to shipping_date). Return the order id, order_date, shipping_date, and the number of days to ship as days_to_ship. Sort by delay descending.
Tables
- PKidINT
- FKcustomer_id→ customers.idINT
- order_dateTEXT
- statusTEXT
- total_amountREAL
- PKidINT
- FKorder_id→ orders.idINT
- shipping_dateTEXT
- delivery_dateTEXT
- carrierTEXT
- tracking_numberTEXT
- statusTEXT
Need help?
Ask Sol
AI tutor — looks at your current query and nudges you, without spoiling the answer.
Solution
Try the hints first — solving it yourself is what makes it stick.