> ## Documentation Index
> Fetch the complete documentation index at: https://private-7c7dfe99-fix-nav-issues.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

> quantileExact と同様に、数値データの数列に対する正確な [分位点](https://en.wikipedia.org/wiki/Quantile) を計算します。

# quantileExactLow

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

導入バージョン: v20.8.0

[`quantileExact`](/ja/reference/functions/aggregate-functions/quantileExact) と同様に、数値データの数列の正確な [分位点](https://en.wikipedia.org/wiki/Quantile) を計算します。

正確な値を得るため、渡されたすべての値を配列にまとめてから、完全にソートします。
ソートアルゴリズムの計算量は `O(N·log(N))` で、ここで `N = std::distance(first, last)` です。

戻り値は分位点の level と、選択対象の要素数に依存します。つまり、level が 0.5 の場合、要素数が偶数なら小さい方の中央値を返し、要素数が奇数なら中央の中央値を返します。
中央値は、Python で使用されている [median\_low](https://docs.python.org/3/library/statistics.html#statistics.median_low) の実装と同様に計算されます。

それ以外の level では、`level * size_of_array` の値に対応するインデックスの要素が返されます。

1 つのクエリで level の異なる複数の `quantile*` 関数を使用すると、内部状態は結合されません (つまり、クエリの実行効率が本来より低下します) 。
この場合は、[quantiles](/ja/reference/functions/aggregate-functions/quantiles) 関数を使用してください。

**構文**

```sql theme={null}
quantileExactLow(level)(expr)
```

**別名**: `medianExactLow`

**パラメータ**

* `level` — オプション。分位点のレベルです。0 から 1 までの定数の浮動小数点数。`level` の値には `[0.01, 0.99]` の範囲を使用することを推奨します。デフォルト値: 0.5。`level=0.5` の場合、この関数は中央値を計算します。[`Float*`](/ja/reference/data-types/float)

**引数**

* `expr` — カラム値に対する式です。結果の型は、数値 data types、Date、または DateTime である必要があります。[`(U)Int*`](/ja/reference/data-types/int-uint) または [`Float*`](/ja/reference/data-types/float) または [`Decimal*`](/ja/reference/data-types/decimal) または [`Date`](/ja/reference/data-types/date) または [`DateTime`](/ja/reference/data-types/datetime)

**戻り値**

指定したレベルの分位点を返します。[`Float64`](/ja/reference/data-types/float) または [`Date`](/ja/reference/data-types/date) または [`DateTime`](/ja/reference/data-types/datetime)

**例**

**正確な下側分位点の計算**

```sql title=Query theme={null}
SELECT quantileExactLow(number) FROM numbers(10);
```

```response title=Response theme={null}
┌─quantileExactLow(number)─┐
│                        4 │
└──────────────────────────┘
```

**特定の分位点を計算する**

```sql title=Query theme={null}
SELECT quantileExactLow(0.1)(number) FROM numbers(10);
```

```response title=Response theme={null}
┌─quantileExactLow(0.1)(number)─┐
│                             1 │
└───────────────────────────────┘
```
