Group by Attributes Attributes in select clause outside of aggregate functions must appear in group by list, why lect branch -name balane, count( distinct account-number) from account- group-by branch-name correct branch account balance select from account name number group by branch-name, balance Perryridge 102 400 P tyro dge 20 900 OR Brighton a-217 750 select branch-name, sum(balance), count(.) Brighton a-215 75 Redwood a-222 700 from account group by branch-name COMP3311 Fall 2011 CSE, HKUST Slide 15COMP3311 Fall 2011 CSE, HKUST Slide 15 • Attributes in select clause outside of aggregate functions must appear in group by list, why? select branch-name, balance, count( distinct account-number) from account group by branch-name branchname accountnumber balance Perryridge Perryridge Brighton Brighton Redwood a-102 a-201 a-217 a-215 a-222 400 900 750 750 700 select … from account group by branch-name, balance OR select branch-name, sum(balance), count(…) from account group by branch-name Group by Attributes correct