mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-24 16:42:05 +00:00
fa93952231
See also #31076 which noted that links were broken but didn't fix.
32 lines
769 B
Markdown
32 lines
769 B
Markdown
---
|
||
slug: /en/sql-reference/aggregate-functions/reference/anyheavy
|
||
sidebar_position: 103
|
||
---
|
||
|
||
# anyHeavy
|
||
|
||
Selects a frequently occurring value using the [heavy hitters](https://doi.org/10.1145/762471.762473) algorithm. If there is a value that occurs more than in half the cases in each of the query’s execution threads, this value is returned. Normally, the result is nondeterministic.
|
||
|
||
``` sql
|
||
anyHeavy(column)
|
||
```
|
||
|
||
**Arguments**
|
||
|
||
- `column` – The column name.
|
||
|
||
**Example**
|
||
|
||
Take the [OnTime](../../../getting-started/example-datasets/ontime.md) data set and select any frequently occurring value in the `AirlineID` column.
|
||
|
||
``` sql
|
||
SELECT anyHeavy(AirlineID) AS res
|
||
FROM ontime
|
||
```
|
||
|
||
``` text
|
||
┌───res─┐
|
||
│ 19690 │
|
||
└───────┘
|
||
```
|