title: Sql Inner Join with Two Conditions on Same Field
body: <p><code>table_a</code>:</p>
  
  <pre><code>id        label
  -----------------
  1         l1
  2         l2
  3         l3
  </code></pre>
  
  <p><code>table_b</code>:</p>
  
  <pre><code>table_a_id      table_c_id
  ---------------------------
  1               1
  1               3
  1               4
  2               2
  2               4
  3               1
  3               4
  3               8
  </code></pre>
  
  <p>How can I select all records from <code>table_a</code> that are associated with both table_c_id 1 AND 4? Is it possible to have n table_c_id conditions?</p>
  
  <p>The following is wrong, but it illustrates what is needed.</p>
  
  <pre><code>SELECT table_a.* 
   FROM table_a
   JOIN table_b ON ( table_a_id = id 
                 AND table_c_id = 1
                 AND table_c_id = 4 )
  </code></pre>