Creo que esto es lo que quieres: DELETE FROM `table1` WHERE `group` in (SELECT DISTINCT `group` FROM `table2`)