SyntaxFix
Write A Post
Hire A Developer
Questions
You can use:
select FK_Items,Sum(PoiQuantity) Quantity from PurchaseOrderItems POI left join PurchaseOrder PO ON po.ID_PurchaseOrder=poi.FK_PurchaseOrder group by FK_Items,DATEPART(MONTH, TransDate)