ENFORM Reference Manual
Aggregates
ENFORM Language Elements
3–20 058057 Tandem Computers Incorporated
Figure 3-5. Query Outline of Qualification Aggregate with OVER Over-item Syntax
OPEN employee;
LIST regnum,
branchnum,
WHERE salary GT AVG( salary OVER regnum );
The qualification aggregate value for each group is:
regnum AVG salary
1 24666
2 28333
5 38000
99 39500
If employee has the following form when grouped by regnum and branchnum:
regnum branchnum salary
1 1 36000
19000
25000
26000
12000
2 30000
2 1 37000
25000
23000
5 3 38000
99 1 39500
The report produced is:
Region Branch
------ ------
2 1
1 1
1 1
1 1
1 2