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 can I introduce multiple conditions in like operator?
Whether any commands are used for months calculation? If so, what are they?
How to define an anonymous procedure without variables?
What are the restrictions on external table columns?
How to find out what oracle odbc drivers are installed?
interview questions with answer for cts
How to display employee records who gets more salary than the average salary in the department?
What are the benefits of ordbms?
What is an anonymous block?
Can you tell me how to add new column in existing views?how?How is possible?
What is the difference between translate and replace in oracle?
What are the four Oracle system processes that must always be up and running for the database to be useable?
How to use existing values in update statements using oracle?
How to write text literals in oracle?
Explain the importance of .pll extension in oracle?