Query to get max and second max in oracle in one query ?

Answer Posted / asdasd

SELECT min(gross) FROM(SELECT distinct(gross) FROM
srbs_staff_pay_dtls ORDER
BY gross DESC) WHERE ROWNUM<=4;

Is This Answer Correct ?    2 Yes 3 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How to shutdown your 10g xe server from command line?

556


Differentiate between post-database commit and post-form commit?

545


How to use "for" statements in oracle?

596


How to view the data files in the current database?

599


How to create an oracle database?

590






Can I create users through internet explorer in oracle 10g?

573


What is an oracle and why it is used?

626


What are the various oracle database objects?

683


Which are the five query types available in oracle?

532


How to check the oracle tns settings?

575


What are a cluster and non-cluster index?

577


What suggestions do you have to reduce the network traffic?

551


What is the difference between translate and replace in oracle?

659


What is a directory object?

592


What to do if the startbd.bat failed to start the xe instance?

611