Prueba esto:
select COALESCE(sum(balance),0) from mytable where customer = 'john'
Esto debería hacer el trabajo. El método coalesce debería devolver el 0.
Prueba esto:
select COALESCE(sum(balance),0) from mytable where customer = 'john'
Esto debería hacer el trabajo. El método coalesce debería devolver el 0.