WITH scores(name, points) AS ( VALUES ('Ari', 10), ('Bo', 10), ('Cy', 20) ) SELECT name, points, SUM(points) OVER (ORDER BY points) AS running_points FROM scores ORDER BY name;