Question: Please help with this SQL question: Write a SQL query that gets the rolling sum of the transaction amount of each store for each month
Please help with this SQL question:
Write a SQL query that gets the rolling sum of the transaction amount of each store for each month of the past year.
The original table (table name is "table") looks like this:

A D 1 StorelD 2 A 3 A 4. A B Date monthly_amt 201901 100 201902 105 201903 99 201904 180 5 A 6 A 7 A 300 201905 201906 201907 700 8 A 900 9 A 201908 4500 10 A 201909 80 11 A 201910 500 700 12 A 13 A 14 B 201911 201912 60 201901 777 15 B 201902 109 400 16 B 17 B 201903 201904 201905 700 500 201906 300 18 B 19 B 20 B 21 B 22 B 99 201907 201908 201909 66 300 201910 201911 50 7900 23 B 24 B 25 B 26 27 201912 500
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
