Is it possible to group by one column such that another column produces comma separated list. As another wrote somewhere else
The original data
ID ReportId Email
1 1 a@a.com
2 2 b@b.com
3 1 c@c.com
4 3 d@d.com
5 3 e@e.com
I want to group by ReportId, but all the email should be comma separated. So the result should be:
ReportId Email
1 a@a.com, c@c.com
2 b@b.com
3 d@d.com, e@e.com