Skip to content

Instantly share code, notes, and snippets.

@JoshZastrow
Created March 21, 2017 12:41
Show Gist options
  • Save JoshZastrow/d03dc78db3d5a0d269b1052a2dae917d to your computer and use it in GitHub Desktop.
Save JoshZastrow/d03dc78db3d5a0d269b1052a2dae917d to your computer and use it in GitHub Desktop.
ERP Production Parts, Year's orders less than a bars quantity of parts
SELECT
OrderRel.PartNum,
Sum(OrderRel.OurReqQty) AS 'Required for 2017'
FROM ERP10PROD.Erp.OrderRel OrderRel
WHERE (OrderRel.ReqDate<'20171231')
GROUP BY OrderRel.PartNum
@JoshZastrow
Copy link
Author

Returns a list of part numbers with the total number of parts due until the end of the year

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment