---
schema_version: "1"
id: 8d7bfe9355f7e9d9725f82d30f5d9fc1a3829265589b4a0d1ec5c54a5767fad0
title: QueryAggregation Enum
collection: legacydeveloper
version: current
locale: en-us
portal_url: https://docs.salesforce.com/legacydeveloper/current/en-us/apexref/apex_enum_DataSource_QueryAggregation.md
canonical_url: https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_enum_DataSource_QueryAggregation.htm
source_site: developer.salesforce.com
content_type: documentation
content_hash: 1bd784db2d10120712abe12399d11cb909f176317a1ef649bc12a5bd386d8c8c
description: Specifies how to aggregate a column in a query.
---
# QueryAggregation Enum

Specifies how to aggregate a column in a query.

## Usage

Used by the [aggregation](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_class_DataSource_ColumnSelection.htm#apex_DataSource_ColumnSelection_aggregation "How to aggregate the column’s data.") property on the [DataSource.ColumnSelection](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_class_DataSource_ColumnSelection.htm#apex_class_DataSource_ColumnSelection "Identifies the list of columns to return during a query or search.") class.

## Enum Values

The following are the values of the DataSource.QueryAggregation enum.

| Value | Description |
| --- | --- |
| AVG | Reserved for future use. |
| COUNT | Returns the number of rows that meet the query criteria. |
| MAX | Reserved for future use. |
| MIN | Reserved for future use. |
| NONE | No aggregation. |
| SUM | Reserved for future use. |