sql delete group by having count