Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 4076778
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T17:28:05+00:00 2026-05-20T17:28:05+00:00

In my query I am fetching three columns (say A,B and Summary) Summary is

  • 0

In my query I am fetching three columns (say A,B and Summary)

Summary is based on B and A.

I have to use a subquery to fetch Summary based on A and B.

Problem:

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.

Hence it gives Error:

 Subquery returns more than one row 

Instead I want to show it as below in my table:

 A1     B1     Summ1
 A1     B1     Summ2  

How can I do so?

QUERY:

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

SELECT statement for c.PricePerWeek generates that error

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-20T17:28:06+00:00Added an answer on May 20, 2026 at 5:28 pm

    It sounds like you need to restructure it as a JOIN rather than a subquery.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a dropdown getting populated by fetching a query on the database. Say
let's say I have three tables (MySQL), one for users, one for tags and
When fetching a query, is there a penalty for setting the fetch limit to
I have tried fetching MySQL query results using mysql_fetch_row() and mysql_result() and numeric values
I'm having a problem with an HQL query Three classes ClassOne is my BusinessObject
Hello I have a problem with fetching required rows from MySQL table correctly within
I have gone thru some of the links for hibernate fetch strategies on net.One
I'm fetching some settings out of the database based on a value passed from
i have a query to fetch 100 rows of events ordered by timestamp. i
I am fetching the three values from TUsers using select query where I am

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.