Scoped GlideAggregate - getAggregateEncodedQuery()

Gets the query necessary to return the current aggregate.

Table 1. Parameters
Name Type Description
none
Table 2. Returns
Type Description
String The encoded query to get the aggregate.
var count = new GlideAggregate('incident');
count.addAggregate('MIN', 'sys_mod_count');
count.groupBy('category');
count.query();  
while (count.next()) {
    gs.info(count.getAggregateEncodedQuery());
}
Output:
category=database
category=hardware
category=inquiry
category=network
category=request
category=software