My query is:
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
The output is
GroupName Unitname sensorName
G1 Electricity S1,
G1 Electricity S3,
G2 Gas test,
But the output should look like
G1 Electricity S1,S3
G2 Gas test
How to get that?