[snip] Hi I'm looking to create a query that will look through my previous orders and create a table of what items have sold with what products.
My current table that holds the order details is set up like this. orderID, productID, quantity. Any suggestions would be appreceiated. [/snip] You would have to select productID from the order details table where the orderID for each productID is present.... [example pseudo-code] SELECT a.orderID, a.productID FROM order_details a, order_details b WHERE b.productID = (the currently selected)productID [/ep-c] HTH! -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]