Hi,
I have the following data:
mysql> select Dealername,pc from ford_gb where pc='LE4 7SL';
+-----------------------------+---------+
| Dealername | pc |
+-----------------------------+---------+
| CD Bramall Ford - Leicester | LE4 7SL |
| CD Bramall Ford - Leicester | LE4 7SL |
| CD Bramall Ford - Leicester | LE4 7SL |
+-----------------------------+---------+
Is there a way in a single SQL query to group by Dealername, and have
the postcodes concatenated into a comma-separated list? e.g.
+-----------------------------+----------------------------+
| Dealername | concat_pc |
+-----------------------------+----------------------------+
| CD Bramall Ford - Leicester | LE4 7SL, LE4 7SL, LE4 7SL |
+-----------------------------+----------------------------+
Running MySQL 4.1 on Fedora C3.
Any help appreciated,
Andrew
SQL, Query