Returns the sum of the values in a group. The keyword DISTINCT specifies that the duplicate values are to be eliminated before computing the sum.
The result of the function is of the same data type as that of the argument except that the result is of type
INTEGER when the argument is of type
SMALLINT or
TINYINT.