I am running MySQL 5 and have a SQL query question...
I have a table with data and structure like this:
Col_1 Col_2
1 black
2 red
2 blue
2 pink
3 white
3 purple
3 gray
3 peach
4 orange
5 off white
5 gold
I'd like to concatenate the rows by id and separate Col_2 with commas for a result like this.
Col_1 Col_2
1 black
2 red, blue, pink
3 white, purple, gray, peach
4 orange
5 off white, gold
Can someone help me with the query or function to make this happen?
Thanks,
Angel



