> ## Documentation Index
> Fetch the complete documentation index at: https://private-7c7dfe99-mintlify-fbfa8bee.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# avgMerge

> Example of using the avgMerge combinator

<h2 id="description">
  Description
</h2>

The [`Merge`](/reference/functions/aggregate-functions/combinators#-state) combinator
can be applied to the [`avg`](/reference/functions/aggregate-functions/avg)
function to produce a final result by combining partial aggregate states.

<h2 id="example-usage">
  Example usage
</h2>

The `Merge` combinator is closely related to the `State` combinator. Refer to
["avgState example usage"](/guides/clickhouse/examples/aggregate-function-combinators/avgState#example-usage)
for an example of both `avgMerge` and `avgState`.

<h2 id="see-also">
  See also
</h2>

* [`avg`](/reference/functions/aggregate-functions/avg)
* [`Merge`](/reference/functions/aggregate-functions/combinators#-merge)
* [`MergeState`](/reference/functions/aggregate-functions/combinators#-mergestate)
