# make\_set, make\_list

```
let Apps = datatable (User:string, AppName: string) [
 "User01", "1Password",
 "User01", "Camtasia 2021",
 "User02", "Camtasia 2021",
 "User03", "Microsoft Visio - en-us",
 "User03", "Microsoft Visio - en-us"
];
Apps
| summarize  make_set(AppName) by User
```

<figure><img src="https://3533425259-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fbx8yn20QqNJtsVaH9CY7%2Fuploads%2FnKDsaLsK5fE6QvJZNBA7%2Fimage.png?alt=media&#x26;token=78becb72-9485-41db-b422-5e4fecb9e21c" alt=""><figcaption></figcaption></figure>

```
let Apps = datatable (User:string, AppName: string) [
 "User01", "1Password",
 "User01", "Camtasia 2021",
 "User02", "Camtasia 2021",
 "User03", "Microsoft Visio - en-us",
 "User03", "Microsoft Visio - en-us"
];
Apps
| summarize  make_list(AppName) by User
```

<figure><img src="https://3533425259-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fbx8yn20QqNJtsVaH9CY7%2Fuploads%2FUkqBuBcK7byCc4TpPgPm%2Fimage.png?alt=media&#x26;token=9d273d23-100a-44d8-ae4f-3377f632d4c8" alt=""><figcaption></figcaption></figure>

```
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
```

<figure><img src="https://3533425259-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fbx8yn20QqNJtsVaH9CY7%2Fuploads%2FJh6RyU1tkyIZ9FevWnYu%2Fimage.png?alt=media&#x26;token=81394bc5-6cd0-42f2-9d44-8f0e0b8389ca" alt=""><figcaption></figcaption></figure>
