SUM ( [ DISTINCT | ALL ] value_expression )
- Exclude duplicates of value_expression from the computation.
- All values of value_expression that are not null, including duplicates, are included in the computation.
- A literal or column expression whose sum is to be computed.
- The value_expression cannot be a reference to a view column derived from a function, and cannot contain any ordered analytical or aggregate functions.