Aggregate functions for statistics (e.g., stddev)
SuperSQL currently lacks built-in aggregate functions for calculating statistics (such as standard deviation and variance).
Details
At the time this issue is being opened, super is at commit 6ca49b7a.
A user recently inquired in a community Slack thread:
i trying to make standard deviation op, any tips?
SuperSQL currently lacks these as built-in functions, but since we aspire to have base SQL support similar to what's found in Postgres we recognize we should add them, e.g., here's the list of the ones in Postgres.
@mccanne has noted that Welford's online algorithm is an accepted "one-pass" approach for calculating variance and therefore we should probably use it in our own implementation.
Rolling versions is also good idea.
So the x last values is used for calculating and not all of them