5 Aggregating Data
5 Aggregating Data
5 Aggregating Data
Aggregating Data
Using Group Functions
MIN(HIRED MAX(HIRED
--------- ---------
17-DEC-80 12-JAN-83
COUNT(*)
---------
6
COUNT(COMM)
-----------
4
AVG(COMM)
---------
550
AVG(NVL(COMM,0))
----------------
157.14286
DEPTNO AVG(SAL)
--------- ---------
10 2916.6667
20 2175
30 1566.6667
AVG(SAL)
---------
2916.6667
2175
1566.6667
DEPTNO MAX(SAL)
--------- ---------
10 5000
20 3000
JOB PAYROLL
--------- ---------
ANALYST 6000
MANAGER 8275
MAX(AVG(SAL))
-------------
2916.6667