Check out the following article to understand the difference and how using one can affect the results: Understanding Filter Placement in LEFT JOINs: ON vs. WHERE in PostgreSQL