var_samp returns the sample variance of a set of numbers after discarding the nulls in this set. You can use it as both an aggregate and analytic function.

The expr is a number expression, and the function returns a value of type NUMBER. 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 variance, except that given an input set of one element, variance returns 0 and var_samp returns null.