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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T10:26:52+00:00 2026-05-27T10:26:52+00:00

I have a sql table like this one: id email links 1 test1@test.com www.link1.com

  • 0

I have a sql table like this one:

id  email           links
1   test1@test.com  www.link1.com
2   test2@test.com  www.link2.com
3   test3@test.com  www.link3.com
4   test1@test.com  www.link4.com
5   test2@test.com  www.link5.com
6   test2@test.com  www.link6.com
7   test4@test.com  www.link7.com
8   test5@test.com  www.link8.com
9   test6@test.com  www.llink9.com
10  test2@test.com  www.link10.com

And I need to find a query that will give this kind of result:

email                link1          link2          link3          link4
test1@zendata.ca     www.link1.com  www.link4.com
test2@zendata.ca     www.link2.com  www.link5.com  www.link6.com  www.link10.com
test3@zendata.ca     www.link3.com
test4@zendata.ca     www.link7.com
test5@zendata.ca     www.link8.com
test6@zendata.ca     www.llink9.com

Unique emails with each of the associated links…

Thank you if you can solve this problem,

  • 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-27T10:26:53+00:00Added an answer on May 27, 2026 at 10:26 am

    This is much more easily done with GROUP_CONCAT() and then processed in application code to split up the resultant string:

    SELECT email, GROUP_CONCAT(links) AS link_list FROM tbl GROUP BY email
    

    Example results:

    email                link_list
    --------------------------------------
    test1@zendata.ca     www.link1.com,www.link4.com
    test2@zendata.ca     www.link2.com,www.link5.com,www.link6.com,www.link10.com
    

    This assumes, of course, that you will be processing this result set with some application code in some other programming language.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have one sql table that looks like this called posts: id | user
I have an SQL table like this : sales(product,timestamp) I want to display a
I have a SQL Server 2005 table like this: create table Taxonomy( CategoryId integer
If i have a sql table with column like this id version subversion 1
Hi there I have an SQL table that looks like this: CREATE TABLE IF
I have SQL Server 2008 with a table called ProductCategories designed like this: Id
In MS Transact SQL, let's say I have a table (Orders) like this: Order
If i have a parameterized SQL statement like this: SELECT * FROM table WHERE
i have a table like this one: id | name | score mapped to
I have a table like this one CREATE TABLE MyTable ( [MyTableID] [int] NOT

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.