Query for second maximum salary in each in each department
Answer Posted / sureshramsing
select * from(select row_number() over(partition by deptno order by sal desc) rn,a.* from emp a) where rn=1;
| Is This Answer Correct ? | 0 Yes | 1 No |
Post New Answer View All Answers
Is there a way to automate sql execution from the command-line, batch job or shell script?
How do you use a while loop in pl sql?
why does the selected column have to be in the group by clause or part of an aggregate function? : Sql dba
Is inner join faster than left join?
What is $$ in sql?
Can you selectively load only those records that you need? : aql loader
What is cursor explain with example?
How do you update a value in sql?
Is there a 64 bit version of ssms?
What are the different parts of a package?
What is materialized view in sql?
how can we destroy the session, how can we unset the variable of a session? : Sql dba
who introduced sql?
How many indexes can be created on a table in sql?
how to use 'mysql' to run sql statements? : Sql dba