This request should go in the reports section, but hope this works for you:
Select Top 1000000 T1.AssetID,
T1.AssetName,
T1.SystemSoftwareCount,
T1.UserSoftwareCount,
T1.TotalSoftwareCount,
T1.icon
From (Select Distinct tblAssets.AssetID,
tblAssets.AssetName,
(Select Count(tblSoftware.SoftwareID) From tblSoftware
Where tblSoftware.AssetID = tblAssets.AssetID And tblSoftware.CurrentUser <>
1) As SystemSoftwareCount,
(Select Count(tblSoftware.SoftwareID) From tblSoftware
Where tblSoftware.AssetID = tblAssets.AssetID And tblSoftware.CurrentUser =
1) As UserSoftwareCount,
(Select Count(tblSoftware.SoftwareID) From tblSoftware
Where tblSoftware.AssetID = tblAssets.AssetID) As TotalSoftwareCount,
tsysOS.Image As icon
From tblAssets
Inner Join tblAssetCustom On tblAssetCustom.AssetID = tblAssets.AssetID
Inner Join tsysOS On tblAssets.OScode = tsysOS.OScode
Where tblAssetCustom.State = 1) T1
Where (T1.TotalSoftwareCount > 0)
Order By T1.AssetName