GlideAggregate - Global

GlideAggregate enables you to easily create database aggregation queries.

The GlideAggregate class is an extension of GlideRecord and provides database aggregation (COUNT, SUM, MIN, MAX, AVG) queries. This functionality can be helpful when creating customized reports or in calculations for calculated fields. The GlideAggregate class works only on number fields.

When you use GlideAggregate on currency or price fields, you are working with the reference currency value. Be sure to convert the aggregate values to the user's session currency for display. Because the conversion rate between the currency or price field’s value (displayed value) and its reference currency value (aggregation value) might change, the result may not be what the user expects.

Note: When using an on-premise system, the database server time zone must be set to GMT/UTC for this class to work properly.