I'm trying to report the average qtysold from table IV10201 by item number for:
the previous 7 days (or week)
the previous 30 days (or month)
show the difference of the last 30 days to the 30 days prior to that
show the difference of last 30 days to one year ago.
since there is more than one row per date and per item, I think I need to sum the qty sold based on a date parameter but I'm having a hard time determining the right way to write this. Any suggestions?