how to get the second max val for every group in a table
Answer Posted / suman rana
--venkat u r almost correct, since u have used "" (double
quotes) so column name will be come case sensitive.
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 ? | 0 Yes | 0 No |
Post New Answer View All Answers
How do you find out from the RMAN catalog if a particular archive log has been backed-up?
What happens if the imported table already exists?
What is a synonym? What are its various types?
What is primefaces used for?
What are the benefits of ordbms?
What is Library Cache in Oracle?
How do I use os authentication with weblogic jdriver for oracle and connection pools?
How can we find out the duplicate values in an oracle table?
What are set operators?
What is set operator oracle?
What happens to the indexes if a table is recovered?
What is tns name?
Is oracle a language?
Can we commit inside a function in oracle?
What is coalesce function?