Spider Aggregate Queries : Grouping Parameter : Group Fields as Grouping Parameters

Group Fields as Grouping Parameters
Doradus Spider allows a group field to be used as a grouping expression if all of its leaf fields are links. For example, in the example schema the group field Participants contains links Sender, InternalRecipients, and ExternalRecipients, all pointing to the Participant table. If the Participants field is used as a grouping parameter, the values (object IDs) for all three links are combined into a set for each perspective object. The object is included in the metric computation for each group for which it has a value. If a perspective object has no values for any of the links, it is included in the (null) group.
Link paths and WHERE filters can be used on the group field with the same syntax as allowed for links. For example:
f=Participants.Person.Name
f=Participants.WHERE(ReceiptDate > 2014-02-01).Person.Name
f=Participants.Person.WHERE(Department:Sales).Name
In the first example, the combined Person.Name values of each link (ExternalRecipients, InternalRecipients, and Sender) form the grouping sets; each perspective object is included in each set in which it participates. If a perspective object has no Participants.Person.Name values, it is included in the null group.
The second and third examples using the same grouping parameter: Participants.Person.Name. However, the presence of the WHERE filter causes nulls to be handled differently:
In the second example, a perspective object is simply skipped if it has no participants or none of its participants are selected by the expression ReceiptDate > 2014-02-01. When a perspective is selected by the WHERE expression but it is has no Person.Name values, it is included in the (null) group.
In the third example, a perspective object is skipped if it has no participants, no participants have Person values, or no Person.Department field includes the term Sales. Only if a perspective object is chosen but has no Name values is it included in the (null) group.