Statistical expressions compute values based on a value expression evaluated for each record in a record stream. Format To specify the average, maximum, minimum, standard deviation, or total: { AVERAGE } { MAX } { MIN } value-expression [OF rse] { STD_DEV } { } { TOTAL } To specify the count: COUNT [OF rse] To specify the running count: RUNNING COUNT To specify the running total: RUNNING TOTAL value-expression
1 – Arguments
value-expression Is a DEC DATATRIEVE value expression on which the statistical function operates. OF rse Is a record selection expression you can use to form a record stream of the records to which the statistical function applies. Values Derived with Statistical Functions shows the operations performed by the DEC DATATRIEVE statistical functions. Table 1 Values Derived with Statistical Functions Function Value of Function AVERAGE The average value of the value expression COUNT The number of records in the CURRENT collection or in a specified collection or record stream MAX The largest value of the value expression MIN The smallest value of the value expression RUNNING COUNT The running count of the evaluations of the PRINT statement RUNNING TOTAL The running total of the value expression for each evaluation of the PRINT statement STD_DEV The standard deviation of the value expression TOTAL The total value of the value expression