Aggregation function types at a glance
Artikel 08/12/2024
7 deltagare
Feedback
I den här artikeln
Applies to: ✅ Microsoft Fabric ✅ Azure Data Explorer ✅ Azure Monitor ✅ Microsoft Sentinel
An aggregation function performs a calculation on a set of values, and returns a single value. These functions are used in conjunction with the summarize operator . This article lists all available aggregation functions grouped by type. For scalar functions, see Scalar function types .
Binary functions
Function Name
Description
binary_all_and()
Returns aggregated value using the binary AND of the group.
binary_all_or()
Returns aggregated value using the binary OR of the group.
binary_all_xor()
Returns aggregated value using the binary XOR of the group.
Dynamic functions
Row selector functions
Function Name
Description
arg_max()
Returns one or more expressions when the argument is maximized.
arg_min()
Returns one or more expressions when the argument is minimized.
take_any() , take_anyif()
Returns a random non-empty value for the group without/with a predicate.
Statistical functions
Function Name
Description
avg()
Returns an average value across the group.
avgif()
Returns an average value across the group (with predicate).
count() , countif()
Returns a count of the group without/with a predicate.
count_distinct() , count_distinctif()
Returns a count of unique elements in the group without/with a predicate.
dcount() , dcountif()
Returns an approximate distinct count of the group elements without/with a predicate.
hll()
Returns the HyperLogLog (HLL) results of the group elements, an intermediate value of the dcount
approximation.
hll_if()
Returns the HyperLogLog (HLL) results of the group elements, an intermediate value of the dcount
approximation (with predicate).
hll_merge()
Returns a value for merged HLL results.
max() , maxif()
Returns the maximum value across the group without/with a predicate.
min() , minif()
Returns the minimum value across the group without/with a predicate.
percentile()
Returns a percentile estimation of the group.
percentiles()
Returns percentile estimations of the group.
percentiles_array()
Returns the percentile approximates of the array.
percentilesw()
Returns the weighted percentile approximate of the group.
percentilesw_array()
Returns the weighted percentile approximate of the array.
stdev() , stdevif()
Returns the standard deviation across the group for a population that is considered a sample without/with a predicate.
stdevp()
Returns the standard deviation across the group for a population that is considered representative.
sum() , sumif()
Returns the sum of the elements within the group without/with a predicate.
tdigest()
Returns an intermediate result for the percentiles approximation, the weighted percentile approximate of the group.
tdigest_merge()
Returns the merged tdigest
value across the group.
variance() , varianceif()
Returns the variance across the group without/with a predicate.
variancep()
Returns the variance across the group for a population that is considered representative.