Prepare for your Next Interview
This is a discussion on Analytical functions within the Oracle forums, part of the Databases category; Is it compulsory to sepcify order by clause in window if we use row_number() in analytical function ?...
|
|||
|
Analytical functions
Is it compulsory to sepcify order by clause in window if we use row_number() in analytical function ?
Last edited by babi_geek : 03-15-2008 at 07:44 AM. |
| Sponsored Links |
|
|||
|
Re: Analytical functions
u need to use order by because It assigns a unique number to each row to which it is applied in the ordered sequence of rows specified in the order_by_clause, beginning with 1.
|
|
|||
|
Re: Analytical functions
Follow this link
http://download.oracle.com/docs/cd/B...lysis.htm#1020 |
|
|||
|
Re: Analytical functions
Quote:
|
|
|||
|
Re: Analytical functions
What is difference between ROLLUP and CUBE functions.
Syntax for both these functions is same SELECT ... GROUP BY CUBE (grouping_column_reference_list) SELECT ... GROUP BY ROLLUP(grouping_column_reference_list) Both these functions are used for calculating totals only. Could anyone make it clear with one example? |
|
|||
|
Re: Analytical functions
SELECT
deptno,job, sum(sal) FROM scott.emp GROUP BY ROLLUP(deptno,job); SELECT deptno, job,sum(sal) FROM scott.emp GROUP BY CUBE(deptno,job); From the above two queries u can find the difference |
|
|||
|
Re: Analytical functions
Cube and rollup are extension to group by or analytical functions?
They are not displaying group results along with rows. They are displaying only one result per one group. Please clarify me whether they are analytical functions or not? |
![]() |
|
| Thread Tools | |
| Display Modes | |
|
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| On-Line Analytical Processing | Lokesh M | Data Warehousing | 0 | 12-17-2007 12:56 PM |
| Web Functions | Saitumi | Testing Issues | 1 | 12-06-2007 05:48 AM |
| Features and Functions of QTP | Geek_Guest | QTP | 1 | 10-08-2007 09:00 AM |
| Regarding functions in sql | Radhi09 | SQL | 3 | 04-02-2007 09:29 AM |
| Functions... | jamesravid | Brainteasers | 3 | 09-24-2006 05:12 AM |