So originally my question was - 'How to prevent duplicates between two columns, using one table?' I tried to check the same query via Command Line and it returned different result. Maybe I need to change the SQL editor? What is the problem here in general and how can I fix it? Thanks in advance!
Query:
SELECT
c1.city,
c1.customerName,
c2.customerName
FROM
customers c1
INNER JOIN
customers c2
ON c1.city = c2.city
AND c1.customerName > c2.customerName
WHERE c1.city = 'Auckland'
ORDER BY
c1.city;
Edit: fixed the tables results