# case

```
let RequiredApps = toscalar (datatable (AppName: string) [
 "1Password",
 "Camtasia 2021",
 "Azure Monitor Agent"
]
| summarize  make_set(AppName));
AppInventory_CL
| where TimeGenerated > ago (7d)
| summarize arg_max(TimeGenerated, *) by ManagedDeviceID_g, AppName_s
| summarize  InstalledApps = make_set(AppName_s) by ManagedDeviceID_g, ComputerName_s
| extend  MissingApps= set_difference(RequiredApps, InstalledApps)
| extend CompliantStatus = case(ComputerName_s has 'MTR', "I don't care", MissingApps <> '[]', 'Not Compliant', 'Compliant')
| project ComputerName_s, MissingApps, CompliantStatus
```

<figure><img src="/files/O4rUcSz05gLuzTcVDBXK" alt=""><figcaption></figcaption></figure>


---

# 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://sandyzeng.gitbook.io/kql/kql-quick-guide/my-favorites/case.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.
