用户刷题情况:用户的名字,以及截止到某天,累计总通过了多少题
牛客每个人最近的登录日期(六)
https://www.nowcoder.com/practice/572a027e52804c058e1f8b0c5e8a65b4
select name u_n, date, sum(number) over(partition by user_id order by date) ps_num from login l left join passing_number p using(user_id,date) left join user u on l.user_id=u.id where number is not null order by date,u_n /* select u.name u_n, date, sum(number) over(partition by user_id order by date) from passing_number p left join user u on p.user_id=u.id order by date,u_n */