tdh xx xl gzf zqf
cosu 20GP 4 10 15
cosu 40GP 4 10 15
PASU 20OT 1 1 1
返回结果为
tdh zxl gzf zqf
cosu 20GP4 40GP4 20 30
PASU 20OT*1 1 1
相同tdh 值都为 cosu xx xl两字段合并为zxl 两个字段相加得到 20GP4 40GP4
gzf 字段值相加 zqf字段值想加
求大神指点!
select tdh,group_concat(concat(xx,xl)) as zxl,sum(gzf) as gzf,sum(zqf) as zqf from test group by tdh