Victoria Yuding has a new SQL view for rolling 12 months of sales by item in Dynamics GP
SQL view for rolling 12 months of sales by item in Dynamics GP | Victoria Yudin
SQL & DataSales, Purchasing & Inventory
Archived post from 2012. Dynamics GP and the links it points to have changed since; check current documentation before relying on version-specific steps.