Target Aggregates; Target Aggregate With Over All Syntax; Figure 3-3. Query Outline Of Target-Aggregate With Over All Syntax - Tandem ENFORM 058057 Reference Manual

Data management library
Table of Contents

Advertisement

ENFORM Language Elements
Aggregates

Target Aggregates

3–16
The user-aggregate name is grossavg. The formal-argument is x. The step-expression is
(grossavg + .10 * x). The end-expression is grossavg/COUNT (x).
This user-aggregate could be used to compare the new gross salaries to the old
average salary:
LIST
AVG (salary), grossavg (salary);
A target aggregate appears as part of the ENFORM output. When you specify a target
aggregate, follow these rules:
The field names in the target aggregate syntax can come from different data base
records.
Over-item must be a by-item.
Target aggregates cannot be nested; that is, one aggregate cannot be used as the
argument for another aggregate.
The UNIQUE syntax cannot be used with an aggregate computed over a by-item.

Target Aggregate with OVER ALL Syntax

When you specify a target aggregate without specifying either OVER or OVER ALL,
ENFORM assumes OVER ALL. Figure 3-3 shows both a query outline using the
OVER ALL syntax and an output diagram.

Figure 3-3. Query Outline of Target-Aggregate with OVER ALL Syntax

by-item-1
by-item-2
xxxxx
xxxxxx
xxxxxx
xxxxx
xxxxxx
058057 Tandem Computers Incorporated
LIST BY by-item-1, BY by-item-2,
target-item-1...,
target-item-2...,
AVG(target-item-2 OVER ALL);
target-
target-
item-1
item-2
|---------|
xxxxxx
| xxxxxxx |
xxxxxx
| xxxxxxx |
xxxxxx
| xxxxxxx |
xxxxxx
| xxxxxxx |
xxxxxx
| xxxxxxx |
xxxxxx
| xxxxxxx |
xxxxxx
| xxxxxxx |
xxxxxx
| xxxxxxx |
xxxxxx
| xxxxxxx |
|---------|
total/number of target-item-2=
AVG
Target-item-2
xxxxxxxxxxx

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Enform

Table of Contents