Chapter 6 · Subqueries
10. Customers Who Have Never Placed an Order
Medium20 XPE-Commerce
Marketing wants to re-engage dormant users. Find all customers who have never placed an order. Return their first_name, last_name, and email. Sort by last_name, first_name.
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.