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
How to synchronize 2 schema's objects?
What is a dynamic performance view in oracle?
How to concatenate two text values in oracle?
how the Oracle Prepares the Execution Plan and how it chooses the Optimal one?
What are the differences between date and timestamp in oracle?
What is the difference between Delete, Truncate and Drop in Oracle?
Can select statements be used on views in oracle?
How do I know if oracle client is installed on windows?
Explain what does a control file contain?
does the query needs a hint to access a materialized view?
What is an oracle function?
How to call a sub procedure?
How to use existing values in update statements using oracle?
What is instant client oracle?
What is the usage of analyze command in oracle?