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

# stderror()

> Estimate the relative standard error of a hyperloglog

<Icon icon="tag" iconType="duotone" /> Since [1.3.0][toolkit-1.3.0]

Estimate the relative standard error of a `Hyperloglog`. For approximate
relative errors by number of buckets, see the
[relative errors section][approximate-relative-errors].

## Samples

Estimate the relative standard error of a hyperloglog named
`hyperloglog`. The expected output is 0.011490485194281396.

```sql theme={"dark"}
SELECT stderror(hyperloglog(8192, data))
  FROM generate_series(1, 100000) data
```

Output:

```sql theme={"dark"}
stderror
----------------------
0.011490485194281396
```

## Arguments

The syntax is:

```sql theme={"dark"}
stderror(
    hyperloglog Hyperloglog
) RETURNS DOUBLE PRECISION
```

| Name          | Type        | Default | Required | Description                               |
| ------------- | ----------- | ------- | -------- | ----------------------------------------- |
| `hyperloglog` | Hyperloglog | -       | ✔        | The hyperloglog to estimate the error of. |

## Returns

| Column   | Type             | Description                                                 |
| -------- | ---------------- | ----------------------------------------------------------- |
| stderror | DOUBLE PRECISION | The approximate relative standard error of the hyperloglog. |

[approximate-relative-errors]: /api-reference/timescaledb-toolkit/hyperloglog#approximate-relative-errors

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