postgres.aggregates.BitAnd

class BitAnd(expression, **extra) [source] Returns an int of the bitwise AND of all non-null input values, or None if all values are null.

postgres.aggregates.BitOr

class BitOr(expression, **extra) [source] Returns an int of the bitwise OR of all non-null input values, or None if all values are null.

postgres.aggregates.BoolAnd

class BoolAnd(expression, **extra) [source] Returns True, if all input values are true, None if all values are null or if there are no values, otherwise False .

postgres.aggregates.BoolOr

class BoolOr(expression, **extra) [source] Returns True if at least one input value is true, None if all values are null or if there are no values, otherwise False.

postgres.aggregates.Corr

class Corr(y, x) [source] Returns the correlation coefficient as a float, or None if there aren’t any matching rows.

postgres.aggregates.CovarPop

class CovarPop(y, x, sample=False) [source] Returns the population covariance as a float, or None if there aren’t any matching rows. Has one optional argument: sample By default CovarPop returns the general population covariance. However, if sample=True, the return value will be the sample population covariance.

postgres.aggregates.CovarPop.sample

sample By default CovarPop returns the general population covariance. However, if sample=True, the return value will be the sample population covariance.

postgres.aggregates.RegrAvgX

class RegrAvgX(y, x) [source] Returns the average of the independent variable (sum(x)/N) as a float, or None if there aren’t any matching rows.

postgres.aggregates.RegrAvgY

class RegrAvgY(y, x) [source] Returns the average of the dependent variable (sum(y)/N) as a float, or None if there aren’t any matching rows.

postgres.aggregates.RegrCount

class RegrCount(y, x) [source] Returns an int of the number of input rows in which both expressions are not null.