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.0 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.0/en/group-by-functions.html

