image\Dql_0024.gifConditional Statistical Operators

Type

Operator

Purpose

Conditional Statistical Operators generate statistical information about specific conditions that occur in a set of records.

The DQL uses three Conditional Statistical Operators: item, count, and percent.

 

Usage

In a script, the Conditional Statistical Operator is inserted after a list item that is compared to a specified value. The operator is separated from the comparison by a colon.

Example

for MEMBERS ;

list records

LAST NAME in order ;

TOTAL DUE ;

TOTAL DUE > 100 : item count percent .

end

 

This script tells DataEase: (1) Process all the MEMBERS records, (2) list each member's LAST NAME and TOTAL DUE, (3) for each member, display a YES or NO answer indicating if the member's TOTAL DUE is greater than $100, (4) display the total number of members whose TOTAL DUE is greater than $100, and (5) display the number of members that have a TOTALDUE greater than $100 as a percentage of all the members.

The output from this script arranged in alphabetical order by LAST NAME might look as follows:

 

Last Name

Total Due

Total over $100

Adams

85.00

NO

Albert

120.00

YES

Andersen

120.00

YES

Anderson

70.00

NO

Archer

115.00

YES

Baldwin

100.00

YES

Beauchamp

35.00

NO

Beauchamp

85.00

NO

Beecher

85.00

NO

Bennington

135.00

YES

Bickford

135.00

YES

Birnbaum

65.00

NO

Blake

85.00

NO

Borusiewicz

100.00

NO

...

...

...

 Count: 44

 Percent: 23%