select owner,sum(bytes) sumb 
  from dba_segments 
 group by OWNER
 order by sum(bytes) desc

ORA-00935: group function is nested too deeply

Oracle Support Document 18529.1

Error:  ORA 935  
Text:   group function is nested too deeply 
Cause:  This is an internal error message not usually issued.
Action: Contact customer support.

The fix for my query is not to use the aggregate in order by:

select owner,sum(bytes) sumb
  from dba_segments 
 group by owner
 order by sumb 

No comments:

Post a Comment

About Me

My photo
I am Timo Raitalaakso. I have been working since 2001 at Solita Oy as a Senior Database Specialist. My main focus is on projects involving Oracle database. Oracle ACE alumni 2012-2018. In this Rafu on db blog I write some interesting issues that evolves from my interaction with databases. Mainly Oracle.