sql - MySQL Error: Subquery returns more than one row -


My query I'm bringing three columns (A, B and summary)

The summary is based

Problem:

Let me know at a and B

Subquery must be used

Problem:

for a value of A (A1) and a value of B (called B1) For, I get two values ​​in a column summaries (summary 1 and summary 2).

because it gives an error:

  subkey is more than one row   

Instead I want to show it in my table below:

  A1B1 equivalent 1A1B1 equivalent 2   

How can I do this?

QUERY:

  SELECT a.FundIDRecv, a.SubscribeDt, b.FundName, (SELECT c.PricePerWeek fROM tbl_Hive c WHERE c FundID iN (Tbl_FundStatic WHERE choose from FundID Fndaid (SELECT FundIDSend fROM tbl_Fund subscriptions WHERE FundIDRecv = a.FundIDRecv) and UserID = '14')) as membership tbl_fund of value, a, tbl_Hive b WHERE a.FundIDRecv = b.FundID and a.FundIDRecv iN (sELECT FundIDRecv fROM Tbl_Fund subscriptions WHERE FundID message iN (sELECT FundID fROM tbl_FundStatic WHERE userID = '14')) gROUP bY a.FundIDRecv   

the sELECT statement c.PricePerWeek that generates the error

it seems that you subq it Reorganization is needed as a JOIN instead of uery. / P>

Comments