Starting from this query
SELECT DISTINCT Name,Manufacturer,Model,RevisionID FROM dbo.COMPUTER_TABLE ORDER BY Name,RevisionID
I get to the following table:
(Name,Manufacturer,Model,RevisionID)
UST8923 | Microsoft | Surface 2 | 1
UST8923 | Microsoft | Surface 2 | 2
UST8923 | Microsoft | Surface 3 | 3
UST8923 | Microsoft | Surface 3 | 4
CAD4258 | Lenovo | Thinkpad P1 | 1
CAD4258 | Lenovo | Thinkpad P1 | 2
CAD4258 | Dell | Latitude 5480 | 3
I need to get only the records with the highest RevisionID and discard the rest. So, I need to get this result:
UST8923 | Microsoft | Surface 3 | 4
CAD4258 | Dell | Latitude 5480 | 3
Any ideas?