Chapter 5 · JOINs
01. Order Details with Customer Name
Easy10 XPE-Commerce
Customer service needs an order report that includes customer names. Write a query that returns the order id, order_date, total_amount, and the customer's full name (first_name || ' ' || last_name) for every order.
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.