I have following dataset
Id Title Group
1 title1 A
2 title2 A
3 title3 A
4 title4 A
5 title1 B
6 title2 B
I want query which returns following result
Group Title
A title1, title2, title3, title4
B title1, title2
Is it possible using GROUP BY ?
Use GROUP_CONCAT:
btw you might want to consider renaming your “group” column as that’s a reserved word in MySQL. It will still work but you will need to quote it with backticks every time you use it.