Learn how to read board data using grouped summaries and aggregation functions using the platform API
Aggregation summarizes large amounts of data into fewer, more meaningful values, helping you interpret work data at a glance.
It combines multiple rows into a smaller set of data points. For example, a marketing director with a monday.com board of campaigns can use aggregation to find the average campaign cost across the board.
Aggregation functions define how data is calculated (e.g., MEAN for averages, COUNT_ITEMS for totals). You can also apply filters to focus on specific subsets (e.g., campaigns launched in the last 6 months) or use grouping to summarize items by a shared column (e.g., average cost per marketing manager).
Queries
You can use the aggregate
query to retrieve board data using groupings and aggregation functions via the API.
- Returns an array of aggregated results; returned values are pre-processed (no client-side data handling needed)
- Must be queried directly at the root; can't be nested within another query
The following example returns the sum of story points per person, with filters applied to only include items where the status column is set to “Done”.
query {
aggregate(query: {
from: { type: TABLE, id: 1234567890 },
group_by: [{ column_id: "task_owner", limit: 10 }],
limit: 2,
query: {
rules: [{
operator: any_of,
column_id: "status",
compare_value: "done_labels"
}]
},
select: [
{
type: FUNCTION,
function: {
function: SUM,
params: [{ type: COLUMN, column: { column_id: "task_estimation" } }]
},
as: "sum"
},
{
type: COLUMN,
column: { column_id: "task_owner" },
as: "task_owner"
}
]
}) {
results {
entries {
alias
value {
... on AggregateGroupByResult { value_string }
... on AggregateBasicAggregationResult { result }
}
}
}
}
}
Arguments
You can use the following argument to define the aggregation operation.
Argument | Description | Supported Fields |
---|---|---|
query AggregateQueryInput! | The aggregation query to execute. Defines the data source, groupings, filters, and fields to aggregate. | from AggregateFromTableInput! group_by [AggregateGroupByElementInput!] limit Int query ItemsQuery select [AggregateSelectElementInput!]! |
Fields
You can use the following field to specify what information your aggregate
query will return. Some fields support their own subfields.
Field | Description | Supported fields |
---|---|---|
results [AggregateResultSet!] | The result of the aggregated query. | entries [AggregateResultEntry!] |
Use cases
- Dynamic query generation: Turn user input into structured aggregation queries for dashboards, charts, and summaries.
- On-demand insights: Give teams instant visibility into workload, activity, or bottlenecks through automated queries.
- Custom reporting via API: Build third-party reports and visualizations without client-side aggregation.
- Self-serve intelligence: Enable automations and internal tools to access grouped metrics programmatically.