日期:2014-05-17 浏览次数:20531 次
select sum(case when 数字<8 then 1 else 0 end)*1.0/count(*)*100 from tb ------解决方案--------------------
select (select COUNT(id) from tb where ID in(select ID from tb where ID<7))/(select COUNT(id) from tb )