We have a table with columns TXN_DATE and NO_OF_TXNS. Below is sample data:
TXN_DATE NO_OF_TXNS
25-AUG-19 0
26-AUG-19 1000
27-AUG-19 1500
28-AUG-19 1800
29-AUG-19 1100
30-AUG-19 1400
We want to calculate the rolling average of transactions for last 180 days (excluding weekends). If it is 1st day, average will be equal to number of transactions on that day and if it is 2nd day it will be equal to (n1+n2)/2 and 3rd day then it will be equal to (n1+n2+n3)/3 and so on.
Any help will be highly appreciated.