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...


find the 3rd max salary

Answers were Sorted based on User's Feedback



find the 3rd max salary..

Answer / udaya

select emp_salary from emp e where 3 =(select count(distinct
emp_salary) from emp where e.emp_salary<=emp_salary)

Is This Answer Correct ?    11 Yes 3 No

find the 3rd max salary..

Answer / neetu

Select Top 1 Salary from TableName where Salary IN(select
top 3 salary from TableName order by salary Desc) order by Asc

Is This Answer Correct ?    6 Yes 1 No

find the 3rd max salary..

Answer / cpnagar

select top 1 salary from(select distinct top 3 salary from
emp order by salary desc)as e order by e.salary

Is This Answer Correct ?    7 Yes 4 No

find the 3rd max salary..

Answer / kk

select top 1 * from (
SELECT DISTINCT TOP 3 salary
FROM tblemp
ORDER BY salary desc) t order by salary asc

Is This Answer Correct ?    1 Yes 0 No

find the 3rd max salary..

Answer / rajasekar

er
# 9
select top 1 * from (
SELECT DISTINCT TOP 3 salary
FROM tblemp
ORDER BY salary desc) t order by salary asc

Is This Answer Correct ?    0 Yes 0 No

find the 3rd max salary..

Answer / cpnagar

SELECT salary FROM (SELECT ROW_NUMBER() OVER (ORDER BY
salary desc) AS RN,*
FROM
emp)temp
WHERE
RN=3

Is This Answer Correct ?    2 Yes 3 No

find the 3rd max salary..

Answer / karthik

select min(salary) from (select top 3 * from employee order by salary desc) temp

Is This Answer Correct ?    0 Yes 1 No

find the 3rd max salary..

Answer / vasanth

SELECT min(Salary)
FROM (SELECT TOP 3 Salary FROM dbo.tblPopulation
GROUP BY [Population (in Millions)]
ORDER BY [Population (in Millions)] DESC ) TEMP

Is This Answer Correct ?    0 Yes 1 No

find the 3rd max salary..

Answer / vaishnavi nigam

SELECT Salary from Emp_sal ORDER BY Salary Desc WHERE Row_Num=3

Is This Answer Correct ?    0 Yes 1 No

find the 3rd max salary..

Answer / shruti

select salary from salarytable orderby salary desc Limit 2,1

First It will arrange all salary in desc order then it will
limit the result using Limit command starting from position
0,1,2 and fetch record 1

Is This Answer Correct ?    0 Yes 2 No

Post New Answer

More SQL Server Interview Questions

How the data stores in a page?

1 Answers  


Can we create clustered index on non primary key column

20 Answers   ABC, CTS,


how we can count records as a group of days like sum of records for(four mondays),(four tuesday)........ in a month. group the column for weekdays.

1 Answers  


What is the new security features added in sql server 2016? : sql server security

0 Answers  


Explain transaction server isolation?

0 Answers  


What are the two types of concurrency?

4 Answers  


What is a join and their types?

2 Answers   Challenger Financial,


What stored by the msdb? : sql server database administration

0 Answers  


in the physical file layout, where should the transaction log be stored in relation to the data file?

0 Answers  


What are the different ways of moving data/databases between servers and databases in SQL Server?

1 Answers  


How to test a dml trigger in ms sql server?

0 Answers  


WHAT IS TRIGGERS IN SQL? AND WHAT IS THE BENIFIT?

8 Answers  


Categories