select distinct p.firstname, lastname from person p where p.gender = 'F' and (select count(*) from filmparticipation fp where fp.personid = p.personid and fp.parttype = 'director') > 5 and exists (select * from person p2, filmparticipation fp, filmparticipation fp2 where fp.personid = p.personid and fp.parttype = 'director' and fp2.personid = fp2.personid and fp2.parttype = 'cast' and not exists (select * from filmitem f where f.filmid = fp.filmid and f.filmid != fp2.filmid));
Comments