Skip to content

VAR_SAMP

  • x: This represents the variable or expression of a set of values from which the sample variance is to be calculated. It is typically a column name in a MySQL table.
SELECT VAR_SAMP(grade) AS Sample_Variance FROM Students;
Sample_Variance
-----------------
13.2

The SQL statement calculates the sample variance of the grade column from the Students table. The sample variance is a measure of the dispersion of a set of data points around their mean value.