另外sum里面怎么还有count,都帮你改了,试试吧
select airportcode as 机场,count(airlinetype) as 航线类型,
sum(case when airlinetype ='国内' then 1 else 0 end) as 国内航线,
sum(case when airlinetype='国际' then 1 else 0 end) as 国际航线,
sum(case when airlinetype='港澳台' then 1 else 0 end) as 港澳台航线
from tp_airline_month group by airportcode
select airportcode as 机场,count(airlinetype) as 航线类型,
sum(case when airlinetype ='国内' then 1 else 0 end) as 国内航线,
sum(case when airlinetype='国际' then 1 else 0 end) as 国际航线,
sum(case when airlinetype='港澳台' then 1 else 0 end) as 港澳台航线
from tp_airline_month group by airportcode
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货