Skip to main content
Practice

7

sql

SELECT user_id,
date,
progress_increment,
SUM(progress_increment) OVER (
PARTITION BY user_id
ORDER BY date
ROWS BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW
) AS cumulative_progress
FROM daily_progress;

Want to learn more?

Join CodeFriends Plus membership or enroll in a course to start your journey.