# Aggregate

- [AVG](https://docs.lenses.io/latest/devx/6.0/user-guide/sql-reference/functions/aggregate/avg.md): This page describes the AVG function in Lenses SQL.
- [BOTTOMK](https://docs.lenses.io/latest/devx/6.0/user-guide/sql-reference/functions/aggregate/bottomk.md): This page describes the BOTTOMK function in Lenses SQL.
- [COLLECT](https://docs.lenses.io/latest/devx/6.0/user-guide/sql-reference/functions/aggregate/collect.md): This page describe the COLLECT function in Lenses SQL.
- [COLLECT\_UNIQUE](https://docs.lenses.io/latest/devx/6.0/user-guide/sql-reference/functions/aggregate/collect_unique.md): This page describes the COLLECT\_UNIQUE function in Lenses SQL.
- [COUNT](https://docs.lenses.io/latest/devx/6.0/user-guide/sql-reference/functions/aggregate/count.md): This page describes the COUNT function in Lenses SQL.
- [FIRST](https://docs.lenses.io/latest/devx/6.0/user-guide/sql-reference/functions/aggregate/first.md): This page describes the FIRST function in Lenses SQL.
- [LAST](https://docs.lenses.io/latest/devx/6.0/user-guide/sql-reference/functions/aggregate/last.md): This page describes the LAST function in Lenses SQL.
- [MAXK](https://docs.lenses.io/latest/devx/6.0/user-guide/sql-reference/functions/aggregate/maxk.md): This page describes the MAXK function in Lenses SQL.
- [MAXK\_UNIQUE](https://docs.lenses.io/latest/devx/6.0/user-guide/sql-reference/functions/aggregate/maxk_unique.md): This page describes the MAXK\_UNIQUE function in Lenses SQL.
- [MINK](https://docs.lenses.io/latest/devx/6.0/user-guide/sql-reference/functions/aggregate/mink.md): This page describes the MINK function in Lenses SQL.
- [MINK\_UNIQUE](https://docs.lenses.io/latest/devx/6.0/user-guide/sql-reference/functions/aggregate/mink_unique.md): This page describes the MINK\_UNIQUE function in Lenses SQL.
- [SUM](https://docs.lenses.io/latest/devx/6.0/user-guide/sql-reference/functions/aggregate/sum.md): This page describes the SUM function in Lenses SQL.
- [TOPK](https://docs.lenses.io/latest/devx/6.0/user-guide/sql-reference/functions/aggregate/topk.md): This page describes the TOPK function in Lenses SQL.


---

# 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.lenses.io/latest/devx/6.0/user-guide/sql-reference/functions/aggregate.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.
