শনিবার, ৩ সেপ্টেম্বর, ২০১৬

Calculate row value based on previous and actual row values

Assuming that stmnt_date has a UNIQUE constraint, this would be fairly easy with window/analytic functions: