How to get all the values in a for each loop using group by on a specific column

Have a Look Here for Different approaches grouping Data