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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T18:31:30+00:00 2026-06-17T18:31:30+00:00

i have a table education containing a person id and an education level id,

  • 0

i have a table education containing a person id and an education level id, both foreign keys. i want to group the results so each person record is singular, containing a list of all education levels, so it returns Jane Doe: master, master

select 
  concat(person.name_first," ",person.name_last) as name,
  group_concat(person_studylevel.description)
from `person_education`
left join person_studylevel on level = person_studylevel.id
left join person on junior = person.id

this worked until i added the group_concat(), it then returns an empty result set

ive tried using the result as a subquery but that didnt work as well

table structure:

person_education: id(int10), junior(int10), level(int10)
person_studylevel: id(int10), description(varchar100)
person: id(int10), name_first(varchar255), name_last(varchar255)
  • 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-17T18:31:32+00:00Added an answer on June 17, 2026 at 6:31 pm

    Check this out please, if you want to group by each person, then take that table as the first to the left:

    • SQLFIDDLE DEMO

    Query:

    select 
      concat(p.name_first," ",p.name_last) as name,
      group_concat(ps.description)
    from person p 
    left join person_education pe
    on p.id = pe.junior
    left join person_studylevel ps
    on pe.level = ps.id
    group by p.id
    ;
    
    | NAME | GROUP_CONCAT(PS.DESCRIPTION) |
    ---------------------------------------
    |  j k |               degree,masters |
    |  a g |               diploma,degree |
    |  b h |                         cert |
    |  c i |                       (null) |
    |  d m |                       (null) |
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a table of postcodes and I want to update each postcode with
i have users_details table with the following columns martial_status | religion | education i
I have table with 300 000 records (MyISAM). I get record from this table
I have a table with multiple tbody's, each of which has a classed row,
I have arrays within an array and I want to loop through each item
I have a table data (td) that has a title on it. I want
I have two columns in my table profile which are id and education .
I have a database table containing scripts for plays/dramas. The scripts can be categorized
I have two very short and consecutive sections (for a CV), each containing a
I have a table called interests of school subjects for each student. A student

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.