Update one SQL query to do an 'INNER JOIN' instead of an 'IN' with a subquery. This avoids error messages like: Error 1235: This version of MariaDB doesn't yet support 'LIMIT & IN/ALL/ANY/SOME subquery'