Consider table 1:
ID Name
----- -----
1 Tim
2 Bea
3 Jen
Consider table 2 where ID is a reference to ID in table 1:
ID Computer
----- --------
1 HP
1 Sun
1 IBM
2 Dell
2 Apple
3 Sun
3 IBM
Now I would like to return the following using only SQL:
ID Computer
----- --------
1 HP,Sun,IBM
2 Dell,Apple
3 Sun,IBM
I have tried distinct(ID) and concat_ws(Computer), but as I though that doesn't work. Any ideas?