report for each year the percentage of movies in that year with only female actors, and the total number of movies made that year. For example, one answer will be: 1990 31.81 13522 meaning that in 1990 there were 13,522 movies, and 31.81% had only female actors. You do not need to round your answer.
following code
select a.year, a.c*100.00/b.c as percentage, b.c as total_overall
from (select z.year, count(*) as c
from movie z
where not exists (select *
from person x,M_cast xy
where x.pid = xy.pid and xy.mid = z.mid and x.Gender!='Female')
group by z.year) a,
(select z.year, count(*) as c from movie z group by z.year) b
where a.year=b.year
order by a.year;
following code is not working
select z.year, count(*)
from movie z
where not exists (select *
from actor x, casts xy
where x.id = xy.pid and xy.mid = z.id and x.gender!='F')
group by z.year;
please tell me query for movies with only female how to select
following output im getting
guide me how to select movie with only female actors
введите описание изображения здесь
как написать sql запрос для вышеуказанных операторов