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 user defined functions? : Sql dba
what is primary key? : Sql dba
how many ways we can we find the current date using mysql? : Sql dba
Why we use triggers in mysql?
What is sqlca in powerbuilder?
What is a field in a database?
What are the different types of functions in sql?
What is difference between sql and oracle?
What is on delete set null?
How subquery works in sql?
What are the different types of joins in sql?
What is the difference between join and natural join?
Can %notfound return null after a fetch?
Can there be more than one function with a similar name in a pl/sql block?
What are commit, rollback, and savepoint?