# NQLデータタイプ

データ型は、フィールドに格納された値の属性です。 これは、フィールドにどのような種類のデータを格納できるかを決定します。

`where`句を使用してNQLクエリに条件を適用するとき、同じデータ型の値のみが比較可能であり、これは値の形式に反映されます。

例えば、次のクエリでは、

* 最初の`where`句は、文字列データ型の値を比較します。 そのため、比較値は文字列であることを示すために引用符で囲まれています。
* 2番目の`where`句はバージョンを比較します。 ここでは、比較値の前に'v'が付き、バージョン番号を表すために複数のポイントが含まれています。
* 最後の`where`句は整数を比較します。 この場合、比較値は追加の文字なしで単独の数字として表現されます。

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

```
過去1日間のデバイス
| 過去1日間の実行中にクラッシュを含む
| where application.name == "Microsoft 365: Teams"
| where binary.version == v1.7.0.1864
| compute number_of_crashes_ = number_of_crashes.sum()
| where number_of_crashes_ >= 3
```

{% endcode %}

NQLデータモデルには、次のデータ型が存在します。

<table data-full-width="true"><thead><tr><th width="145">データタイプ</th><th width="137">有効な演算子</th><th width="225">定義</th><th>値の例</th></tr></thead><tbody><tr><td>文字列</td><td><p><code>==</code> または <code>=</code></p><p><code>!=</code></p><p><code>in</code></p><p><code>!in</code></p></td><td>テキスト文字の文字列</td><td><code>"abc"</code> または <code>'abc'</code></td></tr><tr><td>int</td><td><p><code>=</code></p><p><code>!=</code></p><p><code>&#x3C;</code></p><p><code>></code></p><p><code>&#x3C;=</code></p><p><code>>=</code></p><p><code>in</code></p><p><code>!in</code></p></td><td>整数</td><td><code>10</code></td></tr><tr><td>float</td><td><p><code>=</code></p><p><code>!=</code></p><p><code>&#x3C;</code></p><p><code>></code></p><p><code>&#x3C;=</code></p><p><code>>=</code></p></td><td>浮動小数点数</td><td><code>10.1</code></td></tr><tr><td>ブール値</td><td><p><code>=</code></p><p><code>!=</code></p></td><td>真または偽の値</td><td><p><code>true</code></p><p><code>false</code></p></td></tr><tr><td>日付と時間</td><td><p><code>=</code></p><p><code>!=</code></p><p><code>&#x3C;=</code></p><p><code>>=</code></p></td><td>日付と時間</td><td><code>2024-07-15 10:15:00</code></td></tr><tr><td>列挙型</td><td><p><code>=</code></p><p><code>!=</code></p></td><td><p>名前付き要素の集合</p><p>例えば <code>red</code> <code>blue</code> <code>white</code></p></td><td><code>status == red</code></td></tr><tr><td>バイト</td><td><p><code>&#x3C;</code></p><p><code>></code></p><p><code>&#x3C;=</code></p><p><code>>=</code></p></td><td><p>バイト数</p><p>（単位を持つ整数）</p></td><td><p><code>100B</code></p><p><code>200KB</code></p><p><code>3MB</code></p><p><code>12GB</code></p><p><code>2TB</code></p></td></tr><tr><td>長さ</td><td><p><code>=</code></p><p><code>!=</code></p><p><code>&#x3C;</code></p><p><code>></code></p><p><code>&#x3C;=</code></p><p><code>>=</code></p></td><td><p>時間の長さ</p><p>（単位付き整数）</p></td><td><p><code>5ms</code></p><p><code>10s</code></p><p><code>4min</code></p><p><code>3h</code></p><p><code>2d</code></p></td></tr><tr><td>IPアドレス</td><td><p><code>=</code></p><p><code>!=</code></p></td><td><p>IPv4またはIPv6アドレス</p><p>オプションのマスク付き</p></td><td><p><code>123.123.0.0</code></p><p><code>123.123.0.0/24</code></p><p><code>f164:b28c:84a5:9dd3:ef21:8c9d:d3ef:218c</code></p><p><code>f164:b28c:84a5:9dd3::/32</code></p></td></tr><tr><td>バージョン</td><td><p><code>&#x3C;</code></p><p><code>></code></p><p><code>&#x3C;=</code></p><p><code>>=</code></p><p><code>==</code></p><p><code>!=</code></p></td><td><code>.</code>で区切られた数値の集合</td><td><p><code>v12.212</code></p><p><code>v1.2.5.9</code></p><p><code>v13.5.10</code></p><p><code>v2022.6</code></p><p><code>v1.2.4125</code></p><p><code>v6.8.9.7.6.5.4.3</code></p></td></tr><tr><td>文字列配列</td><td><p><code>contains</code></p><p><code>!contains</code></p></td><td><p>文字列の配列</p><p>例えば <code>['abc', 'def', 'xyz']</code></p></td><td><p><code>tags contains "abc"</code></p><p><code>tags !contains "*xyz"</code></p></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-syntax-overview/nql-data-types.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.
