聚合函数

本文列举ClickHouse中的聚合函数。

函数名称

文档链接

count

count

boundingRatio

boundingRatio

min

min

max

max

sum

sum

avg

avg

any

any

first_value

first_value

last_value

last_value

stddevPop

stddevPop

stddevSamp

stddevSamp

varPop(x)

varPop(x)

varSamp

varSamp

covarPop

covarPop

covarSamp

covarSamp

anyHeavy

anyHeavy

anyLast

anyLast

argMin

argMin

argMax

argMax

avgWeighted

avgWeighted

corr

corr

exponentialmovingaverage

exponentialmovingaverage

topK

topK

topKWeighted

topKWeighted

array_concat_agg

array_concat_agg

groupArray

groupArray

groupArrayLast

groupArrayLast

groupUniqArray

groupUniqArray

groupArrayInsertAt

groupArrayInsertAt

groupArrayMovingSum

groupArrayMovingSum

groupArrayMovingAvg

groupArrayMovingAvg

groupArraySample

groupArraySample

groupBitAnd

groupBitAnd

groupBitOr

groupBitOr

groupBitXor

groupBitXor

groupBitmap

groupBitmap

groupBitmapAnd

groupBitmapAnd

groupBitmapOr

groupBitmapOr

groupBitmapXor

groupBitmapXor

sumWithOverflow

sumWithOverflow

deltaSum

deltaSum

deltaSumTimestamp

deltaSumTimestamp

sumMap

sumMap

minMap

minMap

maxMap

maxMap

sumCount

sumCount

rankCorr

rankCorr

sumKahan

sumKahan

intervalLengthSum

intervalLengthSum

skewPop

skewPop

skewSamp

skewSamp

kurtPop

kurtPop

kurtSamp

kurtSamp

uniq

uniq

uniqExact

uniqExact

uniqCombined

uniqCombined

uniqCombined64

uniqCombined64

uniqHLL12

uniqHLL12

uniqTheta

uniqTheta

quantile

quantile

quantiles Functions

quantiles Functions

quantileExact Functions

quantileExact Functions

quantileExactWeighted

quantileExactWeighted

quantileInterpolatedWeighted

quantileInterpolatedWeighted

quantileGK

quantileGK

quantileTiming

quantileTiming

quantileTimingWeighted

quantileTimingWeighted

quantileDeterministic

quantileDeterministic

quantileTDigest

quantileTDigest

quantileTDigestWeighted

quantileTDigestWeighted

quantileBFloat16

quantileBFloat16

median

median

simpleLinearRegression

simpleLinearRegression

stochasticLinearRegression

stochasticLinearRegression

stochasticLogisticRegression

stochasticLogisticRegression

categoricalInformationValue

categoricalInformationValue

kolmogorovSmirnovTest

kolmogorovSmirnovTest

studentTTest

studentTTest

welchTTest

welchTTest

entropy

entropy

meanZTest

meanZTest

mannWhitneyUTest

mannWhitneyUTest

sparkbar

sparkbar

contingency

contingency

cramersV

cramersV

cramersVBiasCorrected

cramersVBiasCorrected

theilsU

theilsU

maxIntersections

maxIntersections

maxIntersectionsPosition

maxIntersectionsPosition

Aggregate Function Combinators

Aggregate Function Combinators

Parametric Aggregate Functions

Parametric Aggregate Functions

GROUPING

GROUPING