var ga = new GlideAggregate('incident');
ga.addAggregate('COUNT', 'category');
//ga.addActiveQuery();
ga.setGroup(true);
ga.groupBy("category");
ga.query();
while(ga.next()) {
gs.info('Category ' + ga.category + ' ' + ga.getAggregate('COUNT', 'category'));
}
Comments
Post a Comment