SQLite TOTAL() Function
Example
Return the total quantity of all the order details:
SELECT TOTAL(Quantity) FROM OrderDetails;
Try it Yourself »
Definition and Usage
The TOTAL() function works like SUM(), but the result is always a decimal number, and it returns 0.0 instead of NULL when there are no values to add.
Tip: Also look at SUM().
Syntax
TOTAL(expression)
Parameter Values
| Parameter | Description |
|---|---|
| expression | Required. A column or a calculation |
Technical Details
| Return type: | Real |
|---|