Scoped GlideAggregate - getEncodedQuery()

Retrieves the encoded query.

Table 1. Parameters
Name Type Description
none
Table 2. Returns
Type Description
String The encoded query.
var count = new GlideAggregate('incident');
count.addAggregate('MIN', 'sys_mod_count');
count.addAggregate('MAX', 'sys_mod_count');
count.addAggregate('AVG', 'sys_mod_count');
count.groupBy('category');
count.query();
gs.info(count.getEncodedQuery());
Output:
ORDERBYcategory^GROUPBYcategory