Note
Kailangan ng pahintulot para ma-access ang page na ito. Maaari mong subukang mag-sign in o magpalit ng mga direktoryo.
Ang pag-access sa pahinang ito ay nangangailangan ng pahintulot. Maaari mong subukang baguhin ang mga direktoryo.
Applies to:
Databricks SQL
Databricks Runtime
Returns the skewness value calculated from values of a group.
Syntax
skewness ( [ALL | DISTINCT ] expr ) [FILTER ( WHERE cond ) ]
This function can also be invoked as a window function using the OVER clause.
Arguments
expr: An expression that evaluates to a numeric.cond: An optionalBOOLEANexpression filtering the rows used for aggregation.
Returns
A DOUBLE.
If DISTINCT is specified the function operates only on a unique set of expr values.
Examples
> SELECT skewness(col) FROM VALUES (-10), (-20), (100), (1000), (1000) AS tab(col);
0.3853941073355022
> SELECT skewness(DISTINCT col) FROM VALUES (-10), (-20), (100), (1000), (1000) AS tab(col);
1.1135657469022011
> SELECT skewness(col) FROM VALUES (-1000), (-100), (10), (20) AS tab(col);
-1.1135657469022011