Customers who never ordered

easySQL~10 min · 4 tests · bitshop

Marketing wants to email everyone who signed up but never bought anything.

A customer has ordered if there is at least one row in orders with their customer_id, whatever its status. A cancelled order still counts as an order: that person tried to buy.

Return one row per customer with no orders:

column type meaning
customer_id integer the customer
name text their name
country text their country code

Row order doesn’t matter.

Tables: customers, orders.

Learn the ideaRead the lesson →
solution.sqlDuckDB · bitshop

Press ⌘ ↵ or Run to check the visible tests. Submit runs the hidden ones too. Everything runs in your browser.

⌘ ↵ to run