> For the complete documentation index, see [llms.txt](https://algolytics-technologies.gitbook.io/algolytics/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://algolytics-technologies.gitbook.io/algolytics/event-engine-user/aggregate-module.md).

# Aggregate module

Aggregates are calculated both in on-line and off-line mode, in both modes the same computational code is used.

## **On-line mode**

In on-line mode, the computing is parallel for every user id. For active users, on-line aggregates are calculated and held in memory. After fixed time of user's inactivity, defined in configuration file, aggregates are saved in a database.

## **Off-line mode**

In off-line mode, the computing is also parallel for every user id. Aggregates are calculated basing on retail events saved in a repository. Off-line aggregating can be scheduled.

## **Types of aggregates**

* Counted incremently for all data
* Counted in time window with specific number of events
* Counted in sliding time windows with specific number of events
* Target windows - used to count target (only off-line mode)

One event may belong to multiple windows. A list of calculated aggregates is defined in metadata.

## **List of aggregates**

* Number of occurences
* Sum
* Last value
* Flag
* Minimum value
* Maximum value
* Derived aggregates defined in Java (for example: aggregate1 + aggregate2)
* Aggregates resulting from defined dictionaries (see [Dictionaries](/algolytics/event-engine-user/components-of-metadata.md#dictionaries) section)
