Oracle Apps
Pages
Home
SQL
PL/SQL
Search This Blog
Thursday, September 13, 2012
Query for display the first two highest salaries in dept wise
select deptno,sal,ename from emp e
where 2>(select count(d.sal) from emp d where e.deptno=d.deptno and e.sal<d.sal) order by 1,3 desc
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment