Relationship between multiple JOINs
If I have a sequence of multiple JOINs in a MySQL query, such as
1. SELECT * FROM x 2. LEFT JOIN y ON x.id = y.id; 3. LEFT JOIN z ON x.id z.id 4. ...
Is each individual left join applied to what results from SELECT in line 1, or is the query processed in such a way that the first left join is applied to the results of SELECT and the second left join to the results of the preceding left join? Thanks
Your JOIN rule is declared exactly by your ON clause. I.e. your question have no sense - you have a clear declaration that you're joining table x with y and table x with z. If you query would look like:
SELECT * FROM x LEFT JOIN y ON x.id = y.id LEFT JOIN z ON y.id z.id
then it will be x -> y -> z join - see that it is declared in ON y.id = z.id. Your current query represent z <- x -> y join.
You can see description of SQL JOIN here.