I have a mysql table that looks like this:
id col2 col3 col4
1 value1 value2 3534
2 value1 value1 8456
3 value1 value2 3566
4 value1 value3 7345
5 value2 value3 6734
What I wanted to do is, select distinct col2+col3 values
id col2 col3 col4
1 value1 value2 3534
2 value1 value1 8456
4 value1 value3 7345
5 value2 value3 6734
I used below query, I get desired result as shown here.
SELECT distinct(CONCAT(col2, col3)) as "dummy column", id, col2, col3, col4
FROM yourtable
GROUP BY CONCAT(col2, col3);
My question is,
As I don't want to display column "dummy column" in output table, how can I hide the same?
This question is related to SO older question