> ## Documentation Index
> Fetch the complete documentation index at: https://firebolt-aggregate-helm-docs-pr-97.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Aggregate functions

> Snowflake aggregate functions supported in Snowflake compatibility mode.

<span className="feature-tag">Preview</span>

Snowflake [aggregate functions](https://docs.snowflake.com/en/sql-reference/functions-aggregation) in [Snowflake compatibility mode](/reference-sql/snowflake/overview).

| Function                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      | Support          | Notes                                   |
| :---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :--------------- | :-------------------------------------- |
| `ANY_VALUE`                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   | Supported        |                                         |
| `APPROX_COUNT_DISTINCT`                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       | Supported        |                                         |
| `APPROX_PERCENTILE`                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           | Supported        |                                         |
| `ARRAYAGG`                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    | Supported        |                                         |
| `ARRAY_AGG`                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   | Supported        |                                         |
| `AVG`                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         | Supported        |                                         |
| `BITANDAGG`                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   | Supported        |                                         |
| `BITAND_AGG`                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  | Supported        |                                         |
| `BITORAGG`                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    | Supported        |                                         |
| `BITOR_AGG`                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   | Supported        |                                         |
| `BITXORAGG`                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   | Supported        |                                         |
| `BITXOR_AGG`                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  | Supported        |                                         |
| `BIT_ANDAGG`                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  | Supported        |                                         |
| `BIT_AND_AGG`                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 | Supported        |                                         |
| `BIT_ORAGG`                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   | Supported        |                                         |
| `BIT_OR_AGG`                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  | Supported        |                                         |
| `BIT_XORAGG`                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  | Supported        |                                         |
| `BIT_XOR_AGG`                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 | Supported        |                                         |
| `CORR`                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        | Supported        |                                         |
| `COUNT_IF`                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    | Supported        |                                         |
| `COUNT`                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       | Supported        |                                         |
| `COVAR_POP`                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   | Supported        |                                         |
| `COVAR_SAMP`                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  | Supported        |                                         |
| `LISTAGG`                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     | Supported        |                                         |
| `MAX_BY`                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      | Supported        |                                         |
| `MAX`                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         | Supported        |                                         |
| `MIN_BY`                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      | Supported        |                                         |
| `MIN`                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         | Supported        |                                         |
| `SUM`                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         | Supported        |                                         |
| `VARIANCE_POP`                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                | Supported        | The other spelling of `VAR_POP`.        |
| `VARIANCE_SAMP`                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               | Supported        | The other spelling of `VAR_SAMP`.       |
| `STDDEV`, `STDDEV_POP`, `STDDEV_SAMP`, `VARIANCE`, `VAR_POP`, `VAR_SAMP`                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      | With limitations | Available for some argument types only. |
| `APPROXIMATE_COUNT_DISTINCT`, `APPROX_PERCENTILE_ACCUMULATE`, `APPROX_TOP_K`, `APPROX_TOP_K_ACCUMULATE`, `ARRAY_UNION_AGG`, `ARRAY_UNIQUE_AGG`, `BITMAP_ABSOLUTE_POSITION`, `BITMAP_BIT_POSITION`, `BITMAP_BUCKET_NUMBER`, `BITMAP_CONSTRUCT_AGG`, `BOOLAND_AGG`, `BOOLOR_AGG`, `BOOLXOR_AGG`, `DATASKETCHES_HLL`, `DATASKETCHES_HLL_ACCUMULATE`, `HLL`, `HLL_ACCUMULATE`, `HLL_COMBINE`, `HLL_ESTIMATE`, `HLL_EXPORT`, `KURTOSIS`, `MINHASH`, `MODE`, `OBJECTAGG`, `OBJECT_AGG`, `REGR_AVGX`, `REGR_AVGY`, `REGR_COUNT`, `REGR_INTERCEPT`, `REGR_R2`, `REGR_SLOPE`, `REGR_SXX`, `REGR_SXY`, `REGR_SYY`, `SKEW`, `SUMMARIZE_AGG`, `SUM_REAL`, `TOP_K_SKETCH_OBJECT_CONSTRUCT` | Not supported    |                                         |
