title: MySQL Error: Subquery returns more than one row
body: <p>In my query I am fetching three columns (say A,B and Summary)</p>
  
  <p>Summary is based on B and A.</p>
  
  <p>I have to use a subquery to fetch Summary based on A and B.</p>
  
  <p><strong>Problem:</strong></p>
  
  <p>For one value of A (say A1) and one value of B (say B1), I get two values of Summary (say Summ1 and Summ2) in One column.</p>
  
  <p><strong>Hence it gives Error:</strong> </p>
  
  <pre><code> Subquery returns more than one row 
  </code></pre>
  
  <p>Instead I want to show it as below in my table:</p>
  
  <pre><code> A1     B1     Summ1
   A1     B1     Summ2  
  </code></pre>
  
  <p>How can I do so? </p>
  
  <p><strong>QUERY:</strong> </p>
  
  <pre><code>SELECT a.FundIDRecv,a.SubscribeDt, b.FundName, 
  (
     SELECT c.PricePerWeek
     FROM tbl_Hive c
     WHERE c.FundID IN 
     (
        SELECT FundID from tbl_FundStatic 
        WHERE FundID IN
        (
            SELECT FundIDSend
            FROM tbl_FundSubscriptions 
            WHERE FundIDRecv = a.FundIDRecv
  
        )
        AND UserID = '14'
     )
  ) as Price
  FROM tbl_FundSubscriptions a, tbl_Hive b
  WHERE a.FundIDRecv = b.FundID
  
  AND a.FundIDRecv
  IN (
  
  SELECT FundIDRecv
  FROM tbl_FundSubscriptions
  WHERE FundIDSend
  IN (
  
  SELECT FundID
  FROM tbl_FundStatic 
  WHERE UserID = '14'
  )
  )
  Group by a.FundIDRecv
  </code></pre>
  
  <p>SELECT statement for <code>c.PricePerWeek</code> generates that error</p>