how can find the second max sal for every group(i.e i want
group the data based on key and find the second max sal for
every group
Answer Posted / nathan
SELECT *
FROM (SELECT deptno, sal,
DENSE_RANK () OVER (PARTITION BY deptno ORDER
BY sal DESC)
ranks
FROM emp)
WHERE ranks = 2;
| Is This Answer Correct ? | 2 Yes | 1 No |
Post New Answer View All Answers
How will you write a query to get a 5th rank student from a table student_report?
What is the difference between 10g OEM and 11g OEM?
What is the effect of setting the value "all_rows" for optimizer_goal parameter of the alter session command? What are the factors that affect optimizer in choosing an optimization approach?
Can you drop an index associated with a unique or primary key constraint?
What is columnar storage what is the advantage?
Explain oracle’s server parameter file.
How to generate query output in html format?
What are the attributes that are found in a cursor?
How to drop an index in oracle?
What are named parameters?
What is the difference between pre-select and pre-query?
What are the general rules on data consistency?
What are the execution control statements?
How many categories of data types?
In the oracle version 9.3.0.5.0, what does each number shows?