May, 2014
   Michael Rikmas, Vadim Tkachenko

MySQL has useful extension to the GROUP BY operation: function GROUP_CONCAT:

GROUP_CONCAT(expr) – This function returns a string result with the concatenated non-NULL values from a group.

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.

In the Percona eBook, "The power of MySQL’s GROUP_CONCAT,” authors Vadim Tkachenko and Michael Rikmas provide real-world examples of GROUP_CONCAT in action.



About the Authors

Michael Rikmas

Michael joined Percona in October 2007. He serves in several roles, including Wikimaster and company schedules administrator. In the latter role, he is involved in assuring Percona's 24x7 support coverage. He was also the organizer of the company's first two annual all-staff meetings. He is working now in Support team as Support Engineer. Prior to joining the company, Michael worked as a consultant on Enterprise Resource Planning and Customer Relationship Management systems. His introduction to computers was in 2000, when he began his university studies. He now has an undergraduate degree in computer sciences, and in 2011 he earned an MBA. Michael was born in Chervonograd, a small city in western Ukraine. He was married on his 25th birthday. He loves his wife and son and tries to spend as much of his free time as possible with them. His hobbies are music and cars.
 

Vadim Tkachenko

Vadim Tkachenko co-founded Percona in 2006 and serves as its Chief Technology Officer. He leads Percona CTO Labs, which focuses on technology research and performance evaluations of Percona and third-party products, designing hardware, filesystems, storage engines, and databases that surpass the standard performance and functionality scenario benchmarks. Under his supervision, Percona has developed and shipped Percona Server for MySQL, Percona XtraBackup, Percona XtraDB Cluster, Percona Server for MongoDB. Vadim’s expertise in LAMP performance and multi-threaded programming help optimize MySQL and InnoDB internals to take full advantage of modern hardware. Oracle Corporation and its predecessors have incorporated Vadim’s source code patches into the mainstream MySQL and InnoDB products. Prior to joining Percona, Vadim served as Performance Engineer at MySQL AB as well as founded a web development company in his native Ukraine. He also spent two years in the High-Performance Group within the official MySQL support team. In addition, Vadim has also co-authored the book High-Performance MySQL: Optimization, Backups, and Replication, 3rd Edition. Vadim received a BS in Economics and an MS in Computer Science from the National Technical University of Ukraine, and lives in North Carolina with his wife and two children.