title: SQL Find id-s where value of column equals a value on specific rows
body: <p>Let's say I work with the following table:</p>
  
  <pre><code>ID   LETTER    VALUE
  
  1       A      NON-VALID   
  1       B      VALID 
  1       C      VALID
  1       D      VALID
  2       A      NON-VALID
  2       B      VALID
  2       C      NON-VALID
  2       D      VALID
  </code></pre>
  
  <p>So, what I want is simple, but I haven't found something similar or figured it out by myself.</p>
  
  <p>I want to take the IDs that have let's say the value VALID in all the letters I will define.For example, if I want to have valid values on Bs and Cs, I want my data set to return ID 1.</p>
  
  <p>Silly example:</p>
  
  <pre><code>SELECT ID 
  FROM table 
  WHERE VALUE=VALID IN EVERY ROW WHERE LETTER BETWEEN 'B' AND 'C'
  </code></pre>