title: sub query returning more than one row
body: <p>I am trying a query like this in MYSQL</p>
  
  <pre><code>select 
  Sum(case when WindowsXP = "PASS" then 1 else 0 end) as PASS ,
  Sum(case when WindowsVista = "FAIL" then 1 else 0 end) as FAIL 
  
  from OS_Table where BuildID = (select distinct BuildID from OS_Table)
  group by BuildID
  </code></pre>
  
  <p>The error is Subquery returns more than one row. If I use <code>IN</code> instead of <code>=</code> then the query is going on forever ( nearly after 3 minutes it does not stop)</p>
  
  <p>Basically what I am trying to achieve is for each distinct BuildID, give me counts of PASS, FAIL when WindowsXP = "PASS" and WindowsVista = "FAIL"</p>
  
  <p>I have hardly 10 distinct BuildID's</p>
  
  <p>How do I achieve this?</p>