Ik denk dat dit is wat je wilt: DELETE FROM `table1` WHERE `group` in (SELECT DISTINCT `group` FROM `table2`)