A subgroup can be based on more than one common attribute. Each common attribute used must appear in both the WITH THE SAME clause and the PLACING clause.
Use the following statement to find the number of classes by subject that start at a given time:
SUMMARIZE EACH GROUP OF class WITH THE SAME class_subject class_start_time PLACING class_subject INTO local class subject PLACING class_start_time INTO local class start time PLACING GROUP count(OCCURRENCES) INTO local ief_supplied count
Use the following statement to find the total salary of exempt and non-exempt employees by department:
SUMMARIZE EACH GROUP OF employee department WITH THE SAME department id employee classification PLACING department id INTO out department id PLACING employee classification INTO out employee classification PLACING GROUP sum(employee salary) INTO out employee salary WHERE DESIRED employee belongs_to DESIRED department
Note: Department is not used by any aggregate function, but needs to be in the read list because it provides a common subgroup attribute.
|
Copyright © 2014 CA.
All rights reserved.
|
|