---
title: distinct_count() | Tiger Data Docs
description: Estimate the number of distinct values from a hyperloglog
---

Since [1.3.0](https://github.com/timescale/timescaledb-toolkit/releases/tag/1.3.0)

Estimate the number of distinct values from a hyperloglog

## Samples

Estimate the number of distinct values from a hyperloglog named `hyperloglog`. The expected output is 98,814.

```
SELECT distinct_count(hyperloglog(8192, data))
  FROM generate_series(1, 100000) data
```

Output:

```
distinct_count
----------------
        98814
```

## Arguments

The syntax is:

```
distinct_count(
    hyperloglog Hyperloglog
) RETURNS BIGINT
```

| Name          | Type        | Default | Required | Description                                |
| ------------- | ----------- | ------- | -------- | ------------------------------------------ |
| `hyperloglog` | Hyperloglog | -       | ✔        | The hyperloglog to extract the count from. |

## Returns

| Column          | Type   | Description                                                 |
| --------------- | ------ | ----------------------------------------------------------- |
| distinct\_count | BIGINT | The number of distinct elements counted by the hyperloglog. |
