Name

sum() — Return the numerical summation

Common Usage

sum( number )

Description

The sum() aggregate computes the sum or total of all the non-NULL number values. Any non-NULL number that is not an integer will be interpreted as a floating-point value.

If all non-NULL number values are integers, sum() will return an integer. Otherwise, sum() will return a floating-point value. If no non-NULL number is found, sum() will return NULL.

See Also

total(), count()

Get Using SQLite now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.