VAR_SAMP returns the sample variance of a set of numbers after discarding the nulls in this set. The expr is a numeric expression, and the function returns a value of type NUMERIC. If the function is applied to an empty set, then it returns null. The function makes the following calculation:
(SUM(expr2) - SUM(expr)2 / COUNT(expr)) / (COUNT(expr) - 1)
This function is similar to VAR, except that given an input set of one element, VAR returns 0 and VAR_SAMP returns null.
The function returns a value of type NUMERIC. If the function is applied to an empty set, then it returns null.