mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-23 16:12:01 +00:00
renaming functions
This commit is contained in:
parent
62116d244c
commit
6cc4b4b1b4
@ -1,9 +1,9 @@
|
||||
---
|
||||
slug: /en/sql-reference/aggregate-functions/reference/quantileGK
|
||||
slug: /en/sql-reference/aggregate-functions/reference/quantileApprox
|
||||
sidebar_position: 204
|
||||
---
|
||||
|
||||
# quantileGK
|
||||
# quantileApprox
|
||||
|
||||
Computes the [quantile](https://en.wikipedia.org/wiki/Quantile) of a numeric data sequence using the [Greenwald-Khanna](http://infolab.stanford.edu/~datar/courses/cs361a/papers/quantiles.pdf) algorithm.
|
||||
|
||||
@ -11,10 +11,10 @@ Computes the [quantile](https://en.wikipedia.org/wiki/Quantile) of a numeric dat
|
||||
**Syntax**
|
||||
|
||||
``` sql
|
||||
quantileGK(accuracy, level)(expr)
|
||||
quantileApprox(accuracy, level)(expr)
|
||||
```
|
||||
|
||||
Alias: `medianGK`.
|
||||
Alias: `medianApprox`.
|
||||
|
||||
**Arguments**
|
||||
|
||||
@ -40,12 +40,12 @@ Type:
|
||||
|
||||
``` sql
|
||||
WITH arrayJoin([0, 6, 7, 9, 10]) AS x
|
||||
SELECT quantileGK(100, 0.5)(x)
|
||||
SELECT quantileApprox(100, 0.5)(x)
|
||||
|
||||
|
||||
┌─quantileGK(100, 0.5)(x)─┐
|
||||
│ 7 │
|
||||
└─────────────────────────┘
|
||||
┌─quantileApprox(100, 0.5)(x)─┐
|
||||
│ 7 │
|
||||
└──────────────----───────────┘
|
||||
```
|
||||
|
||||
|
||||
|
@ -115,14 +115,14 @@ Result:
|
||||
└─────────────────────────────────────────────────────────────────────┘
|
||||
```
|
||||
|
||||
## quantilesGK
|
||||
## quantilesApprox
|
||||
|
||||
Exactly computes the [quantiles](https://en.wikipedia.org/wiki/Quantile) of a numeric data sequence using the [Greenwald-Khanna](https://dl.acm.org/doi/10.1145/375663.375670) algorithm.
|
||||
|
||||
**Syntax**
|
||||
|
||||
``` sql
|
||||
quantilesGK(accuracy, level1, level2, ...)(expr)
|
||||
quantilesApprox(accuracy, level1, level2, ...)(expr)
|
||||
```
|
||||
|
||||
**Arguments**
|
||||
@ -152,9 +152,9 @@ Query:
|
||||
|
||||
``` sql
|
||||
WITH arrayJoin([0, 6, 7, 9, 10]) AS x
|
||||
SELECT quantilesGK(100, 0.1, 0.2, 0.3)(x)
|
||||
SELECT quantilesApprox(100, 0.1, 0.2, 0.3)(x)
|
||||
|
||||
┌─quantilesGK(100, 0.1, 0.2, 0.3)(x)─┐
|
||||
│ [0,0,6] │
|
||||
└────────────────────────────────────┘
|
||||
┌─quantilesApprox(100, 0.1, 0.2, 0.3)(x)─┐
|
||||
│ [0,0,6] │
|
||||
└────────────────────────────────────────┘
|
||||
```
|
||||
|
Loading…
Reference in New Issue
Block a user