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 logon trigger?

546


What is the temp table?

543


How to compose an inquiry to demonstrate the points of interest of an understudy from students table whose name begins with k?

672


How to encrypt Strored Procedure in SQL SERVER?

556


What is snapshot report?

129






What are extended events in sql server?

508


Differentiate between SQL and ORACLE joins and write their syntax.

589


Name some of the open source software that you can use in alternative to SSR?

105


What is cte (common table expression)?

596


What is the meaning of resultset type_scroll_insensitive?

565


Is it possible to import data directly from t-sql commands without using sql server integration services? If so, what are the commands?

855


Explain about link server in sql server?

533


What is the difference between varchar and varchar(max) datatypes?

555


What are the requirements on sql server network connections?

523


What are key constraints?

515