Cogneesol interview question

Q: How to calculate cumulative Sales