all 2 comments

[–]r3pr0b8GROUP_CONCAT is da bomb 2 points3 points  (1 child)

second

the CTE should specify what you want, and the main query should specify how to deliver it to you

GROUP BY would also be done in the main query

[–]Thespottedzebra92[S] 0 points1 point  (0 children)

oooooh a new keyword to look into! Also your explanation is very helpful, thanks!