Previous Topic: Add Multiple Entity ViewsNext Topic: Use Expressions as Functions


Use Multiple Functions

You can use multiple functions in a single SUMMARIZE statement as discussed in the following examples:

Same Entity View

To find the lowest and highest employee salaries, use a statement similar to the following example:

SUMMARIZE employee 
PLACING minimum (employee salary) 
INTO local_min employee salary 
PLACING maximum(employee salary) 
INTO local_max employee salary 
Multiple Entity Views

To find the average number of semester hours and grade-point average for all seniors, use a statement similar to the following example:

SUMMARIZE student 
class 
PLACING average (class semester_hours) 
INTO local class semester_hours 
PLACING average(student grade_point_avg) 
INTO local student grade_point_avg 
WHERE DESIRED student attends DESIRED class 
AND DESIRED student grade_level = 12