0

I have a dataset stored in mongodb database. i would like to calculate the standard deviation and square root of some data. How should i do this?

i have done some research about purescript but i still dont know how to start.

can anyone help me please? thx a lot

Community
  • 1
  • 1
Mickey Lau
  • 19
  • 1

1 Answers1

1

I don't believe Quasar (used by SlamData) support the square root function just yet, so the best you can do is to compute the square of the standard deviation, by applying the standard mathematical formula:

SELECT (x - AVG(x)) ^ 2 / COUNT(*) AS stdSquared FROM `/my/dataset/`

where x is the numeric field you are trying to compute the standard deviation of.

You should file a ticket on the Quasar JIRA or the Quasar open source project to add such functionality, or at least, to add a square root function.

John A. De Goes
  • 568
  • 3
  • 7