Resolved: 2nd solution uses AND with JOIN statements, and not with WHERE clause
The second solution option uses "AND m.from_date = t.from_date" right after the last JOIN. I would have used "WHERE m.from_date = t.from_date" The result appears to be the same, but can you explain why simply using AND works without any WHERE?
1 answers ( 1 marked as helpful)
Hi Adam!
Nice question! It means that you learn with understanding!
When using JOIN
(=INNER JOIN
) with an ON
clause, it is the same as the WHERE
clause. This is not true for LEFT/RIGHT
joins.
Hope this helps.
Best,
Tsvetelin