Handle LEFT JOIN + fix issues with table alias on WHERE conditions