4 ms·
Using COALESCE here is correct, but sum() returns NULL if there were no non-NULL inputs, so COALESCE should go around it: COALESCE(sum(salary), 0)
by a8m88 13y ago
Using COALESCE here is correct, but sum() returns NULL if there were no non-NULL inputs, so COALESCE should go around it:
COALESCE(sum(salary), 0)