Stddevw_samp Function

The stddevw_samp function returns the weighted standard deviation of the sample for a set of values.


The syntax of the stddevw_samp function is


x are the values for which the standard deviation of the sample shall be calculated.
Null values are ignored.
If the number of values is zero, the function returns null.
w are the weights. If no value is provided the weight is assumed to be 1.


SELECT country, stddevw_samp(price)
  FROM sales
  GROUP BY country;