cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
dlafleur
Engaged Sweeper III

Good morning.  I am looking for a report that will give me asset type and counts.

Example:
X = VMs
X = Computers
X = Printers........   Etc.  

I am looking to have this report on both On-Prem and Cloud.  Does anyone have anything like this?

Thanks

1 ACCEPTED SOLUTION
Josha
Engaged Sweeper III

Something like this?  

 

SELECT
AssetTypename, COUNT(tblAssets.AssetID) as Total
FROM
tblAssets
LEFT JOIN tblAssetCustom  ON tblAssetCustom.AssetID = tblAssets.AssetID
LEFT JOIN tsysAssetTypes ON tsysAssetTypes.AssetType = tblAssets.Assettype
WHERE tblAssetCustom.State = 1
GROUP BY AssetTypename
Order By Total Desc

 

The results should look like this

 

AssetTypename	Total
Monitor			1234
Windows			4567
Printer			890
Webserver		123
IOS				45
VOIP phone		6
Linux			4

 

View solution in original post

1 REPLY 1
Josha
Engaged Sweeper III

Something like this?  

 

SELECT
AssetTypename, COUNT(tblAssets.AssetID) as Total
FROM
tblAssets
LEFT JOIN tblAssetCustom  ON tblAssetCustom.AssetID = tblAssets.AssetID
LEFT JOIN tsysAssetTypes ON tsysAssetTypes.AssetType = tblAssets.Assettype
WHERE tblAssetCustom.State = 1
GROUP BY AssetTypename
Order By Total Desc

 

The results should look like this

 

AssetTypename	Total
Monitor			1234
Windows			4567
Printer			890
Webserver		123
IOS				45
VOIP phone		6
Linux			4