Aggregate ServiceNow records
servicenow_aggregateAggregate ServiceNow table data server-side—count, average, min, max, sum—with group-by and filters, eliminating the need to retrieve individual rows.
Instructions
Compute server-side aggregates (count, avg, min, max, sum) over a table via the Stats API, with optional grouping. Avoids pulling individual rows.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| count | No | Include a record count (sysparm_count). | |
| query | No | Encoded query to filter rows before aggregating. | |
| table | Yes | Table name, e.g. 'incident'. | |
| having | No | HAVING clause to filter groups (sysparm_having). | |
| group_by | No | Fields to group by. | |
| instance | No | Connection profile to use for this call (default: the active profile). See servicenow_list_instances. | |
| avg_fields | No | Numeric fields to average. | |
| max_fields | No | Fields to take the maximum of. | |
| min_fields | No | Fields to take the minimum of. | |
| sum_fields | No | Numeric fields to sum. |