Use IFNULL(column, 0) to convert the column value to zero.
Alternatively, the COALESCE function will do the same thing: COALESCE(column, 0), except
COALESCEis ANSI-compliant,IFNULLis notCOALESCEtakes an arbitrary number of columns/values and will return the first non-null value passed to it.