title: Selecting columns & counting in a SQL query
body: <p>For each customer I need to list the <code>CUS_CODE</code>, the number of customers in each area <code>(CUS_AREACODE)</code> and the total balance <code>(CUS_BALANCE)</code> and group those records by the <code>CUS_BALANCE</code>.</p>
  
  <p>This is what I have so far:</p>
  
  <pre><code>SELECT 
      COUNT (CUS_AREACODE) AS CUSTOMERS_IN_AREA, 
      CUS_CODE, CUS_BALANCE
  FROM 
      CUSTOMER
  GROUP BY 
      CUS_BALANCE;
  </code></pre>
  
  <p>I'm pretty new to SQL and i receive an error saying that</p>
  
  <blockquote>
    <p>CUS_CODE isn't an aggregate function</p>
  </blockquote>
  
  <p>and I'm not entirely sure what that means and why.</p>