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
How do I view output in sql developer?
What is the difference between nvl function, ifnull function, and isnull function?
what is a primary key? : Sql dba
What is the advantage of nosql?
How can I make sql query run faster?
Mention what does plv msg allows you to do?
How would you pass hints to the sql processor?
What is the difference between sql and mysql?
What is the difference between functions, procedures, and packages in pl/sql?
What is the use of index in hive?
How do we use distinct statement? What is its use?
What is the function that is used to transfer a pl/sql table log to a database table?
What is rownum in sql?
Is sql the best database?
Can we write dml inside a function in sql server?