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
How to read/write files from pl/sql?
How to run sql statements with oracle sql developer?
How to place comments in pl/sql?
What are sql injection vulnerabilities?
What is the function that is used to transfer a pl/sql table log to a database table?
How can you load multi line records? : aql loader
How to pipe multiline string to isql?
What is primary key sql?
what is offset-fetch filter in tsql? : Transact sql
What is java sql driver?
How do I trace sql profiler?
what are the advantages of mysql in comparison to oracle? : Sql dba
When is the update_statistics command used?
what are the types of subquery? : Sql dba
What is the current version of sql?