Group a table with a junction table

152 Views Asked by At

I have a table EVENT and a table ATTENDEE. When grouped by its lookup values EVENT looks like this:

|EVENT_ID|EVENT_TYPE|CITY|STATE|ZIP|

Many events can have many attendees, so I then have an EVENT_ATTENDEE junction table:

|EVENT_ID|ATTENDEE_ID|

I want to display the relevant contents of the EVENT table. My results would look something like this:

|EVENT_ID|EVENT_TYPE|CITY|STATE|ZIP|ATTENDEE_1|ATTENDEE_2|...|ATTENDEE_N|

Is there a way in SQL to accomplish this task?

0

There are 0 best solutions below