Re: ORA-00979: not a GROUP BY expression

From: <mboduch_at_interaccess.com>
Date: 1996/12/22
Message-ID: <32bdc583.916688_at_nntp.interaccess.com>#1/1


On 21 Dec 1996 22:07:43 GMT, dfr_at_raleigh.ibm.com (DF Russell) wrote:

>
>This is probably a stupid question, but I've looked in a bunch of
>manuals & FAQS...
>
>Given the following:
>
>select substr(d.tablespace_name, 1, 15) as Table_Space,
> d.file_id as File_ID,
> d.bytes / 1024 / 1024 as Total_MB,
> d.bytes / 4096 as Oracle_Blocks,
> sum (e.blocks) as Blocks_Used,
> round (sum(e.blocks) / (d.bytes / 4096), 4) * 100 as Percent_Used
>from sys.dba_extents e, sys.dba_data_files d
>where d.file_id = e.file_id (+)
>group by d.tablespace_name, d.bytes;
>
>
>Why am I getting the ORA-00979: not a GROUP BY expression?

You need to include d.file_id in your group by. Any column being selected but not summed must be included.

Mike

>Oracle 7.1
>
>TIA,
>
>DFR
>
>--
>Disclaimer: Views expressed are personal and not necessarily shared by IBM
>e-mail: dfr_at_raleigh.ibm.com || (RALVM17)DFR
>--------------------------------------------------------------------------
>Tiger! Tiger! Burning bright, in the forests of the night.
>What immortal hand or eye, could frame thy fearful symmetry.
Received on Sun Dec 22 1996 - 00:00:00 CET

Original text of this message