how to find nth highest salary

Answer Posted / sunil patel

with cte as (
SELECT DENSE_Rank() OVER(PARTITION BY ecc_dm_id_dep ORDER
BY ecc_gross_simple DESC) AS RowID,
*
FROM emp_curr_company
)
SELECT *
FROM cte
WHERE RowID = 2

Is This Answer Correct ?    2 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is use of dbcc commands?

629


What is key attribute?

514


What is explicit mode in sql server?

536


What is meant by dirty read?

560


How do I find the sql server database version?

534






What is read uncmmited?

583


How to set a database state to offline in ms sql server?

543


Can we use where clause with group by?

522


What are the types of sql server?

521


What are the acid properties?

555


Explain what is the purpose of sql profiler in sql server?

554


What is a sql join?

576


Explain four layers of abstraction microsoft architectured?

124


What is difference between equi join and natural join?

543


What is transaction server consistency?

553