I have multiple customers in DB, each customer is signed in for an event. I have multiple customer signed for the same event. So I would like to output on the screen Event name and then under that all customers signed in for that event. Here is example how my records look like in data base:
Event Name Customer Name
Test 1 joe, allen
Test 2 tim, johnas
Test 2 camil, gera
Test 1 john, paskins
Test 3 steve, mcines
Test 3 jym, haskynes
Test 2 kim, george
Here is my query:
SELECT EventName, Customer
From Reservations
So I was wondering if I can use JSON to store results with the same Event name? How I would check if they have same event name and how to store them in different row in JSON that why I can output records with the same name on the screen in separate rows below Event name?