HIEN should come before RAM and SYS. Does GROUP BY also order the records for you?
It works only on the 8.17 environment I have listed below.
8.17 environment
-----------------------
SQL> select owner,object_type,count(*) from
2 dba_objects group by owner,object_type;
OWNER OBJECT_TYPE COUNT(*)
------------------------------ ------------------ ----------
ALUMNI FUNCTION 15
ALUMNI INDEX 380
ALUMNI PROCEDURE 68
ALUMNI TABLE 320
ALUMNI TRIGGER 4
BANINST1 FUNCTION 190
BANINST1 PACKAGE 199
BANINST1 PACKAGE BODY 198
BANINST1 PROCEDURE 21
BANINST1 VIEW 138
BANSECR INDEX 7
OWNER OBJECT_TYPE COUNT(*)
------------------------------ ------------------ ----------
BANSECR PACKAGE 3
BANSECR PACKAGE BODY 3
BANSECR SEQUENCE 1
BANSECR TABLE 8
BANSECR VIEW 2
DBSNMP SYNONYM 4
GENERAL INDEX 209
GENERAL SEQUENCE 6
GENERAL TABLE 199
GENERAL TRIGGER 23
GENERAL VIEW 2
OWNER OBJECT_TYPE COUNT(*)
------------------------------ ------------------ ----------
HIEN SYNONYM 51
HIEN TABLE 4
JAMES TABLE 1
MBOOTE INDEX 1
MBOOTE TABLE
--------------------------------------
It's not what the world does to you that matters. It's how you respond...
Just curious, how can I easily combine group by and order by in order to get the count(*) and sort order to work at the same time? Since I have never used the two together that would work, unless I rewrite the query using field alias etc.
1 select owner,object_type,count(*) from
2* dba_objects group by owner,object_type
--------------------------------------
It's not what the world does to you that matters. It's how you respond...
Bookmarks