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 3802790
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 19, 20262026-05-19T14:15:47+00:00 2026-05-19T14:15:47+00:00

I am new to SQL and just at a loss for why this piece

  • 0

I am new to SQL and just at a loss for why this piece of code won’t execute. I get know errors but I get no results. No matter how long I wait, the code just keeps processing. I know this problem probably has something to do with my specific database, but I was wondering if there are any overt errors.

Additionally, if it has to do with the call I am making in my database, how would I go about debugging this since I get no formal errors?

SELECT cr.COMMUNICATIONS_ID AS ANSWER_ID, cr.CONSUMER_ID as VIEWER_ID, 
       cr.ACTION_LOG_ID, nc.PARENT_COMMUNICATIONS_ID AS QUESTION_ID,
       cirm.CONSUMER_RATING AS VIEWER_INTEREST, 
       cim.CONSUMER_INTEREST_EXPERT_ID AS DOMAIN
FROM (
       SELECT 234 AS CONSUMER_ID, ACTION_LOG_ID, COMMUNICATIONS_ID 
        FROM consumer_action_log 
        WHERE COMM_TYPE_ID=4
      ) AS cr
    JOIN network_communications AS nc ON 
        cr.COMMUNICATIONS_ID=nc.COMMUNICATIONS_ID
    JOIN communication_interest_mapping AS cim ON 
       nc.PARENT_COMMUNICATIONS_ID=cim.COMMUNICATION_ID
    JOIN consumer_interest_rating_mapping AS cirm ON 
       cr.CONSUMER_ID=cirm.CONSUMER_ID AND           
       cim.CONSUMER_INTEREST_EXPERT_ID=cirm.CONSUMER_INTEREST_ID;
  • 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-19T14:15:48+00:00Added an answer on May 19, 2026 at 2:15 pm

    The derived column in the subquery may be throwing MySQL off. Try this query instead for the same results

    SELECT cr.COMMUNICATIONS_ID AS ANSWER_ID, cirm.CONSUMER_ID as VIEWER_ID, 
           cr.ACTION_LOG_ID, nc.PARENT_COMMUNICATIONS_ID AS QUESTION_ID,
           cirm.CONSUMER_RATING AS VIEWER_INTEREST, 
           cim.CONSUMER_INTEREST_EXPERT_ID AS DOMAIN
    FROM (
           SELECT ACTION_LOG_ID, COMMUNICATIONS_ID 
            FROM consumer_action_log 
            WHERE COMM_TYPE_ID=4
          ) AS cr
        JOIN network_communications AS nc ON 
            cr.COMMUNICATIONS_ID=nc.COMMUNICATIONS_ID
        JOIN communication_interest_mapping AS cim ON 
           nc.PARENT_COMMUNICATIONS_ID=cim.COMMUNICATION_ID
        JOIN consumer_interest_rating_mapping AS cirm ON 
           cim.CONSUMER_INTEREST_EXPERT_ID=cirm.CONSUMER_INTEREST_ID
    WHERE cirm.CONSUMER_ID = 234
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

If you are a new sql server dba and you just get an account
I am fairly new to SQL, so not sure if this is just a
I'm new to SQL. This didn't return any results..... SELECT media.id as mediaid, media.title
I'm new to SQL, this segment should just make a few tables, right? I
I'm terribly new to SQL, and cannot seem to get the desired information out,
We just moved our SQL 2000 databases to a new SQL 2008 box. After
I think it's kind of noob question but I'm new to SQL Server in
I'm new to SQL and was just wondering how I would a value from
I'm new to SQL, so I apologize if this is a dumb question. When
New to SQL and I've just created a SQL query with assitance: SELECT CASE

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.