HN2
new
|
past
|
comments
|
ask
|
show
|
jobs
|
submit
login
a8m88
on May 28, 2013
|
parent
|
context
|
favorite
| on:
Our SQL interview questions
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)
Guidelines
|
FAQ
|
Lists
|
API
|
Security
|
Legal
|
Apply to YC
|
Contact
Search:
COALESCE(sum(salary), 0)