select (A-B)/(case when C=0 then 1 else C end) as [增长%] from
(
select sum(case when 年月='2003-10' then 企业登记费+外资登记费+个体登记费+合同签证费+广告登记费+商标注册费+市场管理费+个体管理费+IC卡监督费+合同示范文+其他收入+罚没款 else 0 end) A,
sum(case when 年月='2002-10' then 企业登记费+外资登记费+个体登记费+合同签证费+广告登记费+商标注册费+市场管理费+个体管理费+IC卡监督费+合同示范文+其他收入+罚没款 else 0 end)) B,
sum(case when 年月='2002-10' then 企业登记费+外资登记费+个体登记费+合同签证费+广告登记费+商标注册费+市场管理费+个体管理费+IC卡监督费+合同示范文+其他收入+罚没款 else 0 end) C from table group by ....
) T
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货