VARIANCE: population standard variance

VARIANCE() Query MySQL aggregate function VARIANCE() returns population standard variance of the input field / data. It returns NULL if no matching row is found.

VARIANCE() is synonym of the SQL function VAR_POP().
VAR_SAMP() returns the sample variance .

Here are some examples using our student table.



SELECT  VARIANCE(mark),VAR_POP(mark), VAR_SAMP(mark) FROM `student`
Output is here
VARIANCE(mark)VAR_POP(mark)VAR_SAMP(mark)
272.1728395061727272.1728395061727282.6410256410255

By using FORMAT()

Restrict decimal places by using FORMAT()

SELECT  FORMAT(VARIANCE(mark),2) FROM `student`
Output is here
FORMAT(VARIANCE(mark),2)
272.17
SQL Math References Standard deviation Average value Query
Subscribe to our YouTube Channel here


Subscribe

* indicates required
Subscribe to plus2net

    plus2net.com

    Post your comments , suggestion , error , requirements etc here





    SQL Video Tutorials










    We use cookies to improve your browsing experience. . Learn more
    HTML MySQL PHP JavaScript ASP Photoshop Articles FORUM . Contact us
    ©2000-2024 plus2net.com All rights reserved worldwide Privacy Policy Disclaimer