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

> Reference material for HLL_COUNT_ESTIMATE

# HLL_COUNT_ESTIMATE

Extracts a cardinality estimate of a single HLL++ sketch that was previously built using the aggregate
function [HLL\_COUNT\_BUILD](/reference-sql/functions-reference/aggregation/hll-count-build).

## Syntax

```sql theme={"theme":{"light":"github-light","dark":"github-dark"}}
HLL_COUNT_ESTIMATE(<expression>)
```

## Parameters

| Parameter      | Description                                                                                                                   | Supported input types |
| :------------- | :---------------------------------------------------------------------------------------------------------------------------- | :-------------------- |
| `<expression>` | An HLL++ sketch produced by the [HLL\_COUNT\_BUILD](/reference-sql/functions-reference/aggregation/hll-count-build) function. | `BYTEA`               |

## Return Type

`BIGINT`

## Example

Following the [example](/reference-sql/functions-reference/aggregation/hll-count-build#example) in [HLL\_COUNT\_BUILD](/reference-sql/functions-reference/aggregation/hll-count-build):

```sql theme={"theme":{"light":"github-light","dark":"github-dark"}}
SELECT hll_count_estimate(a) AS hll_estimate
FROM sketch_of_data_to_count
ORDER BY 1;
```

| hll\_estimate (BIGINT) |
| :--------------------- |
| 3291008                |
| 4948957                |

```sql theme={"theme":{"light":"github-light","dark":"github-dark"}}
SELECT hll_count_estimate(hll_count_merge(a)) AS hll_estimate
FROM sketch_of_data_to_count;
```

| hll\_estimate (BIGINT) |
| :--------------------- |
| 6606880                |
