Do it like shown below. Not sure which of the where clauses you will need - one goes to exactly one year ago from now, the other looks back 12 months starting at the beginning of the month one year ago today.SELECT
PPID,
YEAR(SalesDate) AS YEAR,
MONTH(SalesDate)AS MONTH,
SUM(SalesAmount) AS Sales
FROM
YourTable
WHERE
--SalesDate >= DATEADD(YEAR,-1,GETDATE())
Sales >= DATEADD(mm,DATEDIFF(mm,0,GETDATE())-12,0)
GROUP BY
PPID,
YEAR(SalesDate),
MONTH(SalesDate)
ORDER BY
YEAR,
MONTH;