Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


How to find 6th highest salary from Employee table ?

Answers were Sorted based on User's Feedback



How to find 6th highest salary from Employee table ?..

Answer / saravakumar

SELECT TOP 1 salary FROM (SELECT DISTINCT TOP 6 salary FROM
employee ORDER BY salary DESC) a ORDER BY salary

Is This Answer Correct ?    30 Yes 8 No

How to find 6th highest salary from Employee table ?..

Answer / answer

SELECT MIN(SALARY) FROM EMPLOYEE WHERE SALARY IN (SELECT
DISTINCT TOP 6 MAX (SALARY) FROM EMPLOYEE ORDER BY SALARY
DESC)

Is This Answer Correct ?    16 Yes 4 No

How to find 6th highest salary from Employee table ?..

Answer / rahul gupta

select sal from employee e1 where 5 = (select count(*) from
employee e2 where e1.sal < e2.sal)

Is This Answer Correct ?    5 Yes 2 No

How to find 6th highest salary from Employee table ?..

Answer / lince thomas

select salary from(
select row_number() over(order by salary desc) as rno,*
from Employee)T where T.rno=6

Is This Answer Correct ?    3 Yes 0 No

How to find 6th highest salary from Employee table ?..

Answer / lince

select * from(select salary,dense_rank() over(order by salary desc) as rno from emp)T where T.rno=6

Is This Answer Correct ?    2 Yes 0 No

How to find 6th highest salary from Employee table ?..

Answer / anto

select distinct top6 salary from employee

Is This Answer Correct ?    2 Yes 2 No

How to find 6th highest salary from Employee table ?..

Answer / vj

with cte as
(
select dense_rank() over (order by salary desc)
maxSal ,* from Employee )
select * from cte where maxSal=6

Is This Answer Correct ?    0 Yes 0 No

How to find 6th highest salary from Employee table ?..

Answer / maheswar reddy s

select * from Employee e1 where 6=(select count(distinct(salary))from employee e2 where
e2.salary>=e1.salary)

Is This Answer Correct ?    0 Yes 0 No

How to find 6th highest salary from Employee table ?..

Answer / krishan kant

SELECT MIN(SALARY) FROM EMPLOYEE WHERE SALARY IN (SELECT
DISTINCT TOP 6 SALARY FROM EMPLOYEE ORDER BY SALARY
DESC)

Is This Answer Correct ?    0 Yes 0 No

How to find 6th highest salary from Employee table ?..

Answer / manikanta

select min(salary) as salary from Employee where salary >
(select min(salary)from employee)

Is This Answer Correct ?    1 Yes 4 No

Post New Answer

More SQL Server Interview Questions

What are the advantages of user-defined functions over stored procedures in sql server?

0 Answers  


What is the concept of optimization?

0 Answers  


 Explain what is sql override for a source taLle in a mapping?

0 Answers   Informatica,


You have to store user responses of ‘yes’ and ‘no’ what kind of data type is best suited for this task?

0 Answers  


Disadvantages of the indexes?

0 Answers  


what purpose does the model database serve? : Sql server database administration

0 Answers  


While using a cursor, how can you differentiate between a deleted row and a row that has been inserted with null data values?

0 Answers  


what is normalization? : Sql server database administration

0 Answers  


What is cdc in sql server?

0 Answers  


What are recommended options to be used while using db mirroring? : sql server database administration

0 Answers  


Explain table valued parameters in sql server? Why tvp used?

0 Answers  


Can you name a few encryption mechanisms in sql server?

0 Answers  


Categories