title: Is there a "NOT HAVING" syntax like "WHERE XXX NOT IN"?
body: <ol>
  <li>I have a few queries get the ID numbers of rows that will be deleted in the future.</li>
  <li>The row numbers are put into a string and placed in the query below (where you see "2").</li>
  <li><p>I want the results to ignore the rows (as though they have already been deleted).</p>
  
  <pre><code>SELECT MAX(T1.id) AS MAXid
  FROM transactions AS T1 
  WHERE id NOT IN ( 2 ) 
  GROUP BY T1.position 
  ORDER BY T1.position
  </code></pre></li>
  </ol>
  
  <p>My guess is that I need to replace the "WHERE" line with "HAVING", but I cannot find "NOT HAVING" syntax.</p>
  
  <p>The way this query is currently written, it will not return a row for T1.position if the max id for the position is listed in the WHERE clause.</p>
  
  <p>How do I get this query to give me the max ID for the T1.position 
  while overlooking the rows with IDs listed in the WHERE clause?</p>