My query which I found online, is below. It worked fine until I added a column from v_R_User. I'm terrible at joins and suspect this might be cause of my problem. Can anyone confirm?
select distinct v_R_System.Resource_Domain_OR_Workgr0 as 'Site',
v_R_System.Netbios_Name0 as 'Computer Name',
v_R_User.Full_User_Name0 as 'Full Name'
from v_R_System inner join v_FullCollectionMembership FCM on FCM.ResourceID = v_R_System.ResourceID
join v_R_User on v_R_System.SID0 = v_R_User.SID0
where v_R_System.Name0 not in (select distinct v_R_System.Name0 from v_R_System inner join v_GS_ADD_REMOVE_PROGRAMS on v_GS_ADD_REMOVE_PROGRAMS.ResourceId = v_R_System.ResourceId
where v_GS_ADD_REMOVE_PROGRAMS.DisplayName0 = 'McAfee Agent') and FCM.CollectionID = 'SMS00001'