1sf/bird-sql-train-with-schema huggingface dataset:
Database: movielens
Tables: users, directors, actors, movies, movies2actors, movies2directors, u2base
Columns (table index, column name): -1, *, 0, userid, 0, age, 0, u_gender, 0, occupation, 1, directorid, 1, d_quality, 1, avg_revenue, 2, actorid, 2, a_gender, 2, a_quality, 3, movieid, 3, year, 3, isEnglish, 3, country, 3, runningtime, 4, movieid, 4, actorid, 4, cast_num, 5, movieid, 5, directorid, 5, genre, 6, userid, 6, movieid, 6, rating
Question: List down 5 non English adventure movies from UK?
Evidence: not English refers to isEnglish = 'F'; UK is a country
SQL: SELECT T1.movieid FROM movies2directors AS T1 INNER JOIN movies AS T2 ON T1.movieid = T2.movieid WHERE T2.country = 'UK' AND T1.genre = 'Adventure' AND T2.isEnglish = 'F' LIMIT 5
Database: movielens
Tables: users, directors, actors, movies, movies2actors, movies2directors, u2base
Columns (table index, column name): -1, *, 0, userid, 0, age, 0, u_gender, 0, occupation, 1, directorid, 1, d_quality, 1, avg_revenue, 2, actorid, 2, a_gender, 2, a_quality, 3, movieid, 3, year, 3, isEnglish, 3, country, 3, runningtime, 4, movieid, 4, actorid, 4, cast_num, 5, movieid, 5, directorid, 5, genre, 6, userid, 6, movieid, 6, rating
Question: What is the percentage of female audiences who viewed movies with rating 2?
Evidence: The audience and users are the same meaning; Female users refers to u_gender = 'F'; Percentage of female users = count(female users) / count(all users); count(all users) = count(female users) + count(male users)
SQL: SELECT CAST(SUM(IIF(T2.u_gender = 'F', 1, 0)) AS REAL) * 100 / COUNT(T2.userid) FROM u2base AS T1 INNER JOIN users AS T2 ON T1.userid = T2.userid WHERE T1.rating = 2
Database: movielens
Tables: users, directors, actors, movies, movies2actors, movies2directors, u2base
Columns (table index, column name): -1, *, 0, userid, 0, age, 0, u_gender, 0, occupation, 1, directorid, 1, d_quality, 1, avg_revenue, 2, actorid, 2, a_gender, 2, a_quality, 3, movieid, 3, year, 3, isEnglish, 3, country, 3, runningtime, 4, movieid, 4, actorid, 4, cast_num, 5, movieid, 5, directorid, 5, genre, 6, userid, 6, movieid, 6, rating
Question: What is the difference of female and male audiences in number who viewed horror movies?
Evidence: The audience and users are the same meaning; Difference of female and male audiences = count(female users) - count(male users); Female users refers to u_gender = 'F'; Male users refers to u_gender = 'M'
SQL: SELECT SUM(IIF(T2.u_gender = 'F', 1, 0)) - SUM(IIF(T2.u_gender = 'M', 1, 0)) FROM u2base AS T1 INNER JOIN users AS T2 ON T1.userid = T2.userid INNER JOIN movies2directors AS T3 ON T3.movieid = T1.movieid WHERE T3.genre = 'horror'
Database: movielens
Tables: users, directors, actors, movies, movies2actors, movies2directors, u2base
Columns (table index, column name): -1, *, 0, userid, 0, age, 0, u_gender, 0, occupation, 1, directorid, 1, d_quality, 1, avg_revenue, 2, actorid, 2, a_gender, 2, a_quality, 3, movieid, 3, year, 3, isEnglish, 3, country, 3, runningtime, 4, movieid, 4, actorid, 4, cast_num, 5, movieid, 5, directorid, 5, genre, 6, userid, 6, movieid, 6, rating
Question: Please list the genre of the movies that are the newest and is in English.
Evidence: Year contains relative value, higher year value refers to newer date; Year = 4 refers to newest date, Year = 1 refer to oldest date; In English means isEnglish = T
SQL: SELECT T2.genre FROM movies AS T1 INNER JOIN movies2directors AS T2 ON T1.movieid = T2.movieid WHERE T1.year = 4 AND T1.isEnglish = 'T'
Database: movielens
Tables: users, directors, actors, movies, movies2actors, movies2directors, u2base
Columns (table index, column name): -1, *, 0, userid, 0, age, 0, u_gender, 0, occupation, 1, directorid, 1, d_quality, 1, avg_revenue, 2, actorid, 2, a_gender, 2, a_quality, 3, movieid, 3, year, 3, isEnglish, 3, country, 3, runningtime, 4, movieid, 4, actorid, 4, cast_num, 5, movieid, 5, directorid, 5, genre, 6, userid, 6, movieid, 6, rating
Question: Among the action movies from the USA, how many of them are not in English?
Evidence: USA is a country; not in English can be represented by isEnglish = 'F'
SQL: SELECT COUNT(T1.movieid) FROM movies AS T1 INNER JOIN movies2directors AS T2 ON T1.movieid = T2.movieid WHERE T1.country = 'USA' AND T1.isEnglish = 'F' AND T2.genre = 'Action'
Database: movielens
Tables: users, directors, actors, movies, movies2actors, movies2directors, u2base
Columns (table index, column name): -1, *, 0, userid, 0, age, 0, u_gender, 0, occupation, 1, directorid, 1, d_quality, 1, avg_revenue, 2, actorid, 2, a_gender, 2, a_quality, 3, movieid, 3, year, 3, isEnglish, 3, country, 3, runningtime, 4, movieid, 4, actorid, 4, cast_num, 5, movieid, 5, directorid, 5, genre, 6, userid, 6, movieid, 6, rating
Question: For the male users no older than 18, how many times have they given the highest rating?
Evidence: Male users refers to u_gender = 'M'
SQL: SELECT COUNT(T1.movieid) FROM u2base AS T1 INNER JOIN users AS T2 ON T1.userid = T2.userid WHERE T1.rating = 5 AND T2.age < 18 AND T2.u_gender = 'M'
Database: movielens
Tables: users, directors, actors, movies, movies2actors, movies2directors, u2base
Columns (table index, column name): -1, *, 0, userid, 0, age, 0, u_gender, 0, occupation, 1, directorid, 1, d_quality, 1, avg_revenue, 2, actorid, 2, a_gender, 2, a_quality, 3, movieid, 3, year, 3, isEnglish, 3, country, 3, runningtime, 4, movieid, 4, actorid, 4, cast_num, 5, movieid, 5, directorid, 5, genre, 6, userid, 6, movieid, 6, rating
Question: Please list the ID of the movie that has been mostly rated by female users.
Evidence: Female users refers to u_gender = 'F'
SQL: SELECT T1.movieid FROM u2base AS T1 INNER JOIN users AS T2 ON T1.userid = T2.userid WHERE T2.u_gender = 'F' GROUP BY T1.movieid ORDER BY COUNT(T2.userid) DESC LIMIT 1
Database: movielens
Tables: users, directors, actors, movies, movies2actors, movies2directors, u2base
Columns (table index, column name): -1, *, 0, userid, 0, age, 0, u_gender, 0, occupation, 1, directorid, 1, d_quality, 1, avg_revenue, 2, actorid, 2, a_gender, 2, a_quality, 3, movieid, 3, year, 3, isEnglish, 3, country, 3, runningtime, 4, movieid, 4, actorid, 4, cast_num, 5, movieid, 5, directorid, 5, genre, 6, userid, 6, movieid, 6, rating
Question: Among divergent movies that got the highest rating, how many of them are from the UK?
Evidence: UK is a country
SQL: SELECT COUNT(DISTINCT T1.movieid) FROM u2base AS T1 INNER JOIN movies AS T2 ON T1.movieid = T2.movieid WHERE T2.country = 'UK' AND T1.rating = 5
Database: movielens
Tables: users, directors, actors, movies, movies2actors, movies2directors, u2base
Columns (table index, column name): -1, *, 0, userid, 0, age, 0, u_gender, 0, occupation, 1, directorid, 1, d_quality, 1, avg_revenue, 2, actorid, 2, a_gender, 2, a_quality, 3, movieid, 3, year, 3, isEnglish, 3, country, 3, runningtime, 4, movieid, 4, actorid, 4, cast_num, 5, movieid, 5, directorid, 5, genre, 6, userid, 6, movieid, 6, rating
Question: Please list different IDs of movies that are the newest and have gotten the lowest rating.
Evidence: Year contains relative value, higer year value refers to newer date; Year = 4 refers to newest date, Year = 1 refer to oldest date; Lowest rating = 1
SQL: SELECT DISTINCT T1.movieid FROM u2base AS T1 INNER JOIN movies AS T2 ON T1.movieid = T2.movieid WHERE T2.year = 4 AND T1.rating = 1
Database: movielens
Tables: users, directors, actors, movies, movies2actors, movies2directors, u2base
Columns (table index, column name): -1, *, 0, userid, 0, age, 0, u_gender, 0, occupation, 1, directorid, 1, d_quality, 1, avg_revenue, 2, actorid, 2, a_gender, 2, a_quality, 3, movieid, 3, year, 3, isEnglish, 3, country, 3, runningtime, 4, movieid, 4, actorid, 4, cast_num, 5, movieid, 5, directorid, 5, genre, 6, userid, 6, movieid, 6, rating
Question: For the movies in English that are the oldest, how many of them have the lowest rating?
Evidence: Year contains relative value, higer year value refers to newer date; Year = 4 refers to newest date, Year = 1 refer to oldest date; Lowest rating = 1；isEnglish = 'T' means English movie
SQL: SELECT COUNT(DISTINCT T1.movieid) FROM movies AS T1 INNER JOIN u2base AS T2 ON T1.movieid = T2.movieid WHERE T1.year = 1 AND T2.rating = 1 AND T1.isEnglish = 'T'
Database: movielens
Tables: users, directors, actors, movies, movies2actors, movies2directors, u2base
Columns (table index, column name): -1, *, 0, userid, 0, age, 0, u_gender, 0, occupation, 1, directorid, 1, d_quality, 1, avg_revenue, 2, actorid, 2, a_gender, 2, a_quality, 3, movieid, 3, year, 3, isEnglish, 3, country, 3, runningtime, 4, movieid, 4, actorid, 4, cast_num, 5, movieid, 5, directorid, 5, genre, 6, userid, 6, movieid, 6, rating
Question: How many different female users have rated movies from France?
Evidence: France is a country; Female users mean that u_gender = 'F'
SQL: SELECT COUNT(DISTINCT T2.userid) FROM users AS T1 INNER JOIN u2base AS T2 ON T1.userid = T2.userid INNER JOIN movies AS T3 ON T2.movieid = T3.movieid WHERE T1.u_gender = 'F' AND T3.country = 'France'
Database: movielens
Tables: users, directors, actors, movies, movies2actors, movies2directors, u2base
Columns (table index, column name): -1, *, 0, userid, 0, age, 0, u_gender, 0, occupation, 1, directorid, 1, d_quality, 1, avg_revenue, 2, actorid, 2, a_gender, 2, a_quality, 3, movieid, 3, year, 3, isEnglish, 3, country, 3, runningtime, 4, movieid, 4, actorid, 4, cast_num, 5, movieid, 5, directorid, 5, genre, 6, userid, 6, movieid, 6, rating
Question: For different directors who direct well, how many of them have directed an action film?
Evidence: direct well means the quality of directing is good, which means d_quality = 4.
SQL: SELECT COUNT(DISTINCT T2.directorid) FROM movies2directors AS T2 INNER JOIN directors AS T3 ON T2.directorid = T3.directorid WHERE T2.genre = 'Action' AND T3.d_quality = 4
Database: movielens
Tables: users, directors, actors, movies, movies2actors, movies2directors, u2base
Columns (table index, column name): -1, *, 0, userid, 0, age, 0, u_gender, 0, occupation, 1, directorid, 1, d_quality, 1, avg_revenue, 2, actorid, 2, a_gender, 2, a_quality, 3, movieid, 3, year, 3, isEnglish, 3, country, 3, runningtime, 4, movieid, 4, actorid, 4, cast_num, 5, movieid, 5, directorid, 5, genre, 6, userid, 6, movieid, 6, rating
Question: Please list the genre of the movies that are directed by the directors with the highest level of average revenue.
SQL: SELECT T2.genre FROM directors AS T1 INNER JOIN movies2directors AS T2 ON T1.directorid = T2.directorid WHERE T1.avg_revenue = 4
Database: movielens
Tables: users, directors, actors, movies, movies2actors, movies2directors, u2base
Columns (table index, column name): -1, *, 0, userid, 0, age, 0, u_gender, 0, occupation, 1, directorid, 1, d_quality, 1, avg_revenue, 2, actorid, 2, a_gender, 2, a_quality, 3, movieid, 3, year, 3, isEnglish, 3, country, 3, runningtime, 4, movieid, 4, actorid, 4, cast_num, 5, movieid, 5, directorid, 5, genre, 6, userid, 6, movieid, 6, rating
Question: How many distinct movies in English stars a male actor who acts the best?
Evidence: Male actors mean that a_gender = 'M'; isEnglish = 'T' means movies in English
SQL: SELECT COUNT(DISTINCT T1.actorid) FROM actors AS T1 INNER JOIN movies2actors AS T2 ON T1.actorid = T2.actorid INNER JOIN movies AS T3 ON T2.movieid = T3.movieid WHERE T3.isEnglish = 'T' AND T1.a_gender = 'M' AND T1.a_quality = 5
Database: movielens
Tables: users, directors, actors, movies, movies2actors, movies2directors, u2base
Columns (table index, column name): -1, *, 0, userid, 0, age, 0, u_gender, 0, occupation, 1, directorid, 1, d_quality, 1, avg_revenue, 2, actorid, 2, a_gender, 2, a_quality, 3, movieid, 3, year, 3, isEnglish, 3, country, 3, runningtime, 4, movieid, 4, actorid, 4, cast_num, 5, movieid, 5, directorid, 5, genre, 6, userid, 6, movieid, 6, rating
Question: Please list the country of the movie that stars an actress who acts the worse.
Evidence: a_quality = 5 refers to act the best, a_quality = 0 refers to act the worst
SQL: SELECT T3.country FROM actors AS T1 INNER JOIN movies2actors AS T2 ON T1.actorid = T2.actorid INNER JOIN movies AS T3 ON T2.movieid = T3.movieid WHERE T1.a_gender = 'F' AND T1.a_quality = 0
Database: movielens
Tables: users, directors, actors, movies, movies2actors, movies2directors, u2base
Columns (table index, column name): -1, *, 0, userid, 0, age, 0, u_gender, 0, occupation, 1, directorid, 1, d_quality, 1, avg_revenue, 2, actorid, 2, a_gender, 2, a_quality, 3, movieid, 3, year, 3, isEnglish, 3, country, 3, runningtime, 4, movieid, 4, actorid, 4, cast_num, 5, movieid, 5, directorid, 5, genre, 6, userid, 6, movieid, 6, rating
Question: What is the highest average rating for action movies made in the USA?
Evidence: USA is a country
SQL: SELECT AVG(T2.rating) FROM movies AS T1 INNER JOIN u2base AS T2 ON T1.movieid = T2.movieid INNER JOIN movies2directors AS T3 ON T1.movieid = T3.movieid WHERE T1.country = 'USA' AND T3.genre = 'Action' GROUP BY T1.movieid ORDER BY AVG(T2.rating) DESC LIMIT 1
Database: movielens
Tables: users, directors, actors, movies, movies2actors, movies2directors, u2base
Columns (table index, column name): -1, *, 0, userid, 0, age, 0, u_gender, 0, occupation, 1, directorid, 1, d_quality, 1, avg_revenue, 2, actorid, 2, a_gender, 2, a_quality, 3, movieid, 3, year, 3, isEnglish, 3, country, 3, runningtime, 4, movieid, 4, actorid, 4, cast_num, 5, movieid, 5, directorid, 5, genre, 6, userid, 6, movieid, 6, rating
Question: Among the films directed by directors who direct the best, how many of them have an average rating of over 3.5?
Evidence: d_quality = 5 refers to direct the best, d_quality = 0 refers to direct the worst
SQL: SELECT COUNT(*) FROM ( SELECT DISTINCT T2.movieid FROM directors AS T1 INNER JOIN movies2directors AS T2 ON T1.directorid = T2.directorid INNER JOIN u2base AS T3 ON T2.movieid = T3.movieid WHERE T1.d_quality = 5 GROUP BY T2.movieid HAVING AVG(T3.rating) > 3.5 ) AS T1
Database: movielens
Tables: users, directors, actors, movies, movies2actors, movies2directors, u2base
Columns (table index, column name): -1, *, 0, userid, 0, age, 0, u_gender, 0, occupation, 1, directorid, 1, d_quality, 1, avg_revenue, 2, actorid, 2, a_gender, 2, a_quality, 3, movieid, 3, year, 3, isEnglish, 3, country, 3, runningtime, 4, movieid, 4, actorid, 4, cast_num, 5, movieid, 5, directorid, 5, genre, 6, userid, 6, movieid, 6, rating
Question: Which adventure movie has the highest average rating?
SQL: SELECT T1.movieid FROM movies2directors AS T1 INNER JOIN u2base AS T2 ON T1.movieid = T2.movieid WHERE T1.genre = 'Adventure' GROUP BY T1.movieid ORDER BY AVG(T2.rating) DESC LIMIT 1
Database: movielens
Tables: users, directors, actors, movies, movies2actors, movies2directors, u2base
Columns (table index, column name): -1, *, 0, userid, 0, age, 0, u_gender, 0, occupation, 1, directorid, 1, d_quality, 1, avg_revenue, 2, actorid, 2, a_gender, 2, a_quality, 3, movieid, 3, year, 3, isEnglish, 3, country, 3, runningtime, 4, movieid, 4, actorid, 4, cast_num, 5, movieid, 5, directorid, 5, genre, 6, userid, 6, movieid, 6, rating
Question: How many of the users who rate the movie with the id '2462959' are female?
Evidence: Female users mean that u_gender = 'F'
SQL: SELECT COUNT(T1.userid) FROM users AS T1 INNER JOIN u2base AS T2 ON T1.userid = T2.userid WHERE T2.userid = 2462959 AND T1.u_gender = 'F'
Database: movielens
Tables: users, directors, actors, movies, movies2actors, movies2directors, u2base
Columns (table index, column name): -1, *, 0, userid, 0, age, 0, u_gender, 0, occupation, 1, directorid, 1, d_quality, 1, avg_revenue, 2, actorid, 2, a_gender, 2, a_quality, 3, movieid, 3, year, 3, isEnglish, 3, country, 3, runningtime, 4, movieid, 4, actorid, 4, cast_num, 5, movieid, 5, directorid, 5, genre, 6, userid, 6, movieid, 6, rating
Question: What is the most distinct rated movie with a running time of 0?
SQL: SELECT DISTINCT T1.movieid FROM movies AS T1 INNER JOIN u2base AS T2 ON T1.movieid = T2.movieid WHERE T1.runningtime = 0 AND T2.rating = ( SELECT MAX(rating) FROM u2base )
Database: movielens
Tables: users, directors, actors, movies, movies2actors, movies2directors, u2base
Columns (table index, column name): -1, *, 0, userid, 0, age, 0, u_gender, 0, occupation, 1, directorid, 1, d_quality, 1, avg_revenue, 2, actorid, 2, a_gender, 2, a_quality, 3, movieid, 3, year, 3, isEnglish, 3, country, 3, runningtime, 4, movieid, 4, actorid, 4, cast_num, 5, movieid, 5, directorid, 5, genre, 6, userid, 6, movieid, 6, rating
Question: List the ids and ratings of each actors played in the movie with the id 1722327?
SQL: SELECT T1.actorid, T1.a_quality FROM actors AS T1 INNER JOIN movies2actors AS T2 ON T1.actorid = T2.actorid WHERE T2.movieid = 1722327
Database: movielens
Tables: users, directors, actors, movies, movies2actors, movies2directors, u2base
Columns (table index, column name): -1, *, 0, userid, 0, age, 0, u_gender, 0, occupation, 1, directorid, 1, d_quality, 1, avg_revenue, 2, actorid, 2, a_gender, 2, a_quality, 3, movieid, 3, year, 3, isEnglish, 3, country, 3, runningtime, 4, movieid, 4, actorid, 4, cast_num, 5, movieid, 5, directorid, 5, genre, 6, userid, 6, movieid, 6, rating
Question: Which directors with the best quality directed the most films?
Evidence: d_quality = 5 refers to direct the best
SQL: SELECT T1.directorid FROM directors AS T1 INNER JOIN movies2directors AS T2 ON T1.directorid = T2.directorid WHERE T1.d_quality = 5 GROUP BY T1.directorid ORDER BY COUNT(T2.movieid) DESC LIMIT 1
Database: movielens
Tables: users, directors, actors, movies, movies2actors, movies2directors, u2base
Columns (table index, column name): -1, *, 0, userid, 0, age, 0, u_gender, 0, occupation, 1, directorid, 1, d_quality, 1, avg_revenue, 2, actorid, 2, a_gender, 2, a_quality, 3, movieid, 3, year, 3, isEnglish, 3, country, 3, runningtime, 4, movieid, 4, actorid, 4, cast_num, 5, movieid, 5, directorid, 5, genre, 6, userid, 6, movieid, 6, rating
Question: How many drama movie with the rating of 3?
SQL: SELECT COUNT(DISTINCT T2.movieid) FROM u2base AS T1 INNER JOIN movies2directors AS T2 ON T1.movieid = T2.movieid WHERE T2.genre = 'drama' AND T1.rating = 3
Database: movielens
Tables: users, directors, actors, movies, movies2actors, movies2directors, u2base
Columns (table index, column name): -1, *, 0, userid, 0, age, 0, u_gender, 0, occupation, 1, directorid, 1, d_quality, 1, avg_revenue, 2, actorid, 2, a_gender, 2, a_quality, 3, movieid, 3, year, 3, isEnglish, 3, country, 3, runningtime, 4, movieid, 4, actorid, 4, cast_num, 5, movieid, 5, directorid, 5, genre, 6, userid, 6, movieid, 6, rating
Question: How many of the movies rated 5 are rated by a user between the ages of 25 and 35?
SQL: SELECT COUNT(T1.movieid) FROM u2base AS T1 INNER JOIN users AS T2 ON T1.userid = T2.userid WHERE T1.rating = 5 AND T2.age BETWEEN 25 AND 35
Database: movielens
Tables: users, directors, actors, movies, movies2actors, movies2directors, u2base
Columns (table index, column name): -1, *, 0, userid, 0, age, 0, u_gender, 0, occupation, 1, directorid, 1, d_quality, 1, avg_revenue, 2, actorid, 2, a_gender, 2, a_quality, 3, movieid, 3, year, 3, isEnglish, 3, country, 3, runningtime, 4, movieid, 4, actorid, 4, cast_num, 5, movieid, 5, directorid, 5, genre, 6, userid, 6, movieid, 6, rating
Question: Please list all horror films that have a rating of 1.
SQL: SELECT T1.movieid FROM u2base AS T1 INNER JOIN movies2directors AS T2 ON T1.movieid = T2.movieid WHERE T1.rating = 1 AND T2.genre = 'Horror'
Database: movielens
Tables: users, directors, actors, movies, movies2actors, movies2directors, u2base
Columns (table index, column name): -1, *, 0, userid, 0, age, 0, u_gender, 0, occupation, 1, directorid, 1, d_quality, 1, avg_revenue, 2, actorid, 2, a_gender, 2, a_quality, 3, movieid, 3, year, 3, isEnglish, 3, country, 3, runningtime, 4, movieid, 4, actorid, 4, cast_num, 5, movieid, 5, directorid, 5, genre, 6, userid, 6, movieid, 6, rating
Question: List the IDs of all the directors who worked on French films.
Evidence: France is a country
SQL: SELECT T2.directorid FROM movies AS T1 INNER JOIN movies2directors AS T2 ON T1.movieid = T2.movieid WHERE T1.country = 'France'
Database: movielens
Tables: users, directors, actors, movies, movies2actors, movies2directors, u2base
Columns (table index, column name): -1, *, 0, userid, 0, age, 0, u_gender, 0, occupation, 1, directorid, 1, d_quality, 1, avg_revenue, 2, actorid, 2, a_gender, 2, a_quality, 3, movieid, 3, year, 3, isEnglish, 3, country, 3, runningtime, 4, movieid, 4, actorid, 4, cast_num, 5, movieid, 5, directorid, 5, genre, 6, userid, 6, movieid, 6, rating
Question: List all of the user ids and ages who rated movies with the id 1695219?
SQL: SELECT T2.userid, T2.age FROM u2base AS T1 INNER JOIN users AS T2 ON T1.userid = T2.userid WHERE T1.movieid = 1695219
Database: movielens
Tables: users, directors, actors, movies, movies2actors, movies2directors, u2base
Columns (table index, column name): -1, *, 0, userid, 0, age, 0, u_gender, 0, occupation, 1, directorid, 1, d_quality, 1, avg_revenue, 2, actorid, 2, a_gender, 2, a_quality, 3, movieid, 3, year, 3, isEnglish, 3, country, 3, runningtime, 4, movieid, 4, actorid, 4, cast_num, 5, movieid, 5, directorid, 5, genre, 6, userid, 6, movieid, 6, rating
Question: Which genre contains the greatest number of non-English films?
Evidence: isEnglish = 'F' means non-English
SQL: SELECT T2.genre FROM movies AS T1 INNER JOIN movies2directors AS T2 ON T1.movieid = T2.movieid WHERE T1.isEnglish = 'F' GROUP BY T2.genre ORDER BY COUNT(T1.movieid) DESC LIMIT 1
Database: movielens
Tables: users, directors, actors, movies, movies2actors, movies2directors, u2base
Columns (table index, column name): -1, *, 0, userid, 0, age, 0, u_gender, 0, occupation, 1, directorid, 1, d_quality, 1, avg_revenue, 2, actorid, 2, a_gender, 2, a_quality, 3, movieid, 3, year, 3, isEnglish, 3, country, 3, runningtime, 4, movieid, 4, actorid, 4, cast_num, 5, movieid, 5, directorid, 5, genre, 6, userid, 6, movieid, 6, rating
Question: List the cast and the director of the movie with the id 1949144.
SQL: SELECT T1.actorid, T2.directorid FROM movies2actors AS T1 INNER JOIN movies2directors AS T2 ON T1.movieid = T2.movieid WHERE T1.movieid = 1949144
Database: movielens
Tables: users, directors, actors, movies, movies2actors, movies2directors, u2base
Columns (table index, column name): -1, *, 0, userid, 0, age, 0, u_gender, 0, occupation, 1, directorid, 1, d_quality, 1, avg_revenue, 2, actorid, 2, a_gender, 2, a_quality, 3, movieid, 3, year, 3, isEnglish, 3, country, 3, runningtime, 4, movieid, 4, actorid, 4, cast_num, 5, movieid, 5, directorid, 5, genre, 6, userid, 6, movieid, 6, rating
Question: Among the actors who acted in UK movies, what percentage of actors received a rating of at least 3?
Evidence: UK is a country
SQL: SELECT CAST(SUM(IIF(T3.a_quality >= 3, 1, 0)) AS REAL) * 100 / COUNT(T1.movieid) 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 T1.country = 'UK'
Database: movielens
Tables: users, directors, actors, movies, movies2actors, movies2directors, u2base
Columns (table index, column name): -1, *, 0, userid, 0, age, 0, u_gender, 0, occupation, 1, directorid, 1, d_quality, 1, avg_revenue, 2, actorid, 2, a_gender, 2, a_quality, 3, movieid, 3, year, 3, isEnglish, 3, country, 3, runningtime, 4, movieid, 4, actorid, 4, cast_num, 5, movieid, 5, directorid, 5, genre, 6, userid, 6, movieid, 6, rating
Question: What is the proportion of action movies directors who are called 'box office success paradox'?
Evidence: 'box office success paradox' means average revenue exceeds their quality; The proportion can be computed by [(avg_revenue > d_quality) / ()] * 100%
SQL: SELECT CAST(SUM(IIF(T2.avg_revenue > T2.d_quality, 1, 0)) AS REAL) * 100 / COUNT(T1.movieid) FROM movies2directors AS T1 INNER JOIN directors AS T2 ON T1.directorid = T2.directorid WHERE T1.genre = 'Action'