Last answered:

04 Feb 2022

Posted on:

24 Dec 2021

0

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)
Instructor
Posted on:

04 Feb 2022

1

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

Submit an answer