title: mySQL: How to select FROM table WHERE IN LIST and NOT IN another list
body: <p>Is it possible to select values from a table, where they don't exist in one list, but do exist in another... or they other way around?</p>
  
  <p>E.g. </p>
  
  <pre><code>SELECT COUNT(g.`property`) as `number`, g.`property` 
    FROM `foo` g 
   WHERE `theID` IS IN (SELECT `theID` 
                          FROM `tableofIDS` 
                         WHERE `theID` = '54252') 
            AND NOT IN (SELECT `theID` 
                          FROM `anotherTableofIDS` 
                         WHERE `theID` = '54252')
  </code></pre>