What is aggregate function? Briefly describe it?
Aggregate functions are functions that take a collection of values as input and return a one value. SQL offers 5 built-in aggregate functions:
a) Average: avg
b) Minimum:min
c) Maximum: max
d) Total:sum
e) Count:count
Average: avg
Select avg (balance)
From account
Where branch-name='perryridge'
Count :count
Select branch-name,count(distinct customer-name)
From depositior,account
Where depositor.account-number=account.account-number
groupby branch-name