title: how to select order ID where all products quantity equal to zero?
body: <p>I have the a table like below</p>
  
  <p><a href="https://i.stack.imgur.com/Nqzhr.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Nqzhr.png" alt="enter image description here"></a></p>
  
  <p>I want to get recivedID that have <code>quant=0</code></p>
  
  <p>In this table we have tow recivedID them products quantity equal to zero
  how to select recivedID which all it products quantity equal to zero 
  i ho you understand what i mean , and i am very sorry for my bad english skill
  Thank you</p>
  
  <pre><code>SELECT DISTINCT
          rd.recivedID FROM recivedDetailsTBL rd 
  JOIN stockTBL s ON s.recivedID = rd.recivedID 
  WHERE  
      (SELECT COUNT(*) FROM recivedDetailsTBL rd WHERE rd.recivedID =  @recivedID ) --3
          =
      (SELECT COUNT(*) FROM stockTBL s WHERE s.quant =0 AND s.recivedID = @recivedID  )--3
  </code></pre>