Hi Tony, You nailed it! That's the piece of the puzzle I was missing. Moving the filtering inside the ON clause was the solution.
pgsql-general by date:
Соглашаюсь с условиями обработки персональных данных