Query for second maximum salary in each in each department
Answer Posted / gopinath
select department_id, salary from
(select department_id, salary, rank() over(partition by
department_id order by salary desc) r from employees) where r=2;
cheers;
Is This Answer Correct ? | 35 Yes | 13 No |
Post New Answer View All Answers
What is dba in sql? : SQL DBA
What are all the ddl commands?
List the different type of joins?
What is online transaction processing (oltp)?
What has stored procedures in sql?
What sql does db2 use?
How to handle bulk data?
what are the advantages of sql ? : Sql dba
What is the difference between in and between in sql?
What are the events on which a database trigger can be based?
How to fix oracle error ora-00942: table or view does not exist
What are the subsets of sql?
Why select is used in sql?
What is sql and its types?
What is %rowtype in pl sql?