Query to get max and second max in oracle in one query ?
Answer Posted / satish
SELECT SAL SECOND_MAX_SAL FROM (SELECT SAL,DENSE_RANK() OVER(ORDER BY SAL DESC) RANK FROM EMP) WHERE RANK=2;
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
What is a cognitive schema?
How many categories of data types in oracle?
Can a formula column be obtained through a select statement ?
What is a sub query? What are its various types?
What are the database administrators utilities available?
How do I know if oracle is installed on windows?
What is merge statement used for?
How to convert characters to times in oracle?
Explain oracle’s server parameter file.
How to load excel data sheet to oracle database
How to run create database statement again?
How to execute the package in oracle?
How to define a variable of a specific record type?
Is rowid unique in oracle?
What is the purpose of tables, private synonyms and public synonyms in Oracle?