Fix in SQL statement for the removal of Cohorts