基于牛客每个人最近的登录日期(三)的题解 select distinct login.date,ifnull(b.p,0) from login left join ( select a.first_date,round(count(l.date)/count(*),3) as p from (select user_id, min(date) as first_date from login GROUP by user_id) as a left join login l on a.user_id=l.user_id and l.date=DATE_ADD(a.first_date,INT...