最后登录时间 即为“最大”时间

SELECT user_id, MAX(date)
FROM login
GROUP BY user_id
ORDER BY user_id