select name u_n,lo.date date,sum(number)over(partition by lo.user_id order by lo.date) ps_num from login lo right join passing_number pn on lo.user_id=pn.user_id and lo.date=pn.date left join user u on u.id=pn.user_id order by lo.date,name
select name u_n,lo.date date,sum(number)over(partition by lo.user_id order by lo.date) ps_num from login lo right join passing_number pn on lo.user_id=pn.user_id and lo.date=pn.date left join user u on u.id=pn.user_id order by lo.date,name