Aggregate Functions Operate on a column of a relation and return a value avg: average value min: minimum value max: maximum value sum: sum of values count number of values Note: for our examples we use the tables Branch(branch-name, branch-city, assets) Customer(customer-name, customer-street, customer-city Loan(loan- number, amount, branch-name Account( account-number, balance, branch-name Borrower(customer-name, loan-number Depositor(customer-name, account-number COMP3311 Fall 2011 CSE, HKUST Slide 11COMP3311 Fall 2011 CSE, HKUST Slide 11 Aggregate Functions • Operate on a column of a relation, and return a value avg: average value min: minimum value max: maximum value sum: sum of values count: number of values • Note: for our examples we use the tables: – Branch (branch-name, branch-city, assets) – Customer (customer-name, customer-street, customer-city) – Loan (loan-number, amount, branch-name) – Account (account-number, balance, branch-name) – Borrower (customer-name, loan-number) – Depositor (customer-name, account-number)