Changes between Initial Version and Version 1 of Ticket #1557


Ignore:
Timestamp:
May 12, 2017, 8:53:26 AM (8 years ago)
Author:
Dimitar Misev
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #1557 – Description

    initial v1  
    11SQL and various array DBMS support standard deviation and variance aggregations. Quoting from the SQL standard:
    22
    3 - If VAR_POP is specified, then the population variance of <value expression> evaluated for each row that
    4 qualifies, defined as the sum of squares of the difference of <value expression> from the mean of <value
    5 expression>, divided by the number of rows that qualify.
    6 - If VAR_SAMP is specified, then the sample variance of <value expression> evaluated for each row that
    7 qualifies, defined as the sum of squares of the difference of <value expression> from the mean of <value
    8 expression>, divided by the number of rows that qualify minus 1 (one).
    9 - If STDDEV_POP is specified, then the population standard deviation of <value expression> evaluated for
    10 each row that qualifies, defined as the square root of the population variance.
    11 - If STDDEV_SAMP is specified, then the sample standard deviation of <value expression> evaluated for
    12 each row that qualifies, defined as the square root of the sample variance.
     3- 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.
     4- 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).
     5- 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.
     6- 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.