title: Returning multiple columns with subquery and 'where in'
body: <p>I'm having some trouble getting a select query to return the data I need. See the simplified example below. </p>
  
  <p><strong>Sku table</strong></p>
  
  <pre><code>Sku         SkuId
  ==================
  ABC-123     123
  DEF-456     456
  GHI-789     789
  JKL-987     987
  </code></pre>
  
  <p><strong>SkuCombo table</strong></p>
  
  <pre><code>SkuId       SkuComboId  Qty
  ===========================
  123         456         1
  123         789         2
  123         987         1
  </code></pre>
  
  <p>A "combo" item is a sku number given to an item that consists of multiple items. For example, for the sku <code>ABC-123</code>, you would need to look up the <code>Sku</code> from the <code>Sku table</code> to get the <code>SkuId</code>(123), then use the <code>SkuId</code> to get the <code>SkuComboIds</code> (456, 789, 987) from the <code>SkuCombo</code>. Then use those on the <code>Sku</code> table to get he corresponding <code>Sku</code>. The following query almost gets me there, but I don't know how to get the <code>Qty</code> column from the <code>SkuCombo</code> table?:</p>
  
  <pre><code>select * 
  from Skus 
  where SkuId in (Select SkuComboId 
                  from SkuCombo  sc
                  join Skus s on s.SkuId = sc.SkuId
                  where s.Sku = 'ABC-123')
  </code></pre>
  
  <p><strong>Desired result</strong></p>
  
  <pre><code>Sku         SkuId       Qty
  ============================
  DEF-456     456         1
  GHI-789     789         2
  JKL-987     987         1
  </code></pre>