Sum columns with null values in oracle
NVL(value, default) is the function you are looking for. select type, craft, sum(NVL(regular, 0) + NVL(overtime, 0) ) as total_hours from hours_t group by type, craft order by type, craft Oracle have 5 NULL-related functions: NVL NVL2 COALESCE NULLIF LNNVL NVL: NVL(expr1, expr2) NVL lets you replace null (returned as a blank) with a string … Read more