日期:2014-05-17 浏览次数:20779 次
select sum(decode(s.grade, 1, 1)) 等级一, sum(decode(s.grade, 2, 1)) 等级二, sum(decode(s.grade, 3, 1)) 等级三, sum(decode(s.grade, 4, 1)) 等级四, sum(decode(s.grade, 5, 1)) 等级五 from emp e, salgrade s where e.sal >= losal and e.sal <= hisal; 等级一 等级二 等级三 等级四 等级五 ---------- ---------- ---------- ---------- ---------- 3 3 2 5 1