SONAR-4939 Fix SQL query on Oracle