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
What are sql injection vulnerabilities?
what is csv? : Sql dba
What is the purpose of my sql?
Why do we go for stored procedures?
Write an sql query to select all records from the table?
What is the difference between function and procedure in pl/sql?
How to change a value of the field ‘salary’ as 7500 for an employee_name ‘john’ in a table employee_details?
What is oracle pl sql developer?
What are crud methods?
Are stored procedures compiled?
Are sql database names case sensitive?
What is cross join sql?
define sql insert statement ? : Sql dba
what is row? : Sql dba
How do I turn a list into a table?