sql,求表结构如图1,查询结果如图2
idname1anamecorestr1b 1 abc1c 2 ab2a 3 a2b3a
select id,replace(wm_concat(name),',','') as namesfrom tablegroup by id