Mphasis interview question

SQL Queries on finding out the rolling sum