|
|
Therefore:
|
SELECT SetFunction( attribute ) , ...
FROM ....
WHERE ....
|
Meaning:
|
SELECT salary FROM employee Result (set): SALARY ---------- 30000 40000 25000 43000 38000 25000 25000 55000 |
|
|
select salary from employee where dno=4 salary --------- 25000.00 43000.00 <--- Max 25000.00 |
select salary from employee where dno=5 salary --------- 31004.00 50000.00 <--- Max 38000.00 25000.00 |
|
select max(salary), avg(salary), sum(salary) from employee max(salary) avg(salary) sum(salary) ----------- ------------- ------------------------------- 55000.00 33875.000000 271000.00 |
select max(salary) Max, avg(salary) Average, sum(salary) from employee Max Average sum(salary) --------- ------------- ------------------------------- 55000.00 33875.000000 271000.00 |