‎01-29-2015 07:47 PM
Solved! Go to Solution.
‎01-30-2015 12:12 PM
Select Top 1000000 OSInstalls.IPLocation,
OSInstalls.CountOSInstalls As [OS installations],
OfficeInstalls.CountOfficeInstalls As [Office installations]
From (Select Distinct Top 1000000 Count(tblAssets.AssetID) As CountOSInstalls,
tsysIPLocations.IPLocation
From tblAssets
Inner Join tsysOS On tblAssets.OScode = tsysOS.OScode
Inner Join tsysIPLocations
On tblAssets.IPNumeric Between tsysIPLocations.StartIP And
tsysIPLocations.EndIP
Where tsysOS.OSname Like '%Win%'
Group By tsysIPLocations.IPLocation) OSInstalls
Left Join (Select Distinct Top 1000000 Count(tblSoftware.AssetID) As
CountOfficeInstalls,
tsysIPLocations.IPLocation
From tblSoftware
Inner Join tblSoftwareUni On tblSoftware.softID = tblSoftwareUni.SoftID
Inner Join tblAssets On tblSoftware.AssetID = tblAssets.AssetID
Inner Join tsysIPLocations
On tblAssets.IPNumeric Between tsysIPLocations.StartIP And
tsysIPLocations.EndIP
Where (tblSoftwareUni.softwareName Like '%Microsoft Office%Standard%') Or
(tblSoftwareUni.softwareName Like '%Microsoft Office%Professional%') Or
(tblSoftwareUni.softwareName Like '%Microsoft Office%Business%') Or
(tblSoftwareUni.softwareName Like '%Microsoft Office%ProPlus%')
Group By tsysIPLocations.IPLocation) OfficeInstalls On OSInstalls.IPLocation =
OfficeInstalls.IPLocation
Order By OSInstalls.IPLocation
‎01-30-2015 12:12 PM
Select Top 1000000 OSInstalls.IPLocation,
OSInstalls.CountOSInstalls As [OS installations],
OfficeInstalls.CountOfficeInstalls As [Office installations]
From (Select Distinct Top 1000000 Count(tblAssets.AssetID) As CountOSInstalls,
tsysIPLocations.IPLocation
From tblAssets
Inner Join tsysOS On tblAssets.OScode = tsysOS.OScode
Inner Join tsysIPLocations
On tblAssets.IPNumeric Between tsysIPLocations.StartIP And
tsysIPLocations.EndIP
Where tsysOS.OSname Like '%Win%'
Group By tsysIPLocations.IPLocation) OSInstalls
Left Join (Select Distinct Top 1000000 Count(tblSoftware.AssetID) As
CountOfficeInstalls,
tsysIPLocations.IPLocation
From tblSoftware
Inner Join tblSoftwareUni On tblSoftware.softID = tblSoftwareUni.SoftID
Inner Join tblAssets On tblSoftware.AssetID = tblAssets.AssetID
Inner Join tsysIPLocations
On tblAssets.IPNumeric Between tsysIPLocations.StartIP And
tsysIPLocations.EndIP
Where (tblSoftwareUni.softwareName Like '%Microsoft Office%Standard%') Or
(tblSoftwareUni.softwareName Like '%Microsoft Office%Professional%') Or
(tblSoftwareUni.softwareName Like '%Microsoft Office%Business%') Or
(tblSoftwareUni.softwareName Like '%Microsoft Office%ProPlus%')
Group By tsysIPLocations.IPLocation) OfficeInstalls On OSInstalls.IPLocation =
OfficeInstalls.IPLocation
Order By OSInstalls.IPLocation
Experience Lansweeper with your own data. Sign up now for a 14-day free trial.
Try Now