STDEV() Function is a calculation based on the variance of a numeric range of values. : STDEV « Analytical Functions « SQL Server / T-SQL Tutorial






Actually, it's simply the square root of the variance.

8> Create Table MyValues (MyValue Float)
9> GO
1>
2> Insert Into MyValues (MyValue) SELECT 2
3> Insert Into MyValues (MyValue) SELECT 3
4> Insert Into MyValues (MyValue) SELECT 4
5> Insert Into MyValues (MyValue) SELECT 5
6> Insert Into MyValues (MyValue) SELECT 6
7> GO

(1 rows affected)

(1 rows affected)

(1 rows affected)

(1 rows affected)

(1 rows affected)
1>
2> SELECT VAR(MyValue) FROM MyValues
3> GO

------------------------
                     2.5

(1 rows affected)
1>
2> SELECT STDEV(MyValue) FROM MyValues
3>
4> drop table MyValues;
5> GO

------------------------
      1.5811388300841898

(1 rows affected)








14.10.STDEV
14.10.1.Aggregate Functions STDEV and STDEVP
14.10.2.STDEV() Function is a calculation based on the variance of a numeric range of values.
14.10.3.STDEV returns the standard deviation of all the values provided in the expression, based on a sample of the data population.