You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/en_US/sqls/functions/aggregate_functions.md
+8-7Lines changed: 8 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -12,7 +12,7 @@ as expressions only in the following:
12
12
avg(col)
13
13
```
14
14
15
-
The average of the values in a group. The null values will be ignored.
15
+
The average of the values in a group. The null values will be ignored. Supports incremental calculations.
16
16
17
17
## COUNT
18
18
@@ -21,31 +21,31 @@ count(*)
21
21
count(col)
22
22
```
23
23
24
-
The number of items in a group. The null values will be ignored.
24
+
The number of items in a group. The null values will be ignored. Supports incremental calculations.
25
25
26
26
## MAX
27
27
28
28
```text
29
29
max(col)
30
30
```
31
31
32
-
The maximum value in a group. The null values will be ignored.
32
+
The maximum value in a group. The null values will be ignored. Supports incremental calculations.
33
33
34
34
## MIN
35
35
36
36
```text
37
37
min(col)
38
38
```
39
39
40
-
The minimum value in a group. The null values will be ignored.
40
+
The minimum value in a group. The null values will be ignored. Supports incremental calculations.
41
41
42
42
## SUM
43
43
44
44
```text
45
45
sum(col)
46
46
```
47
47
48
-
The sum of all the values in a group. The null values will be ignored.
48
+
The sum of all the values in a group. The null values will be ignored. Supports incremental calculations.
49
49
50
50
## COLLECT
51
51
@@ -54,7 +54,7 @@ collect(*)
54
54
collect(col)
55
55
```
56
56
57
-
Returns an array with all columns or the whole record (when the parameter is *) values from the group.
57
+
Returns an array with all columns or the whole record (when the parameter is *) values from the group. Supports incremental calculations.
58
58
59
59
### Examples
60
60
@@ -85,7 +85,7 @@ last_value(*, true)
85
85
last_value(col, false)
86
86
```
87
87
88
-
The last_value function is used to retrieve the value of the last row in a group for the specified column(s) or the entire message. It has two parameters, the first of which specifies the column(s) or the entire message, and the second of which specifies whether to ignore null values. If the second parameter is true, the function will only return the last non-null value. If there are no non-null values, the function will return null. If the second parameter is false, the function will return the last value, regardless of whether it is null or not.
88
+
The last_value function is used to retrieve the value of the last row in a group for the specified column(s) or the entire message. It has two parameters, the first of which specifies the column(s) or the entire message, and the second of which specifies whether to ignore null values. If the second parameter is true, the function will only return the last non-null value. If there are no non-null values, the function will return null. If the second parameter is false, the function will return the last value, regardless of whether it is null or not. Supports incremental calculations.
89
89
90
90
## MERGE_AGG
91
91
@@ -94,6 +94,7 @@ merge_agg(*)
94
94
merge_agg(col)
95
95
```
96
96
97
+
Supports incremental calculations.
97
98
Concatenate values from the group into a single value.
98
99
It concatenates multiple objects by generating an object containing the union of their keys,
99
100
taking the second object's value when there are duplicate keys.
0 commit comments