I have a simple table with 2 columns:
Col1 | Col2
-----+-----
1 | 3
1 | 4
2 | 3
2 | 4
... many more rows
I want to return this:
Col1 | Col2
-----+-----
1 | 3
2 | 4
I don't want this:
Col1 | Col2
-----+-----
1 | 3
2 | 3
because 3 is duplicated in Col2, nor this
Col1 | Col2
-----+-----
1 | 3
1 | 4
because 1 is duplicated in Col1, nor this
Col1 | Col2
-----+----
1 | 3
because now 4 is missing in Col2. In other words, I don't want duplicates, but I also don't want to omit any values in col2 (unless it occurs with a duplicate in Col1 - and vice versa). How can I use SQL to do what I want? Thanks.