Select Top 1000000 sub1.lastPatch, Count(tblAssets.AssetID) As Total From tblAssets Inner Join tblAssetCustom On tblAssets.AssetID = tblAssetCustom.AssetID left join ( Select Top 1000000 Max(tblQuickFixEngineeringUni.HotFixID) As lastPatch, tblQuickFixEngineering.AssetID from tblQuickFixEngineering Inner Join tblQuickFixEngineeringUni On tblQuickFixEngineeringUni.QFEID = tblQuickFixEngineering.QFEID group by tblQuickFixEngineering.AssetID) as sub1 on sub1.AssetID = tblassets.AssetID Where tblAssetCustom.State = 1 And tblAssets.Assettype = -1 and sub1.lastPatch is not null group by sub1.lastPatch Order By Total Desc
Explore the full platform, free for 14 days.
No credit card required.