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 in MySQL 5.1 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.1/en/group-by-functions.html

