arbitrary(x) → [类型与输入参数相同]

array_agg(x) → array<[类型和输入参数相同]>

avg(x) → double

bool_and(boolean) → boolean

bool_or(boolean) → boolean

checksum(x) → varbinary

count(*) → bigint

count(x) → bigint

count_if(x) → bigint

every(boolean) → boolean

geometric_mean(x) → double

max_by(x, y) → [与x类型相同]

max_by(x, y, n) → `array<[与x类型相同]>`

x 与 y 的全部关联中， 以 y 降序排列前 n 个最大值所关联的 x 值中， 返回前 n 个值

min_by(x, y) → [与x类型相同]

min_by(x, y, n) → `array<[与x类型相同]>`

x 与 y 的全部关联中， 以 y 升序排列前 n 个值所关联的 x 值中， 返回前 n 个值

max(x) → [与输入类型相同]

max(x, n) → array`<[与x类型相同]>`

min(x) → [与输入类型相同]

min(x, n) → `array<[与x类型相同]>`

sum(x) → [和输入类型相同]

位聚合函数

bitwise_and_agg(x) → bigint

bitwise_or_agg(x) → bigint

映射表聚合函数

histogram(x) → `map<K,bigint>`

map_agg(key, value) → `map<K,V>`

map_union`(x<K, V>)``map<K,V>`

multimap_agg(key, value) → `map<K,array<V>>`

近似计算聚合函数

approx_distinct(x) → bigint

approx_distinct(x, e) → bigint

approx_percentile(x, percentage) → [与x类型相同]

approx_percentile(x, percentages) → `array<[与x类型相同]>`

approx_percentile(x, w, percentage) → [与x类型相同]

approx_percentile(x, w, percentage, accuracy) → [与x类型相同]

approx_percentile(x, w, percentages) → `array<[与x类型相同]>`

numeric_histogram(buckets, value, weight) → `map<double, double>`

```Yael Ben-Haim and Elad Tom-Tov, "A streaming parallel decision tree algorithm", J. Machine Learning Research 11 (2010), pp. 849--872.```

buckets 必须是 bigint 类型. value 和 weight 必须是数值类型。

numeric_histogram(buckets, value) → `map<double, double>`按照 buckets 桶的数量,为所有的 value 计算近似直方图,本函数与 numeric_histogram() 相同，只是 weight 为1.

统计聚合函数

corr(y, x) → double

covar_pop(y, x) → double

covar_samp(y, x) → double

regr_intercept(y, x) → double

regr_slope(y, x) → double

stddev(x) → double

stddev_pop(x) → double

stddev_samp(x) → double

variance(x) → double

var_pop(x) → double

var_samp(x) → double