STDDEV: population standard deviation
MySQL aggregate function STDDEV() returns population standard deviation of the input field. It returns NULL if no matching row is found.
STDDEV() is synonym of the sql function STDDEV_POP().
STD() is also synonym of the sql function STDDEV_POP().
Here are some examples using our student table.
SELECT STDDEV(mark) , STD(mark), STDDEV_POP(mark) FROM `student`
Output is here
STDDEV(mark) | STD(mark) | STDDEV_POP(mark) |
16.49766163752223 | 16.49766163752223 | 16.49766163752223 |
By using FORMAT()
Restrict decimal places by using FORMAT()
SELECT FORMAT(STDDEV(mark),2) FROM `student`
Output is here
FORMAT(STDDEV(mark),2) |
16.50 |
← SQL Math References
Variance→
Average value Query →
← Subscribe to our YouTube Channel here
This article is written by plus2net.com team.
https://www.plus2net.com
plus2net.com