日期:2014-05-18 浏览次数:20441 次
select hfnr_sjwj,sum( case when hfnr_khmyd='满意' then 3 when hfnr_khmyd='基本满意' then 2 when hfnr_khmyd='一般' then 1 when hfnr_khmyd='不满意' then 0 end else -1 end)as 客户满意度 from cc_hfnr group by hfnr_sjwj
------解决方案--------------------
select hfnr_sjwj, sum( case when hfnr_khmyd='满意' then 3 when hfnr_khmyd='基本满意' then 2 when hfnr_khmyd='一般' then 1 when hfnr_khmyd='不满意' then 0 else -1 end) as 客户满意度 from cc_hfnr group by hfnr_sjwj