Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: select a/avg(b) .... ?

Re: select a/avg(b) .... ?

From: Jerry Gitomer <jgitomer_at_hbsrx.com>
Date: Fri, 7 May 1999 12:08:14 -0400
Message-ID: <7gv302$r1n$1@autumn.news.rcn.net>


Hi,

    Try SELECT SUM(a)/AVG(b) FROM c;

regards

Jerry Gitomer


Sebastian Kloska wrote in message <3732ACEC.F3A7560D_at_mpimp-golm.mpg.de>...
> Hi
>
> I'm currently trying to solve a rather simple problem in Oracle8 end
>got
> stucked.
>
> What I have in mind is a query which would look like
>
> select a/avg(b) from c;
>
> Quite simple and I thing not so uncommon, but oracle complains about
> the avg statement. In various SQL-handbooks they write that this is
> not allowed because avg is an aggregate function with only one result
> per select statment (or more if you add a group by).
>
> Nice explanation for theoretical database design, but how do I get
> my results ?
>
> thank you
>
> Sebastian
>
>--
>======================================================================
>Dr. Sebastian Kloska; Max-Planck Institut für Mol. Pflanzenphysiologie
>Karl Liebknecht Straße 25; 14476 Golm; Tel: (+49 030) 84131542
>* NEW MAIL ADDRESS * mailto:kloska_at_mpimp-golm.mpg.de
Received on Fri May 07 1999 - 11:08:14 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US