> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://help.sigmacomputing.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://help.sigmacomputing.com/_mcp/server.

# AggLogical

> Use the Sigma AggLogical function to call a warehouse aggregate function that returns a Logical data type.

The **AggLogical** function calls a warehouse aggregate function that returns a Logical data type. This function is the aggregation version of [CallLogical](/docs/calllogical) and can be applied to evaluate array objects for analysis without traversing through the contents of an array.

This function isn't compatible with all data platform connections. To check if your connection supports it, see [Supported data platforms and feature compatibility](/docs/region-warehouse-and-feature-support#supported-data-platforms-and-feature-compatibility).

## Syntax

```
AggLogical(function name, arguments...)
```

Function arguments:

* **function name** (required)- The name of an aggregate function supported by your data warehouse.
* **arguments** (required)- One or more arguments to be passed to the warehouse function. All arguments must meet the warehouse function’s input requirements.

## Example

A table contains a *Today SKU* column that returns an array of top SKU Numbers for each store and a LW Today SKU column that returns an array of top SKU Numbers from the previous week. The *CallLogical* column returns True if *Today SKU* and *LW Today SKU* arrays have at least one SKU Number in common.

You can pass Snowflake's [BOOLAND\_AGG](https://docs.snowflake.com/en/sql-reference/functions/booland_agg) function to the **AggLogical** function to check whether ***all*** stores in the West region had at least one high demand SKU Number from the previous week.

Similarly, Snowflake's [BOOLOR\_AGG](https://docs.snowflake.com/en/sql-reference/functions/boolor_agg)/[BOOLXOR\_AGG](https://docs.snowflake.com/en/sql-reference/functions/boolxor_agg) function can be used to check whether ***any*** store or ***exactly*** one store in the West region had at least one high demand SKU Number from the previous week.

```
AggLogical("BOOLAND_AGG", [CallLogical])
```

* Returns True if *all* values in the *CallLogical* column evaluate to True.

```
AggLogical("BOOLOR_AGG", [CallLogical])
```

* Returns True if *at least* one value in the *CallLogical* column evaluate to True.

```
AggLogical("BOOLXOR_AGG", [CallLogical])
```

* Returns True if *exactly* one value in the *CallLogical* column evaluate to True.

![](https://fdr-prod-docs-files-public.s3.us-east-1.amazonaws.com/sigma.docs.buildwithfern.com/0f7a158afb8a67ba90f80c89248c3ab16adcc81029592725be9c54628522e2d5/assets/docs-images/229c4de-Screen_Shot_2023-04-28_at_2.36.06_PM.png?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Credential=AKIA6KXJSKKNFOCF7G4B%2F20260725%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20260725T122809Z&X-Amz-Expires=604800&X-Amz-Signature=be19a39dbd5e5242929c5e2d844ca346caddda7d9018b10ceb4c3fe8cdfb8f22&X-Amz-SignedHeaders=host&x-amz-checksum-mode=ENABLED&x-id=GetObject)

## Related resources

* [CallLogical](/docs/calllogical)