id
int64
0
9.43k
db_id
stringclasses
69 values
schema
stringclasses
69 values
question
stringlengths
24
325
output
stringlengths
23
804
evidence
stringlengths
0
673
filtered_schema
listlengths
0
16
400
retail_complains
CREATE TABLE state ( StateCode TEXT constraint state_pk primary key, State TEXT, Region TEXT ); CREATE TABLE callcenterlogs ( "Date received" DATE, "Complaint ID" TEXT, "rand client" TEXT, phonefinal TEXT, "vru+line" TEXT, call_id INTE...
What are the issues of the complains of male clients and products from age 25 and below?
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
male refers to sex = 'Male'; age 25 and below refers to age < 25
[ "client.age", "client.client_id", "client.sex", "events.Client_ID", "events.Issue" ]
401
retail_complains
CREATE TABLE state ( StateCode TEXT constraint state_pk primary key, State TEXT, Region TEXT ); CREATE TABLE callcenterlogs ( "Date received" DATE, "Complaint ID" TEXT, "rand client" TEXT, phonefinal TEXT, "vru+line" TEXT, call_id INTE...
Among the reviews from midwest region, what are the products that received 1 star?
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
1 star refers to Stars = 1
[ "district.district_id", "district.state_abbrev", "reviews.Product", "reviews.Stars", "reviews.district_id", "state.Region", "state.StateCode" ]
402
retail_complains
CREATE TABLE state ( StateCode TEXT constraint state_pk primary key, State TEXT, Region TEXT ); CREATE TABLE callcenterlogs ( "Date received" DATE, "Complaint ID" TEXT, "rand client" TEXT, phonefinal TEXT, "vru+line" TEXT, call_id INTE...
List the products involved in the complaints received on March 2017 via TOVA server.
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%'
on March 2017 refers to Date received LIKE '%03%' AND Date received LIKE '2017%'
[ "callcenterlogs.`Complaint ID`", "callcenterlogs.server", "events.Product", "events.`Complaint ID`", "events.`Date received`" ]
403
retail_complains
CREATE TABLE state ( StateCode TEXT constraint state_pk primary key, State TEXT, Region TEXT ); CREATE TABLE callcenterlogs ( "Date received" DATE, "Complaint ID" TEXT, "rand client" TEXT, phonefinal TEXT, "vru+line" TEXT, call_id INTE...
What is the division of the review of 5 stars received on December 17, 2017 for the product Eagle National Mortgage?
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'
5 stars refers to Stars = 5; on December 17 2017 refers to Date = '2017-12-17'
[ "district.district_id", "district.division", "reviews.Date", "reviews.Product", "reviews.Stars", "reviews.district_id" ]
404
retail_complains
CREATE TABLE state ( StateCode TEXT constraint state_pk primary key, State TEXT, Region TEXT ); CREATE TABLE callcenterlogs ( "Date received" DATE, "Complaint ID" TEXT, "rand client" TEXT, phonefinal TEXT, "vru+line" TEXT, call_id INTE...
In complaints about the credit card product, list the phone number of the oldest client.
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
oldest refers to max(age)
[ "client.age", "client.client_id", "client.phone", "events.Client_ID", "events.Product" ]
405
retail_complains
CREATE TABLE state ( StateCode TEXT constraint state_pk primary key, State TEXT, Region TEXT ); CREATE TABLE callcenterlogs ( "Date received" DATE, "Complaint ID" TEXT, "rand client" TEXT, phonefinal TEXT, "vru+line" TEXT, call_id INTE...
In complaints received in 2014, how many of them were submitted via call?
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'
in 2014 refers to Date received LIKE '2014%'; submitted via call refers to Submitted via = 'Phone'
[ "callcenterlogs.`Complaint ID`", "callcenterlogs.`Date received`", "events.`Complaint ID`", "events.`Submitted via`" ]
406
retail_complains
CREATE TABLE state ( StateCode TEXT constraint state_pk primary key, State TEXT, Region TEXT ); CREATE TABLE callcenterlogs ( "Date received" DATE, "Complaint ID" TEXT, "rand client" TEXT, phonefinal TEXT, "vru+line" TEXT, call_id INTE...
List the product and its issues of the complains of clients with age greater than the 60% of average age of all clients.
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 )
age greater than the 60% of average age refers to age > multiply(avg(age) , 0.6)
[ "client.age", "client.client_id", "events.Client_ID", "events.Issue", "events.Product" ]
407
retail_complains
CREATE TABLE state ( StateCode TEXT constraint state_pk primary key, State TEXT, Region TEXT ); CREATE TABLE callcenterlogs ( "Date received" DATE, "Complaint ID" TEXT, "rand client" TEXT, phonefinal TEXT, "vru+line" TEXT, call_id INTE...
In reviews of product with 5 stars, what is the percentage of the reviews coming from the division of East North Central?
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
5 stars refers to Stars = 5; percentage = divide(count(division = 'East North Central', count(division)) * 100%
[ "district.district_id", "district.division", "reviews.Stars", "reviews.district_id" ]
408
movies_4
CREATE TABLE country ( country_id INTEGER not null primary key, country_iso_code TEXT default NULL, country_name TEXT default NULL ); CREATE TABLE department ( department_id INTEGER not null primary key, department_name TEXT default NULL ); CREATE TABLE gender ...
Please list the names of the production company of the movie "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'
names of the production company refers to movie_company; movie "Four Rooms" refers to title = 'Four Rooms'
[ "movie.movie_id", "movie.title", "movie_company.company_id", "movie_company.movie_id", "production_company.company_id", "production_company.company_name" ]
409
movies_4
CREATE TABLE country ( country_id INTEGER not null primary key, country_iso_code TEXT default NULL, country_name TEXT default NULL ); CREATE TABLE department ( department_id INTEGER not null primary key, department_name TEXT default NULL ); CREATE TABLE gender ...
How many production companies does the movie "Four Rooms" have?
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' )
movie "Four Rooms" refers to title = 'Four Rooms'
[ "movie.movie_id", "movie.title", "movie_company.company_id", "movie_company.movie_id", "production_company.company_id", "production_company.company_name" ]
410
movies_4
CREATE TABLE country ( country_id INTEGER not null primary key, country_iso_code TEXT default NULL, country_name TEXT default NULL ); CREATE TABLE department ( department_id INTEGER not null primary key, department_name TEXT default NULL ); CREATE TABLE gender ...
Please list the titles of all the movie produced by production company "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'
"Universal Pictures" refers to company_name = 'Universal Pictures'
[ "movie.movie_id", "movie.title", "movie_company.company_id", "movie_company.movie_id", "production_company.company_id", "production_company.company_name" ]
411
movies_4
CREATE TABLE country ( country_id INTEGER not null primary key, country_iso_code TEXT default NULL, country_name TEXT default NULL ); CREATE TABLE department ( department_id INTEGER not null primary key, department_name TEXT default NULL ); CREATE TABLE gender ...
What is the title of the latest released movie produced by production company "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' ORDER BY T3.release_date DESC LIMIT 1
"Universal Pictures" refers to company_name = 'Universal Pictures'; latest released refers to max(release_date)
[ "movie.movie_id", "movie.release_date", "movie.title", "movie_company.company_id", "movie_company.movie_id", "production_company.company_id", "production_company.company_name" ]
412
movies_4
CREATE TABLE country ( country_id INTEGER not null primary key, country_iso_code TEXT default NULL, country_name TEXT default NULL ); CREATE TABLE department ( department_id INTEGER not null primary key, department_name TEXT default NULL ); CREATE TABLE gender ...
What is the name of the director of photography of the movie "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'
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'
[ "movie.movie_id", "movie.title", "movie_crew.job", "movie_crew.movie_id", "movie_crew.person_id", "person.person_id", "person.person_name" ]
413
movies_4
CREATE TABLE country ( country_id INTEGER not null primary key, country_iso_code TEXT default NULL, country_name TEXT default NULL ); CREATE TABLE department ( department_id INTEGER not null primary key, department_name TEXT default NULL ); CREATE TABLE gender ...
What was the job of Dariusz Wolski in the movie "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'
movie "Pirates of the Caribbean: At World's End" refers to title = 'Pirates of the Caribbean: At World''s End'
[ "movie.movie_id", "movie.title", "movie_crew.job", "movie_crew.movie_id", "movie_crew.person_id", "person.person_id", "person.person_name" ]
414
movies_4
CREATE TABLE country ( country_id INTEGER not null primary key, country_iso_code TEXT default NULL, country_name TEXT default NULL ); CREATE TABLE department ( department_id INTEGER not null primary key, department_name TEXT default NULL ); CREATE TABLE gender ...
Please list the names of all the crew members of the movie "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'
names refers to person_name; "Pirates of the Caribbean: At World's End" refers to title = 'Pirates of the Caribbean: At World''s End'
[ "movie.movie_id", "movie.title", "movie_crew.movie_id", "movie_crew.person_id", "person.person_id", "person.person_name" ]
415
movies_4
CREATE TABLE country ( country_id INTEGER not null primary key, country_iso_code TEXT default NULL, country_name TEXT default NULL ); CREATE TABLE department ( department_id INTEGER not null primary key, department_name TEXT default NULL ); CREATE TABLE gender ...
How many crew members worked as producer in the movie "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'
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'
[ "movie.movie_id", "movie.title", "movie_crew.job", "movie_crew.movie_id", "movie_crew.person_id", "person.person_id" ]
416
movies_4
CREATE TABLE country ( country_id INTEGER not null primary key, country_iso_code TEXT default NULL, country_name TEXT default NULL ); CREATE TABLE department ( department_id INTEGER not null primary key, department_name TEXT default NULL ); CREATE TABLE gender ...
Please list the names of all the producers in the movie "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'
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'
[ "movie.movie_id", "movie.title", "movie_crew.job", "movie_crew.movie_id", "movie_crew.person_id", "person.person_id", "person.person_name" ]
417
movies_4
CREATE TABLE country ( country_id INTEGER not null primary key, country_iso_code TEXT default NULL, country_name TEXT default NULL ); CREATE TABLE department ( department_id INTEGER not null primary key, department_name TEXT default NULL ); CREATE TABLE gender ...
In how many movie does Dariusz Wolski work as the 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'
director of photography refers to job = 'Director of Photography'
[ "movie_crew.job", "movie_crew.movie_id", "movie_crew.person_id", "person.person_id", "person.person_name" ]
418
movies_4
CREATE TABLE country ( country_id INTEGER not null primary key, country_iso_code TEXT default NULL, country_name TEXT default NULL ); CREATE TABLE department ( department_id INTEGER not null primary key, department_name TEXT default NULL ); CREATE TABLE gender ...
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?
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
director of photography refers to job = 'Director of Photography'; highest average vote refers to max(vote_average)
[ "movie.movie_id", "movie.title", "movie.vote_average", "movie_crew.job", "movie_crew.movie_id", "movie_crew.person_id", "person.person_id", "person.person_name" ]
419
movies_4
CREATE TABLE country ( country_id INTEGER not null primary key, country_iso_code TEXT default NULL, country_name TEXT default NULL ); CREATE TABLE department ( department_id INTEGER not null primary key, department_name TEXT default NULL ); CREATE TABLE gender ...
When was the release date of the latest movie in which Dariusz Wolski worked as a crew member?
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
release date of the latest movie refers to max(release_date)
[ "movie.movie_id", "movie.release_date", "movie_crew.movie_id", "movie_crew.person_id", "person.person_id", "person.person_name" ]
420
movies_4
CREATE TABLE country ( country_id INTEGER not null primary key, country_iso_code TEXT default NULL, country_name TEXT default NULL ); CREATE TABLE department ( department_id INTEGER not null primary key, department_name TEXT default NULL ); CREATE TABLE gender ...
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?
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'
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
[ "movie.movie_id", "movie.vote_average", "movie_crew.job", "movie_crew.movie_id", "movie_crew.person_id", "person.person_id", "person.person_name" ]
421
movies_4
CREATE TABLE country ( country_id INTEGER not null primary key, country_iso_code TEXT default NULL, country_name TEXT default NULL ); CREATE TABLE department ( department_id INTEGER not null primary key, department_name TEXT default NULL ); CREATE TABLE gender ...
What is the average revenue of the movie in which Dariusz Wolski works as the director of photography?
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'
director of photography refers to job = 'Director of Photography'; average revenue = divide(sum(revenue), count(movie_id))
[ "movie.movie_id", "movie.revenue", "movie_crew.job", "movie_crew.movie_id", "movie_crew.person_id", "person.person_id", "person.person_name" ]
422
movies_4
CREATE TABLE country ( country_id INTEGER not null primary key, country_iso_code TEXT default NULL, country_name TEXT default NULL ); CREATE TABLE department ( department_id INTEGER not null primary key, department_name TEXT default NULL ); CREATE TABLE gender ...
Give the name of the movie with a revenue of 559852396.
SELECT title FROM movie WHERE revenue = 559852396
name of the movie refers to title; revenue of 559852396 refers to revenue = '559852396'
[ "movie.revenue", "movie.title" ]
423
movies_4
CREATE TABLE country ( country_id INTEGER not null primary key, country_iso_code TEXT default NULL, country_name TEXT default NULL ); CREATE TABLE department ( department_id INTEGER not null primary key, department_name TEXT default NULL ); CREATE TABLE gender ...
What was David Rubin's job in the movie "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'
"Days of Thunder" refers to title = 'Days of Thunder'
[ "movie.movie_id", "movie.title", "movie_crew.job", "movie_crew.movie_id", "movie_crew.person_id", "person.person_id", "person.person_name" ]
424
movies_4
CREATE TABLE country ( country_id INTEGER not null primary key, country_iso_code TEXT default NULL, country_name TEXT default NULL ); CREATE TABLE department ( department_id INTEGER not null primary key, department_name TEXT default NULL ); CREATE TABLE gender ...
How many movies were directed by Michael Bay?
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'
directed by refers to job = 'Director'
[ "movie_crew.job", "movie_crew.movie_id", "movie_crew.person_id", "person.person_id", "person.person_name" ]
425
movies_4
CREATE TABLE country ( country_id INTEGER not null primary key, country_iso_code TEXT default NULL, country_name TEXT default NULL ); CREATE TABLE department ( department_id INTEGER not null primary key, department_name TEXT default NULL ); CREATE TABLE gender ...
Show the total number of keywords of the movie "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'
"I Hope They Serve Beer in Hell" refers to title = 'I Hope They Serve Beer in Hell';
[ "movie.movie_id", "movie.title", "movie_keywords.keyword_id", "movie_keywords.movie_id" ]
426
movies_4
CREATE TABLE country ( country_id INTEGER not null primary key, country_iso_code TEXT default NULL, country_name TEXT default NULL ); CREATE TABLE department ( department_id INTEGER not null primary key, department_name TEXT default NULL ); CREATE TABLE gender ...
For the movie "Land of the Dead", who is its 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'
"Land of the Dead" refers to title = 'Land of the Dead'; director refers to person_name where job = 'Director'
[ "movie.movie_id", "movie.title", "movie_crew.job", "movie_crew.movie_id", "movie_crew.person_id", "person.person_id", "person.person_name" ]
427
movies_4
CREATE TABLE country ( country_id INTEGER not null primary key, country_iso_code TEXT default NULL, country_name TEXT default NULL ); CREATE TABLE department ( department_id INTEGER not null primary key, department_name TEXT default NULL ); CREATE TABLE gender ...
Tell the number of movies made by 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'
Paramount Animation refers to company_name = 'Paramount Animation'
[ "movie_company.company_id", "movie_company.movie_id", "production_company.company_id", "production_company.company_name" ]
428
movies_4
CREATE TABLE country ( country_id INTEGER not null primary key, country_iso_code TEXT default NULL, country_name TEXT default NULL ); CREATE TABLE department ( department_id INTEGER not null primary key, department_name TEXT default NULL ); CREATE TABLE gender ...
How many female characters are there in the movie "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'
female characters refer to gender = 'Female'; "Spider-Man 3" refers to title = 'Spider-Man 3'
[ "gender.gender", "gender.gender_id", "movie.movie_id", "movie.title", "movie_cast.gender_id", "movie_cast.movie_id" ]
429
movies_4
CREATE TABLE country ( country_id INTEGER not null primary key, country_iso_code TEXT default NULL, country_name TEXT default NULL ); CREATE TABLE department ( department_id INTEGER not null primary key, department_name TEXT default NULL ); CREATE TABLE gender ...
Provide the most used keyword in the movies.
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
most used keyword refers to keyword_name where max(count(keyword_name))
[ "keyword.keyword_id", "keyword.keyword_name", "movie_keywords.keyword_id" ]
430
movies_4
CREATE TABLE country ( country_id INTEGER not null primary key, country_iso_code TEXT default NULL, country_name TEXT default NULL ); CREATE TABLE department ( department_id INTEGER not null primary key, department_name TEXT default NULL ); CREATE TABLE gender ...
How many producers does the movie "The Amityville Horror" have?
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'
producers refers to job = 'Producer'; "The Amityville Horror" refers to title = 'The Amityville Horror'
[ "movie.movie_id", "movie.title", "movie_crew.job", "movie_crew.movie_id", "movie_crew.person_id" ]
431
movies_4
CREATE TABLE country ( country_id INTEGER not null primary key, country_iso_code TEXT default NULL, country_name TEXT default NULL ); CREATE TABLE department ( department_id INTEGER not null primary key, department_name TEXT default NULL ); CREATE TABLE gender ...
What is the production company of the movie "Crazy Heart"?
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'
movie "Crazy Heart" refers to title = 'Crazy Heart'; production company refers to company_name
[ "movie.movie_id", "movie.title", "movie_company.company_id", "movie_company.movie_id", "production_company.company_id", "production_company.company_name" ]
432
movies_4
CREATE TABLE country ( country_id INTEGER not null primary key, country_iso_code TEXT default NULL, country_name TEXT default NULL ); CREATE TABLE department ( department_id INTEGER not null primary key, department_name TEXT default NULL ); CREATE TABLE gender ...
Give the number of movies with "saving the world" as the keyword.
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'
"saving the world" as the keyword refers to keyword_name = 'saving the world'
[ "keyword.keyword_id", "movie_keywords.keyword_id", "movie_keywords.movie_id" ]
433
movies_4
CREATE TABLE country ( country_id INTEGER not null primary key, country_iso_code TEXT default NULL, country_name TEXT default NULL ); CREATE TABLE department ( department_id INTEGER not null primary key, department_name TEXT default NULL ); CREATE TABLE gender ...
For all the movies which were produced by Cruel and Unusual Films, which one has the most 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
produced by Cruel and Unusual Films refers to company_name = 'Cruel and Unusual Films'; most popularity refers to max(popularity)
[ "movie.movie_id", "movie.popularity", "movie.title", "movie_company.company_id", "movie_company.movie_id", "production_company.company_id", "production_company.company_name" ]
434
movies_4
CREATE TABLE country ( country_id INTEGER not null primary key, country_iso_code TEXT default NULL, country_name TEXT default NULL ); CREATE TABLE department ( department_id INTEGER not null primary key, department_name TEXT default NULL ); CREATE TABLE gender ...
For the movie "Reign of Fire", which department was Marcia Ross in?
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'
movie "Reign of Fire" refers to title = 'Reign of Fire'; which department refers to department_name
[ "department.department_id", "department.department_name", "movie.movie_id", "movie.title", "movie_crew.department_id", "movie_crew.movie_id", "movie_crew.person_id", "person.person_id", "person.person_name" ]
435
movies_4
CREATE TABLE country ( country_id INTEGER not null primary key, country_iso_code TEXT default NULL, country_name TEXT default NULL ); CREATE TABLE department ( department_id INTEGER not null primary key, department_name TEXT default NULL ); CREATE TABLE gender ...
Calculate the average budget of the movies directed by Jaume Collet-Serra.
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'
directed by refers to job = 'Director'; average budget = AVG(budget)
[ "movie.budget", "movie.movie_id", "movie_crew.job", "movie_crew.movie_id", "movie_crew.person_id", "person.person_id", "person.person_name" ]
436
movies_4
CREATE TABLE country ( country_id INTEGER not null primary key, country_iso_code TEXT default NULL, country_name TEXT default NULL ); CREATE TABLE department ( department_id INTEGER not null primary key, department_name TEXT default NULL ); CREATE TABLE gender ...
What is the percentage of male characters in the movie "Bride Wars"?
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'
male refers to gender = 'Male'; "Bride Wars" refers to title = 'Bride Wars'; percentage = divide(sum(gender = 'Male'), count(gender)) * 100 as percentage
[ "gender.gender", "gender.gender_id", "movie.movie_id", "movie.title", "movie_cast.gender_id", "movie_cast.movie_id" ]
437
movies_4
CREATE TABLE country ( country_id INTEGER not null primary key, country_iso_code TEXT default NULL, country_name TEXT default NULL ); CREATE TABLE department ( department_id INTEGER not null primary key, department_name TEXT default NULL ); CREATE TABLE gender ...
What is the title of the movie that was made with the most money and resources?
SELECT title FROM movie ORDER BY budget DESC LIMIT 1
made with the most money and resources refers to max(budget)
[ "movie.budget", "movie.title" ]
438
movies_4
CREATE TABLE country ( country_id INTEGER not null primary key, country_iso_code TEXT default NULL, country_name TEXT default NULL ); CREATE TABLE department ( department_id INTEGER not null primary key, department_name TEXT default NULL ); CREATE TABLE gender ...
How many movies have made at least 1 Billion at the box office?
SELECT COUNT(movie_id) FROM movie WHERE revenue > 1000000000
have made at least 1 Billion at the box office refers to revenue > 1000000000
[ "movie.movie_id", "movie.revenue" ]
439
movies_4
CREATE TABLE country ( country_id INTEGER not null primary key, country_iso_code TEXT default NULL, country_name TEXT default NULL ); CREATE TABLE department ( department_id INTEGER not null primary key, department_name TEXT default NULL ); CREATE TABLE gender ...
When was the first movie released?
SELECT MIN(release_date) FROM movie WHERE movie_status = 'Released'
when the first movie refers to release_date where min(release_date)
[ "movie.movie_status", "movie.release_date" ]
440
movies_4
CREATE TABLE country ( country_id INTEGER not null primary key, country_iso_code TEXT default NULL, country_name TEXT default NULL ); CREATE TABLE department ( department_id INTEGER not null primary key, department_name TEXT default NULL ); CREATE TABLE gender ...
How many crew are named John Young?
SELECT COUNT(person_id) FROM person WHERE person_name = 'John Young'
[ "person.person_id", "person.person_name" ]
441
movies_4
CREATE TABLE country ( country_id INTEGER not null primary key, country_iso_code TEXT default NULL, country_name TEXT default NULL ); CREATE TABLE department ( department_id INTEGER not null primary key, department_name TEXT default NULL ); CREATE TABLE gender ...
Provide the title of the movie that is most-liked by a large number of people.
SELECT title FROM movie ORDER BY popularity DESC LIMIT 1
most-liked by a large number of people refers to max(popularity)
[ "movie.popularity", "movie.title" ]
442
movies_4
CREATE TABLE country ( country_id INTEGER not null primary key, country_iso_code TEXT default NULL, country_name TEXT default NULL ); CREATE TABLE department ( department_id INTEGER not null primary key, department_name TEXT default NULL ); CREATE TABLE gender ...
Who is the person associated with the crew id 1325273?
SELECT person_name FROM person WHERE person_id = 1325273
Who is the person refers to person_name; crew id 1325273 refers to person_id = 1325273
[ "person.person_id", "person.person_name" ]
443
movies_4
CREATE TABLE country ( country_id INTEGER not null primary key, country_iso_code TEXT default NULL, country_name TEXT default NULL ); CREATE TABLE department ( department_id INTEGER not null primary key, department_name TEXT default NULL ); CREATE TABLE gender ...
What is the name of the production company that made the most movies?
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
name of the production company refers to company_name; most movies refers to max(count(company_name))
[ "movie_company.company_id", "movie_company.movie_id", "production_company.company_id", "production_company.company_name" ]
444
movies_4
CREATE TABLE country ( country_id INTEGER not null primary key, country_iso_code TEXT default NULL, country_name TEXT default NULL ); CREATE TABLE department ( department_id INTEGER not null primary key, department_name TEXT default NULL ); CREATE TABLE gender ...
Who played Captain Jack Sparrow in all of the Pirates of the Caribbean movies?
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%'
Captain Jack Sparrow refers to character_name = 'Captain Jack Sparrow'; Pirates of the Caribbean movies refers to title LIKE 'Pirates of the Carribbean%'
[ "movie.movie_id", "movie.title", "movie_cast.character_name", "movie_cast.movie_id", "movie_cast.person_id", "person.person_id", "person.person_name" ]
445
movies_4
CREATE TABLE country ( country_id INTEGER not null primary key, country_iso_code TEXT default NULL, country_name TEXT default NULL ); CREATE TABLE department ( department_id INTEGER not null primary key, department_name TEXT default NULL ); CREATE TABLE gender ...
What is Walt Disney Pictures' most popular movie?
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
Walt Disney Pictures refers to company_name = 'Walt Disney Pictures'; most popular movie refers to max(popularity)
[ "movie.movie_id", "movie.popularity", "movie.title", "movie_company.company_id", "movie_company.movie_id", "production_company.company_id", "production_company.company_name" ]
446
movies_4
CREATE TABLE country ( country_id INTEGER not null primary key, country_iso_code TEXT default NULL, country_name TEXT default NULL ); CREATE TABLE department ( department_id INTEGER not null primary key, department_name TEXT default NULL ); CREATE TABLE gender ...
How many movies did Universal Studios release?
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'
Universal Studios refers to company_name = 'Universal Studios'
[ "movie_company.company_id", "movie_company.movie_id", "production_company.company_id", "production_company.company_name" ]
447
movies_4
CREATE TABLE country ( country_id INTEGER not null primary key, country_iso_code TEXT default NULL, country_name TEXT default NULL ); CREATE TABLE department ( department_id INTEGER not null primary key, department_name TEXT default NULL ); CREATE TABLE gender ...
Which production company produced the movie that made the most money at the box office?
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
Which production company refers to company_name; most money at the box office refers to max(revenue)
[ "movie.movie_id", "movie.revenue", "movie_company.company_id", "movie_company.movie_id", "production_company.company_id", "production_company.company_name" ]
448
movies_4
CREATE TABLE country ( country_id INTEGER not null primary key, country_iso_code TEXT default NULL, country_name TEXT default NULL ); CREATE TABLE department ( department_id INTEGER not null primary key, department_name TEXT default NULL ); CREATE TABLE gender ...
How many female crews are in the movie "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'
female crews refers to gender = 'Female'; "Mr. Smith Goes to Washington" refers to title = 'Mr. Smith Goes to Washington'
[ "gender.gender", "gender.gender_id", "movie.movie_id", "movie.title", "movie_cast.gender_id", "movie_cast.movie_id" ]
449
movies_4
CREATE TABLE country ( country_id INTEGER not null primary key, country_iso_code TEXT default NULL, country_name TEXT default NULL ); CREATE TABLE department ( department_id INTEGER not null primary key, department_name TEXT default NULL ); CREATE TABLE gender ...
List the names of the production companies that made at least 200 movies.
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
names of the production companies refers to company_name; at least 200 movies refers to COUNT(company_name) > = 200
[ "movie_company.company_id", "movie_company.movie_id", "production_company.company_id", "production_company.company_name" ]
450
movies_4
CREATE TABLE country ( country_id INTEGER not null primary key, country_iso_code TEXT default NULL, country_name TEXT default NULL ); CREATE TABLE department ( department_id INTEGER not null primary key, department_name TEXT default NULL ); CREATE TABLE gender ...
How many movies did Harrison Ford appear in total?
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'
[ "movie_cast.movie_id", "movie_cast.person_id", "person.person_id", "person.person_name" ]
451
movies_4
CREATE TABLE country ( country_id INTEGER not null primary key, country_iso_code TEXT default NULL, country_name TEXT default NULL ); CREATE TABLE department ( department_id INTEGER not null primary key, department_name TEXT default NULL ); CREATE TABLE gender ...
What is the title of Jamie Foxx's most recent movie?
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
most recent movie refers to max(release_date)
[ "movie.movie_id", "movie.release_date", "movie.title", "movie_cast.movie_id", "movie_cast.person_id", "person.person_id", "person.person_name" ]
452
movies_4
CREATE TABLE country ( country_id INTEGER not null primary key, country_iso_code TEXT default NULL, country_name TEXT default NULL ); CREATE TABLE department ( department_id INTEGER not null primary key, department_name TEXT default NULL ); CREATE TABLE gender ...
How many movies released in 1995 did Quentin Tarantino appear in?
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
released in 1995 refers to release_date LIKE '1995%'
[ "movie.movie_id", "movie.release_date", "movie_cast.movie_id", "movie_cast.person_id", "person.person_id", "person.person_name" ]
453
movies_4
CREATE TABLE country ( country_id INTEGER not null primary key, country_iso_code TEXT default NULL, country_name TEXT default NULL ); CREATE TABLE department ( department_id INTEGER not null primary key, department_name TEXT default NULL ); CREATE TABLE gender ...
What is the title of the first crime movie ever released?
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
first crime movie ever released refers to min(release_date) and genre_name = 'Crime'
[ "genre.genre_id", "genre.genre_name", "movie.movie_id", "movie.release_date", "movie.title", "movie_genres.genre_id", "movie_genres.movie_id" ]
454
movies_4
CREATE TABLE country ( country_id INTEGER not null primary key, country_iso_code TEXT default NULL, country_name TEXT default NULL ); CREATE TABLE department ( department_id INTEGER not null primary key, department_name TEXT default NULL ); CREATE TABLE gender ...
How many horror movies are there?
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'
horror movies refers to genre_name = 'Horror'
[ "genre.genre_id", "genre.genre_name", "movie_genres.genre_id", "movie_genres.movie_id" ]
455
movies_4
CREATE TABLE country ( country_id INTEGER not null primary key, country_iso_code TEXT default NULL, country_name TEXT default NULL ); CREATE TABLE department ( department_id INTEGER not null primary key, department_name TEXT default NULL ); CREATE TABLE gender ...
List the person IDs of the second film editors in Movie No. 12.
SELECT person_id FROM movie_crew WHERE movie_id = 12 AND job = 'Second Film Editor'
second film editors refers to job = 'Second Film Editor'; Movie No. 12 refers to movie_id = 12
[ "movie_crew.job", "movie_crew.movie_id", "movie_crew.person_id" ]
456
movies_4
CREATE TABLE country ( country_id INTEGER not null primary key, country_iso_code TEXT default NULL, country_name TEXT default NULL ); CREATE TABLE department ( department_id INTEGER not null primary key, department_name TEXT default NULL ); CREATE TABLE gender ...
How many animators does Movie No. 129 have?
SELECT COUNT(movie_id) FROM movie_crew WHERE movie_id = 129 AND job = 'Animation'
animators refers to job = 'Animation'; Movie No. 129 refers to movie_id = 129
[ "movie_crew.job", "movie_crew.movie_id" ]
457
movies_4
CREATE TABLE country ( country_id INTEGER not null primary key, country_iso_code TEXT default NULL, country_name TEXT default NULL ); CREATE TABLE department ( department_id INTEGER not null primary key, department_name TEXT default NULL ); CREATE TABLE gender ...
In Movie No. 19, how many people are there in Department No. 7? Please give me their job.
SELECT COUNT(DISTINCT job) FROM movie_crew WHERE movie_id = 19 AND department_id = 7
Movie No. 19 refers to movie_id = 19; Department No. 7 refers to department_id = 7
[ "movie_crew.department_id", "movie_crew.job", "movie_crew.movie_id" ]
458
movies_4
CREATE TABLE country ( country_id INTEGER not null primary key, country_iso_code TEXT default NULL, country_name TEXT default NULL ); CREATE TABLE department ( department_id INTEGER not null primary key, department_name TEXT default NULL ); CREATE TABLE gender ...
Write the person ID and character name of casts between order numbers 1 and 10 in Movie No. 285.
SELECT person_id, character_name FROM movie_cast WHERE movie_id = 285 AND cast_order BETWEEN 1 AND 10
casts between order numbers 1 and 10 refers to cast_order BETWEEN 2 AND 9; Movie No. 285 refers to movie_id = 285
[ "movie_cast.cast_order", "movie_cast.character_name", "movie_cast.movie_id", "movie_cast.person_id" ]
459
movies_4
CREATE TABLE country ( country_id INTEGER not null primary key, country_iso_code TEXT default NULL, country_name TEXT default NULL ); CREATE TABLE department ( department_id INTEGER not null primary key, department_name TEXT default NULL ); CREATE TABLE gender ...
How many times did Bob Peterson appear in the movie credits?
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'
[ "movie_cast.movie_id", "movie_cast.person_id", "person.person_id", "person.person_name" ]
460
movies_4
CREATE TABLE country ( country_id INTEGER not null primary key, country_iso_code TEXT default NULL, country_name TEXT default NULL ); CREATE TABLE department ( department_id INTEGER not null primary key, department_name TEXT default NULL ); CREATE TABLE gender ...
Tally the movie ID and character name in the movie starring Jim Carrey.
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'
[ "movie_cast.character_name", "movie_cast.movie_id", "movie_cast.person_id", "person.person_id", "person.person_name" ]
461
movies_4
CREATE TABLE country ( country_id INTEGER not null primary key, country_iso_code TEXT default NULL, country_name TEXT default NULL ); CREATE TABLE department ( department_id INTEGER not null primary key, department_name TEXT default NULL ); CREATE TABLE gender ...
Give the names of the female cast in Movie No. 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'
female cast refers to gender = 'Female'; name of cast refers to person_name; Movie No. 1865 refers to movie_id = 1865
[ "gender.gender", "gender.gender_id", "movie_cast.gender_id", "movie_cast.movie_id", "movie_cast.person_id", "person.person_id", "person.person_name" ]
462
movies_4
CREATE TABLE country ( country_id INTEGER not null primary key, country_iso_code TEXT default NULL, country_name TEXT default NULL ); CREATE TABLE department ( department_id INTEGER not null primary key, department_name TEXT default NULL ); CREATE TABLE gender ...
Write me the titles of the movies starring Jim Carrey.
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'
Jim Carrey is the person_name;
[ "movie.movie_id", "movie.title", "movie_cast.movie_id", "movie_cast.person_id", "person.person_id", "person.person_name" ]
463
movies_4
CREATE TABLE country ( country_id INTEGER not null primary key, country_iso_code TEXT default NULL, country_name TEXT default NULL ); CREATE TABLE department ( department_id INTEGER not null primary key, department_name TEXT default NULL ); CREATE TABLE gender ...
List the director's name of the movies released between 1/01/1916 and 12/31/1925.
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'
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'
[ "movie.movie_id", "movie.release_date", "movie_cast.movie_id", "movie_cast.person_id", "movie_crew.job", "movie_crew.movie_id", "person.person_id", "person.person_name" ]
464
movies_4
CREATE TABLE country ( country_id INTEGER not null primary key, country_iso_code TEXT default NULL, country_name TEXT default NULL ); CREATE TABLE department ( department_id INTEGER not null primary key, department_name TEXT default NULL ); CREATE TABLE gender ...
How many films released between 1/2/1990 and 12/30/2000 starred 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'
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'
[ "movie.movie_id", "movie.release_date", "movie_cast.movie_id", "movie_cast.person_id", "person.person_id", "person.person_name" ]
465
movies_4
CREATE TABLE country ( country_id INTEGER not null primary key, country_iso_code TEXT default NULL, country_name TEXT default NULL ); CREATE TABLE department ( department_id INTEGER not null primary key, department_name TEXT default NULL ); CREATE TABLE gender ...
Write the titles of horror films with a vote average of more than 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
horror films refers to genre_name = 'Horror'; vote average of more than 7 refers to vote_average > 7
[ "genre.genre_id", "genre.genre_name", "movie.movie_id", "movie.title", "movie_genres.genre_id", "movie_genres.movie_id" ]
466
movies_4
CREATE TABLE country ( country_id INTEGER not null primary key, country_iso_code TEXT default NULL, country_name TEXT default NULL ); CREATE TABLE department ( department_id INTEGER not null primary key, department_name TEXT default NULL ); CREATE TABLE gender ...
Give the genre and popularity of movies whose revenue is at least 120,000,000 between 2012 and 2015.
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'
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'
[ "genre.genre_id", "genre.genre_name", "movie.movie_id", "movie.popularity", "movie.release_date", "movie.revenue", "movie_genres.genre_id", "movie_genres.movie_id" ]
467
movies_4
CREATE TABLE country ( country_id INTEGER not null primary key, country_iso_code TEXT default NULL, country_name TEXT default NULL ); CREATE TABLE department ( department_id INTEGER not null primary key, department_name TEXT default NULL ); CREATE TABLE gender ...
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?
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'
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
[ "movie.movie_id", "movie.popularity", "movie.release_date", "movie.revenue", "production_COUNTry.movie_id" ]
468
movies_4
CREATE TABLE country ( country_id INTEGER not null primary key, country_iso_code TEXT default NULL, country_name TEXT default NULL ); CREATE TABLE department ( department_id INTEGER not null primary key, department_name TEXT default NULL ); CREATE TABLE gender ...
What is the title of the highest-budget film to date? Please include the revenue and name the country.
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
highest-budget film refers to max(budget); name the country refers to country_name
[ "COUNTry.COUNTry_id", "COUNTry.COUNTry_name", "movie.budget", "movie.movie_id", "movie.revenue", "movie.title", "production_COUNTry.COUNTry_id", "production_COUNTry.movie_id" ]
469
movies_4
CREATE TABLE country ( country_id INTEGER not null primary key, country_iso_code TEXT default NULL, country_name TEXT default NULL ); CREATE TABLE department ( department_id INTEGER not null primary key, department_name TEXT default NULL ); CREATE TABLE gender ...
List the title of movies in Latin released between 1/01/1990 and 12/31/1995.
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'
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'
[ "language.language_id", "language.language_name", "movie.movie_id", "movie.release_date", "movie.title", "movie_languages.language_id", "movie_languages.movie_id" ]
470
movies_4
CREATE TABLE country ( country_id INTEGER not null primary key, country_iso_code TEXT default NULL, country_name TEXT default NULL ); CREATE TABLE department ( department_id INTEGER not null primary key, department_name TEXT default NULL ); CREATE TABLE gender ...
What is the average revenue of American movies in 2006?
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
American movies refers to country_name = 'United States of America'; in 2006 refers to release_date LIKE '2006%'; average revenue = AVG(revenue)
[ "COUNTry.COUNTry_id", "COUNTry.COUNTry_name", "movie.movie_id", "movie.release_date", "movie.revenue", "production_COUNTry.COUNTry_id", "production_COUNTry.movie_id" ]
471
movies_4
CREATE TABLE country ( country_id INTEGER not null primary key, country_iso_code TEXT default NULL, country_name TEXT default NULL ); CREATE TABLE department ( department_id INTEGER not null primary key, department_name TEXT default NULL ); CREATE TABLE gender ...
Calculate the 2016 gap between the average revenue for Indian and American films.
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(STRFTI...
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...
[ "COUNTry.COUNTry_id", "COUNTry.COUNTry_name", "movie.movie_id", "movie.release_date", "movie.revenue", "production_COUNTry.COUNTry_id", "production_COUNTry.movie_id" ]
472
movies_4
CREATE TABLE country ( country_id INTEGER not null primary key, country_iso_code TEXT default NULL, country_name TEXT default NULL ); CREATE TABLE department ( department_id INTEGER not null primary key, department_name TEXT default NULL ); CREATE TABLE gender ...
What is the percentage of romance films among films produced in India in 2015?
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...
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
[ "COUNTry.COUNTry_id", "COUNTry.COUNTry_name", "genre.genre_id", "genre.genre_name", "movie.movie_id", "movie.release_date", "movie_genres.genre_id", "movie_genres.movie_id", "production_COUNTry.COUNTry_id", "production_COUNTry.movie_id" ]
473
movies_4
CREATE TABLE country ( country_id INTEGER not null primary key, country_iso_code TEXT default NULL, country_name TEXT default NULL ); CREATE TABLE department ( department_id INTEGER not null primary key, department_name TEXT default NULL ); CREATE TABLE gender ...
Which actor plays Optimus Prime?
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)'
Which actor refers to person_name; Optimus Prime refers to character_name = 'Optimus Prime (voice)'
[ "movie_cast.character_name", "movie_cast.person_id", "person.person_id", "person.person_name" ]
474
movies_4
CREATE TABLE country ( country_id INTEGER not null primary key, country_iso_code TEXT default NULL, country_name TEXT default NULL ); CREATE TABLE department ( department_id INTEGER not null primary key, department_name TEXT default NULL ); CREATE TABLE gender ...
What is the gender of the character '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'
character 'USAF Master Sgt. Epps' refers to character_name = 'USAF Master Sgt. Epps'
[ "gender.gender", "gender.gender_id", "movie_cast.character_name", "movie_cast.gender_id" ]
475
movies_4
CREATE TABLE country ( country_id INTEGER not null primary key, country_iso_code TEXT default NULL, country_name TEXT default NULL ); CREATE TABLE department ( department_id INTEGER not null primary key, department_name TEXT default NULL ); CREATE TABLE gender ...
List all companies who worked in the movie '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'
all companies refers to company_name; movie 'Ultramarines: A Warhammer 40,000 Movie' refers to title = 'Ultramarines: A Warhammer 40,000 Movie'
[ "movie.movie_id", "movie.title", "movie_company.company_id", "movie_company.movie_id", "production_company.company_id", "production_company.company_name" ]
476
movies_4
CREATE TABLE country ( country_id INTEGER not null primary key, country_iso_code TEXT default NULL, country_name TEXT default NULL ); CREATE TABLE department ( department_id INTEGER not null primary key, department_name TEXT default NULL ); CREATE TABLE gender ...
Which movie did the company 'Radiant Film GmbH' work on?
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'
Which movie refers to title; company 'Radiant Film GmbH' refers to company_name = 'Radiant Film GmbH'
[ "movie.movie_id", "movie.title", "movie_company.company_id", "movie_company.movie_id", "production_company.company_id", "production_company.company_name" ]
477
movies_4
CREATE TABLE country ( country_id INTEGER not null primary key, country_iso_code TEXT default NULL, country_name TEXT default NULL ); CREATE TABLE department ( department_id INTEGER not null primary key, department_name TEXT default NULL ); CREATE TABLE gender ...
What are the genres of 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'
genres refers to genre_name; Sky Captain and the World of Tomorrow refers to title = 'Sky Captain and the World of Tomorrow'
[ "genre.genre_id", "genre.genre_name", "movie.movie_id", "movie.title", "movie_genres.genre_id", "movie_genres.movie_id" ]
478
movies_4
CREATE TABLE country ( country_id INTEGER not null primary key, country_iso_code TEXT default NULL, country_name TEXT default NULL ); CREATE TABLE department ( department_id INTEGER not null primary key, department_name TEXT default NULL ); CREATE TABLE gender ...
Write all the keywords belonging to the movie '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'
keywords refers to keyword_name; movie 'Sky Captain and the World of Tomorrow' refers to title = 'Sky Captain and the World of Tomorrow'
[ "keyword.keyword_id", "keyword.keyword_name", "movie.movie_id", "movie.title", "movie_keywords.keyword_id", "movie_keywords.movie_id" ]
479
movies_4
CREATE TABLE country ( country_id INTEGER not null primary key, country_iso_code TEXT default NULL, country_name TEXT default NULL ); CREATE TABLE department ( department_id INTEGER not null primary key, department_name TEXT default NULL ); CREATE TABLE gender ...
The movie 'Gojira ni-sen mireniamu' is from which country?
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'
movie 'Gojira ni-sen mireniamu' refers to title = 'Gojira ni-sen mireniamu'; which country refers to country_name
[ "COUNTry.COUNTry_id", "COUNTry.COUNTry_name", "movie.movie_id", "movie.title", "production_COUNTry.COUNTry_id", "production_COUNTry.movie_id" ]
480
movies_4
CREATE TABLE country ( country_id INTEGER not null primary key, country_iso_code TEXT default NULL, country_name TEXT default NULL ); CREATE TABLE department ( department_id INTEGER not null primary key, department_name TEXT default NULL ); CREATE TABLE gender ...
Which movie has the keyword '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'
Which movie refers to title; keyword 'extremis' refers to keyword_name = 'extremis'
[ "keyword.keyword_id", "keyword.keyword_name", "movie.movie_id", "movie.title", "movie_keywords.keyword_id", "movie_keywords.movie_id" ]
481
movies_4
CREATE TABLE country ( country_id INTEGER not null primary key, country_iso_code TEXT default NULL, country_name TEXT default NULL ); CREATE TABLE department ( department_id INTEGER not null primary key, department_name TEXT default NULL ); CREATE TABLE gender ...
List 10 movie titles that were produced in 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
France refers to country_name = 'France'
[ "COUNTry.COUNTry_id", "COUNTry.COUNTry_name", "movie.movie_id", "movie.title", "production_COUNTry.COUNTry_id", "production_COUNTry.movie_id" ]
482
movies_4
CREATE TABLE country ( country_id INTEGER not null primary key, country_iso_code TEXT default NULL, country_name TEXT default NULL ); CREATE TABLE department ( department_id INTEGER not null primary key, department_name TEXT default NULL ); CREATE TABLE gender ...
Who is the director for the movie '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'
the director refers to person_name where job = 'Director'; movie 'Transformers' refers to title = 'Transformers'
[ "movie.movie_id", "movie.title", "movie_crew.job", "movie_crew.movie_id", "movie_crew.person_id", "person.person_id", "person.person_name" ]
483
movies_4
CREATE TABLE country ( country_id INTEGER not null primary key, country_iso_code TEXT default NULL, country_name TEXT default NULL ); CREATE TABLE department ( department_id INTEGER not null primary key, department_name TEXT default NULL ); CREATE TABLE gender ...
List 10 crews alongside their jobs who worked on the movie '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
crews refers to person_name; movie 'Mad Max: Fury Road' refers to title = 'Mad Max: Fury Road'
[ "movie.movie_id", "movie.title", "movie_crew.movie_id", "movie_crew.person_id", "person.person_id", "person.person_name" ]
484
movies_4
CREATE TABLE country ( country_id INTEGER not null primary key, country_iso_code TEXT default NULL, country_name TEXT default NULL ); CREATE TABLE department ( department_id INTEGER not null primary key, department_name TEXT default NULL ); CREATE TABLE gender ...
What percentage of movies that came from Japan belong in the 'animation' genre?
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 INN...
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
[ "COUNTry.COUNTry_id", "COUNTry.COUNTry_name", "genre.genre_id", "genre.genre_name", "movie.movie_id", "movie_genres.genre_id", "movie_genres.movie_id", "production_COUNTry.COUNTry_id", "production_COUNTry.movie_id" ]
485
movies_4
CREATE TABLE country ( country_id INTEGER not null primary key, country_iso_code TEXT default NULL, country_name TEXT default NULL ); CREATE TABLE department ( department_id INTEGER not null primary key, department_name TEXT default NULL ); CREATE TABLE gender ...
What is the ratio between male and female cast members of the movie 'Iron Man?' Count how many have unspecified genders.
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 A...
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'))
[ "gender.gender", "gender.gender_id", "movie.movie_id", "movie.title", "movie_cast.gender_id", "movie_cast.movie_id" ]
486
movies_4
CREATE TABLE country ( country_id INTEGER not null primary key, country_iso_code TEXT default NULL, country_name TEXT default NULL ); CREATE TABLE department ( department_id INTEGER not null primary key, department_name TEXT default NULL ); CREATE TABLE gender ...
List down five movie titles that were released before 2000.
SELECT title FROM movie WHERE CAST(STRFTIME('%Y', release_date) AS INT) < 2000 LIMIT 5
released before 2000 refers to release_date < '2000-01-01'
[ "movie.release_date", "movie.title" ]
487
movies_4
CREATE TABLE country ( country_id INTEGER not null primary key, country_iso_code TEXT default NULL, country_name TEXT default NULL ); CREATE TABLE department ( department_id INTEGER not null primary key, department_name TEXT default NULL ); CREATE TABLE gender ...
What is the keyword ID of the movie with the title of "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'
title of "Sin City" refers to title = 'Sin City'
[ "movie.movie_id", "movie.title", "movie_keywords.keyword_id", "movie_keywords.movie_id" ]
488
movies_4
CREATE TABLE country ( country_id INTEGER not null primary key, country_iso_code TEXT default NULL, country_name TEXT default NULL ); CREATE TABLE department ( department_id INTEGER not null primary key, department_name TEXT default NULL ); CREATE TABLE gender ...
Look for the movie title with the keyword of "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'
keyword of "angel" refers to keyword_name = 'angel'
[ "keyword.keyword_id", "keyword.keyword_name", "movie.movie_id", "movie.title", "movie_keywords.keyword_id", "movie_keywords.movie_id" ]
489
movies_4
CREATE TABLE country ( country_id INTEGER not null primary key, country_iso_code TEXT default NULL, country_name TEXT default NULL ); CREATE TABLE department ( department_id INTEGER not null primary key, department_name TEXT default NULL ); CREATE TABLE gender ...
Which keywords belong to the movie titles with the highest 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
Which keywords refers to keyword_name; highest popularity refers to max(popularity)
[ "keyword.keyword_id", "keyword.keyword_name", "movie.movie_id", "movie.popularity", "movie_keywords.keyword_id", "movie_keywords.movie_id" ]
490
movies_4
CREATE TABLE country ( country_id INTEGER not null primary key, country_iso_code TEXT default NULL, country_name TEXT default NULL ); CREATE TABLE department ( department_id INTEGER not null primary key, department_name TEXT default NULL ); CREATE TABLE gender ...
Provide the genre ID of the movie with the title of "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'
movie with the title of "The Dark Knight" refers to title = 'The Dark Knight'
[ "movie.movie_id", "movie.title", "movie_genres.genre_id", "movie_genres.movie_id" ]
491
movies_4
CREATE TABLE country ( country_id INTEGER not null primary key, country_iso_code TEXT default NULL, country_name TEXT default NULL ); CREATE TABLE department ( department_id INTEGER not null primary key, department_name TEXT default NULL ); CREATE TABLE gender ...
List down the movie titles within the genre of 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'
genre of thriller refers to genre_name = 'Thriller'
[ "genre.genre_id", "genre.genre_name", "movie.movie_id", "movie.title", "movie_genres.genre_id", "movie_genres.movie_id" ]
492
movies_4
CREATE TABLE country ( country_id INTEGER not null primary key, country_iso_code TEXT default NULL, country_name TEXT default NULL ); CREATE TABLE department ( department_id INTEGER not null primary key, department_name TEXT default NULL ); CREATE TABLE gender ...
Write down five rumoured movie titles within the genre of 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
rumoured movie refers to movie_status = 'rumoured'; genre of Drama refers to genre_name = 'Drama'
[ "genre.genre_id", "genre.genre_name", "movie.movie_id", "movie.movie_status", "movie.title", "movie_genres.genre_id", "movie_genres.movie_id" ]
493
movies_4
CREATE TABLE country ( country_id INTEGER not null primary key, country_iso_code TEXT default NULL, country_name TEXT default NULL ); CREATE TABLE department ( department_id INTEGER not null primary key, department_name TEXT default NULL ); CREATE TABLE gender ...
What is the genre of the movie title with the lowest revenue generated?
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
genre refers to genre_name; lowest revenue refers to min(revenue)
[ "genre.genre_id", "genre.genre_name", "movie.movie_id", "movie.revenue", "movie_genres.genre_id", "movie_genres.movie_id" ]
494
movies_4
CREATE TABLE country ( country_id INTEGER not null primary key, country_iso_code TEXT default NULL, country_name TEXT default NULL ); CREATE TABLE department ( department_id INTEGER not null primary key, department_name TEXT default NULL ); CREATE TABLE gender ...
State the genre of the movie title with a runtime of only 14 minutes.
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
genre refers to genre_name; runtime of only 14 minutes refers to runtime = 14
[ "genre.genre_id", "genre.genre_name", "movie.movie_id", "movie.runtime", "movie_genres.genre_id", "movie_genres.movie_id" ]
495
movies_4
CREATE TABLE country ( country_id INTEGER not null primary key, country_iso_code TEXT default NULL, country_name TEXT default NULL ); CREATE TABLE department ( department_id INTEGER not null primary key, department_name TEXT default NULL ); CREATE TABLE gender ...
What is the genre of the movie title which was well-received by the audiences but made the lowest 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
genre refers to genre_name; well-received by the audiences refers to max(vote_average); lowest revenue refers to min(revenue)
[ "genre.genre_id", "genre.genre_name", "movie.movie_id", "movie.revenue", "movie.vote_average", "movie_genres.genre_id", "movie_genres.movie_id" ]
496
movies_4
CREATE TABLE country ( country_id INTEGER not null primary key, country_iso_code TEXT default NULL, country_name TEXT default NULL ); CREATE TABLE department ( department_id INTEGER not null primary key, department_name TEXT default NULL ); CREATE TABLE gender ...
Provide the genre of a movie title with a tagline of "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...'
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…'
[ "genre.genre_id", "genre.genre_name", "movie.movie_id", "movie.tagline", "movie_genres.genre_id", "movie_genres.movie_id" ]
497
movies_4
CREATE TABLE country ( country_id INTEGER not null primary key, country_iso_code TEXT default NULL, country_name TEXT default NULL ); CREATE TABLE department ( department_id INTEGER not null primary key, department_name TEXT default NULL ); CREATE TABLE gender ...
What is the country ID of the movie with the title of "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'
title of "Pirates of the Caribbean: Dead Man's Chest" refers to title = 'Pirates of the Caribbean: Dead Man''s Chest'
[ "movie.movie_id", "movie.title", "production_COUNTry.COUNTry_id", "production_COUNTry.movie_id" ]
498
movies_4
CREATE TABLE country ( country_id INTEGER not null primary key, country_iso_code TEXT default NULL, country_name TEXT default NULL ); CREATE TABLE department ( department_id INTEGER not null primary key, department_name TEXT default NULL ); CREATE TABLE gender ...
List down the movie titles that were produced in 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'
produced in Canada refers to country_name = 'Canada'
[ "COUNTry.COUNTry_id", "COUNTry.COUNTry_name", "movie.movie_id", "movie.title", "production_COUNTry.COUNTry_id", "production_COUNTry.movie_id" ]
499
movies_4
CREATE TABLE country ( country_id INTEGER not null primary key, country_iso_code TEXT default NULL, country_name TEXT default NULL ); CREATE TABLE department ( department_id INTEGER not null primary key, department_name TEXT default NULL ); CREATE TABLE gender ...
Accumulate the budget of the movie titles with the keyword of "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'
keyword of "video game" refers to keyword_name = 'video game'
[ "keyword.keyword_id", "keyword.keyword_name", "movie.budget", "movie.movie_id", "movie_keywords.keyword_id", "movie_keywords.movie_id" ]