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
what is 'mysqlimport'? : Sql dba
What are procedures used for?
What is java sql connection?
What is varchar sql?
how to select unique records from a table? : Sql dba
What is denormalization in a database?
What are the ways on commenting in a pl/sql code?
What are the different sql languages?
How to get help at the sql prompt?
Why do we use sql constraints? Which constraints we can use while creating database in sql?
i have a column which may contain this kind of value: 123*67_80,12*8889_5,34*8_874 ,12*7_7 (can contain space before a comma, and this string length can be anything) now i want to split this value into two column like: column1: 123*67,12*8889,34*8,12*7 column2: 80,5,874,7 use function for this
What is pivot in sql?
How do I filter in sql profiler?
What pl/sql package consists of?
When do we use triggers?