# Nexthink Query Language (NQL)

Nexthink クエリ言語 (NQL) は、Nexthink によって開発されたプログラミング言語であり、データストレージ層から情報を要求し取得するために設計されています。 NQL クエリはデータを抽出し、人間が読みやすい形式にフォーマットします。

## データストレージ <a href="#nexthinkquerylanguage-nql-datastorage" id="nexthinkquerylanguage-nql-datastorage"></a>

Nexthink インスタンスは情報をパフォーマンスと効率のために最適化された様々な方法で保存します。 データのクエリを実行する際、システムは Nexthink クエリ言語 (NQL) を使用して書かれたステートメント、コマンド群、文句を受け取ります。 情報は様々なコンテナを使って構成され、フィールドと呼ばれるひとつまたは複数のレコードに保存されます。

<figure><img src="/files/jx28V6dCGfYo2M64aWAw" alt="Data storage structure" width="760"><figcaption></figcaption></figure>

フィールドは直接テーブル（コレクションと呼ばれる）にグループ化されるか、構造化フィールドにカプセル化されます。 1つ以上のコレクションは1つのネームスペースにのみ含まれますが、製品は複数のネームスペースに依存しています。

## データクエリ <a href="#nexthinkquerylanguage-nql-queryingdata" id="nexthinkquerylanguage-nql-queryingdata"></a>

Nexthink クエリ言語 (NQL) により、Nexthink プラットフォームから任意のデータを調査してクエリできます。 データにアクセスすることはできますが、新たなレコードの作成や既存のレコードの変更はできません。

NQL クエリを実行するには、調査エディターでクエリを書き、**実行** ボタンをクリックします。

{% hint style="info" %}
NQL クエリの最大長は 16000 文字です。
{% endhint %}

<figure><img src="/files/tVhQaYGU9hA5fHsvAmho" alt="Example query with results" width="760"><figcaption></figcaption></figure>

デフォルトで50件の結果が表示されます。 さらに結果を確認するには、ページの下部にある **さらに読み込む** ボタンをクリックして、別の50件の結果をロードします。

システムは、アカウントに割り当てられた[ロール](https://github.com/nexthink/documentation.online-product-documentation/blob/develop/ja_docs/configuring_nexthink/configuring-your-platform/administration/account-management/roles/README.md)のために定義された[ビュー領域](https://github.com/nexthink/documentation.online-product-documentation/blob/develop/ja_docs/user-guide/administration/account-management/roles/view-domain.md)権限に基づいて、アクセスできるデータのみを表示します。

## NQL 用語 <a href="#nexthinkquerylanguage-nql-nqlterminology" id="nexthinkquerylanguage-nql-nqlterminology"></a>

Nexthink は NQL 周辺の様々な概念を定義するために特定の専門用語を使用します。

### **クエリー**

NQL クエリは、コマンドを正常に実行してデータを返す特定のタイプの NQL ステートメントです。

{% code overflow="wrap" lineNumbers="true" %}

```
バイナリ
```

{% endcode %}

{% code overflow="wrap" lineNumbers="true" %}

```
過去24時間の web.events
| where application.name == "Confluence"
| summarize usage_hours = duration.sum() / 3600 by device.name, device.operating_system.platform, device.entity
| list device.name, usage_hours, device.operating_system.platform, device.entity
| sort usage_hours desc
```

{% endcode %}

NQL ステートメントはデータやスキーマを変更可能なコマンドを正常に実行する命令です。 一般向けに利用可能な現在の NQL の実装は、データの取得のみを許可しています。

### **句**

NQL 句はデータをフィルタして分析するためのコマンドです。

`| where application.name == "Confluence"`

`| list device.name, usage_hours, device.operating_system.platform, device.entity`

### **キーワード**

NQL キーワードはステートメントや句を構築するために使用される予約語です。 たとえば：

`where` `summarize` `list`

### **オペレーター**

NQL オペレーターは、ステートメントや句内の1つ以上の項目にアクションを実行するための記号です。 たとえば：

`/` `=` `>`

すべてのオペレーターのリストについては、[NQL オペレーター](/platform/ja/understanding-key-data-platform-concepts/nexthink-query-language-nql/nql-operators.md) ページをご覧ください。

* [NQL 構文の概要](/platform/ja/understanding-key-data-platform-concepts/nexthink-query-language-nql/nql-syntax-overview.md)
* [NQL キーワード](/platform/ja/understanding-key-data-platform-concepts/nexthink-query-language-nql/nql-keywords.md)
* [NQL operators](/platform/ja/understanding-key-data-platform-concepts/nexthink-query-language-nql/nql-operators.md)
* [NQL functions](/platform/ja/understanding-key-data-platform-concepts/nexthink-query-language-nql/nql-functions.md)
* [NQL カタログ](/platform/ja/understanding-key-data-platform-concepts/nexthink-query-language-nql/nql-catalog.md)
* [NQL データモデル](/platform/ja/understanding-key-data-platform-concepts/nql-data-model.md)
* [NQL FAQ](/platform/ja/understanding-key-data-platform-concepts/nexthink-query-language-nql/nql-faq.md)


---

# 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.nexthink.com/platform/ja/understanding-key-data-platform-concepts/nexthink-query-language-nql.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.
