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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T02:12:49+00:00 2026-06-18T02:12:49+00:00

Here is my current query (confidential data replaced and where clauses removed for simplicity):

  • 0

Here is my current query (confidential data replaced and where clauses removed for simplicity):

select a.id, group_concat(v.value) from asset a, values v where a.id=v.id group by a.case_id;

The current results appear as:

a.id   v.value
123   a,b
234   a
456   a,b,c
789   d,e
237   a

What I want it to do is group by and count the results of the group_concat, so it should look like:

v.value    count
a,b           1
a              2
a,b,c        1
d,e           1

I have tried unsuccessfully to group on the field name I give to the group_concat, it keeps on saying ‘unable to group by ‘name’

I have to do this directly in the query not in the code. Any suggestions?

  • 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-06-18T02:12:50+00:00Added an answer on June 18, 2026 at 2:12 am
    SELECT gc_values
         , COUNT(*)
      FROM 
         ( SELECT a.id
                , GROUP_CONCAT(v.value) gc_values
             FROM asset a
             JOIN `values` v 
               ON v.id = a.id
            GROUP
               BY a.id
         ) x
     GROUP
        BY gc_values;
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Here is my current query: SELECT sac.cred, s.status, (SELECT NVL (csl.census_dates, tl.census_dates) FROM schema.sections
Here is my current, working, query: var lsFooterRow = from i in _context.Inventory where
Here's my current query: SELECT IFNULL(sum(open_for), 0) total, count(IF(open_for > 0, 1, null)) wins,
Here is the updated question: the current query is doing something like: $sql1 =
sorry, it's hard to explain my question in one line. Here's my current query
Here is my current query that works fine but I need it to only
Here's my current situation: I have a NSMutableArray named dictKeyArray which I assign a
Here is the current code in my application: String[] ids = str.split("/"); When profiling
Here is the current code I am using to parse the URL and it's
Here is my current position with a Jquery Banner - http://jsfiddle.net/WcXBs/2/ Apologies for the

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.