For full details, see this forums post.
http://social.technet.microsoft.com/Forums/en-US/configmgrinventory/thread/75288b97-1fe6-4634-a20a-54091bba8d91
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
where
(SMS_G_System_SoftwareFile.FilePath like "%\\Program Files\\Internet Explorer\\"
or SMS_G_System_SoftwareFile.FilePath like "%\\Program\\Internet Explorer\\")
and SMS_G_System_SoftwareFile.FileName = "iexplore.exe"
and SMS_G_System_SoftwareFile.FileVersion like "7.%"
and SMS_R_System.ResourceId not in (select ResourceID from SMS_CM_RES_COLL_SMS000ES)