I have an Oracle query
select max(m.id),
m.someId keep (DENSE_RANK FIRST ORDER BY m.UpdateDate desc)
from MyTable m
groupBy m.someId
SQL Server does not support the "keep" construct, so you need to use a subquery:
select m.*
from (select *, row_number() over (partition by m.someid ORDER BY m.UpdateDate desc) as seqnum
from MyTable m
) m
where seqnum = 1
This finds the first row for each m.id with the most recent UpdateDate. It then chooses that row in the outer query. Note that you don't need a group by with this method.