mq_material:
id | title
1 | Material
mq_other:
id | title
1 | title1
2 | title2
3 | title3
mq_material_other:
material_id | other_id
1 | 1
1 | 2
1 | 3
DELETE t1, t2 FROM t1 INNER JOIN t2 INNER JOIN t3
WHERE t1.id=t2.id AND t2.id=t3.id;