这个也能过^_^
牛客每个人最近的登录日期(五)
http://www.nowcoder.com/questionTerminal/ea0c56cd700344b590182aad03cc61b8
select *
from
(select user_id, min(date) day
from login
group by user_id) a
join
(select distinct date
from login) b
on a.day=b.date
where user_id in (select user_id from (select user_id, date_add(date, interval 1 day) from login) t)