Hi, @robert jenkins
Thank you for posting in Microsoft Q&A forum.
To narrow down a device collection, we can use the class SMS_FullCollectionMembership, and you want to get the machines have accessed visio within the last 90 days, you may need to create software metering for visio, otherwise, we cannot get the time that visio used in a machine.
The query to narrow down a device collection:
Select SMS_R_SYSTEM.ResourceID,SMS_R_SYSTEM.ResourceType,SMS_R_SYSTEM.Name,SMS_R_SYSTEM.SMSUniqueIdentifier,SMS_R_SYSTEM.ResourceDomainORWorkgroup,SMS_R_SYSTEM.Client
from SMS_R_System
inner join SMS_G_System_SoftwareFile on SMS_G_System_SoftwareFile.ResourceID = SMS_R_System.ResourceId
inner join SMS_FullCollectionMembership FCM on FCM.ResourceID = SMS_R_System.ResourceId
where FCM.CollectionID = 'CollectionID' and SMS_G_System_SoftwareFile.FileName like "Visio.exe"
If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Add comment".