select user_id,
    max(date)
from login
group by user_id
order by user_id