I have a mysql table that looks like this: Col 1 is UNIQUE.
1   value1    value2    0    2
2   value1    value2    1    3
3   value3    value4    3    2
4   value4    value5    4    1
5   value3    value4    3    1
I need a query to select all the rows with distinct column 1 and 2, for example the output I want for this example will look like this:
1   value1    value2    0    2
3   value3    value4    3    2
4   value4    value5    4    1
I need distinct col 1 and 2 but altogether all columns combination will be distinct always. I want to display distinct col 1,2 and 3 without col 2,3 repeating.
I've found a few samples on how to do it but they all select distinct on each column individually. I tried many stackoverflow answers too. But my question is different.
 
     
    