Function | Description |
---|

**approx_distinct(***x ***)** | *Returns the approximate number of distinct input values* |

**approx_distinct(***x, e***)** | *Returns the approximate number of distinct input values with a standard error less than e* |

**approx_percentile(***x, percentage ***)** | *Returns the approximate percentile for all input values of x at the given percentage* |

**approx_percentile(***x, percentages ***)** | *Returns the approximate percentile for all input values of x at each of the specified percentages* |

**approx_percentile(***x, w, percentage ***)** | *Returns the approximate weighed percentile for all input values of x using the per-item weight w at the percentage p* |

**approx_percentile(***x, w, percentage, accuracy***)** | *Returns the approximate weighed percentile for all input values of x using the per-item weight w at the percentage p, with a maximum rank error of accuracy* |

**approx_percentile(***x, w, percentages***)** | *Returns the approximate weighed percentile for all input values of x using the per-item weight w at each of the given percentages specified in the array* |

**arbitrary(***x***)** | *Returns an arbitrary non-null value of x * |

**array_agg(***x***)** | *Returns an array created from the input x elements* |

**avg(***x***)** | *Returns the average (arithmetic mean) of all input values* |

**bitwise_and_agg(***x***)** | *Returns the bitwise AND of all input values in 2’s complement representation* |

**bitwise_or_agg(***x ***)** | *Returns the bitwise OR of all input values in 2’s complement representation* |

**bool_and(***boolean ***)** | *Returns TRUE if every input value is TRUE, otherwise FALSE* |

**bool_or(***boolean***)** | *Returns TRUE if any input value is TRUE, otherwise FALSE* |

**checksum(***x ***)** | *Returns an order-insensitive checksum of the given values* |

**corr(***y, x***)** | *Returns correlation coefficient of input values* |

**count(**** ***)** | *Returns the number of input rows* |

**count(***x ***)** | *Returns the number of non-null input values* |

**count_if(***x ***)** | *Returns the number of TRUE input values* |

**covar_pop(***y, x***)** | *Returns the population covariance of input values* |

**covar_samp(***y, x***)** | *Returns the sample covariance of input values* |

**every(***boolean***)** | *Alias for bool_and() function* |

**geometric_mean(***x ***)** | *Returns the geometric mean of all input values* |

**histogram(***x***)** | *Returns a map containing the count of the number of times each input value occurs* |

**kurtosis(***x***)** | *Returns the excess kurtosis of all input values* |

**map_agg(***key, value***)** | *Returns a map created from the input key / value pairs* |

**map_union(***x<K, V>***)** | *Returns the union of all the input maps* |

**max(***x***)** | *Returns the maximum value of all input values* |

**max(***x, n***)** | *Returns n largest values of all input values of x* |

**max_by(***x, y***)** | *Returns the value of x associated with the maximum value of y over all input values* |

**max_by(***x, y, n ***)** | *Returns n values of x associated with the n largest of all input values of y in descending order of y* |

**min(***x***)** | *Returns the minimum value of all input values* |

**min(***x, n ***)** | *Returns n smallest values of all input values of x* |

**min_by(***x, y ***)** | *Returns the value of x associated with the minimum value of y over all input values* |

**min_by(***x, y, n ***)** | *Returns n values of x associated with the n smallest of all input values of y in ascending order of y* |

**multimap_agg(***key, value***)** | *Returns a multimap created from the input key / value pairs. Each key can be associated with multiple values* |

**numeric_histogram(***buckets, value***)** | *Computes an approximate histogram with up to buckets number of buckets for all values* |

**numeric_histogram(***buckets, value, weight ***)** | *Computes an approximate histogram with up to buckets number of buckets for all values with a per-item weight of weight* |

**regr_intercept(***y, x***)** | *Returns linear regression intercept of input values. y is the dependent value. x is the independent value* |

**regr_slope(***y, x***)** | *Returns linear regression slope of input values. y is the dependent value. x is the independent value* |

**skewness(***x ***)** | *Returns the skewness of all input values* |

**stddev(***x***)** | *Alias for stddev_samp() function* |

**stddev_pop(***x ***)** | *Returns the population standard deviation of all input values* |

**stddev_samp(***x ***)** | *Returns the sample standard deviation of all input values* |

**sum(***x***)** | *Returns the sum of all input values* |

**var_pop(***x***)** | *Returns the population variance of all input values* |

**var_samp(***x***)** | *Returns the sample variance of all input values* |

**variance(***x ***)** | *Alias for var_samp() function* |