Thanks! That accomplished what I needed.
Unfortunately I tried to apply this to the OS: Operating System Overview report and have failed ever so miserably. The goal of the report is to report of the count of each OS (2003 standard, enterprise, 2008 std and ent, etc) per domain. If it's not too much to ask could you point me in the right direction?
This is only giving me count by OSname and what I'm really looking for is to get the count by Caption (I guess?)
Select Top 1000000 tblAssets.Domain,
tsysOS.OSname,
Count(tblOperatingsystem.Caption) As Total
From tblAssets
Inner Join tblOperatingsystem
On tblAssets.AssetID = tblOperatingsystem.AssetID
Inner Join tsysOS On tsysOS.OScode = tblAssets.OScode
Inner Join tblAssetCustom On tblAssets.AssetID = tblAssetCustom.AssetID
Where tblAssetCustom.State = 1
Group By tblAssets.Domain,
tsysOS.OSname
Order By Total Desc,
tsysOS.