Jag tror att det här kommer att göra vad du vill.
;WITH X1
AS
(
SELECT SomeDateTime
,GroupID
,ID
,ROW_NUMBER() OVER (PARTITION BY GroupID
ORDER BY SomeDateTime DESC
) AS rn
FROM X
)
SELECT SomeDateTime
,GroupID
,ID
FROM X1
WHERE rn = 1