Name

total() — Return the numerical total

Common Usage

total( number )

Description

The total() 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. The total() aggregate is specific to SQLite.

Unlike sum(), the total() aggregate will always return a floating-point value. Even if all number expressions are NULL, total() will still return a 0.0.

See Also

sum(),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.