oracle中如何求百分比?
select a.wh,a.age,a.count1,round((a.count1/b.count2),2)*100||'%'from(select wh ,avg(age) age , count(wh) count1 from employee group by wh) a,(select count(*) count2 from employee) b這樣試試
oracle中如何求百分比?
select a.wh,a.age,a.count1,round((a.count1/b.count2),2)*100||'%'from(select wh ,avg(age) age , count(wh) count1 from employee group by wh) a,(select count(*) count2 from employee) b這樣試試