A.avg( x )

Read(141) Label: sequence, non-null member, average,

Description:

 Compute x with each member of the sequence and then compute the average value of the non-null members of the new sequence.

Syntax:

A.avg(x)

Equivalent to A.(x).avg()

Note:

The function computes x with each member of the sequence and returns the average value of the non-null members of the new sequence.

Parameters:

A

A sequence

x

Generally an expression of a single field name, or a legal expression composed of multiple field names

Return value:

Numerical values

Example:

 

A

 

1

=demo.query("select * from EMPLOYEE")

 

2

=A1.avg(SALARY)

Compute the average value of non-null values of SALARY

3

=A1.(SALARY+100).avg()

Add 100 to each value of SALARY and then compute the average value

Related functions:

A.avg()