SQL Query Syntax to find subset
Posted on 2014-08-13
This query returns all the parts that are supplied by a vendor. The PK here is ITEMNMBR,VENDORID
How do I structure a query to return for each part, other vendors that supply that part and the same fields?
So if vendor ACME supplies a WIDGET but so do vendors BUGS and BUNNY, I want to see two records showing the last order date, quantity and cost for ACME compared to the last order date, quantity and cost from BUGS and BUNNY.