Returns the sum of all the values in an expression.
| Categories: | Aggregate |
| Descriptive Statistics | |
| Returned data type: | The same data type as the expression |
specifies any valid SQL expression.
| Requirement | The result of the SUM function must be within the range of the data type. |
| Data type | BIGINT, DOUBLE, FLOAT, INTEGER, REAL, SMALLINT, TINYINT |
| See | <sql-expression> |
| FedSQL Expressions |
|
Statements
|
Results
|
|---|---|
select sum(density) from densities; |
1728.324 |
select sum(population) from densities; |
1.2278E8 |