SONAR-3755 Fix issues purge SQL