> For the complete documentation index, see [llms.txt](https://docs.nexthink.com/platform/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.nexthink.com/platform/ja/understanding-key-data-platform-concepts/nexthink-query-language-nql/nql-keywords/nql-summarize.md).

# NQLサマライズ

`要約` ステートメントは情報を1つの結果に凝縮します。

### 構文 <a href="#nqlsummarize-syntax" id="nqlsummarize-syntax"></a>

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

```
...
| summarize <新しい指標名> = <指標>.<集計関数>
```

{% endcode %}

### 例 <a href="#nqlsummarize-examples" id="nqlsummarize-examples"></a>

デバイスごとのページビュー数の平均値を計算します。

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

```
デバイス
| web.page_views を 6月1日から6月7日まで指定
| num_navigations = number_of_page_views.sum() を計算
| 要約 average_num_navigation_per_device = num_navigations.avg()
```

{% endcode %}

| average\_num\_navigation\_per\_device |
| ------------------------------------- |
| 115.9                                 |

過去7日間にアクティブなデバイスの数をカウントします。 `count()` 集約関数の場合、ルートテーブルのレコード数をカウントするためには、集約の前にフィールド名を省略できます。

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

```
過去7日間のデバイス
| 要約 number_of_devices = count()
```

{% endcode %}

| number\_of\_devices |
| ------------------- |
| 285                 |

すべてのバイナリの合計サイズを計算します。

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

```
過去7日間のバイナリ
| 要約 total_size = size.sum()
```

{% endcode %}

| total\_size |
| ----------- |
| 611.3 GB    |


---

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