Which pairs of customers from the same city will a SELF JOIN return?

Find every pair of distinct customers who live in the same city. A customer can appear in several pairs if multiple other customers live in that city. Which rows will the query return?

Predict the resultJOIN and row countsJuniorAnalystBackendQA
Input data · iv_customers
idnamecity
1AliceBerlin
2BobParis
3CarolNULL
4DanBerlin
5EveParis

Query

SELECT c1.name AS customer_1,
       c2.name AS customer_2
FROM iv_customers c1
JOIN iv_customers c2 ON c1.city = c2.city
WHERE c1.id < c2.id
ORDER BY c1.id, c2.id