how can we find nth max salary from A table

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



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What's The Percentage Free Space ?

785


What is the difference between nvl and coalesce?

608


If anyone has IBM Certification Dumps pls forward to me & also let me know what are the Certification Codes that are available in DB2

1588


What are catalog tables in db2?

614


What is catalog database in db2?

651






Define declaration generator (dclgen).

673


How would the varchar column remarks defined?

645


Can there be more than one cursor open for any program?

668


What does runstats do in db2?

612


How to execute stored procedure in db2 command editor?

537


How to execute stored procedures?

626


How to rename a table in DB2 ?

647


What is buffer pool and list some of them?

632


How to resolve deadlock issue

18041


What is cursor in dbms?

598