‎11-20-2014 11:02 AM
Select
Top 1000000 Case Coalesce(tblAssetCustom.Manufacturer, '')
When '' Then 'Unknown'
Else tblAssetCustom.Manufacturer
End As AssetManufacturer,
Count(tblAssets.AssetID) As Total
From tblAssets
Inner Join tblAssetCustom On tblAssets.AssetID = tblAssetCustom.AssetID
Inner Join tblState On tblState.State = tblAssetCustom.State
Where tblState.Statename = 'Active'
Group By (Case Coalesce(tblAssetCustom.Manufacturer, '')
When '' Then 'Unknown'
Else tblAssetCustom.Manufacturer End)
Order By Total Desc
Experience Lansweeper with your own data. Sign up now for a 14-day free trial.
Try Now