find the 3rd max salary
Answers were Sorted based on User's Feedback
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 |
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 |
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 |
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 |
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 |
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 |
Answer / karthik
select min(salary) from (select top 3 * from employee order by salary desc) temp
| Is This Answer Correct ? | 0 Yes | 1 No |
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 |
Answer / vaishnavi nigam
SELECT Salary from Emp_sal ORDER BY Salary Desc WHERE Row_Num=3
| Is This Answer Correct ? | 0 Yes | 1 No |
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 |
what is the system function to get the current user's user id? : Sql server database administration
difference between select column name from table name where serviceid=2; and select max(column name) from table name where serviceid=2; IN ORACLE
you want to be sure that queries in a database always execute at the maximum possible speed. To achieve this goal you have created various indexes on tables which other statement will keep the database in good condition? : Sql server administration
How to run queries with sql server management studio express?
Why variables called the most powerful component of ssis?
how many layers of tcp/ip protocol combined of? : Sql server database administration
employee table has employee id ----------- empid ---------------- 1 2 3 3 3 4 5 5 5 6 6 6 7 here the values r repeated two times.how to select the repeated values only.i.e 3,5,6 should alone come.
What is correlated subquery in sql server?
What do you understand by the data quality services in sql server?
How to verify a user name with sqlcmd tool?
In which tcp/ip port does sql server run? Can it be changed?
Explain Capacity planning to create a database? and how to monitor it?
Oracle (3259)
SQL Server (4518)
MS Access (429)
MySQL (1402)
Postgre (483)
Sybase (267)
DB Architecture (141)
DB Administration (291)
DB Development (113)
SQL PLSQL (3330)
MongoDB (502)
IBM Informix (50)
Neo4j (82)
InfluxDB (0)
Apache CouchDB (44)
Firebird (5)
Database Management (1411)
Databases AllOther (288)