This topic provides the syntax for the <groups> element of a Query API SOAP request.
The <groups> element defines a grouping on a property or dimension property of an event, or on a grouping based on a period of time. For each <groups> element there is a column added to the result set. There may be multiple <groups> elements.
There are three elements contained by the <groups> element:
Element | Description |
---|---|
<dimension> | The name of a dimension associated with the event. Each <groups> element may have one and only one <dimension> element. |
<property> | The name of a property associated with the dimension. Each <groups> element must have one and only one <property> element. |
<timeGrouping> | The period of time for this grouping. This is an optional element
and takes an integer value. For details on the values used by the <timeGrouping> element, see the following table. Note: When grouping by time, you must set <dimension> to time and include an empty <property> element. For example:
<groups> <dimension>time</dimension> <property /> <timeGrouping>2</timeGrouping> </groups> |
Value | Description |
---|---|
0 | No time grouping. This is the same as omitting the <timeGrouping> element. |
1 | This value is not used. |
2 | Hour |
3 | Day |
4 | Week |
5 | Month |
6 | Year |