COP 4710 Lecture Notes - Lecture 3: Aggregate Function, Relational Algebra, New York State Route 250
Document Summary
Aggregation function takes a collection of values and returns a single value as a result. G1, g2 , gn is a list of attributes on which to group (can be empty) On table with different customer names : 9 avg balance(branch_customer) The result is average of the balance of every customer. The result would be the average balance of every customer per branch names. If have : cust name (9 min balance(branch name)) table with joe and eva with 200 and 200. If remove cust name and have just 9 min balance(branch name)) table with min and 200. > result of aggregation does not have a name. Can use rename operation to give it a name. For convenience, we permit renaming as part of aggregate operation. == get the sum of balances per branch. >an extension of the join operation that avoids loss of information.