title: Find items in table with 2 specific sizes
body: <p>I have items table where the item code repeats as it has different sizes, variants.</p>
  <p>I want to find items which has 2 specific sizes, ie size in both M/Y and Euro.</p>
  <p>Items table:</p>
  <pre><code>Id size
  1  0  
  1  2Y
  1  EU-15
  2  2M
  2  4M
  3  0
  3  2M-4M
  3  EU-12
  4  EU-11
  4  EU-15
  </code></pre>
  <p>Required, I want to query for item id 1 and 3.</p>
  <p>I was trying with SUM(), CASE but not able to figure it as it involves LIKE operator. <code>(Size like '[^EU]%' and Size like 'EU%')</code></p>
  <p>#Update:</p>
  <p>With little hint, I could do it with 2 queries using temp table. Would be nice to see it in single query.</p>
  <p>1st Query.</p>
  <pre><code>select id, 
  case when size like '[^EU]%' then 'S' 
       when size like 'EU%' then 'EU' END as size 
       into #t from table
  </code></pre>
  <p>2nd Query.</p>
  <pre><code>select id, size from table
             where id in 
         ( select id from #t 
                 group by id 
                 having count(distinct(size))&gt;1) 
  order by id, size
  </code></pre>
  <p>Thanks.</p>