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

> Prometheusヒストグラムから、異なるレベルの複数の分位点を同時に計算します。

# quantilesPrometheusHistogram

<div id="quantilesPrometheusHistogram">
  ## quantilesPrometheusHistogram
</div>

導入バージョン: v25.10.0

累積値と各ヒストグラムバケットの上限を考慮しながら、異なるレベルにおけるヒストグラムの複数の[分位点](https://en.wikipedia.org/wiki/Quantile)を、線形補間を用いて同時に計算します。

この関数は [`quantilePrometheusHistogram`](/docs/ja/reference/functions/aggregate-functions/quantilePrometheusHistogram) と同等ですが、1 回の処理で複数の分位レベルを計算できるため、個別の分位点関数を呼び出すよりも効率的です。

**構文**

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

**パラメータ**

* `level` — 分位点のレベル。0 から 1 までの定数の浮動小数点数を 1 つ以上指定します。`level` の値には `[0.01, 0.99]` の範囲を使用することを推奨します。[`Float64`](/docs/ja/reference/data-types/float)

**引数**

* `bucket_upper_bound` — ヒストグラムのバケットの上限。最も大きいバケットの上限は `+Inf` でなければなりません。[`Float*`](/docs/ja/reference/data-types/float)
* `cumulative_bucket_value` — ヒストグラムのバケットの累積値。バケットの上限が大きくなるにつれて、値は単調増加でなければなりません。[`UInt*`](/docs/ja/reference/data-types/int-uint) または [`Float*`](/docs/ja/reference/data-types/float)

**戻り値**

指定したレベルの分位点を、指定したレベルと同じ順序で格納した Array。結果の浮動小数点型は `bucket_upper_bound` の型と一致します。[`Array(Float32)`](/docs/ja/reference/data-types/array) または [`Array(Float64)`](/docs/ja/reference/data-types/array)

**例**

**使用例**

```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]                                                                                 │
└────────────────────────────────────────────────────────────────────────────────────────────┘
```
