Supported aggregations

Last updated:

|Edit this page

This is an ever-expanding list of enabled aggregations.

You can find their full definitions in the ClickHouse documentation. Additionally, we include a list of popular ones and their uses in the HogQL expressions and SQL insight documentation.

Standard aggregate functions

  • count
  • countIf
  • min
  • minIf
  • max
  • maxIf
  • sum
  • sumIf
  • avg
  • avgIf
  • any
  • anyIf
  • stddevPop
  • stddevPopIf
  • stddevSamp
  • stddevSampIf
  • varPop
  • varPopIf
  • varSamp
  • varSampIf
  • covarPop
  • covarPopIf
  • covarSamp
  • covarSampIf

ClickHouse-specific aggregate functions

  • anyHeavy
  • anyHeavyIf
  • anyLast
  • anyLastIf
  • argMin
  • argMinIf
  • argMax
  • argMaxIf
  • avgWeighted
  • avgWeightedIf
  • groupArray
  • groupUniqArray
  • groupArrayInsertAt
  • groupArrayInsertAtIf
  • groupArrayMovingAvg
  • groupArrayMovingAvgIf
  • groupArrayMovingSum
  • groupArrayMovingSumIf
  • groupBitAnd
  • groupBitAndIf
  • groupBitOr
  • groupBitOrIf
  • groupBitXor
  • groupBitXorIf
  • groupBitmap
  • groupBitmapIf
  • groupBitmapAnd
  • groupBitmapAndIf
  • groupBitmapOr
  • groupBitmapOrIf
  • groupBitmapXor
  • groupBitmapXorIf
  • sumWithOverflow
  • sumWithOverflowIf
  • deltaSum
  • deltaSumIf
  • deltaSumTimestamp
  • deltaSumTimestampIf
  • sumMap
  • sumMapIf
  • minMap
  • minMapIf
  • maxMap
  • maxMapIf
  • skewSamp
  • skewSampIf
  • skewPop
  • skewPopIf
  • kurtSamp
  • kurtSampIf
  • kurtPop
  • kurtPopIf
  • uniq
  • uniqIf
  • uniqExact
  • uniqExactIf
  • uniqHLL12
  • uniqHLL12If
  • uniqTheta
  • uniqThetaIf
  • simpleLinearRegression
  • simpleLinearRegressionIf
  • contingency
  • contingencyIf
  • cramersV
  • cramersVIf
  • cramersVBiasCorrected
  • cramersVBiasCorrectedIf
  • theilsU
  • theilsUIf
  • maxIntersections
  • maxIntersectionsIf
  • maxIntersectionsPosition
  • maxIntersectionsPositionIf

Questions?

Was this page useful?

Next article

HogQL tutorials

Got a question which isn't answered below? Head to the community forum to let us know! Check our product analytics tutorials for more information about analyzing events. Examples How to do time-based breakdowns (hour, minute, real time) in HogQL The power of HogQL's sum() aggregation Using HogQL for advanced time and date filters Using HogQL for advanced breakdowns How to filter and breakdown arrays with HogQL Analyzing events How to analyze autocapture events with HogQL How to analyze…

Read next article