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
What are functions in sql?
Why do we create views in sql?
Is vs as in pl sql?
Is pl sql a scripting language?
What is the usage of when clause in trigger?
What are sql functions? Describe the different types of sql functions?
What are the types of operators available in sql?
What is the difference between microsoft access and sql server?
What is sql query optimization?
What are the uses of sysdate and user keywords?
Is join an inner join?
What are sql triggers used for?
What is the difference between view and stored procedure?
Can we enter data in a table in design view?
What do you mean by field in sql?