07-27-2021 10:57 AM
08-03-2021 11:52 AM
08-02-2021 02:22 PM
08-02-2021 03:39 PM
Select Top 1000000 Count(tblAssets.AssetID) As Count,
tblADGroups.Name As ADGroupName,
Query1.softwareName
From tblAssets
Left Join tsysOS On tsysOS.OScode = tblAssets.OScode
Inner Join tblAssetCustom On tblAssets.AssetID = tblAssetCustom.AssetID
Inner Join tblComputersystem On tblAssets.AssetID = tblComputersystem.AssetID
Left Join tblADComputers On tblAssets.AssetID = tblADComputers.AssetID
Left Join tblADMembership On tblADMembership.ChildAdObjectID =
tblADComputers.ADObjectID
Left Join tblADGroups On tblADMembership.ParentAdObjectID =
tblADGroups.ADObjectID
Inner Join tsysAssetTypes On tsysAssetTypes.AssetType = tblAssets.Assettype
Inner Join tsysIPLocations On tsysIPLocations.LocationID =
tblAssets.LocationID
Inner Join tblState On tblState.State = tblAssetCustom.State
Right Join (Select tblSoftwareUni.softwareName,
tblSoftware.AssetID
From tblSoftwareUni
Inner Join tblSoftware On tblSoftwareUni.SoftID = tblSoftware.softID)
Query1 On Query1.AssetID = tblAssets.AssetID
Where tblADGroups.Name = '**AD GROUP NAME**'
Group By tblADGroups.Name,
Query1.softwareName
Order By ADGroupName
07-29-2021 05:00 PM