This is the same answer as I am here: https://dba.stackexchange.com/questions/125771/multiple-column-concatenation/
The OP of this question refers to the answer given here. You can see below that sometimes the simplest answer may be the best. If SomeTable are multiple tables, I would go ahead and put it in the CTE to avoid the same complex code several times.
I did some tests using a little over 6 million lines. With an index in the ID column.
Here is what I came up with.
Your initial request:
SELECT * FROM ( SELECT t.id, stuff([M].query('/name').value('/', 'varchar(max)'),1,1,'') AS [SomeField_Combined1], stuff([M].query('/car').value('/', 'varchar(max)'),1,1,'') AS [SomeField_Combined2] FROM dbo.test t OUTER APPLY(SELECT ( SELECT id, ','+name AS name ,','+car AS car FROM test WHERE test.id=t.id FOR XML PATH('') ,type) AS M) M ) S GROUP BY id, SomeField_Combined1, SomeField_Combined2
This went on for about 23 minutes.
I launched this version, the version of which I first found out. In a way, it seems like it will take longer, but it is not.
SELECT test.id, STUFF((SELECT ', ' + name FROM test ThisTable WHERE test.id = ThisTable.id FOR XML PATH ('')),1,2,'') AS ConcatenatedSomeField, STUFF((SELECT ', ' + car FROM test ThisTable WHERE test.id = ThisTable.id FOR XML PATH ('')),1,2,'') AS ConcatenatedSomeField2 FROM test GROUP BY id
This version earned a little over 2 minutes.