截止到某日期,用户累计通过的题目数量关键点:累计-->某个日期及过去日期里的刷题通过数量的加和-->想到自连接判断日期大小 select t1.name as u_n, t2.date, t2.ps_num from user t1 right join ( select p1.user_id, p1.date, sum(p2.number) as ps_num from passing_number p1 left join passing_number p2 on p2.date<=p1.date where p1.use...