adspace
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
Do we need to rebuild index after truncate?
what is collation? : Sql dba
Is primary key always clustered index?
Is primary key clustered index?
Is inner join faster than left join?
If a cursor is open, how can we find in a pl/sql block?
how to start mysql server? : Sql dba
Can we use distinct and group by together?
What is your daily office routine?
Can we rollback truncate?
how to use regular expression in pattern match conditions? : Sql dba
How do I remove duplicates in two columns?
define sql insert statement ? : Sql dba
how to escape special characters in sql statements? : Sql dba
What is the best sql course?