Use the code:
select T.UserId,T.dt from (select UserId,max(dt)
over (partition by UserId) as dt from t_users)T where T.dt=dt;
This will retrieve the results, irrespective of duplicate values for UserId. If your UserId is unique, well it becomes more simple:
select UserId,max(dt) from t_users group by UserId;