QIAN-ME/bird_schema_data huggingface dataset:
You are now a sqlite data analyst, and you are given a database schema as follows:

    【Schema】
    【DB_ID】 movielens
【Schema】
# Table: movies2actors
[
(movieid:INTEGER, Primary Key, Examples: [1672052, 1672111, 1672580]),
(actorid:INTEGER, Primary Key, Examples: [88796, 88848, 121878]),
(cast_num:INTEGER, Examples: [0, 1, 2])
]
# Table: users
[
(userid:INTEGER, Primary Key, Examples: [1, 2, 3]),
(age:TEXT, Examples: [1, 56, 25]),
(u_gender:TEXT, Examples: [F, M]),
(occupation:TEXT, Examples: [2, 3, 4])
]
# Table: directors
[
(directorid:INTEGER, Primary Key, Examples: [7387, 12945, 15725]),
(d_quality:INTEGER, Examples: [0, 1, 2]),
(avg_revenue:INTEGER, Examples: [0, 1, 2])
]
# Table: movies
[
(movieid:INTEGER, Primary Key, Examples: [1672052, 1672111, 1672580]),
(year:INTEGER, Examples: [3, 4, 1]),
(isEnglish:TEXT, Examples: [T, F]),
(country:TEXT, Examples: [other, USA, France]),
(runningtime:INTEGER, Examples: [2, 3, 0])
]
# Table: movies2directors
[
(movieid:INTEGER, Primary Key, Examples: [1672052, 1672111, 1672580]),
(directorid:INTEGER, Primary Key, Examples: [22397, 54934, 297253]),
(genre:TEXT, Examples: [Action, Adventure, Animation])
]
# Table: u2base
[
(userid:INTEGER, Primary Key, Examples: [1, 2, 3]),
(movieid:INTEGER, Primary Key, Examples: [1684486, 1685309, 1685493]),
(rating:TEXT, Examples: [1, 2, 3])
]
# Table: actors
[
(actorid:INTEGER, Primary Key, Examples: [4, 16, 28]),
(a_gender:TEXT, Examples: [M, F]),
(a_quality:INTEGER, Examples: [4, 0, 3])
]
【Foreign keys】
movies2actors.actorid=actors.actorid
movies2actors.movieid=movies.movieid
movies2directors.directorid=directors.directorid
movies2directors.movieid=movies.movieid
u2base.movieid=movies.movieid
u2base.userid=users.userid

    【Question】
    List the top 5 movies from other countries which to language is not in English. not in English can be represented by isEnglish = 'F'

    【Evidence】
    not in English can be represented by isEnglish = 'F'

    Please read and understand the database schema carefully, and generate an executable SQL based on the user's question and evidence. 

SQL: SELECT DISTINCT T1.movieid FROM u2base AS T1 INNER JOIN movies AS T2 ON T1.movieid = T2.movieid WHERE T2.country = 'other' AND T2.isEnglish = 'F' LIMIT 5
You are now a sqlite data analyst, and you are given a database schema as follows:

    【Schema】
    【DB_ID】 movielens
【Schema】
# Table: movies2actors
[
(movieid:INTEGER, Primary Key, Examples: [1672052, 1672111, 1672580]),
(actorid:INTEGER, Primary Key, Examples: [88796, 88848, 121878]),
(cast_num:INTEGER, Examples: [0, 1, 2])
]
# Table: users
[
(userid:INTEGER, Primary Key, Examples: [1, 2, 3]),
(age:TEXT, Examples: [1, 56, 25]),
(u_gender:TEXT, Examples: [F, M]),
(occupation:TEXT, Examples: [2, 3, 4])
]
# Table: directors
[
(directorid:INTEGER, Primary Key, Examples: [7387, 12945, 15725]),
(d_quality:INTEGER, Examples: [0, 1, 2]),
(avg_revenue:INTEGER, Examples: [0, 1, 2])
]
# Table: movies
[
(movieid:INTEGER, Primary Key, Examples: [1672052, 1672111, 1672580]),
(year:INTEGER, Examples: [3, 4, 1]),
(isEnglish:TEXT, Examples: [T, F]),
(country:TEXT, Examples: [other, USA, France]),
(runningtime:INTEGER, Examples: [2, 3, 0])
]
# Table: movies2directors
[
(movieid:INTEGER, Primary Key, Examples: [1672052, 1672111, 1672580]),
(directorid:INTEGER, Primary Key, Examples: [22397, 54934, 297253]),
(genre:TEXT, Examples: [Action, Adventure, Animation])
]
# Table: u2base
[
(userid:INTEGER, Primary Key, Examples: [1, 2, 3]),
(movieid:INTEGER, Primary Key, Examples: [1684486, 1685309, 1685493]),
(rating:TEXT, Examples: [1, 2, 3])
]
# Table: actors
[
(actorid:INTEGER, Primary Key, Examples: [4, 16, 28]),
(a_gender:TEXT, Examples: [M, F]),
(a_quality:INTEGER, Examples: [4, 0, 3])
]
【Foreign keys】
movies2actors.actorid=actors.actorid
movies2actors.movieid=movies.movieid
movies2directors.directorid=directors.directorid
movies2directors.movieid=movies.movieid
u2base.movieid=movies.movieid
u2base.userid=users.userid

    【Question】
    Among the best actors, how many of them got a rating of 5 to the movies they starred?

    【Evidence】
    

    Please read and understand the database schema carefully, and generate an executable SQL based on the user's question and evidence. 

SQL: SELECT COUNT(T1.actorid) FROM actors AS T1 INNER JOIN movies2actors AS T2 ON T1.actorid = T2.actorid INNER JOIN u2base AS T3 ON T2.movieid = T3.movieid WHERE T1.a_quality = 5 AND T3.rating = 5
You are now a sqlite data analyst, and you are given a database schema as follows:

    【Schema】
    【DB_ID】 movielens
【Schema】
# Table: movies2actors
[
(movieid:INTEGER, Primary Key, Examples: [1672052, 1672111, 1672580]),
(actorid:INTEGER, Primary Key, Examples: [88796, 88848, 121878]),
(cast_num:INTEGER, Examples: [0, 1, 2])
]
# Table: users
[
(userid:INTEGER, Primary Key, Examples: [1, 2, 3]),
(age:TEXT, Examples: [1, 56, 25]),
(u_gender:TEXT, Examples: [F, M]),
(occupation:TEXT, Examples: [2, 3, 4])
]
# Table: directors
[
(directorid:INTEGER, Primary Key, Examples: [7387, 12945, 15725]),
(d_quality:INTEGER, Examples: [0, 1, 2]),
(avg_revenue:INTEGER, Examples: [0, 1, 2])
]
# Table: movies
[
(movieid:INTEGER, Primary Key, Examples: [1672052, 1672111, 1672580]),
(year:INTEGER, Examples: [3, 4, 1]),
(isEnglish:TEXT, Examples: [T, F]),
(country:TEXT, Examples: [other, USA, France]),
(runningtime:INTEGER, Examples: [2, 3, 0])
]
# Table: movies2directors
[
(movieid:INTEGER, Primary Key, Examples: [1672052, 1672111, 1672580]),
(directorid:INTEGER, Primary Key, Examples: [22397, 54934, 297253]),
(genre:TEXT, Examples: [Action, Adventure, Animation])
]
# Table: u2base
[
(userid:INTEGER, Primary Key, Examples: [1, 2, 3]),
(movieid:INTEGER, Primary Key, Examples: [1684486, 1685309, 1685493]),
(rating:TEXT, Examples: [1, 2, 3])
]
# Table: actors
[
(actorid:INTEGER, Primary Key, Examples: [4, 16, 28]),
(a_gender:TEXT, Examples: [M, F]),
(a_quality:INTEGER, Examples: [4, 0, 3])
]
【Foreign keys】
movies2actors.actorid=actors.actorid
movies2actors.movieid=movies.movieid
movies2directors.directorid=directors.directorid
movies2directors.movieid=movies.movieid
u2base.movieid=movies.movieid
u2base.userid=users.userid

    【Question】
    What is the average rating of the newest movies from France? France is a country; year = 4 represents the newest date.

    【Evidence】
    France is a country; year = 4 represents the newest date.

    Please read and understand the database schema carefully, and generate an executable SQL based on the user's question and evidence. 

SQL: SELECT AVG(T1.rating) FROM u2base AS T1 INNER JOIN movies AS T2 ON T1.movieid = T2.movieid WHERE T2.country = 'france' AND T2.year = 4
You are now a sqlite data analyst, and you are given a database schema as follows:

    【Schema】
    【DB_ID】 movielens
【Schema】
# Table: movies2actors
[
(movieid:INTEGER, Primary Key, Examples: [1672052, 1672111, 1672580]),
(actorid:INTEGER, Primary Key, Examples: [88796, 88848, 121878]),
(cast_num:INTEGER, Examples: [0, 1, 2])
]
# Table: users
[
(userid:INTEGER, Primary Key, Examples: [1, 2, 3]),
(age:TEXT, Examples: [1, 56, 25]),
(u_gender:TEXT, Examples: [F, M]),
(occupation:TEXT, Examples: [2, 3, 4])
]
# Table: directors
[
(directorid:INTEGER, Primary Key, Examples: [7387, 12945, 15725]),
(d_quality:INTEGER, Examples: [0, 1, 2]),
(avg_revenue:INTEGER, Examples: [0, 1, 2])
]
# Table: movies
[
(movieid:INTEGER, Primary Key, Examples: [1672052, 1672111, 1672580]),
(year:INTEGER, Examples: [3, 4, 1]),
(isEnglish:TEXT, Examples: [T, F]),
(country:TEXT, Examples: [other, USA, France]),
(runningtime:INTEGER, Examples: [2, 3, 0])
]
# Table: movies2directors
[
(movieid:INTEGER, Primary Key, Examples: [1672052, 1672111, 1672580]),
(directorid:INTEGER, Primary Key, Examples: [22397, 54934, 297253]),
(genre:TEXT, Examples: [Action, Adventure, Animation])
]
# Table: u2base
[
(userid:INTEGER, Primary Key, Examples: [1, 2, 3]),
(movieid:INTEGER, Primary Key, Examples: [1684486, 1685309, 1685493]),
(rating:TEXT, Examples: [1, 2, 3])
]
# Table: actors
[
(actorid:INTEGER, Primary Key, Examples: [4, 16, 28]),
(a_gender:TEXT, Examples: [M, F]),
(a_quality:INTEGER, Examples: [4, 0, 3])
]
【Foreign keys】
movies2actors.actorid=actors.actorid
movies2actors.movieid=movies.movieid
movies2directors.directorid=directors.directorid
movies2directors.movieid=movies.movieid
u2base.movieid=movies.movieid
u2base.userid=users.userid

    【Question】
    Among the most rated UK movies, how many of them has running time of less than 2? UK is a country

    【Evidence】
    UK is a country

    Please read and understand the database schema carefully, and generate an executable SQL based on the user's question and evidence. 

SQL: SELECT COUNT(T1.movieid) FROM u2base AS T1 INNER JOIN movies AS T2 ON T1.movieid = T2.movieid WHERE T2.country = 'UK' AND T2.runningtime < 2 AND T1.rating = 5
You are now a sqlite data analyst, and you are given a database schema as follows:

    【Schema】
    【DB_ID】 movielens
【Schema】
# Table: movies2actors
[
(movieid:INTEGER, Primary Key, Examples: [1672052, 1672111, 1672580]),
(actorid:INTEGER, Primary Key, Examples: [88796, 88848, 121878]),
(cast_num:INTEGER, Examples: [0, 1, 2])
]
# Table: users
[
(userid:INTEGER, Primary Key, Examples: [1, 2, 3]),
(age:TEXT, Examples: [1, 56, 25]),
(u_gender:TEXT, Examples: [F, M]),
(occupation:TEXT, Examples: [2, 3, 4])
]
# Table: directors
[
(directorid:INTEGER, Primary Key, Examples: [7387, 12945, 15725]),
(d_quality:INTEGER, Examples: [0, 1, 2]),
(avg_revenue:INTEGER, Examples: [0, 1, 2])
]
# Table: movies
[
(movieid:INTEGER, Primary Key, Examples: [1672052, 1672111, 1672580]),
(year:INTEGER, Examples: [3, 4, 1]),
(isEnglish:TEXT, Examples: [T, F]),
(country:TEXT, Examples: [other, USA, France]),
(runningtime:INTEGER, Examples: [2, 3, 0])
]
# Table: movies2directors
[
(movieid:INTEGER, Primary Key, Examples: [1672052, 1672111, 1672580]),
(directorid:INTEGER, Primary Key, Examples: [22397, 54934, 297253]),
(genre:TEXT, Examples: [Action, Adventure, Animation])
]
# Table: u2base
[
(userid:INTEGER, Primary Key, Examples: [1, 2, 3]),
(movieid:INTEGER, Primary Key, Examples: [1684486, 1685309, 1685493]),
(rating:TEXT, Examples: [1, 2, 3])
]
# Table: actors
[
(actorid:INTEGER, Primary Key, Examples: [4, 16, 28]),
(a_gender:TEXT, Examples: [M, F]),
(a_quality:INTEGER, Examples: [4, 0, 3])
]
【Foreign keys】
movies2actors.actorid=actors.actorid
movies2actors.movieid=movies.movieid
movies2directors.directorid=directors.directorid
movies2directors.movieid=movies.movieid
u2base.movieid=movies.movieid
u2base.userid=users.userid

    【Question】
    List the id of male users who gave ratings of less than 3 to French movies with running time of 2. Male users mean that u_gender = 'M'; France is a country

    【Evidence】
    Male users mean that u_gender = 'M'; France is a country

    Please read and understand the database schema carefully, and generate an executable SQL based on the user's question and evidence. 

SQL: SELECT T1.userid FROM u2base AS T1 INNER JOIN movies AS T2 ON T1.movieid = T2.movieid INNER JOIN users AS T3 ON T1.userid = T3.userid WHERE T2.country = 'France' AND T2.runningtime = 2 AND T1.rating < 3 AND T3.u_gender = 'M'
You are now a sqlite data analyst, and you are given a database schema as follows:

    【Schema】
    【DB_ID】 movielens
【Schema】
# Table: movies2actors
[
(movieid:INTEGER, Primary Key, Examples: [1672052, 1672111, 1672580]),
(actorid:INTEGER, Primary Key, Examples: [88796, 88848, 121878]),
(cast_num:INTEGER, Examples: [0, 1, 2])
]
# Table: users
[
(userid:INTEGER, Primary Key, Examples: [1, 2, 3]),
(age:TEXT, Examples: [1, 56, 25]),
(u_gender:TEXT, Examples: [F, M]),
(occupation:TEXT, Examples: [2, 3, 4])
]
# Table: directors
[
(directorid:INTEGER, Primary Key, Examples: [7387, 12945, 15725]),
(d_quality:INTEGER, Examples: [0, 1, 2]),
(avg_revenue:INTEGER, Examples: [0, 1, 2])
]
# Table: movies
[
(movieid:INTEGER, Primary Key, Examples: [1672052, 1672111, 1672580]),
(year:INTEGER, Examples: [3, 4, 1]),
(isEnglish:TEXT, Examples: [T, F]),
(country:TEXT, Examples: [other, USA, France]),
(runningtime:INTEGER, Examples: [2, 3, 0])
]
# Table: movies2directors
[
(movieid:INTEGER, Primary Key, Examples: [1672052, 1672111, 1672580]),
(directorid:INTEGER, Primary Key, Examples: [22397, 54934, 297253]),
(genre:TEXT, Examples: [Action, Adventure, Animation])
]
# Table: u2base
[
(userid:INTEGER, Primary Key, Examples: [1, 2, 3]),
(movieid:INTEGER, Primary Key, Examples: [1684486, 1685309, 1685493]),
(rating:TEXT, Examples: [1, 2, 3])
]
# Table: actors
[
(actorid:INTEGER, Primary Key, Examples: [4, 16, 28]),
(a_gender:TEXT, Examples: [M, F]),
(a_quality:INTEGER, Examples: [4, 0, 3])
]
【Foreign keys】
movies2actors.actorid=actors.actorid
movies2actors.movieid=movies.movieid
movies2directors.directorid=directors.directorid
movies2directors.movieid=movies.movieid
u2base.movieid=movies.movieid
u2base.userid=users.userid

    【Question】
    Among the worst actresses, how many of them got a rating of more than 3 to the movies they starred? Worst actresses means a_quality is the least; The least a_quality is 0

    【Evidence】
    Worst actresses means a_quality is the least; The least a_quality is 0

    Please read and understand the database schema carefully, and generate an executable SQL based on the user's question and evidence. 

SQL: SELECT COUNT(T1.userid) FROM u2base AS T1 INNER JOIN movies2actors AS T2 ON T1.movieid = T2.movieid INNER JOIN actors AS T3 ON T2.actorid = T3.actorid INNER JOIN users AS T4 ON T1.userid = T4.userid WHERE T3.a_quality = 0 AND T1.rating > 3 AND T4.u_gender = 'F'
You are now a sqlite data analyst, and you are given a database schema as follows:

    【Schema】
    【DB_ID】 movielens
【Schema】
# Table: movies2actors
[
(movieid:INTEGER, Primary Key, Examples: [1672052, 1672111, 1672580]),
(actorid:INTEGER, Primary Key, Examples: [88796, 88848, 121878]),
(cast_num:INTEGER, Examples: [0, 1, 2])
]
# Table: users
[
(userid:INTEGER, Primary Key, Examples: [1, 2, 3]),
(age:TEXT, Examples: [1, 56, 25]),
(u_gender:TEXT, Examples: [F, M]),
(occupation:TEXT, Examples: [2, 3, 4])
]
# Table: directors
[
(directorid:INTEGER, Primary Key, Examples: [7387, 12945, 15725]),
(d_quality:INTEGER, Examples: [0, 1, 2]),
(avg_revenue:INTEGER, Examples: [0, 1, 2])
]
# Table: movies
[
(movieid:INTEGER, Primary Key, Examples: [1672052, 1672111, 1672580]),
(year:INTEGER, Examples: [3, 4, 1]),
(isEnglish:TEXT, Examples: [T, F]),
(country:TEXT, Examples: [other, USA, France]),
(runningtime:INTEGER, Examples: [2, 3, 0])
]
# Table: movies2directors
[
(movieid:INTEGER, Primary Key, Examples: [1672052, 1672111, 1672580]),
(directorid:INTEGER, Primary Key, Examples: [22397, 54934, 297253]),
(genre:TEXT, Examples: [Action, Adventure, Animation])
]
# Table: u2base
[
(userid:INTEGER, Primary Key, Examples: [1, 2, 3]),
(movieid:INTEGER, Primary Key, Examples: [1684486, 1685309, 1685493]),
(rating:TEXT, Examples: [1, 2, 3])
]
# Table: actors
[
(actorid:INTEGER, Primary Key, Examples: [4, 16, 28]),
(a_gender:TEXT, Examples: [M, F]),
(a_quality:INTEGER, Examples: [4, 0, 3])
]
【Foreign keys】
movies2actors.actorid=actors.actorid
movies2actors.movieid=movies.movieid
movies2directors.directorid=directors.directorid
movies2directors.movieid=movies.movieid
u2base.movieid=movies.movieid
u2base.userid=users.userid

    【Question】
    What is the ID of audiences that gave the most rating of 5? The audience and users are the same meaning

    【Evidence】
    The audience and users are the same meaning

    Please read and understand the database schema carefully, and generate an executable SQL based on the user's question and evidence. 

SQL: SELECT userid FROM u2base WHERE rating = 5 GROUP BY userid ORDER BY COUNT(movieid) DESC LIMIT 1
You are now a sqlite data analyst, and you are given a database schema as follows:

    【Schema】
    【DB_ID】 movielens
【Schema】
# Table: movies2actors
[
(movieid:INTEGER, Primary Key, Examples: [1672052, 1672111, 1672580]),
(actorid:INTEGER, Primary Key, Examples: [88796, 88848, 121878]),
(cast_num:INTEGER, Examples: [0, 1, 2])
]
# Table: users
[
(userid:INTEGER, Primary Key, Examples: [1, 2, 3]),
(age:TEXT, Examples: [1, 56, 25]),
(u_gender:TEXT, Examples: [F, M]),
(occupation:TEXT, Examples: [2, 3, 4])
]
# Table: directors
[
(directorid:INTEGER, Primary Key, Examples: [7387, 12945, 15725]),
(d_quality:INTEGER, Examples: [0, 1, 2]),
(avg_revenue:INTEGER, Examples: [0, 1, 2])
]
# Table: movies
[
(movieid:INTEGER, Primary Key, Examples: [1672052, 1672111, 1672580]),
(year:INTEGER, Examples: [3, 4, 1]),
(isEnglish:TEXT, Examples: [T, F]),
(country:TEXT, Examples: [other, USA, France]),
(runningtime:INTEGER, Examples: [2, 3, 0])
]
# Table: movies2directors
[
(movieid:INTEGER, Primary Key, Examples: [1672052, 1672111, 1672580]),
(directorid:INTEGER, Primary Key, Examples: [22397, 54934, 297253]),
(genre:TEXT, Examples: [Action, Adventure, Animation])
]
# Table: u2base
[
(userid:INTEGER, Primary Key, Examples: [1, 2, 3]),
(movieid:INTEGER, Primary Key, Examples: [1684486, 1685309, 1685493]),
(rating:TEXT, Examples: [1, 2, 3])
]
# Table: actors
[
(actorid:INTEGER, Primary Key, Examples: [4, 16, 28]),
(a_gender:TEXT, Examples: [M, F]),
(a_quality:INTEGER, Examples: [4, 0, 3])
]
【Foreign keys】
movies2actors.actorid=actors.actorid
movies2actors.movieid=movies.movieid
movies2directors.directorid=directors.directorid
movies2directors.movieid=movies.movieid
u2base.movieid=movies.movieid
u2base.userid=users.userid

    【Question】
    What are the ID of actors that had worked together with director 22397? What was the genre of that movie?

    【Evidence】
    

    Please read and understand the database schema carefully, and generate an executable SQL based on the user's question and evidence. 

SQL: SELECT T2.actorid, T4.genre FROM movies AS T1 INNER JOIN movies2actors AS T2 ON T1.movieid = T2.movieid INNER JOIN actors AS T3 ON T2.actorid = T3.actorid INNER JOIN movies2directors AS T4 ON T1.movieid = T4.movieid WHERE T4.directorid = 22397
You are now a sqlite data analyst, and you are given a database schema as follows:

    【Schema】
    【DB_ID】 movielens
【Schema】
# Table: movies2actors
[
(movieid:INTEGER, Primary Key, Examples: [1672052, 1672111, 1672580]),
(actorid:INTEGER, Primary Key, Examples: [88796, 88848, 121878]),
(cast_num:INTEGER, Examples: [0, 1, 2])
]
# Table: users
[
(userid:INTEGER, Primary Key, Examples: [1, 2, 3]),
(age:TEXT, Examples: [1, 56, 25]),
(u_gender:TEXT, Examples: [F, M]),
(occupation:TEXT, Examples: [2, 3, 4])
]
# Table: directors
[
(directorid:INTEGER, Primary Key, Examples: [7387, 12945, 15725]),
(d_quality:INTEGER, Examples: [0, 1, 2]),
(avg_revenue:INTEGER, Examples: [0, 1, 2])
]
# Table: movies
[
(movieid:INTEGER, Primary Key, Examples: [1672052, 1672111, 1672580]),
(year:INTEGER, Examples: [3, 4, 1]),
(isEnglish:TEXT, Examples: [T, F]),
(country:TEXT, Examples: [other, USA, France]),
(runningtime:INTEGER, Examples: [2, 3, 0])
]
# Table: movies2directors
[
(movieid:INTEGER, Primary Key, Examples: [1672052, 1672111, 1672580]),
(directorid:INTEGER, Primary Key, Examples: [22397, 54934, 297253]),
(genre:TEXT, Examples: [Action, Adventure, Animation])
]
# Table: u2base
[
(userid:INTEGER, Primary Key, Examples: [1, 2, 3]),
(movieid:INTEGER, Primary Key, Examples: [1684486, 1685309, 1685493]),
(rating:TEXT, Examples: [1, 2, 3])
]
# Table: actors
[
(actorid:INTEGER, Primary Key, Examples: [4, 16, 28]),
(a_gender:TEXT, Examples: [M, F]),
(a_quality:INTEGER, Examples: [4, 0, 3])
]
【Foreign keys】
movies2actors.actorid=actors.actorid
movies2actors.movieid=movies.movieid
movies2directors.directorid=directors.directorid
movies2directors.movieid=movies.movieid
u2base.movieid=movies.movieid
u2base.userid=users.userid

    【Question】
    Please list down the ID of actors and directors in action movies.

    【Evidence】
    

    Please read and understand the database schema carefully, and generate an executable SQL based on the user's question and evidence. 

SQL: SELECT T2.actorid, T1.directorid FROM movies2directors AS T1 INNER JOIN movies2actors AS T2 ON T1.movieid = T2.movieid WHERE T1.genre = 'Action'
You are now a sqlite data analyst, and you are given a database schema as follows:

    【Schema】
    【DB_ID】 movielens
【Schema】
# Table: movies2actors
[
(movieid:INTEGER, Primary Key, Examples: [1672052, 1672111, 1672580]),
(actorid:INTEGER, Primary Key, Examples: [88796, 88848, 121878]),
(cast_num:INTEGER, Examples: [0, 1, 2])
]
# Table: users
[
(userid:INTEGER, Primary Key, Examples: [1, 2, 3]),
(age:TEXT, Examples: [1, 56, 25]),
(u_gender:TEXT, Examples: [F, M]),
(occupation:TEXT, Examples: [2, 3, 4])
]
# Table: directors
[
(directorid:INTEGER, Primary Key, Examples: [7387, 12945, 15725]),
(d_quality:INTEGER, Examples: [0, 1, 2]),
(avg_revenue:INTEGER, Examples: [0, 1, 2])
]
# Table: movies
[
(movieid:INTEGER, Primary Key, Examples: [1672052, 1672111, 1672580]),
(year:INTEGER, Examples: [3, 4, 1]),
(isEnglish:TEXT, Examples: [T, F]),
(country:TEXT, Examples: [other, USA, France]),
(runningtime:INTEGER, Examples: [2, 3, 0])
]
# Table: movies2directors
[
(movieid:INTEGER, Primary Key, Examples: [1672052, 1672111, 1672580]),
(directorid:INTEGER, Primary Key, Examples: [22397, 54934, 297253]),
(genre:TEXT, Examples: [Action, Adventure, Animation])
]
# Table: u2base
[
(userid:INTEGER, Primary Key, Examples: [1, 2, 3]),
(movieid:INTEGER, Primary Key, Examples: [1684486, 1685309, 1685493]),
(rating:TEXT, Examples: [1, 2, 3])
]
# Table: actors
[
(actorid:INTEGER, Primary Key, Examples: [4, 16, 28]),
(a_gender:TEXT, Examples: [M, F]),
(a_quality:INTEGER, Examples: [4, 0, 3])
]
【Foreign keys】
movies2actors.actorid=actors.actorid
movies2actors.movieid=movies.movieid
movies2directors.directorid=directors.directorid
movies2directors.movieid=movies.movieid
u2base.movieid=movies.movieid
u2base.userid=users.userid

    【Question】
    How many female actors acted in the movies of year 4? Female actors mean that a_gender = 'F'

    【Evidence】
    Female actors mean that a_gender = 'F'

    Please read and understand the database schema carefully, and generate an executable SQL based on the user's question and evidence. 

SQL: SELECT COUNT(T2.actorid) FROM movies AS T1 INNER JOIN movies2actors AS T2 ON T1.movieid = T2.movieid INNER JOIN actors AS T3 ON T2.actorid = T3.actorid WHERE T3.a_gender = 'F' AND T1.year = 4