A small change: report for each year the percentage of movies in that year with only female actors, and the total number of movies made that year.
SELECT Year,
COUNT(*),
(COUNT(*)*100/(count(Movie.mid)*1.0))
FROM Movie
WHERE TRIM(MID) IN (SELECT TRIM(MID)
FROM M_Cast
WHERE TRIM(PID) IN (SELECT TRIM(PID)
FROM PERSON
WHERE Gender ='Female'
)
)
GROUP BY Movie.Year
ORDER BY COUNT(*) DESC
What should I change in this to get the correct percentage?