Query to get max and second max in oracle in one query ?
Answer Posted / satish
SELECT 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
Why packages are used in oracle?
what is IDE,DMV in sql server?
What are the database administrators utilities available?
What types of joins are used in writing subqueries?
State and explain the different types of data models?
What is a sub query? What are its various types?
What is data type in oracle?
What is the difference difference between $ORACLE_HOME and $ORACLE_BASE.
How many anonymous blocks can be defined?
How to convert times to characters in oracle?
Which environment variables are absolutely critical in order to run the OUI?
How many file formats are supported to export data?
What is parameterized cursor in oracle?
What happens to the current transaction if a ddl statement is executed?
How to count duplicated values in a column in oracle?