
我会用两个
sums来做不同的事情:
select sum ( case when endOfUse is null and addDate >= '1/1/2014' then 1 else 0 end ) * 100.0 -- if you want the usual 0..100 range for percentages / sum ( case when addDate >= '1/1/2014' then 1 else 0 end ) percentagefrom saxref..AuthCycle
欢迎分享,转载请注明来源:内存溢出
微信扫一扫
支付宝扫一扫
评论列表(0条)