STAT

Generates a total sum, an average, and a count of a specified attribute.

Syntax

STAT file-specifier{item-list}attribute-name {selection-criteria}{USING file-specifier}{macro-call}{(options}

Refer to Sentence Structure for descriptions of these parameters.

Comments

Use SUM if all you need is a total sum.

Examples

In the first example, all items in the file are specified because no selection criteria are specified.

:STAT GUESTS BILL-TOTAL
STATISTICS OF Bill Total :
TOTAL = $3,639.99 AVERAGE = $151.6662 COUNT = 24

In the second example, a selection criterion is specified.

:STAT GUESTS WITH BILL-TOTAL > "240.00" BILL-TOTAL

STATISTICS OF Bill Total :
TOTAL = $772.86 AVERAGE = $257.6200 COUNT = 3