I\'m trying to sum up Customer balances using the following query:
select sum(balance) from mytable where customer = \'john\'
However, if
Try this:
select COALESCE(sum(balance),0) from mytable where customer = 'john'
This should do the work. The coalesce method should return the 0.