STRING_AGG

SELECT 
	STRING_AGG([SubGroup], ', ')
FROM SchemaName.TableName AS tb
GROUP BY tb.GroupName

-- string agg returns a concatinated string of all sub groups within the group
-- value1, value2, value3