select 'aaa小计',sum(c) from test where a='aaa'
union all
select b,c from test where a='aaa'
union all
select 'bbb小计',sum(c) from test where a='bbb'
union all
select b,c from test where a='bbb'
union all
select 'ccc小计',sum(c) from test where a='ccc'
union all
select b,c from test where a='ccc'
union all
select b,c from test where a='aaa'
union all
select 'bbb小计',sum(c) from test where a='bbb'
union all
select b,c from test where a='bbb'
union all
select 'ccc小计',sum(c) from test where a='ccc'
union all
select b,c from test where a='ccc'
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货