→ 🚀What's New? Join Us for the Fall Product Launch! Register Now !
‎10-31-2018 11:12 PM
‎11-01-2018 04:32 PM
Select Top 1000000
tsysIPLocations.IPLocation,
Case
When tblPortableBattery.AssetID Is Null
Then 'Desktop'
Else 'Laptop'
End As class,
Count(*) As count
From
tblAssets
Inner Join tblAssetCustom On tblAssets.AssetID = tblAssetCustom.AssetID
Inner Join tblComputerSystem ON tblAssets.AssetID = tblComputerSystem.AssetID
Inner Join tsysIPLocations On tsysIPLocations.LocationID = tblAssets.LocationID
Left Join tblPortableBattery On tblAssets.AssetID = tblPortableBattery.AssetID
Where
tblAssetCustom.State = 1 -- active
And tblAssets.Assettype = -1 -- Windows
And tblComputerSystem.DomainRole <= 1 -- not server
And DateDiff(dd, tblAssets.Firstseen, GetDate()) / 365.25 >= 3
Group By
tsysIPLocations.IPLocation,
Case
When tblPortableBattery.AssetID Is Null Then 'Desktop'
Else 'Laptop'
End
Order By
tsysIPLocations.IPLocation,
Case
When tblPortableBattery.AssetID Is Null Then 'Desktop'
Else 'Laptop'
End
Experience Lansweeper with your own data. Sign up now for a 14-day free trial.
Try Now