Opened 2 weeks ago

Last modified 2 weeks ago

#1557 new enhancement

stddev / var condensers

Reported by: dmisev Owned by:
Priority: major Milestone: 9.5
Component: qlparser Version: development
Keywords: Cc: pbaumann, bbell, vmerticariu
Complexity: Medium

Description (last modified by dmisev)

SQL and various array DBMS support standard deviation and variance aggregations. Quoting from the SQL standard:

  • If VAR_POP is specified, then the population variance of <value expression> evaluated for each row that qualifies, defined as the sum of squares of the difference of <value expression> from the mean of <value expression>, divided by the number of rows that qualify.
  • If VAR_SAMP is specified, then the sample variance of <value expression> evaluated for each row that qualifies, defined as the sum of squares of the difference of <value expression> from the mean of <value expression>, divided by the number of rows that qualify minus 1 (one).
  • If STDDEV_POP is specified, then the population standard deviation of <value expression> evaluated for each row that qualifies, defined as the square root of the population variance.
  • If STDDEV_SAMP is specified, then the sample standard deviation of <value expression> evaluated for each row that qualifies, defined as the square root of the sample variance.

Change History (1)

comment:1 Changed 2 weeks ago by dmisev

  • Description modified (diff)
Note: See TracTickets for help on using tickets.