SELECTs using the GROUP BY clause. : Usename « SQL PLUS Session Environment « Oracle PL/SQL Tutorial






SQL>
SQL> SELECT username, default_tablespace
  2  FROM dba_users
  3  where rownum<50
  4  GROUP BY default_tablespace, username;

USERNAME                       DEFAULT_TABLESPACE
------------------------------ ------------------------------
SYS                            SYSTEM
SYSTEM                         SYSTEM
CTXSYS                         SYSAUX
JAVA2S                         SYSTEM
OUTLN                          SYSTEM
DIP                            SYSTEM
HR                             USERS
ANONYMOUS                      SYSAUX
PLSQL                          USERS
TSMSYS                         SYSTEM
FLOWS_FILES                    SYSAUX
XDB                            SYSAUX
MDSYS                          SYSTEM
DBSNMP                         SYSAUX
FLOWS_020100                   SYSAUX

15 rows selected.

SQL>








29.58.Usename
29.58.1.SELECTs using the GROUP BY clause.
29.58.2.Count user name