# QUERY

**리스트 데이터를 조회할 때, SOQL을 작성하여 미리 필터링 및 정렬된 데이터를 가져올 수 있습니다.** 필터는 SOQL의 WHERE 절에 해당하며, 정렬은 ORDER BY 절에 해당합니다. 직접 SOQL을 작성할 수도 있지만, 쿼리 마법사(Query Wizard)를 활용하면 SOQL에 대한 지식 없이도 손쉽게 필터를 적용할 수 있습니다.

{% hint style="info" %}
**Query에서 WHERE 절은 데이터 테이블에 나타날 레코드 목록의 조건을 설정**하는 구문입니다. 직접 WHERE 절을 입력할 수 있으며, 쿼리 마법사(Query Wizard)를 클릭하여 설정할 수도 있습니다.
{% endhint %}

{% hint style="info" %}
**Query에서 ORDER BY 절은 데이터 테이블에 나타날 레코드 목록을 특정 필드로 정렬**하는 구문입니다. 직접 ORDER BY 절을 입력할 수 있으며, 필드 API명(Field API Name Finder)을 클릭하여 설정할 수도 있습니다.
{% endhint %}

***

### :small\_orange\_diamond: 설정 방법

1\. WHERE 절 오른쪽 하단의 쿼리 마법사(Query Wizard)를 클릭합니다.

<div><figure><img src="https://3985481653-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FA2fSsDo5KsIVkUoDIV1b%2Fuploads%2FBRqiro1nwWX8sujwYtqe%2Fimage.png?alt=media&#x26;token=45b3b223-3cd2-475b-b53a-a880375eb07a" alt="" width="308"><figcaption><p>데이터 테이블 설정 화면</p></figcaption></figure> <figure><img src="https://3985481653-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FA2fSsDo5KsIVkUoDIV1b%2Fuploads%2FIXW9vgqBdvcbE3erOj65%2Fimage.png?alt=media&#x26;token=8d44321a-6d6f-4987-a0e9-f6a0dff97c82" alt=""><figcaption><p>쿼리 마법사 화면</p></figcaption></figure></div>

2\. 조건을 걸고 싶은 필드와 값을 설정하고 적용(Apply) 버튼을 클릭합니다.

3\. 데이터 테이블 설정 화면의 ORDER BY 절에서 오른쪽 하단의 필드 API 명(Field API Name Finder)을 클릭합니다.

<figure><img src="https://3985481653-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FA2fSsDo5KsIVkUoDIV1b%2Fuploads%2FbRVeXSaBw2ezNsSdap0I%2Fimage.png?alt=media&#x26;token=ecc46d9a-ca8c-4c20-bb45-17a0f3669da9" alt=""><figcaption><p>필드 API명 화면</p></figcaption></figure>

4\. 정렬하고 싶은 필드를 선택합니다.

5\. 결과(Result) 창에 입력된 필드 API 명 뒤에 ASC(오름차순), DESC(내림차순)를 입력하고 저장(Save) 버튼을 클릭합니다.


---

# 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://help.smallbuilder.com/ko/smallbuilder-lists/undefined-1-1/datatable-setup/query.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.
