The report below gives back a list of asset types with count of assets having the asset type.
The report will only list assets that meet all of the following criteria:
- The computer's state is set to "active".
- The computer has been successfully scanned at least once.
SELECT
TOP 1000000 tsysAssetTypes.AssetTypename,
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'
GROUP BY tsysAssetTypes.AssetTypename
ORDER BY total DESC