how to check the 3rd max salary from an employee table?
Answer Posted / rutujagabhane
SELECT *
FROM(
SELECT SALARY, DEPARTMENT_ID,EMPLOYEE_ID, DENSE_RANK() OVER (PARTITION BY DEPARTMENT_ID ORDER BY SALARY DESC) AS RN
FROM EMPLOYEES
)
WHERE RN = 2
;
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
Table 1: col1 Timestamp ---------------- 01-mar-2012 11:12:46 Table 2: col2 Timestamp -------------------- 01-mar-2012 11:12:10 01-mar-2012 11:11:23 Write a query to display a row with table2 col2 value less than tabl1 col1 value. Maximum timestamp value previous to table1 col1 value. Display a result as: Col1 col2 ----- ----- 01-mar-2012 11:12:46 01-mar-2012 11:12:10
What is the difference between union and union all command?
How to prepare for oracle pl sql certification?
What are the packages in pl sql?
What is the difference between a subquery and a join?
What does sql stand for?
What are few of the schema objects that are created using PL/SQL?
what is normalization? : Sql dba
What is cold data?
Is sql a dbms?
What are views in sql?
What steps server process has to take to execute an update statement?
What is optimistic concurrency control? : Transact sql
What operating systems are supported by oracle sql developer?
what is a database lock ? : Sql dba