# Aggregator

The "**Aggregator"** is designed to transform an input dataset into one single variable.

To do that it can use [mathematical functions](/pipelines/mathematical-functions.md) like `SUM()`, `AVG()` and other aggregating functions and operations like `+`,`-`,`==`, `!=`,`<`,`>`. etc. The full list can be found [here](/pipelines/mathematical-functions.md#arithmetical-and-logical-operations)

In addition to the mathematical expression, you can also configure how you want the output variable to be called to access it in the next task.

In the following example, an aggregator calculates an average invoice amount in the input dataset and rounds it down to 2-digit precision. The result is available in the next task as `{{ average_amount }}`

<figure><img src="/files/nQyIq0JmGjnDg6uoXIB1" alt=""><figcaption></figcaption></figure>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.ylem.co/pipelines/tasks-ip/aggregator.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
