select u.name u_n,c.name c_name,t.date date
from (select *,max(date)over(partition by user_id) t_max
from login) t
join user u
on t.user_id = u.id
join client c
on t.client_id = c.id
where t_max = date
order by u_n;