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
as a general practice, it is recommended to have dbo be the owner of all database objects however, in your database you find number of tables owned by a user other than dbo, how could you fix this? : Sql server administration
How to use subqueries with the in operators in ms sql server?
Explain cross join or cartesian product in sql?
What is a view and what are its advantages?
What are secondary xml indexes?
What is 2nf in normalization?
How to delete duplicate rows from table except one?
Where are full-text indexes stored?
When would you use the stored procedures or functions?
What is the difference between TRUNCATE and DROP?
Is the order of columns in the set clause important in ms sql server?
What is query cost in sql server?
What is compound operators?
What is meant by Active-Passive and Active-Active clustering setup?
What is provisioning, billing and metering, and connection routing concepts in the service layer?