title: sqlite not returning values selected from table not in other table
body: <p>I have two tables whose relevant columns look more or less like the following:</p>
  
  <pre><code>table1.id:
  
  zIXuJeY-qH
  zJrcULGLXK
  zXyIgnlylb
  zZ7MYDGDAV
  zbCFI4wKpe
  ziGeauO-0O
  zmzWbaGSb7
  
  table2.id
  
  zIXuJeY-qH
  zIXuJeY-qH
  zIXuJeY-qH
  zIXuJeY-qH
  zJrcULGLXK
  zJrcULGLXK
  </code></pre>
  
  <p>in which table1.id is a primary key and table2.id is not a primary key. I'm trying to grab all the IDs from table 1 that are not in table 2, but am having trouble. If, for instance, I select a count of all the values that <em>are</em> in table two, I get:</p>
  
  <pre><code>&gt;SELECT COUNT(id) FROM table1 WHERE id IN (SELECT id FROM table2);
  &gt;2
  </code></pre>
  
  <p>But if I try to find the IDs <em>not</em> in table2, I get 0:</p>
  
  <pre><code>&gt;SELECT COUNT(id) FROM table1 WHERE id NOT IN (SELECT id FROM table2);
  &gt;
  </code></pre>
  
  <p>There are 503 unique IDs in table1 and only 163 in table2. What am I doing wrong?</p>