VARIANCE , VARIANCE_SAMP¶
Returns the sample variance of non-NULL records in a group. If all records inside a group are NULL, a NULL is returned.
These functions are synonymous and are aliases for VAR_SAMP.
VARIANCE( [ DISTINCT ] x ) VARIANCE_SAMP( [ DISTINCT ] x )
For single-record inputs, VARIANCE, VARIANCE_SAMP, and VAR_SAMP all return NULL. This is different from the Oracle behavior, where VAR_SAMP returns NULL for a single record and VARIANCE returns 0.