This query returns a row for each device with the amount of Critical, High, Medium and Low Vulnerabilities that device has.
DeviceTvmSoftwareVulnerabilities
| project DeviceName, VulnerabilitySeverityLevel
| evaluate pivot(VulnerabilitySeverityLevel): (DeviceName: string,Critical: long, High: long, Medium: long, Low: long)
| sort by Critical, High, Medium, Low