Hi,
I am tying to query two tables in the data dictionary of the oracle 8i. (dba_extents and dba_all_tables).
I am having difficulties in the group by clause.
SQL> select a.segment_type,
2 a.owner,
3 a.segment_name,
4 sum(a.BYTES) bytes,
5 count(a.EXTENT_ID) sum_of_extents,
6 b.blocks
7 from DBA_EXTENTS a, DBA_ALL_TABLES b
8 where
9 a.OWNER = b.OWNER and
10 a.SEGMENT_NAME = b.TABLE_NAME and
11 segment_type = 'TABLE'
12 group by a.OWNER , a.SEGMENT_NAME, a.SEGMENT_TYPE
13 order by sum_of_extents, a.SEGMENT_TYPE ,
14 a.SEGMENT_NAME;
b.blocks
*
ERROR at line 6:
ORA-00979: not a GROUP BY expression
Can someone please help me out.
I am tying to query two tables in the data dictionary of the oracle 8i. (dba_extents and dba_all_tables).
I am having difficulties in the group by clause.
SQL> select a.segment_type,
2 a.owner,
3 a.segment_name,
4 sum(a.BYTES) bytes,
5 count(a.EXTENT_ID) sum_of_extents,
6 b.blocks
7 from DBA_EXTENTS a, DBA_ALL_TABLES b
8 where
9 a.OWNER = b.OWNER and
10 a.SEGMENT_NAME = b.TABLE_NAME and
11 segment_type = 'TABLE'
12 group by a.OWNER , a.SEGMENT_NAME, a.SEGMENT_TYPE
13 order by sum_of_extents, a.SEGMENT_TYPE ,
14 a.SEGMENT_NAME;
b.blocks
*
ERROR at line 6:
ORA-00979: not a GROUP BY expression
Can someone please help me out.