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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 17, 20262026-05-17T16:50:27+00:00 2026-05-17T16:50:27+00:00

We have a table which contains TV channel listings. create table listing (id, channel_name,

  • 0

We have a table which contains TV channel listings.

create table listing (id, channel_name, event_name, event_time)

a) listing (1, "ABC Channel", "All My Children", 6.00 AM)
b) listing (2, "ABC Channel", "News", 7 AM)
c) listing (3, "ABC Channel", "One life to live", 7.15 AM)
d) listing (4, "ABC Channel", "General Hospital", 8.00 AM)
e) listing (5, "ABC Channel", "News", 9.00 AM)
f) listing (6, "ABC Channel", "Movie 1", 9.15 AM)
g) listing (7, "ABC Channel", "News", 10.00 AM)

My web page shows a particular tv channel listing as follows:-

event_name        event_times
---------------------------------------------
All My Children   6.00 AM
News              7.00 AM, 9.00 AM, 10.00 AM
One life to live  7.15 AM
General Hospital  8.00 AM
Movie 1           9.15 AM

All News timings are consolidate into a single entry, currently I am consolidating the entries at the application layer, is it possible to do this at the query level.

  • 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-17T16:50:27+00:00Added an answer on May 17, 2026 at 4:50 pm

    Try something like this:

      SELECT event_name,
             GROUP_CONCAT(event_time SEPARATOR ', ' ORDER BY event_time) AS event_times
        FROM listing
    GROUP BY event_name
    ORDER BY event_name
    

    If you need it for separate channels, this should work:

      SELECT event_name,
             GROUP_CONCAT(event_time SEPARATOR ', ' ORDER BY event_time) AS event_times
        FROM listing
       WHERE channel_name = 'ABC Channel'
    GROUP BY event_name
    ORDER BY event_name
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a table which contains my server status create table ServerStatus ( ServerId
I have a table which contains data in different languages. All fields are nvarchar(max).
I have a table which contains the item and category ids: create table SomeTable
I have a table which contains student grades (SAG). I need to show all
I have table which contains double values stored in mysql database ...I need to
I have a table which contains my ads that can be searched in sql-server-2008.
i have a table which contains a bunch of dynamically created radio button lists,
I have a table which contains house details called property. I am creating a
I have a table which contains unique indexes;lets say A B 1 1 1
I have a table which contains User IDs, Period IDs and Qty: User Period

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.