SQLite has a function called sum() and another function called total(). Both functions do pretty much the same thing – they return the sum of all non-NULL values in a group.
But there is a subtle difference between these two functions.
The difference is in the way they handle NULL inputs.