how can we find nth max salary from A table

Answer Posted / 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



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Define db2 and its databases?

708


Which isolation level provides highest data integrity?

675


How to view db2 table structure?

684


What does runstats do in db2?

689


Where do you specify them?

770






SQLCODE = -199, ERROR: ILLEGAL USE OF KEYWORD CHAR, TOKEN KEY was expected

11171


What is copy pending and check pending in db2?

664


What's The Percentage Free Space ?

866


What is schema in db2?

666


What is the use of predicate?

675


What is sqlca’s maximum length?

792


How do you stop a db2 database in linux?

640


How do I create a view in db2?

692


What is catalog database in db2?

749


What is explain in db2?

656