Created
January 8, 2018 16:49
-
-
Save rbiswas4/98a0b22b4392dce3cf64fe0a03d3295d to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# sqlite has no function like std or var. This is a method of how it can be calculated | |
# assume we want to get the variance of the column fieldRA from the table Summary in a sqlite DB. In this case the following produces the variance | |
SELECT avg((SUMMARY.fieldRA - sub.a)*(SUMMARY.fieldRA - sub.a)) FROM Summary, (SELECT avg(fieldRA) as a FROM SUMMARY) AS sub; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment