title: SQL: many-to-many relationship, IN condition
body: <p>I have a table called transactions with a many-to-many relationship to items through the items_transactions table.</p>
  
  <p>I want to do something like this:</p>
  
  <pre><code>SELECT "transactions".* 
    FROM "transactions" 
  INNER JOIN "items_transactions" 
          ON "items_transactions".transaction_id = "transactions".id 
  INNER JOIN "items" 
          ON "items".id = "items_transactions".item_id 
  WHERE (items.id IN (&lt;list of items&gt;))
  </code></pre>
  
  <p>But this gives me all transactions that have one or more of the items in the list associated with it and I only want it to give me the transactions that are associated with all of those items.</p>
  
  <p>Any help would be appreciated.</p>