题解 | #牛客每个人最近的登录日期(三)#
牛客每个人最近的登录日期(三)
http://www.nowcoder.com/practice/16d41af206cd4066a06a3a0aa585ad3d
select round(count(distinct l.user_id)/(select count(distinct user_id) from login),3) p from login l,
(select user_id,DATE_ADD(date,INTERVAL 1 DAY) d from login) new
where l.user_id=new.user_id and l.date=new.d
查看7道真题和解析
