Requirement was for OS versions/sp count but with added x86 or x64.
Taking Sherri Kissinger's findings and adding a join for addresswidth
oh, and if running as query to test then replace (@UserSIDs) with ('Disabled')
oh, and if running as query to test then replace (@UserSIDs) with ('Disabled')
SELECT OPSYS.Caption0 as C054, OPSYS.CSDVersion0,addresswidth0 as [x64/x86], COUNT(*) AS 'Count'
FROM fn_rbac_GS_OPERATING_SYSTEM(@UserSIDs) OPSYS
inner join fn_rbac_R_System(@UserSIDs) sys on OPSYS.ResourceID=sys.ResourceID join [v_GS_PROCESSOR] c on sys.ResourceID=c.ResourceID
GROUP BY OPSYS.Caption0, OPSYS.CSDVersion0,addresswidth0
ORDER BY OPSYS.Caption0, OPSYS.CSDVersion0
FROM fn_rbac_GS_OPERATING_SYSTEM(@UserSIDs) OPSYS
inner join fn_rbac_R_System(@UserSIDs) sys on OPSYS.ResourceID=sys.ResourceID join [v_GS_PROCESSOR] c on sys.ResourceID=c.ResourceID
GROUP BY OPSYS.Caption0, OPSYS.CSDVersion0,addresswidth0
ORDER BY OPSYS.Caption0, OPSYS.CSDVersion0