title: SQL Query - stuck on the following scenario:
body: <p>Does anyone have an idea of how to deal this:</p>
  
  <p>My scenario is I have a <code>CustomerTable, OrderTable, ItemsTable and DeliveryTable</code></p>
  
  <p>a Customer can make many orders
  an order can contain many items</p>
  
  <p>however this is where the problem is, if i have lets say 1 item, with the quantity of <code>20..</code> i receive <code>15</code> of these into stock and want to send <code>15/20</code> to the customer. currently i can assign the <code>DeliveryID</code> to the individual item but that contains all <code>20</code>. </p>
  
  <p><em>So my question is do i need a middle table or is there an obvious approach i am missing here?</em> </p>