db_id
stringclasses
69 values
question
stringlengths
24
325
evidence
stringlengths
1
673
SQL
stringlengths
23
804
schema
stringclasses
69 values
retail_complains
What are the issues of the complains of male clients and products from age 25 and below?
male refers to sex = 'Male'; age 25 and below refers to age < 25
SELECT DISTINCT T2.Issue FROM client AS T1 INNER JOIN events AS T2 ON T1.client_id = T2.Client_ID WHERE T1.sex = 'Male' AND T1.age < 25
database name:db_id retail_complains state table state Cols: StateCode dtype text, State dtype text, Region dtype text, callcenterlogs table callcenterlogs Cols: Date received dtype date, Complaint ID dtype text, rand client dtype text, phone final dtype text, voice response unit line dtype text, call id dtype integer, priority dtype integer, type dtype text, outcome dtype text, server dtype text, server start dtype text, server exit dtype text, server time dtype text, client table client Cols: client id dtype text, sex dtype text, day dtype integer, month dtype integer, year dtype integer, age dtype integer, social dtype text, first dtype text, middle dtype text, last dtype text, phone dtype text, email dtype text, address_1 dtype text, address_2 dtype text, city dtype text, state dtype text, zipcode dtype integer, district id dtype integer, district table district Cols: district id dtype integer, city dtype text, state_abbrev dtype text, division dtype text, events table events Cols: Date received dtype date, Product dtype text, Sub-product dtype text, Issue dtype text, Sub-issue dtype text, Consumer complaint narrative dtype text, Tags dtype text, Tags Consumer consent provided? dtype text, Submitted via dtype text, Date sent to company dtype text, Company response to consumer dtype text, Timely response? dtype text, Consumer disputed? dtype text, Complaint ID dtype text, Client ID dtype text, reviews table reviews Cols: Date dtype date, Stars dtype integer, Reviews dtype text, Product dtype text, district_id dtype integer,
retail_complains
Among the reviews from midwest region, what are the products that received 1 star?
1 star refers to Stars = 1
SELECT DISTINCT T3.Product FROM state AS T1 INNER JOIN district AS T2 ON T1.StateCode = T2.state_abbrev INNER JOIN reviews AS T3 ON T2.district_id = T3.district_id WHERE T1.Region = 'Midwest' AND T3.Stars = 1
database name:db_id retail_complains state table state Cols: StateCode dtype text, State dtype text, Region dtype text, callcenterlogs table callcenterlogs Cols: Date received dtype date, Complaint ID dtype text, rand client dtype text, phone final dtype text, voice response unit line dtype text, call id dtype integer, priority dtype integer, type dtype text, outcome dtype text, server dtype text, server start dtype text, server exit dtype text, server time dtype text, client table client Cols: client id dtype text, sex dtype text, day dtype integer, month dtype integer, year dtype integer, age dtype integer, social dtype text, first dtype text, middle dtype text, last dtype text, phone dtype text, email dtype text, address_1 dtype text, address_2 dtype text, city dtype text, state dtype text, zipcode dtype integer, district id dtype integer, district table district Cols: district id dtype integer, city dtype text, state_abbrev dtype text, division dtype text, events table events Cols: Date received dtype date, Product dtype text, Sub-product dtype text, Issue dtype text, Sub-issue dtype text, Consumer complaint narrative dtype text, Tags dtype text, Tags Consumer consent provided? dtype text, Submitted via dtype text, Date sent to company dtype text, Company response to consumer dtype text, Timely response? dtype text, Consumer disputed? dtype text, Complaint ID dtype text, Client ID dtype text, reviews table reviews Cols: Date dtype date, Stars dtype integer, Reviews dtype text, Product dtype text, district_id dtype integer,
retail_complains
List the products involved in the complaints received on March 2017 via TOVA server.
on March 2017 refers to Date received LIKE '%03%' AND Date received LIKE '2017%'
SELECT DISTINCT T2.Product FROM callcenterlogs AS T1 INNER JOIN events AS T2 ON T1.`Complaint ID` = T2.`Complaint ID` WHERE T1.server = 'TOVA' AND T2.`Date received` LIKE '2017-03%'
database name:db_id retail_complains state table state Cols: StateCode dtype text, State dtype text, Region dtype text, callcenterlogs table callcenterlogs Cols: Date received dtype date, Complaint ID dtype text, rand client dtype text, phone final dtype text, voice response unit line dtype text, call id dtype integer, priority dtype integer, type dtype text, outcome dtype text, server dtype text, server start dtype text, server exit dtype text, server time dtype text, client table client Cols: client id dtype text, sex dtype text, day dtype integer, month dtype integer, year dtype integer, age dtype integer, social dtype text, first dtype text, middle dtype text, last dtype text, phone dtype text, email dtype text, address_1 dtype text, address_2 dtype text, city dtype text, state dtype text, zipcode dtype integer, district id dtype integer, district table district Cols: district id dtype integer, city dtype text, state_abbrev dtype text, division dtype text, events table events Cols: Date received dtype date, Product dtype text, Sub-product dtype text, Issue dtype text, Sub-issue dtype text, Consumer complaint narrative dtype text, Tags dtype text, Tags Consumer consent provided? dtype text, Submitted via dtype text, Date sent to company dtype text, Company response to consumer dtype text, Timely response? dtype text, Consumer disputed? dtype text, Complaint ID dtype text, Client ID dtype text, reviews table reviews Cols: Date dtype date, Stars dtype integer, Reviews dtype text, Product dtype text, district_id dtype integer,
retail_complains
What is the division of the review of 5 stars received on December 17, 2017 for the product Eagle National Mortgage?
5 stars refers to Stars = 5; on December 17 2017 refers to Date = '2017-12-17'
SELECT T1.division FROM district AS T1 INNER JOIN reviews AS T2 ON T1.district_id = T2.district_id WHERE T2.Stars = 5 AND T2.Date = '2017-12-17' AND T2.Product = 'Eagle National Mortgage'
database name:db_id retail_complains state table state Cols: StateCode dtype text, State dtype text, Region dtype text, callcenterlogs table callcenterlogs Cols: Date received dtype date, Complaint ID dtype text, rand client dtype text, phone final dtype text, voice response unit line dtype text, call id dtype integer, priority dtype integer, type dtype text, outcome dtype text, server dtype text, server start dtype text, server exit dtype text, server time dtype text, client table client Cols: client id dtype text, sex dtype text, day dtype integer, month dtype integer, year dtype integer, age dtype integer, social dtype text, first dtype text, middle dtype text, last dtype text, phone dtype text, email dtype text, address_1 dtype text, address_2 dtype text, city dtype text, state dtype text, zipcode dtype integer, district id dtype integer, district table district Cols: district id dtype integer, city dtype text, state_abbrev dtype text, division dtype text, events table events Cols: Date received dtype date, Product dtype text, Sub-product dtype text, Issue dtype text, Sub-issue dtype text, Consumer complaint narrative dtype text, Tags dtype text, Tags Consumer consent provided? dtype text, Submitted via dtype text, Date sent to company dtype text, Company response to consumer dtype text, Timely response? dtype text, Consumer disputed? dtype text, Complaint ID dtype text, Client ID dtype text, reviews table reviews Cols: Date dtype date, Stars dtype integer, Reviews dtype text, Product dtype text, district_id dtype integer,
retail_complains
In complaints about the credit card product, list the phone number of the oldest client.
oldest refers to max(age)
SELECT T1.phone FROM client AS T1 INNER JOIN events AS T2 ON T1.client_id = T2.Client_ID WHERE T2.Product = 'Credit card' ORDER BY T1.age DESC LIMIT 1
database name:db_id retail_complains state table state Cols: StateCode dtype text, State dtype text, Region dtype text, callcenterlogs table callcenterlogs Cols: Date received dtype date, Complaint ID dtype text, rand client dtype text, phone final dtype text, voice response unit line dtype text, call id dtype integer, priority dtype integer, type dtype text, outcome dtype text, server dtype text, server start dtype text, server exit dtype text, server time dtype text, client table client Cols: client id dtype text, sex dtype text, day dtype integer, month dtype integer, year dtype integer, age dtype integer, social dtype text, first dtype text, middle dtype text, last dtype text, phone dtype text, email dtype text, address_1 dtype text, address_2 dtype text, city dtype text, state dtype text, zipcode dtype integer, district id dtype integer, district table district Cols: district id dtype integer, city dtype text, state_abbrev dtype text, division dtype text, events table events Cols: Date received dtype date, Product dtype text, Sub-product dtype text, Issue dtype text, Sub-issue dtype text, Consumer complaint narrative dtype text, Tags dtype text, Tags Consumer consent provided? dtype text, Submitted via dtype text, Date sent to company dtype text, Company response to consumer dtype text, Timely response? dtype text, Consumer disputed? dtype text, Complaint ID dtype text, Client ID dtype text, reviews table reviews Cols: Date dtype date, Stars dtype integer, Reviews dtype text, Product dtype text, district_id dtype integer,
retail_complains
In complaints received in 2014, how many of them were submitted via call?
in 2014 refers to Date received LIKE '2014%'; submitted via call refers to Submitted via = 'Phone'
SELECT COUNT(T2.`Complaint ID`) FROM callcenterlogs AS T1 INNER JOIN events AS T2 ON T1.`Complaint ID` = T2.`Complaint ID` WHERE T2.`Submitted via` = 'Phone' AND strftime('%Y', T1.`Date received`) = '2014'
database name:db_id retail_complains state table state Cols: StateCode dtype text, State dtype text, Region dtype text, callcenterlogs table callcenterlogs Cols: Date received dtype date, Complaint ID dtype text, rand client dtype text, phone final dtype text, voice response unit line dtype text, call id dtype integer, priority dtype integer, type dtype text, outcome dtype text, server dtype text, server start dtype text, server exit dtype text, server time dtype text, client table client Cols: client id dtype text, sex dtype text, day dtype integer, month dtype integer, year dtype integer, age dtype integer, social dtype text, first dtype text, middle dtype text, last dtype text, phone dtype text, email dtype text, address_1 dtype text, address_2 dtype text, city dtype text, state dtype text, zipcode dtype integer, district id dtype integer, district table district Cols: district id dtype integer, city dtype text, state_abbrev dtype text, division dtype text, events table events Cols: Date received dtype date, Product dtype text, Sub-product dtype text, Issue dtype text, Sub-issue dtype text, Consumer complaint narrative dtype text, Tags dtype text, Tags Consumer consent provided? dtype text, Submitted via dtype text, Date sent to company dtype text, Company response to consumer dtype text, Timely response? dtype text, Consumer disputed? dtype text, Complaint ID dtype text, Client ID dtype text, reviews table reviews Cols: Date dtype date, Stars dtype integer, Reviews dtype text, Product dtype text, district_id dtype integer,
retail_complains
List the product and its issues of the complains of clients with age greater than the 60% of average age of all clients.
age greater than the 60% of average age refers to age > multiply(avg(age) , 0.6)
SELECT DISTINCT T2.Product, T2.Issue FROM client AS T1 INNER JOIN events AS T2 ON T1.client_id = T2.Client_ID WHERE T1.age * 100 > ( SELECT AVG(age) * 60 FROM client )
database name:db_id retail_complains state table state Cols: StateCode dtype text, State dtype text, Region dtype text, callcenterlogs table callcenterlogs Cols: Date received dtype date, Complaint ID dtype text, rand client dtype text, phone final dtype text, voice response unit line dtype text, call id dtype integer, priority dtype integer, type dtype text, outcome dtype text, server dtype text, server start dtype text, server exit dtype text, server time dtype text, client table client Cols: client id dtype text, sex dtype text, day dtype integer, month dtype integer, year dtype integer, age dtype integer, social dtype text, first dtype text, middle dtype text, last dtype text, phone dtype text, email dtype text, address_1 dtype text, address_2 dtype text, city dtype text, state dtype text, zipcode dtype integer, district id dtype integer, district table district Cols: district id dtype integer, city dtype text, state_abbrev dtype text, division dtype text, events table events Cols: Date received dtype date, Product dtype text, Sub-product dtype text, Issue dtype text, Sub-issue dtype text, Consumer complaint narrative dtype text, Tags dtype text, Tags Consumer consent provided? dtype text, Submitted via dtype text, Date sent to company dtype text, Company response to consumer dtype text, Timely response? dtype text, Consumer disputed? dtype text, Complaint ID dtype text, Client ID dtype text, reviews table reviews Cols: Date dtype date, Stars dtype integer, Reviews dtype text, Product dtype text, district_id dtype integer,
retail_complains
In reviews of product with 5 stars, what is the percentage of the reviews coming from the division of East North Central?
5 stars refers to Stars = 5; percentage = divide(count(division = 'East North Central', count(division)) * 100%
SELECT CAST(SUM(CASE WHEN T1.division = 'East North Central' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(T1.division) FROM district AS T1 INNER JOIN reviews AS T2 ON T1.district_id = T2.district_id WHERE T2.Stars = 5
database name:db_id retail_complains state table state Cols: StateCode dtype text, State dtype text, Region dtype text, callcenterlogs table callcenterlogs Cols: Date received dtype date, Complaint ID dtype text, rand client dtype text, phone final dtype text, voice response unit line dtype text, call id dtype integer, priority dtype integer, type dtype text, outcome dtype text, server dtype text, server start dtype text, server exit dtype text, server time dtype text, client table client Cols: client id dtype text, sex dtype text, day dtype integer, month dtype integer, year dtype integer, age dtype integer, social dtype text, first dtype text, middle dtype text, last dtype text, phone dtype text, email dtype text, address_1 dtype text, address_2 dtype text, city dtype text, state dtype text, zipcode dtype integer, district id dtype integer, district table district Cols: district id dtype integer, city dtype text, state_abbrev dtype text, division dtype text, events table events Cols: Date received dtype date, Product dtype text, Sub-product dtype text, Issue dtype text, Sub-issue dtype text, Consumer complaint narrative dtype text, Tags dtype text, Tags Consumer consent provided? dtype text, Submitted via dtype text, Date sent to company dtype text, Company response to consumer dtype text, Timely response? dtype text, Consumer disputed? dtype text, Complaint ID dtype text, Client ID dtype text, reviews table reviews Cols: Date dtype date, Stars dtype integer, Reviews dtype text, Product dtype text, district_id dtype integer,
movies_4
Please list the names of the production company of the movie "Four Rooms".
names of the production company refers to movie_company; movie "Four Rooms" refers to title = 'Four Rooms'
SELECT T1.company_name 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 T3.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
How many production companies does the movie "Four Rooms" have?
movie "Four Rooms" refers to title = 'Four Rooms'
SELECT COUNT(CNAME) 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 INNER JOIN movie AS T3 ON T2.movie_id = T3.movie_id WHERE T3.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
Please list the titles of all the movie produced by production company "Universal Pictures".
"Universal Pictures" refers to company_name = 'Universal Pictures'
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 = 'Universal Pictures'
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 latest released movie produced by production company "Universal Pictures"?
"Universal Pictures" refers to company_name = 'Universal Pictures'; latest released refers to max(release_date)
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 = 'Universal Pictures' ORDER BY T3.release_date 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 name of the director of photography of the movie "Pirates of the Caribbean: At World's End"?
name of the director of photography refers to person_name where job = 'Director of Photography'; "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_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 LIKE 'Pirates of the Caribbean: At World%s End' AND T2.job = 'Director of Photography'
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 was the job of Dariusz Wolski in the movie "Pirates of the Caribbean: At World's End"?
movie "Pirates of the Caribbean: At World's End" refers to title = 'Pirates of the Caribbean: At World''s End'
SELECT T2.job 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 LIKE 'Pirates of the Caribbean: At World%s End' AND T3.person_name = 'Dariusz Wolski'
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
Please list the names of all the crew members of the movie "Pirates of the Caribbean: At World's End".
names refers to person_name; "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_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 LIKE '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
How many crew members worked as producer in the movie "Pirates of the Caribbean: At World's End"?
worked as producer refers to job = 'Producer'; "Pirates of the Caribbean: At World's End" refers to title = 'Pirates of the Caribbean: At World''s End'
SELECT COUNT(T3.person_id) 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 LIKE 'Pirates of the Caribbean: At World%s End' 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
Please list the names of all the producers in the movie "Pirates of the Caribbean: At World's End".
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: At World''s End'
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 LIKE 'Pirates of the Caribbean: At World%s End' 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
In how many movie does Dariusz Wolski work as the director of photography?
director of photography refers to job = 'Director of Photography'
SELECT COUNT(T2.movie_id) FROM person AS T1 INNER JOIN movie_crew AS T2 ON T1.person_id = T2.person_id WHERE T1.person_name = 'Dariusz Wolski' AND T2.job = 'Director of Photography'
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 movie in which Dariusz Wolski works as the director of photography, what is the title of the one with the highest average vote?
director of photography refers to job = 'Director of Photography'; highest average vote refers to max(vote_average)
SELECT T1.title 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 T3.person_name = 'Dariusz Wolski' AND T2.job = 'Director of Photography' ORDER BY T1.vote_average 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
When was the release date of the latest movie in which Dariusz Wolski worked as a crew member?
release date of the latest movie refers to max(release_date)
SELECT T1.release_date 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 T3.person_name = 'Dariusz Wolski' ORDER BY T1.release_date 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 movie in which Dariusz Wolski works as the director of photography, what is the percentage of those movie whose vote average is over 5.0?
director of photography refers to job = 'Director of Photography'; vote average is over 8.0 refers to vote_average > 5; percentage = divide(sum(movie_id) when vote_average > 5, count(movie_id)) as percentage
SELECT CAST(COUNT(CASE WHEN T1.vote_average > 5 THEN 1 ELSE NULL END) AS REAL) * 100 / COUNT(T1.vote_average) 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 T3.person_name = 'Dariusz Wolski' AND T2.job = 'Director of Photography'
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 of the movie in which Dariusz Wolski works as the director of photography?
director of photography refers to job = 'Director of Photography'; average revenue = divide(sum(revenue), count(movie_id))
SELECT CAST(SUM(T1.revenue) AS REAL) / COUNT(T1.movie_id) 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 T3.person_name = 'Dariusz Wolski' AND T2.job = 'Director of Photography'
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
Give the name of the movie with a revenue of 559852396.
name of the movie refers to title; revenue of 559852396 refers to revenue = '559852396'
SELECT title FROM movie WHERE revenue = 559852396
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 was David Rubin's job in the movie "Days of Thunder"?
"Days of Thunder" refers to title = 'Days of Thunder'
SELECT T2.job 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 T3.person_name = 'David Rubin' AND T1.title = 'Days of Thunder'
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 directed by Michael Bay?
directed by refers to job = 'Director'
SELECT COUNT(T2.movie_id) FROM person AS T1 INNER JOIN movie_crew AS T2 ON T1.person_id = T2.person_id WHERE T1.person_name = 'Michael Bay' AND T2.job = 'Director'
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
Show the total number of keywords of the movie "I Hope They Serve Beer in Hell".
"I Hope They Serve Beer in Hell" refers to title = 'I Hope They Serve Beer in Hell';
SELECT COUNT(T2.keyword_id) FROM movie AS T1 INNER JOIN movie_keywords AS T2 ON T1.movie_id = T2.movie_id WHERE T1.title = 'I Hope They Serve Beer in Hell'
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
For the movie "Land of the Dead", who is its director?
"Land of the Dead" refers to title = 'Land of the Dead'; director refers to person_name where job = 'Director'
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 = 'Land of the Dead' AND T2.job = 'Director'
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 number of movies made by Paramount Animation.
Paramount Animation refers to company_name = 'Paramount Animation'
SELECT COUNT(T2.movie_id) FROM production_company AS T1 INNER JOIN movie_company AS T2 ON T1.company_id = T2.company_id WHERE T1.company_name = 'Paramount Animation'
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 female characters are there in the movie "Spider-Man 3"?
female characters refer to gender = 'Female'; "Spider-Man 3" refers to title = 'Spider-Man 3'
SELECT COUNT(*) FROM movie AS T1 INNER JOIN movie_cast AS T2 ON T1.movie_id = T2.movie_id INNER JOIN gender AS T3 ON T2.gender_id = T3.gender_id WHERE T1.title = 'Spider-Man 3' AND T3.gender = 'Female'
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 most used keyword in the movies.
most used keyword refers to keyword_name where max(count(keyword_name))
SELECT T1.keyword_name FROM keyword AS T1 INNER JOIN movie_keywords AS T2 ON T1.keyword_id = T2.keyword_id GROUP BY T1.keyword_name ORDER BY COUNT(T1.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 producers does the movie "The Amityville Horror" have?
producers refers to job = 'Producer'; "The Amityville Horror" refers to title = 'The Amityville Horror'
SELECT COUNT(T2.person_id) FROM movie AS T1 INNER JOIN movie_crew AS T2 ON T1.movie_id = T2.movie_id WHERE T1.title = 'The Amityville Horror' 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
What is the production company of the movie "Crazy Heart"?
movie "Crazy Heart" refers to title = 'Crazy Heart'; production company refers to company_name
SELECT T1.company_name 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 T3.title = 'Crazy Heart'
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
Give the number of movies with "saving the world" as the keyword.
"saving the world" as the keyword refers to keyword_name = 'saving the world'
SELECT COUNT(T2.movie_id) FROM keyword AS T1 INNER JOIN movie_keywords AS T2 ON T1.keyword_id = T2.keyword_id WHERE keyword_name = 'saving the world'
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
For all the movies which were produced by Cruel and Unusual Films, which one has the most popularity?
produced by Cruel and Unusual Films refers to company_name = 'Cruel and Unusual Films'; most popularity refers to max(popularity)
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 = 'Cruel and Unusual Films' ORDER BY T3.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
For the movie "Reign of Fire", which department was Marcia Ross in?
movie "Reign of Fire" refers to title = 'Reign of Fire'; which department refers to department_name
SELECT 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 T3.person_name = 'Marcia Ross' AND T1.title = 'Reign of Fire'
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 budget of the movies directed by Jaume Collet-Serra.
directed by refers to job = 'Director'; average budget = AVG(budget)
SELECT CAST(SUM(T1.budget) AS REAL) / COUNT(T1.movie_id) 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 T3.person_name = 'Jaume Collet-Serra' AND T2.job = 'Director'
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 percentage of male characters in the movie "Bride Wars"?
male refers to gender = 'Male'; "Bride Wars" refers to title = 'Bride Wars'; percentage = divide(sum(gender = 'Male'), count(gender)) * 100 as percentage
SELECT CAST(COUNT(CASE WHEN T3.gender = 'Male' THEN 1 ELSE NULL END) AS REAL) * 100 / COUNT(T3.gender) FROM movie AS T1 INNER JOIN movie_cast AS T2 ON T1.movie_id = T2.movie_id INNER JOIN gender AS T3 ON T2.gender_id = T3.gender_id WHERE T1.title = 'Bride Wars'
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 that was made with the most money and resources?
made with the most money and resources refers to max(budget)
SELECT title FROM movie ORDER BY budget 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 made at least 1 Billion at the box office?
have made at least 1 Billion at the box office refers to revenue > 1000000000
SELECT COUNT(movie_id) FROM movie WHERE revenue > 1000000000
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
When was the first movie released?
when the first movie refers to release_date where min(release_date)
SELECT MIN(release_date) FROM movie WHERE movie_status = 'Released'
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 crew are named John Young?
null
SELECT COUNT(person_id) FROM person WHERE person_name = 'John Young'
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 title of the movie that is most-liked by a large number of people.
most-liked by a large number of people refers to max(popularity)
SELECT title FROM movie ORDER BY 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
Who is the person associated with the crew id 1325273?
Who is the person refers to person_name; crew id 1325273 refers to person_id = 1325273
SELECT person_name FROM person WHERE person_id = 1325273
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 name of the production company that made the most movies?
name of the production company refers to company_name; most movies refers to max(count(company_name))
SELECT T1.company_name FROM production_company AS T1 INNER JOIN movie_company AS T2 ON T1.company_id = T2.company_id GROUP BY T1.company_id ORDER BY COUNT(T2.movie_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
Who played Captain Jack Sparrow in all of the Pirates of the Caribbean movies?
Captain Jack Sparrow refers to character_name = 'Captain Jack Sparrow'; Pirates of the Caribbean movies refers to title LIKE 'Pirates of the Carribbean%'
SELECT DISTINCT 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 T2.character_name = 'Captain Jack Sparrow' AND T1.title LIKE 'Pirates of the Caribbean%'
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 Walt Disney Pictures' most popular movie?
Walt Disney Pictures refers to company_name = 'Walt Disney Pictures'; most popular movie refers to max(popularity)
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 = 'Walt Disney Pictures' ORDER BY T3.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
How many movies did Universal Studios release?
Universal Studios refers to company_name = 'Universal Studios'
SELECT COUNT(T2.movie_id) FROM production_company AS T1 INNER JOIN movie_company AS T2 ON T1.company_id = T2.company_id WHERE T1.company_name = 'Universal Studios'
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 production company produced the movie that made the most money at the box office?
Which production company refers to company_name; most money at the box office refers to max(revenue)
SELECT T1.company_name 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 GROUP BY T1.company_id ORDER BY SUM(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
How many female crews are in the movie "Mr. Smith Goes to Washington"?
female crews refers to gender = 'Female'; "Mr. Smith Goes to Washington" refers to title = 'Mr. Smith Goes to Washington'
SELECT COUNT(T3.gender) FROM movie AS T1 INNER JOIN movie_cast AS T2 ON T1.movie_id = T2.movie_id INNER JOIN gender AS T3 ON T2.gender_id = T3.gender_id WHERE T1.title = 'Mr. Smith Goes to Washington' AND T3.gender = 'Female'
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 the production companies that made at least 200 movies.
names of the production companies refers to company_name; at least 200 movies refers to COUNT(company_name) > = 200
SELECT T1.company_name 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(T2.movie_id) > 200
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 did Harrison Ford appear in total?
null
SELECT COUNT(T2.movie_id) FROM person AS T1 INNER JOIN movie_cast AS T2 ON T1.person_id = T2.person_id WHERE T1.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
What is the title of Jamie Foxx's most recent movie?
most recent movie refers to max(release_date)
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 = 'Jamie Foxx' ORDER BY T1.release_date 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 released in 1995 did Quentin Tarantino appear in?
released in 1995 refers to release_date LIKE '1995%'
SELECT COUNT(T1.movie_id) 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 = 'Quentin Tarantino' AND CAST(STRFTIME('%Y', T1.release_date) AS INT) = 1995
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 first crime movie ever released?
first crime movie ever released refers to min(release_date) and genre_name = 'Crime'
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 = 'Crime' ORDER BY T1.release_date 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 horror movies are there?
horror movies refers to genre_name = 'Horror'
SELECT COUNT(T1.movie_id) FROM movie_genres AS T1 INNER JOIN genre AS T2 ON T1.genre_id = T2.genre_id WHERE T2.genre_name = 'Horror'
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 person IDs of the second film editors in Movie No. 12.
second film editors refers to job = 'Second Film Editor'; Movie No. 12 refers to movie_id = 12
SELECT person_id FROM movie_crew WHERE movie_id = 12 AND job = 'Second Film 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
How many animators does Movie No. 129 have?
animators refers to job = 'Animation'; Movie No. 129 refers to movie_id = 129
SELECT COUNT(movie_id) FROM movie_crew WHERE movie_id = 129 AND job = 'Animation'
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
In Movie No. 19, how many people are there in Department No. 7? Please give me their job.
Movie No. 19 refers to movie_id = 19; Department No. 7 refers to department_id = 7
SELECT COUNT(DISTINCT job) FROM movie_crew WHERE movie_id = 19 AND department_id = 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
Write the person ID and character name of casts between order numbers 1 and 10 in Movie No. 285.
casts between order numbers 1 and 10 refers to cast_order BETWEEN 2 AND 9; Movie No. 285 refers to movie_id = 285
SELECT person_id, character_name FROM movie_cast WHERE movie_id = 285 AND cast_order BETWEEN 1 AND 10
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 times did Bob Peterson appear in the movie credits?
null
SELECT COUNT(T2.movie_id) FROM person AS T1 INNER JOIN movie_cast AS T2 ON T1.person_id = T2.person_id WHERE T1.person_name = 'Bob Peterson'
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
Tally the movie ID and character name in the movie starring Jim Carrey.
null
SELECT T2.movie_id, T2.character_name FROM person AS T1 INNER JOIN movie_cast AS T2 ON T1.person_id = T2.person_id WHERE T1.person_name = 'Jim Carrey'
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
Give the names of the female cast in Movie No. 1865.
female cast refers to gender = 'Female'; name of cast refers to person_name; Movie No. 1865 refers to movie_id = 1865
SELECT T2.person_name FROM movie_cast AS T1 INNER JOIN person AS T2 ON T1.person_id = T2.person_id INNER JOIN gender AS T3 ON T1.gender_id = T3.gender_id WHERE T1.movie_id = 1865 AND T3.gender = 'Female'
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 me the titles of the movies starring Jim Carrey.
Jim Carrey is the 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 = 'Jim Carrey'
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 director's name of the movies released between 1/01/1916 and 12/31/1925.
director's name refers to person_name where job = 'Director'; released between 1/01/1916 and 12/31/1925 refers to release_date BETWEEN '1916-01-02' AND '1925-12-30'
SELECT T2.person_name FROM movie_cast AS T1 INNER JOIN person AS T2 ON T1.person_id = T2.person_id INNER JOIN movie AS T3 ON T1.movie_id = T3.movie_id INNER JOIN movie_crew AS T4 ON T1.movie_id = T4.movie_id WHERE T4.job = 'Director' AND T3.release_date BETWEEN '1916-01-01' AND '1925-12-31'
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 films released between 1/2/1990 and 12/30/2000 starred Uma Thurman?
released between 1/2/1990 and 12/30/2000 refers to release_date BETWEEN '1990-01-02' AND '2000-12-30'; film has the same meaning as movie; starred Uma Thurman refers to person_name = 'Uma Thurman'
SELECT COUNT(T1.movie_id) 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 = 'Uma Thurman' AND T1.release_date BETWEEN '1990-01-01' AND '2000-12-31'
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 the titles of horror films with a vote average of more than 7.
horror films refers to genre_name = 'Horror'; vote average of more 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 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
Give the genre and popularity of movies whose revenue is at least 120,000,000 between 2012 and 2015.
genre refers to genre_name; revenue is at least 120,000,000 refers to revenue > = 120000000; between 2012 and 2015 refers to release_date BETWEEN '2012-01-01' AND '2015-12-31'
SELECT T3.genre_name, T1.popularity 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.revenue > 120000000 AND T1.release_date BETWEEN '2012-01-01' AND '2015-12-31'
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 Indian movies between 1/2/1990 and 12/30/2003 have revenue of more than 75,000,000 and popularity of no less than 20?
Indian movies refers to country_name = 'India'; between 1/2/1990 and 12/30/2003 refers to release_date BETWEEN '1990-01-02' AND '2003-12-30'; revenue of more than 75,000,000 refers to revenue > 75000000; popularity of no less than 20 refers to popularity > = 20
SELECT COUNT(T2.movie_id) FROM movie AS T1 INNER JOIN production_COUNTry AS T2 ON T1.movie_id = T2.movie_id WHERE T1.revenue > 75000000 AND T1.popularity >= 20 AND T1.release_date BETWEEN '1990-01-01' AND '2003-12-31'
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 highest-budget film to date? Please include the revenue and name the country.
highest-budget film refers to max(budget); name the country refers to country_name
SELECT T1.title, T1.revenue, T3.COUNTry_name 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 ORDER BY T1.budget 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
List the title of movies in Latin released between 1/01/1990 and 12/31/1995.
movies in Latin refers to language_name = 'Latin'; released between 1/01/1990 and 12/31/1995 refers to release_date BETWEEN '1990-01-01' AND '1995-12-31'
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 = 'Latin' AND T1.release_date BETWEEN '1990-01-01' AND '1995-12-31'
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 of American movies in 2006?
American movies refers to country_name = 'United States of America'; in 2006 refers to release_date LIKE '2006%'; 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 = 'United States of America' AND CAST(STRFTIME('%Y', T1.release_date) AS INT) = 2006
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 2016 gap between the average revenue for Indian and American films.
2016 refers to release_date LIKE '2016%'; Indian and American films refers to country_name = 'India' and country_name = 'United States of America'; gap between the average revenue refers to subtract(divide(sum(revenue), count(movie_id)) when country_name = 'United States of America', divide(sum(revenue), count(movie_id)) when country_name = 'India')
SELECT AVG(CASE WHEN T3.COUNTry_name = 'United States of America' THEN T1.revenue END) - AVG(CASE WHEN T3.COUNTry_name = 'India' THEN T1.revenue END) AS CALCULATE 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 CAST(STRFTIME('%Y', T1.release_date) AS INT) = 2016
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 percentage of romance films among films produced in India in 2015?
romance films refers to genre_name = 'Romance'; in India refers to country_name = 'India'; 2015 refers to release_date BETWEEN '2015-01-01' AND '2015-01-31'; percentage = divide(sum(movie_id) when genre_name = 'Romance', count(movie_id)) as percentage
SELECT CAST(COUNT(CASE WHEN T4.genre_name = 'Romance' THEN T1.movie_id ELSE NULL END) AS REAL) * 100 / COUNT(T1.movie_id) FROM movie AS T1 INNER JOIN movie_genres AS T2 ON T1.movie_id = T2.movie_id INNER JOIN production_COUNTry AS T3 ON T1.movie_id = T3.movie_id INNER JOIN genre AS T4 ON T2.genre_id = T4.genre_id INNER JOIN COUNTry AS T5 ON T3.COUNTry_id = T5.COUNTry_id WHERE T5.COUNTry_name = 'India' AND T1.release_date BETWEEN '2015-01-01' AND '2015-12-31'
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 actor plays Optimus Prime?
Which actor refers to person_name; Optimus Prime refers to character_name = 'Optimus Prime (voice)'
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 = 'Optimus Prime (voice)'
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 gender of the character 'USAF Master Sgt. Epps?'
character 'USAF Master Sgt. Epps' refers to character_name = 'USAF Master Sgt. Epps'
SELECT T2.gender FROM movie_cast AS T1 INNER JOIN gender AS T2 ON T1.gender_id = T2.gender_id WHERE T1.character_name = 'USAF Master Sgt. Epps'
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 companies who worked in the movie 'Ultramarines: A Warhammer 40,000 Movie.'
all companies refers to company_name; movie 'Ultramarines: A Warhammer 40,000 Movie' refers to title = 'Ultramarines: A Warhammer 40,000 Movie'
SELECT T1.company_name 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 T3.title = 'Ultramarines: A Warhammer 40,000 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
Which movie did the company 'Radiant Film GmbH' work on?
Which movie refers to title; company 'Radiant Film GmbH' refers to company_name = 'Radiant Film GmbH'
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 = 'Radiant Film GmbH'
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 genres of Sky Captain and the World of Tomorrow?
genres refers to genre_name; Sky Captain and the World of Tomorrow refers to title = 'Sky Captain and the World of Tomorrow'
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 = 'Sky Captain and the World of Tomorrow'
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 all the keywords belonging to the movie 'Sky Captain and the World of Tomorrow.'
keywords refers to keyword_name; movie 'Sky Captain and the World of Tomorrow' refers to title = 'Sky Captain and the World of Tomorrow'
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 = 'Sky Captain and the World of Tomorrow'
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
The movie 'Gojira ni-sen mireniamu' is from which country?
movie 'Gojira ni-sen mireniamu' refers to title = 'Gojira ni-sen mireniamu'; which country refers to country_name
SELECT T3.COUNTry_name 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 T1.title = 'Gojira ni-sen mireniamu'
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 movie has the keyword 'extremis?'
Which movie refers to title; keyword 'extremis' refers to keyword_name = 'extremis'
SELECT 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 = 'extremis'
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 10 movie titles that were produced in France.
France refers to country_name = 'France'
SELECT T1.title 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' LIMIT 10
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 director for the movie 'Transformers?'
the director refers to person_name where job = 'Director'; movie 'Transformers' refers to title = 'Transformers'
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 = 'Transformers' AND T2.job = 'Director'
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 10 crews alongside their jobs who worked on the movie 'Mad Max: Fury Road.'
crews refers to person_name; movie 'Mad Max: Fury Road' refers to title = 'Mad Max: Fury Road'
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 = 'Mad Max: Fury Road' LIMIT 10
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 movies that came from Japan belong in the 'animation' genre?
from Japan refers to country_name = 'Japan'; in the 'animation' genre refers to genre_name = 'animation'; percentage = divide(sum(movie_id) when genre_name = 'animation', count(movie_id)) as percentage
SELECT CAST(COUNT(CASE WHEN T4.genre_name = 'Animation' THEN T1.movie_id ELSE NULL END) AS REAL) * 100 / COUNT(T1.movie_id) FROM movie AS T1 INNER JOIN movie_genres AS T2 ON T1.movie_id = T2.movie_id INNER JOIN production_COUNTry AS T3 ON T1.movie_id = T3.movie_id INNER JOIN genre AS T4 ON T2.genre_id = T4.genre_id INNER JOIN COUNTry AS T5 ON T3.COUNTry_id = T5.COUNTry_id WHERE T5.COUNTry_name = 'Japan'
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 ratio between male and female cast members of the movie 'Iron Man?' Count how many have unspecified genders.
male refers to gender = 'Male'; female refers to gender = 'Female'; movie 'Iron Man' refers to title = 'Iron Man'; ratio = divide(sum(gender = 'Female'), sum(gender = 'Male'))
SELECT CAST(COUNT(CASE WHEN T3.gender = 'Male' THEN 1 ELSE NULL END) AS REAL) / COUNT(CASE WHEN T3.gender = 'Female' THEN 1 ELSE NULL END) AS RATIO , COUNT(CASE WHEN T3.gender = 'Unspecified' THEN 1 ELSE NULL END) AS UNGENDERS FROM movie AS T1 INNER JOIN movie_cast AS T2 ON T1.movie_id = T2.movie_id INNER JOIN gender AS T3 ON T2.gender_id = T3.gender_id WHERE T1.title = 'Iron Man'
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 five movie titles that were released before 2000.
released before 2000 refers to release_date < '2000-01-01'
SELECT title FROM movie WHERE CAST(STRFTIME('%Y', release_date) AS INT) < 2000 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
What is the keyword ID of the movie with the title of "Sin City"?
title of "Sin City" refers to title = 'Sin City'
SELECT T2.keyword_id FROM movie AS T1 INNER JOIN movie_keywords AS T2 ON T1.movie_id = T2.movie_id WHERE T1.title = 'Sin City'
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
Look for the movie title with the keyword of "angel".
keyword of "angel" refers to keyword_name = 'angel'
SELECT 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 = 'angel'
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 keywords belong to the movie titles with the highest popularity?
Which keywords refers to keyword_name; highest popularity refers to max(popularity)
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 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
Provide the genre ID of the movie with the title of "The Dark Knight".
movie with the title of "The Dark Knight" refers to title = 'The Dark Knight'
SELECT T2.genre_id FROM movie AS T1 INNER JOIN movie_genres AS T2 ON T1.movie_id = T2.movie_id WHERE T1.title = 'The Dark Knight'
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 movie titles within the genre of thriller.
genre of thriller refers to genre_name = 'Thriller'
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 = 'Thriller'
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 five rumoured movie titles within the genre of Drama.
rumoured movie refers to movie_status = 'rumoured'; genre of Drama refers to genre_name = 'Drama'
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 T1.movie_status = 'Rumored' AND T3.genre_name = 'Drama' 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
What is the genre of the movie title with the lowest revenue generated?
genre refers to genre_name; lowest revenue refers to min(revenue)
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 ORDER BY T1.revenue 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
State the genre of the movie title with a runtime of only 14 minutes.
genre refers to genre_name; runtime of only 14 minutes refers to runtime = 14
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.runtime = 14
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 genre of the movie title which was well-received by the audiences but made the lowest revenue?
genre refers to genre_name; well-received by the audiences refers to max(vote_average); lowest revenue refers to min(revenue)
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 ORDER BY T1.vote_average DESC, T1.revenue 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
Provide the genre of a movie title with a tagline of "A long time ago in a galaxy far, far away…".
genre refers to genre_name; tagline of "A long time ago in a galaxy far, far away…" refers to tagline = 'A long time ago in a galaxy far, far away…'
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 T3.genre_id = T2.genre_id WHERE T1.tagline = 'A long time ago in a galaxy far, far away...'
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 country ID of the movie with the title of "Pirates of the Caribbean: Dead Man's Chest"?
title of "Pirates of the Caribbean: Dead Man's Chest" refers to title = 'Pirates of the Caribbean: Dead Man''s Chest'
SELECT T2.COUNTry_id FROM movie AS T1 INNER JOIN production_COUNTry AS T2 ON T1.movie_id = T2.movie_id WHERE T1.title LIKE 'Pirates of the Caribbean: Dead Man%s Chest'
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 movie titles that were produced in Canada.
produced in Canada refers to country_name = 'Canada'
SELECT T1.title 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 = '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
Accumulate the budget of the movie titles with the keyword of "video game".
keyword of "video game" refers to keyword_name = 'video game'
SELECT SUM(T1.budget) 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 = 'video game'
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,