Hello,
I am trying to generate a report to list all devices with latest .NETFramework. I don't work directly on SQL Queries much, and from past one day I am trying to figure out how to add a column that can give me the highest/latest .NETFramework Software's Version.
Here is the basic sql query that lists all assets with .NETFramework, but it also lists all versions. I want to be able to select MAX out of the available versions. I am not sure difference between LEFT JOIN and INNER JOIN, and how to embed the MAX statement. Can someone please assist?
Select Top 1000000 tsysOS.Image As icon,
tblAssets.AssetID,
tblAssets.AssetName,
tblSoftwareUni.softwareName As software,
tblSoftware.softwareVersion As version,
tblSoftwareUni.SoftwarePublisher As publisher,
tsysOS.OSname As OS,
tblAssets.SP As SP,
tblAssets.Firstseen,
tblAssets.Lastseen
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
Inner Join tsysOS On tblAssets.OScode = tsysOS.OScode
Where tblSoftwareUni.softwareName Like '%.NET%' And tblAssetCustom.State = 1
Order By tblAssets.AssetName,
software,
version
Thank you,
ArunKumar