Explicit join syntax (From ... Join ... On ...) makes query design, query debugging and query maintenance much clearer and easier for everybody ...
SELECT
p.Preferred_Name, p.Last_Name,
g.Guest_First_Name, g.Guest_Last_Name,
e.Event_Description
FROM person p
JOIN guest g ON p.Person_ID = g.Person_ID
JOIN attendee a ON g.Person_ID = a.Person_ID
JOIN `event` e ON a.Event_ID = e.Event_ID
WHERE a.Guest_Attended = 'Y' AND a.Event_ID = 4
ORDER BY p.Last_Name, p.First_Name, g.Guest_Last_Name, g.Guest_First_Name ;
I removed DISTINCT because its purpose is unclear. The query says to find persons, who link to guests, who link to attendees, who link to eventID=4. Is that what's intended? If it isn't, what is? If it is, then you may need to post a few Inserts for these tables so we can understand what's wrong with the results you're seeing.
Edited 2 time(s). Last edit at 10/19/2016 09:16AM by Peter Brawley.