title | titleSuffix | description | ms.date | ms.subservice | ms.service | ms.topic | ms.assetid | author | ms.author | manager | ms.localizationpriority | ms.collection |
---|---|---|---|---|---|---|---|---|---|---|---|---|
Sample queries for client status |
Configuration Manager |
Sample queries that show how to join common client status views to other views. |
04/30/2019 |
sdk |
configuration-manager |
conceptual |
fe4dafee-8ea7-4829-884b-960cc09f6444 |
banreet |
banreetkaur |
apoorvseth |
low |
tier3 |
The following sample queries demonstrate how to join common client status views to other views.
This query lists each client computer in the site, the last time it requested policy, and the collections to which the computer belongs. The query uses the v_CH_PolicyRequestHistory view to read the last policy request time and joins, using the ResourceID column to the v_ClientCollectionMembers view.
SELECT dbo.CH_PolicyRequestHistory.MachineID AS ResourceID, dbo.CH_PolicyRequestHistory.RequestTime, dbo.v_ClientCollectionMembers.CollectionID
FROM dbo.CH_PolicyRequestHistory INNER JOIN
dbo.v_ClientCollectionMembers ON dbo.CH_PolicyRequestHistory.MachineID = dbo.v_ClientCollectionMembers.ResourceID