我的查询是:
select
gp.GroupName+ '' As GroupName,
us.UnitsName+'' As Unitname,
sp.Sensorname+',' As sensorName
from Grouping as gp
inner join Units as us
on gp.UnitsID = us.UnitsID
inner join Sensors as sp
on gp.SensorID = sp.SensorID
输出是
GroupName Unitname sensorName
G1 Electricity S1,
G1 Electricity S3,
G2 Gas test,
但输出应该看起来像
G1 Electricity S1,S3
G2 Gas test
如何得到它?