select field1,field2,stuff(
(select ', '+rtrim(gr.GuessRate)
from table2 as gr
where a.bsid=gr.bsid and a.ByID=gr.ByID
for xml path(''), type).value('text()[1]', 'nvarchar(max)'), 1, 2, '') as Grate
(select ', '+rtrim(gr.GuessRate)
from table2 as gr
where a.bsid=gr.bsid and a.ByID=gr.ByID
for xml path(''), type).value('text()[1]', 'nvarchar(max)'), 1, 2, '') as Grate