SELECT gender, day, sum(score_points) over (partition by gender order by day) as total FROM Scores 
ORDER BY gender, day