title: find records in a third table based on where unmatched columns in two tables
body: <p>I am trying to get records like below, but could not:</p>
  
  <pre><code>  SELECT *
    FROM D
    WHERE D.C IN (
        SELECT A.*
        FROM A
        LEFT JOIN B ON (A.C = B.C)
        WHERE B.C IS NULL)
  </code></pre>
  
  <p>Basically want to get whatever is <strong>not-matched</strong> in the <strong>compare</strong> of <code>A.Column</code> &amp; <code>B.Column</code> for a select in <code>D</code> based on the <code>A &amp; B</code> result.</p>
  
  <blockquote>
    <p><strong>Edited to show code sample in the real application:</strong></p>
  </blockquote>
  
  <p>This is the sample code in the php used for sending renewals notification to expiring users and logging to two tables mailer &amp; renewals based on expiring users:</p>
  
  <pre><code>      SELECT * FROM expiring_users WHERE expiring_users.id IN(
             SELECT mailer_log.*
             FROM mailer_log
             LEFT JOIN renewals_log ON (mailer_log.id = renewals_log.id)
             WHERE renewals_log.id IS NULL)
  </code></pre>
  
  <p>Hope this hepls in undesrtanding the situation.</p>