I have a table that looks like this:
id| country | =================== 1 | Argelia | 2 | USA | 3 | China | 4 | Italy | 4 | Italy | 6 | USA | 7 | USA | 1 | Argelia |
I want a query that selects duplicate countries, but only when the ids are different. Thus, from the table above, the query would produce something like:
id| country | =================== 2 | USA | 6 | USA | 7 | USA |
Italy and Argelia are duplicate countries as well but since they shared an id, they shouldn’t be in the output. What can I do?
see it working