→ 🚀What's New? Join Us for the Fall Product Launch! Register Now !
‎11-20-2014 11:07 AM
SELECT
TOP 1000000 CASE COALESCE (tblassetcustom.Manufacturer, '') WHEN '' THEN 'Unknown' ELSE tblassetcustom.Manufacturer END AS CompManufacturer,
COUNT(tblAssets.AssetID) AS Total
FROM tblAssets
INNER JOIN tblAssetCustom ON tblAssets.AssetID = tblAssetCustom.AssetID
INNER JOIN tsysAssetTypes ON tblAssets.Assettype = tsysAssetTypes.AssetType
Inner Join tblState On tblState.State = tblAssetCustom.State
WHERE tblState.Statename = 'Active' AND (tsysAssetTypes.AssetTypename = 'Windows' Or tsysAssetTypes.AssetTypename = 'Windows CE')
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