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

> Computes multiple quantiles from a Prometheus histogram at different levels simultaneously.

# quantilesPrometheusHistogram

<h2 id="quantilesPrometheusHistogram">
  quantilesPrometheusHistogram
</h2>

Introduced in: v25.10.0

Computes multiple [quantiles](https://en.wikipedia.org/wiki/Quantile) of a histogram using linear interpolation at different levels simultaneously, taking into account the cumulative value and upper bounds of each histogram bucket.

This function is equivalent to [`quantilePrometheusHistogram`](/reference/functions/aggregate-functions/quantilePrometheusHistogram) but allows computing multiple quantile levels in a single pass, which is more efficient than calling individual quantile functions.

**Syntax**

```sql theme={null}
quantilesPrometheusHistogram(level1, level2, ...)(bucket_upper_bound, cumulative_bucket_value)
```

**Parameters**

* `level` — Levels of quantiles. One or more constant floating-point numbers from 0 to 1. We recommend using `level` values in the range of `[0.01, 0.99]`. [`Float64`](/reference/data-types/float)

**Arguments**

* `bucket_upper_bound` — Upper bounds of the histogram buckets. The highest bucket must have an upper bound of `+Inf`. [`Float*`](/reference/data-types/float)
* `cumulative_bucket_value` — Cumulative values of the histogram buckets. Values must be monotonically increasing as the bucket upper bound increases. [`UInt*`](/reference/data-types/int-uint) or [`Float*`](/reference/data-types/float)

**Returned value**

Array of quantiles of the specified levels in the same order as the levels were specified. The floating-point type of the result matches the type of `bucket_upper_bound`. [`Array(Float32)`](/reference/data-types/array) or [`Array(Float64)`](/reference/data-types/array)

**Examples**

**Usage example**

```sql title=Query theme={null}
SELECT quantilesPrometheusHistogram(0.25, 0.5, 0.75)(bucket_upper_bound, cumulative_bucket_value)
FROM VALUES('bucket_upper_bound Float64, cumulative_bucket_value UInt64', (0, 6), (0.5, 11), (1, 14), (inf, 19));
```

```response title=Response theme={null}
┌─quantilesPrometheusHistogram(0.25, 0.5, 0.75)(bucket_upper_bound, cumulative_bucket_value)─┐
│ [0,0.35,1]                                                                                 │
└────────────────────────────────────────────────────────────────────────────────────────────┘
```
