What was written by M0 , edited by M1 , and executive produced by a writer , producer , and executive producer of M2
SELECT DISTINCT ?x0 WHERE {
?x0 ns:film.film.edited_by M1 .
?x0 ns:film.film.executive_produced_by ?x1 .
?x0 ns:film.film.written_by M0 .
?x1 ns:film.producer.films_executive_produced M2 .
?x1 ns:film.producer.film|ns:film.production_company.films M2 .
?x1 ns:film.writer.film M2
}