Generating Statistics for a Numeric Attribute

The STAT command combines the functions of the COUNT and SUM commands and also averages the value of a numeric attribute. The result is three values:

  1. The total of the data in the numeric attribute

  2. The average value of this data

  3. The number of items selected

This command is generally used for analysis rather than reporting.

This query displays statistics about the sale amounts (AMOUNT) for the book whose code is N01:

>STAT ORDERS AMOUNT WITH BOOKCODE = "N01"

STATISTICS OF AMOUNT:

TOTAL = $2524.00    AVERAGE = $315.0050    COUNT =

See Also

Generating Statistics (COUNT, SUM, and STAT)

Counting File Items

Totalling a Numeric Attribute