TABLE A, B, C
How can I make a query that joins these three tables. The condition is that Table A must have a record.
I tried like this
select * from a
left join b on a.article_id = b.article_id
left join c on b.file_id = c.submission_id
where c.user_id = 6;
My query doesn’t work in the case that Table C is missing a record. In that case, the join doesn’t work for the three tables.
Any criteria on the outer tables must be int he relevant ON clause, not the WHERE clause.
For example: