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 one is better sql or oracle?
What is sql*loader?
How to pronounce postgresql?
What is ttitle and btitle?
Can a view be mutating? If yes, then how?
what is 'trigger' in sql? : Sql dba
What is not equal in sql?
How to return an array from java to pl/sql?
What is the use of prepared statement?
which types of join is used in sql widely? : Sql dba
What are analytic functions in sql?
Why triggers are used?
Explain the advantages and disadvantages of stored procedure?
What is sqlexception in java?
what is collation? : Sql dba