02-09-2017 08:13 PM
07-07-2017 08:24 AM
06-13-2017 03:23 PM
Select
Top 1000000 tblSoftwareUni.softwareName As Software,
tblSoftware.softwareVersion As Version,
tblSoftwareUni.SoftwarePublisher As Publisher,
tsysAssetTypes.AssetTypename As [Asset Type],
Count(tblSoftware.AssetID) As Total,
tsysIPLocations.IPLocation
From tblSoftware
Inner Join tblAssets On tblSoftware.AssetID = tblAssets.AssetID
Inner Join tblSoftwareUni On tblSoftware.softID = tblSoftwareUni.SoftID
Inner Join tblAssetCustom On tblAssets.AssetID = tblAssetCustom.AssetID
Inner Join tsysAssetTypes On tsysAssetTypes.AssetType = tblAssets.Assettype
Inner Join tsysIPLocations On tsysIPLocations.LocationID = tblAssets.LocationID
Where tblAssetCustom.State = 1
Group By tblSoftwareUni.softwareName, tblSoftware.softwareVersion, tblSoftwareUni.SoftwarePublisher, tsysAssetTypes.AssetTypename, tsysIPLocations.IPLocation
Union
Select
Top 1000000 tblSoftwareUni.softwareName As Software,
tblLinuxSoftware.Version As Version,
tblSoftwareUni.SoftwarePublisher As Publisher,
tsysAssetTypes.AssetTypename As [Asset Type],
Count(tblAssets.AssetID) As Total,
tsysIPLocations.IPLocation
From tblAssets
Inner Join tblAssetCustom On tblAssets.AssetID = tblAssetCustom.AssetID
Inner Join tblLinuxSoftware On tblAssets.AssetID = tblLinuxSoftware.AssetID
Inner Join tblSoftwareUni On tblSoftwareUni.SoftID = tblLinuxSoftware.SoftwareUniID
Inner Join tsysAssetTypes On tsysAssetTypes.AssetType = tblAssets.Assettype
Inner Join tsysIPLocations On tsysIPLocations.LocationID = tblAssets.LocationID
Where tblAssetCustom.State = 1
Group By tblSoftwareUni.softwareName, tblLinuxSoftware.Version, tblSoftwareUni.SoftwarePublisher, tsysAssetTypes.AssetTypename, tsysIPLocations.IPLocation
Union
Select
Top 1000000 tblSoftwareUni.softwareName As Software,
tblMacApplications.Version As Version,
tblSoftwareUni.SoftwarePublisher As Publisher,
tsysAssetTypes.AssetTypename As [Asset Type],
Count(tblAssets.AssetID) As Total,
tsysIPLocations.IPLocation
From tblAssets
Inner Join tblAssetCustom On tblAssets.AssetID = tblAssetCustom.AssetID
Inner Join tblMacApplications On tblAssets.AssetID = tblMacApplications.AssetID
Inner Join tblSoftwareUni On tblMacApplications.softid = tblSoftwareUni.SoftID
Inner Join tsysAssetTypes On tsysAssetTypes.AssetType = tblAssets.Assettype
Inner Join tsysIPLocations On tsysIPLocations.LocationID = tblAssets.LocationID
Where tblAssetCustom.State = 1
Group By tblSoftwareUni.softwareName, tblMacApplications.Version, tblSoftwareUni.SoftwarePublisher, tsysAssetTypes.AssetTypename, tsysIPLocations.IPLocation
Order By Total Desc, Software
06-09-2017 09:11 AM
Experience Lansweeper with your own data. Sign up now for a 14-day free trial.
Try Now