The SUM function returns the sum of the values in expression. Numeric data types with the addition operator can also be calculated by the SUM function. String data types as well as SET, MULTISET and LIST (SEQUENCE) types cannot be calculated by the SUM function; they can be concatenated with the + operator. In addition, the SUM function cannot be used for expressions that contain attributes with object domains (user-defined classes or multimedia classes).
SUM ( [ DISTINCT | UNIQUE | ALL ] expression )
With the input for the SUM function, you can specify a single-value expression.
The following is an example that returns the total number of gold medals in the 1998 Olympics.
WHERE host_year = 1988;
Result : 241