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

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

# quantilesInterpolatedWeighted

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

導入バージョン: v23.1.0

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

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

**構文**

```sql theme={null}
quantilesInterpolatedWeighted(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) or [`Int128`](/docs/ja/reference/data-types/int-uint) or [`UInt128`](/docs/ja/reference/data-types/int-uint) or [`Int256`](/docs/ja/reference/data-types/int-uint) or [`UInt256`](/docs/ja/reference/data-types/int-uint) or [`Float*`](/docs/ja/reference/data-types/float) or [`Decimal*`](/docs/ja/reference/data-types/decimal) or [`Date`](/docs/ja/reference/data-types/date) or [`DateTime`](/docs/ja/reference/data-types/datetime) or [`DateTime64`](/docs/ja/reference/data-types/datetime64)
* `weight` — 数列の要素の重みを格納するカラム。重みは値の出現回数です。[`UInt*`](/docs/ja/reference/data-types/int-uint)

**戻り値**

指定されたレベルの分位点を、レベルを指定した順序と同じ順序の Array として返します。数値データ型の場合、出力フォーマットは入力フォーマットと同じです。[`Array((U)Int*)`](/docs/ja/reference/data-types/array) or [`Array(Int128)`](/docs/ja/reference/data-types/array) or [`Array(UInt128)`](/docs/ja/reference/data-types/array) or [`Array(Int256)`](/docs/ja/reference/data-types/array) or [`Array(UInt256)`](/docs/ja/reference/data-types/array) or [`Array(Float*)`](/docs/ja/reference/data-types/array) or [`Array(Decimal*)`](/docs/ja/reference/data-types/array) or [`Array(Date)`](/docs/ja/reference/data-types/array) or [`Array(DateTime)`](/docs/ja/reference/data-types/array) or [`Array(DateTime64)`](/docs/ja/reference/data-types/array)

**例**

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

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

```response title=Response theme={null}
┌─quantilesInterpolatedWeighted(0.25, 0.5, 0.75)(number, 1)─┐
│ [2,4,7]                                                   │
└───────────────────────────────────────────────────────────┘
```
