sum([distinct] expr) [over_clause]
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.
if there are no matching rows, sum() returns null.
this function executes as a window function if over_clause is present.