i need department wise top 2 employees salary.which logic
i will use
Answer Posted / ramya p
select deptno, max(sal) from (select * from emp order by
sal desc)
where rownum < 3
group by deptno
order by max(sal) desc;
Is This Answer Correct ? | 5 Yes | 12 No |
Post New Answer View All Answers
Which join condition can be specified using on clause?
Why do we need cursors in pl sql?
What does partition by mean in sql?
What is a .db file?
How many aggregate functions are available there in sql?
How do I count rows in sql query?
How many primary keys can a table have?
What is sql constant?
Why function is used in sql?
What is insert command in sql?
What sql does db2 use?
List out the acid properties and explain?
Is not equal in sql?
What are the benefits of pl/sql packages?
What are different methods to trace the pl/sql code?