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

  • Home
  • SEARCH
  • 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 1090371
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T23:21:51+00:00 2026-05-16T23:21:51+00:00

a table: +—–+—–+—-+ | Sym | Pos | Id | +—–+—–+—-+ | a |

  • 0

a table:

+-----+-----+----+ 
| Sym | Pos | Id | 
+-----+-----+----+ 
| a   | 0   | 0  | 
| b   | 1   | 0  | 
| c   | 2   | 0  | 
| a   | 0   | 1  | 
| d   | 1   | 1  | 
| b   | 0   | 2  | 
+-----+-----+----+ 

need to build from this table row by Id, that would be followed in order Sym Pos.
In this case, that would have:

+-----+----+ 
| str | Id | 
+-----+----+ 
| abc | 0  | 
| ad  | 1  | 
| b   | 2  | 
+-----+----+
  • 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-16T23:21:51+00:00Added an answer on May 16, 2026 at 11:21 pm

    Use GROUP BY and the MySQL specific aggregate function GROUP_CONCAT:

    SELECT GROUP_CONCAT(Sym ORDER BY Pos SEPARATOR '') AS str, Id
    FROM yourtable
    GROUP BY id
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Table Each row represents a video that was on air at particular time on
Table from registered users: id_user id_location name Table from locations: id_location name I need
Table Layout: TABLE ORDER: id localizedInfoId Table OrderLocalizedInfo: id localizedInfoId name With the following
Table name: Employee Column Name: Emp_name Emp_name has this contents: xx\rama, xx\rajesh, xx\vignesh I
TABLE A Row IdA ValueA 1 1 ABCD 2 2 EFGH 3 3 IJKL
Table: Customer with columns Start_Time and End_Time. I need to add a new column
Table layout: CREATE TABLE t_order (id INT, custId INT, order DATE) I'm looking for
Table UserData (UserID, Sales, Credits) I need to return the SUM of sales, sum
Table structure: country season points Current query: SELECT SUM(points) AS total, country FROM table
I need to make a web page with Wicket that lays out the following

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.