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

Home -> Community -> Usenet -> c.d.o.misc -> Re: can I put a Select in my Select?

Re: can I put a Select in my Select?

From: Thorsten Kettner <thorsten.kettner_at_web.de>
Date: 6 Feb 2003 23:29:27 -0800
Message-ID: <74a9c367.0302062329.4ae28644@posting.google.com>


mcohen_at_attbi.com (Mike Cohen) wrote in message news:<9a742dd3.0302061111.27919255_at_posting.google.com>...
> Ron - yes I received Group By errors on the Sum and Count functions
> within the nested selects. The exact error messages are:
>
> "ORA-00979: not a GROUP BY expression"
> > > SELECT
> > > rcm.MSA,
> > > count(ttt.transaction_id),
> > > sum(ttt.SALE_PRICE),
> > > round(...) "AVERAGE" [snip]
> > > FROM ... [snip]
> > > WHERE ... [snip]
> > > GROUP BY
> > > rcm.MSA

round(...) is evaluated for each record. When grouping to MSA the database system wonders how to aggregate the computed values. Do you want to have the average over all the computed values? This would be avg(round(...)). Received on Fri Feb 07 2003 - 01:29:27 CST

Original text of this message

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