The results of compound/multi-metric queries are returned using groupset elements for each combination of metric function and
GROUP function. If there are
m metric functions and
n GROUP functions, the result will contain
m x n groupset elements. Each
groupset identifies the metric and grouping parameter for which it provides results.
<aggregate metric="COUNT(*),
MAX(Size),
AVERAGE(Size)" group="
GROUP(TOP(2,Tags),Subject),
GROUP(TRUNCATE(SendDate,DAY))"/>
<groupset group="TOP(2,Tags),Subject" metric="COUNT(*)">...</groupset>
<groupset group="TRUNCATE(SendDate,DAY)" metric="COUNT(*)">...</groupset>
<groupset group="TOP(2,Tags),Subject" metric="MAX(Size)">...</groupset>
<groupset group="TRUNCATE(SendDate,DAY)" metric="MAX(Size)">...</groupset>
<groupset group="TOP(2,Tags),Subject" metric="AVERAGE(Size)">...</groupset>
<groupset group="TRUNCATE(SendDate,DAY)" metric="AVERAGE(Size)">...</groupset>
"group": "GROUP(TOP(2,Tags),Origin),
GROUP(TRUNCATE(SendDate,DAY))",
{"groupset":
{"group": "TOP(2,Subject),Origin",
"metric": "COUNT(*)", ...
}},
{"groupset":
{"group": "TRUNCATE(SendDate,DAY)",
"metric": "COUNT(*)", ...
}},
{"groupset":
{"group": "TOP(2,Subject),Origin",
"metric": "MAX(Size)", ...
}},
{"groupset":
{"group": "TRUNCATE(SendDate,DAY)",
"metric": "MAX(Size)", ...
},
{"groupset":
{"group": "TOP(2,Subject),Origin",
"metric": "AVERAGE(Size)", ...
}},
{"groupset":
{"group": "TRUNCATE(SendDate,DAY)",
"metric": "AVERAGE(Size)", ...
}}
Though not shown here, each groupset will contain
groups,
summary, and
totalgroups elements as required by each GROUP function. If the query requests composite grouping (
&cf), a
groupset with multi-level grouping will contain a composite group for non-leaf groups.