SONAR-3755 revert usage of inner joins