1.6 KiB
1.6 KiB
title | description | aliases | menu | weight | flux/v0.x/tags | related | introduced | ||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
sum() function | The `sum()` function computes the sum of non-null records in a specified column. |
|
|
102 |
|
|
0.7.0 |
The sum()
function computes the sum of non-null records in a specified column.
sum()
is an aggregate function.
sum(column: "_value")
Parameters
column
The column on which to operate.
Default is "_value"
.
tables
Input data.
Default is piped-forward data (<-
).
Examples
{{% flux/sample-example-intro %}}
import "sampledata"
sampledata.int()
|> sum()
{{< expand-wrapper >}} {{% expand "View input and output" %}} {{< flex >}} {{% flex-content %}}
Input data
{{% flux/sample "int" %}}
{{% /flex-content %}} {{% flex-content %}}
Output data
tag | _value |
---|---|
t1 | 51 |
tag | _value |
---|---|
t2 | 53 |
{{% /flex-content %}} | |
{{< /flex >}} | |
{{% /expand %}} | |
{{< /expand-wrapper >}} |