Subquery with comparison operator : Introduction « Query Select « Oracle PL/SQL Tutorial






SQL>
SQL>
SQL> SELECT COUNT(*) num_owned, a.owner
  2      FROM dba_objects a
  3      WHERE 100<(SELECT COUNT(*) FROM dba_objects b
  4      WHERE a.owner=b.owner)
  5      GROUP BY a.owner;

 NUM_OWNED OWNER
---------- ------------------------------
       473 MDSYS
      1143 FLOWS_020100
      2769 PUBLIC
       575 JAVA2S
       339 CTXSYS
       449 SYSTEM
       668 XDB
      6631 SYS

8 rows selected.








2.1.Introduction
2.1.1.Using the SQL Operators
2.1.2.Subquery with comparison operator
2.1.3.A SELECT with Just a FROM Clause