Syntax:
SUM([DISTINCT] expr)

Returns the sum of expr. If the return set has no rows, SUM() returns
NULL. The DISTINCT keyword can be used to sum only the distinct values
of expr.

SUM() returns NULL if there were no matching rows.

URL: http://dev.mysql.com/doc/refman/5.7/en/group-by-functions.html

