db_id
stringclasses
69 values
question
stringlengths
24
325
evidence
stringlengths
1
673
SQL
stringlengths
23
804
schema
stringclasses
69 values
movies_4
For movies with the keyword of "civil war", calculate the average revenue generated by these movies.
keyword of "civil war" refers to keyword_name = 'civil war'; average revenue = AVG(revenue)
SELECT AVG(T1.revenue) FROM movie AS T1 INNER JOIN movie_keywords AS T2 ON T1.movie_id = T2.movie_id INNER JOIN keyword AS T3 ON T2.keyword_id = T3.keyword_id WHERE T3.keyword_name = 'civil war'
database name:db_id movies_4 country table country Cols: country id dtype integer, country iso code dtype text, country name dtype text, department table department Cols: department id dtype integer, department name dtype text, gender table gender Cols: gender id dtype integer, gender dtype text, genre table genre Cols: genre id dtype integer, genre_name dtype text, keyword table keyword Cols: keyword id dtype integer, keyword name dtype text, language table language Cols: language id dtype integer, language code dtype text, language name dtype text, language_role table language_role Cols: role id dtype integer, language role dtype text, movie table movie Cols: movie id dtype integer, title dtype text, budget dtype integer, homepage dtype text, overview dtype text, popularity dtype real, release date dtype date, revenue dtype integer, runtime dtype integer, movie_status dtype text, tagline dtype text, vote average dtype real, vote count dtype integer, movie_genres table movie_genres Cols: movie id dtype integer, genre id dtype integer, movie_languages table movie_languages Cols: movie id dtype integer, language id dtype integer, language role id dtype integer, person table person Cols: person id dtype integer, person name dtype text, movie_crew table movie_crew Cols: movie id dtype integer, person id dtype integer, department id dtype integer, job dtype text, production_company table production_company Cols: company id dtype integer, company name dtype text, production_country table production_country Cols: mivie id dtype integer, country id dtype integer, movie_cast table movie_cast Cols: movie id dtype integer, person id dtype integer, character name dtype text, gender id dtype integer, cast order dtype integer, movie_keywords table movie_keywords Cols: movie id dtype integer, keyword id dtype integer, movie_company table movie_company Cols: movie id dtype integer, company id dtype integer,
movies_4
Find out the popularity of the movies with the highest vote count.
highest vote count refers to max(vote_count)
SELECT popularity FROM movie ORDER BY vote_COUNT DESC LIMIT 1
database name:db_id movies_4 country table country Cols: country id dtype integer, country iso code dtype text, country name dtype text, department table department Cols: department id dtype integer, department name dtype text, gender table gender Cols: gender id dtype integer, gender dtype text, genre table genre Cols: genre id dtype integer, genre_name dtype text, keyword table keyword Cols: keyword id dtype integer, keyword name dtype text, language table language Cols: language id dtype integer, language code dtype text, language name dtype text, language_role table language_role Cols: role id dtype integer, language role dtype text, movie table movie Cols: movie id dtype integer, title dtype text, budget dtype integer, homepage dtype text, overview dtype text, popularity dtype real, release date dtype date, revenue dtype integer, runtime dtype integer, movie_status dtype text, tagline dtype text, vote average dtype real, vote count dtype integer, movie_genres table movie_genres Cols: movie id dtype integer, genre id dtype integer, movie_languages table movie_languages Cols: movie id dtype integer, language id dtype integer, language role id dtype integer, person table person Cols: person id dtype integer, person name dtype text, movie_crew table movie_crew Cols: movie id dtype integer, person id dtype integer, department id dtype integer, job dtype text, production_company table production_company Cols: company id dtype integer, company name dtype text, production_country table production_country Cols: mivie id dtype integer, country id dtype integer, movie_cast table movie_cast Cols: movie id dtype integer, person id dtype integer, character name dtype text, gender id dtype integer, cast order dtype integer, movie_keywords table movie_keywords Cols: movie id dtype integer, keyword id dtype integer, movie_company table movie_company Cols: movie id dtype integer, company id dtype integer,
movies_4
Among the zero-budget movie titles, which one has made the highest revenue?
zero-budget refers to budget = 0; highest revenue refers to max(revenue)
SELECT title FROM movie WHERE budget = 0 ORDER BY revenue DESC LIMIT 1
database name:db_id movies_4 country table country Cols: country id dtype integer, country iso code dtype text, country name dtype text, department table department Cols: department id dtype integer, department name dtype text, gender table gender Cols: gender id dtype integer, gender dtype text, genre table genre Cols: genre id dtype integer, genre_name dtype text, keyword table keyword Cols: keyword id dtype integer, keyword name dtype text, language table language Cols: language id dtype integer, language code dtype text, language name dtype text, language_role table language_role Cols: role id dtype integer, language role dtype text, movie table movie Cols: movie id dtype integer, title dtype text, budget dtype integer, homepage dtype text, overview dtype text, popularity dtype real, release date dtype date, revenue dtype integer, runtime dtype integer, movie_status dtype text, tagline dtype text, vote average dtype real, vote count dtype integer, movie_genres table movie_genres Cols: movie id dtype integer, genre id dtype integer, movie_languages table movie_languages Cols: movie id dtype integer, language id dtype integer, language role id dtype integer, person table person Cols: person id dtype integer, person name dtype text, movie_crew table movie_crew Cols: movie id dtype integer, person id dtype integer, department id dtype integer, job dtype text, production_company table production_company Cols: company id dtype integer, company name dtype text, production_country table production_country Cols: mivie id dtype integer, country id dtype integer, movie_cast table movie_cast Cols: movie id dtype integer, person id dtype integer, character name dtype text, gender id dtype integer, cast order dtype integer, movie_keywords table movie_keywords Cols: movie id dtype integer, keyword id dtype integer, movie_company table movie_company Cols: movie id dtype integer, company id dtype integer,
movies_4
What is the ID of the production company which produced the movie "Gladiator"?
ID of the production company refers to company_id; movie "Gladiator" refers to title = 'Gladiator'
SELECT T2.company_id FROM movie AS T1 INNER JOIN movie_company AS T2 ON T1.movie_id = T2.movie_id WHERE T1.title = 'Gladiator'
database name:db_id movies_4 country table country Cols: country id dtype integer, country iso code dtype text, country name dtype text, department table department Cols: department id dtype integer, department name dtype text, gender table gender Cols: gender id dtype integer, gender dtype text, genre table genre Cols: genre id dtype integer, genre_name dtype text, keyword table keyword Cols: keyword id dtype integer, keyword name dtype text, language table language Cols: language id dtype integer, language code dtype text, language name dtype text, language_role table language_role Cols: role id dtype integer, language role dtype text, movie table movie Cols: movie id dtype integer, title dtype text, budget dtype integer, homepage dtype text, overview dtype text, popularity dtype real, release date dtype date, revenue dtype integer, runtime dtype integer, movie_status dtype text, tagline dtype text, vote average dtype real, vote count dtype integer, movie_genres table movie_genres Cols: movie id dtype integer, genre id dtype integer, movie_languages table movie_languages Cols: movie id dtype integer, language id dtype integer, language role id dtype integer, person table person Cols: person id dtype integer, person name dtype text, movie_crew table movie_crew Cols: movie id dtype integer, person id dtype integer, department id dtype integer, job dtype text, production_company table production_company Cols: company id dtype integer, company name dtype text, production_country table production_country Cols: mivie id dtype integer, country id dtype integer, movie_cast table movie_cast Cols: movie id dtype integer, person id dtype integer, character name dtype text, gender id dtype integer, cast order dtype integer, movie_keywords table movie_keywords Cols: movie id dtype integer, keyword id dtype integer, movie_company table movie_company Cols: movie id dtype integer, company id dtype integer,
movies_4
List down the IDs of the production companies that released the movies in 1916.
IDs of the production companies refers to company_id; movies in 1916 refers to release_date LIKE '1916%'
SELECT T2.company_id FROM movie AS T1 INNER JOIN movie_company AS T2 ON T1.movie_id = T2.movie_id WHERE CAST(STRFTIME('%Y', T1.release_date) AS INT) = 1916
database name:db_id movies_4 country table country Cols: country id dtype integer, country iso code dtype text, country name dtype text, department table department Cols: department id dtype integer, department name dtype text, gender table gender Cols: gender id dtype integer, gender dtype text, genre table genre Cols: genre id dtype integer, genre_name dtype text, keyword table keyword Cols: keyword id dtype integer, keyword name dtype text, language table language Cols: language id dtype integer, language code dtype text, language name dtype text, language_role table language_role Cols: role id dtype integer, language role dtype text, movie table movie Cols: movie id dtype integer, title dtype text, budget dtype integer, homepage dtype text, overview dtype text, popularity dtype real, release date dtype date, revenue dtype integer, runtime dtype integer, movie_status dtype text, tagline dtype text, vote average dtype real, vote count dtype integer, movie_genres table movie_genres Cols: movie id dtype integer, genre id dtype integer, movie_languages table movie_languages Cols: movie id dtype integer, language id dtype integer, language role id dtype integer, person table person Cols: person id dtype integer, person name dtype text, movie_crew table movie_crew Cols: movie id dtype integer, person id dtype integer, department id dtype integer, job dtype text, production_company table production_company Cols: company id dtype integer, company name dtype text, production_country table production_country Cols: mivie id dtype integer, country id dtype integer, movie_cast table movie_cast Cols: movie id dtype integer, person id dtype integer, character name dtype text, gender id dtype integer, cast order dtype integer, movie_keywords table movie_keywords Cols: movie id dtype integer, keyword id dtype integer, movie_company table movie_company Cols: movie id dtype integer, company id dtype integer,
movies_4
List down the movies produced by Lucasfilm.
movies refers to title; produced by Lucasfil refers to company_name = 'Lucasfilm'
SELECT T3.title FROM production_company AS T1 INNER JOIN movie_company AS T2 ON T1.company_id = T2.company_id INNER JOIN movie AS T3 ON T2.movie_id = T3.movie_id WHERE T1.company_name = 'Lucasfilm'
database name:db_id movies_4 country table country Cols: country id dtype integer, country iso code dtype text, country name dtype text, department table department Cols: department id dtype integer, department name dtype text, gender table gender Cols: gender id dtype integer, gender dtype text, genre table genre Cols: genre id dtype integer, genre_name dtype text, keyword table keyword Cols: keyword id dtype integer, keyword name dtype text, language table language Cols: language id dtype integer, language code dtype text, language name dtype text, language_role table language_role Cols: role id dtype integer, language role dtype text, movie table movie Cols: movie id dtype integer, title dtype text, budget dtype integer, homepage dtype text, overview dtype text, popularity dtype real, release date dtype date, revenue dtype integer, runtime dtype integer, movie_status dtype text, tagline dtype text, vote average dtype real, vote count dtype integer, movie_genres table movie_genres Cols: movie id dtype integer, genre id dtype integer, movie_languages table movie_languages Cols: movie id dtype integer, language id dtype integer, language role id dtype integer, person table person Cols: person id dtype integer, person name dtype text, movie_crew table movie_crew Cols: movie id dtype integer, person id dtype integer, department id dtype integer, job dtype text, production_company table production_company Cols: company id dtype integer, company name dtype text, production_country table production_country Cols: mivie id dtype integer, country id dtype integer, movie_cast table movie_cast Cols: movie id dtype integer, person id dtype integer, character name dtype text, gender id dtype integer, cast order dtype integer, movie_keywords table movie_keywords Cols: movie id dtype integer, keyword id dtype integer, movie_company table movie_company Cols: movie id dtype integer, company id dtype integer,
movies_4
Among Warner Bros. Pictures' movies, which title made the highest revenue?
Warner Bros. Pictures' movies refers to company_name = 'Warner Bros. Pictures'; highest revenue refers to max(revenue)
SELECT T3.title FROM production_company AS T1 INNER JOIN movie_company AS T2 ON T1.company_id = T2.company_id INNER JOIN movie AS T3 ON T2.movie_id = T3.movie_id WHERE T1.company_name = 'Warner Bros. Pictures' ORDER BY T3.revenue DESC LIMIT 1
database name:db_id movies_4 country table country Cols: country id dtype integer, country iso code dtype text, country name dtype text, department table department Cols: department id dtype integer, department name dtype text, gender table gender Cols: gender id dtype integer, gender dtype text, genre table genre Cols: genre id dtype integer, genre_name dtype text, keyword table keyword Cols: keyword id dtype integer, keyword name dtype text, language table language Cols: language id dtype integer, language code dtype text, language name dtype text, language_role table language_role Cols: role id dtype integer, language role dtype text, movie table movie Cols: movie id dtype integer, title dtype text, budget dtype integer, homepage dtype text, overview dtype text, popularity dtype real, release date dtype date, revenue dtype integer, runtime dtype integer, movie_status dtype text, tagline dtype text, vote average dtype real, vote count dtype integer, movie_genres table movie_genres Cols: movie id dtype integer, genre id dtype integer, movie_languages table movie_languages Cols: movie id dtype integer, language id dtype integer, language role id dtype integer, person table person Cols: person id dtype integer, person name dtype text, movie_crew table movie_crew Cols: movie id dtype integer, person id dtype integer, department id dtype integer, job dtype text, production_company table production_company Cols: company id dtype integer, company name dtype text, production_country table production_country Cols: mivie id dtype integer, country id dtype integer, movie_cast table movie_cast Cols: movie id dtype integer, person id dtype integer, character name dtype text, gender id dtype integer, cast order dtype integer, movie_keywords table movie_keywords Cols: movie id dtype integer, keyword id dtype integer, movie_company table movie_company Cols: movie id dtype integer, company id dtype integer,
movies_4
Write down the release date of the movies produced by Twentieth Century Fox Film Corporation.
produced by Twentieth Century Fox Film Corporation refers to company_name = 'Twentieth Century Fox Film Corporation'
SELECT T3.release_date FROM production_company AS T1 INNER JOIN movie_company AS T2 ON T1.company_id = T2.company_id INNER JOIN movie AS T3 ON T2.movie_id = T3.movie_id WHERE T1.company_name = 'Twentieth Century Fox Film Corporation'
database name:db_id movies_4 country table country Cols: country id dtype integer, country iso code dtype text, country name dtype text, department table department Cols: department id dtype integer, department name dtype text, gender table gender Cols: gender id dtype integer, gender dtype text, genre table genre Cols: genre id dtype integer, genre_name dtype text, keyword table keyword Cols: keyword id dtype integer, keyword name dtype text, language table language Cols: language id dtype integer, language code dtype text, language name dtype text, language_role table language_role Cols: role id dtype integer, language role dtype text, movie table movie Cols: movie id dtype integer, title dtype text, budget dtype integer, homepage dtype text, overview dtype text, popularity dtype real, release date dtype date, revenue dtype integer, runtime dtype integer, movie_status dtype text, tagline dtype text, vote average dtype real, vote count dtype integer, movie_genres table movie_genres Cols: movie id dtype integer, genre id dtype integer, movie_languages table movie_languages Cols: movie id dtype integer, language id dtype integer, language role id dtype integer, person table person Cols: person id dtype integer, person name dtype text, movie_crew table movie_crew Cols: movie id dtype integer, person id dtype integer, department id dtype integer, job dtype text, production_company table production_company Cols: company id dtype integer, company name dtype text, production_country table production_country Cols: mivie id dtype integer, country id dtype integer, movie_cast table movie_cast Cols: movie id dtype integer, person id dtype integer, character name dtype text, gender id dtype integer, cast order dtype integer, movie_keywords table movie_keywords Cols: movie id dtype integer, keyword id dtype integer, movie_company table movie_company Cols: movie id dtype integer, company id dtype integer,
movies_4
What is the language ID of the movie "Walk the Line"?
movie "Walk the Line" refers to title = 'Walk the Line'
SELECT T2.language_id FROM movie AS T1 INNER JOIN movie_languages AS T2 ON T1.movie_id = T2.movie_id WHERE T1.title = 'Walk the Line'
database name:db_id movies_4 country table country Cols: country id dtype integer, country iso code dtype text, country name dtype text, department table department Cols: department id dtype integer, department name dtype text, gender table gender Cols: gender id dtype integer, gender dtype text, genre table genre Cols: genre id dtype integer, genre_name dtype text, keyword table keyword Cols: keyword id dtype integer, keyword name dtype text, language table language Cols: language id dtype integer, language code dtype text, language name dtype text, language_role table language_role Cols: role id dtype integer, language role dtype text, movie table movie Cols: movie id dtype integer, title dtype text, budget dtype integer, homepage dtype text, overview dtype text, popularity dtype real, release date dtype date, revenue dtype integer, runtime dtype integer, movie_status dtype text, tagline dtype text, vote average dtype real, vote count dtype integer, movie_genres table movie_genres Cols: movie id dtype integer, genre id dtype integer, movie_languages table movie_languages Cols: movie id dtype integer, language id dtype integer, language role id dtype integer, person table person Cols: person id dtype integer, person name dtype text, movie_crew table movie_crew Cols: movie id dtype integer, person id dtype integer, department id dtype integer, job dtype text, production_company table production_company Cols: company id dtype integer, company name dtype text, production_country table production_country Cols: mivie id dtype integer, country id dtype integer, movie_cast table movie_cast Cols: movie id dtype integer, person id dtype integer, character name dtype text, gender id dtype integer, cast order dtype integer, movie_keywords table movie_keywords Cols: movie id dtype integer, keyword id dtype integer, movie_company table movie_company Cols: movie id dtype integer, company id dtype integer,
movies_4
Find out the language ID of the movie with the highest popularity.
highest popularity refers to max(popularity)
SELECT T2.language_id FROM movie AS T1 INNER JOIN movie_languages AS T2 ON T1.movie_id = T2.movie_id ORDER BY T1.popularity DESC LIMIT 1
database name:db_id movies_4 country table country Cols: country id dtype integer, country iso code dtype text, country name dtype text, department table department Cols: department id dtype integer, department name dtype text, gender table gender Cols: gender id dtype integer, gender dtype text, genre table genre Cols: genre id dtype integer, genre_name dtype text, keyword table keyword Cols: keyword id dtype integer, keyword name dtype text, language table language Cols: language id dtype integer, language code dtype text, language name dtype text, language_role table language_role Cols: role id dtype integer, language role dtype text, movie table movie Cols: movie id dtype integer, title dtype text, budget dtype integer, homepage dtype text, overview dtype text, popularity dtype real, release date dtype date, revenue dtype integer, runtime dtype integer, movie_status dtype text, tagline dtype text, vote average dtype real, vote count dtype integer, movie_genres table movie_genres Cols: movie id dtype integer, genre id dtype integer, movie_languages table movie_languages Cols: movie id dtype integer, language id dtype integer, language role id dtype integer, person table person Cols: person id dtype integer, person name dtype text, movie_crew table movie_crew Cols: movie id dtype integer, person id dtype integer, department id dtype integer, job dtype text, production_company table production_company Cols: company id dtype integer, company name dtype text, production_country table production_country Cols: mivie id dtype integer, country id dtype integer, movie_cast table movie_cast Cols: movie id dtype integer, person id dtype integer, character name dtype text, gender id dtype integer, cast order dtype integer, movie_keywords table movie_keywords Cols: movie id dtype integer, keyword id dtype integer, movie_company table movie_company Cols: movie id dtype integer, company id dtype integer,
movies_4
Tell the language of the movie "C'era una volta il West".
language refers to language_name; movie "C'era una volta il West" refers to title = 'C''era una volta il West'
SELECT T3.language_name FROM movie AS T1 INNER JOIN movie_languages AS T2 ON T1.movie_id = T2.movie_id INNER JOIN language AS T3 ON T2.language_id = T3.language_id WHERE T1.title LIKE 'C%era una volta il West'
database name:db_id movies_4 country table country Cols: country id dtype integer, country iso code dtype text, country name dtype text, department table department Cols: department id dtype integer, department name dtype text, gender table gender Cols: gender id dtype integer, gender dtype text, genre table genre Cols: genre id dtype integer, genre_name dtype text, keyword table keyword Cols: keyword id dtype integer, keyword name dtype text, language table language Cols: language id dtype integer, language code dtype text, language name dtype text, language_role table language_role Cols: role id dtype integer, language role dtype text, movie table movie Cols: movie id dtype integer, title dtype text, budget dtype integer, homepage dtype text, overview dtype text, popularity dtype real, release date dtype date, revenue dtype integer, runtime dtype integer, movie_status dtype text, tagline dtype text, vote average dtype real, vote count dtype integer, movie_genres table movie_genres Cols: movie id dtype integer, genre id dtype integer, movie_languages table movie_languages Cols: movie id dtype integer, language id dtype integer, language role id dtype integer, person table person Cols: person id dtype integer, person name dtype text, movie_crew table movie_crew Cols: movie id dtype integer, person id dtype integer, department id dtype integer, job dtype text, production_company table production_company Cols: company id dtype integer, company name dtype text, production_country table production_country Cols: mivie id dtype integer, country id dtype integer, movie_cast table movie_cast Cols: movie id dtype integer, person id dtype integer, character name dtype text, gender id dtype integer, cast order dtype integer, movie_keywords table movie_keywords Cols: movie id dtype integer, keyword id dtype integer, movie_company table movie_company Cols: movie id dtype integer, company id dtype integer,
movies_4
Are there any post-production movies in Nederlands?
post-production movies refers to movie_status = 'Post Production'; Nederlands refers to language_name = 'Nederlands';
SELECT DISTINCT CASE WHEN T1.movie_status = 'Post Production' THEN 'YES' ELSE 'NO' END AS YORN FROM movie AS T1 INNER JOIN movie_languages AS T2 ON T1.movie_id = T2.movie_id INNER JOIN language AS T3 ON T2.language_id = T3.language_id WHERE T3.language_name = 'Nederlands'
database name:db_id movies_4 country table country Cols: country id dtype integer, country iso code dtype text, country name dtype text, department table department Cols: department id dtype integer, department name dtype text, gender table gender Cols: gender id dtype integer, gender dtype text, genre table genre Cols: genre id dtype integer, genre_name dtype text, keyword table keyword Cols: keyword id dtype integer, keyword name dtype text, language table language Cols: language id dtype integer, language code dtype text, language name dtype text, language_role table language_role Cols: role id dtype integer, language role dtype text, movie table movie Cols: movie id dtype integer, title dtype text, budget dtype integer, homepage dtype text, overview dtype text, popularity dtype real, release date dtype date, revenue dtype integer, runtime dtype integer, movie_status dtype text, tagline dtype text, vote average dtype real, vote count dtype integer, movie_genres table movie_genres Cols: movie id dtype integer, genre id dtype integer, movie_languages table movie_languages Cols: movie id dtype integer, language id dtype integer, language role id dtype integer, person table person Cols: person id dtype integer, person name dtype text, movie_crew table movie_crew Cols: movie id dtype integer, person id dtype integer, department id dtype integer, job dtype text, production_company table production_company Cols: company id dtype integer, company name dtype text, production_country table production_country Cols: mivie id dtype integer, country id dtype integer, movie_cast table movie_cast Cols: movie id dtype integer, person id dtype integer, character name dtype text, gender id dtype integer, cast order dtype integer, movie_keywords table movie_keywords Cols: movie id dtype integer, keyword id dtype integer, movie_company table movie_company Cols: movie id dtype integer, company id dtype integer,
movies_4
List down the tagline of the Polski movies.
Polski movies refers to language_name = 'Polski'
SELECT DISTINCT T1.tagline FROM movie AS T1 INNER JOIN movie_languages AS T2 ON T1.movie_id = T2.movie_id INNER JOIN language AS T3 ON T2.language_id = T3.language_id WHERE T3.language_name = 'Polski'
database name:db_id movies_4 country table country Cols: country id dtype integer, country iso code dtype text, country name dtype text, department table department Cols: department id dtype integer, department name dtype text, gender table gender Cols: gender id dtype integer, gender dtype text, genre table genre Cols: genre id dtype integer, genre_name dtype text, keyword table keyword Cols: keyword id dtype integer, keyword name dtype text, language table language Cols: language id dtype integer, language code dtype text, language name dtype text, language_role table language_role Cols: role id dtype integer, language role dtype text, movie table movie Cols: movie id dtype integer, title dtype text, budget dtype integer, homepage dtype text, overview dtype text, popularity dtype real, release date dtype date, revenue dtype integer, runtime dtype integer, movie_status dtype text, tagline dtype text, vote average dtype real, vote count dtype integer, movie_genres table movie_genres Cols: movie id dtype integer, genre id dtype integer, movie_languages table movie_languages Cols: movie id dtype integer, language id dtype integer, language role id dtype integer, person table person Cols: person id dtype integer, person name dtype text, movie_crew table movie_crew Cols: movie id dtype integer, person id dtype integer, department id dtype integer, job dtype text, production_company table production_company Cols: company id dtype integer, company name dtype text, production_country table production_country Cols: mivie id dtype integer, country id dtype integer, movie_cast table movie_cast Cols: movie id dtype integer, person id dtype integer, character name dtype text, gender id dtype integer, cast order dtype integer, movie_keywords table movie_keywords Cols: movie id dtype integer, keyword id dtype integer, movie_company table movie_company Cols: movie id dtype integer, company id dtype integer,
movies_4
Provide the homepage of the Bahasa Indonesia movies.
Bahasa Indonesia movies refers to language_name = 'Bahasa indonesia'
SELECT DISTINCT T1.homepage FROM movie AS T1 INNER JOIN movie_languages AS T2 ON T1.movie_id = T2.movie_id INNER JOIN language AS T3 ON T2.language_id = T3.language_id WHERE T3.language_name = 'Bahasa indonesia'
database name:db_id movies_4 country table country Cols: country id dtype integer, country iso code dtype text, country name dtype text, department table department Cols: department id dtype integer, department name dtype text, gender table gender Cols: gender id dtype integer, gender dtype text, genre table genre Cols: genre id dtype integer, genre_name dtype text, keyword table keyword Cols: keyword id dtype integer, keyword name dtype text, language table language Cols: language id dtype integer, language code dtype text, language name dtype text, language_role table language_role Cols: role id dtype integer, language role dtype text, movie table movie Cols: movie id dtype integer, title dtype text, budget dtype integer, homepage dtype text, overview dtype text, popularity dtype real, release date dtype date, revenue dtype integer, runtime dtype integer, movie_status dtype text, tagline dtype text, vote average dtype real, vote count dtype integer, movie_genres table movie_genres Cols: movie id dtype integer, genre id dtype integer, movie_languages table movie_languages Cols: movie id dtype integer, language id dtype integer, language role id dtype integer, person table person Cols: person id dtype integer, person name dtype text, movie_crew table movie_crew Cols: movie id dtype integer, person id dtype integer, department id dtype integer, job dtype text, production_company table production_company Cols: company id dtype integer, company name dtype text, production_country table production_country Cols: mivie id dtype integer, country id dtype integer, movie_cast table movie_cast Cols: movie id dtype integer, person id dtype integer, character name dtype text, gender id dtype integer, cast order dtype integer, movie_keywords table movie_keywords Cols: movie id dtype integer, keyword id dtype integer, movie_company table movie_company Cols: movie id dtype integer, company id dtype integer,
movies_4
Work out the difference in revenues made between the English and Latin movies.
English refers to language_name = 'English'; Latin refers to language_name = 'Latin'; difference in revenues = subtract(sum(movie_id) when language_name = 'English', sum(movie_id) when language_name = 'Latin')
SELECT SUM(CASE WHEN T3.language_name = 'English' THEN T1.revenue ELSE 0 END) - SUM(CASE WHEN T3.language_name = 'Latin' THEN T1.revenue ELSE 0 END) AS DIFFERENCE FROM movie AS T1 INNER JOIN movie_languages AS T2 ON T1.movie_id = T2.movie_id INNER JOIN language AS T3 ON T2.language_id = T3.language_id
database name:db_id movies_4 country table country Cols: country id dtype integer, country iso code dtype text, country name dtype text, department table department Cols: department id dtype integer, department name dtype text, gender table gender Cols: gender id dtype integer, gender dtype text, genre table genre Cols: genre id dtype integer, genre_name dtype text, keyword table keyword Cols: keyword id dtype integer, keyword name dtype text, language table language Cols: language id dtype integer, language code dtype text, language name dtype text, language_role table language_role Cols: role id dtype integer, language role dtype text, movie table movie Cols: movie id dtype integer, title dtype text, budget dtype integer, homepage dtype text, overview dtype text, popularity dtype real, release date dtype date, revenue dtype integer, runtime dtype integer, movie_status dtype text, tagline dtype text, vote average dtype real, vote count dtype integer, movie_genres table movie_genres Cols: movie id dtype integer, genre id dtype integer, movie_languages table movie_languages Cols: movie id dtype integer, language id dtype integer, language role id dtype integer, person table person Cols: person id dtype integer, person name dtype text, movie_crew table movie_crew Cols: movie id dtype integer, person id dtype integer, department id dtype integer, job dtype text, production_company table production_company Cols: company id dtype integer, company name dtype text, production_country table production_country Cols: mivie id dtype integer, country id dtype integer, movie_cast table movie_cast Cols: movie id dtype integer, person id dtype integer, character name dtype text, gender id dtype integer, cast order dtype integer, movie_keywords table movie_keywords Cols: movie id dtype integer, keyword id dtype integer, movie_company table movie_company Cols: movie id dtype integer, company id dtype integer,
movies_4
Calculate the revenues made by Fantasy Films and Live Entertainment.
made by Fantasy Films refers to company_name = 'Fantasy Films'; Live Entertainment refers to company_name = 'Live Entertainment'
SELECT SUM(T3.revenue) FROM production_company AS T1 INNER JOIN movie_company AS T2 ON T1.company_id = T2.company_id INNER JOIN movie AS T3 ON T2.movie_id = T3.movie_id WHERE T1.company_name IN ('Fantasy Films', 'Live Entertainment')
database name:db_id movies_4 country table country Cols: country id dtype integer, country iso code dtype text, country name dtype text, department table department Cols: department id dtype integer, department name dtype text, gender table gender Cols: gender id dtype integer, gender dtype text, genre table genre Cols: genre id dtype integer, genre_name dtype text, keyword table keyword Cols: keyword id dtype integer, keyword name dtype text, language table language Cols: language id dtype integer, language code dtype text, language name dtype text, language_role table language_role Cols: role id dtype integer, language role dtype text, movie table movie Cols: movie id dtype integer, title dtype text, budget dtype integer, homepage dtype text, overview dtype text, popularity dtype real, release date dtype date, revenue dtype integer, runtime dtype integer, movie_status dtype text, tagline dtype text, vote average dtype real, vote count dtype integer, movie_genres table movie_genres Cols: movie id dtype integer, genre id dtype integer, movie_languages table movie_languages Cols: movie id dtype integer, language id dtype integer, language role id dtype integer, person table person Cols: person id dtype integer, person name dtype text, movie_crew table movie_crew Cols: movie id dtype integer, person id dtype integer, department id dtype integer, job dtype text, production_company table production_company Cols: company id dtype integer, company name dtype text, production_country table production_country Cols: mivie id dtype integer, country id dtype integer, movie_cast table movie_cast Cols: movie id dtype integer, person id dtype integer, character name dtype text, gender id dtype integer, cast order dtype integer, movie_keywords table movie_keywords Cols: movie id dtype integer, keyword id dtype integer, movie_company table movie_company Cols: movie id dtype integer, company id dtype integer,
movies_4
What is the average revenue made by Latin movies?
Latin movies refers to language_name = 'Latin'; average revenue = AVG(revenue)
SELECT AVG(T1.revenue) FROM movie AS T1 INNER JOIN movie_languages AS T2 ON T1.movie_id = T2.movie_id INNER JOIN language AS T3 ON T2.language_id = T3.language_id WHERE T3.language_name = 'Latin'
database name:db_id movies_4 country table country Cols: country id dtype integer, country iso code dtype text, country name dtype text, department table department Cols: department id dtype integer, department name dtype text, gender table gender Cols: gender id dtype integer, gender dtype text, genre table genre Cols: genre id dtype integer, genre_name dtype text, keyword table keyword Cols: keyword id dtype integer, keyword name dtype text, language table language Cols: language id dtype integer, language code dtype text, language name dtype text, language_role table language_role Cols: role id dtype integer, language role dtype text, movie table movie Cols: movie id dtype integer, title dtype text, budget dtype integer, homepage dtype text, overview dtype text, popularity dtype real, release date dtype date, revenue dtype integer, runtime dtype integer, movie_status dtype text, tagline dtype text, vote average dtype real, vote count dtype integer, movie_genres table movie_genres Cols: movie id dtype integer, genre id dtype integer, movie_languages table movie_languages Cols: movie id dtype integer, language id dtype integer, language role id dtype integer, person table person Cols: person id dtype integer, person name dtype text, movie_crew table movie_crew Cols: movie id dtype integer, person id dtype integer, department id dtype integer, job dtype text, production_company table production_company Cols: company id dtype integer, company name dtype text, production_country table production_country Cols: mivie id dtype integer, country id dtype integer, movie_cast table movie_cast Cols: movie id dtype integer, person id dtype integer, character name dtype text, gender id dtype integer, cast order dtype integer, movie_keywords table movie_keywords Cols: movie id dtype integer, keyword id dtype integer, movie_company table movie_company Cols: movie id dtype integer, company id dtype integer,
movies_4
What is the most common first name?
most common first name refers to max(count(person_name))
SELECT person_name FROM person GROUP BY person_name ORDER BY COUNT(person_name) DESC LIMIT 1
database name:db_id movies_4 country table country Cols: country id dtype integer, country iso code dtype text, country name dtype text, department table department Cols: department id dtype integer, department name dtype text, gender table gender Cols: gender id dtype integer, gender dtype text, genre table genre Cols: genre id dtype integer, genre_name dtype text, keyword table keyword Cols: keyword id dtype integer, keyword name dtype text, language table language Cols: language id dtype integer, language code dtype text, language name dtype text, language_role table language_role Cols: role id dtype integer, language role dtype text, movie table movie Cols: movie id dtype integer, title dtype text, budget dtype integer, homepage dtype text, overview dtype text, popularity dtype real, release date dtype date, revenue dtype integer, runtime dtype integer, movie_status dtype text, tagline dtype text, vote average dtype real, vote count dtype integer, movie_genres table movie_genres Cols: movie id dtype integer, genre id dtype integer, movie_languages table movie_languages Cols: movie id dtype integer, language id dtype integer, language role id dtype integer, person table person Cols: person id dtype integer, person name dtype text, movie_crew table movie_crew Cols: movie id dtype integer, person id dtype integer, department id dtype integer, job dtype text, production_company table production_company Cols: company id dtype integer, company name dtype text, production_country table production_country Cols: mivie id dtype integer, country id dtype integer, movie_cast table movie_cast Cols: movie id dtype integer, person id dtype integer, character name dtype text, gender id dtype integer, cast order dtype integer, movie_keywords table movie_keywords Cols: movie id dtype integer, keyword id dtype integer, movie_company table movie_company Cols: movie id dtype integer, company id dtype integer,
movies_4
What is the average number of crews for a movie?
average number of crews = divide(count(person_id), COUNT(movie_id))
SELECT CAST(SUM(CD) AS REAL) / COUNT(movie_id) FROM ( SELECT movie_id, COUNT(person_id) AS CD FROM movie_crew GROUP BY movie_id )
database name:db_id movies_4 country table country Cols: country id dtype integer, country iso code dtype text, country name dtype text, department table department Cols: department id dtype integer, department name dtype text, gender table gender Cols: gender id dtype integer, gender dtype text, genre table genre Cols: genre id dtype integer, genre_name dtype text, keyword table keyword Cols: keyword id dtype integer, keyword name dtype text, language table language Cols: language id dtype integer, language code dtype text, language name dtype text, language_role table language_role Cols: role id dtype integer, language role dtype text, movie table movie Cols: movie id dtype integer, title dtype text, budget dtype integer, homepage dtype text, overview dtype text, popularity dtype real, release date dtype date, revenue dtype integer, runtime dtype integer, movie_status dtype text, tagline dtype text, vote average dtype real, vote count dtype integer, movie_genres table movie_genres Cols: movie id dtype integer, genre id dtype integer, movie_languages table movie_languages Cols: movie id dtype integer, language id dtype integer, language role id dtype integer, person table person Cols: person id dtype integer, person name dtype text, movie_crew table movie_crew Cols: movie id dtype integer, person id dtype integer, department id dtype integer, job dtype text, production_company table production_company Cols: company id dtype integer, company name dtype text, production_country table production_country Cols: mivie id dtype integer, country id dtype integer, movie_cast table movie_cast Cols: movie id dtype integer, person id dtype integer, character name dtype text, gender id dtype integer, cast order dtype integer, movie_keywords table movie_keywords Cols: movie id dtype integer, keyword id dtype integer, movie_company table movie_company Cols: movie id dtype integer, company id dtype integer,
movies_4
List all the keywords with "christmas" in them.
keywords with "christmas" in them refers to keyword_name LIKE '%christmas%'
SELECT keyword_name FROM keyword WHERE keyword_name LIKE '%christmas%'
database name:db_id movies_4 country table country Cols: country id dtype integer, country iso code dtype text, country name dtype text, department table department Cols: department id dtype integer, department name dtype text, gender table gender Cols: gender id dtype integer, gender dtype text, genre table genre Cols: genre id dtype integer, genre_name dtype text, keyword table keyword Cols: keyword id dtype integer, keyword name dtype text, language table language Cols: language id dtype integer, language code dtype text, language name dtype text, language_role table language_role Cols: role id dtype integer, language role dtype text, movie table movie Cols: movie id dtype integer, title dtype text, budget dtype integer, homepage dtype text, overview dtype text, popularity dtype real, release date dtype date, revenue dtype integer, runtime dtype integer, movie_status dtype text, tagline dtype text, vote average dtype real, vote count dtype integer, movie_genres table movie_genres Cols: movie id dtype integer, genre id dtype integer, movie_languages table movie_languages Cols: movie id dtype integer, language id dtype integer, language role id dtype integer, person table person Cols: person id dtype integer, person name dtype text, movie_crew table movie_crew Cols: movie id dtype integer, person id dtype integer, department id dtype integer, job dtype text, production_company table production_company Cols: company id dtype integer, company name dtype text, production_country table production_country Cols: mivie id dtype integer, country id dtype integer, movie_cast table movie_cast Cols: movie id dtype integer, person id dtype integer, character name dtype text, gender id dtype integer, cast order dtype integer, movie_keywords table movie_keywords Cols: movie id dtype integer, keyword id dtype integer, movie_company table movie_company Cols: movie id dtype integer, company id dtype integer,
movies_4
What is the longest runtime of all movies?
longest runtime refers to max(runtime)
SELECT MAX(runtime) FROM movie
database name:db_id movies_4 country table country Cols: country id dtype integer, country iso code dtype text, country name dtype text, department table department Cols: department id dtype integer, department name dtype text, gender table gender Cols: gender id dtype integer, gender dtype text, genre table genre Cols: genre id dtype integer, genre_name dtype text, keyword table keyword Cols: keyword id dtype integer, keyword name dtype text, language table language Cols: language id dtype integer, language code dtype text, language name dtype text, language_role table language_role Cols: role id dtype integer, language role dtype text, movie table movie Cols: movie id dtype integer, title dtype text, budget dtype integer, homepage dtype text, overview dtype text, popularity dtype real, release date dtype date, revenue dtype integer, runtime dtype integer, movie_status dtype text, tagline dtype text, vote average dtype real, vote count dtype integer, movie_genres table movie_genres Cols: movie id dtype integer, genre id dtype integer, movie_languages table movie_languages Cols: movie id dtype integer, language id dtype integer, language role id dtype integer, person table person Cols: person id dtype integer, person name dtype text, movie_crew table movie_crew Cols: movie id dtype integer, person id dtype integer, department id dtype integer, job dtype text, production_company table production_company Cols: company id dtype integer, company name dtype text, production_country table production_country Cols: mivie id dtype integer, country id dtype integer, movie_cast table movie_cast Cols: movie id dtype integer, person id dtype integer, character name dtype text, gender id dtype integer, cast order dtype integer, movie_keywords table movie_keywords Cols: movie id dtype integer, keyword id dtype integer, movie_company table movie_company Cols: movie id dtype integer, company id dtype integer,
movies_4
What is the iso code of "Kyrgyz Republic"?
iso code refers to country_iso_code; "Kyrgyz Republic" refers to country_name = 'Kyrgyz Republic'
SELECT COUNTry_iso_code FROM COUNTry WHERE COUNTry_name = 'Kyrgyz Republic'
database name:db_id movies_4 country table country Cols: country id dtype integer, country iso code dtype text, country name dtype text, department table department Cols: department id dtype integer, department name dtype text, gender table gender Cols: gender id dtype integer, gender dtype text, genre table genre Cols: genre id dtype integer, genre_name dtype text, keyword table keyword Cols: keyword id dtype integer, keyword name dtype text, language table language Cols: language id dtype integer, language code dtype text, language name dtype text, language_role table language_role Cols: role id dtype integer, language role dtype text, movie table movie Cols: movie id dtype integer, title dtype text, budget dtype integer, homepage dtype text, overview dtype text, popularity dtype real, release date dtype date, revenue dtype integer, runtime dtype integer, movie_status dtype text, tagline dtype text, vote average dtype real, vote count dtype integer, movie_genres table movie_genres Cols: movie id dtype integer, genre id dtype integer, movie_languages table movie_languages Cols: movie id dtype integer, language id dtype integer, language role id dtype integer, person table person Cols: person id dtype integer, person name dtype text, movie_crew table movie_crew Cols: movie id dtype integer, person id dtype integer, department id dtype integer, job dtype text, production_company table production_company Cols: company id dtype integer, company name dtype text, production_country table production_country Cols: mivie id dtype integer, country id dtype integer, movie_cast table movie_cast Cols: movie id dtype integer, person id dtype integer, character name dtype text, gender id dtype integer, cast order dtype integer, movie_keywords table movie_keywords Cols: movie id dtype integer, keyword id dtype integer, movie_company table movie_company Cols: movie id dtype integer, company id dtype integer,
movies_4
Provide the overview for the movie "The Pacifier".
movie "The Pacifier" refers to title = 'The Pacifier'
SELECT overview FROM movie WHERE title = 'The Pacifier'
database name:db_id movies_4 country table country Cols: country id dtype integer, country iso code dtype text, country name dtype text, department table department Cols: department id dtype integer, department name dtype text, gender table gender Cols: gender id dtype integer, gender dtype text, genre table genre Cols: genre id dtype integer, genre_name dtype text, keyword table keyword Cols: keyword id dtype integer, keyword name dtype text, language table language Cols: language id dtype integer, language code dtype text, language name dtype text, language_role table language_role Cols: role id dtype integer, language role dtype text, movie table movie Cols: movie id dtype integer, title dtype text, budget dtype integer, homepage dtype text, overview dtype text, popularity dtype real, release date dtype date, revenue dtype integer, runtime dtype integer, movie_status dtype text, tagline dtype text, vote average dtype real, vote count dtype integer, movie_genres table movie_genres Cols: movie id dtype integer, genre id dtype integer, movie_languages table movie_languages Cols: movie id dtype integer, language id dtype integer, language role id dtype integer, person table person Cols: person id dtype integer, person name dtype text, movie_crew table movie_crew Cols: movie id dtype integer, person id dtype integer, department id dtype integer, job dtype text, production_company table production_company Cols: company id dtype integer, company name dtype text, production_country table production_country Cols: mivie id dtype integer, country id dtype integer, movie_cast table movie_cast Cols: movie id dtype integer, person id dtype integer, character name dtype text, gender id dtype integer, cast order dtype integer, movie_keywords table movie_keywords Cols: movie id dtype integer, keyword id dtype integer, movie_company table movie_company Cols: movie id dtype integer, company id dtype integer,
movies_4
How many movies were produced by "Eddie Murphy Productions"?
produced by "Eddie Murphy Productions" refers to company_name = 'Eddie Murphy Productions'
SELECT COUNT(T1.movie_id) FROM movie_company AS T1 INNER JOIN production_company AS T2 ON T1.company_id = T2.company_id WHERE T2.company_name = 'Eddie Murphy Productions'
database name:db_id movies_4 country table country Cols: country id dtype integer, country iso code dtype text, country name dtype text, department table department Cols: department id dtype integer, department name dtype text, gender table gender Cols: gender id dtype integer, gender dtype text, genre table genre Cols: genre id dtype integer, genre_name dtype text, keyword table keyword Cols: keyword id dtype integer, keyword name dtype text, language table language Cols: language id dtype integer, language code dtype text, language name dtype text, language_role table language_role Cols: role id dtype integer, language role dtype text, movie table movie Cols: movie id dtype integer, title dtype text, budget dtype integer, homepage dtype text, overview dtype text, popularity dtype real, release date dtype date, revenue dtype integer, runtime dtype integer, movie_status dtype text, tagline dtype text, vote average dtype real, vote count dtype integer, movie_genres table movie_genres Cols: movie id dtype integer, genre id dtype integer, movie_languages table movie_languages Cols: movie id dtype integer, language id dtype integer, language role id dtype integer, person table person Cols: person id dtype integer, person name dtype text, movie_crew table movie_crew Cols: movie id dtype integer, person id dtype integer, department id dtype integer, job dtype text, production_company table production_company Cols: company id dtype integer, company name dtype text, production_country table production_country Cols: mivie id dtype integer, country id dtype integer, movie_cast table movie_cast Cols: movie id dtype integer, person id dtype integer, character name dtype text, gender id dtype integer, cast order dtype integer, movie_keywords table movie_keywords Cols: movie id dtype integer, keyword id dtype integer, movie_company table movie_company Cols: movie id dtype integer, company id dtype integer,
movies_4
List all the actors who have played characters with "captain" in their names.
List all the actors refers to person_name; characters with "captain" in their names refers to character_name LIKE '%captain%';
SELECT DISTINCT T1.person_name FROM person AS T1 INNER JOIN movie_cast AS T2 ON T1.person_id = T2.person_id WHERE T2.character_name LIKE '%captain%'
database name:db_id movies_4 country table country Cols: country id dtype integer, country iso code dtype text, country name dtype text, department table department Cols: department id dtype integer, department name dtype text, gender table gender Cols: gender id dtype integer, gender dtype text, genre table genre Cols: genre id dtype integer, genre_name dtype text, keyword table keyword Cols: keyword id dtype integer, keyword name dtype text, language table language Cols: language id dtype integer, language code dtype text, language name dtype text, language_role table language_role Cols: role id dtype integer, language role dtype text, movie table movie Cols: movie id dtype integer, title dtype text, budget dtype integer, homepage dtype text, overview dtype text, popularity dtype real, release date dtype date, revenue dtype integer, runtime dtype integer, movie_status dtype text, tagline dtype text, vote average dtype real, vote count dtype integer, movie_genres table movie_genres Cols: movie id dtype integer, genre id dtype integer, movie_languages table movie_languages Cols: movie id dtype integer, language id dtype integer, language role id dtype integer, person table person Cols: person id dtype integer, person name dtype text, movie_crew table movie_crew Cols: movie id dtype integer, person id dtype integer, department id dtype integer, job dtype text, production_company table production_company Cols: company id dtype integer, company name dtype text, production_country table production_country Cols: mivie id dtype integer, country id dtype integer, movie_cast table movie_cast Cols: movie id dtype integer, person id dtype integer, character name dtype text, gender id dtype integer, cast order dtype integer, movie_keywords table movie_keywords Cols: movie id dtype integer, keyword id dtype integer, movie_company table movie_company Cols: movie id dtype integer, company id dtype integer,
movies_4
What is the most common keyword among all the movies released in 2006?
most common keyword refers to max(count(keyword_name)); movies released in 2006 refers to release_date LIKE '%2006%'
SELECT T3.keyword_name FROM movie AS T1 INNER JOIN movie_keywords AS T2 ON T1.movie_id = T2.movie_id INNER JOIN keyword AS T3 ON T2.keyword_id = T3.keyword_id WHERE T1.release_date LIKE '2006%' GROUP BY T3.keyword_name ORDER BY COUNT(T3.keyword_name) DESC LIMIT 1
database name:db_id movies_4 country table country Cols: country id dtype integer, country iso code dtype text, country name dtype text, department table department Cols: department id dtype integer, department name dtype text, gender table gender Cols: gender id dtype integer, gender dtype text, genre table genre Cols: genre id dtype integer, genre_name dtype text, keyword table keyword Cols: keyword id dtype integer, keyword name dtype text, language table language Cols: language id dtype integer, language code dtype text, language name dtype text, language_role table language_role Cols: role id dtype integer, language role dtype text, movie table movie Cols: movie id dtype integer, title dtype text, budget dtype integer, homepage dtype text, overview dtype text, popularity dtype real, release date dtype date, revenue dtype integer, runtime dtype integer, movie_status dtype text, tagline dtype text, vote average dtype real, vote count dtype integer, movie_genres table movie_genres Cols: movie id dtype integer, genre id dtype integer, movie_languages table movie_languages Cols: movie id dtype integer, language id dtype integer, language role id dtype integer, person table person Cols: person id dtype integer, person name dtype text, movie_crew table movie_crew Cols: movie id dtype integer, person id dtype integer, department id dtype integer, job dtype text, production_company table production_company Cols: company id dtype integer, company name dtype text, production_country table production_country Cols: mivie id dtype integer, country id dtype integer, movie_cast table movie_cast Cols: movie id dtype integer, person id dtype integer, character name dtype text, gender id dtype integer, cast order dtype integer, movie_keywords table movie_keywords Cols: movie id dtype integer, keyword id dtype integer, movie_company table movie_company Cols: movie id dtype integer, company id dtype integer,
movies_4
How many movies have "vi" as their language code?
"vi" as their language code refers to language_code = 'vi'
SELECT COUNT(T1.movie_id) FROM movie_languages AS T1 INNER JOIN language AS T2 ON T1.language_id = T2.language_id WHERE T2.language_code = 'vi'
database name:db_id movies_4 country table country Cols: country id dtype integer, country iso code dtype text, country name dtype text, department table department Cols: department id dtype integer, department name dtype text, gender table gender Cols: gender id dtype integer, gender dtype text, genre table genre Cols: genre id dtype integer, genre_name dtype text, keyword table keyword Cols: keyword id dtype integer, keyword name dtype text, language table language Cols: language id dtype integer, language code dtype text, language name dtype text, language_role table language_role Cols: role id dtype integer, language role dtype text, movie table movie Cols: movie id dtype integer, title dtype text, budget dtype integer, homepage dtype text, overview dtype text, popularity dtype real, release date dtype date, revenue dtype integer, runtime dtype integer, movie_status dtype text, tagline dtype text, vote average dtype real, vote count dtype integer, movie_genres table movie_genres Cols: movie id dtype integer, genre id dtype integer, movie_languages table movie_languages Cols: movie id dtype integer, language id dtype integer, language role id dtype integer, person table person Cols: person id dtype integer, person name dtype text, movie_crew table movie_crew Cols: movie id dtype integer, person id dtype integer, department id dtype integer, job dtype text, production_company table production_company Cols: company id dtype integer, company name dtype text, production_country table production_country Cols: mivie id dtype integer, country id dtype integer, movie_cast table movie_cast Cols: movie id dtype integer, person id dtype integer, character name dtype text, gender id dtype integer, cast order dtype integer, movie_keywords table movie_keywords Cols: movie id dtype integer, keyword id dtype integer, movie_company table movie_company Cols: movie id dtype integer, company id dtype integer,
movies_4
What is the third least common genre?
least common genre refers to min(count(genre_name))
SELECT T2.genre_name FROM movie_genres AS T1 INNER JOIN genre AS T2 ON T1.genre_id = T2.genre_id GROUP BY T2.genre_id ORDER BY COUNT(T1.movie_id) LIMIT 2, 1
database name:db_id movies_4 country table country Cols: country id dtype integer, country iso code dtype text, country name dtype text, department table department Cols: department id dtype integer, department name dtype text, gender table gender Cols: gender id dtype integer, gender dtype text, genre table genre Cols: genre id dtype integer, genre_name dtype text, keyword table keyword Cols: keyword id dtype integer, keyword name dtype text, language table language Cols: language id dtype integer, language code dtype text, language name dtype text, language_role table language_role Cols: role id dtype integer, language role dtype text, movie table movie Cols: movie id dtype integer, title dtype text, budget dtype integer, homepage dtype text, overview dtype text, popularity dtype real, release date dtype date, revenue dtype integer, runtime dtype integer, movie_status dtype text, tagline dtype text, vote average dtype real, vote count dtype integer, movie_genres table movie_genres Cols: movie id dtype integer, genre id dtype integer, movie_languages table movie_languages Cols: movie id dtype integer, language id dtype integer, language role id dtype integer, person table person Cols: person id dtype integer, person name dtype text, movie_crew table movie_crew Cols: movie id dtype integer, person id dtype integer, department id dtype integer, job dtype text, production_company table production_company Cols: company id dtype integer, company name dtype text, production_country table production_country Cols: mivie id dtype integer, country id dtype integer, movie_cast table movie_cast Cols: movie id dtype integer, person id dtype integer, character name dtype text, gender id dtype integer, cast order dtype integer, movie_keywords table movie_keywords Cols: movie id dtype integer, keyword id dtype integer, movie_company table movie_company Cols: movie id dtype integer, company id dtype integer,
movies_4
What is the original language of the movie with the tagline "An offer you can't refuse."?
language refers to language_name; original language refers to language_role = 'Original'
SELECT T3.language_name FROM movie AS T1 INNER JOIN movie_languages AS T2 ON T1.movie_id = T2.movie_id INNER JOIN language AS T3 ON T2.language_id = T3.language_id INNER JOIN language_role AS T4 ON T2.language_role_id = T4.role_id WHERE T4.language_role = 'Original' AND T1.tagline LIKE 'An offer you can%t refuse.'
database name:db_id movies_4 country table country Cols: country id dtype integer, country iso code dtype text, country name dtype text, department table department Cols: department id dtype integer, department name dtype text, gender table gender Cols: gender id dtype integer, gender dtype text, genre table genre Cols: genre id dtype integer, genre_name dtype text, keyword table keyword Cols: keyword id dtype integer, keyword name dtype text, language table language Cols: language id dtype integer, language code dtype text, language name dtype text, language_role table language_role Cols: role id dtype integer, language role dtype text, movie table movie Cols: movie id dtype integer, title dtype text, budget dtype integer, homepage dtype text, overview dtype text, popularity dtype real, release date dtype date, revenue dtype integer, runtime dtype integer, movie_status dtype text, tagline dtype text, vote average dtype real, vote count dtype integer, movie_genres table movie_genres Cols: movie id dtype integer, genre id dtype integer, movie_languages table movie_languages Cols: movie id dtype integer, language id dtype integer, language role id dtype integer, person table person Cols: person id dtype integer, person name dtype text, movie_crew table movie_crew Cols: movie id dtype integer, person id dtype integer, department id dtype integer, job dtype text, production_company table production_company Cols: company id dtype integer, company name dtype text, production_country table production_country Cols: mivie id dtype integer, country id dtype integer, movie_cast table movie_cast Cols: movie id dtype integer, person id dtype integer, character name dtype text, gender id dtype integer, cast order dtype integer, movie_keywords table movie_keywords Cols: movie id dtype integer, keyword id dtype integer, movie_company table movie_company Cols: movie id dtype integer, company id dtype integer,
movies_4
Provide the average revenue of all the French movies.
French movies refers to country_name = 'France'; average revenue = AVG(revenue)
SELECT AVG(T1.revenue) FROM movie AS T1 INNER JOIN production_COUNTry AS T2 ON T1.movie_id = T2.movie_id INNER JOIN COUNTry AS T3 ON T2.COUNTry_id = T3.COUNTry_id WHERE T3.COUNTry_name = 'France'
database name:db_id movies_4 country table country Cols: country id dtype integer, country iso code dtype text, country name dtype text, department table department Cols: department id dtype integer, department name dtype text, gender table gender Cols: gender id dtype integer, gender dtype text, genre table genre Cols: genre id dtype integer, genre_name dtype text, keyword table keyword Cols: keyword id dtype integer, keyword name dtype text, language table language Cols: language id dtype integer, language code dtype text, language name dtype text, language_role table language_role Cols: role id dtype integer, language role dtype text, movie table movie Cols: movie id dtype integer, title dtype text, budget dtype integer, homepage dtype text, overview dtype text, popularity dtype real, release date dtype date, revenue dtype integer, runtime dtype integer, movie_status dtype text, tagline dtype text, vote average dtype real, vote count dtype integer, movie_genres table movie_genres Cols: movie id dtype integer, genre id dtype integer, movie_languages table movie_languages Cols: movie id dtype integer, language id dtype integer, language role id dtype integer, person table person Cols: person id dtype integer, person name dtype text, movie_crew table movie_crew Cols: movie id dtype integer, person id dtype integer, department id dtype integer, job dtype text, production_company table production_company Cols: company id dtype integer, company name dtype text, production_country table production_country Cols: mivie id dtype integer, country id dtype integer, movie_cast table movie_cast Cols: movie id dtype integer, person id dtype integer, character name dtype text, gender id dtype integer, cast order dtype integer, movie_keywords table movie_keywords Cols: movie id dtype integer, keyword id dtype integer, movie_company table movie_company Cols: movie id dtype integer, company id dtype integer,
movies_4
List all the unspecified gender characters.
characters refers to character_name; gender = 'Unspecified'
SELECT T1.character_name FROM movie_cast AS T1 INNER JOIN gender AS T2 ON T1.gender_id = T2.gender_id WHERE T2.gender = 'Unspecified'
database name:db_id movies_4 country table country Cols: country id dtype integer, country iso code dtype text, country name dtype text, department table department Cols: department id dtype integer, department name dtype text, gender table gender Cols: gender id dtype integer, gender dtype text, genre table genre Cols: genre id dtype integer, genre_name dtype text, keyword table keyword Cols: keyword id dtype integer, keyword name dtype text, language table language Cols: language id dtype integer, language code dtype text, language name dtype text, language_role table language_role Cols: role id dtype integer, language role dtype text, movie table movie Cols: movie id dtype integer, title dtype text, budget dtype integer, homepage dtype text, overview dtype text, popularity dtype real, release date dtype date, revenue dtype integer, runtime dtype integer, movie_status dtype text, tagline dtype text, vote average dtype real, vote count dtype integer, movie_genres table movie_genres Cols: movie id dtype integer, genre id dtype integer, movie_languages table movie_languages Cols: movie id dtype integer, language id dtype integer, language role id dtype integer, person table person Cols: person id dtype integer, person name dtype text, movie_crew table movie_crew Cols: movie id dtype integer, person id dtype integer, department id dtype integer, job dtype text, production_company table production_company Cols: company id dtype integer, company name dtype text, production_country table production_country Cols: mivie id dtype integer, country id dtype integer, movie_cast table movie_cast Cols: movie id dtype integer, person id dtype integer, character name dtype text, gender id dtype integer, cast order dtype integer, movie_keywords table movie_keywords Cols: movie id dtype integer, keyword id dtype integer, movie_company table movie_company Cols: movie id dtype integer, company id dtype integer,
movies_4
What are the top 5 most popular movie directors?
directors refers to job = 'Director'; most popular refers to max(popularity)
SELECT T3.person_name FROM movie AS T1 INNER JOIN movie_crew AS T2 ON T1.movie_id = T2.movie_id INNER JOIN person AS T3 ON T2.person_id = T3.person_id WHERE T2.job = 'Director' ORDER BY T1.popularity DESC LIMIT 5
database name:db_id movies_4 country table country Cols: country id dtype integer, country iso code dtype text, country name dtype text, department table department Cols: department id dtype integer, department name dtype text, gender table gender Cols: gender id dtype integer, gender dtype text, genre table genre Cols: genre id dtype integer, genre_name dtype text, keyword table keyword Cols: keyword id dtype integer, keyword name dtype text, language table language Cols: language id dtype integer, language code dtype text, language name dtype text, language_role table language_role Cols: role id dtype integer, language role dtype text, movie table movie Cols: movie id dtype integer, title dtype text, budget dtype integer, homepage dtype text, overview dtype text, popularity dtype real, release date dtype date, revenue dtype integer, runtime dtype integer, movie_status dtype text, tagline dtype text, vote average dtype real, vote count dtype integer, movie_genres table movie_genres Cols: movie id dtype integer, genre id dtype integer, movie_languages table movie_languages Cols: movie id dtype integer, language id dtype integer, language role id dtype integer, person table person Cols: person id dtype integer, person name dtype text, movie_crew table movie_crew Cols: movie id dtype integer, person id dtype integer, department id dtype integer, job dtype text, production_company table production_company Cols: company id dtype integer, company name dtype text, production_country table production_country Cols: mivie id dtype integer, country id dtype integer, movie_cast table movie_cast Cols: movie id dtype integer, person id dtype integer, character name dtype text, gender id dtype integer, cast order dtype integer, movie_keywords table movie_keywords Cols: movie id dtype integer, keyword id dtype integer, movie_company table movie_company Cols: movie id dtype integer, company id dtype integer,
movies_4
List the film with the highest budget in each genre.
highest budget refers to max(budget); each genre refers to genre_name; film also means movie; list the film refers to title of movie
SELECT T3.genre_name, MAX(T1.budget) FROM movie AS T1 INNER JOIN movie_genres AS T2 ON T1.movie_id = T2.movie_id INNER JOIN genre AS T3 ON T2.genre_id = T3.genre_id GROUP BY T3.genre_name
database name:db_id movies_4 country table country Cols: country id dtype integer, country iso code dtype text, country name dtype text, department table department Cols: department id dtype integer, department name dtype text, gender table gender Cols: gender id dtype integer, gender dtype text, genre table genre Cols: genre id dtype integer, genre_name dtype text, keyword table keyword Cols: keyword id dtype integer, keyword name dtype text, language table language Cols: language id dtype integer, language code dtype text, language name dtype text, language_role table language_role Cols: role id dtype integer, language role dtype text, movie table movie Cols: movie id dtype integer, title dtype text, budget dtype integer, homepage dtype text, overview dtype text, popularity dtype real, release date dtype date, revenue dtype integer, runtime dtype integer, movie_status dtype text, tagline dtype text, vote average dtype real, vote count dtype integer, movie_genres table movie_genres Cols: movie id dtype integer, genre id dtype integer, movie_languages table movie_languages Cols: movie id dtype integer, language id dtype integer, language role id dtype integer, person table person Cols: person id dtype integer, person name dtype text, movie_crew table movie_crew Cols: movie id dtype integer, person id dtype integer, department id dtype integer, job dtype text, production_company table production_company Cols: company id dtype integer, company name dtype text, production_country table production_country Cols: mivie id dtype integer, country id dtype integer, movie_cast table movie_cast Cols: movie id dtype integer, person id dtype integer, character name dtype text, gender id dtype integer, cast order dtype integer, movie_keywords table movie_keywords Cols: movie id dtype integer, keyword id dtype integer, movie_company table movie_company Cols: movie id dtype integer, company id dtype integer,
movies_4
What is the title of the movie with the most keywords?
most keywords refers to max(count(keyword_id))
SELECT T1.title FROM movie AS T1 INNER JOIN movie_keywords AS T2 ON T1.movie_id = T2.movie_id GROUP BY T1.title ORDER BY COUNT(T2.keyword_id) DESC LIMIT 1
database name:db_id movies_4 country table country Cols: country id dtype integer, country iso code dtype text, country name dtype text, department table department Cols: department id dtype integer, department name dtype text, gender table gender Cols: gender id dtype integer, gender dtype text, genre table genre Cols: genre id dtype integer, genre_name dtype text, keyword table keyword Cols: keyword id dtype integer, keyword name dtype text, language table language Cols: language id dtype integer, language code dtype text, language name dtype text, language_role table language_role Cols: role id dtype integer, language role dtype text, movie table movie Cols: movie id dtype integer, title dtype text, budget dtype integer, homepage dtype text, overview dtype text, popularity dtype real, release date dtype date, revenue dtype integer, runtime dtype integer, movie_status dtype text, tagline dtype text, vote average dtype real, vote count dtype integer, movie_genres table movie_genres Cols: movie id dtype integer, genre id dtype integer, movie_languages table movie_languages Cols: movie id dtype integer, language id dtype integer, language role id dtype integer, person table person Cols: person id dtype integer, person name dtype text, movie_crew table movie_crew Cols: movie id dtype integer, person id dtype integer, department id dtype integer, job dtype text, production_company table production_company Cols: company id dtype integer, company name dtype text, production_country table production_country Cols: mivie id dtype integer, country id dtype integer, movie_cast table movie_cast Cols: movie id dtype integer, person id dtype integer, character name dtype text, gender id dtype integer, cast order dtype integer, movie_keywords table movie_keywords Cols: movie id dtype integer, keyword id dtype integer, movie_company table movie_company Cols: movie id dtype integer, company id dtype integer,
movies_4
Which department has the most people?
department refers to department_name; most people refers to max(count(department_id))
SELECT T1.department_name FROM department AS T1 INNER JOIN movie_crew AS T2 ON T1.department_id = T2.department_id GROUP BY T1.department_id ORDER BY COUNT(T2.department_id) DESC LIMIT 1
database name:db_id movies_4 country table country Cols: country id dtype integer, country iso code dtype text, country name dtype text, department table department Cols: department id dtype integer, department name dtype text, gender table gender Cols: gender id dtype integer, gender dtype text, genre table genre Cols: genre id dtype integer, genre_name dtype text, keyword table keyword Cols: keyword id dtype integer, keyword name dtype text, language table language Cols: language id dtype integer, language code dtype text, language name dtype text, language_role table language_role Cols: role id dtype integer, language role dtype text, movie table movie Cols: movie id dtype integer, title dtype text, budget dtype integer, homepage dtype text, overview dtype text, popularity dtype real, release date dtype date, revenue dtype integer, runtime dtype integer, movie_status dtype text, tagline dtype text, vote average dtype real, vote count dtype integer, movie_genres table movie_genres Cols: movie id dtype integer, genre id dtype integer, movie_languages table movie_languages Cols: movie id dtype integer, language id dtype integer, language role id dtype integer, person table person Cols: person id dtype integer, person name dtype text, movie_crew table movie_crew Cols: movie id dtype integer, person id dtype integer, department id dtype integer, job dtype text, production_company table production_company Cols: company id dtype integer, company name dtype text, production_country table production_country Cols: mivie id dtype integer, country id dtype integer, movie_cast table movie_cast Cols: movie id dtype integer, person id dtype integer, character name dtype text, gender id dtype integer, cast order dtype integer, movie_keywords table movie_keywords Cols: movie id dtype integer, keyword id dtype integer, movie_company table movie_company Cols: movie id dtype integer, company id dtype integer,
movies_4
What percentage of films are made in the US?
films' and 'movies' are synonyms; made in the US refers to country_iso_code = 'US'; percentage = divide(sum(country_id) when country_iso_code = 'US', count(country_id)) * 100 as percentage
SELECT CAST(COUNT(CASE WHEN T3.COUNTry_iso_code = 'US' THEN T1.movie_id ELSE NULL END) AS REAL) * 100 / COUNT(T1.movie_id) FROM movie AS T1 INNER JOIN production_COUNTry AS T2 ON T1.movie_id = T2.movie_id INNER JOIN COUNTry AS T3 ON T2.COUNTry_id = T3.COUNTry_id
database name:db_id movies_4 country table country Cols: country id dtype integer, country iso code dtype text, country name dtype text, department table department Cols: department id dtype integer, department name dtype text, gender table gender Cols: gender id dtype integer, gender dtype text, genre table genre Cols: genre id dtype integer, genre_name dtype text, keyword table keyword Cols: keyword id dtype integer, keyword name dtype text, language table language Cols: language id dtype integer, language code dtype text, language name dtype text, language_role table language_role Cols: role id dtype integer, language role dtype text, movie table movie Cols: movie id dtype integer, title dtype text, budget dtype integer, homepage dtype text, overview dtype text, popularity dtype real, release date dtype date, revenue dtype integer, runtime dtype integer, movie_status dtype text, tagline dtype text, vote average dtype real, vote count dtype integer, movie_genres table movie_genres Cols: movie id dtype integer, genre id dtype integer, movie_languages table movie_languages Cols: movie id dtype integer, language id dtype integer, language role id dtype integer, person table person Cols: person id dtype integer, person name dtype text, movie_crew table movie_crew Cols: movie id dtype integer, person id dtype integer, department id dtype integer, job dtype text, production_company table production_company Cols: company id dtype integer, company name dtype text, production_country table production_country Cols: mivie id dtype integer, country id dtype integer, movie_cast table movie_cast Cols: movie id dtype integer, person id dtype integer, character name dtype text, gender id dtype integer, cast order dtype integer, movie_keywords table movie_keywords Cols: movie id dtype integer, keyword id dtype integer, movie_company table movie_company Cols: movie id dtype integer, company id dtype integer,
movies_4
What is the average ratio between female and male actors in a movie?
female refers to gender = 'Female';male refers to gender = 'Male'; average ratio = divide(divide(sum(gender_id) when gender = 'Female', sum(gender_id) when gender = 'Male'), count(movie_id)) as percentage
SELECT CAST(COUNT(CASE WHEN T2.gender = 'Female' THEN T1.person_id ELSE NULL END) AS REAL) / COUNT(CASE WHEN T2.gender = 'Male' THEN T1.person_id ELSE NULL END) FROM movie_cast AS T1 INNER JOIN gender AS T2 ON T1.gender_id = T2.gender_id
database name:db_id movies_4 country table country Cols: country id dtype integer, country iso code dtype text, country name dtype text, department table department Cols: department id dtype integer, department name dtype text, gender table gender Cols: gender id dtype integer, gender dtype text, genre table genre Cols: genre id dtype integer, genre_name dtype text, keyword table keyword Cols: keyword id dtype integer, keyword name dtype text, language table language Cols: language id dtype integer, language code dtype text, language name dtype text, language_role table language_role Cols: role id dtype integer, language role dtype text, movie table movie Cols: movie id dtype integer, title dtype text, budget dtype integer, homepage dtype text, overview dtype text, popularity dtype real, release date dtype date, revenue dtype integer, runtime dtype integer, movie_status dtype text, tagline dtype text, vote average dtype real, vote count dtype integer, movie_genres table movie_genres Cols: movie id dtype integer, genre id dtype integer, movie_languages table movie_languages Cols: movie id dtype integer, language id dtype integer, language role id dtype integer, person table person Cols: person id dtype integer, person name dtype text, movie_crew table movie_crew Cols: movie id dtype integer, person id dtype integer, department id dtype integer, job dtype text, production_company table production_company Cols: company id dtype integer, company name dtype text, production_country table production_country Cols: mivie id dtype integer, country id dtype integer, movie_cast table movie_cast Cols: movie id dtype integer, person id dtype integer, character name dtype text, gender id dtype integer, cast order dtype integer, movie_keywords table movie_keywords Cols: movie id dtype integer, keyword id dtype integer, movie_company table movie_company Cols: movie id dtype integer, company id dtype integer,
movies_4
List the movies released in 1945.
List the movies refers to title; released in 1945 refers to release_date LIKE '1945%'
SELECT title FROM movie WHERE CAST(STRFTIME('%Y', release_date) AS INT) = 1945
database name:db_id movies_4 country table country Cols: country id dtype integer, country iso code dtype text, country name dtype text, department table department Cols: department id dtype integer, department name dtype text, gender table gender Cols: gender id dtype integer, gender dtype text, genre table genre Cols: genre id dtype integer, genre_name dtype text, keyword table keyword Cols: keyword id dtype integer, keyword name dtype text, language table language Cols: language id dtype integer, language code dtype text, language name dtype text, language_role table language_role Cols: role id dtype integer, language role dtype text, movie table movie Cols: movie id dtype integer, title dtype text, budget dtype integer, homepage dtype text, overview dtype text, popularity dtype real, release date dtype date, revenue dtype integer, runtime dtype integer, movie_status dtype text, tagline dtype text, vote average dtype real, vote count dtype integer, movie_genres table movie_genres Cols: movie id dtype integer, genre id dtype integer, movie_languages table movie_languages Cols: movie id dtype integer, language id dtype integer, language role id dtype integer, person table person Cols: person id dtype integer, person name dtype text, movie_crew table movie_crew Cols: movie id dtype integer, person id dtype integer, department id dtype integer, job dtype text, production_company table production_company Cols: company id dtype integer, company name dtype text, production_country table production_country Cols: mivie id dtype integer, country id dtype integer, movie_cast table movie_cast Cols: movie id dtype integer, person id dtype integer, character name dtype text, gender id dtype integer, cast order dtype integer, movie_keywords table movie_keywords Cols: movie id dtype integer, keyword id dtype integer, movie_company table movie_company Cols: movie id dtype integer, company id dtype integer,
movies_4
Provide the ID and ISO code of Belgium.
ID refers to country_id; ISO code refers to country_iso_code; Belgium refers to country_name = 'Belgium'
SELECT COUNTry_id, COUNTry_iso_code FROM COUNTry WHERE COUNTry_name = 'Belgium'
database name:db_id movies_4 country table country Cols: country id dtype integer, country iso code dtype text, country name dtype text, department table department Cols: department id dtype integer, department name dtype text, gender table gender Cols: gender id dtype integer, gender dtype text, genre table genre Cols: genre id dtype integer, genre_name dtype text, keyword table keyword Cols: keyword id dtype integer, keyword name dtype text, language table language Cols: language id dtype integer, language code dtype text, language name dtype text, language_role table language_role Cols: role id dtype integer, language role dtype text, movie table movie Cols: movie id dtype integer, title dtype text, budget dtype integer, homepage dtype text, overview dtype text, popularity dtype real, release date dtype date, revenue dtype integer, runtime dtype integer, movie_status dtype text, tagline dtype text, vote average dtype real, vote count dtype integer, movie_genres table movie_genres Cols: movie id dtype integer, genre id dtype integer, movie_languages table movie_languages Cols: movie id dtype integer, language id dtype integer, language role id dtype integer, person table person Cols: person id dtype integer, person name dtype text, movie_crew table movie_crew Cols: movie id dtype integer, person id dtype integer, department id dtype integer, job dtype text, production_company table production_company Cols: company id dtype integer, company name dtype text, production_country table production_country Cols: mivie id dtype integer, country id dtype integer, movie_cast table movie_cast Cols: movie id dtype integer, person id dtype integer, character name dtype text, gender id dtype integer, cast order dtype integer, movie_keywords table movie_keywords Cols: movie id dtype integer, keyword id dtype integer, movie_company table movie_company Cols: movie id dtype integer, company id dtype integer,
movies_4
List the character names played by Catherine Deneuve.
null
SELECT T2.character_name FROM person AS T1 INNER JOIN movie_cast AS T2 ON T1.person_id = T2.person_id WHERE T1.person_name = 'Catherine Deneuve'
database name:db_id movies_4 country table country Cols: country id dtype integer, country iso code dtype text, country name dtype text, department table department Cols: department id dtype integer, department name dtype text, gender table gender Cols: gender id dtype integer, gender dtype text, genre table genre Cols: genre id dtype integer, genre_name dtype text, keyword table keyword Cols: keyword id dtype integer, keyword name dtype text, language table language Cols: language id dtype integer, language code dtype text, language name dtype text, language_role table language_role Cols: role id dtype integer, language role dtype text, movie table movie Cols: movie id dtype integer, title dtype text, budget dtype integer, homepage dtype text, overview dtype text, popularity dtype real, release date dtype date, revenue dtype integer, runtime dtype integer, movie_status dtype text, tagline dtype text, vote average dtype real, vote count dtype integer, movie_genres table movie_genres Cols: movie id dtype integer, genre id dtype integer, movie_languages table movie_languages Cols: movie id dtype integer, language id dtype integer, language role id dtype integer, person table person Cols: person id dtype integer, person name dtype text, movie_crew table movie_crew Cols: movie id dtype integer, person id dtype integer, department id dtype integer, job dtype text, production_company table production_company Cols: company id dtype integer, company name dtype text, production_country table production_country Cols: mivie id dtype integer, country id dtype integer, movie_cast table movie_cast Cols: movie id dtype integer, person id dtype integer, character name dtype text, gender id dtype integer, cast order dtype integer, movie_keywords table movie_keywords Cols: movie id dtype integer, keyword id dtype integer, movie_company table movie_company Cols: movie id dtype integer, company id dtype integer,
movies_4
List the movies in the Somali language.
List the movies refers to title; Somali language refers to language_name = 'Somali'
SELECT T1.title FROM movie AS T1 INNER JOIN movie_languages AS T2 ON T1.movie_id = T2.movie_id INNER JOIN language AS T3 ON T2.language_id = T3.language_id WHERE T3.language_name = 'Somali'
database name:db_id movies_4 country table country Cols: country id dtype integer, country iso code dtype text, country name dtype text, department table department Cols: department id dtype integer, department name dtype text, gender table gender Cols: gender id dtype integer, gender dtype text, genre table genre Cols: genre id dtype integer, genre_name dtype text, keyword table keyword Cols: keyword id dtype integer, keyword name dtype text, language table language Cols: language id dtype integer, language code dtype text, language name dtype text, language_role table language_role Cols: role id dtype integer, language role dtype text, movie table movie Cols: movie id dtype integer, title dtype text, budget dtype integer, homepage dtype text, overview dtype text, popularity dtype real, release date dtype date, revenue dtype integer, runtime dtype integer, movie_status dtype text, tagline dtype text, vote average dtype real, vote count dtype integer, movie_genres table movie_genres Cols: movie id dtype integer, genre id dtype integer, movie_languages table movie_languages Cols: movie id dtype integer, language id dtype integer, language role id dtype integer, person table person Cols: person id dtype integer, person name dtype text, movie_crew table movie_crew Cols: movie id dtype integer, person id dtype integer, department id dtype integer, job dtype text, production_company table production_company Cols: company id dtype integer, company name dtype text, production_country table production_country Cols: mivie id dtype integer, country id dtype integer, movie_cast table movie_cast Cols: movie id dtype integer, person id dtype integer, character name dtype text, gender id dtype integer, cast order dtype integer, movie_keywords table movie_keywords Cols: movie id dtype integer, keyword id dtype integer, movie_company table movie_company Cols: movie id dtype integer, company id dtype integer,
movies_4
Provide the release date and language of the most popular movie.
language refers to langauge_name; most popular movie refers to max(popularity)
SELECT T1.release_date, T3.language_name FROM movie AS T1 INNER JOIN movie_languages AS T2 ON T1.movie_id = T2.movie_id INNER JOIN language AS T3 ON T2.language_id = T3.language_id ORDER BY T1.popularity DESC LIMIT 1
database name:db_id movies_4 country table country Cols: country id dtype integer, country iso code dtype text, country name dtype text, department table department Cols: department id dtype integer, department name dtype text, gender table gender Cols: gender id dtype integer, gender dtype text, genre table genre Cols: genre id dtype integer, genre_name dtype text, keyword table keyword Cols: keyword id dtype integer, keyword name dtype text, language table language Cols: language id dtype integer, language code dtype text, language name dtype text, language_role table language_role Cols: role id dtype integer, language role dtype text, movie table movie Cols: movie id dtype integer, title dtype text, budget dtype integer, homepage dtype text, overview dtype text, popularity dtype real, release date dtype date, revenue dtype integer, runtime dtype integer, movie_status dtype text, tagline dtype text, vote average dtype real, vote count dtype integer, movie_genres table movie_genres Cols: movie id dtype integer, genre id dtype integer, movie_languages table movie_languages Cols: movie id dtype integer, language id dtype integer, language role id dtype integer, person table person Cols: person id dtype integer, person name dtype text, movie_crew table movie_crew Cols: movie id dtype integer, person id dtype integer, department id dtype integer, job dtype text, production_company table production_company Cols: company id dtype integer, company name dtype text, production_country table production_country Cols: mivie id dtype integer, country id dtype integer, movie_cast table movie_cast Cols: movie id dtype integer, person id dtype integer, character name dtype text, gender id dtype integer, cast order dtype integer, movie_keywords table movie_keywords Cols: movie id dtype integer, keyword id dtype integer, movie_company table movie_company Cols: movie id dtype integer, company id dtype integer,
movies_4
What is the original language of the "Four Rooms" movie?
language refers to language_name; original language refers to language_role = 'Original'; "Four Rooms" refers to title = 'Four Rooms'
SELECT T3.language_name FROM movie AS T1 INNER JOIN movie_languages AS T2 ON T1.movie_id = T2.movie_id INNER JOIN language AS T3 ON T2.language_id = T3.language_id INNER JOIN language_role AS T4 ON T2.language_role_id = T4.role_id WHERE T4.language_role = 'Original' AND T1.title = 'Four Rooms'
database name:db_id movies_4 country table country Cols: country id dtype integer, country iso code dtype text, country name dtype text, department table department Cols: department id dtype integer, department name dtype text, gender table gender Cols: gender id dtype integer, gender dtype text, genre table genre Cols: genre id dtype integer, genre_name dtype text, keyword table keyword Cols: keyword id dtype integer, keyword name dtype text, language table language Cols: language id dtype integer, language code dtype text, language name dtype text, language_role table language_role Cols: role id dtype integer, language role dtype text, movie table movie Cols: movie id dtype integer, title dtype text, budget dtype integer, homepage dtype text, overview dtype text, popularity dtype real, release date dtype date, revenue dtype integer, runtime dtype integer, movie_status dtype text, tagline dtype text, vote average dtype real, vote count dtype integer, movie_genres table movie_genres Cols: movie id dtype integer, genre id dtype integer, movie_languages table movie_languages Cols: movie id dtype integer, language id dtype integer, language role id dtype integer, person table person Cols: person id dtype integer, person name dtype text, movie_crew table movie_crew Cols: movie id dtype integer, person id dtype integer, department id dtype integer, job dtype text, production_company table production_company Cols: company id dtype integer, company name dtype text, production_country table production_country Cols: mivie id dtype integer, country id dtype integer, movie_cast table movie_cast Cols: movie id dtype integer, person id dtype integer, character name dtype text, gender id dtype integer, cast order dtype integer, movie_keywords table movie_keywords Cols: movie id dtype integer, keyword id dtype integer, movie_company table movie_company Cols: movie id dtype integer, company id dtype integer,
movies_4
List the character names in the "Open Water" movie.
"Open Water" movie refers to title = 'Open Water'
SELECT T2.character_name FROM movie AS T1 INNER JOIN movie_cast AS T2 ON T1.movie_id = T2.movie_id WHERE T1.title = 'Open Water'
database name:db_id movies_4 country table country Cols: country id dtype integer, country iso code dtype text, country name dtype text, department table department Cols: department id dtype integer, department name dtype text, gender table gender Cols: gender id dtype integer, gender dtype text, genre table genre Cols: genre id dtype integer, genre_name dtype text, keyword table keyword Cols: keyword id dtype integer, keyword name dtype text, language table language Cols: language id dtype integer, language code dtype text, language name dtype text, language_role table language_role Cols: role id dtype integer, language role dtype text, movie table movie Cols: movie id dtype integer, title dtype text, budget dtype integer, homepage dtype text, overview dtype text, popularity dtype real, release date dtype date, revenue dtype integer, runtime dtype integer, movie_status dtype text, tagline dtype text, vote average dtype real, vote count dtype integer, movie_genres table movie_genres Cols: movie id dtype integer, genre id dtype integer, movie_languages table movie_languages Cols: movie id dtype integer, language id dtype integer, language role id dtype integer, person table person Cols: person id dtype integer, person name dtype text, movie_crew table movie_crew Cols: movie id dtype integer, person id dtype integer, department id dtype integer, job dtype text, production_company table production_company Cols: company id dtype integer, company name dtype text, production_country table production_country Cols: mivie id dtype integer, country id dtype integer, movie_cast table movie_cast Cols: movie id dtype integer, person id dtype integer, character name dtype text, gender id dtype integer, cast order dtype integer, movie_keywords table movie_keywords Cols: movie id dtype integer, keyword id dtype integer, movie_company table movie_company Cols: movie id dtype integer, company id dtype integer,
movies_4
Who is the main actor in the "Pirates of the Caribbean: At World's End" movie?
main actor refers to person_name where Min(cast_order); "Pirates of the Caribbean: At World's End" refers to title = 'Pirates of the Caribbean: At World''s End'
SELECT T3.person_name FROM movie AS T1 INNER JOIN movie_cast AS T2 ON T1.movie_id = T2.movie_id INNER JOIN person AS T3 ON T2.person_id = T3.person_id WHERE T1.title LIKE 'Pirates of the Caribbean: At World%s End' ORDER BY T2.cast_order LIMIT 1
database name:db_id movies_4 country table country Cols: country id dtype integer, country iso code dtype text, country name dtype text, department table department Cols: department id dtype integer, department name dtype text, gender table gender Cols: gender id dtype integer, gender dtype text, genre table genre Cols: genre id dtype integer, genre_name dtype text, keyword table keyword Cols: keyword id dtype integer, keyword name dtype text, language table language Cols: language id dtype integer, language code dtype text, language name dtype text, language_role table language_role Cols: role id dtype integer, language role dtype text, movie table movie Cols: movie id dtype integer, title dtype text, budget dtype integer, homepage dtype text, overview dtype text, popularity dtype real, release date dtype date, revenue dtype integer, runtime dtype integer, movie_status dtype text, tagline dtype text, vote average dtype real, vote count dtype integer, movie_genres table movie_genres Cols: movie id dtype integer, genre id dtype integer, movie_languages table movie_languages Cols: movie id dtype integer, language id dtype integer, language role id dtype integer, person table person Cols: person id dtype integer, person name dtype text, movie_crew table movie_crew Cols: movie id dtype integer, person id dtype integer, department id dtype integer, job dtype text, production_company table production_company Cols: company id dtype integer, company name dtype text, production_country table production_country Cols: mivie id dtype integer, country id dtype integer, movie_cast table movie_cast Cols: movie id dtype integer, person id dtype integer, character name dtype text, gender id dtype integer, cast order dtype integer, movie_keywords table movie_keywords Cols: movie id dtype integer, keyword id dtype integer, movie_company table movie_company Cols: movie id dtype integer, company id dtype integer,
movies_4
List the names of camera supervisors in the crew.
names refers to person_name; camera supervisors refers to job = 'Camera Supervisor';
SELECT T1.person_name FROM person AS T1 INNER JOIN movie_crew AS T2 ON T1.person_id = T2.person_id WHERE T2.job = 'Camera Supervisor'
database name:db_id movies_4 country table country Cols: country id dtype integer, country iso code dtype text, country name dtype text, department table department Cols: department id dtype integer, department name dtype text, gender table gender Cols: gender id dtype integer, gender dtype text, genre table genre Cols: genre id dtype integer, genre_name dtype text, keyword table keyword Cols: keyword id dtype integer, keyword name dtype text, language table language Cols: language id dtype integer, language code dtype text, language name dtype text, language_role table language_role Cols: role id dtype integer, language role dtype text, movie table movie Cols: movie id dtype integer, title dtype text, budget dtype integer, homepage dtype text, overview dtype text, popularity dtype real, release date dtype date, revenue dtype integer, runtime dtype integer, movie_status dtype text, tagline dtype text, vote average dtype real, vote count dtype integer, movie_genres table movie_genres Cols: movie id dtype integer, genre id dtype integer, movie_languages table movie_languages Cols: movie id dtype integer, language id dtype integer, language role id dtype integer, person table person Cols: person id dtype integer, person name dtype text, movie_crew table movie_crew Cols: movie id dtype integer, person id dtype integer, department id dtype integer, job dtype text, production_company table production_company Cols: company id dtype integer, company name dtype text, production_country table production_country Cols: mivie id dtype integer, country id dtype integer, movie_cast table movie_cast Cols: movie id dtype integer, person id dtype integer, character name dtype text, gender id dtype integer, cast order dtype integer, movie_keywords table movie_keywords Cols: movie id dtype integer, keyword id dtype integer, movie_company table movie_company Cols: movie id dtype integer, company id dtype integer,
movies_4
List the job titles of Sally Menke in the crew.
job titles refers to job
SELECT DISTINCT T2.job FROM person AS T1 INNER JOIN movie_crew AS T2 ON T1.person_id = T2.person_id WHERE T1.person_name = 'Sally Menke'
database name:db_id movies_4 country table country Cols: country id dtype integer, country iso code dtype text, country name dtype text, department table department Cols: department id dtype integer, department name dtype text, gender table gender Cols: gender id dtype integer, gender dtype text, genre table genre Cols: genre id dtype integer, genre_name dtype text, keyword table keyword Cols: keyword id dtype integer, keyword name dtype text, language table language Cols: language id dtype integer, language code dtype text, language name dtype text, language_role table language_role Cols: role id dtype integer, language role dtype text, movie table movie Cols: movie id dtype integer, title dtype text, budget dtype integer, homepage dtype text, overview dtype text, popularity dtype real, release date dtype date, revenue dtype integer, runtime dtype integer, movie_status dtype text, tagline dtype text, vote average dtype real, vote count dtype integer, movie_genres table movie_genres Cols: movie id dtype integer, genre id dtype integer, movie_languages table movie_languages Cols: movie id dtype integer, language id dtype integer, language role id dtype integer, person table person Cols: person id dtype integer, person name dtype text, movie_crew table movie_crew Cols: movie id dtype integer, person id dtype integer, department id dtype integer, job dtype text, production_company table production_company Cols: company id dtype integer, company name dtype text, production_country table production_country Cols: mivie id dtype integer, country id dtype integer, movie_cast table movie_cast Cols: movie id dtype integer, person id dtype integer, character name dtype text, gender id dtype integer, cast order dtype integer, movie_keywords table movie_keywords Cols: movie id dtype integer, keyword id dtype integer, movie_company table movie_company Cols: movie id dtype integer, company id dtype integer,
movies_4
Provide the names and departments of the person who worked as a music editor in the "Pirates of the Caribbean: At World's End" movie.
names refers to person_name; departments refers to department_name; worked as a music editor refers to job = 'Music Editor'; "Pirates of the Caribbean: At World's End" refers to title = 'Pirates of the Caribbean: At World''s End'
SELECT T3.person_name, T4.department_name FROM movie AS T1 INNER JOIN movie_crew AS T2 ON T1.movie_id = T2.movie_id INNER JOIN person AS T3 ON T2.person_id = T3.person_id INNER JOIN department AS T4 ON T2.department_id = T4.department_id WHERE T1.title LIKE 'Pirates of the Caribbean: At World%s End' AND T2.job = 'Music Editor'
database name:db_id movies_4 country table country Cols: country id dtype integer, country iso code dtype text, country name dtype text, department table department Cols: department id dtype integer, department name dtype text, gender table gender Cols: gender id dtype integer, gender dtype text, genre table genre Cols: genre id dtype integer, genre_name dtype text, keyword table keyword Cols: keyword id dtype integer, keyword name dtype text, language table language Cols: language id dtype integer, language code dtype text, language name dtype text, language_role table language_role Cols: role id dtype integer, language role dtype text, movie table movie Cols: movie id dtype integer, title dtype text, budget dtype integer, homepage dtype text, overview dtype text, popularity dtype real, release date dtype date, revenue dtype integer, runtime dtype integer, movie_status dtype text, tagline dtype text, vote average dtype real, vote count dtype integer, movie_genres table movie_genres Cols: movie id dtype integer, genre id dtype integer, movie_languages table movie_languages Cols: movie id dtype integer, language id dtype integer, language role id dtype integer, person table person Cols: person id dtype integer, person name dtype text, movie_crew table movie_crew Cols: movie id dtype integer, person id dtype integer, department id dtype integer, job dtype text, production_company table production_company Cols: company id dtype integer, company name dtype text, production_country table production_country Cols: mivie id dtype integer, country id dtype integer, movie_cast table movie_cast Cols: movie id dtype integer, person id dtype integer, character name dtype text, gender id dtype integer, cast order dtype integer, movie_keywords table movie_keywords Cols: movie id dtype integer, keyword id dtype integer, movie_company table movie_company Cols: movie id dtype integer, company id dtype integer,
movies_4
Provide the titles and revenues of the movies produced by the DreamWorks company.
produced by the DreamWorks company refers to company_name = 'DreamWorks'
SELECT T1.title, T1.revenue FROM movie AS T1 INNER JOIN movie_company AS T2 ON T1.movie_id = T2.movie_id INNER JOIN production_company AS T3 ON T2.company_id = T3.company_id WHERE T3.company_name = 'DreamWorks'
database name:db_id movies_4 country table country Cols: country id dtype integer, country iso code dtype text, country name dtype text, department table department Cols: department id dtype integer, department name dtype text, gender table gender Cols: gender id dtype integer, gender dtype text, genre table genre Cols: genre id dtype integer, genre_name dtype text, keyword table keyword Cols: keyword id dtype integer, keyword name dtype text, language table language Cols: language id dtype integer, language code dtype text, language name dtype text, language_role table language_role Cols: role id dtype integer, language role dtype text, movie table movie Cols: movie id dtype integer, title dtype text, budget dtype integer, homepage dtype text, overview dtype text, popularity dtype real, release date dtype date, revenue dtype integer, runtime dtype integer, movie_status dtype text, tagline dtype text, vote average dtype real, vote count dtype integer, movie_genres table movie_genres Cols: movie id dtype integer, genre id dtype integer, movie_languages table movie_languages Cols: movie id dtype integer, language id dtype integer, language role id dtype integer, person table person Cols: person id dtype integer, person name dtype text, movie_crew table movie_crew Cols: movie id dtype integer, person id dtype integer, department id dtype integer, job dtype text, production_company table production_company Cols: company id dtype integer, company name dtype text, production_country table production_country Cols: mivie id dtype integer, country id dtype integer, movie_cast table movie_cast Cols: movie id dtype integer, person id dtype integer, character name dtype text, gender id dtype integer, cast order dtype integer, movie_keywords table movie_keywords Cols: movie id dtype integer, keyword id dtype integer, movie_company table movie_company Cols: movie id dtype integer, company id dtype integer,
movies_4
How many movies were produced in Canada?
produced in Canada refers to country_name = 'Canada'
SELECT COUNT(T2.movie_id) FROM COUNTry AS T1 INNER JOIN production_COUNTry AS T2 ON T1.COUNTry_id = T2.COUNTry_id WHERE T1.COUNTry_name = 'Canada'
database name:db_id movies_4 country table country Cols: country id dtype integer, country iso code dtype text, country name dtype text, department table department Cols: department id dtype integer, department name dtype text, gender table gender Cols: gender id dtype integer, gender dtype text, genre table genre Cols: genre id dtype integer, genre_name dtype text, keyword table keyword Cols: keyword id dtype integer, keyword name dtype text, language table language Cols: language id dtype integer, language code dtype text, language name dtype text, language_role table language_role Cols: role id dtype integer, language role dtype text, movie table movie Cols: movie id dtype integer, title dtype text, budget dtype integer, homepage dtype text, overview dtype text, popularity dtype real, release date dtype date, revenue dtype integer, runtime dtype integer, movie_status dtype text, tagline dtype text, vote average dtype real, vote count dtype integer, movie_genres table movie_genres Cols: movie id dtype integer, genre id dtype integer, movie_languages table movie_languages Cols: movie id dtype integer, language id dtype integer, language role id dtype integer, person table person Cols: person id dtype integer, person name dtype text, movie_crew table movie_crew Cols: movie id dtype integer, person id dtype integer, department id dtype integer, job dtype text, production_company table production_company Cols: company id dtype integer, company name dtype text, production_country table production_country Cols: mivie id dtype integer, country id dtype integer, movie_cast table movie_cast Cols: movie id dtype integer, person id dtype integer, character name dtype text, gender id dtype integer, cast order dtype integer, movie_keywords table movie_keywords Cols: movie id dtype integer, keyword id dtype integer, movie_company table movie_company Cols: movie id dtype integer, company id dtype integer,
movies_4
List the genres of Forrest Gump movie.
genres refers to genre_name; Forrest Gump movie refers to title = 'Forrest Gump'
SELECT T3.genre_name FROM movie AS T1 INNER JOIN movie_genres AS T2 ON T1.movie_id = T2.movie_id INNER JOIN genre AS T3 ON T2.genre_id = T3.genre_id WHERE T1.title = 'Forrest Gump'
database name:db_id movies_4 country table country Cols: country id dtype integer, country iso code dtype text, country name dtype text, department table department Cols: department id dtype integer, department name dtype text, gender table gender Cols: gender id dtype integer, gender dtype text, genre table genre Cols: genre id dtype integer, genre_name dtype text, keyword table keyword Cols: keyword id dtype integer, keyword name dtype text, language table language Cols: language id dtype integer, language code dtype text, language name dtype text, language_role table language_role Cols: role id dtype integer, language role dtype text, movie table movie Cols: movie id dtype integer, title dtype text, budget dtype integer, homepage dtype text, overview dtype text, popularity dtype real, release date dtype date, revenue dtype integer, runtime dtype integer, movie_status dtype text, tagline dtype text, vote average dtype real, vote count dtype integer, movie_genres table movie_genres Cols: movie id dtype integer, genre id dtype integer, movie_languages table movie_languages Cols: movie id dtype integer, language id dtype integer, language role id dtype integer, person table person Cols: person id dtype integer, person name dtype text, movie_crew table movie_crew Cols: movie id dtype integer, person id dtype integer, department id dtype integer, job dtype text, production_company table production_company Cols: company id dtype integer, company name dtype text, production_country table production_country Cols: mivie id dtype integer, country id dtype integer, movie_cast table movie_cast Cols: movie id dtype integer, person id dtype integer, character name dtype text, gender id dtype integer, cast order dtype integer, movie_keywords table movie_keywords Cols: movie id dtype integer, keyword id dtype integer, movie_company table movie_company Cols: movie id dtype integer, company id dtype integer,
movies_4
Provide the production companies of the movie that has over 35% average running time per movie in 2016.
production companies refers to company_name; in 2016 refers to release_date LIKE '2016%'; over 35% average running time per movie refers to divide(subtract(runtime, AVG(runtime)), AVG(runtime)) * 100 as percentage > 35
SELECT T.company_name FROM ( SELECT DISTINCT T3.company_name, T1.runtime FROM movie AS T1 INNER JOIN movie_company AS T2 ON T1.movie_id = T2.movie_id INNER JOIN production_company AS T3 ON T3.company_id = T2.company_id WHERE T1.release_date LIKE '2016%' ) T WHERE T.runtime * 100 > (0.35 * ( SELECT AVG(T1.runtime) FROM movie AS T1 INNER JOIN movie_company AS T2 ON T1.movie_id = T2.movie_id INNER JOIN production_company AS T3 ON T3.company_id = T2.company_id WHERE T1.release_date LIKE '2016%' ) + ( SELECT AVG(T1.runtime) FROM movie AS T1 INNER JOIN movie_company AS T2 ON T1.movie_id = T2.movie_id INNER JOIN production_company AS T3 ON T3.company_id = T2.company_id WHERE T1.release_date LIKE '2016%' )) * 100
database name:db_id movies_4 country table country Cols: country id dtype integer, country iso code dtype text, country name dtype text, department table department Cols: department id dtype integer, department name dtype text, gender table gender Cols: gender id dtype integer, gender dtype text, genre table genre Cols: genre id dtype integer, genre_name dtype text, keyword table keyword Cols: keyword id dtype integer, keyword name dtype text, language table language Cols: language id dtype integer, language code dtype text, language name dtype text, language_role table language_role Cols: role id dtype integer, language role dtype text, movie table movie Cols: movie id dtype integer, title dtype text, budget dtype integer, homepage dtype text, overview dtype text, popularity dtype real, release date dtype date, revenue dtype integer, runtime dtype integer, movie_status dtype text, tagline dtype text, vote average dtype real, vote count dtype integer, movie_genres table movie_genres Cols: movie id dtype integer, genre id dtype integer, movie_languages table movie_languages Cols: movie id dtype integer, language id dtype integer, language role id dtype integer, person table person Cols: person id dtype integer, person name dtype text, movie_crew table movie_crew Cols: movie id dtype integer, person id dtype integer, department id dtype integer, job dtype text, production_company table production_company Cols: company id dtype integer, company name dtype text, production_country table production_country Cols: mivie id dtype integer, country id dtype integer, movie_cast table movie_cast Cols: movie id dtype integer, person id dtype integer, character name dtype text, gender id dtype integer, cast order dtype integer, movie_keywords table movie_keywords Cols: movie id dtype integer, keyword id dtype integer, movie_company table movie_company Cols: movie id dtype integer, company id dtype integer,
movies_4
Find the difference in percentage of the movies under keywords of "woman director" and "independent film".
under keywords of "woman director" and "independent film" refers to keyword_name = 'woman director' and keyword_name = 'independent film'; difference in percentage = divide(subtract(count(movie_id) when keyword_name = 'woman director', count(movie_id) when keyword_name = 'independent film'), count(movie_id)) as percentage
SELECT CAST((SUM(CASE WHEN T1.keyword_name = 'woman director' THEN 1 ELSE 0 END) - SUM(CASE WHEN T1.keyword_name = 'independent film' THEN 1 ELSE 0 END)) AS REAL) * 100 / SUM(CASE WHEN T1.keyword_name = 'independent film' THEN 1 ELSE 0 END) FROM keyword AS T1 INNER JOIN movie_keywords AS T2 ON T1.keyword_id = T2.keyword_id
database name:db_id movies_4 country table country Cols: country id dtype integer, country iso code dtype text, country name dtype text, department table department Cols: department id dtype integer, department name dtype text, gender table gender Cols: gender id dtype integer, gender dtype text, genre table genre Cols: genre id dtype integer, genre_name dtype text, keyword table keyword Cols: keyword id dtype integer, keyword name dtype text, language table language Cols: language id dtype integer, language code dtype text, language name dtype text, language_role table language_role Cols: role id dtype integer, language role dtype text, movie table movie Cols: movie id dtype integer, title dtype text, budget dtype integer, homepage dtype text, overview dtype text, popularity dtype real, release date dtype date, revenue dtype integer, runtime dtype integer, movie_status dtype text, tagline dtype text, vote average dtype real, vote count dtype integer, movie_genres table movie_genres Cols: movie id dtype integer, genre id dtype integer, movie_languages table movie_languages Cols: movie id dtype integer, language id dtype integer, language role id dtype integer, person table person Cols: person id dtype integer, person name dtype text, movie_crew table movie_crew Cols: movie id dtype integer, person id dtype integer, department id dtype integer, job dtype text, production_company table production_company Cols: company id dtype integer, company name dtype text, production_country table production_country Cols: mivie id dtype integer, country id dtype integer, movie_cast table movie_cast Cols: movie id dtype integer, person id dtype integer, character name dtype text, gender id dtype integer, cast order dtype integer, movie_keywords table movie_keywords Cols: movie id dtype integer, keyword id dtype integer, movie_company table movie_company Cols: movie id dtype integer, company id dtype integer,
movies_4
Which genre does the movie Dancer in the Dark belong to?
genre refers to genre_name; movie Dancer in the Dark refers to title = 'Dancer in the Dark'
SELECT T3.genre_name FROM movie AS T1 INNER JOIN movie_genres AS T2 ON T1.movie_id = T2.movie_id INNER JOIN genre AS T3 ON T2.genre_id = T3.genre_id WHERE T1.title = 'Dancer in the Dark'
database name:db_id movies_4 country table country Cols: country id dtype integer, country iso code dtype text, country name dtype text, department table department Cols: department id dtype integer, department name dtype text, gender table gender Cols: gender id dtype integer, gender dtype text, genre table genre Cols: genre id dtype integer, genre_name dtype text, keyword table keyword Cols: keyword id dtype integer, keyword name dtype text, language table language Cols: language id dtype integer, language code dtype text, language name dtype text, language_role table language_role Cols: role id dtype integer, language role dtype text, movie table movie Cols: movie id dtype integer, title dtype text, budget dtype integer, homepage dtype text, overview dtype text, popularity dtype real, release date dtype date, revenue dtype integer, runtime dtype integer, movie_status dtype text, tagline dtype text, vote average dtype real, vote count dtype integer, movie_genres table movie_genres Cols: movie id dtype integer, genre id dtype integer, movie_languages table movie_languages Cols: movie id dtype integer, language id dtype integer, language role id dtype integer, person table person Cols: person id dtype integer, person name dtype text, movie_crew table movie_crew Cols: movie id dtype integer, person id dtype integer, department id dtype integer, job dtype text, production_company table production_company Cols: company id dtype integer, company name dtype text, production_country table production_country Cols: mivie id dtype integer, country id dtype integer, movie_cast table movie_cast Cols: movie id dtype integer, person id dtype integer, character name dtype text, gender id dtype integer, cast order dtype integer, movie_keywords table movie_keywords Cols: movie id dtype integer, keyword id dtype integer, movie_company table movie_company Cols: movie id dtype integer, company id dtype integer,
movies_4
How many adventure movies are there that were released in 2000?
adventure movies refers to genre_name = 'Adventure'; released in 2000 refers to release_date LIKE '2000%'
SELECT COUNT(T1.movie_id) FROM movie AS T1 INNER JOIN movie_genres AS T2 ON T1.movie_id = T2.movie_id INNER JOIN genre AS T3 ON T2.genre_id = T3.genre_id WHERE T3.genre_name = 'Adventure' AND CAST(STRFTIME('%Y', T1.release_date) AS INT) = 2000
database name:db_id movies_4 country table country Cols: country id dtype integer, country iso code dtype text, country name dtype text, department table department Cols: department id dtype integer, department name dtype text, gender table gender Cols: gender id dtype integer, gender dtype text, genre table genre Cols: genre id dtype integer, genre_name dtype text, keyword table keyword Cols: keyword id dtype integer, keyword name dtype text, language table language Cols: language id dtype integer, language code dtype text, language name dtype text, language_role table language_role Cols: role id dtype integer, language role dtype text, movie table movie Cols: movie id dtype integer, title dtype text, budget dtype integer, homepage dtype text, overview dtype text, popularity dtype real, release date dtype date, revenue dtype integer, runtime dtype integer, movie_status dtype text, tagline dtype text, vote average dtype real, vote count dtype integer, movie_genres table movie_genres Cols: movie id dtype integer, genre id dtype integer, movie_languages table movie_languages Cols: movie id dtype integer, language id dtype integer, language role id dtype integer, person table person Cols: person id dtype integer, person name dtype text, movie_crew table movie_crew Cols: movie id dtype integer, person id dtype integer, department id dtype integer, job dtype text, production_company table production_company Cols: company id dtype integer, company name dtype text, production_country table production_country Cols: mivie id dtype integer, country id dtype integer, movie_cast table movie_cast Cols: movie id dtype integer, person id dtype integer, character name dtype text, gender id dtype integer, cast order dtype integer, movie_keywords table movie_keywords Cols: movie id dtype integer, keyword id dtype integer, movie_company table movie_company Cols: movie id dtype integer, company id dtype integer,
movies_4
Which movies did the company Paramount Pictures produce in 2000?
Which movies refers to title; company Paramount Pictures refers to company_name = 'Paramount Pictures'; in 2000 refers to release_date LIKE '2000%'
SELECT T3.title FROM production_company AS T1 INNER JOIN movie_company AS T2 ON T1.company_id = T2.company_id INNER JOIN movie AS T3 ON T2.movie_id = T3.movie_id WHERE T1.company_name = 'Paramount Pictures' AND CAST(STRFTIME('%Y', T3.release_date) AS INT) = 2000
database name:db_id movies_4 country table country Cols: country id dtype integer, country iso code dtype text, country name dtype text, department table department Cols: department id dtype integer, department name dtype text, gender table gender Cols: gender id dtype integer, gender dtype text, genre table genre Cols: genre id dtype integer, genre_name dtype text, keyword table keyword Cols: keyword id dtype integer, keyword name dtype text, language table language Cols: language id dtype integer, language code dtype text, language name dtype text, language_role table language_role Cols: role id dtype integer, language role dtype text, movie table movie Cols: movie id dtype integer, title dtype text, budget dtype integer, homepage dtype text, overview dtype text, popularity dtype real, release date dtype date, revenue dtype integer, runtime dtype integer, movie_status dtype text, tagline dtype text, vote average dtype real, vote count dtype integer, movie_genres table movie_genres Cols: movie id dtype integer, genre id dtype integer, movie_languages table movie_languages Cols: movie id dtype integer, language id dtype integer, language role id dtype integer, person table person Cols: person id dtype integer, person name dtype text, movie_crew table movie_crew Cols: movie id dtype integer, person id dtype integer, department id dtype integer, job dtype text, production_company table production_company Cols: company id dtype integer, company name dtype text, production_country table production_country Cols: mivie id dtype integer, country id dtype integer, movie_cast table movie_cast Cols: movie id dtype integer, person id dtype integer, character name dtype text, gender id dtype integer, cast order dtype integer, movie_keywords table movie_keywords Cols: movie id dtype integer, keyword id dtype integer, movie_company table movie_company Cols: movie id dtype integer, company id dtype integer,
movies_4
What keyword can the user use to search for the movie Finding Nemo?
What keyword refers to keyword_name; Finding Nemo refers to title = 'Finding Nemo'
SELECT T3.keyword_name FROM movie AS T1 INNER JOIN movie_keywords AS T2 ON T1.movie_id = T2.movie_id INNER JOIN keyword AS T3 ON T2.keyword_id = T3.keyword_id WHERE T1.title = 'Finding Nemo'
database name:db_id movies_4 country table country Cols: country id dtype integer, country iso code dtype text, country name dtype text, department table department Cols: department id dtype integer, department name dtype text, gender table gender Cols: gender id dtype integer, gender dtype text, genre table genre Cols: genre id dtype integer, genre_name dtype text, keyword table keyword Cols: keyword id dtype integer, keyword name dtype text, language table language Cols: language id dtype integer, language code dtype text, language name dtype text, language_role table language_role Cols: role id dtype integer, language role dtype text, movie table movie Cols: movie id dtype integer, title dtype text, budget dtype integer, homepage dtype text, overview dtype text, popularity dtype real, release date dtype date, revenue dtype integer, runtime dtype integer, movie_status dtype text, tagline dtype text, vote average dtype real, vote count dtype integer, movie_genres table movie_genres Cols: movie id dtype integer, genre id dtype integer, movie_languages table movie_languages Cols: movie id dtype integer, language id dtype integer, language role id dtype integer, person table person Cols: person id dtype integer, person name dtype text, movie_crew table movie_crew Cols: movie id dtype integer, person id dtype integer, department id dtype integer, job dtype text, production_company table production_company Cols: company id dtype integer, company name dtype text, production_country table production_country Cols: mivie id dtype integer, country id dtype integer, movie_cast table movie_cast Cols: movie id dtype integer, person id dtype integer, character name dtype text, gender id dtype integer, cast order dtype integer, movie_keywords table movie_keywords Cols: movie id dtype integer, keyword id dtype integer, movie_company table movie_company Cols: movie id dtype integer, company id dtype integer,
movies_4
Name the horror movies with positive ratings greater than 7.
Name the horror movies refers to title where genre_name = 'horror'; positive ratings greater than 7 refers to vote_average > 7
SELECT T1.title FROM movie AS T1 INNER JOIN movie_genres AS T2 ON T1.movie_id = T2.movie_id INNER JOIN genre AS T3 ON T2.genre_id = T3.genre_id WHERE T3.genre_name = 'Horror' AND T1.vote_average > 7
database name:db_id movies_4 country table country Cols: country id dtype integer, country iso code dtype text, country name dtype text, department table department Cols: department id dtype integer, department name dtype text, gender table gender Cols: gender id dtype integer, gender dtype text, genre table genre Cols: genre id dtype integer, genre_name dtype text, keyword table keyword Cols: keyword id dtype integer, keyword name dtype text, language table language Cols: language id dtype integer, language code dtype text, language name dtype text, language_role table language_role Cols: role id dtype integer, language role dtype text, movie table movie Cols: movie id dtype integer, title dtype text, budget dtype integer, homepage dtype text, overview dtype text, popularity dtype real, release date dtype date, revenue dtype integer, runtime dtype integer, movie_status dtype text, tagline dtype text, vote average dtype real, vote count dtype integer, movie_genres table movie_genres Cols: movie id dtype integer, genre id dtype integer, movie_languages table movie_languages Cols: movie id dtype integer, language id dtype integer, language role id dtype integer, person table person Cols: person id dtype integer, person name dtype text, movie_crew table movie_crew Cols: movie id dtype integer, person id dtype integer, department id dtype integer, job dtype text, production_company table production_company Cols: company id dtype integer, company name dtype text, production_country table production_country Cols: mivie id dtype integer, country id dtype integer, movie_cast table movie_cast Cols: movie id dtype integer, person id dtype integer, character name dtype text, gender id dtype integer, cast order dtype integer, movie_keywords table movie_keywords Cols: movie id dtype integer, keyword id dtype integer, movie_company table movie_company Cols: movie id dtype integer, company id dtype integer,
movies_4
How many production companies made more than 150 movies?
more than 150 movies refers to COUNT(company_name) > 150
SELECT COUNT(*) FROM ( SELECT T1.company_name AS CNAME FROM production_company AS T1 INNER JOIN movie_company AS T2 ON T1.company_id = T2.company_id GROUP BY T1.company_id HAVING COUNT(T1.company_name) > 150 )
database name:db_id movies_4 country table country Cols: country id dtype integer, country iso code dtype text, country name dtype text, department table department Cols: department id dtype integer, department name dtype text, gender table gender Cols: gender id dtype integer, gender dtype text, genre table genre Cols: genre id dtype integer, genre_name dtype text, keyword table keyword Cols: keyword id dtype integer, keyword name dtype text, language table language Cols: language id dtype integer, language code dtype text, language name dtype text, language_role table language_role Cols: role id dtype integer, language role dtype text, movie table movie Cols: movie id dtype integer, title dtype text, budget dtype integer, homepage dtype text, overview dtype text, popularity dtype real, release date dtype date, revenue dtype integer, runtime dtype integer, movie_status dtype text, tagline dtype text, vote average dtype real, vote count dtype integer, movie_genres table movie_genres Cols: movie id dtype integer, genre id dtype integer, movie_languages table movie_languages Cols: movie id dtype integer, language id dtype integer, language role id dtype integer, person table person Cols: person id dtype integer, person name dtype text, movie_crew table movie_crew Cols: movie id dtype integer, person id dtype integer, department id dtype integer, job dtype text, production_company table production_company Cols: company id dtype integer, company name dtype text, production_country table production_country Cols: mivie id dtype integer, country id dtype integer, movie_cast table movie_cast Cols: movie id dtype integer, person id dtype integer, character name dtype text, gender id dtype integer, cast order dtype integer, movie_keywords table movie_keywords Cols: movie id dtype integer, keyword id dtype integer, movie_company table movie_company Cols: movie id dtype integer, company id dtype integer,
movies_4
What is the role of Mark Hammel?
role refers to job
SELECT T2.job FROM person AS T1 INNER JOIN movie_crew AS T2 ON T1.person_id = T2.person_id WHERE T1.person_name = 'Mark Hammel'
database name:db_id movies_4 country table country Cols: country id dtype integer, country iso code dtype text, country name dtype text, department table department Cols: department id dtype integer, department name dtype text, gender table gender Cols: gender id dtype integer, gender dtype text, genre table genre Cols: genre id dtype integer, genre_name dtype text, keyword table keyword Cols: keyword id dtype integer, keyword name dtype text, language table language Cols: language id dtype integer, language code dtype text, language name dtype text, language_role table language_role Cols: role id dtype integer, language role dtype text, movie table movie Cols: movie id dtype integer, title dtype text, budget dtype integer, homepage dtype text, overview dtype text, popularity dtype real, release date dtype date, revenue dtype integer, runtime dtype integer, movie_status dtype text, tagline dtype text, vote average dtype real, vote count dtype integer, movie_genres table movie_genres Cols: movie id dtype integer, genre id dtype integer, movie_languages table movie_languages Cols: movie id dtype integer, language id dtype integer, language role id dtype integer, person table person Cols: person id dtype integer, person name dtype text, movie_crew table movie_crew Cols: movie id dtype integer, person id dtype integer, department id dtype integer, job dtype text, production_company table production_company Cols: company id dtype integer, company name dtype text, production_country table production_country Cols: mivie id dtype integer, country id dtype integer, movie_cast table movie_cast Cols: movie id dtype integer, person id dtype integer, character name dtype text, gender id dtype integer, cast order dtype integer, movie_keywords table movie_keywords Cols: movie id dtype integer, keyword id dtype integer, movie_company table movie_company Cols: movie id dtype integer, company id dtype integer,
movies_4
How many main actors are there in the movie Pirates of the Caribbean: At World's End?
main actors refers to gender = 'male' and min(cast_order); Pirates of the Caribbean: At World's End refers to title = 'Pirates of the Caribbean: At World''s End'
SELECT COUNT(T2.cast_order) FROM movie AS T1 INNER JOIN movie_cast AS T2 ON T1.movie_id = T2.movie_id INNER JOIN gender AS T3 ON T3.gender_id = T2.gender_id WHERE T3.gender = 'Male' OR T3.gender = 'Female' AND T1.title = 'Pirates of the Caribbean: At World''s End' AND T2.cast_order = ( SELECT MIN(T2.cast_order) FROM movie AS T1 INNER JOIN movie_cast AS T2 ON T1.movie_id = T2.movie_id INNER JOIN gender AS T3 ON T3.gender_id = T2.gender_id WHERE T3.gender = 'Male' OR T3.gender = 'Female' AND T1.title = 'Pirates of the Caribbean: At World''s End' )
database name:db_id movies_4 country table country Cols: country id dtype integer, country iso code dtype text, country name dtype text, department table department Cols: department id dtype integer, department name dtype text, gender table gender Cols: gender id dtype integer, gender dtype text, genre table genre Cols: genre id dtype integer, genre_name dtype text, keyword table keyword Cols: keyword id dtype integer, keyword name dtype text, language table language Cols: language id dtype integer, language code dtype text, language name dtype text, language_role table language_role Cols: role id dtype integer, language role dtype text, movie table movie Cols: movie id dtype integer, title dtype text, budget dtype integer, homepage dtype text, overview dtype text, popularity dtype real, release date dtype date, revenue dtype integer, runtime dtype integer, movie_status dtype text, tagline dtype text, vote average dtype real, vote count dtype integer, movie_genres table movie_genres Cols: movie id dtype integer, genre id dtype integer, movie_languages table movie_languages Cols: movie id dtype integer, language id dtype integer, language role id dtype integer, person table person Cols: person id dtype integer, person name dtype text, movie_crew table movie_crew Cols: movie id dtype integer, person id dtype integer, department id dtype integer, job dtype text, production_company table production_company Cols: company id dtype integer, company name dtype text, production_country table production_country Cols: mivie id dtype integer, country id dtype integer, movie_cast table movie_cast Cols: movie id dtype integer, person id dtype integer, character name dtype text, gender id dtype integer, cast order dtype integer, movie_keywords table movie_keywords Cols: movie id dtype integer, keyword id dtype integer, movie_company table movie_company Cols: movie id dtype integer, company id dtype integer,
movies_4
Which movies have the participation of actor Harrison Ford?
Which movies refers to title; actor refers to person_name
SELECT T1.title FROM movie AS T1 INNER JOIN movie_cast AS T2 ON T1.movie_id = T2.movie_id INNER JOIN person AS T3 ON T2.person_id = T3.person_id WHERE T3.person_name = 'Harrison Ford'
database name:db_id movies_4 country table country Cols: country id dtype integer, country iso code dtype text, country name dtype text, department table department Cols: department id dtype integer, department name dtype text, gender table gender Cols: gender id dtype integer, gender dtype text, genre table genre Cols: genre id dtype integer, genre_name dtype text, keyword table keyword Cols: keyword id dtype integer, keyword name dtype text, language table language Cols: language id dtype integer, language code dtype text, language name dtype text, language_role table language_role Cols: role id dtype integer, language role dtype text, movie table movie Cols: movie id dtype integer, title dtype text, budget dtype integer, homepage dtype text, overview dtype text, popularity dtype real, release date dtype date, revenue dtype integer, runtime dtype integer, movie_status dtype text, tagline dtype text, vote average dtype real, vote count dtype integer, movie_genres table movie_genres Cols: movie id dtype integer, genre id dtype integer, movie_languages table movie_languages Cols: movie id dtype integer, language id dtype integer, language role id dtype integer, person table person Cols: person id dtype integer, person name dtype text, movie_crew table movie_crew Cols: movie id dtype integer, person id dtype integer, department id dtype integer, job dtype text, production_company table production_company Cols: company id dtype integer, company name dtype text, production_country table production_country Cols: mivie id dtype integer, country id dtype integer, movie_cast table movie_cast Cols: movie id dtype integer, person id dtype integer, character name dtype text, gender id dtype integer, cast order dtype integer, movie_keywords table movie_keywords Cols: movie id dtype integer, keyword id dtype integer, movie_company table movie_company Cols: movie id dtype integer, company id dtype integer,
movies_4
Which character did Orlando Bloom play in the movie Pirates of the Caribbean: The Curse of the Black Pearl?
Which character refers to character_name; movie Pirates of the Caribbean: The Curse of the Black Pearl refers to title = 'Pirates of the Caribbean: The Curse of the Black Pearl'
SELECT T2.character_name FROM movie AS T1 INNER JOIN movie_cast AS T2 ON T1.movie_id = T2.movie_id INNER JOIN person AS T3 ON T2.person_id = T3.person_id WHERE T1.title = 'Pirates of the Caribbean: The Curse of the Black Pearl' AND T3.person_name = 'Orlando Bloom'
database name:db_id movies_4 country table country Cols: country id dtype integer, country iso code dtype text, country name dtype text, department table department Cols: department id dtype integer, department name dtype text, gender table gender Cols: gender id dtype integer, gender dtype text, genre table genre Cols: genre id dtype integer, genre_name dtype text, keyword table keyword Cols: keyword id dtype integer, keyword name dtype text, language table language Cols: language id dtype integer, language code dtype text, language name dtype text, language_role table language_role Cols: role id dtype integer, language role dtype text, movie table movie Cols: movie id dtype integer, title dtype text, budget dtype integer, homepage dtype text, overview dtype text, popularity dtype real, release date dtype date, revenue dtype integer, runtime dtype integer, movie_status dtype text, tagline dtype text, vote average dtype real, vote count dtype integer, movie_genres table movie_genres Cols: movie id dtype integer, genre id dtype integer, movie_languages table movie_languages Cols: movie id dtype integer, language id dtype integer, language role id dtype integer, person table person Cols: person id dtype integer, person name dtype text, movie_crew table movie_crew Cols: movie id dtype integer, person id dtype integer, department id dtype integer, job dtype text, production_company table production_company Cols: company id dtype integer, company name dtype text, production_country table production_country Cols: mivie id dtype integer, country id dtype integer, movie_cast table movie_cast Cols: movie id dtype integer, person id dtype integer, character name dtype text, gender id dtype integer, cast order dtype integer, movie_keywords table movie_keywords Cols: movie id dtype integer, keyword id dtype integer, movie_company table movie_company Cols: movie id dtype integer, company id dtype integer,
movies_4
What is the average number of horror movies among all movies genre?
horror movies refers to genre_name = 'horror'; average number = divide(sum(movie_id) when genre_name = 'horror', count(movie_id))
SELECT CAST(COUNT(CASE WHEN T3.genre_name = 'Horror' THEN T1.movie_id ELSE NULL END) AS REAL) / COUNT(T1.movie_id) FROM movie AS T1 INNER JOIN movie_genres AS T2 ON T1.movie_id = T2.movie_id INNER JOIN genre AS T3 ON T2.genre_id = T3.genre_id
database name:db_id movies_4 country table country Cols: country id dtype integer, country iso code dtype text, country name dtype text, department table department Cols: department id dtype integer, department name dtype text, gender table gender Cols: gender id dtype integer, gender dtype text, genre table genre Cols: genre id dtype integer, genre_name dtype text, keyword table keyword Cols: keyword id dtype integer, keyword name dtype text, language table language Cols: language id dtype integer, language code dtype text, language name dtype text, language_role table language_role Cols: role id dtype integer, language role dtype text, movie table movie Cols: movie id dtype integer, title dtype text, budget dtype integer, homepage dtype text, overview dtype text, popularity dtype real, release date dtype date, revenue dtype integer, runtime dtype integer, movie_status dtype text, tagline dtype text, vote average dtype real, vote count dtype integer, movie_genres table movie_genres Cols: movie id dtype integer, genre id dtype integer, movie_languages table movie_languages Cols: movie id dtype integer, language id dtype integer, language role id dtype integer, person table person Cols: person id dtype integer, person name dtype text, movie_crew table movie_crew Cols: movie id dtype integer, person id dtype integer, department id dtype integer, job dtype text, production_company table production_company Cols: company id dtype integer, company name dtype text, production_country table production_country Cols: mivie id dtype integer, country id dtype integer, movie_cast table movie_cast Cols: movie id dtype integer, person id dtype integer, character name dtype text, gender id dtype integer, cast order dtype integer, movie_keywords table movie_keywords Cols: movie id dtype integer, keyword id dtype integer, movie_company table movie_company Cols: movie id dtype integer, company id dtype integer,
movies_4
List the names of all the producers in the movie "Pirates of the Caribbean: At World's End".
List the names refers to person_name; producers refers to job = 'Producer'; "Pirates of the Caribbean: At World's End" refers to title = 'Pirates of the Caribbean: The Curse of the Black Pearl'
SELECT T3.person_name FROM movie AS T1 INNER JOIN movie_crew AS T2 ON T1.movie_id = T2.movie_id INNER JOIN person AS T3 ON T2.person_id = T3.person_id WHERE T1.title = 'Pirates of the Caribbean: The Curse of the Black Pearl' AND T2.job = 'Producer'
database name:db_id movies_4 country table country Cols: country id dtype integer, country iso code dtype text, country name dtype text, department table department Cols: department id dtype integer, department name dtype text, gender table gender Cols: gender id dtype integer, gender dtype text, genre table genre Cols: genre id dtype integer, genre_name dtype text, keyword table keyword Cols: keyword id dtype integer, keyword name dtype text, language table language Cols: language id dtype integer, language code dtype text, language name dtype text, language_role table language_role Cols: role id dtype integer, language role dtype text, movie table movie Cols: movie id dtype integer, title dtype text, budget dtype integer, homepage dtype text, overview dtype text, popularity dtype real, release date dtype date, revenue dtype integer, runtime dtype integer, movie_status dtype text, tagline dtype text, vote average dtype real, vote count dtype integer, movie_genres table movie_genres Cols: movie id dtype integer, genre id dtype integer, movie_languages table movie_languages Cols: movie id dtype integer, language id dtype integer, language role id dtype integer, person table person Cols: person id dtype integer, person name dtype text, movie_crew table movie_crew Cols: movie id dtype integer, person id dtype integer, department id dtype integer, job dtype text, production_company table production_company Cols: company id dtype integer, company name dtype text, production_country table production_country Cols: mivie id dtype integer, country id dtype integer, movie_cast table movie_cast Cols: movie id dtype integer, person id dtype integer, character name dtype text, gender id dtype integer, cast order dtype integer, movie_keywords table movie_keywords Cols: movie id dtype integer, keyword id dtype integer, movie_company table movie_company Cols: movie id dtype integer, company id dtype integer,
movies_4
Calculate the average income made by movies using the keyword "paris". List the title of the movies.
income refers to revenue; keyword "paris" refers to keyword_name = 'paris'; average income = AVG(revenue)
SELECT AVG(T1.revenue), T1.title FROM movie AS T1 INNER JOIN movie_keywords AS T2 ON T1.movie_id = T2.movie_id INNER JOIN keyword AS T3 ON T2.keyword_id = T3.keyword_id WHERE T3.keyword_name = 'paris'
database name:db_id movies_4 country table country Cols: country id dtype integer, country iso code dtype text, country name dtype text, department table department Cols: department id dtype integer, department name dtype text, gender table gender Cols: gender id dtype integer, gender dtype text, genre table genre Cols: genre id dtype integer, genre_name dtype text, keyword table keyword Cols: keyword id dtype integer, keyword name dtype text, language table language Cols: language id dtype integer, language code dtype text, language name dtype text, language_role table language_role Cols: role id dtype integer, language role dtype text, movie table movie Cols: movie id dtype integer, title dtype text, budget dtype integer, homepage dtype text, overview dtype text, popularity dtype real, release date dtype date, revenue dtype integer, runtime dtype integer, movie_status dtype text, tagline dtype text, vote average dtype real, vote count dtype integer, movie_genres table movie_genres Cols: movie id dtype integer, genre id dtype integer, movie_languages table movie_languages Cols: movie id dtype integer, language id dtype integer, language role id dtype integer, person table person Cols: person id dtype integer, person name dtype text, movie_crew table movie_crew Cols: movie id dtype integer, person id dtype integer, department id dtype integer, job dtype text, production_company table production_company Cols: company id dtype integer, company name dtype text, production_country table production_country Cols: mivie id dtype integer, country id dtype integer, movie_cast table movie_cast Cols: movie id dtype integer, person id dtype integer, character name dtype text, gender id dtype integer, cast order dtype integer, movie_keywords table movie_keywords Cols: movie id dtype integer, keyword id dtype integer, movie_company table movie_company Cols: movie id dtype integer, company id dtype integer,
codebase_comments
How many English language codes whose comments for the method are in the XML format?
English language refers to Lang = 'en'; the comments for this method is XML format refers to CommentIsXml = 1;
SELECT COUNT(Lang) FROM Method WHERE Lang = 'en' AND CommentIsXml = 1
database name:db_id codebase_comments Method table Method Cols: Id dtype integer, Name dtype text, Full Comment dtype text, Summary dtype text, Api Calls dtype text, CommentIs Xml dtype integer, Sampled At dtype integer, Solution Id dtype integer, Language dtype text, Name Tokenized dtype text, MethodParameter table MethodParameter Cols: Id dtype integer, Method Id dtype text, Type dtype text, Name dtype text, Repo table Repo Cols: Id dtype integer, Url dtype text, Stars dtype integer, Forks dtype integer, Watchers dtype integer, Processed Time dtype integer, Solution table Solution Cols: Id dtype integer, Repository Id dtype integer, Path dtype text, Processed Time dtype integer, Was Compiled dtype integer,
codebase_comments
What is the task of the method whose tokenized name is "online median filter test median window filling"?
tokenized name refers to NameTokenized; task of the method refers to the second part of name deliminated by "."; for example, the task of 'LinqToDelicious.HttpWebRequestFactory.Create' is 'HttpWebRequestFactory'
SELECT SUBSTR(SUBSTR(Name, INSTR(Name, '.') + 1), 1, INSTR(SUBSTR(Name, INSTR(Name, '.') + 1), '.') - 1) task FROM Method WHERE NameTokenized = 'online median filter test median window filling'
database name:db_id codebase_comments Method table Method Cols: Id dtype integer, Name dtype text, Full Comment dtype text, Summary dtype text, Api Calls dtype text, CommentIs Xml dtype integer, Sampled At dtype integer, Solution Id dtype integer, Language dtype text, Name Tokenized dtype text, MethodParameter table MethodParameter Cols: Id dtype integer, Method Id dtype text, Type dtype text, Name dtype text, Repo table Repo Cols: Id dtype integer, Url dtype text, Stars dtype integer, Forks dtype integer, Watchers dtype integer, Processed Time dtype integer, Solution table Solution Cols: Id dtype integer, Repository Id dtype integer, Path dtype text, Processed Time dtype integer, Was Compiled dtype integer,
codebase_comments
What is the time of sampling of the solution with the highest sampling time? Indicate the id number of the solution.
highest sampling time refers to max(SampledAt); id number of the solution refers to SolutionId;
SELECT DISTINCT SampledAt, SolutionId FROM Method WHERE SampledAt = ( SELECT MAX(SampledAt) FROM Method )
database name:db_id codebase_comments Method table Method Cols: Id dtype integer, Name dtype text, Full Comment dtype text, Summary dtype text, Api Calls dtype text, CommentIs Xml dtype integer, Sampled At dtype integer, Solution Id dtype integer, Language dtype text, Name Tokenized dtype text, MethodParameter table MethodParameter Cols: Id dtype integer, Method Id dtype text, Type dtype text, Name dtype text, Repo table Repo Cols: Id dtype integer, Url dtype text, Stars dtype integer, Forks dtype integer, Watchers dtype integer, Processed Time dtype integer, Solution table Solution Cols: Id dtype integer, Repository Id dtype integer, Path dtype text, Processed Time dtype integer, Was Compiled dtype integer,
codebase_comments
How many followers do the most followed repository on Github have? Give the github address of the repository.
more forks refers to more people follow this repository; most followed repository refers to max(Forks);  the github address of the repository refers to Url;
SELECT Forks, Url FROM Repo WHERE Forks = ( SELECT MAX(Forks) FROM Repo )
database name:db_id codebase_comments Method table Method Cols: Id dtype integer, Name dtype text, Full Comment dtype text, Summary dtype text, Api Calls dtype text, CommentIs Xml dtype integer, Sampled At dtype integer, Solution Id dtype integer, Language dtype text, Name Tokenized dtype text, MethodParameter table MethodParameter Cols: Id dtype integer, Method Id dtype text, Type dtype text, Name dtype text, Repo table Repo Cols: Id dtype integer, Url dtype text, Stars dtype integer, Forks dtype integer, Watchers dtype integer, Processed Time dtype integer, Solution table Solution Cols: Id dtype integer, Repository Id dtype integer, Path dtype text, Processed Time dtype integer, Was Compiled dtype integer,
codebase_comments
What is the id of the repository with the highest number of solution path?
highest number of solution path refers to max(count(Path)); id of the repository refers to RepoId
SELECT RepoId FROM solution GROUP BY RepoId ORDER BY COUNT(Path) DESC LIMIT 1
database name:db_id codebase_comments Method table Method Cols: Id dtype integer, Name dtype text, Full Comment dtype text, Summary dtype text, Api Calls dtype text, CommentIs Xml dtype integer, Sampled At dtype integer, Solution Id dtype integer, Language dtype text, Name Tokenized dtype text, MethodParameter table MethodParameter Cols: Id dtype integer, Method Id dtype text, Type dtype text, Name dtype text, Repo table Repo Cols: Id dtype integer, Url dtype text, Stars dtype integer, Forks dtype integer, Watchers dtype integer, Processed Time dtype integer, Solution table Solution Cols: Id dtype integer, Repository Id dtype integer, Path dtype text, Processed Time dtype integer, Was Compiled dtype integer,
codebase_comments
What is the most liked repository? Indicate its github address and the amount of stars it has received.
more stars mean more people like this repository; most liked refers to max(Stars); the github address of repository refers to Url;
SELECT Url, Stars FROM Repo WHERE Stars = ( SELECT MAX(Stars) FROM Repo )
database name:db_id codebase_comments Method table Method Cols: Id dtype integer, Name dtype text, Full Comment dtype text, Summary dtype text, Api Calls dtype text, CommentIs Xml dtype integer, Sampled At dtype integer, Solution Id dtype integer, Language dtype text, Name Tokenized dtype text, MethodParameter table MethodParameter Cols: Id dtype integer, Method Id dtype text, Type dtype text, Name dtype text, Repo table Repo Cols: Id dtype integer, Url dtype text, Stars dtype integer, Forks dtype integer, Watchers dtype integer, Processed Time dtype integer, Solution table Solution Cols: Id dtype integer, Repository Id dtype integer, Path dtype text, Processed Time dtype integer, Was Compiled dtype integer,
codebase_comments
What is the name of the solution path with the highest processed time?
highest processed time refers to max(ProcessedTime);
SELECT Path FROM Solution WHERE ProcessedTime = ( SELECT MAX(ProcessedTime) FROM Solution )
database name:db_id codebase_comments Method table Method Cols: Id dtype integer, Name dtype text, Full Comment dtype text, Summary dtype text, Api Calls dtype text, CommentIs Xml dtype integer, Sampled At dtype integer, Solution Id dtype integer, Language dtype text, Name Tokenized dtype text, MethodParameter table MethodParameter Cols: Id dtype integer, Method Id dtype text, Type dtype text, Name dtype text, Repo table Repo Cols: Id dtype integer, Url dtype text, Stars dtype integer, Forks dtype integer, Watchers dtype integer, Processed Time dtype integer, Solution table Solution Cols: Id dtype integer, Repository Id dtype integer, Path dtype text, Processed Time dtype integer, Was Compiled dtype integer,
codebase_comments
How much is the processed time of downloading the most popular repository?
more watchers mean that this repository is more popular;
SELECT ProcessedTime FROM Repo WHERE Watchers = ( SELECT MAX(Watchers) FROM Repo )
database name:db_id codebase_comments Method table Method Cols: Id dtype integer, Name dtype text, Full Comment dtype text, Summary dtype text, Api Calls dtype text, CommentIs Xml dtype integer, Sampled At dtype integer, Solution Id dtype integer, Language dtype text, Name Tokenized dtype text, MethodParameter table MethodParameter Cols: Id dtype integer, Method Id dtype text, Type dtype text, Name dtype text, Repo table Repo Cols: Id dtype integer, Url dtype text, Stars dtype integer, Forks dtype integer, Watchers dtype integer, Processed Time dtype integer, Solution table Solution Cols: Id dtype integer, Repository Id dtype integer, Path dtype text, Processed Time dtype integer, Was Compiled dtype integer,
codebase_comments
What is the github address of the "nofear_Mara\Mara.sln" solution path?
github address of repository refers to Url;
SELECT Url FROM Repo AS T1 INNER JOIN Solution AS T2 ON T1.Id = T2.RepoId WHERE Path = 'nofear_MaraMara.sln'
database name:db_id codebase_comments Method table Method Cols: Id dtype integer, Name dtype text, Full Comment dtype text, Summary dtype text, Api Calls dtype text, CommentIs Xml dtype integer, Sampled At dtype integer, Solution Id dtype integer, Language dtype text, Name Tokenized dtype text, MethodParameter table MethodParameter Cols: Id dtype integer, Method Id dtype text, Type dtype text, Name dtype text, Repo table Repo Cols: Id dtype integer, Url dtype text, Stars dtype integer, Forks dtype integer, Watchers dtype integer, Processed Time dtype integer, Solution table Solution Cols: Id dtype integer, Repository Id dtype integer, Path dtype text, Processed Time dtype integer, Was Compiled dtype integer,
codebase_comments
Which repository has the longest amount of processed time of downloading? Indicate whether the solution paths in the repository can be implemented without needs of compilation.
longest amount of processed time refers to max(ProcessedTime); the repository can be implemented without needs of compilation refers to WasCompiled = 1;
SELECT DISTINCT T1.id, T2.WasCompiled FROM Repo AS T1 INNER JOIN Solution AS T2 ON T1.Id = T2.RepoId WHERE T1.ProcessedTime = ( SELECT MAX(ProcessedTime) FROM Repo )
database name:db_id codebase_comments Method table Method Cols: Id dtype integer, Name dtype text, Full Comment dtype text, Summary dtype text, Api Calls dtype text, CommentIs Xml dtype integer, Sampled At dtype integer, Solution Id dtype integer, Language dtype text, Name Tokenized dtype text, MethodParameter table MethodParameter Cols: Id dtype integer, Method Id dtype text, Type dtype text, Name dtype text, Repo table Repo Cols: Id dtype integer, Url dtype text, Stars dtype integer, Forks dtype integer, Watchers dtype integer, Processed Time dtype integer, Solution table Solution Cols: Id dtype integer, Repository Id dtype integer, Path dtype text, Processed Time dtype integer, Was Compiled dtype integer,
codebase_comments
What is the tokenized name of the solution whose path is "maravillas_linq-to-delicious\tasty.sln"?
tokenized name refers to NameTokenized
SELECT DISTINCT T2.NameTokenized FROM Solution AS T1 INNER JOIN Method AS T2 ON T1.Id = T2.SolutionId WHERE T1.Path = 'maravillas_linq-to-delicious'
database name:db_id codebase_comments Method table Method Cols: Id dtype integer, Name dtype text, Full Comment dtype text, Summary dtype text, Api Calls dtype text, CommentIs Xml dtype integer, Sampled At dtype integer, Solution Id dtype integer, Language dtype text, Name Tokenized dtype text, MethodParameter table MethodParameter Cols: Id dtype integer, Method Id dtype text, Type dtype text, Name dtype text, Repo table Repo Cols: Id dtype integer, Url dtype text, Stars dtype integer, Forks dtype integer, Watchers dtype integer, Processed Time dtype integer, Solution table Solution Cols: Id dtype integer, Repository Id dtype integer, Path dtype text, Processed Time dtype integer, Was Compiled dtype integer,
codebase_comments
Among the repositories whose number of stars received are between 6,000 to 9,000, which repository has the highest number of solution paths and many of those solution paths needs to be compiled if user wants to implement it?
Stars between 6,000 to 9,000; highest number of solution paths refers to max(count(Path)); needs to be compiled if user wants to implement it refers to WasCompiled = 0;
SELECT T2.RepoId, COUNT(T2.RepoId) FROM Repo AS T1 INNER JOIN Solution AS T2 ON T1.Id = T2.RepoId WHERE T1.Stars BETWEEN 6000 AND 9000 AND T2.WasCompiled = 0 GROUP BY T2.RepoId ORDER BY COUNT(T2.RepoId) DESC LIMIT 1
database name:db_id codebase_comments Method table Method Cols: Id dtype integer, Name dtype text, Full Comment dtype text, Summary dtype text, Api Calls dtype text, CommentIs Xml dtype integer, Sampled At dtype integer, Solution Id dtype integer, Language dtype text, Name Tokenized dtype text, MethodParameter table MethodParameter Cols: Id dtype integer, Method Id dtype text, Type dtype text, Name dtype text, Repo table Repo Cols: Id dtype integer, Url dtype text, Stars dtype integer, Forks dtype integer, Watchers dtype integer, Processed Time dtype integer, Solution table Solution Cols: Id dtype integer, Repository Id dtype integer, Path dtype text, Processed Time dtype integer, Was Compiled dtype integer,
codebase_comments
In the "https://github.com/wallerdev/htmlsharp.git", give all the linearized sequenced of API calls.
linearized sequenced of API calls refers to ApiCalls; 'https://github.com/wallerdev/htmlsharp.git' is url of repository
SELECT T3.ApiCalls FROM Repo AS T1 INNER JOIN Solution AS T2 ON T1.Id = T2.RepoId INNER JOIN Method AS T3 ON T2.Id = T3.SolutionId WHERE T1.Url = 'https://github.com/wallerdev/htmlsharp.git'
database name:db_id codebase_comments Method table Method Cols: Id dtype integer, Name dtype text, Full Comment dtype text, Summary dtype text, Api Calls dtype text, CommentIs Xml dtype integer, Sampled At dtype integer, Solution Id dtype integer, Language dtype text, Name Tokenized dtype text, MethodParameter table MethodParameter Cols: Id dtype integer, Method Id dtype text, Type dtype text, Name dtype text, Repo table Repo Cols: Id dtype integer, Url dtype text, Stars dtype integer, Forks dtype integer, Watchers dtype integer, Processed Time dtype integer, Solution table Solution Cols: Id dtype integer, Repository Id dtype integer, Path dtype text, Processed Time dtype integer, Was Compiled dtype integer,
codebase_comments
How many solution paths are there inside the 2nd most popular repository?
more watchers mean that this repository is more popular; most popular repository refers to max(Watchers);
SELECT COUNT(DISTINCT T2.Path) FROM Repo AS T1 INNER JOIN Solution AS T2 ON T1.Id = T2.RepoId WHERE T1.Watchers = ( SELECT Watchers FROM Repo ORDER BY Watchers DESC LIMIT 1, 1 )
database name:db_id codebase_comments Method table Method Cols: Id dtype integer, Name dtype text, Full Comment dtype text, Summary dtype text, Api Calls dtype text, CommentIs Xml dtype integer, Sampled At dtype integer, Solution Id dtype integer, Language dtype text, Name Tokenized dtype text, MethodParameter table MethodParameter Cols: Id dtype integer, Method Id dtype text, Type dtype text, Name dtype text, Repo table Repo Cols: Id dtype integer, Url dtype text, Stars dtype integer, Forks dtype integer, Watchers dtype integer, Processed Time dtype integer, Solution table Solution Cols: Id dtype integer, Repository Id dtype integer, Path dtype text, Processed Time dtype integer, Was Compiled dtype integer,
codebase_comments
What is the average processed time of the solution paths inside the "https://github.com/zphingphong/DiscardCustomerApp.git"?
average processed time = avg(Solution.ProcessedTime);
SELECT CAST(SUM(T2.ProcessedTime) AS REAL) / COUNT(T2.RepoId) FROM Repo AS T1 INNER JOIN Solution AS T2 ON T1.Id = T2.RepoId WHERE T1.Url = 'https://github.com/zphingphong/DiscardCustomerApp.git'
database name:db_id codebase_comments Method table Method Cols: Id dtype integer, Name dtype text, Full Comment dtype text, Summary dtype text, Api Calls dtype text, CommentIs Xml dtype integer, Sampled At dtype integer, Solution Id dtype integer, Language dtype text, Name Tokenized dtype text, MethodParameter table MethodParameter Cols: Id dtype integer, Method Id dtype text, Type dtype text, Name dtype text, Repo table Repo Cols: Id dtype integer, Url dtype text, Stars dtype integer, Forks dtype integer, Watchers dtype integer, Processed Time dtype integer, Solution table Solution Cols: Id dtype integer, Repository Id dtype integer, Path dtype text, Processed Time dtype integer, Was Compiled dtype integer,
codebase_comments
What is the full comment on the method whose solution path is "bmatzelle_nini\Source\Nini.sln" with a tokenized name of "alias text add alias"?
null
SELECT T2.FullComment FROM Solution AS T1 INNER JOIN Method AS T2 ON T1.Id = T2.SolutionId WHERE T1.Path = 'bmatzelle_niniSourceNini.sln' AND T2.NameTokenized = 'alias text add alias'
database name:db_id codebase_comments Method table Method Cols: Id dtype integer, Name dtype text, Full Comment dtype text, Summary dtype text, Api Calls dtype text, CommentIs Xml dtype integer, Sampled At dtype integer, Solution Id dtype integer, Language dtype text, Name Tokenized dtype text, MethodParameter table MethodParameter Cols: Id dtype integer, Method Id dtype text, Type dtype text, Name dtype text, Repo table Repo Cols: Id dtype integer, Url dtype text, Stars dtype integer, Forks dtype integer, Watchers dtype integer, Processed Time dtype integer, Solution table Solution Cols: Id dtype integer, Repository Id dtype integer, Path dtype text, Processed Time dtype integer, Was Compiled dtype integer,
codebase_comments
What is the linearized sequenced of API calls of the method whose solution path is "mauriciodeamorim_tdd.encontro2\Tdd.Encontro2.sln"?
linearized sequenced of API calls refers to ApiCalls;
SELECT T2.ApiCalls FROM Solution AS T1 INNER JOIN Method AS T2 ON T1.Id = T2.SolutionId WHERE T1.Path = 'mauriciodeamorim_tdd.encontro2Tdd.Encontro2.sln'
database name:db_id codebase_comments Method table Method Cols: Id dtype integer, Name dtype text, Full Comment dtype text, Summary dtype text, Api Calls dtype text, CommentIs Xml dtype integer, Sampled At dtype integer, Solution Id dtype integer, Language dtype text, Name Tokenized dtype text, MethodParameter table MethodParameter Cols: Id dtype integer, Method Id dtype text, Type dtype text, Name dtype text, Repo table Repo Cols: Id dtype integer, Url dtype text, Stars dtype integer, Forks dtype integer, Watchers dtype integer, Processed Time dtype integer, Solution table Solution Cols: Id dtype integer, Repository Id dtype integer, Path dtype text, Processed Time dtype integer, Was Compiled dtype integer,
codebase_comments
How many solution paths that needs to be compiled if user wants to implement it in "https://github.com/jeffdik/tachy.git"?
needs to be compiled if user wants to implement refers to WasCompiled = 0; https://github.com/jeffdik/tachy.git is url of repository
SELECT COUNT(T2.Path) FROM Repo AS T1 INNER JOIN Solution AS T2 ON T1.Id = T2.RepoId WHERE T1.Url = 'https://github.com/jeffdik/tachy.git' AND T2.WasCompiled = 0
database name:db_id codebase_comments Method table Method Cols: Id dtype integer, Name dtype text, Full Comment dtype text, Summary dtype text, Api Calls dtype text, CommentIs Xml dtype integer, Sampled At dtype integer, Solution Id dtype integer, Language dtype text, Name Tokenized dtype text, MethodParameter table MethodParameter Cols: Id dtype integer, Method Id dtype text, Type dtype text, Name dtype text, Repo table Repo Cols: Id dtype integer, Url dtype text, Stars dtype integer, Forks dtype integer, Watchers dtype integer, Processed Time dtype integer, Solution table Solution Cols: Id dtype integer, Repository Id dtype integer, Path dtype text, Processed Time dtype integer, Was Compiled dtype integer,
codebase_comments
How much is the processed time of the method whose tokenized name is "about box1 dispose"? Indicate the language of the method.
language refers to Lang;
SELECT DISTINCT T1.ProcessedTime, T2.Lang FROM Solution AS T1 INNER JOIN Method AS T2 ON T1.Id = T2.SolutionId WHERE T2.NameTokenized = 'about box1 dispose'
database name:db_id codebase_comments Method table Method Cols: Id dtype integer, Name dtype text, Full Comment dtype text, Summary dtype text, Api Calls dtype text, CommentIs Xml dtype integer, Sampled At dtype integer, Solution Id dtype integer, Language dtype text, Name Tokenized dtype text, MethodParameter table MethodParameter Cols: Id dtype integer, Method Id dtype text, Type dtype text, Name dtype text, Repo table Repo Cols: Id dtype integer, Url dtype text, Stars dtype integer, Forks dtype integer, Watchers dtype integer, Processed Time dtype integer, Solution table Solution Cols: Id dtype integer, Repository Id dtype integer, Path dtype text, Processed Time dtype integer, Was Compiled dtype integer,
codebase_comments
In "maxild_playground\Playground.sln", what is the time of sampling for the method "GitHubRepo.Cli.GitHubClientWrapper.GetReleases"?
the time of sampling refers to SampledAt; 'maxild_playground\Playground.sln' is the path of a solution
SELECT T2.SampledAt FROM Solution AS T1 INNER JOIN Method AS T2 ON T1.Id = T2.SolutionId WHERE T1.Path = 'maxild_playgroundPlayground.sln' AND T2.Name = 'GitHubRepo.Cli.GitHubClientWrapper.GetReleases'
database name:db_id codebase_comments Method table Method Cols: Id dtype integer, Name dtype text, Full Comment dtype text, Summary dtype text, Api Calls dtype text, CommentIs Xml dtype integer, Sampled At dtype integer, Solution Id dtype integer, Language dtype text, Name Tokenized dtype text, MethodParameter table MethodParameter Cols: Id dtype integer, Method Id dtype text, Type dtype text, Name dtype text, Repo table Repo Cols: Id dtype integer, Url dtype text, Stars dtype integer, Forks dtype integer, Watchers dtype integer, Processed Time dtype integer, Solution table Solution Cols: Id dtype integer, Repository Id dtype integer, Path dtype text, Processed Time dtype integer, Was Compiled dtype integer,
codebase_comments
What is the language of the method used in the solution path "opendns_diagnosticapp\windows\OpenDnsDiagnostic.sln"?
language refers to Lang;
SELECT T2.Lang FROM Solution AS T1 INNER JOIN Method AS T2 ON T1.Id = T2.SolutionId WHERE T1.Path = 'opendns_diagnosticappwindowsOpenDnsDiagnostic.sln'
database name:db_id codebase_comments Method table Method Cols: Id dtype integer, Name dtype text, Full Comment dtype text, Summary dtype text, Api Calls dtype text, CommentIs Xml dtype integer, Sampled At dtype integer, Solution Id dtype integer, Language dtype text, Name Tokenized dtype text, MethodParameter table MethodParameter Cols: Id dtype integer, Method Id dtype text, Type dtype text, Name dtype text, Repo table Repo Cols: Id dtype integer, Url dtype text, Stars dtype integer, Forks dtype integer, Watchers dtype integer, Processed Time dtype integer, Solution table Solution Cols: Id dtype integer, Repository Id dtype integer, Path dtype text, Processed Time dtype integer, Was Compiled dtype integer,
codebase_comments
What's the task of the method whose tokenized name is "html parser feed"?
tokenized name refers to NameTokenized; task of the method refers to the second part of name deliminated by "."; for example, the task of 'LinqToDelicious.HttpWebRequestFactory.Create' is 'HttpWebRequestFactory'
SELECT SUBSTR(SUBSTR(Name, INSTR(Name, '.') + 1), 1, INSTR(SUBSTR(Name, INSTR(Name, '.') + 1), '.') - 1) task FROM Method WHERE NameTokenized = 'html parser feed'
database name:db_id codebase_comments Method table Method Cols: Id dtype integer, Name dtype text, Full Comment dtype text, Summary dtype text, Api Calls dtype text, CommentIs Xml dtype integer, Sampled At dtype integer, Solution Id dtype integer, Language dtype text, Name Tokenized dtype text, MethodParameter table MethodParameter Cols: Id dtype integer, Method Id dtype text, Type dtype text, Name dtype text, Repo table Repo Cols: Id dtype integer, Url dtype text, Stars dtype integer, Forks dtype integer, Watchers dtype integer, Processed Time dtype integer, Solution table Solution Cols: Id dtype integer, Repository Id dtype integer, Path dtype text, Processed Time dtype integer, Was Compiled dtype integer,
codebase_comments
Are the comments for the method "HtmlSharp.HtmlParser.Feed" in XML format?
the comment for this method is not XML refers to CommentsXML = 0; the comments for this method is XML refers to CommentsXML = 1
SELECT CASE WHEN CommentIsXml = 0 THEN 'No' WHEN CommentIsXml = 1 THEN 'Yes' END isXMLFormat FROM Method WHERE Name = 'HtmlSharp.HtmlParser.Feed'
database name:db_id codebase_comments Method table Method Cols: Id dtype integer, Name dtype text, Full Comment dtype text, Summary dtype text, Api Calls dtype text, CommentIs Xml dtype integer, Sampled At dtype integer, Solution Id dtype integer, Language dtype text, Name Tokenized dtype text, MethodParameter table MethodParameter Cols: Id dtype integer, Method Id dtype text, Type dtype text, Name dtype text, Repo table Repo Cols: Id dtype integer, Url dtype text, Stars dtype integer, Forks dtype integer, Watchers dtype integer, Processed Time dtype integer, Solution table Solution Cols: Id dtype integer, Repository Id dtype integer, Path dtype text, Processed Time dtype integer, Was Compiled dtype integer,
codebase_comments
Which method has the summary "Write a command to the log"?
null
SELECT Name FROM Method WHERE Summary = 'Write a command to the log'
database name:db_id codebase_comments Method table Method Cols: Id dtype integer, Name dtype text, Full Comment dtype text, Summary dtype text, Api Calls dtype text, CommentIs Xml dtype integer, Sampled At dtype integer, Solution Id dtype integer, Language dtype text, Name Tokenized dtype text, MethodParameter table MethodParameter Cols: Id dtype integer, Method Id dtype text, Type dtype text, Name dtype text, Repo table Repo Cols: Id dtype integer, Url dtype text, Stars dtype integer, Forks dtype integer, Watchers dtype integer, Processed Time dtype integer, Solution table Solution Cols: Id dtype integer, Repository Id dtype integer, Path dtype text, Processed Time dtype integer, Was Compiled dtype integer,
codebase_comments
How many solutions contain files found within the repository most people like?
more stars mean more people like this repository; most people like refers to max(Stars);
SELECT COUNT(T2.RepoId) FROM Repo AS T1 INNER JOIN Solution AS T2 ON T1.Id = T2.RepoId WHERE T1.Stars = ( SELECT MAX(Stars) FROM Repo )
database name:db_id codebase_comments Method table Method Cols: Id dtype integer, Name dtype text, Full Comment dtype text, Summary dtype text, Api Calls dtype text, CommentIs Xml dtype integer, Sampled At dtype integer, Solution Id dtype integer, Language dtype text, Name Tokenized dtype text, MethodParameter table MethodParameter Cols: Id dtype integer, Method Id dtype text, Type dtype text, Name dtype text, Repo table Repo Cols: Id dtype integer, Url dtype text, Stars dtype integer, Forks dtype integer, Watchers dtype integer, Processed Time dtype integer, Solution table Solution Cols: Id dtype integer, Repository Id dtype integer, Path dtype text, Processed Time dtype integer, Was Compiled dtype integer,
codebase_comments
Please list the path of the solution that contains files found within the repository most people like.
more stars mean more people like this repository; most people like refers to max(Stars);
SELECT DISTINCT T2.Path FROM Repo AS T1 INNER JOIN Solution AS T2 ON T1.Id = T2.RepoId WHERE T1.Stars = ( SELECT MAX(Stars) FROM Repo )
database name:db_id codebase_comments Method table Method Cols: Id dtype integer, Name dtype text, Full Comment dtype text, Summary dtype text, Api Calls dtype text, CommentIs Xml dtype integer, Sampled At dtype integer, Solution Id dtype integer, Language dtype text, Name Tokenized dtype text, MethodParameter table MethodParameter Cols: Id dtype integer, Method Id dtype text, Type dtype text, Name dtype text, Repo table Repo Cols: Id dtype integer, Url dtype text, Stars dtype integer, Forks dtype integer, Watchers dtype integer, Processed Time dtype integer, Solution table Solution Cols: Id dtype integer, Repository Id dtype integer, Path dtype text, Processed Time dtype integer, Was Compiled dtype integer,
codebase_comments
What is the github address of the repository that contains files used by solution ID12?
github address refers to Url;
SELECT T1.Url FROM Repo AS T1 INNER JOIN Solution AS T2 ON T1.Id = T2.RepoId WHERE T2.Id = 12
database name:db_id codebase_comments Method table Method Cols: Id dtype integer, Name dtype text, Full Comment dtype text, Summary dtype text, Api Calls dtype text, CommentIs Xml dtype integer, Sampled At dtype integer, Solution Id dtype integer, Language dtype text, Name Tokenized dtype text, MethodParameter table MethodParameter Cols: Id dtype integer, Method Id dtype text, Type dtype text, Name dtype text, Repo table Repo Cols: Id dtype integer, Url dtype text, Stars dtype integer, Forks dtype integer, Watchers dtype integer, Processed Time dtype integer, Solution table Solution Cols: Id dtype integer, Repository Id dtype integer, Path dtype text, Processed Time dtype integer, Was Compiled dtype integer,
codebase_comments
Among the solutions that contain files within the repository followed by over 1000 people, how many of them can be implemented without needs of compilation?
followed by over 1000 people refers to Forks >1000; can be implemented without needs of compilation refers to WasCompiled = 1;
SELECT COUNT(T2.RepoId) FROM Repo AS T1 INNER JOIN Solution AS T2 ON T1.Id = T2.RepoId WHERE T1.Forks > 1000 AND T2.WasCompiled = 1
database name:db_id codebase_comments Method table Method Cols: Id dtype integer, Name dtype text, Full Comment dtype text, Summary dtype text, Api Calls dtype text, CommentIs Xml dtype integer, Sampled At dtype integer, Solution Id dtype integer, Language dtype text, Name Tokenized dtype text, MethodParameter table MethodParameter Cols: Id dtype integer, Method Id dtype text, Type dtype text, Name dtype text, Repo table Repo Cols: Id dtype integer, Url dtype text, Stars dtype integer, Forks dtype integer, Watchers dtype integer, Processed Time dtype integer, Solution table Solution Cols: Id dtype integer, Repository Id dtype integer, Path dtype text, Processed Time dtype integer, Was Compiled dtype integer,
codebase_comments
Which solution contains files within a more popular repository, the solution ID18 or solution ID19?
more watchers mean that this repository is more popular;
SELECT CASE WHEN SUM(CASE WHEN T2.Id = 18 THEN T1.Watchers ELSE 0 END) > SUM(CASE WHEN T2.Id = 19 THEN T1.Watchers ELSE 0 END) THEN 'SolutionID18' WHEN SUM(CASE WHEN T2.Id = 18 THEN T1.Watchers ELSE 0 END) < SUM(CASE WHEN T2.Id = 19 THEN T1.Watchers ELSE 0 END) THEN 'SolutionID19' END isMorePopular FROM Repo AS T1 INNER JOIN Solution AS T2 ON T1.Id = T2.RepoId
database name:db_id codebase_comments Method table Method Cols: Id dtype integer, Name dtype text, Full Comment dtype text, Summary dtype text, Api Calls dtype text, CommentIs Xml dtype integer, Sampled At dtype integer, Solution Id dtype integer, Language dtype text, Name Tokenized dtype text, MethodParameter table MethodParameter Cols: Id dtype integer, Method Id dtype text, Type dtype text, Name dtype text, Repo table Repo Cols: Id dtype integer, Url dtype text, Stars dtype integer, Forks dtype integer, Watchers dtype integer, Processed Time dtype integer, Solution table Solution Cols: Id dtype integer, Repository Id dtype integer, Path dtype text, Processed Time dtype integer, Was Compiled dtype integer,
codebase_comments
Among the solutions that contain files within the repository needing the longest processed time to download, how many of them doesn't need to be compiled if user wants to implement it?
longest processed time refers to max(Solution.ProcessedTime); needs to be compiled if user wants to implement it refers to WasCompiled = 0;
SELECT COUNT(T2.RepoId) FROM Repo AS T1 INNER JOIN Solution AS T2 ON T1.Id = T2.RepoId WHERE T1.ProcessedTime = ( SELECT MAX(ProcessedTime) FROM Repo ) AND T2.WasCompiled = 1
database name:db_id codebase_comments Method table Method Cols: Id dtype integer, Name dtype text, Full Comment dtype text, Summary dtype text, Api Calls dtype text, CommentIs Xml dtype integer, Sampled At dtype integer, Solution Id dtype integer, Language dtype text, Name Tokenized dtype text, MethodParameter table MethodParameter Cols: Id dtype integer, Method Id dtype text, Type dtype text, Name dtype text, Repo table Repo Cols: Id dtype integer, Url dtype text, Stars dtype integer, Forks dtype integer, Watchers dtype integer, Processed Time dtype integer, Solution table Solution Cols: Id dtype integer, Repository Id dtype integer, Path dtype text, Processed Time dtype integer, Was Compiled dtype integer,
codebase_comments
What is the processed time to download the repository whose files are contained in the solution with the path "jeffdik_tachy\src\Tachy.sln".
null
SELECT DISTINCT T2.ProcessedTime FROM Repo AS T1 INNER JOIN Solution AS T2 ON T1.Id = T2.RepoId WHERE T2.Path = 'jeffdik_tachysrcTachy.sln'
database name:db_id codebase_comments Method table Method Cols: Id dtype integer, Name dtype text, Full Comment dtype text, Summary dtype text, Api Calls dtype text, CommentIs Xml dtype integer, Sampled At dtype integer, Solution Id dtype integer, Language dtype text, Name Tokenized dtype text, MethodParameter table MethodParameter Cols: Id dtype integer, Method Id dtype text, Type dtype text, Name dtype text, Repo table Repo Cols: Id dtype integer, Url dtype text, Stars dtype integer, Forks dtype integer, Watchers dtype integer, Processed Time dtype integer, Solution table Solution Cols: Id dtype integer, Repository Id dtype integer, Path dtype text, Processed Time dtype integer, Was Compiled dtype integer,
codebase_comments
Please give the url of the repository whose files are contained in solution ID 9?
null
SELECT T1.Url FROM Repo AS T1 INNER JOIN Solution AS T2 ON T1.Id = T2.RepoId WHERE T2.Id = 9
database name:db_id codebase_comments Method table Method Cols: Id dtype integer, Name dtype text, Full Comment dtype text, Summary dtype text, Api Calls dtype text, CommentIs Xml dtype integer, Sampled At dtype integer, Solution Id dtype integer, Language dtype text, Name Tokenized dtype text, MethodParameter table MethodParameter Cols: Id dtype integer, Method Id dtype text, Type dtype text, Name dtype text, Repo table Repo Cols: Id dtype integer, Url dtype text, Stars dtype integer, Forks dtype integer, Watchers dtype integer, Processed Time dtype integer, Solution table Solution Cols: Id dtype integer, Repository Id dtype integer, Path dtype text, Processed Time dtype integer, Was Compiled dtype integer,
codebase_comments
Please list all the paths of the solutions containing files within the repository whose url is "https://github.com/maxild/playground.git".
null
SELECT T2.Path FROM Repo AS T1 INNER JOIN Solution AS T2 ON T1.Id = T2.RepoId WHERE T1.Url = 'https://github.com/maxild/playground.git'
database name:db_id codebase_comments Method table Method Cols: Id dtype integer, Name dtype text, Full Comment dtype text, Summary dtype text, Api Calls dtype text, CommentIs Xml dtype integer, Sampled At dtype integer, Solution Id dtype integer, Language dtype text, Name Tokenized dtype text, MethodParameter table MethodParameter Cols: Id dtype integer, Method Id dtype text, Type dtype text, Name dtype text, Repo table Repo Cols: Id dtype integer, Url dtype text, Stars dtype integer, Forks dtype integer, Watchers dtype integer, Processed Time dtype integer, Solution table Solution Cols: Id dtype integer, Repository Id dtype integer, Path dtype text, Processed Time dtype integer, Was Compiled dtype integer,
codebase_comments
Among the repositories with over 200 likes, how many of them have files contained by solutions with a processed time of under 636439500080712000?
over 200 likes refers to Stars > 200; ProcessedTime<636439500080712000;
SELECT COUNT(T2.RepoId) FROM Repo AS T1 INNER JOIN Solution AS T2 ON T1.Id = T2.RepoId WHERE T2.ProcessedTime < 636439500080712000 AND T1.Stars > 200
database name:db_id codebase_comments Method table Method Cols: Id dtype integer, Name dtype text, Full Comment dtype text, Summary dtype text, Api Calls dtype text, CommentIs Xml dtype integer, Sampled At dtype integer, Solution Id dtype integer, Language dtype text, Name Tokenized dtype text, MethodParameter table MethodParameter Cols: Id dtype integer, Method Id dtype text, Type dtype text, Name dtype text, Repo table Repo Cols: Id dtype integer, Url dtype text, Stars dtype integer, Forks dtype integer, Watchers dtype integer, Processed Time dtype integer, Solution table Solution Cols: Id dtype integer, Repository Id dtype integer, Path dtype text, Processed Time dtype integer, Was Compiled dtype integer,