# Functions

Every function is of form `FCT-NAME(argument1, ...)`, expects one or more arguments, and returns a value.

In the following list, each function is listed, including the [data structure](https://doc.moost.io/platform-manual/rules/rule-language/data-structures) and [data type](https://doc.moost.io/platform-manual/rules/rule-language/data-types) of each argument, and the return value. This is done by using form *`DataStructure<DataType>`*.

## Overview

Following functions are provided:

[avg](https://doc.moost.io/platform-manual/rules/rule-language/functions/avg "mention")

[count](https://doc.moost.io/platform-manual/rules/rule-language/functions/count "mention")

[distinct](https://doc.moost.io/platform-manual/rules/rule-language/functions/distinct "mention")

[avg-1](https://doc.moost.io/platform-manual/rules/rule-language/functions/avg-1 "mention")

[filter](https://doc.moost.io/platform-manual/rules/rule-language/functions/filter "mention")

[group\_by\_device](https://doc.moost.io/platform-manual/rules/rule-language/functions/group_by_device "mention")

[group\_by\_time](https://doc.moost.io/platform-manual/rules/rule-language/functions/group_by_time "mention")

[max](https://doc.moost.io/platform-manual/rules/rule-language/functions/max "mention")

[min](https://doc.moost.io/platform-manual/rules/rule-language/functions/min "mention")

[avg-2](https://doc.moost.io/platform-manual/rules/rule-language/functions/avg-2 "mention")

[reverse](https://doc.moost.io/platform-manual/rules/rule-language/functions/reverse "mention")

[sort](https://doc.moost.io/platform-manual/rules/rule-language/functions/sort "mention")

[subset](https://doc.moost.io/platform-manual/rules/rule-language/functions/subset "mention")

[sum](https://doc.moost.io/platform-manual/rules/rule-language/functions/sum "mention")
