# NQL sumif()

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

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

```
過去24時間のデバイス
| 過去24時間のweb.page_viewsを含む
| application.name == "Confluence" の場合
| compute total_cnt = page_view.number_of_page_views.sumif(page_view.experience_level == frustrating)
| total_cnt を降順でソート
| 上位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: 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/nql-functions/nql-sumif.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.
