Chapter 5 · JOINs
04. Orders with Customer Names
Easy10 XPE-Commerce
The customer service team needs an order list that includes customer names. Join orders with customers to show the order id, order_date, total_amount, and the customer's first and last name. Sort by order_date descending.
Tables
- PKidINT
- first_nameTEXT
- last_nameTEXT
- emailTEXT
- phoneTEXT
- cityTEXT
- stateTEXT
- countryTEXT
- created_atTIMESTAMP
- PKidINT
- FKcustomer_id→ customers.idINT
- order_dateTEXT
- statusTEXT
- total_amountREAL
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.