select a,b,
sum(case when c = 10 then c else 0 end) as c_10,
sum(case when c = 11 then c else 0 end) as c_11,
sum(case when c = 12 then c else 0 end) as c_12
from table1
group by a,b
sum(case when c = 10 then c else 0 end) as c_10,
sum(case when c = 11 then c else 0 end) as c_11,
sum(case when c = 12 then c else 0 end) as c_12
from table1
group by a,b
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货