题解 | #牛客每个人最近的登录日期(四)#
牛客每个人最近的登录日期(四)
https://www.nowcoder.com/practice/e524dc7450234395aa21c75303a42b0a
select date, sum(case when (user_id,date) in (select user_id,min(date) from login group by user_id) then 1 else 0 end) as new from login group by date order by date
按照日期分类,case when的使用,去选择用户ID和最新登陆日期
顺丰集团工作强度 379人发布
