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

> 各要素の重みを考慮しつつ、異なるレベルにおける数値データ列の複数の分位点を、線形補間を用いて同時に計算します。

# quantilesExactWeightedInterpolated

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

導入バージョン: v24.10.0

各要素の重みを考慮しながら、異なるレベルにおける数値データ列の複数の[分位点](https://en.wikipedia.org/wiki/Quantile)を、線形補間を用いて同時に計算します。

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

**構文**

```sql theme={null}
quantilesExactWeightedInterpolated(level1, level2, ...)(expr, weight)
```

**パラメータ**

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

**引数**

* `expr` — カラム値に対する式で、結果は数値データ型、`Date`、`DateTime`、または `DateTime64` になります。[`(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) または [`Decimal*`](/docs/ja/reference/data-types/decimal) または [`Date`](/docs/ja/reference/data-types/date) または [`DateTime`](/docs/ja/reference/data-types/datetime) または [`DateTime64`](/docs/ja/reference/data-types/datetime64)
* `weight` — 数列の要素の重みを表すカラム。重みは値の出現回数です。[`UInt*`](/docs/ja/reference/data-types/int-uint)

**戻り値**

指定したレベルの分位点の Array を、レベルを指定した順序と同じ順序で返します。数値引数では `Float64` が生成され、`Decimal`、`Date`、`DateTime`、`DateTime64` の引数では入力フォーマットが維持されます。[`Array(Float64)`](/docs/ja/reference/data-types/array) または [`Array(Decimal*)`](/docs/ja/reference/data-types/array) または [`Array(Date)`](/docs/ja/reference/data-types/array) または [`Array(DateTime)`](/docs/ja/reference/data-types/array) または [`Array(DateTime64)`](/docs/ja/reference/data-types/array)

**例**

**複数の厳密な重み付き補間分位点を計算する**

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

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