2.1.26. Aggregate functions

  • Run over groups of tuples
  • Takes a projected attribute list as an argument
  • Produce relation with single tuple
  • SUM, MAX, MIN, AVG, COUNT
  • e.g. AggFunc over all tuples
    • SELECT SUM(SALARY), MAX(SALARY), MIN(SALARY)
    • FROM EMPLOYEE;
  • Single attribute lists (distinct values)
  • Multi-attribute lists (granularity of distinct values by pairing)