

Sample variance of the input values (square of the sample standard deviation) Population variance of the input values (square of the population standard deviation)

Sample standard deviation of the input values Population standard deviation of the input values Smallint, int, bigint, real, double precision, or numericĭouble precision for floating-point arguments, otherwise numeric Sum( Y^2) - sum( Y)^2/ N ( "sum of squares" of the dependent variable) Sum( X* Y) - sum( X) * sum( Y)/ N ( "sum of products" of independent times dependent variable) Sum( X^2) - sum( X)^2/ N ( "sum of squares" of the independent variable) Slope of the least-squares-fit linear equation determined by the ( X, Y) pairs Y-intercept of the least-squares-fit linear equation determined by the ( X, Y) pairs Number of input rows in which both expressions are nonnull Aggregate Functions for Statistics FunctionĪverage of the independent variable ( sum( X)/ N)Īverage of the dependent variable ( sum( Y)/ N) In all cases, null is returned if the computation is meaningless, for example when N is zero. (These are separated out merely to avoid cluttering the listing of more-commonly-used aggregates.) Where the description mentions N, it means the number of input rows for which all the input expressions are non-null. Table 9-50 shows aggregate functions typically used in statistical analysis.
XSECTION 9.5 PORTABLE
For example: SELECT xmlagg(x) FROM (SELECT x FROM test ORDER BY y DESC) AS tab īut this syntax is not allowed in the SQL standard, and is not portable to other database systems. Alternatively, supplying the input values from a sorted subquery will usually work. This ordering is unspecified by default, but can be controlled by writing an ORDER BY clause within the aggregate call, as shown in Section 4.2.7. The aggregate functions array_agg, json_agg, jsonb_agg, json_object_agg, jsonb_object_agg, string_agg, and xmlagg, as well as similar user-defined aggregate functions, produce meaningfully different result values depending on the order of the input values. Will require effort proportional to the size of the table: PostgreSQL will need to scan either the entire table or the entirety of an index which includes all rows in the table. A query like: SELECT count(*) FROM sometable Note: Users accustomed to working with other SQL database management systems might be disappointed by the performance of the count aggregate when it is applied to the entire table. The coalesce function can be used to substitute zero or an empty array for null when necessary. In particular, sum of no rows returns null, not zero as one might expect, and array_agg returns null rather than an empty array when there are no input rows. It should be noted that except for count, these functions return a null value when no rows are selected. Sum of expression across all non-null input valuesĬoncatenation of non-null XML values (see also Section 9.14.1.7) Smallint, int, bigint, real, double precision, numeric, interval, or moneyīigint for smallint or int arguments, numeric for bigint arguments, otherwise the same as the argument data type Non-null input values concatenated into a string, separated by delimiter Minimum value of expression across all non-null input values Maximum value of expression across all non-null input values Number of input rows for which the value of expression is not nullĪggregates values, including nulls, as a JSON arrayĪggregates name/value pairs as a JSON object values can be null, but not namesĪny numeric, string, date/time, network, or enum type, or arrays of these types True if at least one input value is true, otherwise false True if all input values are true, otherwise false The bitwise OR of all non-null input values, or null if none

The bitwise AND of all non-null input values, or null if none The average (arithmetic mean) of all non-null input values Numeric for any integer-type argument, double precision for a floating-point argument, otherwise the same as the argument data type Smallint, int, bigint, real, double precision, numeric, or interval Input arrays concatenated into array of one higher dimension (inputs must all have same dimensionality, and cannot be empty or null) Input values, including nulls, concatenated into an array General-Purpose Aggregate Functions Function

XSECTION 9.5 SERIES
Release team meeting (Decision not to use openSSL with Qt 5.9 series ).Tools used when building & packaging Qt 5.9 3 Tools used when building & packaging Qt 5.9.
