table:lcy_test
S_ID C_ID S_NAME
1 100 lcy
1 100 hxin
1 100 lixiang
2 200 lester
2 200 jacky
2 200 rocky
issue:how to get the result like blow:
1 100 lcy,hxin,lixiang
2 200 lester,jacky,rocky
solution:
SELECT s_id,c_id ,
wmsys.wm_concat(s_name) ss
FROM lcy_test group by s_id,c_id;
another reference:http://www.cnblogs.com/adslg/archive/2012/05/10/2493976.html