how to get the second max val for every group in a table
Answer Posted / venkat
select * from (
select e.deptno,d.dname,e.sal,dense_rank() over (
partition by e.deptno
order by e.sal desc ) "RANK",
e.ename
from emp_test e,dept_test d
where e.deptno=d.deptno)
where rank=2
| Is This Answer Correct ? | 9 Yes | 5 No |
Post New Answer View All Answers
what happened to the global index when I truncate the data in one of the partition?
What is a data lock in oracle?
Difference between hot backup vs. Cold backup?
What is a trace file and how is it created in oracle?
How to synchronize 2 schema's objects?
Does oracle charge for java?
what is IDE,DMV in sql server?
Can sub procedure/function be called recursively?
What is the database name in oracle?
Can you have more than one content canvas view attached with a window ?
Can we store pictures in the database and if so, how it can be done?
What is system global area (sga) in oracle?
How would you begin to troubleshoot an ORA-3113 error?
What is a tns service name?
What is pragma autonomous transaction in oracle?