# Operators

The valid operators you can use when aggregating the [matches of a condition](/rules-engine/conditions/aggregations.md) or the [targets of an action](/rules-engine/actions/aggregation.md) depend on the type of field on which you want to perform the aggregation (e.g. you cannot sum strings such as tags or SKU codes). &#x20;

You can find here below the complete list of the available operators:

<table><thead><tr><th width="170">Operator</th><th width="130">Field type<select multiple><option value="oBHsH7qDg2tw" label="String" color="blue"></option><option value="NZyTg5ZzemVm" label="Number" color="blue"></option><option value="mXKZ7rgJXazm" label="Boolean" color="blue"></option></select></th><th>Description</th></tr></thead><tbody><tr><td><strong><code>sum</code></strong></td><td><span data-option="NZyTg5ZzemVm">Number</span></td><td>The sum of the <code>field</code> values of the all the condition's matches is compared against the provided <code>value</code> using the specified <code>matcher</code>.</td></tr><tr><td><strong><code>min</code></strong></td><td><span data-option="NZyTg5ZzemVm">Number</span></td><td>The smallest of the <code>field</code> values of the all the condition's matches is compared against the provided <code>value</code> using the specified <code>matcher</code>.</td></tr><tr><td><strong><code>max</code></strong></td><td><span data-option="NZyTg5ZzemVm">Number</span></td><td>The biggest of the <code>field</code> values of the all the condition's matches is compared against the provided <code>value</code> using the specified <code>matcher</code>.</td></tr><tr><td><strong><code>count</code></strong></td><td><span data-option="oBHsH7qDg2tw">String, </span><span data-option="NZyTg5ZzemVm">Number</span></td><td>The number of occurrences of the <code>field</code> value among all the condition's matches is compared against the provided <code>value</code> using the specified <code>matcher</code>.</td></tr><tr><td><strong><code>count_uniq</code></strong></td><td><span data-option="oBHsH7qDg2tw">String, </span><span data-option="NZyTg5ZzemVm">Number, </span><span data-option="mXKZ7rgJXazm">Boolean</span></td><td>The number of unique occurences of the <code>field</code> value among all the condition's matches is compared against the provided <code>value</code> using the specified <code>matcher</code>.</td></tr></tbody></table>


---

# 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.commercelayer.io/rules-engine/operators.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.
