# Aggregate Queries with GraphQL

| AVAILABLE API VERSION |
| --------------------- |
| API v58.0 and later   |

Aggregating queries enables you to analyze the records in your result. The `uiapi` field includes the [`query`](/docs/platform/graphql/guide/schema-conventions.md) and `aggregate` field. The `aggregate` field of `RecordQueryAggregate` type performs queries that group and aggregate over records.

```sfdocs-code {"lang":"graphql", "title": "Query aggregate field", "src": "" }
{
  uiapi {
    aggregate {
      # fields
    }
  }
}
```

You can roll up and summarize your results with aggregate functions, such as returning your data with these functions:

- Average
- Count
- Distinct count
- Grouping
- Ordering
- Minimum
- Maximum
- Sum

:::note
The aggregate functions don’t apply to all field types. For example, average and sum apply to currency and numeric values but not to string values. See [Aggregate Functions for Field Types](/docs/platform/graphql/guide/aggregate-support.md).
:::

## See Also

- [Feature Limitations of Offline GraphQL](https://developer.salesforce.com/docs/atlas.en-us.mobile_offline.meta/mobile_offline/use_graphql_limitations.htm)
