Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: basic question about analytic functions
Why converting? Is you query not giving you the results you want? If
it is, there is no reason to convert. If it is not, then explain what
you need and people will be able to help you. Analytical functions
give you particular fomat of output which may or may not be what you
are after. It is neat but not a magic bullet.
udo456_at_yahoo.com (Udo Diekmann) wrote in message news:<5757f268.0302181059.7b98c9d9_at_posting.google.com>...
> I got a basic query that I need to turn into a analytic function query.
>
> Can someone help me translate it? I tried several ideas (using over() etc.
> but I'm no guru at this and have failed). I'm sure it's simple.
>
> Here is a normal query that I need to translate as an analytic function query:
>
> select dev1.sales_div_no, dev1.sales_div_name,
> sum(fact.t_total_sales_units) "T UNITS",
> sum(fact.l_total_sales_units) "L UNITS"
> from dim_dev1_plan dev1, fact_weekly_plan fact
> where dev1.dev1_id=fact.dev1_id
> and fact.per_id between 440 and 540
> and dev1.sales_div_no between 300 and 500
> group by dev1.sales_div_no, dev1.sales_div_name
> order by dev1.sales_div_no, dev1.sales_div_name;
>
> Thanks in advance for any assistance.
>
> Udo.
Received on Tue Feb 18 2003 - 17:57:23 CST