【WM_CONCA()】分组逗号拼接字段,(WM_CONCAT(要拼接的字段名),分组不要把拼接的字段分组)
表名 test
one | two | three |
100.01 | A | A1 |
200 | A | A2 |
select sum(one) as one,two,WM_CONCA(three) as three fromtest group by two;
结果
one | two | three |
300.01 | A | A1,A2 |