SELECT
WeeklyReportDetailsDataId, ItemId, StoreId,
ManufacturerRetailerAssocId, WeekSales, WKYR,
SUM(WeekSales) OVER (PARTITION BY ItemId, StoreId, ManufacturerRetailerAssocId
ORDER BY ItemId, StoreId, ManufacturerRetailerAssocId ROWS BETWEEN UNBOUNDED PRECEDING AND CURRENT ROWS) as ytd
FROM
WeeklyReportDetailsData
WHERE
ManufacturerRetailerAssocId = 10
GROUP BY
ItemId, StoreId, WeekSales, WeeklyReportDetailsDataId, WKYR,
ManufacturerRetailerAssocId
ORDER BY
WeeklyReportDetailsDataId, ItemId, StoreId, ManufacturerRetailerAssocId, WKYR
我收到错误,ROWS附近的语法不正确请帮助!!!!!!