Mphasis Interview Question

SQL Queries on finding out the rolling sum