Get the App
SLTechnology News&Howtos  ›  Servers  › 

What aggregate functions does hive have?

Shulou Source: shulou.com Published: 2022-05-31 20:57:53 10月03日 Update

This article will explain in detail what aggregate functions there are in hive. The editor thinks it is very practical, so I share it with you for reference. I hope you can get something after reading this article.

★ aggregate function

Count,sum,min,max,avg

Var_pop (col) returns the variance of the specified column

Var_samp (col) returns the sample variance of the specified column

Stddev_pop (col) returns the deviation (standard deviation) of the specified column stddev_pop = stddev

Stddev_samp (col) returns the sample deviation (standard deviation) of the specified column

Covar_pop (col1, col2) two-column numerical covariance

If the change trend of the two variables is the same, then the covariance between the two variables is positive.

If the change trend of two variables is opposite, then the covariance between two variables is negative.

If X and Y are statistically independent, then the covariance between them is 0.

Covar_samp (col1, col2) two-column numerical sample covariance

Corr (col1, col2) returns the correlation coefficient of two columns of values (deviation covariance)

Percentile (BIGINT col, p) returns the percentage numeric point of the numeric region. 0

Tags: Arrays functions values elements covariances parameters percentage two digits variables support between deviations that is methods samples histograms articles types similar Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Xiaomi Docker Microsoft macOS NVidia