write query for fourth maximum salary from employee table
Answer Posted / santhosh
;with result as
(
--use dense_rank instead of row_number or rank
select salary, DENSE_RANK() over (order by salary desc) as denserank
from Employees
)
select top 1 * from result
where denserank = 4
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
Delete duplicate rows without using rowid.
What is report server project?
What is 1nf 2nf and 3nf?
What is a group function explain with an example?
Explain the phases a transaction has to undergo?
Explain the dbcc pintable command when would you use it?
How to update values in a table with update statements in ms sql server?
What are trace flags?
How to delete an existing database user?
Are all views updatable ?
What is the default schema of your login session in ms sql server?
Do you know what are acid properties of transaction?
What are user-defined functions (udfs) in sql server?
Explain “row_number()” in sql server with an example?
What is the current pricing model of SQL Azure?