Re: Reports requirements -- Urgently needed

From: Jusung Yang <jusungyang_at_yahoo.com>
Date: 21 Aug 2002 12:43:27 -0700
Message-ID: <42ffa8fa.0208211143.7227f45a_at_posting.google.com>


Right. You need this sort of stuff most often in a data warehouse environment. In you case, your fact table is probably "marks" which contains measures you can do your aggregates on. You have 4 dimensions: school, class, student and subject. Depend on what level of details you need, ROLLUP and CUBE should provide you the answer. CUBE gives you more details than ROOLUP and is probably what you need in your case.

roobaron <member_at_dbfoums.com> wrote in message news:<1719745.1029892183_at_dbforums.com>...
> This might be a case for using the ROLLUP function
> in Oracle 8i
>
> Have a look at the doco for examples of the use of ROLLUP
>
> Looks like you have a couple of different "dimensions" i.e
> schools,class,students
> something like this might do the trick...
>
> SELECT class, school,
> SUM(marks) AS Total Marks
> FROM MARKS_TABLE
> GROUP BY class,
> ROLLUP(school)
>
> Hope this helps
Received on Wed Aug 21 2002 - 21:43:27 CEST

Original text of this message