Calculate the sum from a one-dimensional statistical aggregate
Since 1.3.0
Calculate the sum of the values contained in a statistical aggregate.
Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
Calculate the sum from a one-dimensional statistical aggregate
SELECT sum(stats_agg(data))
FROM generate_series(0, 100) data;
sum
-----
5050
sum(
summary StatsSummary1D
) RETURNS DOUBLE PRECISION
| Name | Type | Default | Required | Description |
|---|---|---|---|---|
| summary | StatsSummary1D | - | ✔ | The statistical aggregate produced by a stats_agg call |
| Column | Type | Description |
|---|---|---|
| sum | DOUBLE PRECISION | The sum of the values in the statistical aggregate |