Java's a bit of an odd duck of an example to use since the value of softwareName includes an update number that's associated with the full version number, but let's give this a shot.
Count the full softwareName values but display a truncated version number.
Select Top 1000000
tblSoftwareUni.softwareName,
Left(tblSoftware.softwareVersion, CharIndex('.', tblSoftware.softwareVersion) - 1) As Version,
Count(tblSoftware.AssetID) As Total
From
tblSoftware
Inner Join tblAssets On tblSoftware.AssetID = tblAssets.AssetID
Inner Join tblSoftwareUni On tblSoftware.softID = tblSoftwareUni.SoftID
Inner Join tblAssetCustom On tblAssets.AssetID = tblAssetCustom.AssetID
Where
tblAssetCustom.State = 1
AND tblSoftwareUni.softwareName Like 'java%'
Group By
tblSoftwareUni.softwareName,
Left(tblSoftware.softwareVersion, CharIndex('.', tblSoftware.softwareVersion) - 1)
Order By
Version Desc
On the other hand, if you just want the major version information from the softwareName -- e.g. you just want "Java 8" and don't care what update version -- you need to truncate the name. Something like this should get you closer to the target:
Select Top 1000000
CASE
WHEN CharIndex(' Update', tblSoftwareUni.softwareName) > 0
THEN LEFT(tblSoftwareUni.softwareName, CharIndex(' Update', tblSoftwareUni.softwareName)-1)
ELSE tblSoftwareUni.softwareName
END AS SoftwareName,
Left(tblSoftware.softwareVersion, CharIndex('.', tblSoftware.softwareVersion) - 1) As Version,
Count(tblSoftware.AssetID) As Total
From
tblSoftware
Inner Join tblAssets On tblSoftware.AssetID = tblAssets.AssetID
Inner Join tblSoftwareUni On tblSoftware.softID = tblSoftwareUni.SoftID
Inner Join tblAssetCustom On tblAssets.AssetID = tblAssetCustom.AssetID
Where
tblAssetCustom.State = 1
AND tblSoftwareUni.softwareName Like 'java%'
Group By
CASE
WHEN CharIndex(' Update', tblSoftwareUni.softwareName) > 0
THEN LEFT(tblSoftwareUni.softwareName, CharIndex(' Update', tblSoftwareUni.softwareName)-1)
ELSE tblSoftwareUni.softwareName
END,
Left(tblSoftware.softwareVersion, CharIndex('.', tblSoftware.softwareVersion) - 1)