Query to get max and second max in oracle in one query ?
Answer Posted / sarmistha mohanty
select * from (
select SAL,
row_number() over (partition by 1 order by SAL DESC)
as rank
from <table name> ) where rank in (1,2)
| Is This Answer Correct ? | 1 Yes | 2 No |
Post New Answer View All Answers
How to create an initialization parameter file?
Explain the use of constraints option in exp command.
What is the difference between alert log file and tarce file ?
What is oracle instant client?
How are extents allocated to a segment?
How do I know if oracle client is installed on windows?
what are actual and formal parameters?
What is oracle update statement with inner join ?
What is the use of oracle?
How will you write a query to get a 5th rank student from a table student_report?
Is a rollback possible to any savepoint?
How to check the oracle tns settings?
What is the usage of save points in oracle database?
How to drop a tablespace?
Explain the difference between sap and oracle?