This Wiki is to create an SCCM query for fetching the listed machines in which any software is installed. 

Here we have tested the Query using this we've created a listed device collection; for which the deployment will be mapped in order to upgrade the software

This SQL Query will fetch the list of machines in which "Adobe Acrobat Reader DC" is installed with a software version.

Create a New Query and limit the collection to All Systems\All Servers (according to your need) under the Edit rule copy and paste this SQL query. We can change the applications name and search for the respective software.


select distinct
SMS_R_System.Name,
SMS_G_System_OPERATING_SYSTEM.Caption, SMS_G_System_OPERATING_SYSTEM.CSDVersion,
SMS_R_System.LastLogonUserName, SMS_G_System_ADD_REMOVE_PROGRAMS.DisplayName, SMS_G_System_ADD_REMOVE_PROGRAMS.Version from SMS_R_System
inner join
SMS_G_System_ADD_REMOVE_PROGRAMS on SMS_G_System_ADD_REMOVE_PROGRAMS.ResourceID = SMS_R_System.ResourceId
inner join
SMS_G_System_OPERATING_SYSTEM
on
SMS_G_System_OPERATING_SYSTEM.ResourceID = SMS_R_System.ResourceId where SMS_G_System_ADD_REMOVE_PROGRAMS.DisplayName like "%Adobe Reader%" and SMS_G_System_ADD_REMOVE_PROGRAMS.Version like "%"