> ## Documentation Index
> Fetch the complete documentation index at: /documents/llms.txt
> Use this file to discover all available pages before exploring further.

# hll_raw_agg

> hll_raw_agg 聚合 HLL 类型字段，返回 HLL 类型用于近似 COUNT(DISTINCT)。

此函数为聚合函数，用于聚合 HLL 类型的字段，返回的还是 HLL 类型。

## 语法

```Haskell theme={null}
hll_raw_agg(hll)
```

## 参数说明

`hll`: 通过其它列或者导入数据里面的数据生成的 HLL 列。

## 返回值说明

返回值为 HLL 类型。

## 示例

```Plain theme={null}
mysql> select k1, hll_cardinality(hll_raw_agg(v1)) from tbl group by k1;
+------+----------------------------------+
| k1   | hll_cardinality(hll_raw_agg(`v1`)) |
+------+----------------------------------+
|    2 |                                4 |
|    1 |                                3 |
+------+----------------------------------+
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.