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

> 숫자 데이터 시퀀스의 분위수를 정확히 계산합니다.

# quantilesExactInclusive

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

도입 버전: v20.1.0

포괄 방식을 사용해 숫자 데이터 시퀀스의 여러 [분위수](https://en.wikipedia.org/wiki/Quantile)를 서로 다른 수준에서 동시에 정확하게 계산합니다.

이 함수는 [`quantileExactInclusive`](/ko/reference/functions/aggregate-functions/quantileExactInclusive)와 동일하지만, 여러 분위수 수준을 단일 패스로 계산할 수 있으므로 개별 분위수 함수를 각각 호출하는 것보다 더 효율적입니다.

이 함수는 [R-7 method](https://en.wikipedia.org/wiki/Quantile#Estimating_quantiles_from_a_sample)에 설명된 포괄 방식을 사용해 분위수를 계산합니다.
이는 Excel의 [PERCENTILE.INC](https://support.microsoft.com/en-us/office/percentile-inc-function-680f9539-45eb-410b-9a5e-c1355e5fe2ed) 함수와 동일합니다.

정확한 값을 얻기 위해 전달된 모든 값을 하나의 배열로 결합한 다음 부분 정렬합니다.
정렬 알고리즘의 복잡도는 `O(N·log(N))`이며, 여기서 `N = std::distance(first, last)`는 비교 횟수입니다.

**구문**

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

**매개변수**

* `level` — 분위수 수준입니다. 0부터 1까지(포함)인 상수 부동소수점 숫자입니다. `level` 값은 `[0.01, 0.99]` 범위에서 사용하는 것을 권장합니다. [`Float*`](/ko/reference/data-types/float)

**인수**

* `expr` — 컬럼 값에 대한 표현식이며, 결과는 숫자 데이터 타입, Date 또는 DateTime이어야 합니다. [`(U)Int*`](/ko/reference/data-types/int-uint) 또는 [`Float*`](/ko/reference/data-types/float) 또는 [`Decimal*`](/ko/reference/data-types/decimal) 또는 [`Date`](/ko/reference/data-types/date) 또는 [`DateTime`](/ko/reference/data-types/datetime)

**반환 값**

지정한 수준의 분위수를, 수준을 지정한 순서와 동일한 순서로 담은 배열입니다. [`Array(Float64)`](/ko/reference/data-types/array)

**예시**

**여러 개의 정확한 포함 분위수 계산**

```sql title=Query theme={null}
CREATE TABLE num AS numbers(1000);
SELECT quantilesExactInclusive(0.25, 0.5, 0.75, 0.9, 0.95, 0.99, 0.999)(number) FROM num;
```

```response title=Response theme={null}
┌─quantilesExactInclusive(0.25, 0.5, 0.75, 0.9, 0.95, 0.99, 0.999)(number)─┐
│ [249.75,499.5,749.25,899.1,949.05,989.01,998.001]                        │
└──────────────────────────────────────────────────────────────────────────┘
```
