Switch to: V11V10V9V8V7V6V5

Aggregative Functions

Statistic function takes as an argument group of values and returns one result value which summing up source data in certain way.

There are following statistic functions:

  • SUM(expr) computes the sum of all field values;
  • AVG(expr) computes average of all field values;
  • MIN(expr) finds the less inside all field values;
  • MAX(expr) finds the greatest inside all field values;
  • COUNT(expr) counts the number of values contained in the field;


Plus non-standard Valentina extensions of SQL:

  • STDDEV(expr) standard deviation of field values.
  • STDDEV_POP(expr) population standard deviation of field values.
  • BIT_AND( expr )
  • BIT_OR( expr )
  • BIT_XOR( expr )
  • COVAR( expr1, expr2 ) returns the population covariance of a set of number pairs.
  • CORR( expr1, expr2 ) returns the coefficient of correlation of a set of number pairs.
  • GROUP_CONCAT( expr [SEPARATOR ','] ) returns concat. from all not-null values of the group.
  • FIRST( expr ) returns first value in each group.
  • LAST( expr ) returns last value in each group.


The argument of statistic function can be a regular field name or the expression