title: SQL method to return if all in join match conditions
body: <p>I've been browsing this site for quite a while and this is my first post so I hope I've learned the correct way how to inquire... I've been stuck on this problem for quite a while even with all the available information I'm still lost.</p>
  <p>I have 3 tables.
  Sets, UserBudget, ItemCosts</p>
  <pre><code>table name               column names
  -----------              ------------------------
  Sets                     SetID 
  UserBudget               UserID | ItemID | ItemBudget 
  ItemCosts                SetID  | ItemID | ItemPrice
  </code></pre>
  <p>ItemCosts contains multiple items, that are connected to a 'Sets' table entry.</p>
  <p>I need a way to return the SetID's from the first table only if the UserBudget has all the same items as ItemCosts and all the ItemPrice is equal or lower to ItemBudget.</p>
  <p>For example:</p>
  <pre><code>Sets                ItemCosts                 UserBudget
  -----------         ----------                ----------
  SetID      1        SetID      1              UserID     1
                      ItemID     1    2         ItemID     1    2 
                      ItemPrice  10   12        ItemBudget 11    11 
  </code></pre>
  <p>This is not supposed to return anything since the second item's price is higher than the user's budget for it.</p>
  <pre><code>Sets                ItemCosts                 UserBudget
  -----------         ----------                ----------
  SetID      1        SetID      1              UserID     1
                      ItemID     1    2         ItemID     1    2 
                      ItemPrice  10   12        ItemBudget 11    12 
  </code></pre>
  <p>This is supposed to return Set 1.</p>
  <p>Any of my attempts just end up returning the set if one of the items matches the budget.
  Here's my current SQL (it's a super simplified version in the end as all my complicated attempts took longer to execute but returned the same result):</p>
  <pre><code>SELECT * 
  FROM UserBudget a 
    INNER JOIN ItemCosts b on a.ItemID=b.ItemID 
    INNER JOIN Sets c on b.SetID=c.SetID 
  WHERE a.UserID=1 AND a.ItemBudget&gt;=b.ItemPrice
  </code></pre>