Find out the 3rd highest salary?
Answer Posted / abhijt shinde
select MIN(salary) from Employees
where salary IN
(Select Top 3 salary from Employees order by salary desc)
Select Top 1 salary from Employees where salary
Not IN(select Top 1 salary from Employees order by salary Desc)
order by salary Desc
| Is This Answer Correct ? | 0 Yes | 1 No |
Post New Answer View All Answers
Table 1: col1 Timestamp ---------------- 01-mar-2012 11:12:46 Table 2: col2 Timestamp -------------------- 01-mar-2012 11:12:10 01-mar-2012 11:11:23 Write a query to display a row with table2 col2 value less than tabl1 col1 value. Maximum timestamp value previous to table1 col1 value. Display a result as: Col1 col2 ----- ----- 01-mar-2012 11:12:46 01-mar-2012 11:12:10
What is data types in sql?
How do you run a query?
Does truncate remove indexes?
How does index help in query performance?
What is a variable in sql?
What is a table partition?
What is sqlexception in java?
What does (*) mean in sql?
What is the difference between the conventional and direct path loader? : aql loader
how can we repair a mysql table? : Sql dba
What is pl sql script?
Is sql a backend language?
What is record in pl sql?
what is self join and what is the requirement of self join? : Sql dba