Calculate the sum of the values within the requested window. The SUM function works with numeric values and ignoresDocumentation Index
Fetch the complete documentation index at: https://docs.firebolt.io/llms.txt
Use this file to discover all available pages before exploring further.
NULL values.
For more information on usage, please refer to Window Functions.
Syntax
Parameters
| Parameter | Description | Supported input types |
|---|---|---|
<value> | The expression used for the SUM function | Any numeric type |
<partition_by> | An expression used for the PARTITION BY clause | Any |
Return Types
NUMERIC
When DISTINCT is specified, duplicate values from <expression> are removed before calculating the sum.
Example
The example below shows how many players are on a specific level.| level | current_players |
|---|---|
| 1 | 156 |
| 2 | 108 |
| 3 | 127 |
| 4 | 198 |
| 5 | 207 |