CoinDCX Interview Question

SQL rolling sum without window function