I have the following tables:
Order ---- ID (pk) OrderItem ---- OrderID (fk -> Order.ID) ItemID (fk -> Item.ID) Quantity Item ---- ID (pk)
This is one kind of data mining problem. So instead of using sql you can use Apriori algorithm with 85% support. The implementation of this algorithm is freely available in many tools.