how to find nth highest salary

Answer Posted / vishal patel

with cte as (
SELECT ROW_NUMBER() 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 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are the two modes of authentication in sql server?

522


What is coalesce and check constraint in sql server?

547


What is difference between stored procedure and user defined function?

549


What is dknf in normalization form?

555


How to create a trigger for insert only?

601






How to query multiple tables jointly?

560


Which tcp/ip port does the sql server run on? How can it be changed?

527


Explain rdbms?

603


List all types of constraints in sql server?

516


How is SQL Azure different than SQL server?

91


Explain primary key?

548


How do you maintain database integrity where deletions from one table will automatically cause deletions in another table?

711


What are sp_configure commands and set commands?

564


Why use “nolock” in sql server?

560


how you can move data or databases between servers and databases in sql server? : Sql server administration

485