how can we find nth max salary from A table
Answers were Sorted based on User's Feedback
Answer / asp
select * from table1 a where (n-1) = (select count(distinct
(sal)) from table1 b where b.sal>a.sal)
| Is This Answer Correct ? | 15 Yes | 5 No |
Answer / bhaskar reddy
select * from table1 a where(n-1)= (select count(distinct
sal) from table1 b where b.sal>a.sal)
| Is This Answer Correct ? | 6 Yes | 5 No |
Answer / sivaraman
select * from table1 a where n = (select count(distinct
(sal)) from table1 b where b.sal>a.sal)
n is value of n it should be numeric....
| Is This Answer Correct ? | 15 Yes | 15 No |
Answer / a
select MAX(Salary) from Employee
WHERE Salary NOT IN (select MAX(Salary) from Employee )
| Is This Answer Correct ? | 0 Yes | 9 No |
What are concurrency issues?
What is the purpose of the QUIESE Utility?
what is different three logs in DB2?
Can we use select query in a loop to fetch multiple rows in a COBOL PROGRAM? If so, what is the advantage of cursor?
What's The Error Code For Unique Index Voilation?
What is dclgen in db2?
How to test SQL -911 error while developing COB-DB2 program
can we view the access paths created by dbrm ? how ? thx
How to create a table using embedded sql?
What happens to the PLAN if index used by it is dropped?
What is an alias and how does it differ from a synonym?
Explain transactions, commits and rollbacks in DB2.