title: My Select SUM query returns null. It should return 0
body: <p>I'm trying to sum up Customer balances using the following query:</p>
  
  <pre><code>select sum(balance) from mytable where customer = 'john' 
  </code></pre>
  
  <p>However, if the customer has no balance (i.e. no matching rows in the <code>mytable</code> table), my query returns null and not 0. What's the problem?</p>