mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-09-29 05:00:47 +00:00
43 lines
887 B
Markdown
43 lines
887 B
Markdown
---
|
|
toc_priority: 142
|
|
---
|
|
|
|
# sumCount {#agg_function-sumCount}
|
|
|
|
Short description.
|
|
|
|
**Syntax**
|
|
|
|
``` sql
|
|
sumCount(x)
|
|
```
|
|
|
|
**Arguments**
|
|
|
|
- `x` — Description. Optional (only for optional arguments). Possible values: <values list>. Default value: <value>. [Type name](relative/path/to/type/dscr.md#type).
|
|
- `y` — Description. Optional (only for optional arguments). Possible values: <values list>.Default value: <value>. [Type name](relative/path/to/type/dscr.md#type).
|
|
|
|
**Returned value**
|
|
|
|
- Tuple `(sum, count)`, where `sum` is the sum of numbers and `count` is a counts the number of rows or not-NULL values.
|
|
|
|
Type: [Tuple](../../../sql-reference/data-types/tuple.md).
|
|
|
|
**Example**
|
|
|
|
The example must show usage and/or a use cases. The following text contains recommended parts of an example.
|
|
|
|
Input table (Optional):
|
|
|
|
``` text
|
|
```
|
|
|
|
Query:
|
|
|
|
``` sql
|
|
```
|
|
|
|
Result:
|
|
|
|
``` text
|
|
``` |