Chapter 5 · JOINs
13. Orders with Payment and Shipping Status
Medium20 XPE-Commerce
The operations team needs a unified view of each order's payment and shipping status. For each order, show the order id, order_date, total_amount, payment method, payment status, shipping carrier, and shipping status. Include orders even if they have no shipping record yet. Sort by order_date, newest first.
Tables
- PKidINT
- FKcustomer_id→ customers.idINT
- order_dateTEXT
- statusTEXT
- total_amountREAL
- PKidINT
- FKorder_id→ orders.idINT
- payment_dateTEXT
- amountREAL
- methodTEXT
- statusTEXT
- 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.