नीचे दी गई क्वेरी ProjectRevId और DateCreated के बीच किसी भी संबंध पर ध्यान दिए बिना काम करेगी।
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