how to get the second max val for every group in a table
Answer Posted / ram posam
select * from (select deptno,sal,rank() over(partition by
deptno order by sal desc) k
from emp
group by deptno,sal)
where k=&n;
Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
Why does oracle 9i treat an empty string as null?
What is a static data dictionary in oracle?
What view(s) do you use to associate a users SQLPLUS session with his o/s process?
What privilege is needed for a user to query tables in another schema?
What is hot backup and logical backup?
can u plz provide me oca sql dumps please i need them
What is set operator oracle?
What is a sub query? What are its various types?
What is the maximum number of triggers that can be applied to a single table?
We are using Oracle apps with XML publisher.In that,we are facing some problems while giving a Footer in RTF Template.While giving a footer in RTF Template it is Visible in all the pages,but after the PDF is getiing generated,the Footer are Visible on alternate pages only (like on first page ,third page) and so on. Please provide the Solution for getting the Footer on all the pages.
What spfile/init.ora file parameter exists to force the CBO to make the execution path of a given statement use an index, even if the index scan may appear to be calculated as more costly?
material view and view disadvantages?
What is the quickest way to export a table to a flat file?
How to bring a tablespace online?
What is literal?