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
What is a server parameter file in oracle?
What is connection pool in oracle?
What are the different windows events activated at runtime ?
How to turn on or off recycle bin for the session?
What is the use of file param in imp command?
What is a partition in oracle?
What are nested tables?
How to write a query with a right outer join in oracle?
Explain how are indexes update?
Does oracle database need java?
How would you configure your networking files to connect to a database by the name of DSS which resides in domain icallinc.com?
How many types of synonyms in Oracle?
How to select all columns of all rows from a table in oracle?
How to write a left outer join with the where clause in oracle?
Can we write insert statement in function in oracle?