> For the complete documentation index, see [llms.txt](https://docs.nexthink.com/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-functions/nql-sumif.md).

# NQL sumif()

`sumif()` コマンドは、指定された条件に一致する行から値を集計します。追加の引数を受け取り、どの行を含めるかを決定する条件を指定します。

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

```
devices during past 24h
| include web.page_views during past 24h
| where application.name == "Confluence"
| compute total_cnt = page_view.number_of_page_views.sumif(page_view.experience_level == frustrating)
| sort total_cnt desc
| limit 10
```

{% endcode %}

<table data-full-width="true"><thead><tr><th width="225">名前</th><th width="184">エンティティ</th><th width="290">ハードウェア → 機種モデル</th><th width="271">ハードウェア → デバイスタイプ</th><th width="404">オペレーティングシステム -> 名称</th><th>合計数</th></tr></thead><tbody><tr><td>NXDOCS-1704355664</td><td>スイス</td><td>MacBookPro18,3</td><td>ノートパソコン</td><td>macOS Sonoma 14.2.1 (ARM 64ビット)</td><td>7</td></tr><tr><td>NXDOCS-1704355669</td><td>スペイン</td><td>ThinkPad P1 Gen 4i</td><td>ノートパソコン</td><td>Windows 11 Enterprise 22H2 (64ビット)</td><td>6</td></tr><tr><td>NXDOCS-1704355676</td><td>インド</td><td>HP ZBook Power G7 Mobile Workstation</td><td>ノートパソコン</td><td>Windows 11 Enterprise 22H2 (64ビット)</td><td>6</td></tr><tr><td>NXDOCS-1704355687</td><td>スペイン</td><td>ThinkPad T14s Gen 3</td><td>ノートパソコン</td><td>Windows 11 Pro 22H2 (64ビット)</td><td>5</td></tr><tr><td>NXDOCS-1704355691</td><td>インド</td><td>MacBookPro16,1</td><td>ノートパソコン</td><td>macOS Ventura 13.6.3 (64ビット)</td><td>5</td></tr><tr><td>NXDOCS-1704355695</td><td>アメリカ合衆国</td><td>MacBookPro18,3</td><td>ノートパソコン</td><td>macOS Sonoma 14.2.1 (ARM 64ビット)</td><td>5</td></tr><tr><td>NXDOCS-1704355714</td><td>イギリス</td><td>MacBookPro18,2</td><td>ノートパソコン</td><td>macOS Sonoma 14.2.1 (ARM 64ビット)</td><td>4</td></tr><tr><td>NXDOCS-1704355719</td><td>スイス</td><td>MacBookPro18,1</td><td>ノートパソコン</td><td>macOS Ventura 13.6.3 (ARM 64ビット)</td><td>4</td></tr><tr><td>NXDOCS-1704355725</td><td>インド</td><td>ThinkPad T480</td><td>ノートパソコン</td><td>Windows 10 Pro 22H2 (64ビット)</td><td>4</td></tr><tr><td>NXDOCS-1704355730</td><td>アメリカ合衆国</td><td>MacBookPro18,1</td><td>ノートパソコン</td><td>macOS Sonoma 14.0.0 (ARM 64ビット)</td><td>3</td></tr></tbody></table>


---

# 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 by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.nexthink.com/platform/ja/understanding-key-data-platform-concepts/nexthink-query-language-nql/nql-functions/nql-sumif.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
