variance
aggregate function
Applies to: Databricks SQL Databricks Runtime
Returns the sample variance calculated from values of a group. This function is a synonym for var_samp aggregate function.
Syntax
variance ( [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 optional boolean expression filtering the rows used for aggregation.