Oracle SELECT Query - How To Use Group Functions in the SELECT Clause
Interview Question Database For Software Developers
|
|
| How To Use Group Functions in the SELECT Clause | | How To Use Group Functions in the SELECT Clause? - Oracle DBA FAQ - Understanding SQL SELECT Query Statements | | By: FYIcenter.com | If group functions are used in the SELECT clause, they will be
used on the rows that meet the query selection criteria, the output of group
functions will be returned as output of the query. The following select
statement returns 4 values calculate by 4 group functions on all rows
of the "departments" table:
SQL> SELECT COUNT(*), MIN(department_id),
2 MAX(department_id) FROM departments;
COUNT(*) MIN(DEPARTMENT_ID) MAX(DEPARTMENT_ID)
---------- ------------------ ------------------
27 10 270
| | ID: 865 | Rank: 1089 | Votes: 0 | Views: 40 | Submitted: 20070420 |
1093 :-) | | What Are Group Functions | | What Are Group Functions? - Oracle DBA FAQ - Understanding SQL SELECT Query Statements... | | Submitted: 20070420 |
|
Copyright © 2009 FYIcenter.com
All rights in the contents of this Website are reserved by the individual author.
No part of the contents may be reproduced in any form without author's permission.
|
|
|