Aggregating Data Using Group Functions
Aggregating Data Using Group Functions
Aggregating Data Using Group Functions
Aggregating Data
Using Group Functions
The maximum
salary in
the EMPLOYEES
table.
• AVG
• COUNT
• MAX
• MIN
• STDDEV
• SUM
• VARIANCE
You can use MIN and MAX for any data type.
SELECT MIN(hire_date), MAX(hire_date)
FROM employees;
SELECT AVG(commission_pct)
FROM employees;
EMPLOYEES
4400
9500 The
average
3500
salary
in
EMPLOYEES
6400
table
for each
department.
10033
EMPLOYEES
“Add up the
salaries in
the EMPLOYEES
table
for each job,
grouped by
department.
…
The maximum
salary
per department
when it is
greater than
$10,000
…