In the very early days of Percona Vadim wrote very nice post about GROUP_CONCAT.
But I want to show you a bit more about it.
When is GROUP_CONCAT useful? Usually while working with Support customers I recommend it when you have aggregation of many-to-many info. It makes the view simpler and more beautiful and it doesn’t need much effort to make it work.
Some simple examples:
This is a test table:
CREATE TABLE `group_c` ( `parent_id` int(11) DEFAULT NULL, `child_id` int(11) DEFAULT NULL ) ENGINE=InnoDB; INSERT INTO …[Read more]