title: Subquery Executing Problems
body: <p>The code below is correct as it show me</p>
  
  <pre><code>SELECT TOP 3 P.CategoryID,SUM(OD.Quantity) From "Order Details" AS OD
              INNER JOIN
              Products AS P
              ON OD.ProductID=P.ProductID
              GROUP BY P.CategoryID
              ORDER BY SUM(OD.Quantity) DESC
  </code></pre>
  
  <p>The result is</p>
  
  <pre><code>CategoryID   sum
  1            9532
  4            9149
  3            7906
  </code></pre>
  
  <p>but I encountered this error when I try to subquery it.</p>
  
  <p>The code below is the current problem that cause the error. The error is 
  "Only one expression can be specified in the select list when the subquery is not introduced with EXISTS."</p>
  
  <pre><code>SELECT CategoryName FROM Categories WHERE CategoryID =
      (
      SELECT TOP 3 P.CategoryID,SUM(OD.Quantity) From "Order Details" AS OD
      INNER JOIN
      Products AS P
      ON OD.ProductID=P.ProductID
      GROUP BY P.CategoryID
      ORDER BY SUM(OD.Quantity) DESC
      )
  </code></pre>
  
  <p>I am not sure how to solve it or change the code in any way and I did try to not to group the categoryID which was a failure as it did not even show any result.</p>
  
  <p>The desired result should be</p>
  
  <pre><code>CategoryName     
  Beverages
  Dairy Products
  Confections
  </code></pre>