title: How to return results from column A only when all aritmetic results in column B for A are the same
body: <p>I'm stumped and wanted to ask for some pointers.</p>
  
  <p>I have a table which record orders in multiple columns;</p>
  
  <pre><code>COL_A - Order ID
  COL_B - Order line
  COL_C - Log of activities done on order line, 2=order accepted, 950=item in stock
  COL_D - Stock Check, uses arithmetic function to work out if item is in stock, takes COL_C and divides by 950 to zero decimal places. 0 = no, 1 = yes
  COL_E - Order status
  COL_F - Product code
  </code></pre>
  
  <p>Orders are saved then the log is updated when actions are carried out, accumulating the value with action value, so an action log value of 952 means the order has been accepted &amp; item is in stock.
  Col_D uses the COL_C log value to indicate if the ordered item is in stock. This just divides the log value by 950 to indicate if in stock.</p>
  
  <p>I need the query to return orders and all order lines only when ALL the ordered items for an order are in stock.</p>
  
  <p>Example
  Data table:</p>
  
  <p><a href="https://i.stack.imgur.com/emWwJ.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/emWwJ.jpg" alt="enter image description here"></a></p>
  
  <p>Desired Result:</p>
  
  <p><a href="https://i.stack.imgur.com/EUyyX.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/EUyyX.jpg" alt="enter image description here"></a></p>