题解 | #牛客每个人最近的登录日期(六)#
牛客每个人最近的登录日期(六)
http://www.nowcoder.com/practice/572a027e52804c058e1f8b0c5e8a65b4
SELECT b.name AS u_n, a.date AS date, SUM(a.number) OVER(PARTITION BY a.user_id ORDER BY a.date ) AS ps_num FROM passing_number AS a, user AS b WHERE a.user_id = b.id ORDER BY a.date, b.name
第一张表用不到