I need a way to create a graph of trailing sales numbers. The graphing is the easy part, I need to know the most efficient way to create the stored procedure that will feed the data to the graph. To make this simple consider a table of 3 columns. AccountingPeriod,Sales,Org
anization.
There will be multiple rows for the values in the table.
200803,$12000,02
200803,$14000,03
200803,$11000,01
200803,$12500,02
200803,$14500,03
200803,$11500,01
etc...
To create the trailing data set I need to get the data points in 12 months summed so that point #1 would be 200703 - 200802 and contain the sum of all sales figures for a particular org over that time period Point # 2 would be 200704-200803 and contain the sum of all sales figures for a particular org over that time period . I need to get 12 points in this manner to plot a trailing graph.
Any thoughts would be appreciated.
Start Free Trial