Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

204
Views
mysql Main and detail tables with detail data being "joined"

I have two tables, Main and detail with are linked togeather. The output would be somethink like this:

Records found: 8 
mail.field  detail.Field
A               x
A               y
A               z
B               i
B               j
C               l
C               m
C               n

Is it possible to "concat" all detail-Valus to geht this result

Records found: 3

A       x+y+z
B       i+j
C       l+m+m
over 4 years ago · Santiago Trujillo
2 answers
Answer question

0

You can use group_concat()

select main_field, group_concat(detail.Field order by detail.Field SEPARATOR '+')
from tablename
group by main_field
over 4 years ago · Santiago Trujillo Report

0

select main_field, group_concat(detail.Field order by detail.Field SEPARATOR '+')
from tablename
JOIN .....
group by main_field
over 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!