SQLite Forum

LEFT JOIN Misunderstanding
Login
I didn't look at this in detail but I noticed this:

```
AND
    a.InsertDate = f.pl_insert
AND
    b.InsertDate = f.pe_insert
AND
    a.ProjID = f.projid
```

As long as you mention those in the WHERE clause it won't be a real left join. All constraints on F must be in the ON clause.

Now if you really want to filter away rows in A using those booleans that's fine.  That's legal and often reasonable but at that point it isn't really a LEFT JOIN anymore.  You're effectively inner joining from A to F over projid.