I have 3 main tables:
and 2 many-to-many link tables in between:
I want to join all 3 main tables together (showing me all the publication and conference a person was involved in)
But so far, I am only able to query either person-to-publication or person-to-conference like this:
select person.*, publication.* from person left join person_publication on person_publication.person_id = person.id left join publication on person_publication.publication_id = publication.id; select person.*, conference.* from person left join person_conference on person_conference.person_id = person.id left join conference on person_conference.conference_id = conference.id;
How can I join them all together?