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

> maxIntersections 함수의 발생 위치를 계산하는 집계 함수입니다.

# maxIntersectionsPosition

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

도입 버전: v1.1.0

[`maxIntersections`](/ko/reference/functions/aggregate-functions/maxIntersections) 함수의 출현 위치를 계산하는 집계 함수입니다.

**구문**

```sql theme={null}
maxIntersectionsPosition(start_column, end_column)
```

**인수**

* `start_column` — 각 인터벌의 시작을 나타내는 숫자 컬럼입니다. `start_column`이 `NULL` 또는 0이면 해당 인터벌은 무시됩니다. [`(U)Int*`](/ko/reference/data-types/int-uint) 또는 [`Float*`](/ko/reference/data-types/float)
* `end_column` — 각 인터벌의 끝을 나타내는 숫자 컬럼입니다. `end_column`이 `NULL` 또는 0이면 해당 인터벌은 무시됩니다. [`(U)Int*`](/ko/reference/data-types/int-uint) 또는 [`Float*`](/ko/reference/data-types/float)

**반환 값**

가장 많은 인터벌이 교차하는 시작 위치를 반환합니다. [`Any`](/ko/reference/data-types)

**예시**

**최대 교차 지점 찾기**

```sql title=Query theme={null}
CREATE TABLE my_events (
    start UInt32,
    end UInt32
)
ENGINE = MergeTree
ORDER BY tuple();

INSERT INTO my_events VALUES
(1, 3),
(1, 6),
(2, 5),
(3, 7);

SELECT maxIntersectionsPosition(start, end) FROM my_events;
```

```response title=Response theme={null}
┌─maxIntersectionsPosition(start, end)─┐
│                                    2 │
└──────────────────────────────────────┘
```
