Skip to content

Conversation

@kelvincesar
Copy link

This implementation computes the sample standard deviation, which is the same convention used by most SQL engines (e.g. PostgreSQL).

Description

  • Extends the percentile extension by adding a stddev aggregation;
  • Implements the stddev(expr) aggregate using Welford’s algorithm;
  • Adds extension tests for stddev in both grouped and ungrouped queries.

Motivation and context

Standard deviation is a common statistical measure that can be helpful in many use cases.

This resolves #1060.

* Implement stddev aggregate using Welford’s algorithm (stddev(expr));
* Add extension tests for stddev in grouped and ungrouped queries.
Copy link

@turso-bot turso-bot bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please review @pedrocarlo

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Standard deviation aggregate function

1 participant