I have an order table like below where each order record for each group is placed on a row. Now I'd like to make this compact and aggregate the data by group by puting all the orders for one group in one cell and separated by "," (The resulted table is below the original table).
Could you please tell me how to realize this in SQL?
Thanks a lot!
Here is the original table:
Group Order
1 a
1 b
1 c
2 d
2 e
3 f
Here is the converted and compact table:
Group Orders
1 a,b,c
2 d,e
3 f