- GroupComputation

The computation expression string. Except **count**, expression string is required for all other computation types.

The name of the computation which will be reported in the result of QueryBuilder.compute method execution. If you are defining more than one group computation, then their names need to be unique.

Defines the sort direction of computed field. If sort direction is specified as either `asc`

or `desc`

, computed groups will be sorted accordingly.

Defines the type of the computation

**count:**Counts the number of objects in each group**countif:**Counts the number of objects in each group based on the result of the specified expression. If the expression evaluates to true then they are counted otherwise not.**sum:**Sums the evaluated expression values for each group member. The expression needs to return an integer or decimal value.**avg:**Averages the evaluated expression values for the overall group. The expression needs to return an integer or decimal value.**min:**Calculates the minimum value of the evaluated expression for the overall group. The expression needs to return an integer or decimal value.**max:**Calculates the maximum value of the evaluated expression for the overall group. The expression needs to return an integer or decimal value.

Generated using TypeDoc

Defines the structure of grouped object computations. Basically, it provides aggregate calculation instructions to QueryBuilder.compute method

GroupComputation