# Where 연산자

## 개요

다음으로 데이터 필터링 `where`.

```kusto
| where <boolean expression>
```

## 예제

{% hint style="info" %}
예제 데이터

```kusto
let aws_alb = datatable [
  {"type": "https", "p_event_time": time.now(), "clientIp": "192.168.11.34", "elbStatusCode": 200, "sentBytes": 329},
  {"type": "https", "p_event_time": time.now() - 1s, "clientIp": "192.168.1.1", "elbStatusCode": 403, "sentBytes": 167},
  {"type": "https", "p_event_time": time.now() - 10m, "clientIp": "10.168.22.7", "elbStatusCode": 404, "sentBytes": 167},
  {"type": "https", "p_event_time": time.now() - 2d, "clientIp": "10.168.22.1", "elbStatusCode": 200, "sentBytes": 321}
];
```

{% endhint %}

### 이전 하루 이내의 데이터 필터링

조건에 따라 데이터 필터링:

```kusto
aws_alb
| where p_event_time > time.ago(1d)
```

| 이벤트                                                                                                                                      |
| ---------------------------------------------------------------------------------------------------------------------------------------- |
| `{ "p_event_time": "2025-03-06 15:03:11.709000", "clientIp": "192.168.11.34", "elbStatusCode": 200, "sentBytes": 329, "type": "https" }` |
| `{ "p_event_time": "2025-03-06 15:03:10.709000", "clientIp": "192.168.1.1", "elbStatusCode": 403, "sentBytes": 167, "type": "https" }`   |
| `{ "p_event_time": "2025-03-06 14:53:11.709000", "clientIp": "10.168.22.7", "elbStatusCode": 404, "sentBytes": 167, "type": "https" }`   |

### 여러 조건으로 필터링

다음으로 조건을 결합 `및`, `또는` 및 `not`. 선택적으로 다음으로 표현식을 그룹화하여 `()` 연산자 우선순위를 변경:

```kusto
aws_alb
| where p_event_time > time.ago(1d) and (elbStatusCode == 200 or elbStatusCode == 404)
```

| 이벤트                                                                                                                                      |
| ---------------------------------------------------------------------------------------------------------------------------------------- |
| `{ "p_event_time": "2025-03-06 15:05:47.536000", "clientIp": "192.168.11.34", "elbStatusCode": 200, "sentBytes": 329, "type": "https" }` |
| `{ "p_event_time": "2025-03-06 14:55:47.536000", "clientIp": "10.168.22.7", "elbStatusCode": 404, "sentBytes": 167, "type": "https" }`   |


---

# Agent Instructions: 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:

```
GET https://docs.panther.com/ko/pantherflow/operators/where.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
