Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Data dictionary queries

Status
Not open for further replies.

penzk001

Technical User
Mar 11, 2003
82
MT
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.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top