DELETE FROM t_questions WHERE Id in ( SELECT Id FROM ( SELECT Id FROM `t_questions` WHERE (Name,QuestionTypeId) in (SELECT Name,QuestionTypeId FROM `t_questions` GROUP BY Name,QuestionTypeId HAVING Count(*) > 1) AND Id NOT in (SELECT Id FROM `t_questions` WHERE Intention IS NOT NULL) ) as a )