changes LEFT JOIN to INNER JOIN on sapi queries