Pairs of Customers in the Same Country (Self-Join)

easy
Checkpoint challenge
Solve this to show you know the material and jump straight to Unit 9. Everything before it counts as cleared.

Return every pair of different customers from the same country: customer_a, customer_b and country. List each pair once, with customer_a being the one with the lower id. Sort by country, then customer_a, then customer_b.

Schema

customers(id, name, country, signup_date)
orders(id, customer_id, order_date, total)
#self-join#joins1 visible + 2 hidden tests
query.sql · SQLite
Loading editor…
Run your code to see results. ⌘↵ to run · ⌘⇧↵ to submit
Pairs of Customers in the Same Country (Self-Join) · TechGradify