select the 3rd maximum salary from sql server database if 4
(just an example In practically I may not know the exact
situation) of the highest salaries are equal.
Answer Posted / kiran
select empid,salary
from (select distinct empid,salary,
Dense_Rank() over(order by salary desc) as Rank
from dbo.EmpSalary) b
where b.rank=3
Is This Answer Correct ? | 1 Yes | 1 No |
Post New Answer View All Answers
Can binary strings be converted into numeric or float data types?
How to create percentile function?
Which database stores information about replication?
How can sql injection be stopped? : sql server security
Name 3 ways to get an accurate count of the number of records in a table?
What are the requirements on sql server network connections?
Explain SSRS Architecture?
What are the system database in sql server 2005?
Do you know what is recursion? Is it possible for a stored procedure to call itself or recursive stored procedure? How many levels of sp nesting is possible?
What are date and time data types in ms sql server?
What are actions, how many types of actions are there, explain with example? : sql server analysis services, ssas
Explain what is raid and what are different types of raid levels?
Explain the usage of floor function in sql server.
What is the datatype of rowid?
What are different types of schemas?