Query for second maximum salary in each in each department
Answer Posted / ram
SELECT empno,salary,dept_id FROM (SELECT empno,salary,dept_id,DENSE_RANK() OVER (PARTITION BY Dept_id ORDER BY Salary DESC)
as Rnk FROM emp) WHERE Rnk = 2;
| Is This Answer Correct ? | 8 Yes | 0 No |
Post New Answer View All Answers
Which is better trigger or stored procedure?
What is trigger in pl sql with examples?
what tools available for managing mysql server? : Sql dba
Why plvtab is considered as the easiest way to access the pl/sql table?
Is join same as left join?
what is cursor and its type, what is ref cursor write a syntax to pass ref cursor into procedure out fucntion and call the procedure
What action do you have to perform before retrieving data from the next result set of a stored procedure ?
Why we use cross join?
What are local and global variables and their differences?
what is single byte over head in oracle..?
What is the difference between left join and right join?
what is a view? : Sql dba
What is primary key and foreign key?
Mention what plvcmt and plvrb does in pl/sql?
What is sql in java?