write query for fourth maximum salary from employee table

Answer Posted / anish tuladhar

select
distinct salary
from
(
select
DENSE_RANK() over(order by salary desc) as rnk,
modelyr_id_int
from
employee
) a
where
rnk = 4

Is This Answer Correct ?    2 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Are semicolons required at the end of sql statements in sql server 2005?

732


What is the difference between row_number and dense_rank?

599


Why use stored procedures in sql server?

710


What is create statement?

680


How to apply cascading referential integrity in place of triggers?

743






Explain a checkpoint?

760


What is data source view or dsv? : sql server analysis services, ssas

755


What are the different types of triggers in SQL SERVER?

720


After creating the cube, if we added a new column to the oltp table then how you add this new attribute to the cube? : sql server analysis services, ssas

729


What is difference in performance between insert top (n) into table and using top with insert?

729


Explain microsoft sql server functions?

765


Explain Capacity planning to create a database? and how to monitor it?

3949


Would you store your query in a ssrs report or a database server? State the reason why?

132


How to create a stored procedure with a statement block in ms sql server?

747


Do you know spatial data types - geometry and geography in sql server 2008?

765