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

> quantilesBFloat16 と同様ですが、各値の重みを考慮します。

# quantilesBFloat16Weighted

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

導入バージョン: v21.10.0

[`quantilesBFloat16`](/docs/ja/reference/functions/aggregate-functions/quantilesBFloat16) と同様ですが、各値の重みを考慮します。

[bfloat16](https://en.wikipedia.org/wiki/Bfloat16_floating-point_format) 数で構成されるサンプルに対して、異なるレベルで複数の近似[分位点](https://en.wikipedia.org/wiki/Quantile)を、1回の走査で同時に計算します。

**構文**

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

**パラメータ**

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

**引数**

* `expr` — カラムの値に対する式。結果の data type は数値、`Date`、または `DateTime` です。[`(U)Int*`](/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)
* `weight` — 数列の要素の重みを持つカラム。重みは値の出現回数です。[`UInt*`](/docs/ja/reference/data-types/int-uint)

**戻り値**

指定したレベルの近似分位点を、レベルの指定順と同じ順序の Array として返します。`Date` および `DateTime` の入力では、出力フォーマットは入力フォーマットと一致します。[`Array(Float64)`](/docs/ja/reference/data-types/array) または [`Array(Date)`](/docs/ja/reference/data-types/array) または [`Array(DateTime)`](/docs/ja/reference/data-types/array)

**例**

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

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

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