I currently have some sql that brings back tags. they should have distinct ids, but they don’t…. so my current data is like:
Microsoft | GGG | 1 | 167
Microsoft | GGG | 1 | 2
Microsoft | GGG | 1 | 1
What i would like to do is have only one row come back with the final column concatenated into a delimited list like:
Microsoft | GGG | 1 | 167, 2, 1
I am using mySQL 5 for this.
Use
GROUP_CONCAT()for this, with aGROUP BYcovering the other three columns: