> For the complete documentation index, see [llms.txt](https://docs.panther.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.panther.com/ko/pantherflow/operators/summarize.md).

# Summarize 연산자

## 개요

다음을 사용해 결과를 집계 `summarize`.

```kusto
| summarize [[<dest>=]aggregation[, ...]] by [<dest>=]<expression>[, ...] 
```

다음을 포함한 여러 집계를 지원합니다:

* [`agg.avg()`](https://docs.panther.com/ko/pantherflow/operators/pages/c558177b40b82223aa5247e48b550d9e8e0ee9b1#agg.avg)
* [`agg.count()`](https://docs.panther.com/ko/pantherflow/operators/pages/c558177b40b82223aa5247e48b550d9e8e0ee9b1#agg.count)
* [`agg.count_distinct()`](https://docs.panther.com/ko/pantherflow/operators/pages/c558177b40b82223aa5247e48b550d9e8e0ee9b1#agg.count_distinct)
* [`agg.make_set()`](https://docs.panther.com/ko/pantherflow/operators/pages/c558177b40b82223aa5247e48b550d9e8e0ee9b1#agg.make_set)
* [`agg.max()`](https://docs.panther.com/ko/pantherflow/operators/pages/c558177b40b82223aa5247e48b550d9e8e0ee9b1#agg.max)
* [`agg.min()`](https://docs.panther.com/ko/pantherflow/operators/pages/c558177b40b82223aa5247e48b550d9e8e0ee9b1#agg.min)
* [`agg.percentile_cont()`](https://docs.panther.com/ko/pantherflow/operators/pages/c558177b40b82223aa5247e48b550d9e8e0ee9b1#agg.percentile_cont)
* [`agg.stddev()`](https://docs.panther.com/ko/pantherflow/operators/pages/c558177b40b82223aa5247e48b550d9e8e0ee9b1#agg.stddev)
* [`agg.sum()`](https://docs.panther.com/ko/pantherflow/operators/pages/c558177b40b82223aa5247e48b550d9e8e0ee9b1#agg.sum)
* [`agg.take_any()`](https://docs.panther.com/ko/pantherflow/operators/pages/c558177b40b82223aa5247e48b550d9e8e0ee9b1#agg.take_any)

사용 가능한 집계의 전체 목록은 다음에서 확인하세요 [집계 함수](/ko/pantherflow/functions/aggregation.md).

## 예시

### 개수

다음 쿼리는 필드에 저장된 지난 하루 동안의 모든 이벤트 수를 표시합니다 `num_connections`:

```kusto
panther_logs.public.aws_alb
| where p_event_time > time.ago(1d)
| summarize num_connections=agg.count()
```

| num\_connections |
| ---------------- |
| 993              |

### 단일 필드별 개수 그룹화

다음 쿼리는 각 항목에 대한 연결 수를 계산합니다 `clientIp` 그리고 연결 수가 가장 많은 순서대로 결과를 정렬합니다:

```kusto
panther_logs.public.aws_alb
| where p_event_time > time.ago(1d)
| summarize num_connections=agg.count() by clientIp
| sort num_connections
```

| clientIp     | num\_connections |
| ------------ | ---------------- |
| 192.167.7.55 | 979              |
| 10.145.4.26  | 130              |
| 10.99.231.15 | 31               |
| ...          |                  |

### 여러 필드별 개수 그룹화

다음 쿼리는 `num_connections` 다음 두 항목 모두로 그룹화된 `clientIp` 및 `clientPort` 필드:

```kusto
panther_logs.public.aws_alb
| where p_event_time > time.ago(1d)
| summarize num_connections=agg.count() by clientIp, clientPort
| sort num_connections
```

| clientIp     | clientPort | num\_connections |
| ------------ | ---------- | ---------------- |
| 192.167.7.55 | 50160      | 7                |
| 10.145.4.26  | 63335      | 5                |
| 10.145.4.26  | 60845      | 4                |
| 192.167.7.55 | 52138      | 4                |
| 10.99.231.15 | 58704      | 3                |
| …            |            |                  |

### 임의의 표현식별 개수 그룹화

```kusto
panther_logs.public.aws_alb
| where p_event_time > time.ago(1d)
| summarize num_connections=agg.count() by isOK = elbStatusCode == 200
| sort num_connections
```

| isOK  | num\_connections |
| ----- | ---------------- |
| true  | 1114             |
| false | 324              |

### 고유 개수

아래 쿼리는 다음의 고유한 개수를 저장합니다 `clientIp`의 `num_distinct_clients`:

```kusto
panther_logs.public.aws_alb
| where p_event_time > time.ago(1d)
| summarize num_distinct_clients=agg.count_distinct(clientIp)
```

| num\_distinct\_clients |
| ---------------------- |
| 121                    |

### 나중에 집계를 참조하기

이후 쿼리 식에서 집계를 참조할 수 있습니다:

```kusto
panther_logs.public.aws_alb
| where p_event_time > time.ago(1d)
| summarize num_connections=agg.count() by clientIp, clientPort
| where num_connections >= 5
```

| clientIp     | clientPort | num\_connections |
| ------------ | ---------- | ---------------- |
| 192.167.7.55 | 50160      | 7                |
| 10.145.4.26  | 63335      | 5                |
| ...          |            |                  |

### 필드별 요약(집계 없이)

아래 쿼리는 각 고유한 `userAgent`:

```kusto
panther_logs.public.aws_alb
| where p_event_time > time.ago(1d)
| summarize by userAgent
```

| userAgent                                                                                                                              |
| -------------------------------------------------------------------------------------------------------------------------------------- |
| Mozilla/5.0 (X11; Linux x86\_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/31.0.1650.63 Safari/537.36                              |
| curl/8.1.2                                                                                                                             |
| Mozilla/5.0 (Linux; Android 7.0; LG-H918 Build/NRD90M) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Mobile Safari/537.36 |
| …                                                                                                                                      |


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.panther.com/ko/pantherflow/operators/summarize.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
