Skip to content

STDDEV_SAMP

  • expr: The expression or column on which the standard deviation function will be calculated. It must be a floating-point expression.
SELECT
STDDEV_SAMP(price)
FROM
products;
+-------------------+
| STDDEV_SAMP(price)|
+-------------------+
|3568.421013 |
+-------------------+

STDDEV_SAMP returns the sample standard deviation of a column. In the provided example, it calculates the sample standard deviation of the ‘price’ column in the ‘products’ table. The returned value, 3568.421013, represents the amount of variation in pricing.