Truy vấn bên dưới sẽ hoạt động bất kể mối quan hệ nào giữa ProjectRevId và DateCreate.
SELECT *
FROM ProjectRevisions
INNER JOIN (
SELECT ProjectId
, MAX(DateCreated) AS DateCreated
FROM ProjectRevisions
GROUP BY ProjectId
) AS CurrentRevision
ON CurrentRevision.ProjectId = ProjectRevisions.ProjectId
AND CurrentRevision.DateCreated = ProjectRevisions.DateCreated