> 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.

# AggNumber

> Use the Sigma AggNumber function to call a warehouse aggregate function that returns a Number data type.

The **AggNumber** function calls a warehouse aggregate function that returns a Number data type. This function is the aggregate version of [CallNumber](/docs/callnumber) and can be applied to identify the set of values that appear the most often from the base, row level data in the parent/higher level grouping of a table.

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

```
AggNumber(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 *Cust Key (row)* column that contains the customer ID of each item that was purchased for each Store Region. You can pass Snowflake's [MODE](https://docs.snowflake.com/en/sql-reference/functions/mode) function to the **AggNumber** function to identify the customer who made the most purchases within a specific timeframe by Store Region.

The *Items Purchased* column in the lower grouped level of the table confirms that the most frequent *Cust Key* is returned by the **AggNumber** function.

```
AggNumber("MODE", [Cust Key (row)])
```

* Return the most frequent *Cust Key* value for the values within the *Cust Key (row)* column.

![](https://files.buildwithfern.com/sigma.docs.buildwithfern.com/f623d75b9d219fe9def7a115295625c5ba4b8905e7643486307a97cd20377779/assets/docs-images/1ae3e1b-1.png)

## Related resources

* [CallNumber](/docs/callnumber)