> ## 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.

> 決定論的サンプリングを使用して、異なるレベルにおける数値データ列の複数の近似分位点を同時に計算します。

# quantilesDeterministic

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

導入バージョン: v1.1.0

決定論的リザーバーサンプリングを使用して、異なるレベルにおける数値データ列の近似[分位点](https://en.wikipedia.org/wiki/Quantile)を複数同時に計算します。

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

**構文**

```sql theme={null}
quantilesDeterministic(level1, level2, ...)(expr, determinator)
```

**パラメーター**

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

**引数**

* `expr` — カラム値に対する式。結果の型は数値データ型、`Date`、または `DateTime` です。[`(U)Int*`](/docs/ja/reference/data-types/int-uint) または [`Int128`](/docs/ja/reference/data-types/int-uint) または [`UInt128`](/docs/ja/reference/data-types/int-uint) または [`Int256`](/docs/ja/reference/data-types/int-uint) または [`UInt256`](/docs/ja/reference/data-types/int-uint) または [`Float*`](/docs/ja/reference/data-types/float) または [`Date`](/docs/ja/reference/data-types/date) または [`DateTime`](/docs/ja/reference/data-types/datetime)
* `determinator` — リザーバーサンプリングアルゴリズムで乱数生成器の代わりに hash が使われる数値で、サンプリング結果を決定論的にします。[`UInt*`](/docs/ja/reference/data-types/int-uint)

**戻り値**

指定したレベルに対応する近似分位点の Array。順序は、指定したレベルの順序と同じです。[`Array(Float64)`](/docs/ja/reference/data-types/array) または [`Array(Date)`](/docs/ja/reference/data-types/array) または [`Array(DateTime)`](/docs/ja/reference/data-types/array)

**例**

**複数の決定論的な分位点を計算する**

```sql title=Query theme={null}
SELECT quantilesDeterministic(0.25, 0.5, 0.75)(number, number) FROM numbers(10)
```

```response title=Response theme={null}
┌─quantilesDeterministic(0.25, 0.5, 0.75)(number, number)─┐
│ [2.25,4.5,6.75]                                         │
└─────────────────────────────────────────────────────────┘
```
