题解 | #牛客每个人最近的登录日期(四)#
牛客每个人最近的登录日期(四)
https://www.nowcoder.com/practice/e524dc7450234395aa21c75303a42b0a
select t1.date as 'date', count(t2.user_id) as 'new' from (select distinct date from login ) as t1 left join (select user_id, min(date) as 'first_date' from login group by user_id) as t2 on t1.date = t2.first_date group by t1.date order by t1.date asc;
查看13道真题和解析