Please refer below scirpt.
SQL
DECLARE @temp AS TABLE([identity] INT IDENTITY(1,1),UserID INT,UpdatedDate DATETIME)
INSERT INTO @temp VALUES
(1,'2015/08/15'),
(2,'2015/08/18'),
(2,'2015/08/09'),
(1,'2015/08/21'),
(3,'2015/08/22')
SELECT DISTINCT (SELECT TOP 1 [identity]
FROM @temp tInner
WHERE tInner.UpdatedDate = MAX(tOuter.UpdatedDate)
AND tInner.UserID = tOuter.UserID
) [Identity]
,UserID
,MAX(UpdatedDate) as UpdatedDate
FROM @temp tOuter
GROUP BY UserID
ORDER BY 3 DESC
Screenshot
