A type of request that cannot be expressed in basic relational algebra is to specify mathematical aggregate functions on collections of values from the database.
We use the Aggregate Functional operation for common aggregations:
- : retrieves maximum salary value from the relation
- : retrieves minimum salary value from the relation
- : retrieves the sum of the Salary from the relation
- : computes the count of employees and their average salary
We can also use a variation of the aggregate operation:
- Grouping attribute placed to the left.
- Aggregate functions placed to the right.
Hence, we can use in order to group employees by their department number and compute the count of employees and average salary per department.