题解 | #牛客每个人最近的登录日期(六)#
牛客每个人最近的登录日期(六)
http://www.nowcoder.com/practice/572a027e52804c058e1f8b0c5e8a65b4
select name, date, ps_num from user join (select user_id, date, sum(number)over(partition by user_id order by date rows between unbounded preceding and current row)ps_num from passing_number)a on user.id=a.user_id order by date,name