[TASK] Change fetch of maximum version using LEFT JOIN