db_id
stringclasses
146 values
question
stringlengths
3
224
sql
stringlengths
18
577
database_schema
stringclasses
146 values
imdb
Where is the birth place of " Kevin Spacey "
SELECT birth_city FROM director WHERE name = "director_name0";
CREATE TABLE "actor" ( "aid" int, "gender" text, "name" text, "nationality" text, "birth_city" text, "birth_year" int, primary key("aid") ) 3 rows from actor table: Empty DataFrame Columns: [aid, gender, name, nationality, birth_city, birth_year] Index: [] CREATE TABLE "copyright" ( "id" int, "msid" int, "cid" int, primary key("id") ) 3 rows from copyright table: Empty DataFrame Columns: [id, msid, cid] Index: [] CREATE TABLE "cast" ( "id" int, "msid" int, "aid" int, "role" int, primary key("id"), foreign key("aid") references `actor`("aid"), foreign key("msid") references `copyright`("msid") ) 3 rows from cast table: Empty DataFrame Columns: [id, msid, aid, role] Index: [] CREATE TABLE "genre" ( "gid" int, "genre" text, primary key("gid") ) 3 rows from genre table: Empty DataFrame Columns: [gid, genre] Index: [] CREATE TABLE "classification" ( "id" int, "msid" int, "gid" int, primary key("id"), foreign key("gid") references `genre`("gid"), foreign key("msid") references `copyright`("msid") ) 3 rows from classification table: Empty DataFrame Columns: [id, msid, gid] Index: [] CREATE TABLE "company" ( "id" int, "name" text, "country_code" text, primary key("id") ) 3 rows from company table: Empty DataFrame Columns: [id, name, country_code] Index: [] CREATE TABLE "director" ( "did" int, "gender" text, "name" text, "nationality" text, "birth_city" text, "birth_year" int, primary key("did") ) 3 rows from director table: Empty DataFrame Columns: [did, gender, name, nationality, birth_city, birth_year] Index: [] CREATE TABLE "producer" ( "pid" int, "gender" text, "name" text, "nationality" text, "birth_city" text, "birth_year" int, primary key("pid") ) 3 rows from producer table: Empty DataFrame Columns: [pid, gender, name, nationality, birth_city, birth_year] Index: [] CREATE TABLE "directed_by" ( "id" int, "msid" int, "did" int, primary key("id"), foreign key("msid") references `copyright`("msid"), foreign key("did") references `director`("did") ) 3 rows from directed_by table: Empty DataFrame Columns: [id, msid, did] Index: [] CREATE TABLE "keyword" ( "id" int, "keyword" text, primary key("id") ) 3 rows from keyword table: Empty DataFrame Columns: [id, keyword] Index: [] CREATE TABLE "made_by" ( "id" int, "msid" int, "pid" int, primary key("id"), foreign key("msid") references `copyright`("msid"), foreign key("pid") references `producer`("pid") ) 3 rows from made_by table: Empty DataFrame Columns: [id, msid, pid] Index: [] CREATE TABLE "movie" ( "mid" int, "title" text, "release_year" int, "title_aka" text, "budget" text, primary key("mid") ) 3 rows from movie table: Empty DataFrame Columns: [mid, title, release_year, title_aka, budget] Index: [] CREATE TABLE "tags" ( "id" int, "msid" int, "kid" int, primary key("id"), foreign key("msid") references `copyright`("msid"), foreign key("kid") references `keyword`("kid") ) 3 rows from tags table: Empty DataFrame Columns: [id, msid, kid] Index: [] CREATE TABLE "tv_series" ( "sid" int, "title" text, "release_year" int, "num_of_seasons" int, "num_of_episodes" int, "title_aka" text, "budget" text, primary key("sid") ) 3 rows from tv_series table: Empty DataFrame Columns: [sid, title, release_year, num_of_seasons, num_of_episodes, title_aka, budget] Index: [] CREATE TABLE "writer" ( "wid" int, "gender" text, "name" int, "nationality" int, "num_of_episodes" int, "birth_city" text, "birth_year" int, primary key("wid") ) 3 rows from writer table: Empty DataFrame Columns: [wid, gender, name, nationality, num_of_episodes, birth_city, birth_year] Index: [] CREATE TABLE "written_by" ( "id" int, "msid" int, "wid" int, foreign key("msid") references `copyright`("msid"), foreign key("wid") references `writer`("wid") ) 3 rows from written_by table: Empty DataFrame Columns: [id, msid, wid] Index: []
imdb
In what city was " Kevin Spacey " born ?
SELECT birth_city FROM director WHERE name = "director_name0";
CREATE TABLE "actor" ( "aid" int, "gender" text, "name" text, "nationality" text, "birth_city" text, "birth_year" int, primary key("aid") ) 3 rows from actor table: Empty DataFrame Columns: [aid, gender, name, nationality, birth_city, birth_year] Index: [] CREATE TABLE "copyright" ( "id" int, "msid" int, "cid" int, primary key("id") ) 3 rows from copyright table: Empty DataFrame Columns: [id, msid, cid] Index: [] CREATE TABLE "cast" ( "id" int, "msid" int, "aid" int, "role" int, primary key("id"), foreign key("aid") references `actor`("aid"), foreign key("msid") references `copyright`("msid") ) 3 rows from cast table: Empty DataFrame Columns: [id, msid, aid, role] Index: [] CREATE TABLE "genre" ( "gid" int, "genre" text, primary key("gid") ) 3 rows from genre table: Empty DataFrame Columns: [gid, genre] Index: [] CREATE TABLE "classification" ( "id" int, "msid" int, "gid" int, primary key("id"), foreign key("gid") references `genre`("gid"), foreign key("msid") references `copyright`("msid") ) 3 rows from classification table: Empty DataFrame Columns: [id, msid, gid] Index: [] CREATE TABLE "company" ( "id" int, "name" text, "country_code" text, primary key("id") ) 3 rows from company table: Empty DataFrame Columns: [id, name, country_code] Index: [] CREATE TABLE "director" ( "did" int, "gender" text, "name" text, "nationality" text, "birth_city" text, "birth_year" int, primary key("did") ) 3 rows from director table: Empty DataFrame Columns: [did, gender, name, nationality, birth_city, birth_year] Index: [] CREATE TABLE "producer" ( "pid" int, "gender" text, "name" text, "nationality" text, "birth_city" text, "birth_year" int, primary key("pid") ) 3 rows from producer table: Empty DataFrame Columns: [pid, gender, name, nationality, birth_city, birth_year] Index: [] CREATE TABLE "directed_by" ( "id" int, "msid" int, "did" int, primary key("id"), foreign key("msid") references `copyright`("msid"), foreign key("did") references `director`("did") ) 3 rows from directed_by table: Empty DataFrame Columns: [id, msid, did] Index: [] CREATE TABLE "keyword" ( "id" int, "keyword" text, primary key("id") ) 3 rows from keyword table: Empty DataFrame Columns: [id, keyword] Index: [] CREATE TABLE "made_by" ( "id" int, "msid" int, "pid" int, primary key("id"), foreign key("msid") references `copyright`("msid"), foreign key("pid") references `producer`("pid") ) 3 rows from made_by table: Empty DataFrame Columns: [id, msid, pid] Index: [] CREATE TABLE "movie" ( "mid" int, "title" text, "release_year" int, "title_aka" text, "budget" text, primary key("mid") ) 3 rows from movie table: Empty DataFrame Columns: [mid, title, release_year, title_aka, budget] Index: [] CREATE TABLE "tags" ( "id" int, "msid" int, "kid" int, primary key("id"), foreign key("msid") references `copyright`("msid"), foreign key("kid") references `keyword`("kid") ) 3 rows from tags table: Empty DataFrame Columns: [id, msid, kid] Index: [] CREATE TABLE "tv_series" ( "sid" int, "title" text, "release_year" int, "num_of_seasons" int, "num_of_episodes" int, "title_aka" text, "budget" text, primary key("sid") ) 3 rows from tv_series table: Empty DataFrame Columns: [sid, title, release_year, num_of_seasons, num_of_episodes, title_aka, budget] Index: [] CREATE TABLE "writer" ( "wid" int, "gender" text, "name" int, "nationality" int, "num_of_episodes" int, "birth_city" text, "birth_year" int, primary key("wid") ) 3 rows from writer table: Empty DataFrame Columns: [wid, gender, name, nationality, num_of_episodes, birth_city, birth_year] Index: [] CREATE TABLE "written_by" ( "id" int, "msid" int, "wid" int, foreign key("msid") references `copyright`("msid"), foreign key("wid") references `writer`("wid") ) 3 rows from written_by table: Empty DataFrame Columns: [id, msid, wid] Index: []
imdb
What is the nationality of " Kevin Spacey " ?
SELECT nationality FROM director WHERE name = "director_name0";
CREATE TABLE "actor" ( "aid" int, "gender" text, "name" text, "nationality" text, "birth_city" text, "birth_year" int, primary key("aid") ) 3 rows from actor table: Empty DataFrame Columns: [aid, gender, name, nationality, birth_city, birth_year] Index: [] CREATE TABLE "copyright" ( "id" int, "msid" int, "cid" int, primary key("id") ) 3 rows from copyright table: Empty DataFrame Columns: [id, msid, cid] Index: [] CREATE TABLE "cast" ( "id" int, "msid" int, "aid" int, "role" int, primary key("id"), foreign key("aid") references `actor`("aid"), foreign key("msid") references `copyright`("msid") ) 3 rows from cast table: Empty DataFrame Columns: [id, msid, aid, role] Index: [] CREATE TABLE "genre" ( "gid" int, "genre" text, primary key("gid") ) 3 rows from genre table: Empty DataFrame Columns: [gid, genre] Index: [] CREATE TABLE "classification" ( "id" int, "msid" int, "gid" int, primary key("id"), foreign key("gid") references `genre`("gid"), foreign key("msid") references `copyright`("msid") ) 3 rows from classification table: Empty DataFrame Columns: [id, msid, gid] Index: [] CREATE TABLE "company" ( "id" int, "name" text, "country_code" text, primary key("id") ) 3 rows from company table: Empty DataFrame Columns: [id, name, country_code] Index: [] CREATE TABLE "director" ( "did" int, "gender" text, "name" text, "nationality" text, "birth_city" text, "birth_year" int, primary key("did") ) 3 rows from director table: Empty DataFrame Columns: [did, gender, name, nationality, birth_city, birth_year] Index: [] CREATE TABLE "producer" ( "pid" int, "gender" text, "name" text, "nationality" text, "birth_city" text, "birth_year" int, primary key("pid") ) 3 rows from producer table: Empty DataFrame Columns: [pid, gender, name, nationality, birth_city, birth_year] Index: [] CREATE TABLE "directed_by" ( "id" int, "msid" int, "did" int, primary key("id"), foreign key("msid") references `copyright`("msid"), foreign key("did") references `director`("did") ) 3 rows from directed_by table: Empty DataFrame Columns: [id, msid, did] Index: [] CREATE TABLE "keyword" ( "id" int, "keyword" text, primary key("id") ) 3 rows from keyword table: Empty DataFrame Columns: [id, keyword] Index: [] CREATE TABLE "made_by" ( "id" int, "msid" int, "pid" int, primary key("id"), foreign key("msid") references `copyright`("msid"), foreign key("pid") references `producer`("pid") ) 3 rows from made_by table: Empty DataFrame Columns: [id, msid, pid] Index: [] CREATE TABLE "movie" ( "mid" int, "title" text, "release_year" int, "title_aka" text, "budget" text, primary key("mid") ) 3 rows from movie table: Empty DataFrame Columns: [mid, title, release_year, title_aka, budget] Index: [] CREATE TABLE "tags" ( "id" int, "msid" int, "kid" int, primary key("id"), foreign key("msid") references `copyright`("msid"), foreign key("kid") references `keyword`("kid") ) 3 rows from tags table: Empty DataFrame Columns: [id, msid, kid] Index: [] CREATE TABLE "tv_series" ( "sid" int, "title" text, "release_year" int, "num_of_seasons" int, "num_of_episodes" int, "title_aka" text, "budget" text, primary key("sid") ) 3 rows from tv_series table: Empty DataFrame Columns: [sid, title, release_year, num_of_seasons, num_of_episodes, title_aka, budget] Index: [] CREATE TABLE "writer" ( "wid" int, "gender" text, "name" int, "nationality" int, "num_of_episodes" int, "birth_city" text, "birth_year" int, primary key("wid") ) 3 rows from writer table: Empty DataFrame Columns: [wid, gender, name, nationality, num_of_episodes, birth_city, birth_year] Index: [] CREATE TABLE "written_by" ( "id" int, "msid" int, "wid" int, foreign key("msid") references `copyright`("msid"), foreign key("wid") references `writer`("wid") ) 3 rows from written_by table: Empty DataFrame Columns: [id, msid, wid] Index: []
imdb
How much was the budget of " Finding Nemo "
SELECT budget FROM movie WHERE title = "Finding Nemo";
CREATE TABLE "actor" ( "aid" int, "gender" text, "name" text, "nationality" text, "birth_city" text, "birth_year" int, primary key("aid") ) 3 rows from actor table: Empty DataFrame Columns: [aid, gender, name, nationality, birth_city, birth_year] Index: [] CREATE TABLE "copyright" ( "id" int, "msid" int, "cid" int, primary key("id") ) 3 rows from copyright table: Empty DataFrame Columns: [id, msid, cid] Index: [] CREATE TABLE "cast" ( "id" int, "msid" int, "aid" int, "role" int, primary key("id"), foreign key("aid") references `actor`("aid"), foreign key("msid") references `copyright`("msid") ) 3 rows from cast table: Empty DataFrame Columns: [id, msid, aid, role] Index: [] CREATE TABLE "genre" ( "gid" int, "genre" text, primary key("gid") ) 3 rows from genre table: Empty DataFrame Columns: [gid, genre] Index: [] CREATE TABLE "classification" ( "id" int, "msid" int, "gid" int, primary key("id"), foreign key("gid") references `genre`("gid"), foreign key("msid") references `copyright`("msid") ) 3 rows from classification table: Empty DataFrame Columns: [id, msid, gid] Index: [] CREATE TABLE "company" ( "id" int, "name" text, "country_code" text, primary key("id") ) 3 rows from company table: Empty DataFrame Columns: [id, name, country_code] Index: [] CREATE TABLE "director" ( "did" int, "gender" text, "name" text, "nationality" text, "birth_city" text, "birth_year" int, primary key("did") ) 3 rows from director table: Empty DataFrame Columns: [did, gender, name, nationality, birth_city, birth_year] Index: [] CREATE TABLE "producer" ( "pid" int, "gender" text, "name" text, "nationality" text, "birth_city" text, "birth_year" int, primary key("pid") ) 3 rows from producer table: Empty DataFrame Columns: [pid, gender, name, nationality, birth_city, birth_year] Index: [] CREATE TABLE "directed_by" ( "id" int, "msid" int, "did" int, primary key("id"), foreign key("msid") references `copyright`("msid"), foreign key("did") references `director`("did") ) 3 rows from directed_by table: Empty DataFrame Columns: [id, msid, did] Index: [] CREATE TABLE "keyword" ( "id" int, "keyword" text, primary key("id") ) 3 rows from keyword table: Empty DataFrame Columns: [id, keyword] Index: [] CREATE TABLE "made_by" ( "id" int, "msid" int, "pid" int, primary key("id"), foreign key("msid") references `copyright`("msid"), foreign key("pid") references `producer`("pid") ) 3 rows from made_by table: Empty DataFrame Columns: [id, msid, pid] Index: [] CREATE TABLE "movie" ( "mid" int, "title" text, "release_year" int, "title_aka" text, "budget" text, primary key("mid") ) 3 rows from movie table: Empty DataFrame Columns: [mid, title, release_year, title_aka, budget] Index: [] CREATE TABLE "tags" ( "id" int, "msid" int, "kid" int, primary key("id"), foreign key("msid") references `copyright`("msid"), foreign key("kid") references `keyword`("kid") ) 3 rows from tags table: Empty DataFrame Columns: [id, msid, kid] Index: [] CREATE TABLE "tv_series" ( "sid" int, "title" text, "release_year" int, "num_of_seasons" int, "num_of_episodes" int, "title_aka" text, "budget" text, primary key("sid") ) 3 rows from tv_series table: Empty DataFrame Columns: [sid, title, release_year, num_of_seasons, num_of_episodes, title_aka, budget] Index: [] CREATE TABLE "writer" ( "wid" int, "gender" text, "name" int, "nationality" int, "num_of_episodes" int, "birth_city" text, "birth_year" int, primary key("wid") ) 3 rows from writer table: Empty DataFrame Columns: [wid, gender, name, nationality, num_of_episodes, birth_city, birth_year] Index: [] CREATE TABLE "written_by" ( "id" int, "msid" int, "wid" int, foreign key("msid") references `copyright`("msid"), foreign key("wid") references `writer`("wid") ) 3 rows from written_by table: Empty DataFrame Columns: [id, msid, wid] Index: []
imdb
Find all movies directed by " Steven Spielberg " after 2006
SELECT t3.title FROM director AS t2 JOIN directed_by AS t1 ON t2.did = t1.did JOIN movie AS t3 ON t3.mid = t1.msid WHERE t2.name = "Steven Spielberg" AND t3.release_year > 2006;
CREATE TABLE "actor" ( "aid" int, "gender" text, "name" text, "nationality" text, "birth_city" text, "birth_year" int, primary key("aid") ) 3 rows from actor table: Empty DataFrame Columns: [aid, gender, name, nationality, birth_city, birth_year] Index: [] CREATE TABLE "copyright" ( "id" int, "msid" int, "cid" int, primary key("id") ) 3 rows from copyright table: Empty DataFrame Columns: [id, msid, cid] Index: [] CREATE TABLE "cast" ( "id" int, "msid" int, "aid" int, "role" int, primary key("id"), foreign key("aid") references `actor`("aid"), foreign key("msid") references `copyright`("msid") ) 3 rows from cast table: Empty DataFrame Columns: [id, msid, aid, role] Index: [] CREATE TABLE "genre" ( "gid" int, "genre" text, primary key("gid") ) 3 rows from genre table: Empty DataFrame Columns: [gid, genre] Index: [] CREATE TABLE "classification" ( "id" int, "msid" int, "gid" int, primary key("id"), foreign key("gid") references `genre`("gid"), foreign key("msid") references `copyright`("msid") ) 3 rows from classification table: Empty DataFrame Columns: [id, msid, gid] Index: [] CREATE TABLE "company" ( "id" int, "name" text, "country_code" text, primary key("id") ) 3 rows from company table: Empty DataFrame Columns: [id, name, country_code] Index: [] CREATE TABLE "director" ( "did" int, "gender" text, "name" text, "nationality" text, "birth_city" text, "birth_year" int, primary key("did") ) 3 rows from director table: Empty DataFrame Columns: [did, gender, name, nationality, birth_city, birth_year] Index: [] CREATE TABLE "producer" ( "pid" int, "gender" text, "name" text, "nationality" text, "birth_city" text, "birth_year" int, primary key("pid") ) 3 rows from producer table: Empty DataFrame Columns: [pid, gender, name, nationality, birth_city, birth_year] Index: [] CREATE TABLE "directed_by" ( "id" int, "msid" int, "did" int, primary key("id"), foreign key("msid") references `copyright`("msid"), foreign key("did") references `director`("did") ) 3 rows from directed_by table: Empty DataFrame Columns: [id, msid, did] Index: [] CREATE TABLE "keyword" ( "id" int, "keyword" text, primary key("id") ) 3 rows from keyword table: Empty DataFrame Columns: [id, keyword] Index: [] CREATE TABLE "made_by" ( "id" int, "msid" int, "pid" int, primary key("id"), foreign key("msid") references `copyright`("msid"), foreign key("pid") references `producer`("pid") ) 3 rows from made_by table: Empty DataFrame Columns: [id, msid, pid] Index: [] CREATE TABLE "movie" ( "mid" int, "title" text, "release_year" int, "title_aka" text, "budget" text, primary key("mid") ) 3 rows from movie table: Empty DataFrame Columns: [mid, title, release_year, title_aka, budget] Index: [] CREATE TABLE "tags" ( "id" int, "msid" int, "kid" int, primary key("id"), foreign key("msid") references `copyright`("msid"), foreign key("kid") references `keyword`("kid") ) 3 rows from tags table: Empty DataFrame Columns: [id, msid, kid] Index: [] CREATE TABLE "tv_series" ( "sid" int, "title" text, "release_year" int, "num_of_seasons" int, "num_of_episodes" int, "title_aka" text, "budget" text, primary key("sid") ) 3 rows from tv_series table: Empty DataFrame Columns: [sid, title, release_year, num_of_seasons, num_of_episodes, title_aka, budget] Index: [] CREATE TABLE "writer" ( "wid" int, "gender" text, "name" int, "nationality" int, "num_of_episodes" int, "birth_city" text, "birth_year" int, primary key("wid") ) 3 rows from writer table: Empty DataFrame Columns: [wid, gender, name, nationality, num_of_episodes, birth_city, birth_year] Index: [] CREATE TABLE "written_by" ( "id" int, "msid" int, "wid" int, foreign key("msid") references `copyright`("msid"), foreign key("wid") references `writer`("wid") ) 3 rows from written_by table: Empty DataFrame Columns: [id, msid, wid] Index: []
imdb
Who is the director of the movie " James Bond " ?
SELECT t2.name FROM director AS t2 JOIN directed_by AS t1 ON t2.did = t1.did JOIN movie AS t3 ON t3.mid = t1.msid WHERE t3.title = "James Bond";
CREATE TABLE "actor" ( "aid" int, "gender" text, "name" text, "nationality" text, "birth_city" text, "birth_year" int, primary key("aid") ) 3 rows from actor table: Empty DataFrame Columns: [aid, gender, name, nationality, birth_city, birth_year] Index: [] CREATE TABLE "copyright" ( "id" int, "msid" int, "cid" int, primary key("id") ) 3 rows from copyright table: Empty DataFrame Columns: [id, msid, cid] Index: [] CREATE TABLE "cast" ( "id" int, "msid" int, "aid" int, "role" int, primary key("id"), foreign key("aid") references `actor`("aid"), foreign key("msid") references `copyright`("msid") ) 3 rows from cast table: Empty DataFrame Columns: [id, msid, aid, role] Index: [] CREATE TABLE "genre" ( "gid" int, "genre" text, primary key("gid") ) 3 rows from genre table: Empty DataFrame Columns: [gid, genre] Index: [] CREATE TABLE "classification" ( "id" int, "msid" int, "gid" int, primary key("id"), foreign key("gid") references `genre`("gid"), foreign key("msid") references `copyright`("msid") ) 3 rows from classification table: Empty DataFrame Columns: [id, msid, gid] Index: [] CREATE TABLE "company" ( "id" int, "name" text, "country_code" text, primary key("id") ) 3 rows from company table: Empty DataFrame Columns: [id, name, country_code] Index: [] CREATE TABLE "director" ( "did" int, "gender" text, "name" text, "nationality" text, "birth_city" text, "birth_year" int, primary key("did") ) 3 rows from director table: Empty DataFrame Columns: [did, gender, name, nationality, birth_city, birth_year] Index: [] CREATE TABLE "producer" ( "pid" int, "gender" text, "name" text, "nationality" text, "birth_city" text, "birth_year" int, primary key("pid") ) 3 rows from producer table: Empty DataFrame Columns: [pid, gender, name, nationality, birth_city, birth_year] Index: [] CREATE TABLE "directed_by" ( "id" int, "msid" int, "did" int, primary key("id"), foreign key("msid") references `copyright`("msid"), foreign key("did") references `director`("did") ) 3 rows from directed_by table: Empty DataFrame Columns: [id, msid, did] Index: [] CREATE TABLE "keyword" ( "id" int, "keyword" text, primary key("id") ) 3 rows from keyword table: Empty DataFrame Columns: [id, keyword] Index: [] CREATE TABLE "made_by" ( "id" int, "msid" int, "pid" int, primary key("id"), foreign key("msid") references `copyright`("msid"), foreign key("pid") references `producer`("pid") ) 3 rows from made_by table: Empty DataFrame Columns: [id, msid, pid] Index: [] CREATE TABLE "movie" ( "mid" int, "title" text, "release_year" int, "title_aka" text, "budget" text, primary key("mid") ) 3 rows from movie table: Empty DataFrame Columns: [mid, title, release_year, title_aka, budget] Index: [] CREATE TABLE "tags" ( "id" int, "msid" int, "kid" int, primary key("id"), foreign key("msid") references `copyright`("msid"), foreign key("kid") references `keyword`("kid") ) 3 rows from tags table: Empty DataFrame Columns: [id, msid, kid] Index: [] CREATE TABLE "tv_series" ( "sid" int, "title" text, "release_year" int, "num_of_seasons" int, "num_of_episodes" int, "title_aka" text, "budget" text, primary key("sid") ) 3 rows from tv_series table: Empty DataFrame Columns: [sid, title, release_year, num_of_seasons, num_of_episodes, title_aka, budget] Index: [] CREATE TABLE "writer" ( "wid" int, "gender" text, "name" int, "nationality" int, "num_of_episodes" int, "birth_city" text, "birth_year" int, primary key("wid") ) 3 rows from writer table: Empty DataFrame Columns: [wid, gender, name, nationality, num_of_episodes, birth_city, birth_year] Index: [] CREATE TABLE "written_by" ( "id" int, "msid" int, "wid" int, foreign key("msid") references `copyright`("msid"), foreign key("wid") references `writer`("wid") ) 3 rows from written_by table: Empty DataFrame Columns: [id, msid, wid] Index: []
imdb
Who directed the movie " James Bond " ?
SELECT t2.name FROM director AS t2 JOIN directed_by AS t1 ON t2.did = t1.did JOIN movie AS t3 ON t3.mid = t1.msid WHERE t3.title = "James Bond";
CREATE TABLE "actor" ( "aid" int, "gender" text, "name" text, "nationality" text, "birth_city" text, "birth_year" int, primary key("aid") ) 3 rows from actor table: Empty DataFrame Columns: [aid, gender, name, nationality, birth_city, birth_year] Index: [] CREATE TABLE "copyright" ( "id" int, "msid" int, "cid" int, primary key("id") ) 3 rows from copyright table: Empty DataFrame Columns: [id, msid, cid] Index: [] CREATE TABLE "cast" ( "id" int, "msid" int, "aid" int, "role" int, primary key("id"), foreign key("aid") references `actor`("aid"), foreign key("msid") references `copyright`("msid") ) 3 rows from cast table: Empty DataFrame Columns: [id, msid, aid, role] Index: [] CREATE TABLE "genre" ( "gid" int, "genre" text, primary key("gid") ) 3 rows from genre table: Empty DataFrame Columns: [gid, genre] Index: [] CREATE TABLE "classification" ( "id" int, "msid" int, "gid" int, primary key("id"), foreign key("gid") references `genre`("gid"), foreign key("msid") references `copyright`("msid") ) 3 rows from classification table: Empty DataFrame Columns: [id, msid, gid] Index: [] CREATE TABLE "company" ( "id" int, "name" text, "country_code" text, primary key("id") ) 3 rows from company table: Empty DataFrame Columns: [id, name, country_code] Index: [] CREATE TABLE "director" ( "did" int, "gender" text, "name" text, "nationality" text, "birth_city" text, "birth_year" int, primary key("did") ) 3 rows from director table: Empty DataFrame Columns: [did, gender, name, nationality, birth_city, birth_year] Index: [] CREATE TABLE "producer" ( "pid" int, "gender" text, "name" text, "nationality" text, "birth_city" text, "birth_year" int, primary key("pid") ) 3 rows from producer table: Empty DataFrame Columns: [pid, gender, name, nationality, birth_city, birth_year] Index: [] CREATE TABLE "directed_by" ( "id" int, "msid" int, "did" int, primary key("id"), foreign key("msid") references `copyright`("msid"), foreign key("did") references `director`("did") ) 3 rows from directed_by table: Empty DataFrame Columns: [id, msid, did] Index: [] CREATE TABLE "keyword" ( "id" int, "keyword" text, primary key("id") ) 3 rows from keyword table: Empty DataFrame Columns: [id, keyword] Index: [] CREATE TABLE "made_by" ( "id" int, "msid" int, "pid" int, primary key("id"), foreign key("msid") references `copyright`("msid"), foreign key("pid") references `producer`("pid") ) 3 rows from made_by table: Empty DataFrame Columns: [id, msid, pid] Index: [] CREATE TABLE "movie" ( "mid" int, "title" text, "release_year" int, "title_aka" text, "budget" text, primary key("mid") ) 3 rows from movie table: Empty DataFrame Columns: [mid, title, release_year, title_aka, budget] Index: [] CREATE TABLE "tags" ( "id" int, "msid" int, "kid" int, primary key("id"), foreign key("msid") references `copyright`("msid"), foreign key("kid") references `keyword`("kid") ) 3 rows from tags table: Empty DataFrame Columns: [id, msid, kid] Index: [] CREATE TABLE "tv_series" ( "sid" int, "title" text, "release_year" int, "num_of_seasons" int, "num_of_episodes" int, "title_aka" text, "budget" text, primary key("sid") ) 3 rows from tv_series table: Empty DataFrame Columns: [sid, title, release_year, num_of_seasons, num_of_episodes, title_aka, budget] Index: [] CREATE TABLE "writer" ( "wid" int, "gender" text, "name" int, "nationality" int, "num_of_episodes" int, "birth_city" text, "birth_year" int, primary key("wid") ) 3 rows from writer table: Empty DataFrame Columns: [wid, gender, name, nationality, num_of_episodes, birth_city, birth_year] Index: [] CREATE TABLE "written_by" ( "id" int, "msid" int, "wid" int, foreign key("msid") references `copyright`("msid"), foreign key("wid") references `writer`("wid") ) 3 rows from written_by table: Empty DataFrame Columns: [id, msid, wid] Index: []
imdb
List " James Bond " directors
SELECT t2.name FROM director AS t2 JOIN directed_by AS t1 ON t2.did = t1.did JOIN movie AS t3 ON t3.mid = t1.msid WHERE t3.title = "James Bond";
CREATE TABLE "actor" ( "aid" int, "gender" text, "name" text, "nationality" text, "birth_city" text, "birth_year" int, primary key("aid") ) 3 rows from actor table: Empty DataFrame Columns: [aid, gender, name, nationality, birth_city, birth_year] Index: [] CREATE TABLE "copyright" ( "id" int, "msid" int, "cid" int, primary key("id") ) 3 rows from copyright table: Empty DataFrame Columns: [id, msid, cid] Index: [] CREATE TABLE "cast" ( "id" int, "msid" int, "aid" int, "role" int, primary key("id"), foreign key("aid") references `actor`("aid"), foreign key("msid") references `copyright`("msid") ) 3 rows from cast table: Empty DataFrame Columns: [id, msid, aid, role] Index: [] CREATE TABLE "genre" ( "gid" int, "genre" text, primary key("gid") ) 3 rows from genre table: Empty DataFrame Columns: [gid, genre] Index: [] CREATE TABLE "classification" ( "id" int, "msid" int, "gid" int, primary key("id"), foreign key("gid") references `genre`("gid"), foreign key("msid") references `copyright`("msid") ) 3 rows from classification table: Empty DataFrame Columns: [id, msid, gid] Index: [] CREATE TABLE "company" ( "id" int, "name" text, "country_code" text, primary key("id") ) 3 rows from company table: Empty DataFrame Columns: [id, name, country_code] Index: [] CREATE TABLE "director" ( "did" int, "gender" text, "name" text, "nationality" text, "birth_city" text, "birth_year" int, primary key("did") ) 3 rows from director table: Empty DataFrame Columns: [did, gender, name, nationality, birth_city, birth_year] Index: [] CREATE TABLE "producer" ( "pid" int, "gender" text, "name" text, "nationality" text, "birth_city" text, "birth_year" int, primary key("pid") ) 3 rows from producer table: Empty DataFrame Columns: [pid, gender, name, nationality, birth_city, birth_year] Index: [] CREATE TABLE "directed_by" ( "id" int, "msid" int, "did" int, primary key("id"), foreign key("msid") references `copyright`("msid"), foreign key("did") references `director`("did") ) 3 rows from directed_by table: Empty DataFrame Columns: [id, msid, did] Index: [] CREATE TABLE "keyword" ( "id" int, "keyword" text, primary key("id") ) 3 rows from keyword table: Empty DataFrame Columns: [id, keyword] Index: [] CREATE TABLE "made_by" ( "id" int, "msid" int, "pid" int, primary key("id"), foreign key("msid") references `copyright`("msid"), foreign key("pid") references `producer`("pid") ) 3 rows from made_by table: Empty DataFrame Columns: [id, msid, pid] Index: [] CREATE TABLE "movie" ( "mid" int, "title" text, "release_year" int, "title_aka" text, "budget" text, primary key("mid") ) 3 rows from movie table: Empty DataFrame Columns: [mid, title, release_year, title_aka, budget] Index: [] CREATE TABLE "tags" ( "id" int, "msid" int, "kid" int, primary key("id"), foreign key("msid") references `copyright`("msid"), foreign key("kid") references `keyword`("kid") ) 3 rows from tags table: Empty DataFrame Columns: [id, msid, kid] Index: [] CREATE TABLE "tv_series" ( "sid" int, "title" text, "release_year" int, "num_of_seasons" int, "num_of_episodes" int, "title_aka" text, "budget" text, primary key("sid") ) 3 rows from tv_series table: Empty DataFrame Columns: [sid, title, release_year, num_of_seasons, num_of_episodes, title_aka, budget] Index: [] CREATE TABLE "writer" ( "wid" int, "gender" text, "name" int, "nationality" int, "num_of_episodes" int, "birth_city" text, "birth_year" int, primary key("wid") ) 3 rows from writer table: Empty DataFrame Columns: [wid, gender, name, nationality, num_of_episodes, birth_city, birth_year] Index: [] CREATE TABLE "written_by" ( "id" int, "msid" int, "wid" int, foreign key("msid") references `copyright`("msid"), foreign key("wid") references `writer`("wid") ) 3 rows from written_by table: Empty DataFrame Columns: [id, msid, wid] Index: []
imdb
Find the actor who played " Alan Turing " in the movie " The Imitation Game "
SELECT t1.name FROM CAST AS t2 JOIN actor AS t1 ON t2.aid = t1.aid JOIN movie AS t3 ON t3.mid = t2.msid WHERE t2.role = "Alan Turing" AND t3.title = "The Imitation Game";
CREATE TABLE "actor" ( "aid" int, "gender" text, "name" text, "nationality" text, "birth_city" text, "birth_year" int, primary key("aid") ) 3 rows from actor table: Empty DataFrame Columns: [aid, gender, name, nationality, birth_city, birth_year] Index: [] CREATE TABLE "copyright" ( "id" int, "msid" int, "cid" int, primary key("id") ) 3 rows from copyright table: Empty DataFrame Columns: [id, msid, cid] Index: [] CREATE TABLE "cast" ( "id" int, "msid" int, "aid" int, "role" int, primary key("id"), foreign key("aid") references `actor`("aid"), foreign key("msid") references `copyright`("msid") ) 3 rows from cast table: Empty DataFrame Columns: [id, msid, aid, role] Index: [] CREATE TABLE "genre" ( "gid" int, "genre" text, primary key("gid") ) 3 rows from genre table: Empty DataFrame Columns: [gid, genre] Index: [] CREATE TABLE "classification" ( "id" int, "msid" int, "gid" int, primary key("id"), foreign key("gid") references `genre`("gid"), foreign key("msid") references `copyright`("msid") ) 3 rows from classification table: Empty DataFrame Columns: [id, msid, gid] Index: [] CREATE TABLE "company" ( "id" int, "name" text, "country_code" text, primary key("id") ) 3 rows from company table: Empty DataFrame Columns: [id, name, country_code] Index: [] CREATE TABLE "director" ( "did" int, "gender" text, "name" text, "nationality" text, "birth_city" text, "birth_year" int, primary key("did") ) 3 rows from director table: Empty DataFrame Columns: [did, gender, name, nationality, birth_city, birth_year] Index: [] CREATE TABLE "producer" ( "pid" int, "gender" text, "name" text, "nationality" text, "birth_city" text, "birth_year" int, primary key("pid") ) 3 rows from producer table: Empty DataFrame Columns: [pid, gender, name, nationality, birth_city, birth_year] Index: [] CREATE TABLE "directed_by" ( "id" int, "msid" int, "did" int, primary key("id"), foreign key("msid") references `copyright`("msid"), foreign key("did") references `director`("did") ) 3 rows from directed_by table: Empty DataFrame Columns: [id, msid, did] Index: [] CREATE TABLE "keyword" ( "id" int, "keyword" text, primary key("id") ) 3 rows from keyword table: Empty DataFrame Columns: [id, keyword] Index: [] CREATE TABLE "made_by" ( "id" int, "msid" int, "pid" int, primary key("id"), foreign key("msid") references `copyright`("msid"), foreign key("pid") references `producer`("pid") ) 3 rows from made_by table: Empty DataFrame Columns: [id, msid, pid] Index: [] CREATE TABLE "movie" ( "mid" int, "title" text, "release_year" int, "title_aka" text, "budget" text, primary key("mid") ) 3 rows from movie table: Empty DataFrame Columns: [mid, title, release_year, title_aka, budget] Index: [] CREATE TABLE "tags" ( "id" int, "msid" int, "kid" int, primary key("id"), foreign key("msid") references `copyright`("msid"), foreign key("kid") references `keyword`("kid") ) 3 rows from tags table: Empty DataFrame Columns: [id, msid, kid] Index: [] CREATE TABLE "tv_series" ( "sid" int, "title" text, "release_year" int, "num_of_seasons" int, "num_of_episodes" int, "title_aka" text, "budget" text, primary key("sid") ) 3 rows from tv_series table: Empty DataFrame Columns: [sid, title, release_year, num_of_seasons, num_of_episodes, title_aka, budget] Index: [] CREATE TABLE "writer" ( "wid" int, "gender" text, "name" int, "nationality" int, "num_of_episodes" int, "birth_city" text, "birth_year" int, primary key("wid") ) 3 rows from writer table: Empty DataFrame Columns: [wid, gender, name, nationality, num_of_episodes, birth_city, birth_year] Index: [] CREATE TABLE "written_by" ( "id" int, "msid" int, "wid" int, foreign key("msid") references `copyright`("msid"), foreign key("wid") references `writer`("wid") ) 3 rows from written_by table: Empty DataFrame Columns: [id, msid, wid] Index: []
imdb
Who acted " Alan Turing " in the movie " The Imitation Game " ?
SELECT t1.name FROM CAST AS t2 JOIN actor AS t1 ON t2.aid = t1.aid JOIN movie AS t3 ON t3.mid = t2.msid WHERE t2.role = "Alan Turing" AND t3.title = "The Imitation Game";
CREATE TABLE "actor" ( "aid" int, "gender" text, "name" text, "nationality" text, "birth_city" text, "birth_year" int, primary key("aid") ) 3 rows from actor table: Empty DataFrame Columns: [aid, gender, name, nationality, birth_city, birth_year] Index: [] CREATE TABLE "copyright" ( "id" int, "msid" int, "cid" int, primary key("id") ) 3 rows from copyright table: Empty DataFrame Columns: [id, msid, cid] Index: [] CREATE TABLE "cast" ( "id" int, "msid" int, "aid" int, "role" int, primary key("id"), foreign key("aid") references `actor`("aid"), foreign key("msid") references `copyright`("msid") ) 3 rows from cast table: Empty DataFrame Columns: [id, msid, aid, role] Index: [] CREATE TABLE "genre" ( "gid" int, "genre" text, primary key("gid") ) 3 rows from genre table: Empty DataFrame Columns: [gid, genre] Index: [] CREATE TABLE "classification" ( "id" int, "msid" int, "gid" int, primary key("id"), foreign key("gid") references `genre`("gid"), foreign key("msid") references `copyright`("msid") ) 3 rows from classification table: Empty DataFrame Columns: [id, msid, gid] Index: [] CREATE TABLE "company" ( "id" int, "name" text, "country_code" text, primary key("id") ) 3 rows from company table: Empty DataFrame Columns: [id, name, country_code] Index: [] CREATE TABLE "director" ( "did" int, "gender" text, "name" text, "nationality" text, "birth_city" text, "birth_year" int, primary key("did") ) 3 rows from director table: Empty DataFrame Columns: [did, gender, name, nationality, birth_city, birth_year] Index: [] CREATE TABLE "producer" ( "pid" int, "gender" text, "name" text, "nationality" text, "birth_city" text, "birth_year" int, primary key("pid") ) 3 rows from producer table: Empty DataFrame Columns: [pid, gender, name, nationality, birth_city, birth_year] Index: [] CREATE TABLE "directed_by" ( "id" int, "msid" int, "did" int, primary key("id"), foreign key("msid") references `copyright`("msid"), foreign key("did") references `director`("did") ) 3 rows from directed_by table: Empty DataFrame Columns: [id, msid, did] Index: [] CREATE TABLE "keyword" ( "id" int, "keyword" text, primary key("id") ) 3 rows from keyword table: Empty DataFrame Columns: [id, keyword] Index: [] CREATE TABLE "made_by" ( "id" int, "msid" int, "pid" int, primary key("id"), foreign key("msid") references `copyright`("msid"), foreign key("pid") references `producer`("pid") ) 3 rows from made_by table: Empty DataFrame Columns: [id, msid, pid] Index: [] CREATE TABLE "movie" ( "mid" int, "title" text, "release_year" int, "title_aka" text, "budget" text, primary key("mid") ) 3 rows from movie table: Empty DataFrame Columns: [mid, title, release_year, title_aka, budget] Index: [] CREATE TABLE "tags" ( "id" int, "msid" int, "kid" int, primary key("id"), foreign key("msid") references `copyright`("msid"), foreign key("kid") references `keyword`("kid") ) 3 rows from tags table: Empty DataFrame Columns: [id, msid, kid] Index: [] CREATE TABLE "tv_series" ( "sid" int, "title" text, "release_year" int, "num_of_seasons" int, "num_of_episodes" int, "title_aka" text, "budget" text, primary key("sid") ) 3 rows from tv_series table: Empty DataFrame Columns: [sid, title, release_year, num_of_seasons, num_of_episodes, title_aka, budget] Index: [] CREATE TABLE "writer" ( "wid" int, "gender" text, "name" int, "nationality" int, "num_of_episodes" int, "birth_city" text, "birth_year" int, primary key("wid") ) 3 rows from writer table: Empty DataFrame Columns: [wid, gender, name, nationality, num_of_episodes, birth_city, birth_year] Index: [] CREATE TABLE "written_by" ( "id" int, "msid" int, "wid" int, foreign key("msid") references `copyright`("msid"), foreign key("wid") references `writer`("wid") ) 3 rows from written_by table: Empty DataFrame Columns: [id, msid, wid] Index: []
imdb
Who was the actor that played " Alan Turing " in the movie " The Imitation Game " ?
SELECT t1.name FROM CAST AS t2 JOIN actor AS t1 ON t2.aid = t1.aid JOIN movie AS t3 ON t3.mid = t2.msid WHERE t2.role = "Alan Turing" AND t3.title = "The Imitation Game";
CREATE TABLE "actor" ( "aid" int, "gender" text, "name" text, "nationality" text, "birth_city" text, "birth_year" int, primary key("aid") ) 3 rows from actor table: Empty DataFrame Columns: [aid, gender, name, nationality, birth_city, birth_year] Index: [] CREATE TABLE "copyright" ( "id" int, "msid" int, "cid" int, primary key("id") ) 3 rows from copyright table: Empty DataFrame Columns: [id, msid, cid] Index: [] CREATE TABLE "cast" ( "id" int, "msid" int, "aid" int, "role" int, primary key("id"), foreign key("aid") references `actor`("aid"), foreign key("msid") references `copyright`("msid") ) 3 rows from cast table: Empty DataFrame Columns: [id, msid, aid, role] Index: [] CREATE TABLE "genre" ( "gid" int, "genre" text, primary key("gid") ) 3 rows from genre table: Empty DataFrame Columns: [gid, genre] Index: [] CREATE TABLE "classification" ( "id" int, "msid" int, "gid" int, primary key("id"), foreign key("gid") references `genre`("gid"), foreign key("msid") references `copyright`("msid") ) 3 rows from classification table: Empty DataFrame Columns: [id, msid, gid] Index: [] CREATE TABLE "company" ( "id" int, "name" text, "country_code" text, primary key("id") ) 3 rows from company table: Empty DataFrame Columns: [id, name, country_code] Index: [] CREATE TABLE "director" ( "did" int, "gender" text, "name" text, "nationality" text, "birth_city" text, "birth_year" int, primary key("did") ) 3 rows from director table: Empty DataFrame Columns: [did, gender, name, nationality, birth_city, birth_year] Index: [] CREATE TABLE "producer" ( "pid" int, "gender" text, "name" text, "nationality" text, "birth_city" text, "birth_year" int, primary key("pid") ) 3 rows from producer table: Empty DataFrame Columns: [pid, gender, name, nationality, birth_city, birth_year] Index: [] CREATE TABLE "directed_by" ( "id" int, "msid" int, "did" int, primary key("id"), foreign key("msid") references `copyright`("msid"), foreign key("did") references `director`("did") ) 3 rows from directed_by table: Empty DataFrame Columns: [id, msid, did] Index: [] CREATE TABLE "keyword" ( "id" int, "keyword" text, primary key("id") ) 3 rows from keyword table: Empty DataFrame Columns: [id, keyword] Index: [] CREATE TABLE "made_by" ( "id" int, "msid" int, "pid" int, primary key("id"), foreign key("msid") references `copyright`("msid"), foreign key("pid") references `producer`("pid") ) 3 rows from made_by table: Empty DataFrame Columns: [id, msid, pid] Index: [] CREATE TABLE "movie" ( "mid" int, "title" text, "release_year" int, "title_aka" text, "budget" text, primary key("mid") ) 3 rows from movie table: Empty DataFrame Columns: [mid, title, release_year, title_aka, budget] Index: [] CREATE TABLE "tags" ( "id" int, "msid" int, "kid" int, primary key("id"), foreign key("msid") references `copyright`("msid"), foreign key("kid") references `keyword`("kid") ) 3 rows from tags table: Empty DataFrame Columns: [id, msid, kid] Index: [] CREATE TABLE "tv_series" ( "sid" int, "title" text, "release_year" int, "num_of_seasons" int, "num_of_episodes" int, "title_aka" text, "budget" text, primary key("sid") ) 3 rows from tv_series table: Empty DataFrame Columns: [sid, title, release_year, num_of_seasons, num_of_episodes, title_aka, budget] Index: [] CREATE TABLE "writer" ( "wid" int, "gender" text, "name" int, "nationality" int, "num_of_episodes" int, "birth_city" text, "birth_year" int, primary key("wid") ) 3 rows from writer table: Empty DataFrame Columns: [wid, gender, name, nationality, num_of_episodes, birth_city, birth_year] Index: [] CREATE TABLE "written_by" ( "id" int, "msid" int, "wid" int, foreign key("msid") references `copyright`("msid"), foreign key("wid") references `writer`("wid") ) 3 rows from written_by table: Empty DataFrame Columns: [id, msid, wid] Index: []
imdb
Who acts as " Alan Turing " in the movie " The Imitation Game " ?
SELECT t1.name FROM CAST AS t2 JOIN actor AS t1 ON t2.aid = t1.aid JOIN movie AS t3 ON t3.mid = t2.msid WHERE t2.role = "Alan Turing" AND t3.title = "The Imitation Game";
CREATE TABLE "actor" ( "aid" int, "gender" text, "name" text, "nationality" text, "birth_city" text, "birth_year" int, primary key("aid") ) 3 rows from actor table: Empty DataFrame Columns: [aid, gender, name, nationality, birth_city, birth_year] Index: [] CREATE TABLE "copyright" ( "id" int, "msid" int, "cid" int, primary key("id") ) 3 rows from copyright table: Empty DataFrame Columns: [id, msid, cid] Index: [] CREATE TABLE "cast" ( "id" int, "msid" int, "aid" int, "role" int, primary key("id"), foreign key("aid") references `actor`("aid"), foreign key("msid") references `copyright`("msid") ) 3 rows from cast table: Empty DataFrame Columns: [id, msid, aid, role] Index: [] CREATE TABLE "genre" ( "gid" int, "genre" text, primary key("gid") ) 3 rows from genre table: Empty DataFrame Columns: [gid, genre] Index: [] CREATE TABLE "classification" ( "id" int, "msid" int, "gid" int, primary key("id"), foreign key("gid") references `genre`("gid"), foreign key("msid") references `copyright`("msid") ) 3 rows from classification table: Empty DataFrame Columns: [id, msid, gid] Index: [] CREATE TABLE "company" ( "id" int, "name" text, "country_code" text, primary key("id") ) 3 rows from company table: Empty DataFrame Columns: [id, name, country_code] Index: [] CREATE TABLE "director" ( "did" int, "gender" text, "name" text, "nationality" text, "birth_city" text, "birth_year" int, primary key("did") ) 3 rows from director table: Empty DataFrame Columns: [did, gender, name, nationality, birth_city, birth_year] Index: [] CREATE TABLE "producer" ( "pid" int, "gender" text, "name" text, "nationality" text, "birth_city" text, "birth_year" int, primary key("pid") ) 3 rows from producer table: Empty DataFrame Columns: [pid, gender, name, nationality, birth_city, birth_year] Index: [] CREATE TABLE "directed_by" ( "id" int, "msid" int, "did" int, primary key("id"), foreign key("msid") references `copyright`("msid"), foreign key("did") references `director`("did") ) 3 rows from directed_by table: Empty DataFrame Columns: [id, msid, did] Index: [] CREATE TABLE "keyword" ( "id" int, "keyword" text, primary key("id") ) 3 rows from keyword table: Empty DataFrame Columns: [id, keyword] Index: [] CREATE TABLE "made_by" ( "id" int, "msid" int, "pid" int, primary key("id"), foreign key("msid") references `copyright`("msid"), foreign key("pid") references `producer`("pid") ) 3 rows from made_by table: Empty DataFrame Columns: [id, msid, pid] Index: [] CREATE TABLE "movie" ( "mid" int, "title" text, "release_year" int, "title_aka" text, "budget" text, primary key("mid") ) 3 rows from movie table: Empty DataFrame Columns: [mid, title, release_year, title_aka, budget] Index: [] CREATE TABLE "tags" ( "id" int, "msid" int, "kid" int, primary key("id"), foreign key("msid") references `copyright`("msid"), foreign key("kid") references `keyword`("kid") ) 3 rows from tags table: Empty DataFrame Columns: [id, msid, kid] Index: [] CREATE TABLE "tv_series" ( "sid" int, "title" text, "release_year" int, "num_of_seasons" int, "num_of_episodes" int, "title_aka" text, "budget" text, primary key("sid") ) 3 rows from tv_series table: Empty DataFrame Columns: [sid, title, release_year, num_of_seasons, num_of_episodes, title_aka, budget] Index: [] CREATE TABLE "writer" ( "wid" int, "gender" text, "name" int, "nationality" int, "num_of_episodes" int, "birth_city" text, "birth_year" int, primary key("wid") ) 3 rows from writer table: Empty DataFrame Columns: [wid, gender, name, nationality, num_of_episodes, birth_city, birth_year] Index: [] CREATE TABLE "written_by" ( "id" int, "msid" int, "wid" int, foreign key("msid") references `copyright`("msid"), foreign key("wid") references `writer`("wid") ) 3 rows from written_by table: Empty DataFrame Columns: [id, msid, wid] Index: []
imdb
Who is the actor playing " Alan Turing " in " The Imitation Game " ?
SELECT t1.name FROM CAST AS t2 JOIN actor AS t1 ON t2.aid = t1.aid JOIN movie AS t3 ON t3.mid = t2.msid WHERE t2.role = "Alan Turing" AND t3.title = "The Imitation Game";
CREATE TABLE "actor" ( "aid" int, "gender" text, "name" text, "nationality" text, "birth_city" text, "birth_year" int, primary key("aid") ) 3 rows from actor table: Empty DataFrame Columns: [aid, gender, name, nationality, birth_city, birth_year] Index: [] CREATE TABLE "copyright" ( "id" int, "msid" int, "cid" int, primary key("id") ) 3 rows from copyright table: Empty DataFrame Columns: [id, msid, cid] Index: [] CREATE TABLE "cast" ( "id" int, "msid" int, "aid" int, "role" int, primary key("id"), foreign key("aid") references `actor`("aid"), foreign key("msid") references `copyright`("msid") ) 3 rows from cast table: Empty DataFrame Columns: [id, msid, aid, role] Index: [] CREATE TABLE "genre" ( "gid" int, "genre" text, primary key("gid") ) 3 rows from genre table: Empty DataFrame Columns: [gid, genre] Index: [] CREATE TABLE "classification" ( "id" int, "msid" int, "gid" int, primary key("id"), foreign key("gid") references `genre`("gid"), foreign key("msid") references `copyright`("msid") ) 3 rows from classification table: Empty DataFrame Columns: [id, msid, gid] Index: [] CREATE TABLE "company" ( "id" int, "name" text, "country_code" text, primary key("id") ) 3 rows from company table: Empty DataFrame Columns: [id, name, country_code] Index: [] CREATE TABLE "director" ( "did" int, "gender" text, "name" text, "nationality" text, "birth_city" text, "birth_year" int, primary key("did") ) 3 rows from director table: Empty DataFrame Columns: [did, gender, name, nationality, birth_city, birth_year] Index: [] CREATE TABLE "producer" ( "pid" int, "gender" text, "name" text, "nationality" text, "birth_city" text, "birth_year" int, primary key("pid") ) 3 rows from producer table: Empty DataFrame Columns: [pid, gender, name, nationality, birth_city, birth_year] Index: [] CREATE TABLE "directed_by" ( "id" int, "msid" int, "did" int, primary key("id"), foreign key("msid") references `copyright`("msid"), foreign key("did") references `director`("did") ) 3 rows from directed_by table: Empty DataFrame Columns: [id, msid, did] Index: [] CREATE TABLE "keyword" ( "id" int, "keyword" text, primary key("id") ) 3 rows from keyword table: Empty DataFrame Columns: [id, keyword] Index: [] CREATE TABLE "made_by" ( "id" int, "msid" int, "pid" int, primary key("id"), foreign key("msid") references `copyright`("msid"), foreign key("pid") references `producer`("pid") ) 3 rows from made_by table: Empty DataFrame Columns: [id, msid, pid] Index: [] CREATE TABLE "movie" ( "mid" int, "title" text, "release_year" int, "title_aka" text, "budget" text, primary key("mid") ) 3 rows from movie table: Empty DataFrame Columns: [mid, title, release_year, title_aka, budget] Index: [] CREATE TABLE "tags" ( "id" int, "msid" int, "kid" int, primary key("id"), foreign key("msid") references `copyright`("msid"), foreign key("kid") references `keyword`("kid") ) 3 rows from tags table: Empty DataFrame Columns: [id, msid, kid] Index: [] CREATE TABLE "tv_series" ( "sid" int, "title" text, "release_year" int, "num_of_seasons" int, "num_of_episodes" int, "title_aka" text, "budget" text, primary key("sid") ) 3 rows from tv_series table: Empty DataFrame Columns: [sid, title, release_year, num_of_seasons, num_of_episodes, title_aka, budget] Index: [] CREATE TABLE "writer" ( "wid" int, "gender" text, "name" int, "nationality" int, "num_of_episodes" int, "birth_city" text, "birth_year" int, primary key("wid") ) 3 rows from writer table: Empty DataFrame Columns: [wid, gender, name, nationality, num_of_episodes, birth_city, birth_year] Index: [] CREATE TABLE "written_by" ( "id" int, "msid" int, "wid" int, foreign key("msid") references `copyright`("msid"), foreign key("wid") references `writer`("wid") ) 3 rows from written_by table: Empty DataFrame Columns: [id, msid, wid] Index: []
imdb
What is the genre of the movie " Jurassic Park " ?
SELECT t2.genre FROM genre AS t2 JOIN classification AS t1 ON t2.gid = t1.gid JOIN movie AS t3 ON t3.mid = t1.msid WHERE t3.title = "Jurassic Park";
CREATE TABLE "actor" ( "aid" int, "gender" text, "name" text, "nationality" text, "birth_city" text, "birth_year" int, primary key("aid") ) 3 rows from actor table: Empty DataFrame Columns: [aid, gender, name, nationality, birth_city, birth_year] Index: [] CREATE TABLE "copyright" ( "id" int, "msid" int, "cid" int, primary key("id") ) 3 rows from copyright table: Empty DataFrame Columns: [id, msid, cid] Index: [] CREATE TABLE "cast" ( "id" int, "msid" int, "aid" int, "role" int, primary key("id"), foreign key("aid") references `actor`("aid"), foreign key("msid") references `copyright`("msid") ) 3 rows from cast table: Empty DataFrame Columns: [id, msid, aid, role] Index: [] CREATE TABLE "genre" ( "gid" int, "genre" text, primary key("gid") ) 3 rows from genre table: Empty DataFrame Columns: [gid, genre] Index: [] CREATE TABLE "classification" ( "id" int, "msid" int, "gid" int, primary key("id"), foreign key("gid") references `genre`("gid"), foreign key("msid") references `copyright`("msid") ) 3 rows from classification table: Empty DataFrame Columns: [id, msid, gid] Index: [] CREATE TABLE "company" ( "id" int, "name" text, "country_code" text, primary key("id") ) 3 rows from company table: Empty DataFrame Columns: [id, name, country_code] Index: [] CREATE TABLE "director" ( "did" int, "gender" text, "name" text, "nationality" text, "birth_city" text, "birth_year" int, primary key("did") ) 3 rows from director table: Empty DataFrame Columns: [did, gender, name, nationality, birth_city, birth_year] Index: [] CREATE TABLE "producer" ( "pid" int, "gender" text, "name" text, "nationality" text, "birth_city" text, "birth_year" int, primary key("pid") ) 3 rows from producer table: Empty DataFrame Columns: [pid, gender, name, nationality, birth_city, birth_year] Index: [] CREATE TABLE "directed_by" ( "id" int, "msid" int, "did" int, primary key("id"), foreign key("msid") references `copyright`("msid"), foreign key("did") references `director`("did") ) 3 rows from directed_by table: Empty DataFrame Columns: [id, msid, did] Index: [] CREATE TABLE "keyword" ( "id" int, "keyword" text, primary key("id") ) 3 rows from keyword table: Empty DataFrame Columns: [id, keyword] Index: [] CREATE TABLE "made_by" ( "id" int, "msid" int, "pid" int, primary key("id"), foreign key("msid") references `copyright`("msid"), foreign key("pid") references `producer`("pid") ) 3 rows from made_by table: Empty DataFrame Columns: [id, msid, pid] Index: [] CREATE TABLE "movie" ( "mid" int, "title" text, "release_year" int, "title_aka" text, "budget" text, primary key("mid") ) 3 rows from movie table: Empty DataFrame Columns: [mid, title, release_year, title_aka, budget] Index: [] CREATE TABLE "tags" ( "id" int, "msid" int, "kid" int, primary key("id"), foreign key("msid") references `copyright`("msid"), foreign key("kid") references `keyword`("kid") ) 3 rows from tags table: Empty DataFrame Columns: [id, msid, kid] Index: [] CREATE TABLE "tv_series" ( "sid" int, "title" text, "release_year" int, "num_of_seasons" int, "num_of_episodes" int, "title_aka" text, "budget" text, primary key("sid") ) 3 rows from tv_series table: Empty DataFrame Columns: [sid, title, release_year, num_of_seasons, num_of_episodes, title_aka, budget] Index: [] CREATE TABLE "writer" ( "wid" int, "gender" text, "name" int, "nationality" int, "num_of_episodes" int, "birth_city" text, "birth_year" int, primary key("wid") ) 3 rows from writer table: Empty DataFrame Columns: [wid, gender, name, nationality, num_of_episodes, birth_city, birth_year] Index: [] CREATE TABLE "written_by" ( "id" int, "msid" int, "wid" int, foreign key("msid") references `copyright`("msid"), foreign key("wid") references `writer`("wid") ) 3 rows from written_by table: Empty DataFrame Columns: [id, msid, wid] Index: []
imdb
Who was the director of the movie Joy from 2015 ?
SELECT t2.name FROM director AS t2 JOIN directed_by AS t1 ON t2.did = t1.did JOIN movie AS t3 ON t3.mid = t1.msid WHERE t3.release_year = 2015 AND t3.title = "Joy";
CREATE TABLE "actor" ( "aid" int, "gender" text, "name" text, "nationality" text, "birth_city" text, "birth_year" int, primary key("aid") ) 3 rows from actor table: Empty DataFrame Columns: [aid, gender, name, nationality, birth_city, birth_year] Index: [] CREATE TABLE "copyright" ( "id" int, "msid" int, "cid" int, primary key("id") ) 3 rows from copyright table: Empty DataFrame Columns: [id, msid, cid] Index: [] CREATE TABLE "cast" ( "id" int, "msid" int, "aid" int, "role" int, primary key("id"), foreign key("aid") references `actor`("aid"), foreign key("msid") references `copyright`("msid") ) 3 rows from cast table: Empty DataFrame Columns: [id, msid, aid, role] Index: [] CREATE TABLE "genre" ( "gid" int, "genre" text, primary key("gid") ) 3 rows from genre table: Empty DataFrame Columns: [gid, genre] Index: [] CREATE TABLE "classification" ( "id" int, "msid" int, "gid" int, primary key("id"), foreign key("gid") references `genre`("gid"), foreign key("msid") references `copyright`("msid") ) 3 rows from classification table: Empty DataFrame Columns: [id, msid, gid] Index: [] CREATE TABLE "company" ( "id" int, "name" text, "country_code" text, primary key("id") ) 3 rows from company table: Empty DataFrame Columns: [id, name, country_code] Index: [] CREATE TABLE "director" ( "did" int, "gender" text, "name" text, "nationality" text, "birth_city" text, "birth_year" int, primary key("did") ) 3 rows from director table: Empty DataFrame Columns: [did, gender, name, nationality, birth_city, birth_year] Index: [] CREATE TABLE "producer" ( "pid" int, "gender" text, "name" text, "nationality" text, "birth_city" text, "birth_year" int, primary key("pid") ) 3 rows from producer table: Empty DataFrame Columns: [pid, gender, name, nationality, birth_city, birth_year] Index: [] CREATE TABLE "directed_by" ( "id" int, "msid" int, "did" int, primary key("id"), foreign key("msid") references `copyright`("msid"), foreign key("did") references `director`("did") ) 3 rows from directed_by table: Empty DataFrame Columns: [id, msid, did] Index: [] CREATE TABLE "keyword" ( "id" int, "keyword" text, primary key("id") ) 3 rows from keyword table: Empty DataFrame Columns: [id, keyword] Index: [] CREATE TABLE "made_by" ( "id" int, "msid" int, "pid" int, primary key("id"), foreign key("msid") references `copyright`("msid"), foreign key("pid") references `producer`("pid") ) 3 rows from made_by table: Empty DataFrame Columns: [id, msid, pid] Index: [] CREATE TABLE "movie" ( "mid" int, "title" text, "release_year" int, "title_aka" text, "budget" text, primary key("mid") ) 3 rows from movie table: Empty DataFrame Columns: [mid, title, release_year, title_aka, budget] Index: [] CREATE TABLE "tags" ( "id" int, "msid" int, "kid" int, primary key("id"), foreign key("msid") references `copyright`("msid"), foreign key("kid") references `keyword`("kid") ) 3 rows from tags table: Empty DataFrame Columns: [id, msid, kid] Index: [] CREATE TABLE "tv_series" ( "sid" int, "title" text, "release_year" int, "num_of_seasons" int, "num_of_episodes" int, "title_aka" text, "budget" text, primary key("sid") ) 3 rows from tv_series table: Empty DataFrame Columns: [sid, title, release_year, num_of_seasons, num_of_episodes, title_aka, budget] Index: [] CREATE TABLE "writer" ( "wid" int, "gender" text, "name" int, "nationality" int, "num_of_episodes" int, "birth_city" text, "birth_year" int, primary key("wid") ) 3 rows from writer table: Empty DataFrame Columns: [wid, gender, name, nationality, num_of_episodes, birth_city, birth_year] Index: [] CREATE TABLE "written_by" ( "id" int, "msid" int, "wid" int, foreign key("msid") references `copyright`("msid"), foreign key("wid") references `writer`("wid") ) 3 rows from written_by table: Empty DataFrame Columns: [id, msid, wid] Index: []
imdb
Find all movies written by " Matt Damon "
SELECT t1.title FROM written_by AS t3 JOIN movie AS t1 ON t3.msid = t1.mid JOIN writer AS t2 ON t3.wid = t2.wid WHERE t2.name = "Matt Damon";
CREATE TABLE "actor" ( "aid" int, "gender" text, "name" text, "nationality" text, "birth_city" text, "birth_year" int, primary key("aid") ) 3 rows from actor table: Empty DataFrame Columns: [aid, gender, name, nationality, birth_city, birth_year] Index: [] CREATE TABLE "copyright" ( "id" int, "msid" int, "cid" int, primary key("id") ) 3 rows from copyright table: Empty DataFrame Columns: [id, msid, cid] Index: [] CREATE TABLE "cast" ( "id" int, "msid" int, "aid" int, "role" int, primary key("id"), foreign key("aid") references `actor`("aid"), foreign key("msid") references `copyright`("msid") ) 3 rows from cast table: Empty DataFrame Columns: [id, msid, aid, role] Index: [] CREATE TABLE "genre" ( "gid" int, "genre" text, primary key("gid") ) 3 rows from genre table: Empty DataFrame Columns: [gid, genre] Index: [] CREATE TABLE "classification" ( "id" int, "msid" int, "gid" int, primary key("id"), foreign key("gid") references `genre`("gid"), foreign key("msid") references `copyright`("msid") ) 3 rows from classification table: Empty DataFrame Columns: [id, msid, gid] Index: [] CREATE TABLE "company" ( "id" int, "name" text, "country_code" text, primary key("id") ) 3 rows from company table: Empty DataFrame Columns: [id, name, country_code] Index: [] CREATE TABLE "director" ( "did" int, "gender" text, "name" text, "nationality" text, "birth_city" text, "birth_year" int, primary key("did") ) 3 rows from director table: Empty DataFrame Columns: [did, gender, name, nationality, birth_city, birth_year] Index: [] CREATE TABLE "producer" ( "pid" int, "gender" text, "name" text, "nationality" text, "birth_city" text, "birth_year" int, primary key("pid") ) 3 rows from producer table: Empty DataFrame Columns: [pid, gender, name, nationality, birth_city, birth_year] Index: [] CREATE TABLE "directed_by" ( "id" int, "msid" int, "did" int, primary key("id"), foreign key("msid") references `copyright`("msid"), foreign key("did") references `director`("did") ) 3 rows from directed_by table: Empty DataFrame Columns: [id, msid, did] Index: [] CREATE TABLE "keyword" ( "id" int, "keyword" text, primary key("id") ) 3 rows from keyword table: Empty DataFrame Columns: [id, keyword] Index: [] CREATE TABLE "made_by" ( "id" int, "msid" int, "pid" int, primary key("id"), foreign key("msid") references `copyright`("msid"), foreign key("pid") references `producer`("pid") ) 3 rows from made_by table: Empty DataFrame Columns: [id, msid, pid] Index: [] CREATE TABLE "movie" ( "mid" int, "title" text, "release_year" int, "title_aka" text, "budget" text, primary key("mid") ) 3 rows from movie table: Empty DataFrame Columns: [mid, title, release_year, title_aka, budget] Index: [] CREATE TABLE "tags" ( "id" int, "msid" int, "kid" int, primary key("id"), foreign key("msid") references `copyright`("msid"), foreign key("kid") references `keyword`("kid") ) 3 rows from tags table: Empty DataFrame Columns: [id, msid, kid] Index: [] CREATE TABLE "tv_series" ( "sid" int, "title" text, "release_year" int, "num_of_seasons" int, "num_of_episodes" int, "title_aka" text, "budget" text, primary key("sid") ) 3 rows from tv_series table: Empty DataFrame Columns: [sid, title, release_year, num_of_seasons, num_of_episodes, title_aka, budget] Index: [] CREATE TABLE "writer" ( "wid" int, "gender" text, "name" int, "nationality" int, "num_of_episodes" int, "birth_city" text, "birth_year" int, primary key("wid") ) 3 rows from writer table: Empty DataFrame Columns: [wid, gender, name, nationality, num_of_episodes, birth_city, birth_year] Index: [] CREATE TABLE "written_by" ( "id" int, "msid" int, "wid" int, foreign key("msid") references `copyright`("msid"), foreign key("wid") references `writer`("wid") ) 3 rows from written_by table: Empty DataFrame Columns: [id, msid, wid] Index: []
imdb
Find all movies written and produced by " Woody Allen "
SELECT t2.title FROM movie AS t2 JOIN made_by AS t3 ON t2.mid = t3.msid JOIN producer AS t1 ON t1.pid = t3.pid JOIN written_by AS t5 ON t5.msid = t2.mid JOIN writer AS t4 ON t5.wid = t4.wid WHERE t1.name = "Woody Allen" AND t4.name = "Woody Allen";
CREATE TABLE "actor" ( "aid" int, "gender" text, "name" text, "nationality" text, "birth_city" text, "birth_year" int, primary key("aid") ) 3 rows from actor table: Empty DataFrame Columns: [aid, gender, name, nationality, birth_city, birth_year] Index: [] CREATE TABLE "copyright" ( "id" int, "msid" int, "cid" int, primary key("id") ) 3 rows from copyright table: Empty DataFrame Columns: [id, msid, cid] Index: [] CREATE TABLE "cast" ( "id" int, "msid" int, "aid" int, "role" int, primary key("id"), foreign key("aid") references `actor`("aid"), foreign key("msid") references `copyright`("msid") ) 3 rows from cast table: Empty DataFrame Columns: [id, msid, aid, role] Index: [] CREATE TABLE "genre" ( "gid" int, "genre" text, primary key("gid") ) 3 rows from genre table: Empty DataFrame Columns: [gid, genre] Index: [] CREATE TABLE "classification" ( "id" int, "msid" int, "gid" int, primary key("id"), foreign key("gid") references `genre`("gid"), foreign key("msid") references `copyright`("msid") ) 3 rows from classification table: Empty DataFrame Columns: [id, msid, gid] Index: [] CREATE TABLE "company" ( "id" int, "name" text, "country_code" text, primary key("id") ) 3 rows from company table: Empty DataFrame Columns: [id, name, country_code] Index: [] CREATE TABLE "director" ( "did" int, "gender" text, "name" text, "nationality" text, "birth_city" text, "birth_year" int, primary key("did") ) 3 rows from director table: Empty DataFrame Columns: [did, gender, name, nationality, birth_city, birth_year] Index: [] CREATE TABLE "producer" ( "pid" int, "gender" text, "name" text, "nationality" text, "birth_city" text, "birth_year" int, primary key("pid") ) 3 rows from producer table: Empty DataFrame Columns: [pid, gender, name, nationality, birth_city, birth_year] Index: [] CREATE TABLE "directed_by" ( "id" int, "msid" int, "did" int, primary key("id"), foreign key("msid") references `copyright`("msid"), foreign key("did") references `director`("did") ) 3 rows from directed_by table: Empty DataFrame Columns: [id, msid, did] Index: [] CREATE TABLE "keyword" ( "id" int, "keyword" text, primary key("id") ) 3 rows from keyword table: Empty DataFrame Columns: [id, keyword] Index: [] CREATE TABLE "made_by" ( "id" int, "msid" int, "pid" int, primary key("id"), foreign key("msid") references `copyright`("msid"), foreign key("pid") references `producer`("pid") ) 3 rows from made_by table: Empty DataFrame Columns: [id, msid, pid] Index: [] CREATE TABLE "movie" ( "mid" int, "title" text, "release_year" int, "title_aka" text, "budget" text, primary key("mid") ) 3 rows from movie table: Empty DataFrame Columns: [mid, title, release_year, title_aka, budget] Index: [] CREATE TABLE "tags" ( "id" int, "msid" int, "kid" int, primary key("id"), foreign key("msid") references `copyright`("msid"), foreign key("kid") references `keyword`("kid") ) 3 rows from tags table: Empty DataFrame Columns: [id, msid, kid] Index: [] CREATE TABLE "tv_series" ( "sid" int, "title" text, "release_year" int, "num_of_seasons" int, "num_of_episodes" int, "title_aka" text, "budget" text, primary key("sid") ) 3 rows from tv_series table: Empty DataFrame Columns: [sid, title, release_year, num_of_seasons, num_of_episodes, title_aka, budget] Index: [] CREATE TABLE "writer" ( "wid" int, "gender" text, "name" int, "nationality" int, "num_of_episodes" int, "birth_city" text, "birth_year" int, primary key("wid") ) 3 rows from writer table: Empty DataFrame Columns: [wid, gender, name, nationality, num_of_episodes, birth_city, birth_year] Index: [] CREATE TABLE "written_by" ( "id" int, "msid" int, "wid" int, foreign key("msid") references `copyright`("msid"), foreign key("wid") references `writer`("wid") ) 3 rows from written_by table: Empty DataFrame Columns: [id, msid, wid] Index: []
imdb
Find all movies featuring " Robin Wright "
SELECT t2.title FROM CAST AS t3 JOIN actor AS t1 ON t3.aid = t1.aid JOIN movie AS t2 ON t2.mid = t3.msid WHERE t1.name = "Robin Wright";
CREATE TABLE "actor" ( "aid" int, "gender" text, "name" text, "nationality" text, "birth_city" text, "birth_year" int, primary key("aid") ) 3 rows from actor table: Empty DataFrame Columns: [aid, gender, name, nationality, birth_city, birth_year] Index: [] CREATE TABLE "copyright" ( "id" int, "msid" int, "cid" int, primary key("id") ) 3 rows from copyright table: Empty DataFrame Columns: [id, msid, cid] Index: [] CREATE TABLE "cast" ( "id" int, "msid" int, "aid" int, "role" int, primary key("id"), foreign key("aid") references `actor`("aid"), foreign key("msid") references `copyright`("msid") ) 3 rows from cast table: Empty DataFrame Columns: [id, msid, aid, role] Index: [] CREATE TABLE "genre" ( "gid" int, "genre" text, primary key("gid") ) 3 rows from genre table: Empty DataFrame Columns: [gid, genre] Index: [] CREATE TABLE "classification" ( "id" int, "msid" int, "gid" int, primary key("id"), foreign key("gid") references `genre`("gid"), foreign key("msid") references `copyright`("msid") ) 3 rows from classification table: Empty DataFrame Columns: [id, msid, gid] Index: [] CREATE TABLE "company" ( "id" int, "name" text, "country_code" text, primary key("id") ) 3 rows from company table: Empty DataFrame Columns: [id, name, country_code] Index: [] CREATE TABLE "director" ( "did" int, "gender" text, "name" text, "nationality" text, "birth_city" text, "birth_year" int, primary key("did") ) 3 rows from director table: Empty DataFrame Columns: [did, gender, name, nationality, birth_city, birth_year] Index: [] CREATE TABLE "producer" ( "pid" int, "gender" text, "name" text, "nationality" text, "birth_city" text, "birth_year" int, primary key("pid") ) 3 rows from producer table: Empty DataFrame Columns: [pid, gender, name, nationality, birth_city, birth_year] Index: [] CREATE TABLE "directed_by" ( "id" int, "msid" int, "did" int, primary key("id"), foreign key("msid") references `copyright`("msid"), foreign key("did") references `director`("did") ) 3 rows from directed_by table: Empty DataFrame Columns: [id, msid, did] Index: [] CREATE TABLE "keyword" ( "id" int, "keyword" text, primary key("id") ) 3 rows from keyword table: Empty DataFrame Columns: [id, keyword] Index: [] CREATE TABLE "made_by" ( "id" int, "msid" int, "pid" int, primary key("id"), foreign key("msid") references `copyright`("msid"), foreign key("pid") references `producer`("pid") ) 3 rows from made_by table: Empty DataFrame Columns: [id, msid, pid] Index: [] CREATE TABLE "movie" ( "mid" int, "title" text, "release_year" int, "title_aka" text, "budget" text, primary key("mid") ) 3 rows from movie table: Empty DataFrame Columns: [mid, title, release_year, title_aka, budget] Index: [] CREATE TABLE "tags" ( "id" int, "msid" int, "kid" int, primary key("id"), foreign key("msid") references `copyright`("msid"), foreign key("kid") references `keyword`("kid") ) 3 rows from tags table: Empty DataFrame Columns: [id, msid, kid] Index: [] CREATE TABLE "tv_series" ( "sid" int, "title" text, "release_year" int, "num_of_seasons" int, "num_of_episodes" int, "title_aka" text, "budget" text, primary key("sid") ) 3 rows from tv_series table: Empty DataFrame Columns: [sid, title, release_year, num_of_seasons, num_of_episodes, title_aka, budget] Index: [] CREATE TABLE "writer" ( "wid" int, "gender" text, "name" int, "nationality" int, "num_of_episodes" int, "birth_city" text, "birth_year" int, primary key("wid") ) 3 rows from writer table: Empty DataFrame Columns: [wid, gender, name, nationality, num_of_episodes, birth_city, birth_year] Index: [] CREATE TABLE "written_by" ( "id" int, "msid" int, "wid" int, foreign key("msid") references `copyright`("msid"), foreign key("wid") references `writer`("wid") ) 3 rows from written_by table: Empty DataFrame Columns: [id, msid, wid] Index: []
imdb
What are all the movies featuring " Robin Wright " ?
SELECT t2.title FROM CAST AS t3 JOIN actor AS t1 ON t3.aid = t1.aid JOIN movie AS t2 ON t2.mid = t3.msid WHERE t1.name = "Robin Wright";
CREATE TABLE "actor" ( "aid" int, "gender" text, "name" text, "nationality" text, "birth_city" text, "birth_year" int, primary key("aid") ) 3 rows from actor table: Empty DataFrame Columns: [aid, gender, name, nationality, birth_city, birth_year] Index: [] CREATE TABLE "copyright" ( "id" int, "msid" int, "cid" int, primary key("id") ) 3 rows from copyright table: Empty DataFrame Columns: [id, msid, cid] Index: [] CREATE TABLE "cast" ( "id" int, "msid" int, "aid" int, "role" int, primary key("id"), foreign key("aid") references `actor`("aid"), foreign key("msid") references `copyright`("msid") ) 3 rows from cast table: Empty DataFrame Columns: [id, msid, aid, role] Index: [] CREATE TABLE "genre" ( "gid" int, "genre" text, primary key("gid") ) 3 rows from genre table: Empty DataFrame Columns: [gid, genre] Index: [] CREATE TABLE "classification" ( "id" int, "msid" int, "gid" int, primary key("id"), foreign key("gid") references `genre`("gid"), foreign key("msid") references `copyright`("msid") ) 3 rows from classification table: Empty DataFrame Columns: [id, msid, gid] Index: [] CREATE TABLE "company" ( "id" int, "name" text, "country_code" text, primary key("id") ) 3 rows from company table: Empty DataFrame Columns: [id, name, country_code] Index: [] CREATE TABLE "director" ( "did" int, "gender" text, "name" text, "nationality" text, "birth_city" text, "birth_year" int, primary key("did") ) 3 rows from director table: Empty DataFrame Columns: [did, gender, name, nationality, birth_city, birth_year] Index: [] CREATE TABLE "producer" ( "pid" int, "gender" text, "name" text, "nationality" text, "birth_city" text, "birth_year" int, primary key("pid") ) 3 rows from producer table: Empty DataFrame Columns: [pid, gender, name, nationality, birth_city, birth_year] Index: [] CREATE TABLE "directed_by" ( "id" int, "msid" int, "did" int, primary key("id"), foreign key("msid") references `copyright`("msid"), foreign key("did") references `director`("did") ) 3 rows from directed_by table: Empty DataFrame Columns: [id, msid, did] Index: [] CREATE TABLE "keyword" ( "id" int, "keyword" text, primary key("id") ) 3 rows from keyword table: Empty DataFrame Columns: [id, keyword] Index: [] CREATE TABLE "made_by" ( "id" int, "msid" int, "pid" int, primary key("id"), foreign key("msid") references `copyright`("msid"), foreign key("pid") references `producer`("pid") ) 3 rows from made_by table: Empty DataFrame Columns: [id, msid, pid] Index: [] CREATE TABLE "movie" ( "mid" int, "title" text, "release_year" int, "title_aka" text, "budget" text, primary key("mid") ) 3 rows from movie table: Empty DataFrame Columns: [mid, title, release_year, title_aka, budget] Index: [] CREATE TABLE "tags" ( "id" int, "msid" int, "kid" int, primary key("id"), foreign key("msid") references `copyright`("msid"), foreign key("kid") references `keyword`("kid") ) 3 rows from tags table: Empty DataFrame Columns: [id, msid, kid] Index: [] CREATE TABLE "tv_series" ( "sid" int, "title" text, "release_year" int, "num_of_seasons" int, "num_of_episodes" int, "title_aka" text, "budget" text, primary key("sid") ) 3 rows from tv_series table: Empty DataFrame Columns: [sid, title, release_year, num_of_seasons, num_of_episodes, title_aka, budget] Index: [] CREATE TABLE "writer" ( "wid" int, "gender" text, "name" int, "nationality" int, "num_of_episodes" int, "birth_city" text, "birth_year" int, primary key("wid") ) 3 rows from writer table: Empty DataFrame Columns: [wid, gender, name, nationality, num_of_episodes, birth_city, birth_year] Index: [] CREATE TABLE "written_by" ( "id" int, "msid" int, "wid" int, foreign key("msid") references `copyright`("msid"), foreign key("wid") references `writer`("wid") ) 3 rows from written_by table: Empty DataFrame Columns: [id, msid, wid] Index: []
imdb
Find all movies in which " Robin Wright " appears
SELECT t2.title FROM CAST AS t3 JOIN actor AS t1 ON t3.aid = t1.aid JOIN movie AS t2 ON t2.mid = t3.msid WHERE t1.name = "Robin Wright";
CREATE TABLE "actor" ( "aid" int, "gender" text, "name" text, "nationality" text, "birth_city" text, "birth_year" int, primary key("aid") ) 3 rows from actor table: Empty DataFrame Columns: [aid, gender, name, nationality, birth_city, birth_year] Index: [] CREATE TABLE "copyright" ( "id" int, "msid" int, "cid" int, primary key("id") ) 3 rows from copyright table: Empty DataFrame Columns: [id, msid, cid] Index: [] CREATE TABLE "cast" ( "id" int, "msid" int, "aid" int, "role" int, primary key("id"), foreign key("aid") references `actor`("aid"), foreign key("msid") references `copyright`("msid") ) 3 rows from cast table: Empty DataFrame Columns: [id, msid, aid, role] Index: [] CREATE TABLE "genre" ( "gid" int, "genre" text, primary key("gid") ) 3 rows from genre table: Empty DataFrame Columns: [gid, genre] Index: [] CREATE TABLE "classification" ( "id" int, "msid" int, "gid" int, primary key("id"), foreign key("gid") references `genre`("gid"), foreign key("msid") references `copyright`("msid") ) 3 rows from classification table: Empty DataFrame Columns: [id, msid, gid] Index: [] CREATE TABLE "company" ( "id" int, "name" text, "country_code" text, primary key("id") ) 3 rows from company table: Empty DataFrame Columns: [id, name, country_code] Index: [] CREATE TABLE "director" ( "did" int, "gender" text, "name" text, "nationality" text, "birth_city" text, "birth_year" int, primary key("did") ) 3 rows from director table: Empty DataFrame Columns: [did, gender, name, nationality, birth_city, birth_year] Index: [] CREATE TABLE "producer" ( "pid" int, "gender" text, "name" text, "nationality" text, "birth_city" text, "birth_year" int, primary key("pid") ) 3 rows from producer table: Empty DataFrame Columns: [pid, gender, name, nationality, birth_city, birth_year] Index: [] CREATE TABLE "directed_by" ( "id" int, "msid" int, "did" int, primary key("id"), foreign key("msid") references `copyright`("msid"), foreign key("did") references `director`("did") ) 3 rows from directed_by table: Empty DataFrame Columns: [id, msid, did] Index: [] CREATE TABLE "keyword" ( "id" int, "keyword" text, primary key("id") ) 3 rows from keyword table: Empty DataFrame Columns: [id, keyword] Index: [] CREATE TABLE "made_by" ( "id" int, "msid" int, "pid" int, primary key("id"), foreign key("msid") references `copyright`("msid"), foreign key("pid") references `producer`("pid") ) 3 rows from made_by table: Empty DataFrame Columns: [id, msid, pid] Index: [] CREATE TABLE "movie" ( "mid" int, "title" text, "release_year" int, "title_aka" text, "budget" text, primary key("mid") ) 3 rows from movie table: Empty DataFrame Columns: [mid, title, release_year, title_aka, budget] Index: [] CREATE TABLE "tags" ( "id" int, "msid" int, "kid" int, primary key("id"), foreign key("msid") references `copyright`("msid"), foreign key("kid") references `keyword`("kid") ) 3 rows from tags table: Empty DataFrame Columns: [id, msid, kid] Index: [] CREATE TABLE "tv_series" ( "sid" int, "title" text, "release_year" int, "num_of_seasons" int, "num_of_episodes" int, "title_aka" text, "budget" text, primary key("sid") ) 3 rows from tv_series table: Empty DataFrame Columns: [sid, title, release_year, num_of_seasons, num_of_episodes, title_aka, budget] Index: [] CREATE TABLE "writer" ( "wid" int, "gender" text, "name" int, "nationality" int, "num_of_episodes" int, "birth_city" text, "birth_year" int, primary key("wid") ) 3 rows from writer table: Empty DataFrame Columns: [wid, gender, name, nationality, num_of_episodes, birth_city, birth_year] Index: [] CREATE TABLE "written_by" ( "id" int, "msid" int, "wid" int, foreign key("msid") references `copyright`("msid"), foreign key("wid") references `writer`("wid") ) 3 rows from written_by table: Empty DataFrame Columns: [id, msid, wid] Index: []
imdb
What was the budget of the movie Juno from 2007 ?
SELECT budget FROM movie WHERE release_year = 2007 AND title = "Juno";
CREATE TABLE "actor" ( "aid" int, "gender" text, "name" text, "nationality" text, "birth_city" text, "birth_year" int, primary key("aid") ) 3 rows from actor table: Empty DataFrame Columns: [aid, gender, name, nationality, birth_city, birth_year] Index: [] CREATE TABLE "copyright" ( "id" int, "msid" int, "cid" int, primary key("id") ) 3 rows from copyright table: Empty DataFrame Columns: [id, msid, cid] Index: [] CREATE TABLE "cast" ( "id" int, "msid" int, "aid" int, "role" int, primary key("id"), foreign key("aid") references `actor`("aid"), foreign key("msid") references `copyright`("msid") ) 3 rows from cast table: Empty DataFrame Columns: [id, msid, aid, role] Index: [] CREATE TABLE "genre" ( "gid" int, "genre" text, primary key("gid") ) 3 rows from genre table: Empty DataFrame Columns: [gid, genre] Index: [] CREATE TABLE "classification" ( "id" int, "msid" int, "gid" int, primary key("id"), foreign key("gid") references `genre`("gid"), foreign key("msid") references `copyright`("msid") ) 3 rows from classification table: Empty DataFrame Columns: [id, msid, gid] Index: [] CREATE TABLE "company" ( "id" int, "name" text, "country_code" text, primary key("id") ) 3 rows from company table: Empty DataFrame Columns: [id, name, country_code] Index: [] CREATE TABLE "director" ( "did" int, "gender" text, "name" text, "nationality" text, "birth_city" text, "birth_year" int, primary key("did") ) 3 rows from director table: Empty DataFrame Columns: [did, gender, name, nationality, birth_city, birth_year] Index: [] CREATE TABLE "producer" ( "pid" int, "gender" text, "name" text, "nationality" text, "birth_city" text, "birth_year" int, primary key("pid") ) 3 rows from producer table: Empty DataFrame Columns: [pid, gender, name, nationality, birth_city, birth_year] Index: [] CREATE TABLE "directed_by" ( "id" int, "msid" int, "did" int, primary key("id"), foreign key("msid") references `copyright`("msid"), foreign key("did") references `director`("did") ) 3 rows from directed_by table: Empty DataFrame Columns: [id, msid, did] Index: [] CREATE TABLE "keyword" ( "id" int, "keyword" text, primary key("id") ) 3 rows from keyword table: Empty DataFrame Columns: [id, keyword] Index: [] CREATE TABLE "made_by" ( "id" int, "msid" int, "pid" int, primary key("id"), foreign key("msid") references `copyright`("msid"), foreign key("pid") references `producer`("pid") ) 3 rows from made_by table: Empty DataFrame Columns: [id, msid, pid] Index: [] CREATE TABLE "movie" ( "mid" int, "title" text, "release_year" int, "title_aka" text, "budget" text, primary key("mid") ) 3 rows from movie table: Empty DataFrame Columns: [mid, title, release_year, title_aka, budget] Index: [] CREATE TABLE "tags" ( "id" int, "msid" int, "kid" int, primary key("id"), foreign key("msid") references `copyright`("msid"), foreign key("kid") references `keyword`("kid") ) 3 rows from tags table: Empty DataFrame Columns: [id, msid, kid] Index: [] CREATE TABLE "tv_series" ( "sid" int, "title" text, "release_year" int, "num_of_seasons" int, "num_of_episodes" int, "title_aka" text, "budget" text, primary key("sid") ) 3 rows from tv_series table: Empty DataFrame Columns: [sid, title, release_year, num_of_seasons, num_of_episodes, title_aka, budget] Index: [] CREATE TABLE "writer" ( "wid" int, "gender" text, "name" int, "nationality" int, "num_of_episodes" int, "birth_city" text, "birth_year" int, primary key("wid") ) 3 rows from writer table: Empty DataFrame Columns: [wid, gender, name, nationality, num_of_episodes, birth_city, birth_year] Index: [] CREATE TABLE "written_by" ( "id" int, "msid" int, "wid" int, foreign key("msid") references `copyright`("msid"), foreign key("wid") references `writer`("wid") ) 3 rows from written_by table: Empty DataFrame Columns: [id, msid, wid] Index: []
imdb
Find all Sci-Fi produced in year 2010
SELECT t3.title FROM genre AS t2 JOIN classification AS t1 ON t2.gid = t1.gid JOIN movie AS t3 ON t3.mid = t1.msid WHERE t2.genre = "Sci-Fi" AND t3.release_year = 2010;
CREATE TABLE "actor" ( "aid" int, "gender" text, "name" text, "nationality" text, "birth_city" text, "birth_year" int, primary key("aid") ) 3 rows from actor table: Empty DataFrame Columns: [aid, gender, name, nationality, birth_city, birth_year] Index: [] CREATE TABLE "copyright" ( "id" int, "msid" int, "cid" int, primary key("id") ) 3 rows from copyright table: Empty DataFrame Columns: [id, msid, cid] Index: [] CREATE TABLE "cast" ( "id" int, "msid" int, "aid" int, "role" int, primary key("id"), foreign key("aid") references `actor`("aid"), foreign key("msid") references `copyright`("msid") ) 3 rows from cast table: Empty DataFrame Columns: [id, msid, aid, role] Index: [] CREATE TABLE "genre" ( "gid" int, "genre" text, primary key("gid") ) 3 rows from genre table: Empty DataFrame Columns: [gid, genre] Index: [] CREATE TABLE "classification" ( "id" int, "msid" int, "gid" int, primary key("id"), foreign key("gid") references `genre`("gid"), foreign key("msid") references `copyright`("msid") ) 3 rows from classification table: Empty DataFrame Columns: [id, msid, gid] Index: [] CREATE TABLE "company" ( "id" int, "name" text, "country_code" text, primary key("id") ) 3 rows from company table: Empty DataFrame Columns: [id, name, country_code] Index: [] CREATE TABLE "director" ( "did" int, "gender" text, "name" text, "nationality" text, "birth_city" text, "birth_year" int, primary key("did") ) 3 rows from director table: Empty DataFrame Columns: [did, gender, name, nationality, birth_city, birth_year] Index: [] CREATE TABLE "producer" ( "pid" int, "gender" text, "name" text, "nationality" text, "birth_city" text, "birth_year" int, primary key("pid") ) 3 rows from producer table: Empty DataFrame Columns: [pid, gender, name, nationality, birth_city, birth_year] Index: [] CREATE TABLE "directed_by" ( "id" int, "msid" int, "did" int, primary key("id"), foreign key("msid") references `copyright`("msid"), foreign key("did") references `director`("did") ) 3 rows from directed_by table: Empty DataFrame Columns: [id, msid, did] Index: [] CREATE TABLE "keyword" ( "id" int, "keyword" text, primary key("id") ) 3 rows from keyword table: Empty DataFrame Columns: [id, keyword] Index: [] CREATE TABLE "made_by" ( "id" int, "msid" int, "pid" int, primary key("id"), foreign key("msid") references `copyright`("msid"), foreign key("pid") references `producer`("pid") ) 3 rows from made_by table: Empty DataFrame Columns: [id, msid, pid] Index: [] CREATE TABLE "movie" ( "mid" int, "title" text, "release_year" int, "title_aka" text, "budget" text, primary key("mid") ) 3 rows from movie table: Empty DataFrame Columns: [mid, title, release_year, title_aka, budget] Index: [] CREATE TABLE "tags" ( "id" int, "msid" int, "kid" int, primary key("id"), foreign key("msid") references `copyright`("msid"), foreign key("kid") references `keyword`("kid") ) 3 rows from tags table: Empty DataFrame Columns: [id, msid, kid] Index: [] CREATE TABLE "tv_series" ( "sid" int, "title" text, "release_year" int, "num_of_seasons" int, "num_of_episodes" int, "title_aka" text, "budget" text, primary key("sid") ) 3 rows from tv_series table: Empty DataFrame Columns: [sid, title, release_year, num_of_seasons, num_of_episodes, title_aka, budget] Index: [] CREATE TABLE "writer" ( "wid" int, "gender" text, "name" int, "nationality" int, "num_of_episodes" int, "birth_city" text, "birth_year" int, primary key("wid") ) 3 rows from writer table: Empty DataFrame Columns: [wid, gender, name, nationality, num_of_episodes, birth_city, birth_year] Index: [] CREATE TABLE "written_by" ( "id" int, "msid" int, "wid" int, foreign key("msid") references `copyright`("msid"), foreign key("wid") references `writer`("wid") ) 3 rows from written_by table: Empty DataFrame Columns: [id, msid, wid] Index: []
imdb
List all the Sci-Fi movies which released in 2010
SELECT t3.title FROM genre AS t2 JOIN classification AS t1 ON t2.gid = t1.gid JOIN movie AS t3 ON t3.mid = t1.msid WHERE t2.genre = "Sci-Fi" AND t3.release_year = 2010;
CREATE TABLE "actor" ( "aid" int, "gender" text, "name" text, "nationality" text, "birth_city" text, "birth_year" int, primary key("aid") ) 3 rows from actor table: Empty DataFrame Columns: [aid, gender, name, nationality, birth_city, birth_year] Index: [] CREATE TABLE "copyright" ( "id" int, "msid" int, "cid" int, primary key("id") ) 3 rows from copyright table: Empty DataFrame Columns: [id, msid, cid] Index: [] CREATE TABLE "cast" ( "id" int, "msid" int, "aid" int, "role" int, primary key("id"), foreign key("aid") references `actor`("aid"), foreign key("msid") references `copyright`("msid") ) 3 rows from cast table: Empty DataFrame Columns: [id, msid, aid, role] Index: [] CREATE TABLE "genre" ( "gid" int, "genre" text, primary key("gid") ) 3 rows from genre table: Empty DataFrame Columns: [gid, genre] Index: [] CREATE TABLE "classification" ( "id" int, "msid" int, "gid" int, primary key("id"), foreign key("gid") references `genre`("gid"), foreign key("msid") references `copyright`("msid") ) 3 rows from classification table: Empty DataFrame Columns: [id, msid, gid] Index: [] CREATE TABLE "company" ( "id" int, "name" text, "country_code" text, primary key("id") ) 3 rows from company table: Empty DataFrame Columns: [id, name, country_code] Index: [] CREATE TABLE "director" ( "did" int, "gender" text, "name" text, "nationality" text, "birth_city" text, "birth_year" int, primary key("did") ) 3 rows from director table: Empty DataFrame Columns: [did, gender, name, nationality, birth_city, birth_year] Index: [] CREATE TABLE "producer" ( "pid" int, "gender" text, "name" text, "nationality" text, "birth_city" text, "birth_year" int, primary key("pid") ) 3 rows from producer table: Empty DataFrame Columns: [pid, gender, name, nationality, birth_city, birth_year] Index: [] CREATE TABLE "directed_by" ( "id" int, "msid" int, "did" int, primary key("id"), foreign key("msid") references `copyright`("msid"), foreign key("did") references `director`("did") ) 3 rows from directed_by table: Empty DataFrame Columns: [id, msid, did] Index: [] CREATE TABLE "keyword" ( "id" int, "keyword" text, primary key("id") ) 3 rows from keyword table: Empty DataFrame Columns: [id, keyword] Index: [] CREATE TABLE "made_by" ( "id" int, "msid" int, "pid" int, primary key("id"), foreign key("msid") references `copyright`("msid"), foreign key("pid") references `producer`("pid") ) 3 rows from made_by table: Empty DataFrame Columns: [id, msid, pid] Index: [] CREATE TABLE "movie" ( "mid" int, "title" text, "release_year" int, "title_aka" text, "budget" text, primary key("mid") ) 3 rows from movie table: Empty DataFrame Columns: [mid, title, release_year, title_aka, budget] Index: [] CREATE TABLE "tags" ( "id" int, "msid" int, "kid" int, primary key("id"), foreign key("msid") references `copyright`("msid"), foreign key("kid") references `keyword`("kid") ) 3 rows from tags table: Empty DataFrame Columns: [id, msid, kid] Index: [] CREATE TABLE "tv_series" ( "sid" int, "title" text, "release_year" int, "num_of_seasons" int, "num_of_episodes" int, "title_aka" text, "budget" text, primary key("sid") ) 3 rows from tv_series table: Empty DataFrame Columns: [sid, title, release_year, num_of_seasons, num_of_episodes, title_aka, budget] Index: [] CREATE TABLE "writer" ( "wid" int, "gender" text, "name" int, "nationality" int, "num_of_episodes" int, "birth_city" text, "birth_year" int, primary key("wid") ) 3 rows from writer table: Empty DataFrame Columns: [wid, gender, name, nationality, num_of_episodes, birth_city, birth_year] Index: [] CREATE TABLE "written_by" ( "id" int, "msid" int, "wid" int, foreign key("msid") references `copyright`("msid"), foreign key("wid") references `writer`("wid") ) 3 rows from written_by table: Empty DataFrame Columns: [id, msid, wid] Index: []
imdb
Find all actors born in " Austin " after 1980
SELECT name FROM actor WHERE birth_city = "Austin" AND birth_year > 1980;
CREATE TABLE "actor" ( "aid" int, "gender" text, "name" text, "nationality" text, "birth_city" text, "birth_year" int, primary key("aid") ) 3 rows from actor table: Empty DataFrame Columns: [aid, gender, name, nationality, birth_city, birth_year] Index: [] CREATE TABLE "copyright" ( "id" int, "msid" int, "cid" int, primary key("id") ) 3 rows from copyright table: Empty DataFrame Columns: [id, msid, cid] Index: [] CREATE TABLE "cast" ( "id" int, "msid" int, "aid" int, "role" int, primary key("id"), foreign key("aid") references `actor`("aid"), foreign key("msid") references `copyright`("msid") ) 3 rows from cast table: Empty DataFrame Columns: [id, msid, aid, role] Index: [] CREATE TABLE "genre" ( "gid" int, "genre" text, primary key("gid") ) 3 rows from genre table: Empty DataFrame Columns: [gid, genre] Index: [] CREATE TABLE "classification" ( "id" int, "msid" int, "gid" int, primary key("id"), foreign key("gid") references `genre`("gid"), foreign key("msid") references `copyright`("msid") ) 3 rows from classification table: Empty DataFrame Columns: [id, msid, gid] Index: [] CREATE TABLE "company" ( "id" int, "name" text, "country_code" text, primary key("id") ) 3 rows from company table: Empty DataFrame Columns: [id, name, country_code] Index: [] CREATE TABLE "director" ( "did" int, "gender" text, "name" text, "nationality" text, "birth_city" text, "birth_year" int, primary key("did") ) 3 rows from director table: Empty DataFrame Columns: [did, gender, name, nationality, birth_city, birth_year] Index: [] CREATE TABLE "producer" ( "pid" int, "gender" text, "name" text, "nationality" text, "birth_city" text, "birth_year" int, primary key("pid") ) 3 rows from producer table: Empty DataFrame Columns: [pid, gender, name, nationality, birth_city, birth_year] Index: [] CREATE TABLE "directed_by" ( "id" int, "msid" int, "did" int, primary key("id"), foreign key("msid") references `copyright`("msid"), foreign key("did") references `director`("did") ) 3 rows from directed_by table: Empty DataFrame Columns: [id, msid, did] Index: [] CREATE TABLE "keyword" ( "id" int, "keyword" text, primary key("id") ) 3 rows from keyword table: Empty DataFrame Columns: [id, keyword] Index: [] CREATE TABLE "made_by" ( "id" int, "msid" int, "pid" int, primary key("id"), foreign key("msid") references `copyright`("msid"), foreign key("pid") references `producer`("pid") ) 3 rows from made_by table: Empty DataFrame Columns: [id, msid, pid] Index: [] CREATE TABLE "movie" ( "mid" int, "title" text, "release_year" int, "title_aka" text, "budget" text, primary key("mid") ) 3 rows from movie table: Empty DataFrame Columns: [mid, title, release_year, title_aka, budget] Index: [] CREATE TABLE "tags" ( "id" int, "msid" int, "kid" int, primary key("id"), foreign key("msid") references `copyright`("msid"), foreign key("kid") references `keyword`("kid") ) 3 rows from tags table: Empty DataFrame Columns: [id, msid, kid] Index: [] CREATE TABLE "tv_series" ( "sid" int, "title" text, "release_year" int, "num_of_seasons" int, "num_of_episodes" int, "title_aka" text, "budget" text, primary key("sid") ) 3 rows from tv_series table: Empty DataFrame Columns: [sid, title, release_year, num_of_seasons, num_of_episodes, title_aka, budget] Index: [] CREATE TABLE "writer" ( "wid" int, "gender" text, "name" int, "nationality" int, "num_of_episodes" int, "birth_city" text, "birth_year" int, primary key("wid") ) 3 rows from writer table: Empty DataFrame Columns: [wid, gender, name, nationality, num_of_episodes, birth_city, birth_year] Index: [] CREATE TABLE "written_by" ( "id" int, "msid" int, "wid" int, foreign key("msid") references `copyright`("msid"), foreign key("wid") references `writer`("wid") ) 3 rows from written_by table: Empty DataFrame Columns: [id, msid, wid] Index: []
imdb
Who are the actors born in " Austin " after 1980 ?
SELECT name FROM actor WHERE birth_city = "Austin" AND birth_year > 1980;
CREATE TABLE "actor" ( "aid" int, "gender" text, "name" text, "nationality" text, "birth_city" text, "birth_year" int, primary key("aid") ) 3 rows from actor table: Empty DataFrame Columns: [aid, gender, name, nationality, birth_city, birth_year] Index: [] CREATE TABLE "copyright" ( "id" int, "msid" int, "cid" int, primary key("id") ) 3 rows from copyright table: Empty DataFrame Columns: [id, msid, cid] Index: [] CREATE TABLE "cast" ( "id" int, "msid" int, "aid" int, "role" int, primary key("id"), foreign key("aid") references `actor`("aid"), foreign key("msid") references `copyright`("msid") ) 3 rows from cast table: Empty DataFrame Columns: [id, msid, aid, role] Index: [] CREATE TABLE "genre" ( "gid" int, "genre" text, primary key("gid") ) 3 rows from genre table: Empty DataFrame Columns: [gid, genre] Index: [] CREATE TABLE "classification" ( "id" int, "msid" int, "gid" int, primary key("id"), foreign key("gid") references `genre`("gid"), foreign key("msid") references `copyright`("msid") ) 3 rows from classification table: Empty DataFrame Columns: [id, msid, gid] Index: [] CREATE TABLE "company" ( "id" int, "name" text, "country_code" text, primary key("id") ) 3 rows from company table: Empty DataFrame Columns: [id, name, country_code] Index: [] CREATE TABLE "director" ( "did" int, "gender" text, "name" text, "nationality" text, "birth_city" text, "birth_year" int, primary key("did") ) 3 rows from director table: Empty DataFrame Columns: [did, gender, name, nationality, birth_city, birth_year] Index: [] CREATE TABLE "producer" ( "pid" int, "gender" text, "name" text, "nationality" text, "birth_city" text, "birth_year" int, primary key("pid") ) 3 rows from producer table: Empty DataFrame Columns: [pid, gender, name, nationality, birth_city, birth_year] Index: [] CREATE TABLE "directed_by" ( "id" int, "msid" int, "did" int, primary key("id"), foreign key("msid") references `copyright`("msid"), foreign key("did") references `director`("did") ) 3 rows from directed_by table: Empty DataFrame Columns: [id, msid, did] Index: [] CREATE TABLE "keyword" ( "id" int, "keyword" text, primary key("id") ) 3 rows from keyword table: Empty DataFrame Columns: [id, keyword] Index: [] CREATE TABLE "made_by" ( "id" int, "msid" int, "pid" int, primary key("id"), foreign key("msid") references `copyright`("msid"), foreign key("pid") references `producer`("pid") ) 3 rows from made_by table: Empty DataFrame Columns: [id, msid, pid] Index: [] CREATE TABLE "movie" ( "mid" int, "title" text, "release_year" int, "title_aka" text, "budget" text, primary key("mid") ) 3 rows from movie table: Empty DataFrame Columns: [mid, title, release_year, title_aka, budget] Index: [] CREATE TABLE "tags" ( "id" int, "msid" int, "kid" int, primary key("id"), foreign key("msid") references `copyright`("msid"), foreign key("kid") references `keyword`("kid") ) 3 rows from tags table: Empty DataFrame Columns: [id, msid, kid] Index: [] CREATE TABLE "tv_series" ( "sid" int, "title" text, "release_year" int, "num_of_seasons" int, "num_of_episodes" int, "title_aka" text, "budget" text, primary key("sid") ) 3 rows from tv_series table: Empty DataFrame Columns: [sid, title, release_year, num_of_seasons, num_of_episodes, title_aka, budget] Index: [] CREATE TABLE "writer" ( "wid" int, "gender" text, "name" int, "nationality" int, "num_of_episodes" int, "birth_city" text, "birth_year" int, primary key("wid") ) 3 rows from writer table: Empty DataFrame Columns: [wid, gender, name, nationality, num_of_episodes, birth_city, birth_year] Index: [] CREATE TABLE "written_by" ( "id" int, "msid" int, "wid" int, foreign key("msid") references `copyright`("msid"), foreign key("wid") references `writer`("wid") ) 3 rows from written_by table: Empty DataFrame Columns: [id, msid, wid] Index: []
imdb
Find all actors from Austin born after 1980
SELECT name FROM actor WHERE birth_city = "Austin" AND birth_year > 1980;
CREATE TABLE "actor" ( "aid" int, "gender" text, "name" text, "nationality" text, "birth_city" text, "birth_year" int, primary key("aid") ) 3 rows from actor table: Empty DataFrame Columns: [aid, gender, name, nationality, birth_city, birth_year] Index: [] CREATE TABLE "copyright" ( "id" int, "msid" int, "cid" int, primary key("id") ) 3 rows from copyright table: Empty DataFrame Columns: [id, msid, cid] Index: [] CREATE TABLE "cast" ( "id" int, "msid" int, "aid" int, "role" int, primary key("id"), foreign key("aid") references `actor`("aid"), foreign key("msid") references `copyright`("msid") ) 3 rows from cast table: Empty DataFrame Columns: [id, msid, aid, role] Index: [] CREATE TABLE "genre" ( "gid" int, "genre" text, primary key("gid") ) 3 rows from genre table: Empty DataFrame Columns: [gid, genre] Index: [] CREATE TABLE "classification" ( "id" int, "msid" int, "gid" int, primary key("id"), foreign key("gid") references `genre`("gid"), foreign key("msid") references `copyright`("msid") ) 3 rows from classification table: Empty DataFrame Columns: [id, msid, gid] Index: [] CREATE TABLE "company" ( "id" int, "name" text, "country_code" text, primary key("id") ) 3 rows from company table: Empty DataFrame Columns: [id, name, country_code] Index: [] CREATE TABLE "director" ( "did" int, "gender" text, "name" text, "nationality" text, "birth_city" text, "birth_year" int, primary key("did") ) 3 rows from director table: Empty DataFrame Columns: [did, gender, name, nationality, birth_city, birth_year] Index: [] CREATE TABLE "producer" ( "pid" int, "gender" text, "name" text, "nationality" text, "birth_city" text, "birth_year" int, primary key("pid") ) 3 rows from producer table: Empty DataFrame Columns: [pid, gender, name, nationality, birth_city, birth_year] Index: [] CREATE TABLE "directed_by" ( "id" int, "msid" int, "did" int, primary key("id"), foreign key("msid") references `copyright`("msid"), foreign key("did") references `director`("did") ) 3 rows from directed_by table: Empty DataFrame Columns: [id, msid, did] Index: [] CREATE TABLE "keyword" ( "id" int, "keyword" text, primary key("id") ) 3 rows from keyword table: Empty DataFrame Columns: [id, keyword] Index: [] CREATE TABLE "made_by" ( "id" int, "msid" int, "pid" int, primary key("id"), foreign key("msid") references `copyright`("msid"), foreign key("pid") references `producer`("pid") ) 3 rows from made_by table: Empty DataFrame Columns: [id, msid, pid] Index: [] CREATE TABLE "movie" ( "mid" int, "title" text, "release_year" int, "title_aka" text, "budget" text, primary key("mid") ) 3 rows from movie table: Empty DataFrame Columns: [mid, title, release_year, title_aka, budget] Index: [] CREATE TABLE "tags" ( "id" int, "msid" int, "kid" int, primary key("id"), foreign key("msid") references `copyright`("msid"), foreign key("kid") references `keyword`("kid") ) 3 rows from tags table: Empty DataFrame Columns: [id, msid, kid] Index: [] CREATE TABLE "tv_series" ( "sid" int, "title" text, "release_year" int, "num_of_seasons" int, "num_of_episodes" int, "title_aka" text, "budget" text, primary key("sid") ) 3 rows from tv_series table: Empty DataFrame Columns: [sid, title, release_year, num_of_seasons, num_of_episodes, title_aka, budget] Index: [] CREATE TABLE "writer" ( "wid" int, "gender" text, "name" int, "nationality" int, "num_of_episodes" int, "birth_city" text, "birth_year" int, primary key("wid") ) 3 rows from writer table: Empty DataFrame Columns: [wid, gender, name, nationality, num_of_episodes, birth_city, birth_year] Index: [] CREATE TABLE "written_by" ( "id" int, "msid" int, "wid" int, foreign key("msid") references `copyright`("msid"), foreign key("wid") references `writer`("wid") ) 3 rows from written_by table: Empty DataFrame Columns: [id, msid, wid] Index: []
imdb
Find all movies by directors born in " Los Angeles "
SELECT t3.title FROM director AS t2 JOIN directed_by AS t1 ON t2.did = t1.did JOIN movie AS t3 ON t3.mid = t1.msid WHERE t2.birth_city = "Los Angeles";
CREATE TABLE "actor" ( "aid" int, "gender" text, "name" text, "nationality" text, "birth_city" text, "birth_year" int, primary key("aid") ) 3 rows from actor table: Empty DataFrame Columns: [aid, gender, name, nationality, birth_city, birth_year] Index: [] CREATE TABLE "copyright" ( "id" int, "msid" int, "cid" int, primary key("id") ) 3 rows from copyright table: Empty DataFrame Columns: [id, msid, cid] Index: [] CREATE TABLE "cast" ( "id" int, "msid" int, "aid" int, "role" int, primary key("id"), foreign key("aid") references `actor`("aid"), foreign key("msid") references `copyright`("msid") ) 3 rows from cast table: Empty DataFrame Columns: [id, msid, aid, role] Index: [] CREATE TABLE "genre" ( "gid" int, "genre" text, primary key("gid") ) 3 rows from genre table: Empty DataFrame Columns: [gid, genre] Index: [] CREATE TABLE "classification" ( "id" int, "msid" int, "gid" int, primary key("id"), foreign key("gid") references `genre`("gid"), foreign key("msid") references `copyright`("msid") ) 3 rows from classification table: Empty DataFrame Columns: [id, msid, gid] Index: [] CREATE TABLE "company" ( "id" int, "name" text, "country_code" text, primary key("id") ) 3 rows from company table: Empty DataFrame Columns: [id, name, country_code] Index: [] CREATE TABLE "director" ( "did" int, "gender" text, "name" text, "nationality" text, "birth_city" text, "birth_year" int, primary key("did") ) 3 rows from director table: Empty DataFrame Columns: [did, gender, name, nationality, birth_city, birth_year] Index: [] CREATE TABLE "producer" ( "pid" int, "gender" text, "name" text, "nationality" text, "birth_city" text, "birth_year" int, primary key("pid") ) 3 rows from producer table: Empty DataFrame Columns: [pid, gender, name, nationality, birth_city, birth_year] Index: [] CREATE TABLE "directed_by" ( "id" int, "msid" int, "did" int, primary key("id"), foreign key("msid") references `copyright`("msid"), foreign key("did") references `director`("did") ) 3 rows from directed_by table: Empty DataFrame Columns: [id, msid, did] Index: [] CREATE TABLE "keyword" ( "id" int, "keyword" text, primary key("id") ) 3 rows from keyword table: Empty DataFrame Columns: [id, keyword] Index: [] CREATE TABLE "made_by" ( "id" int, "msid" int, "pid" int, primary key("id"), foreign key("msid") references `copyright`("msid"), foreign key("pid") references `producer`("pid") ) 3 rows from made_by table: Empty DataFrame Columns: [id, msid, pid] Index: [] CREATE TABLE "movie" ( "mid" int, "title" text, "release_year" int, "title_aka" text, "budget" text, primary key("mid") ) 3 rows from movie table: Empty DataFrame Columns: [mid, title, release_year, title_aka, budget] Index: [] CREATE TABLE "tags" ( "id" int, "msid" int, "kid" int, primary key("id"), foreign key("msid") references `copyright`("msid"), foreign key("kid") references `keyword`("kid") ) 3 rows from tags table: Empty DataFrame Columns: [id, msid, kid] Index: [] CREATE TABLE "tv_series" ( "sid" int, "title" text, "release_year" int, "num_of_seasons" int, "num_of_episodes" int, "title_aka" text, "budget" text, primary key("sid") ) 3 rows from tv_series table: Empty DataFrame Columns: [sid, title, release_year, num_of_seasons, num_of_episodes, title_aka, budget] Index: [] CREATE TABLE "writer" ( "wid" int, "gender" text, "name" int, "nationality" int, "num_of_episodes" int, "birth_city" text, "birth_year" int, primary key("wid") ) 3 rows from writer table: Empty DataFrame Columns: [wid, gender, name, nationality, num_of_episodes, birth_city, birth_year] Index: [] CREATE TABLE "written_by" ( "id" int, "msid" int, "wid" int, foreign key("msid") references `copyright`("msid"), foreign key("wid") references `writer`("wid") ) 3 rows from written_by table: Empty DataFrame Columns: [id, msid, wid] Index: []
imdb
Find all actors who were born in " New York City " in 1984
SELECT name FROM actor WHERE birth_city = "New York City" AND birth_year = 1984;
CREATE TABLE "actor" ( "aid" int, "gender" text, "name" text, "nationality" text, "birth_city" text, "birth_year" int, primary key("aid") ) 3 rows from actor table: Empty DataFrame Columns: [aid, gender, name, nationality, birth_city, birth_year] Index: [] CREATE TABLE "copyright" ( "id" int, "msid" int, "cid" int, primary key("id") ) 3 rows from copyright table: Empty DataFrame Columns: [id, msid, cid] Index: [] CREATE TABLE "cast" ( "id" int, "msid" int, "aid" int, "role" int, primary key("id"), foreign key("aid") references `actor`("aid"), foreign key("msid") references `copyright`("msid") ) 3 rows from cast table: Empty DataFrame Columns: [id, msid, aid, role] Index: [] CREATE TABLE "genre" ( "gid" int, "genre" text, primary key("gid") ) 3 rows from genre table: Empty DataFrame Columns: [gid, genre] Index: [] CREATE TABLE "classification" ( "id" int, "msid" int, "gid" int, primary key("id"), foreign key("gid") references `genre`("gid"), foreign key("msid") references `copyright`("msid") ) 3 rows from classification table: Empty DataFrame Columns: [id, msid, gid] Index: [] CREATE TABLE "company" ( "id" int, "name" text, "country_code" text, primary key("id") ) 3 rows from company table: Empty DataFrame Columns: [id, name, country_code] Index: [] CREATE TABLE "director" ( "did" int, "gender" text, "name" text, "nationality" text, "birth_city" text, "birth_year" int, primary key("did") ) 3 rows from director table: Empty DataFrame Columns: [did, gender, name, nationality, birth_city, birth_year] Index: [] CREATE TABLE "producer" ( "pid" int, "gender" text, "name" text, "nationality" text, "birth_city" text, "birth_year" int, primary key("pid") ) 3 rows from producer table: Empty DataFrame Columns: [pid, gender, name, nationality, birth_city, birth_year] Index: [] CREATE TABLE "directed_by" ( "id" int, "msid" int, "did" int, primary key("id"), foreign key("msid") references `copyright`("msid"), foreign key("did") references `director`("did") ) 3 rows from directed_by table: Empty DataFrame Columns: [id, msid, did] Index: [] CREATE TABLE "keyword" ( "id" int, "keyword" text, primary key("id") ) 3 rows from keyword table: Empty DataFrame Columns: [id, keyword] Index: [] CREATE TABLE "made_by" ( "id" int, "msid" int, "pid" int, primary key("id"), foreign key("msid") references `copyright`("msid"), foreign key("pid") references `producer`("pid") ) 3 rows from made_by table: Empty DataFrame Columns: [id, msid, pid] Index: [] CREATE TABLE "movie" ( "mid" int, "title" text, "release_year" int, "title_aka" text, "budget" text, primary key("mid") ) 3 rows from movie table: Empty DataFrame Columns: [mid, title, release_year, title_aka, budget] Index: [] CREATE TABLE "tags" ( "id" int, "msid" int, "kid" int, primary key("id"), foreign key("msid") references `copyright`("msid"), foreign key("kid") references `keyword`("kid") ) 3 rows from tags table: Empty DataFrame Columns: [id, msid, kid] Index: [] CREATE TABLE "tv_series" ( "sid" int, "title" text, "release_year" int, "num_of_seasons" int, "num_of_episodes" int, "title_aka" text, "budget" text, primary key("sid") ) 3 rows from tv_series table: Empty DataFrame Columns: [sid, title, release_year, num_of_seasons, num_of_episodes, title_aka, budget] Index: [] CREATE TABLE "writer" ( "wid" int, "gender" text, "name" int, "nationality" int, "num_of_episodes" int, "birth_city" text, "birth_year" int, primary key("wid") ) 3 rows from writer table: Empty DataFrame Columns: [wid, gender, name, nationality, num_of_episodes, birth_city, birth_year] Index: [] CREATE TABLE "written_by" ( "id" int, "msid" int, "wid" int, foreign key("msid") references `copyright`("msid"), foreign key("wid") references `writer`("wid") ) 3 rows from written_by table: Empty DataFrame Columns: [id, msid, wid] Index: []
imdb
Find all movies about nuclear weapons
SELECT t3.title FROM tags AS t2 JOIN keyword AS t1 ON t2.kid = t1.id JOIN movie AS t3 ON t2.msid = t3.mid WHERE t1.keyword = "nuclear weapons";
CREATE TABLE "actor" ( "aid" int, "gender" text, "name" text, "nationality" text, "birth_city" text, "birth_year" int, primary key("aid") ) 3 rows from actor table: Empty DataFrame Columns: [aid, gender, name, nationality, birth_city, birth_year] Index: [] CREATE TABLE "copyright" ( "id" int, "msid" int, "cid" int, primary key("id") ) 3 rows from copyright table: Empty DataFrame Columns: [id, msid, cid] Index: [] CREATE TABLE "cast" ( "id" int, "msid" int, "aid" int, "role" int, primary key("id"), foreign key("aid") references `actor`("aid"), foreign key("msid") references `copyright`("msid") ) 3 rows from cast table: Empty DataFrame Columns: [id, msid, aid, role] Index: [] CREATE TABLE "genre" ( "gid" int, "genre" text, primary key("gid") ) 3 rows from genre table: Empty DataFrame Columns: [gid, genre] Index: [] CREATE TABLE "classification" ( "id" int, "msid" int, "gid" int, primary key("id"), foreign key("gid") references `genre`("gid"), foreign key("msid") references `copyright`("msid") ) 3 rows from classification table: Empty DataFrame Columns: [id, msid, gid] Index: [] CREATE TABLE "company" ( "id" int, "name" text, "country_code" text, primary key("id") ) 3 rows from company table: Empty DataFrame Columns: [id, name, country_code] Index: [] CREATE TABLE "director" ( "did" int, "gender" text, "name" text, "nationality" text, "birth_city" text, "birth_year" int, primary key("did") ) 3 rows from director table: Empty DataFrame Columns: [did, gender, name, nationality, birth_city, birth_year] Index: [] CREATE TABLE "producer" ( "pid" int, "gender" text, "name" text, "nationality" text, "birth_city" text, "birth_year" int, primary key("pid") ) 3 rows from producer table: Empty DataFrame Columns: [pid, gender, name, nationality, birth_city, birth_year] Index: [] CREATE TABLE "directed_by" ( "id" int, "msid" int, "did" int, primary key("id"), foreign key("msid") references `copyright`("msid"), foreign key("did") references `director`("did") ) 3 rows from directed_by table: Empty DataFrame Columns: [id, msid, did] Index: [] CREATE TABLE "keyword" ( "id" int, "keyword" text, primary key("id") ) 3 rows from keyword table: Empty DataFrame Columns: [id, keyword] Index: [] CREATE TABLE "made_by" ( "id" int, "msid" int, "pid" int, primary key("id"), foreign key("msid") references `copyright`("msid"), foreign key("pid") references `producer`("pid") ) 3 rows from made_by table: Empty DataFrame Columns: [id, msid, pid] Index: [] CREATE TABLE "movie" ( "mid" int, "title" text, "release_year" int, "title_aka" text, "budget" text, primary key("mid") ) 3 rows from movie table: Empty DataFrame Columns: [mid, title, release_year, title_aka, budget] Index: [] CREATE TABLE "tags" ( "id" int, "msid" int, "kid" int, primary key("id"), foreign key("msid") references `copyright`("msid"), foreign key("kid") references `keyword`("kid") ) 3 rows from tags table: Empty DataFrame Columns: [id, msid, kid] Index: [] CREATE TABLE "tv_series" ( "sid" int, "title" text, "release_year" int, "num_of_seasons" int, "num_of_episodes" int, "title_aka" text, "budget" text, primary key("sid") ) 3 rows from tv_series table: Empty DataFrame Columns: [sid, title, release_year, num_of_seasons, num_of_episodes, title_aka, budget] Index: [] CREATE TABLE "writer" ( "wid" int, "gender" text, "name" int, "nationality" int, "num_of_episodes" int, "birth_city" text, "birth_year" int, primary key("wid") ) 3 rows from writer table: Empty DataFrame Columns: [wid, gender, name, nationality, num_of_episodes, birth_city, birth_year] Index: [] CREATE TABLE "written_by" ( "id" int, "msid" int, "wid" int, foreign key("msid") references `copyright`("msid"), foreign key("wid") references `writer`("wid") ) 3 rows from written_by table: Empty DataFrame Columns: [id, msid, wid] Index: []
imdb
What are the movies related to nuclear weapons
SELECT t3.title FROM tags AS t2 JOIN keyword AS t1 ON t2.kid = t1.id JOIN movie AS t3 ON t2.msid = t3.mid WHERE t1.keyword = "nuclear weapons";
CREATE TABLE "actor" ( "aid" int, "gender" text, "name" text, "nationality" text, "birth_city" text, "birth_year" int, primary key("aid") ) 3 rows from actor table: Empty DataFrame Columns: [aid, gender, name, nationality, birth_city, birth_year] Index: [] CREATE TABLE "copyright" ( "id" int, "msid" int, "cid" int, primary key("id") ) 3 rows from copyright table: Empty DataFrame Columns: [id, msid, cid] Index: [] CREATE TABLE "cast" ( "id" int, "msid" int, "aid" int, "role" int, primary key("id"), foreign key("aid") references `actor`("aid"), foreign key("msid") references `copyright`("msid") ) 3 rows from cast table: Empty DataFrame Columns: [id, msid, aid, role] Index: [] CREATE TABLE "genre" ( "gid" int, "genre" text, primary key("gid") ) 3 rows from genre table: Empty DataFrame Columns: [gid, genre] Index: [] CREATE TABLE "classification" ( "id" int, "msid" int, "gid" int, primary key("id"), foreign key("gid") references `genre`("gid"), foreign key("msid") references `copyright`("msid") ) 3 rows from classification table: Empty DataFrame Columns: [id, msid, gid] Index: [] CREATE TABLE "company" ( "id" int, "name" text, "country_code" text, primary key("id") ) 3 rows from company table: Empty DataFrame Columns: [id, name, country_code] Index: [] CREATE TABLE "director" ( "did" int, "gender" text, "name" text, "nationality" text, "birth_city" text, "birth_year" int, primary key("did") ) 3 rows from director table: Empty DataFrame Columns: [did, gender, name, nationality, birth_city, birth_year] Index: [] CREATE TABLE "producer" ( "pid" int, "gender" text, "name" text, "nationality" text, "birth_city" text, "birth_year" int, primary key("pid") ) 3 rows from producer table: Empty DataFrame Columns: [pid, gender, name, nationality, birth_city, birth_year] Index: [] CREATE TABLE "directed_by" ( "id" int, "msid" int, "did" int, primary key("id"), foreign key("msid") references `copyright`("msid"), foreign key("did") references `director`("did") ) 3 rows from directed_by table: Empty DataFrame Columns: [id, msid, did] Index: [] CREATE TABLE "keyword" ( "id" int, "keyword" text, primary key("id") ) 3 rows from keyword table: Empty DataFrame Columns: [id, keyword] Index: [] CREATE TABLE "made_by" ( "id" int, "msid" int, "pid" int, primary key("id"), foreign key("msid") references `copyright`("msid"), foreign key("pid") references `producer`("pid") ) 3 rows from made_by table: Empty DataFrame Columns: [id, msid, pid] Index: [] CREATE TABLE "movie" ( "mid" int, "title" text, "release_year" int, "title_aka" text, "budget" text, primary key("mid") ) 3 rows from movie table: Empty DataFrame Columns: [mid, title, release_year, title_aka, budget] Index: [] CREATE TABLE "tags" ( "id" int, "msid" int, "kid" int, primary key("id"), foreign key("msid") references `copyright`("msid"), foreign key("kid") references `keyword`("kid") ) 3 rows from tags table: Empty DataFrame Columns: [id, msid, kid] Index: [] CREATE TABLE "tv_series" ( "sid" int, "title" text, "release_year" int, "num_of_seasons" int, "num_of_episodes" int, "title_aka" text, "budget" text, primary key("sid") ) 3 rows from tv_series table: Empty DataFrame Columns: [sid, title, release_year, num_of_seasons, num_of_episodes, title_aka, budget] Index: [] CREATE TABLE "writer" ( "wid" int, "gender" text, "name" int, "nationality" int, "num_of_episodes" int, "birth_city" text, "birth_year" int, primary key("wid") ) 3 rows from writer table: Empty DataFrame Columns: [wid, gender, name, nationality, num_of_episodes, birth_city, birth_year] Index: [] CREATE TABLE "written_by" ( "id" int, "msid" int, "wid" int, foreign key("msid") references `copyright`("msid"), foreign key("wid") references `writer`("wid") ) 3 rows from written_by table: Empty DataFrame Columns: [id, msid, wid] Index: []
imdb
Which movies did " Alfred Hitchcock " direct ?
SELECT t3.title FROM director AS t2 JOIN directed_by AS t1 ON t2.did = t1.did JOIN movie AS t3 ON t3.mid = t1.msid WHERE t2.name = "Alfred Hitchcock";
CREATE TABLE "actor" ( "aid" int, "gender" text, "name" text, "nationality" text, "birth_city" text, "birth_year" int, primary key("aid") ) 3 rows from actor table: Empty DataFrame Columns: [aid, gender, name, nationality, birth_city, birth_year] Index: [] CREATE TABLE "copyright" ( "id" int, "msid" int, "cid" int, primary key("id") ) 3 rows from copyright table: Empty DataFrame Columns: [id, msid, cid] Index: [] CREATE TABLE "cast" ( "id" int, "msid" int, "aid" int, "role" int, primary key("id"), foreign key("aid") references `actor`("aid"), foreign key("msid") references `copyright`("msid") ) 3 rows from cast table: Empty DataFrame Columns: [id, msid, aid, role] Index: [] CREATE TABLE "genre" ( "gid" int, "genre" text, primary key("gid") ) 3 rows from genre table: Empty DataFrame Columns: [gid, genre] Index: [] CREATE TABLE "classification" ( "id" int, "msid" int, "gid" int, primary key("id"), foreign key("gid") references `genre`("gid"), foreign key("msid") references `copyright`("msid") ) 3 rows from classification table: Empty DataFrame Columns: [id, msid, gid] Index: [] CREATE TABLE "company" ( "id" int, "name" text, "country_code" text, primary key("id") ) 3 rows from company table: Empty DataFrame Columns: [id, name, country_code] Index: [] CREATE TABLE "director" ( "did" int, "gender" text, "name" text, "nationality" text, "birth_city" text, "birth_year" int, primary key("did") ) 3 rows from director table: Empty DataFrame Columns: [did, gender, name, nationality, birth_city, birth_year] Index: [] CREATE TABLE "producer" ( "pid" int, "gender" text, "name" text, "nationality" text, "birth_city" text, "birth_year" int, primary key("pid") ) 3 rows from producer table: Empty DataFrame Columns: [pid, gender, name, nationality, birth_city, birth_year] Index: [] CREATE TABLE "directed_by" ( "id" int, "msid" int, "did" int, primary key("id"), foreign key("msid") references `copyright`("msid"), foreign key("did") references `director`("did") ) 3 rows from directed_by table: Empty DataFrame Columns: [id, msid, did] Index: [] CREATE TABLE "keyword" ( "id" int, "keyword" text, primary key("id") ) 3 rows from keyword table: Empty DataFrame Columns: [id, keyword] Index: [] CREATE TABLE "made_by" ( "id" int, "msid" int, "pid" int, primary key("id"), foreign key("msid") references `copyright`("msid"), foreign key("pid") references `producer`("pid") ) 3 rows from made_by table: Empty DataFrame Columns: [id, msid, pid] Index: [] CREATE TABLE "movie" ( "mid" int, "title" text, "release_year" int, "title_aka" text, "budget" text, primary key("mid") ) 3 rows from movie table: Empty DataFrame Columns: [mid, title, release_year, title_aka, budget] Index: [] CREATE TABLE "tags" ( "id" int, "msid" int, "kid" int, primary key("id"), foreign key("msid") references `copyright`("msid"), foreign key("kid") references `keyword`("kid") ) 3 rows from tags table: Empty DataFrame Columns: [id, msid, kid] Index: [] CREATE TABLE "tv_series" ( "sid" int, "title" text, "release_year" int, "num_of_seasons" int, "num_of_episodes" int, "title_aka" text, "budget" text, primary key("sid") ) 3 rows from tv_series table: Empty DataFrame Columns: [sid, title, release_year, num_of_seasons, num_of_episodes, title_aka, budget] Index: [] CREATE TABLE "writer" ( "wid" int, "gender" text, "name" int, "nationality" int, "num_of_episodes" int, "birth_city" text, "birth_year" int, primary key("wid") ) 3 rows from writer table: Empty DataFrame Columns: [wid, gender, name, nationality, num_of_episodes, birth_city, birth_year] Index: [] CREATE TABLE "written_by" ( "id" int, "msid" int, "wid" int, foreign key("msid") references `copyright`("msid"), foreign key("wid") references `writer`("wid") ) 3 rows from written_by table: Empty DataFrame Columns: [id, msid, wid] Index: []
imdb
Find all movies directed by " Asghar Farhadi " and featuring " Taraneh Alidoosti "
SELECT t4.title FROM CAST AS t5 JOIN actor AS t1 ON t5.aid = t1.aid JOIN movie AS t4 ON t4.mid = t5.msid JOIN directed_by AS t2 ON t4.mid = t2.msid JOIN director AS t3 ON t3.did = t2.did WHERE t1.name = "Taraneh Alidoosti" AND t3.name = "Asghar Farhadi";
CREATE TABLE "actor" ( "aid" int, "gender" text, "name" text, "nationality" text, "birth_city" text, "birth_year" int, primary key("aid") ) 3 rows from actor table: Empty DataFrame Columns: [aid, gender, name, nationality, birth_city, birth_year] Index: [] CREATE TABLE "copyright" ( "id" int, "msid" int, "cid" int, primary key("id") ) 3 rows from copyright table: Empty DataFrame Columns: [id, msid, cid] Index: [] CREATE TABLE "cast" ( "id" int, "msid" int, "aid" int, "role" int, primary key("id"), foreign key("aid") references `actor`("aid"), foreign key("msid") references `copyright`("msid") ) 3 rows from cast table: Empty DataFrame Columns: [id, msid, aid, role] Index: [] CREATE TABLE "genre" ( "gid" int, "genre" text, primary key("gid") ) 3 rows from genre table: Empty DataFrame Columns: [gid, genre] Index: [] CREATE TABLE "classification" ( "id" int, "msid" int, "gid" int, primary key("id"), foreign key("gid") references `genre`("gid"), foreign key("msid") references `copyright`("msid") ) 3 rows from classification table: Empty DataFrame Columns: [id, msid, gid] Index: [] CREATE TABLE "company" ( "id" int, "name" text, "country_code" text, primary key("id") ) 3 rows from company table: Empty DataFrame Columns: [id, name, country_code] Index: [] CREATE TABLE "director" ( "did" int, "gender" text, "name" text, "nationality" text, "birth_city" text, "birth_year" int, primary key("did") ) 3 rows from director table: Empty DataFrame Columns: [did, gender, name, nationality, birth_city, birth_year] Index: [] CREATE TABLE "producer" ( "pid" int, "gender" text, "name" text, "nationality" text, "birth_city" text, "birth_year" int, primary key("pid") ) 3 rows from producer table: Empty DataFrame Columns: [pid, gender, name, nationality, birth_city, birth_year] Index: [] CREATE TABLE "directed_by" ( "id" int, "msid" int, "did" int, primary key("id"), foreign key("msid") references `copyright`("msid"), foreign key("did") references `director`("did") ) 3 rows from directed_by table: Empty DataFrame Columns: [id, msid, did] Index: [] CREATE TABLE "keyword" ( "id" int, "keyword" text, primary key("id") ) 3 rows from keyword table: Empty DataFrame Columns: [id, keyword] Index: [] CREATE TABLE "made_by" ( "id" int, "msid" int, "pid" int, primary key("id"), foreign key("msid") references `copyright`("msid"), foreign key("pid") references `producer`("pid") ) 3 rows from made_by table: Empty DataFrame Columns: [id, msid, pid] Index: [] CREATE TABLE "movie" ( "mid" int, "title" text, "release_year" int, "title_aka" text, "budget" text, primary key("mid") ) 3 rows from movie table: Empty DataFrame Columns: [mid, title, release_year, title_aka, budget] Index: [] CREATE TABLE "tags" ( "id" int, "msid" int, "kid" int, primary key("id"), foreign key("msid") references `copyright`("msid"), foreign key("kid") references `keyword`("kid") ) 3 rows from tags table: Empty DataFrame Columns: [id, msid, kid] Index: [] CREATE TABLE "tv_series" ( "sid" int, "title" text, "release_year" int, "num_of_seasons" int, "num_of_episodes" int, "title_aka" text, "budget" text, primary key("sid") ) 3 rows from tv_series table: Empty DataFrame Columns: [sid, title, release_year, num_of_seasons, num_of_episodes, title_aka, budget] Index: [] CREATE TABLE "writer" ( "wid" int, "gender" text, "name" int, "nationality" int, "num_of_episodes" int, "birth_city" text, "birth_year" int, primary key("wid") ) 3 rows from writer table: Empty DataFrame Columns: [wid, gender, name, nationality, num_of_episodes, birth_city, birth_year] Index: [] CREATE TABLE "written_by" ( "id" int, "msid" int, "wid" int, foreign key("msid") references `copyright`("msid"), foreign key("wid") references `writer`("wid") ) 3 rows from written_by table: Empty DataFrame Columns: [id, msid, wid] Index: []
imdb
What are all the movies directed by " Asghar Farhadi " featuring " Taraneh Alidoosti " ?
SELECT t4.title FROM CAST AS t5 JOIN actor AS t1 ON t5.aid = t1.aid JOIN movie AS t4 ON t4.mid = t5.msid JOIN directed_by AS t2 ON t4.mid = t2.msid JOIN director AS t3 ON t3.did = t2.did WHERE t1.name = "Taraneh Alidoosti" AND t3.name = "Asghar Farhadi";
CREATE TABLE "actor" ( "aid" int, "gender" text, "name" text, "nationality" text, "birth_city" text, "birth_year" int, primary key("aid") ) 3 rows from actor table: Empty DataFrame Columns: [aid, gender, name, nationality, birth_city, birth_year] Index: [] CREATE TABLE "copyright" ( "id" int, "msid" int, "cid" int, primary key("id") ) 3 rows from copyright table: Empty DataFrame Columns: [id, msid, cid] Index: [] CREATE TABLE "cast" ( "id" int, "msid" int, "aid" int, "role" int, primary key("id"), foreign key("aid") references `actor`("aid"), foreign key("msid") references `copyright`("msid") ) 3 rows from cast table: Empty DataFrame Columns: [id, msid, aid, role] Index: [] CREATE TABLE "genre" ( "gid" int, "genre" text, primary key("gid") ) 3 rows from genre table: Empty DataFrame Columns: [gid, genre] Index: [] CREATE TABLE "classification" ( "id" int, "msid" int, "gid" int, primary key("id"), foreign key("gid") references `genre`("gid"), foreign key("msid") references `copyright`("msid") ) 3 rows from classification table: Empty DataFrame Columns: [id, msid, gid] Index: [] CREATE TABLE "company" ( "id" int, "name" text, "country_code" text, primary key("id") ) 3 rows from company table: Empty DataFrame Columns: [id, name, country_code] Index: [] CREATE TABLE "director" ( "did" int, "gender" text, "name" text, "nationality" text, "birth_city" text, "birth_year" int, primary key("did") ) 3 rows from director table: Empty DataFrame Columns: [did, gender, name, nationality, birth_city, birth_year] Index: [] CREATE TABLE "producer" ( "pid" int, "gender" text, "name" text, "nationality" text, "birth_city" text, "birth_year" int, primary key("pid") ) 3 rows from producer table: Empty DataFrame Columns: [pid, gender, name, nationality, birth_city, birth_year] Index: [] CREATE TABLE "directed_by" ( "id" int, "msid" int, "did" int, primary key("id"), foreign key("msid") references `copyright`("msid"), foreign key("did") references `director`("did") ) 3 rows from directed_by table: Empty DataFrame Columns: [id, msid, did] Index: [] CREATE TABLE "keyword" ( "id" int, "keyword" text, primary key("id") ) 3 rows from keyword table: Empty DataFrame Columns: [id, keyword] Index: [] CREATE TABLE "made_by" ( "id" int, "msid" int, "pid" int, primary key("id"), foreign key("msid") references `copyright`("msid"), foreign key("pid") references `producer`("pid") ) 3 rows from made_by table: Empty DataFrame Columns: [id, msid, pid] Index: [] CREATE TABLE "movie" ( "mid" int, "title" text, "release_year" int, "title_aka" text, "budget" text, primary key("mid") ) 3 rows from movie table: Empty DataFrame Columns: [mid, title, release_year, title_aka, budget] Index: [] CREATE TABLE "tags" ( "id" int, "msid" int, "kid" int, primary key("id"), foreign key("msid") references `copyright`("msid"), foreign key("kid") references `keyword`("kid") ) 3 rows from tags table: Empty DataFrame Columns: [id, msid, kid] Index: [] CREATE TABLE "tv_series" ( "sid" int, "title" text, "release_year" int, "num_of_seasons" int, "num_of_episodes" int, "title_aka" text, "budget" text, primary key("sid") ) 3 rows from tv_series table: Empty DataFrame Columns: [sid, title, release_year, num_of_seasons, num_of_episodes, title_aka, budget] Index: [] CREATE TABLE "writer" ( "wid" int, "gender" text, "name" int, "nationality" int, "num_of_episodes" int, "birth_city" text, "birth_year" int, primary key("wid") ) 3 rows from writer table: Empty DataFrame Columns: [wid, gender, name, nationality, num_of_episodes, birth_city, birth_year] Index: [] CREATE TABLE "written_by" ( "id" int, "msid" int, "wid" int, foreign key("msid") references `copyright`("msid"), foreign key("wid") references `writer`("wid") ) 3 rows from written_by table: Empty DataFrame Columns: [id, msid, wid] Index: []
imdb
How many movies are there that are directed by " Asghar Farhadi " and featuring " Taraneh Alidoosti " ?
SELECT t4.title FROM CAST AS t5 JOIN actor AS t1 ON t5.aid = t1.aid JOIN movie AS t4 ON t4.mid = t5.msid JOIN directed_by AS t2 ON t4.mid = t2.msid JOIN director AS t3 ON t3.did = t2.did WHERE t1.name = "Taraneh Alidoosti" AND t3.name = "Asghar Farhadi";
CREATE TABLE "actor" ( "aid" int, "gender" text, "name" text, "nationality" text, "birth_city" text, "birth_year" int, primary key("aid") ) 3 rows from actor table: Empty DataFrame Columns: [aid, gender, name, nationality, birth_city, birth_year] Index: [] CREATE TABLE "copyright" ( "id" int, "msid" int, "cid" int, primary key("id") ) 3 rows from copyright table: Empty DataFrame Columns: [id, msid, cid] Index: [] CREATE TABLE "cast" ( "id" int, "msid" int, "aid" int, "role" int, primary key("id"), foreign key("aid") references `actor`("aid"), foreign key("msid") references `copyright`("msid") ) 3 rows from cast table: Empty DataFrame Columns: [id, msid, aid, role] Index: [] CREATE TABLE "genre" ( "gid" int, "genre" text, primary key("gid") ) 3 rows from genre table: Empty DataFrame Columns: [gid, genre] Index: [] CREATE TABLE "classification" ( "id" int, "msid" int, "gid" int, primary key("id"), foreign key("gid") references `genre`("gid"), foreign key("msid") references `copyright`("msid") ) 3 rows from classification table: Empty DataFrame Columns: [id, msid, gid] Index: [] CREATE TABLE "company" ( "id" int, "name" text, "country_code" text, primary key("id") ) 3 rows from company table: Empty DataFrame Columns: [id, name, country_code] Index: [] CREATE TABLE "director" ( "did" int, "gender" text, "name" text, "nationality" text, "birth_city" text, "birth_year" int, primary key("did") ) 3 rows from director table: Empty DataFrame Columns: [did, gender, name, nationality, birth_city, birth_year] Index: [] CREATE TABLE "producer" ( "pid" int, "gender" text, "name" text, "nationality" text, "birth_city" text, "birth_year" int, primary key("pid") ) 3 rows from producer table: Empty DataFrame Columns: [pid, gender, name, nationality, birth_city, birth_year] Index: [] CREATE TABLE "directed_by" ( "id" int, "msid" int, "did" int, primary key("id"), foreign key("msid") references `copyright`("msid"), foreign key("did") references `director`("did") ) 3 rows from directed_by table: Empty DataFrame Columns: [id, msid, did] Index: [] CREATE TABLE "keyword" ( "id" int, "keyword" text, primary key("id") ) 3 rows from keyword table: Empty DataFrame Columns: [id, keyword] Index: [] CREATE TABLE "made_by" ( "id" int, "msid" int, "pid" int, primary key("id"), foreign key("msid") references `copyright`("msid"), foreign key("pid") references `producer`("pid") ) 3 rows from made_by table: Empty DataFrame Columns: [id, msid, pid] Index: [] CREATE TABLE "movie" ( "mid" int, "title" text, "release_year" int, "title_aka" text, "budget" text, primary key("mid") ) 3 rows from movie table: Empty DataFrame Columns: [mid, title, release_year, title_aka, budget] Index: [] CREATE TABLE "tags" ( "id" int, "msid" int, "kid" int, primary key("id"), foreign key("msid") references `copyright`("msid"), foreign key("kid") references `keyword`("kid") ) 3 rows from tags table: Empty DataFrame Columns: [id, msid, kid] Index: [] CREATE TABLE "tv_series" ( "sid" int, "title" text, "release_year" int, "num_of_seasons" int, "num_of_episodes" int, "title_aka" text, "budget" text, primary key("sid") ) 3 rows from tv_series table: Empty DataFrame Columns: [sid, title, release_year, num_of_seasons, num_of_episodes, title_aka, budget] Index: [] CREATE TABLE "writer" ( "wid" int, "gender" text, "name" int, "nationality" int, "num_of_episodes" int, "birth_city" text, "birth_year" int, primary key("wid") ) 3 rows from writer table: Empty DataFrame Columns: [wid, gender, name, nationality, num_of_episodes, birth_city, birth_year] Index: [] CREATE TABLE "written_by" ( "id" int, "msid" int, "wid" int, foreign key("msid") references `copyright`("msid"), foreign key("wid") references `writer`("wid") ) 3 rows from written_by table: Empty DataFrame Columns: [id, msid, wid] Index: []
imdb
List all the movies directed by " Asghar Farhadi " in which " Taraneh Alidoosti " played
SELECT t4.title FROM CAST AS t5 JOIN actor AS t1 ON t5.aid = t1.aid JOIN movie AS t4 ON t4.mid = t5.msid JOIN directed_by AS t2 ON t4.mid = t2.msid JOIN director AS t3 ON t3.did = t2.did WHERE t1.name = "Taraneh Alidoosti" AND t3.name = "Asghar Farhadi";
CREATE TABLE "actor" ( "aid" int, "gender" text, "name" text, "nationality" text, "birth_city" text, "birth_year" int, primary key("aid") ) 3 rows from actor table: Empty DataFrame Columns: [aid, gender, name, nationality, birth_city, birth_year] Index: [] CREATE TABLE "copyright" ( "id" int, "msid" int, "cid" int, primary key("id") ) 3 rows from copyright table: Empty DataFrame Columns: [id, msid, cid] Index: [] CREATE TABLE "cast" ( "id" int, "msid" int, "aid" int, "role" int, primary key("id"), foreign key("aid") references `actor`("aid"), foreign key("msid") references `copyright`("msid") ) 3 rows from cast table: Empty DataFrame Columns: [id, msid, aid, role] Index: [] CREATE TABLE "genre" ( "gid" int, "genre" text, primary key("gid") ) 3 rows from genre table: Empty DataFrame Columns: [gid, genre] Index: [] CREATE TABLE "classification" ( "id" int, "msid" int, "gid" int, primary key("id"), foreign key("gid") references `genre`("gid"), foreign key("msid") references `copyright`("msid") ) 3 rows from classification table: Empty DataFrame Columns: [id, msid, gid] Index: [] CREATE TABLE "company" ( "id" int, "name" text, "country_code" text, primary key("id") ) 3 rows from company table: Empty DataFrame Columns: [id, name, country_code] Index: [] CREATE TABLE "director" ( "did" int, "gender" text, "name" text, "nationality" text, "birth_city" text, "birth_year" int, primary key("did") ) 3 rows from director table: Empty DataFrame Columns: [did, gender, name, nationality, birth_city, birth_year] Index: [] CREATE TABLE "producer" ( "pid" int, "gender" text, "name" text, "nationality" text, "birth_city" text, "birth_year" int, primary key("pid") ) 3 rows from producer table: Empty DataFrame Columns: [pid, gender, name, nationality, birth_city, birth_year] Index: [] CREATE TABLE "directed_by" ( "id" int, "msid" int, "did" int, primary key("id"), foreign key("msid") references `copyright`("msid"), foreign key("did") references `director`("did") ) 3 rows from directed_by table: Empty DataFrame Columns: [id, msid, did] Index: [] CREATE TABLE "keyword" ( "id" int, "keyword" text, primary key("id") ) 3 rows from keyword table: Empty DataFrame Columns: [id, keyword] Index: [] CREATE TABLE "made_by" ( "id" int, "msid" int, "pid" int, primary key("id"), foreign key("msid") references `copyright`("msid"), foreign key("pid") references `producer`("pid") ) 3 rows from made_by table: Empty DataFrame Columns: [id, msid, pid] Index: [] CREATE TABLE "movie" ( "mid" int, "title" text, "release_year" int, "title_aka" text, "budget" text, primary key("mid") ) 3 rows from movie table: Empty DataFrame Columns: [mid, title, release_year, title_aka, budget] Index: [] CREATE TABLE "tags" ( "id" int, "msid" int, "kid" int, primary key("id"), foreign key("msid") references `copyright`("msid"), foreign key("kid") references `keyword`("kid") ) 3 rows from tags table: Empty DataFrame Columns: [id, msid, kid] Index: [] CREATE TABLE "tv_series" ( "sid" int, "title" text, "release_year" int, "num_of_seasons" int, "num_of_episodes" int, "title_aka" text, "budget" text, primary key("sid") ) 3 rows from tv_series table: Empty DataFrame Columns: [sid, title, release_year, num_of_seasons, num_of_episodes, title_aka, budget] Index: [] CREATE TABLE "writer" ( "wid" int, "gender" text, "name" int, "nationality" int, "num_of_episodes" int, "birth_city" text, "birth_year" int, primary key("wid") ) 3 rows from writer table: Empty DataFrame Columns: [wid, gender, name, nationality, num_of_episodes, birth_city, birth_year] Index: [] CREATE TABLE "written_by" ( "id" int, "msid" int, "wid" int, foreign key("msid") references `copyright`("msid"), foreign key("wid") references `writer`("wid") ) 3 rows from written_by table: Empty DataFrame Columns: [id, msid, wid] Index: []
imdb
What are all the tv series created by " Shonda Rhimes " ?
SELECT t2.title FROM producer AS t1 JOIN made_by AS t3 ON t1.pid = t3.pid JOIN tv_series AS t2 ON t2.sid = t3.msid WHERE t1.name = "Shonda Rhimes";
CREATE TABLE "actor" ( "aid" int, "gender" text, "name" text, "nationality" text, "birth_city" text, "birth_year" int, primary key("aid") ) 3 rows from actor table: Empty DataFrame Columns: [aid, gender, name, nationality, birth_city, birth_year] Index: [] CREATE TABLE "copyright" ( "id" int, "msid" int, "cid" int, primary key("id") ) 3 rows from copyright table: Empty DataFrame Columns: [id, msid, cid] Index: [] CREATE TABLE "cast" ( "id" int, "msid" int, "aid" int, "role" int, primary key("id"), foreign key("aid") references `actor`("aid"), foreign key("msid") references `copyright`("msid") ) 3 rows from cast table: Empty DataFrame Columns: [id, msid, aid, role] Index: [] CREATE TABLE "genre" ( "gid" int, "genre" text, primary key("gid") ) 3 rows from genre table: Empty DataFrame Columns: [gid, genre] Index: [] CREATE TABLE "classification" ( "id" int, "msid" int, "gid" int, primary key("id"), foreign key("gid") references `genre`("gid"), foreign key("msid") references `copyright`("msid") ) 3 rows from classification table: Empty DataFrame Columns: [id, msid, gid] Index: [] CREATE TABLE "company" ( "id" int, "name" text, "country_code" text, primary key("id") ) 3 rows from company table: Empty DataFrame Columns: [id, name, country_code] Index: [] CREATE TABLE "director" ( "did" int, "gender" text, "name" text, "nationality" text, "birth_city" text, "birth_year" int, primary key("did") ) 3 rows from director table: Empty DataFrame Columns: [did, gender, name, nationality, birth_city, birth_year] Index: [] CREATE TABLE "producer" ( "pid" int, "gender" text, "name" text, "nationality" text, "birth_city" text, "birth_year" int, primary key("pid") ) 3 rows from producer table: Empty DataFrame Columns: [pid, gender, name, nationality, birth_city, birth_year] Index: [] CREATE TABLE "directed_by" ( "id" int, "msid" int, "did" int, primary key("id"), foreign key("msid") references `copyright`("msid"), foreign key("did") references `director`("did") ) 3 rows from directed_by table: Empty DataFrame Columns: [id, msid, did] Index: [] CREATE TABLE "keyword" ( "id" int, "keyword" text, primary key("id") ) 3 rows from keyword table: Empty DataFrame Columns: [id, keyword] Index: [] CREATE TABLE "made_by" ( "id" int, "msid" int, "pid" int, primary key("id"), foreign key("msid") references `copyright`("msid"), foreign key("pid") references `producer`("pid") ) 3 rows from made_by table: Empty DataFrame Columns: [id, msid, pid] Index: [] CREATE TABLE "movie" ( "mid" int, "title" text, "release_year" int, "title_aka" text, "budget" text, primary key("mid") ) 3 rows from movie table: Empty DataFrame Columns: [mid, title, release_year, title_aka, budget] Index: [] CREATE TABLE "tags" ( "id" int, "msid" int, "kid" int, primary key("id"), foreign key("msid") references `copyright`("msid"), foreign key("kid") references `keyword`("kid") ) 3 rows from tags table: Empty DataFrame Columns: [id, msid, kid] Index: [] CREATE TABLE "tv_series" ( "sid" int, "title" text, "release_year" int, "num_of_seasons" int, "num_of_episodes" int, "title_aka" text, "budget" text, primary key("sid") ) 3 rows from tv_series table: Empty DataFrame Columns: [sid, title, release_year, num_of_seasons, num_of_episodes, title_aka, budget] Index: [] CREATE TABLE "writer" ( "wid" int, "gender" text, "name" int, "nationality" int, "num_of_episodes" int, "birth_city" text, "birth_year" int, primary key("wid") ) 3 rows from writer table: Empty DataFrame Columns: [wid, gender, name, nationality, num_of_episodes, birth_city, birth_year] Index: [] CREATE TABLE "written_by" ( "id" int, "msid" int, "wid" int, foreign key("msid") references `copyright`("msid"), foreign key("wid") references `writer`("wid") ) 3 rows from written_by table: Empty DataFrame Columns: [id, msid, wid] Index: []
imdb
Who acts " Olivia Pope " in the series Scandal ?
SELECT t1.name FROM CAST AS t3 JOIN actor AS t1 ON t3.aid = t1.aid JOIN tv_series AS t2 ON t2.sid = t3.msid WHERE t3.role = "Olivia Pope" AND t2.title = "Scandal";
CREATE TABLE "actor" ( "aid" int, "gender" text, "name" text, "nationality" text, "birth_city" text, "birth_year" int, primary key("aid") ) 3 rows from actor table: Empty DataFrame Columns: [aid, gender, name, nationality, birth_city, birth_year] Index: [] CREATE TABLE "copyright" ( "id" int, "msid" int, "cid" int, primary key("id") ) 3 rows from copyright table: Empty DataFrame Columns: [id, msid, cid] Index: [] CREATE TABLE "cast" ( "id" int, "msid" int, "aid" int, "role" int, primary key("id"), foreign key("aid") references `actor`("aid"), foreign key("msid") references `copyright`("msid") ) 3 rows from cast table: Empty DataFrame Columns: [id, msid, aid, role] Index: [] CREATE TABLE "genre" ( "gid" int, "genre" text, primary key("gid") ) 3 rows from genre table: Empty DataFrame Columns: [gid, genre] Index: [] CREATE TABLE "classification" ( "id" int, "msid" int, "gid" int, primary key("id"), foreign key("gid") references `genre`("gid"), foreign key("msid") references `copyright`("msid") ) 3 rows from classification table: Empty DataFrame Columns: [id, msid, gid] Index: [] CREATE TABLE "company" ( "id" int, "name" text, "country_code" text, primary key("id") ) 3 rows from company table: Empty DataFrame Columns: [id, name, country_code] Index: [] CREATE TABLE "director" ( "did" int, "gender" text, "name" text, "nationality" text, "birth_city" text, "birth_year" int, primary key("did") ) 3 rows from director table: Empty DataFrame Columns: [did, gender, name, nationality, birth_city, birth_year] Index: [] CREATE TABLE "producer" ( "pid" int, "gender" text, "name" text, "nationality" text, "birth_city" text, "birth_year" int, primary key("pid") ) 3 rows from producer table: Empty DataFrame Columns: [pid, gender, name, nationality, birth_city, birth_year] Index: [] CREATE TABLE "directed_by" ( "id" int, "msid" int, "did" int, primary key("id"), foreign key("msid") references `copyright`("msid"), foreign key("did") references `director`("did") ) 3 rows from directed_by table: Empty DataFrame Columns: [id, msid, did] Index: [] CREATE TABLE "keyword" ( "id" int, "keyword" text, primary key("id") ) 3 rows from keyword table: Empty DataFrame Columns: [id, keyword] Index: [] CREATE TABLE "made_by" ( "id" int, "msid" int, "pid" int, primary key("id"), foreign key("msid") references `copyright`("msid"), foreign key("pid") references `producer`("pid") ) 3 rows from made_by table: Empty DataFrame Columns: [id, msid, pid] Index: [] CREATE TABLE "movie" ( "mid" int, "title" text, "release_year" int, "title_aka" text, "budget" text, primary key("mid") ) 3 rows from movie table: Empty DataFrame Columns: [mid, title, release_year, title_aka, budget] Index: [] CREATE TABLE "tags" ( "id" int, "msid" int, "kid" int, primary key("id"), foreign key("msid") references `copyright`("msid"), foreign key("kid") references `keyword`("kid") ) 3 rows from tags table: Empty DataFrame Columns: [id, msid, kid] Index: [] CREATE TABLE "tv_series" ( "sid" int, "title" text, "release_year" int, "num_of_seasons" int, "num_of_episodes" int, "title_aka" text, "budget" text, primary key("sid") ) 3 rows from tv_series table: Empty DataFrame Columns: [sid, title, release_year, num_of_seasons, num_of_episodes, title_aka, budget] Index: [] CREATE TABLE "writer" ( "wid" int, "gender" text, "name" int, "nationality" int, "num_of_episodes" int, "birth_city" text, "birth_year" int, primary key("wid") ) 3 rows from writer table: Empty DataFrame Columns: [wid, gender, name, nationality, num_of_episodes, birth_city, birth_year] Index: [] CREATE TABLE "written_by" ( "id" int, "msid" int, "wid" int, foreign key("msid") references `copyright`("msid"), foreign key("wid") references `writer`("wid") ) 3 rows from written_by table: Empty DataFrame Columns: [id, msid, wid] Index: []
imdb
Who is the writer of the movie " The Truman Show "
SELECT t2.name FROM written_by AS t3 JOIN movie AS t1 ON t3.msid = t1.mid JOIN writer AS t2 ON t3.wid = t2.wid WHERE t1.title = "The Truman Show";
CREATE TABLE "actor" ( "aid" int, "gender" text, "name" text, "nationality" text, "birth_city" text, "birth_year" int, primary key("aid") ) 3 rows from actor table: Empty DataFrame Columns: [aid, gender, name, nationality, birth_city, birth_year] Index: [] CREATE TABLE "copyright" ( "id" int, "msid" int, "cid" int, primary key("id") ) 3 rows from copyright table: Empty DataFrame Columns: [id, msid, cid] Index: [] CREATE TABLE "cast" ( "id" int, "msid" int, "aid" int, "role" int, primary key("id"), foreign key("aid") references `actor`("aid"), foreign key("msid") references `copyright`("msid") ) 3 rows from cast table: Empty DataFrame Columns: [id, msid, aid, role] Index: [] CREATE TABLE "genre" ( "gid" int, "genre" text, primary key("gid") ) 3 rows from genre table: Empty DataFrame Columns: [gid, genre] Index: [] CREATE TABLE "classification" ( "id" int, "msid" int, "gid" int, primary key("id"), foreign key("gid") references `genre`("gid"), foreign key("msid") references `copyright`("msid") ) 3 rows from classification table: Empty DataFrame Columns: [id, msid, gid] Index: [] CREATE TABLE "company" ( "id" int, "name" text, "country_code" text, primary key("id") ) 3 rows from company table: Empty DataFrame Columns: [id, name, country_code] Index: [] CREATE TABLE "director" ( "did" int, "gender" text, "name" text, "nationality" text, "birth_city" text, "birth_year" int, primary key("did") ) 3 rows from director table: Empty DataFrame Columns: [did, gender, name, nationality, birth_city, birth_year] Index: [] CREATE TABLE "producer" ( "pid" int, "gender" text, "name" text, "nationality" text, "birth_city" text, "birth_year" int, primary key("pid") ) 3 rows from producer table: Empty DataFrame Columns: [pid, gender, name, nationality, birth_city, birth_year] Index: [] CREATE TABLE "directed_by" ( "id" int, "msid" int, "did" int, primary key("id"), foreign key("msid") references `copyright`("msid"), foreign key("did") references `director`("did") ) 3 rows from directed_by table: Empty DataFrame Columns: [id, msid, did] Index: [] CREATE TABLE "keyword" ( "id" int, "keyword" text, primary key("id") ) 3 rows from keyword table: Empty DataFrame Columns: [id, keyword] Index: [] CREATE TABLE "made_by" ( "id" int, "msid" int, "pid" int, primary key("id"), foreign key("msid") references `copyright`("msid"), foreign key("pid") references `producer`("pid") ) 3 rows from made_by table: Empty DataFrame Columns: [id, msid, pid] Index: [] CREATE TABLE "movie" ( "mid" int, "title" text, "release_year" int, "title_aka" text, "budget" text, primary key("mid") ) 3 rows from movie table: Empty DataFrame Columns: [mid, title, release_year, title_aka, budget] Index: [] CREATE TABLE "tags" ( "id" int, "msid" int, "kid" int, primary key("id"), foreign key("msid") references `copyright`("msid"), foreign key("kid") references `keyword`("kid") ) 3 rows from tags table: Empty DataFrame Columns: [id, msid, kid] Index: [] CREATE TABLE "tv_series" ( "sid" int, "title" text, "release_year" int, "num_of_seasons" int, "num_of_episodes" int, "title_aka" text, "budget" text, primary key("sid") ) 3 rows from tv_series table: Empty DataFrame Columns: [sid, title, release_year, num_of_seasons, num_of_episodes, title_aka, budget] Index: [] CREATE TABLE "writer" ( "wid" int, "gender" text, "name" int, "nationality" int, "num_of_episodes" int, "birth_city" text, "birth_year" int, primary key("wid") ) 3 rows from writer table: Empty DataFrame Columns: [wid, gender, name, nationality, num_of_episodes, birth_city, birth_year] Index: [] CREATE TABLE "written_by" ( "id" int, "msid" int, "wid" int, foreign key("msid") references `copyright`("msid"), foreign key("wid") references `writer`("wid") ) 3 rows from written_by table: Empty DataFrame Columns: [id, msid, wid] Index: []
imdb
Who is the writer of " The Truman Show "
SELECT t2.name FROM written_by AS t3 JOIN movie AS t1 ON t3.msid = t1.mid JOIN writer AS t2 ON t3.wid = t2.wid WHERE t1.title = "The Truman Show";
CREATE TABLE "actor" ( "aid" int, "gender" text, "name" text, "nationality" text, "birth_city" text, "birth_year" int, primary key("aid") ) 3 rows from actor table: Empty DataFrame Columns: [aid, gender, name, nationality, birth_city, birth_year] Index: [] CREATE TABLE "copyright" ( "id" int, "msid" int, "cid" int, primary key("id") ) 3 rows from copyright table: Empty DataFrame Columns: [id, msid, cid] Index: [] CREATE TABLE "cast" ( "id" int, "msid" int, "aid" int, "role" int, primary key("id"), foreign key("aid") references `actor`("aid"), foreign key("msid") references `copyright`("msid") ) 3 rows from cast table: Empty DataFrame Columns: [id, msid, aid, role] Index: [] CREATE TABLE "genre" ( "gid" int, "genre" text, primary key("gid") ) 3 rows from genre table: Empty DataFrame Columns: [gid, genre] Index: [] CREATE TABLE "classification" ( "id" int, "msid" int, "gid" int, primary key("id"), foreign key("gid") references `genre`("gid"), foreign key("msid") references `copyright`("msid") ) 3 rows from classification table: Empty DataFrame Columns: [id, msid, gid] Index: [] CREATE TABLE "company" ( "id" int, "name" text, "country_code" text, primary key("id") ) 3 rows from company table: Empty DataFrame Columns: [id, name, country_code] Index: [] CREATE TABLE "director" ( "did" int, "gender" text, "name" text, "nationality" text, "birth_city" text, "birth_year" int, primary key("did") ) 3 rows from director table: Empty DataFrame Columns: [did, gender, name, nationality, birth_city, birth_year] Index: [] CREATE TABLE "producer" ( "pid" int, "gender" text, "name" text, "nationality" text, "birth_city" text, "birth_year" int, primary key("pid") ) 3 rows from producer table: Empty DataFrame Columns: [pid, gender, name, nationality, birth_city, birth_year] Index: [] CREATE TABLE "directed_by" ( "id" int, "msid" int, "did" int, primary key("id"), foreign key("msid") references `copyright`("msid"), foreign key("did") references `director`("did") ) 3 rows from directed_by table: Empty DataFrame Columns: [id, msid, did] Index: [] CREATE TABLE "keyword" ( "id" int, "keyword" text, primary key("id") ) 3 rows from keyword table: Empty DataFrame Columns: [id, keyword] Index: [] CREATE TABLE "made_by" ( "id" int, "msid" int, "pid" int, primary key("id"), foreign key("msid") references `copyright`("msid"), foreign key("pid") references `producer`("pid") ) 3 rows from made_by table: Empty DataFrame Columns: [id, msid, pid] Index: [] CREATE TABLE "movie" ( "mid" int, "title" text, "release_year" int, "title_aka" text, "budget" text, primary key("mid") ) 3 rows from movie table: Empty DataFrame Columns: [mid, title, release_year, title_aka, budget] Index: [] CREATE TABLE "tags" ( "id" int, "msid" int, "kid" int, primary key("id"), foreign key("msid") references `copyright`("msid"), foreign key("kid") references `keyword`("kid") ) 3 rows from tags table: Empty DataFrame Columns: [id, msid, kid] Index: [] CREATE TABLE "tv_series" ( "sid" int, "title" text, "release_year" int, "num_of_seasons" int, "num_of_episodes" int, "title_aka" text, "budget" text, primary key("sid") ) 3 rows from tv_series table: Empty DataFrame Columns: [sid, title, release_year, num_of_seasons, num_of_episodes, title_aka, budget] Index: [] CREATE TABLE "writer" ( "wid" int, "gender" text, "name" int, "nationality" int, "num_of_episodes" int, "birth_city" text, "birth_year" int, primary key("wid") ) 3 rows from writer table: Empty DataFrame Columns: [wid, gender, name, nationality, num_of_episodes, birth_city, birth_year] Index: [] CREATE TABLE "written_by" ( "id" int, "msid" int, "wid" int, foreign key("msid") references `copyright`("msid"), foreign key("wid") references `writer`("wid") ) 3 rows from written_by table: Empty DataFrame Columns: [id, msid, wid] Index: []
imdb
What are the series featuring " Scott Foley " ?
SELECT t2.title FROM CAST AS t3 JOIN actor AS t1 ON t3.aid = t1.aid JOIN tv_series AS t2 ON t2.sid = t3.msid WHERE t1.name = "Scott Foley";
CREATE TABLE "actor" ( "aid" int, "gender" text, "name" text, "nationality" text, "birth_city" text, "birth_year" int, primary key("aid") ) 3 rows from actor table: Empty DataFrame Columns: [aid, gender, name, nationality, birth_city, birth_year] Index: [] CREATE TABLE "copyright" ( "id" int, "msid" int, "cid" int, primary key("id") ) 3 rows from copyright table: Empty DataFrame Columns: [id, msid, cid] Index: [] CREATE TABLE "cast" ( "id" int, "msid" int, "aid" int, "role" int, primary key("id"), foreign key("aid") references `actor`("aid"), foreign key("msid") references `copyright`("msid") ) 3 rows from cast table: Empty DataFrame Columns: [id, msid, aid, role] Index: [] CREATE TABLE "genre" ( "gid" int, "genre" text, primary key("gid") ) 3 rows from genre table: Empty DataFrame Columns: [gid, genre] Index: [] CREATE TABLE "classification" ( "id" int, "msid" int, "gid" int, primary key("id"), foreign key("gid") references `genre`("gid"), foreign key("msid") references `copyright`("msid") ) 3 rows from classification table: Empty DataFrame Columns: [id, msid, gid] Index: [] CREATE TABLE "company" ( "id" int, "name" text, "country_code" text, primary key("id") ) 3 rows from company table: Empty DataFrame Columns: [id, name, country_code] Index: [] CREATE TABLE "director" ( "did" int, "gender" text, "name" text, "nationality" text, "birth_city" text, "birth_year" int, primary key("did") ) 3 rows from director table: Empty DataFrame Columns: [did, gender, name, nationality, birth_city, birth_year] Index: [] CREATE TABLE "producer" ( "pid" int, "gender" text, "name" text, "nationality" text, "birth_city" text, "birth_year" int, primary key("pid") ) 3 rows from producer table: Empty DataFrame Columns: [pid, gender, name, nationality, birth_city, birth_year] Index: [] CREATE TABLE "directed_by" ( "id" int, "msid" int, "did" int, primary key("id"), foreign key("msid") references `copyright`("msid"), foreign key("did") references `director`("did") ) 3 rows from directed_by table: Empty DataFrame Columns: [id, msid, did] Index: [] CREATE TABLE "keyword" ( "id" int, "keyword" text, primary key("id") ) 3 rows from keyword table: Empty DataFrame Columns: [id, keyword] Index: [] CREATE TABLE "made_by" ( "id" int, "msid" int, "pid" int, primary key("id"), foreign key("msid") references `copyright`("msid"), foreign key("pid") references `producer`("pid") ) 3 rows from made_by table: Empty DataFrame Columns: [id, msid, pid] Index: [] CREATE TABLE "movie" ( "mid" int, "title" text, "release_year" int, "title_aka" text, "budget" text, primary key("mid") ) 3 rows from movie table: Empty DataFrame Columns: [mid, title, release_year, title_aka, budget] Index: [] CREATE TABLE "tags" ( "id" int, "msid" int, "kid" int, primary key("id"), foreign key("msid") references `copyright`("msid"), foreign key("kid") references `keyword`("kid") ) 3 rows from tags table: Empty DataFrame Columns: [id, msid, kid] Index: [] CREATE TABLE "tv_series" ( "sid" int, "title" text, "release_year" int, "num_of_seasons" int, "num_of_episodes" int, "title_aka" text, "budget" text, primary key("sid") ) 3 rows from tv_series table: Empty DataFrame Columns: [sid, title, release_year, num_of_seasons, num_of_episodes, title_aka, budget] Index: [] CREATE TABLE "writer" ( "wid" int, "gender" text, "name" int, "nationality" int, "num_of_episodes" int, "birth_city" text, "birth_year" int, primary key("wid") ) 3 rows from writer table: Empty DataFrame Columns: [wid, gender, name, nationality, num_of_episodes, birth_city, birth_year] Index: [] CREATE TABLE "written_by" ( "id" int, "msid" int, "wid" int, foreign key("msid") references `copyright`("msid"), foreign key("wid") references `writer`("wid") ) 3 rows from written_by table: Empty DataFrame Columns: [id, msid, wid] Index: []
imdb
What are the series in which " Scott Foley " is an actor ?
SELECT t2.title FROM CAST AS t3 JOIN actor AS t1 ON t3.aid = t1.aid JOIN tv_series AS t2 ON t2.sid = t3.msid WHERE t1.name = "Scott Foley";
CREATE TABLE "actor" ( "aid" int, "gender" text, "name" text, "nationality" text, "birth_city" text, "birth_year" int, primary key("aid") ) 3 rows from actor table: Empty DataFrame Columns: [aid, gender, name, nationality, birth_city, birth_year] Index: [] CREATE TABLE "copyright" ( "id" int, "msid" int, "cid" int, primary key("id") ) 3 rows from copyright table: Empty DataFrame Columns: [id, msid, cid] Index: [] CREATE TABLE "cast" ( "id" int, "msid" int, "aid" int, "role" int, primary key("id"), foreign key("aid") references `actor`("aid"), foreign key("msid") references `copyright`("msid") ) 3 rows from cast table: Empty DataFrame Columns: [id, msid, aid, role] Index: [] CREATE TABLE "genre" ( "gid" int, "genre" text, primary key("gid") ) 3 rows from genre table: Empty DataFrame Columns: [gid, genre] Index: [] CREATE TABLE "classification" ( "id" int, "msid" int, "gid" int, primary key("id"), foreign key("gid") references `genre`("gid"), foreign key("msid") references `copyright`("msid") ) 3 rows from classification table: Empty DataFrame Columns: [id, msid, gid] Index: [] CREATE TABLE "company" ( "id" int, "name" text, "country_code" text, primary key("id") ) 3 rows from company table: Empty DataFrame Columns: [id, name, country_code] Index: [] CREATE TABLE "director" ( "did" int, "gender" text, "name" text, "nationality" text, "birth_city" text, "birth_year" int, primary key("did") ) 3 rows from director table: Empty DataFrame Columns: [did, gender, name, nationality, birth_city, birth_year] Index: [] CREATE TABLE "producer" ( "pid" int, "gender" text, "name" text, "nationality" text, "birth_city" text, "birth_year" int, primary key("pid") ) 3 rows from producer table: Empty DataFrame Columns: [pid, gender, name, nationality, birth_city, birth_year] Index: [] CREATE TABLE "directed_by" ( "id" int, "msid" int, "did" int, primary key("id"), foreign key("msid") references `copyright`("msid"), foreign key("did") references `director`("did") ) 3 rows from directed_by table: Empty DataFrame Columns: [id, msid, did] Index: [] CREATE TABLE "keyword" ( "id" int, "keyword" text, primary key("id") ) 3 rows from keyword table: Empty DataFrame Columns: [id, keyword] Index: [] CREATE TABLE "made_by" ( "id" int, "msid" int, "pid" int, primary key("id"), foreign key("msid") references `copyright`("msid"), foreign key("pid") references `producer`("pid") ) 3 rows from made_by table: Empty DataFrame Columns: [id, msid, pid] Index: [] CREATE TABLE "movie" ( "mid" int, "title" text, "release_year" int, "title_aka" text, "budget" text, primary key("mid") ) 3 rows from movie table: Empty DataFrame Columns: [mid, title, release_year, title_aka, budget] Index: [] CREATE TABLE "tags" ( "id" int, "msid" int, "kid" int, primary key("id"), foreign key("msid") references `copyright`("msid"), foreign key("kid") references `keyword`("kid") ) 3 rows from tags table: Empty DataFrame Columns: [id, msid, kid] Index: [] CREATE TABLE "tv_series" ( "sid" int, "title" text, "release_year" int, "num_of_seasons" int, "num_of_episodes" int, "title_aka" text, "budget" text, primary key("sid") ) 3 rows from tv_series table: Empty DataFrame Columns: [sid, title, release_year, num_of_seasons, num_of_episodes, title_aka, budget] Index: [] CREATE TABLE "writer" ( "wid" int, "gender" text, "name" int, "nationality" int, "num_of_episodes" int, "birth_city" text, "birth_year" int, primary key("wid") ) 3 rows from writer table: Empty DataFrame Columns: [wid, gender, name, nationality, num_of_episodes, birth_city, birth_year] Index: [] CREATE TABLE "written_by" ( "id" int, "msid" int, "wid" int, foreign key("msid") references `copyright`("msid"), foreign key("wid") references `writer`("wid") ) 3 rows from written_by table: Empty DataFrame Columns: [id, msid, wid] Index: []
imdb
Find the directors of all movies featuring " Kate Winslet "
SELECT t3.name FROM CAST AS t4 JOIN actor AS t1 ON t4.aid = t1.aid JOIN movie AS t5 ON t5.mid = t4.msid JOIN directed_by AS t2 ON t5.mid = t2.msid JOIN director AS t3 ON t3.did = t2.did WHERE t1.name = "Kate Winslet";
CREATE TABLE "actor" ( "aid" int, "gender" text, "name" text, "nationality" text, "birth_city" text, "birth_year" int, primary key("aid") ) 3 rows from actor table: Empty DataFrame Columns: [aid, gender, name, nationality, birth_city, birth_year] Index: [] CREATE TABLE "copyright" ( "id" int, "msid" int, "cid" int, primary key("id") ) 3 rows from copyright table: Empty DataFrame Columns: [id, msid, cid] Index: [] CREATE TABLE "cast" ( "id" int, "msid" int, "aid" int, "role" int, primary key("id"), foreign key("aid") references `actor`("aid"), foreign key("msid") references `copyright`("msid") ) 3 rows from cast table: Empty DataFrame Columns: [id, msid, aid, role] Index: [] CREATE TABLE "genre" ( "gid" int, "genre" text, primary key("gid") ) 3 rows from genre table: Empty DataFrame Columns: [gid, genre] Index: [] CREATE TABLE "classification" ( "id" int, "msid" int, "gid" int, primary key("id"), foreign key("gid") references `genre`("gid"), foreign key("msid") references `copyright`("msid") ) 3 rows from classification table: Empty DataFrame Columns: [id, msid, gid] Index: [] CREATE TABLE "company" ( "id" int, "name" text, "country_code" text, primary key("id") ) 3 rows from company table: Empty DataFrame Columns: [id, name, country_code] Index: [] CREATE TABLE "director" ( "did" int, "gender" text, "name" text, "nationality" text, "birth_city" text, "birth_year" int, primary key("did") ) 3 rows from director table: Empty DataFrame Columns: [did, gender, name, nationality, birth_city, birth_year] Index: [] CREATE TABLE "producer" ( "pid" int, "gender" text, "name" text, "nationality" text, "birth_city" text, "birth_year" int, primary key("pid") ) 3 rows from producer table: Empty DataFrame Columns: [pid, gender, name, nationality, birth_city, birth_year] Index: [] CREATE TABLE "directed_by" ( "id" int, "msid" int, "did" int, primary key("id"), foreign key("msid") references `copyright`("msid"), foreign key("did") references `director`("did") ) 3 rows from directed_by table: Empty DataFrame Columns: [id, msid, did] Index: [] CREATE TABLE "keyword" ( "id" int, "keyword" text, primary key("id") ) 3 rows from keyword table: Empty DataFrame Columns: [id, keyword] Index: [] CREATE TABLE "made_by" ( "id" int, "msid" int, "pid" int, primary key("id"), foreign key("msid") references `copyright`("msid"), foreign key("pid") references `producer`("pid") ) 3 rows from made_by table: Empty DataFrame Columns: [id, msid, pid] Index: [] CREATE TABLE "movie" ( "mid" int, "title" text, "release_year" int, "title_aka" text, "budget" text, primary key("mid") ) 3 rows from movie table: Empty DataFrame Columns: [mid, title, release_year, title_aka, budget] Index: [] CREATE TABLE "tags" ( "id" int, "msid" int, "kid" int, primary key("id"), foreign key("msid") references `copyright`("msid"), foreign key("kid") references `keyword`("kid") ) 3 rows from tags table: Empty DataFrame Columns: [id, msid, kid] Index: [] CREATE TABLE "tv_series" ( "sid" int, "title" text, "release_year" int, "num_of_seasons" int, "num_of_episodes" int, "title_aka" text, "budget" text, primary key("sid") ) 3 rows from tv_series table: Empty DataFrame Columns: [sid, title, release_year, num_of_seasons, num_of_episodes, title_aka, budget] Index: [] CREATE TABLE "writer" ( "wid" int, "gender" text, "name" int, "nationality" int, "num_of_episodes" int, "birth_city" text, "birth_year" int, primary key("wid") ) 3 rows from writer table: Empty DataFrame Columns: [wid, gender, name, nationality, num_of_episodes, birth_city, birth_year] Index: [] CREATE TABLE "written_by" ( "id" int, "msid" int, "wid" int, foreign key("msid") references `copyright`("msid"), foreign key("wid") references `writer`("wid") ) 3 rows from written_by table: Empty DataFrame Columns: [id, msid, wid] Index: []
imdb
Find the producers of all movies in which " Kate Winslet " is an actor
SELECT t1.name FROM CAST AS t3 JOIN actor AS t2 ON t3.aid = t2.aid JOIN movie AS t5 ON t5.mid = t3.msid JOIN made_by AS t4 ON t5.mid = t4.msid JOIN producer AS t1 ON t1.pid = t4.pid WHERE t2.name = "Kate Winslet";
CREATE TABLE "actor" ( "aid" int, "gender" text, "name" text, "nationality" text, "birth_city" text, "birth_year" int, primary key("aid") ) 3 rows from actor table: Empty DataFrame Columns: [aid, gender, name, nationality, birth_city, birth_year] Index: [] CREATE TABLE "copyright" ( "id" int, "msid" int, "cid" int, primary key("id") ) 3 rows from copyright table: Empty DataFrame Columns: [id, msid, cid] Index: [] CREATE TABLE "cast" ( "id" int, "msid" int, "aid" int, "role" int, primary key("id"), foreign key("aid") references `actor`("aid"), foreign key("msid") references `copyright`("msid") ) 3 rows from cast table: Empty DataFrame Columns: [id, msid, aid, role] Index: [] CREATE TABLE "genre" ( "gid" int, "genre" text, primary key("gid") ) 3 rows from genre table: Empty DataFrame Columns: [gid, genre] Index: [] CREATE TABLE "classification" ( "id" int, "msid" int, "gid" int, primary key("id"), foreign key("gid") references `genre`("gid"), foreign key("msid") references `copyright`("msid") ) 3 rows from classification table: Empty DataFrame Columns: [id, msid, gid] Index: [] CREATE TABLE "company" ( "id" int, "name" text, "country_code" text, primary key("id") ) 3 rows from company table: Empty DataFrame Columns: [id, name, country_code] Index: [] CREATE TABLE "director" ( "did" int, "gender" text, "name" text, "nationality" text, "birth_city" text, "birth_year" int, primary key("did") ) 3 rows from director table: Empty DataFrame Columns: [did, gender, name, nationality, birth_city, birth_year] Index: [] CREATE TABLE "producer" ( "pid" int, "gender" text, "name" text, "nationality" text, "birth_city" text, "birth_year" int, primary key("pid") ) 3 rows from producer table: Empty DataFrame Columns: [pid, gender, name, nationality, birth_city, birth_year] Index: [] CREATE TABLE "directed_by" ( "id" int, "msid" int, "did" int, primary key("id"), foreign key("msid") references `copyright`("msid"), foreign key("did") references `director`("did") ) 3 rows from directed_by table: Empty DataFrame Columns: [id, msid, did] Index: [] CREATE TABLE "keyword" ( "id" int, "keyword" text, primary key("id") ) 3 rows from keyword table: Empty DataFrame Columns: [id, keyword] Index: [] CREATE TABLE "made_by" ( "id" int, "msid" int, "pid" int, primary key("id"), foreign key("msid") references `copyright`("msid"), foreign key("pid") references `producer`("pid") ) 3 rows from made_by table: Empty DataFrame Columns: [id, msid, pid] Index: [] CREATE TABLE "movie" ( "mid" int, "title" text, "release_year" int, "title_aka" text, "budget" text, primary key("mid") ) 3 rows from movie table: Empty DataFrame Columns: [mid, title, release_year, title_aka, budget] Index: [] CREATE TABLE "tags" ( "id" int, "msid" int, "kid" int, primary key("id"), foreign key("msid") references `copyright`("msid"), foreign key("kid") references `keyword`("kid") ) 3 rows from tags table: Empty DataFrame Columns: [id, msid, kid] Index: [] CREATE TABLE "tv_series" ( "sid" int, "title" text, "release_year" int, "num_of_seasons" int, "num_of_episodes" int, "title_aka" text, "budget" text, primary key("sid") ) 3 rows from tv_series table: Empty DataFrame Columns: [sid, title, release_year, num_of_seasons, num_of_episodes, title_aka, budget] Index: [] CREATE TABLE "writer" ( "wid" int, "gender" text, "name" int, "nationality" int, "num_of_episodes" int, "birth_city" text, "birth_year" int, primary key("wid") ) 3 rows from writer table: Empty DataFrame Columns: [wid, gender, name, nationality, num_of_episodes, birth_city, birth_year] Index: [] CREATE TABLE "written_by" ( "id" int, "msid" int, "wid" int, foreign key("msid") references `copyright`("msid"), foreign key("wid") references `writer`("wid") ) 3 rows from written_by table: Empty DataFrame Columns: [id, msid, wid] Index: []
imdb
Who is the director of the tv series " House of Cards " from 2013 ?
SELECT t2.name FROM director AS t2 JOIN directed_by AS t1 ON t2.did = t1.did JOIN tv_series AS t3 ON t3.sid = t1.msid WHERE t3.release_year = 2013 AND t3.title = "House of Cards";
CREATE TABLE "actor" ( "aid" int, "gender" text, "name" text, "nationality" text, "birth_city" text, "birth_year" int, primary key("aid") ) 3 rows from actor table: Empty DataFrame Columns: [aid, gender, name, nationality, birth_city, birth_year] Index: [] CREATE TABLE "copyright" ( "id" int, "msid" int, "cid" int, primary key("id") ) 3 rows from copyright table: Empty DataFrame Columns: [id, msid, cid] Index: [] CREATE TABLE "cast" ( "id" int, "msid" int, "aid" int, "role" int, primary key("id"), foreign key("aid") references `actor`("aid"), foreign key("msid") references `copyright`("msid") ) 3 rows from cast table: Empty DataFrame Columns: [id, msid, aid, role] Index: [] CREATE TABLE "genre" ( "gid" int, "genre" text, primary key("gid") ) 3 rows from genre table: Empty DataFrame Columns: [gid, genre] Index: [] CREATE TABLE "classification" ( "id" int, "msid" int, "gid" int, primary key("id"), foreign key("gid") references `genre`("gid"), foreign key("msid") references `copyright`("msid") ) 3 rows from classification table: Empty DataFrame Columns: [id, msid, gid] Index: [] CREATE TABLE "company" ( "id" int, "name" text, "country_code" text, primary key("id") ) 3 rows from company table: Empty DataFrame Columns: [id, name, country_code] Index: [] CREATE TABLE "director" ( "did" int, "gender" text, "name" text, "nationality" text, "birth_city" text, "birth_year" int, primary key("did") ) 3 rows from director table: Empty DataFrame Columns: [did, gender, name, nationality, birth_city, birth_year] Index: [] CREATE TABLE "producer" ( "pid" int, "gender" text, "name" text, "nationality" text, "birth_city" text, "birth_year" int, primary key("pid") ) 3 rows from producer table: Empty DataFrame Columns: [pid, gender, name, nationality, birth_city, birth_year] Index: [] CREATE TABLE "directed_by" ( "id" int, "msid" int, "did" int, primary key("id"), foreign key("msid") references `copyright`("msid"), foreign key("did") references `director`("did") ) 3 rows from directed_by table: Empty DataFrame Columns: [id, msid, did] Index: [] CREATE TABLE "keyword" ( "id" int, "keyword" text, primary key("id") ) 3 rows from keyword table: Empty DataFrame Columns: [id, keyword] Index: [] CREATE TABLE "made_by" ( "id" int, "msid" int, "pid" int, primary key("id"), foreign key("msid") references `copyright`("msid"), foreign key("pid") references `producer`("pid") ) 3 rows from made_by table: Empty DataFrame Columns: [id, msid, pid] Index: [] CREATE TABLE "movie" ( "mid" int, "title" text, "release_year" int, "title_aka" text, "budget" text, primary key("mid") ) 3 rows from movie table: Empty DataFrame Columns: [mid, title, release_year, title_aka, budget] Index: [] CREATE TABLE "tags" ( "id" int, "msid" int, "kid" int, primary key("id"), foreign key("msid") references `copyright`("msid"), foreign key("kid") references `keyword`("kid") ) 3 rows from tags table: Empty DataFrame Columns: [id, msid, kid] Index: [] CREATE TABLE "tv_series" ( "sid" int, "title" text, "release_year" int, "num_of_seasons" int, "num_of_episodes" int, "title_aka" text, "budget" text, primary key("sid") ) 3 rows from tv_series table: Empty DataFrame Columns: [sid, title, release_year, num_of_seasons, num_of_episodes, title_aka, budget] Index: [] CREATE TABLE "writer" ( "wid" int, "gender" text, "name" int, "nationality" int, "num_of_episodes" int, "birth_city" text, "birth_year" int, primary key("wid") ) 3 rows from writer table: Empty DataFrame Columns: [wid, gender, name, nationality, num_of_episodes, birth_city, birth_year] Index: [] CREATE TABLE "written_by" ( "id" int, "msid" int, "wid" int, foreign key("msid") references `copyright`("msid"), foreign key("wid") references `writer`("wid") ) 3 rows from written_by table: Empty DataFrame Columns: [id, msid, wid] Index: []
imdb
Find all the female actors from Austin
SELECT name FROM actor WHERE birth_city = "Austin" AND gender = "female";
CREATE TABLE "actor" ( "aid" int, "gender" text, "name" text, "nationality" text, "birth_city" text, "birth_year" int, primary key("aid") ) 3 rows from actor table: Empty DataFrame Columns: [aid, gender, name, nationality, birth_city, birth_year] Index: [] CREATE TABLE "copyright" ( "id" int, "msid" int, "cid" int, primary key("id") ) 3 rows from copyright table: Empty DataFrame Columns: [id, msid, cid] Index: [] CREATE TABLE "cast" ( "id" int, "msid" int, "aid" int, "role" int, primary key("id"), foreign key("aid") references `actor`("aid"), foreign key("msid") references `copyright`("msid") ) 3 rows from cast table: Empty DataFrame Columns: [id, msid, aid, role] Index: [] CREATE TABLE "genre" ( "gid" int, "genre" text, primary key("gid") ) 3 rows from genre table: Empty DataFrame Columns: [gid, genre] Index: [] CREATE TABLE "classification" ( "id" int, "msid" int, "gid" int, primary key("id"), foreign key("gid") references `genre`("gid"), foreign key("msid") references `copyright`("msid") ) 3 rows from classification table: Empty DataFrame Columns: [id, msid, gid] Index: [] CREATE TABLE "company" ( "id" int, "name" text, "country_code" text, primary key("id") ) 3 rows from company table: Empty DataFrame Columns: [id, name, country_code] Index: [] CREATE TABLE "director" ( "did" int, "gender" text, "name" text, "nationality" text, "birth_city" text, "birth_year" int, primary key("did") ) 3 rows from director table: Empty DataFrame Columns: [did, gender, name, nationality, birth_city, birth_year] Index: [] CREATE TABLE "producer" ( "pid" int, "gender" text, "name" text, "nationality" text, "birth_city" text, "birth_year" int, primary key("pid") ) 3 rows from producer table: Empty DataFrame Columns: [pid, gender, name, nationality, birth_city, birth_year] Index: [] CREATE TABLE "directed_by" ( "id" int, "msid" int, "did" int, primary key("id"), foreign key("msid") references `copyright`("msid"), foreign key("did") references `director`("did") ) 3 rows from directed_by table: Empty DataFrame Columns: [id, msid, did] Index: [] CREATE TABLE "keyword" ( "id" int, "keyword" text, primary key("id") ) 3 rows from keyword table: Empty DataFrame Columns: [id, keyword] Index: [] CREATE TABLE "made_by" ( "id" int, "msid" int, "pid" int, primary key("id"), foreign key("msid") references `copyright`("msid"), foreign key("pid") references `producer`("pid") ) 3 rows from made_by table: Empty DataFrame Columns: [id, msid, pid] Index: [] CREATE TABLE "movie" ( "mid" int, "title" text, "release_year" int, "title_aka" text, "budget" text, primary key("mid") ) 3 rows from movie table: Empty DataFrame Columns: [mid, title, release_year, title_aka, budget] Index: [] CREATE TABLE "tags" ( "id" int, "msid" int, "kid" int, primary key("id"), foreign key("msid") references `copyright`("msid"), foreign key("kid") references `keyword`("kid") ) 3 rows from tags table: Empty DataFrame Columns: [id, msid, kid] Index: [] CREATE TABLE "tv_series" ( "sid" int, "title" text, "release_year" int, "num_of_seasons" int, "num_of_episodes" int, "title_aka" text, "budget" text, primary key("sid") ) 3 rows from tv_series table: Empty DataFrame Columns: [sid, title, release_year, num_of_seasons, num_of_episodes, title_aka, budget] Index: [] CREATE TABLE "writer" ( "wid" int, "gender" text, "name" int, "nationality" int, "num_of_episodes" int, "birth_city" text, "birth_year" int, primary key("wid") ) 3 rows from writer table: Empty DataFrame Columns: [wid, gender, name, nationality, num_of_episodes, birth_city, birth_year] Index: [] CREATE TABLE "written_by" ( "id" int, "msid" int, "wid" int, foreign key("msid") references `copyright`("msid"), foreign key("wid") references `writer`("wid") ) 3 rows from written_by table: Empty DataFrame Columns: [id, msid, wid] Index: []
imdb
Find all actors from Italy born after 1980
SELECT name FROM actor WHERE birth_year > 1980 AND nationality = "Italy";
CREATE TABLE "actor" ( "aid" int, "gender" text, "name" text, "nationality" text, "birth_city" text, "birth_year" int, primary key("aid") ) 3 rows from actor table: Empty DataFrame Columns: [aid, gender, name, nationality, birth_city, birth_year] Index: [] CREATE TABLE "copyright" ( "id" int, "msid" int, "cid" int, primary key("id") ) 3 rows from copyright table: Empty DataFrame Columns: [id, msid, cid] Index: [] CREATE TABLE "cast" ( "id" int, "msid" int, "aid" int, "role" int, primary key("id"), foreign key("aid") references `actor`("aid"), foreign key("msid") references `copyright`("msid") ) 3 rows from cast table: Empty DataFrame Columns: [id, msid, aid, role] Index: [] CREATE TABLE "genre" ( "gid" int, "genre" text, primary key("gid") ) 3 rows from genre table: Empty DataFrame Columns: [gid, genre] Index: [] CREATE TABLE "classification" ( "id" int, "msid" int, "gid" int, primary key("id"), foreign key("gid") references `genre`("gid"), foreign key("msid") references `copyright`("msid") ) 3 rows from classification table: Empty DataFrame Columns: [id, msid, gid] Index: [] CREATE TABLE "company" ( "id" int, "name" text, "country_code" text, primary key("id") ) 3 rows from company table: Empty DataFrame Columns: [id, name, country_code] Index: [] CREATE TABLE "director" ( "did" int, "gender" text, "name" text, "nationality" text, "birth_city" text, "birth_year" int, primary key("did") ) 3 rows from director table: Empty DataFrame Columns: [did, gender, name, nationality, birth_city, birth_year] Index: [] CREATE TABLE "producer" ( "pid" int, "gender" text, "name" text, "nationality" text, "birth_city" text, "birth_year" int, primary key("pid") ) 3 rows from producer table: Empty DataFrame Columns: [pid, gender, name, nationality, birth_city, birth_year] Index: [] CREATE TABLE "directed_by" ( "id" int, "msid" int, "did" int, primary key("id"), foreign key("msid") references `copyright`("msid"), foreign key("did") references `director`("did") ) 3 rows from directed_by table: Empty DataFrame Columns: [id, msid, did] Index: [] CREATE TABLE "keyword" ( "id" int, "keyword" text, primary key("id") ) 3 rows from keyword table: Empty DataFrame Columns: [id, keyword] Index: [] CREATE TABLE "made_by" ( "id" int, "msid" int, "pid" int, primary key("id"), foreign key("msid") references `copyright`("msid"), foreign key("pid") references `producer`("pid") ) 3 rows from made_by table: Empty DataFrame Columns: [id, msid, pid] Index: [] CREATE TABLE "movie" ( "mid" int, "title" text, "release_year" int, "title_aka" text, "budget" text, primary key("mid") ) 3 rows from movie table: Empty DataFrame Columns: [mid, title, release_year, title_aka, budget] Index: [] CREATE TABLE "tags" ( "id" int, "msid" int, "kid" int, primary key("id"), foreign key("msid") references `copyright`("msid"), foreign key("kid") references `keyword`("kid") ) 3 rows from tags table: Empty DataFrame Columns: [id, msid, kid] Index: [] CREATE TABLE "tv_series" ( "sid" int, "title" text, "release_year" int, "num_of_seasons" int, "num_of_episodes" int, "title_aka" text, "budget" text, primary key("sid") ) 3 rows from tv_series table: Empty DataFrame Columns: [sid, title, release_year, num_of_seasons, num_of_episodes, title_aka, budget] Index: [] CREATE TABLE "writer" ( "wid" int, "gender" text, "name" int, "nationality" int, "num_of_episodes" int, "birth_city" text, "birth_year" int, primary key("wid") ) 3 rows from writer table: Empty DataFrame Columns: [wid, gender, name, nationality, num_of_episodes, birth_city, birth_year] Index: [] CREATE TABLE "written_by" ( "id" int, "msid" int, "wid" int, foreign key("msid") references `copyright`("msid"), foreign key("wid") references `writer`("wid") ) 3 rows from written_by table: Empty DataFrame Columns: [id, msid, wid] Index: []
imdb
Find all the female actors born in " New York City " after 1980
SELECT name FROM actor WHERE birth_city = "New York City" AND birth_year > 1980 AND gender = "female";
CREATE TABLE "actor" ( "aid" int, "gender" text, "name" text, "nationality" text, "birth_city" text, "birth_year" int, primary key("aid") ) 3 rows from actor table: Empty DataFrame Columns: [aid, gender, name, nationality, birth_city, birth_year] Index: [] CREATE TABLE "copyright" ( "id" int, "msid" int, "cid" int, primary key("id") ) 3 rows from copyright table: Empty DataFrame Columns: [id, msid, cid] Index: [] CREATE TABLE "cast" ( "id" int, "msid" int, "aid" int, "role" int, primary key("id"), foreign key("aid") references `actor`("aid"), foreign key("msid") references `copyright`("msid") ) 3 rows from cast table: Empty DataFrame Columns: [id, msid, aid, role] Index: [] CREATE TABLE "genre" ( "gid" int, "genre" text, primary key("gid") ) 3 rows from genre table: Empty DataFrame Columns: [gid, genre] Index: [] CREATE TABLE "classification" ( "id" int, "msid" int, "gid" int, primary key("id"), foreign key("gid") references `genre`("gid"), foreign key("msid") references `copyright`("msid") ) 3 rows from classification table: Empty DataFrame Columns: [id, msid, gid] Index: [] CREATE TABLE "company" ( "id" int, "name" text, "country_code" text, primary key("id") ) 3 rows from company table: Empty DataFrame Columns: [id, name, country_code] Index: [] CREATE TABLE "director" ( "did" int, "gender" text, "name" text, "nationality" text, "birth_city" text, "birth_year" int, primary key("did") ) 3 rows from director table: Empty DataFrame Columns: [did, gender, name, nationality, birth_city, birth_year] Index: [] CREATE TABLE "producer" ( "pid" int, "gender" text, "name" text, "nationality" text, "birth_city" text, "birth_year" int, primary key("pid") ) 3 rows from producer table: Empty DataFrame Columns: [pid, gender, name, nationality, birth_city, birth_year] Index: [] CREATE TABLE "directed_by" ( "id" int, "msid" int, "did" int, primary key("id"), foreign key("msid") references `copyright`("msid"), foreign key("did") references `director`("did") ) 3 rows from directed_by table: Empty DataFrame Columns: [id, msid, did] Index: [] CREATE TABLE "keyword" ( "id" int, "keyword" text, primary key("id") ) 3 rows from keyword table: Empty DataFrame Columns: [id, keyword] Index: [] CREATE TABLE "made_by" ( "id" int, "msid" int, "pid" int, primary key("id"), foreign key("msid") references `copyright`("msid"), foreign key("pid") references `producer`("pid") ) 3 rows from made_by table: Empty DataFrame Columns: [id, msid, pid] Index: [] CREATE TABLE "movie" ( "mid" int, "title" text, "release_year" int, "title_aka" text, "budget" text, primary key("mid") ) 3 rows from movie table: Empty DataFrame Columns: [mid, title, release_year, title_aka, budget] Index: [] CREATE TABLE "tags" ( "id" int, "msid" int, "kid" int, primary key("id"), foreign key("msid") references `copyright`("msid"), foreign key("kid") references `keyword`("kid") ) 3 rows from tags table: Empty DataFrame Columns: [id, msid, kid] Index: [] CREATE TABLE "tv_series" ( "sid" int, "title" text, "release_year" int, "num_of_seasons" int, "num_of_episodes" int, "title_aka" text, "budget" text, primary key("sid") ) 3 rows from tv_series table: Empty DataFrame Columns: [sid, title, release_year, num_of_seasons, num_of_episodes, title_aka, budget] Index: [] CREATE TABLE "writer" ( "wid" int, "gender" text, "name" int, "nationality" int, "num_of_episodes" int, "birth_city" text, "birth_year" int, primary key("wid") ) 3 rows from writer table: Empty DataFrame Columns: [wid, gender, name, nationality, num_of_episodes, birth_city, birth_year] Index: [] CREATE TABLE "written_by" ( "id" int, "msid" int, "wid" int, foreign key("msid") references `copyright`("msid"), foreign key("wid") references `writer`("wid") ) 3 rows from written_by table: Empty DataFrame Columns: [id, msid, wid] Index: []
imdb
Find all the female actors in the movie " Saving Private Ryan "
SELECT t1.name FROM CAST AS t2 JOIN actor AS t1 ON t2.aid = t1.aid JOIN movie AS t3 ON t3.mid = t2.msid WHERE t1.gender = "female" AND t3.title = "Saving Private Ryan";
CREATE TABLE "actor" ( "aid" int, "gender" text, "name" text, "nationality" text, "birth_city" text, "birth_year" int, primary key("aid") ) 3 rows from actor table: Empty DataFrame Columns: [aid, gender, name, nationality, birth_city, birth_year] Index: [] CREATE TABLE "copyright" ( "id" int, "msid" int, "cid" int, primary key("id") ) 3 rows from copyright table: Empty DataFrame Columns: [id, msid, cid] Index: [] CREATE TABLE "cast" ( "id" int, "msid" int, "aid" int, "role" int, primary key("id"), foreign key("aid") references `actor`("aid"), foreign key("msid") references `copyright`("msid") ) 3 rows from cast table: Empty DataFrame Columns: [id, msid, aid, role] Index: [] CREATE TABLE "genre" ( "gid" int, "genre" text, primary key("gid") ) 3 rows from genre table: Empty DataFrame Columns: [gid, genre] Index: [] CREATE TABLE "classification" ( "id" int, "msid" int, "gid" int, primary key("id"), foreign key("gid") references `genre`("gid"), foreign key("msid") references `copyright`("msid") ) 3 rows from classification table: Empty DataFrame Columns: [id, msid, gid] Index: [] CREATE TABLE "company" ( "id" int, "name" text, "country_code" text, primary key("id") ) 3 rows from company table: Empty DataFrame Columns: [id, name, country_code] Index: [] CREATE TABLE "director" ( "did" int, "gender" text, "name" text, "nationality" text, "birth_city" text, "birth_year" int, primary key("did") ) 3 rows from director table: Empty DataFrame Columns: [did, gender, name, nationality, birth_city, birth_year] Index: [] CREATE TABLE "producer" ( "pid" int, "gender" text, "name" text, "nationality" text, "birth_city" text, "birth_year" int, primary key("pid") ) 3 rows from producer table: Empty DataFrame Columns: [pid, gender, name, nationality, birth_city, birth_year] Index: [] CREATE TABLE "directed_by" ( "id" int, "msid" int, "did" int, primary key("id"), foreign key("msid") references `copyright`("msid"), foreign key("did") references `director`("did") ) 3 rows from directed_by table: Empty DataFrame Columns: [id, msid, did] Index: [] CREATE TABLE "keyword" ( "id" int, "keyword" text, primary key("id") ) 3 rows from keyword table: Empty DataFrame Columns: [id, keyword] Index: [] CREATE TABLE "made_by" ( "id" int, "msid" int, "pid" int, primary key("id"), foreign key("msid") references `copyright`("msid"), foreign key("pid") references `producer`("pid") ) 3 rows from made_by table: Empty DataFrame Columns: [id, msid, pid] Index: [] CREATE TABLE "movie" ( "mid" int, "title" text, "release_year" int, "title_aka" text, "budget" text, primary key("mid") ) 3 rows from movie table: Empty DataFrame Columns: [mid, title, release_year, title_aka, budget] Index: [] CREATE TABLE "tags" ( "id" int, "msid" int, "kid" int, primary key("id"), foreign key("msid") references `copyright`("msid"), foreign key("kid") references `keyword`("kid") ) 3 rows from tags table: Empty DataFrame Columns: [id, msid, kid] Index: [] CREATE TABLE "tv_series" ( "sid" int, "title" text, "release_year" int, "num_of_seasons" int, "num_of_episodes" int, "title_aka" text, "budget" text, primary key("sid") ) 3 rows from tv_series table: Empty DataFrame Columns: [sid, title, release_year, num_of_seasons, num_of_episodes, title_aka, budget] Index: [] CREATE TABLE "writer" ( "wid" int, "gender" text, "name" int, "nationality" int, "num_of_episodes" int, "birth_city" text, "birth_year" int, primary key("wid") ) 3 rows from writer table: Empty DataFrame Columns: [wid, gender, name, nationality, num_of_episodes, birth_city, birth_year] Index: [] CREATE TABLE "written_by" ( "id" int, "msid" int, "wid" int, foreign key("msid") references `copyright`("msid"), foreign key("wid") references `writer`("wid") ) 3 rows from written_by table: Empty DataFrame Columns: [id, msid, wid] Index: []
imdb
Find all the directors who are from Afghanistan
SELECT name FROM director WHERE nationality = "Afghanistan";
CREATE TABLE "actor" ( "aid" int, "gender" text, "name" text, "nationality" text, "birth_city" text, "birth_year" int, primary key("aid") ) 3 rows from actor table: Empty DataFrame Columns: [aid, gender, name, nationality, birth_city, birth_year] Index: [] CREATE TABLE "copyright" ( "id" int, "msid" int, "cid" int, primary key("id") ) 3 rows from copyright table: Empty DataFrame Columns: [id, msid, cid] Index: [] CREATE TABLE "cast" ( "id" int, "msid" int, "aid" int, "role" int, primary key("id"), foreign key("aid") references `actor`("aid"), foreign key("msid") references `copyright`("msid") ) 3 rows from cast table: Empty DataFrame Columns: [id, msid, aid, role] Index: [] CREATE TABLE "genre" ( "gid" int, "genre" text, primary key("gid") ) 3 rows from genre table: Empty DataFrame Columns: [gid, genre] Index: [] CREATE TABLE "classification" ( "id" int, "msid" int, "gid" int, primary key("id"), foreign key("gid") references `genre`("gid"), foreign key("msid") references `copyright`("msid") ) 3 rows from classification table: Empty DataFrame Columns: [id, msid, gid] Index: [] CREATE TABLE "company" ( "id" int, "name" text, "country_code" text, primary key("id") ) 3 rows from company table: Empty DataFrame Columns: [id, name, country_code] Index: [] CREATE TABLE "director" ( "did" int, "gender" text, "name" text, "nationality" text, "birth_city" text, "birth_year" int, primary key("did") ) 3 rows from director table: Empty DataFrame Columns: [did, gender, name, nationality, birth_city, birth_year] Index: [] CREATE TABLE "producer" ( "pid" int, "gender" text, "name" text, "nationality" text, "birth_city" text, "birth_year" int, primary key("pid") ) 3 rows from producer table: Empty DataFrame Columns: [pid, gender, name, nationality, birth_city, birth_year] Index: [] CREATE TABLE "directed_by" ( "id" int, "msid" int, "did" int, primary key("id"), foreign key("msid") references `copyright`("msid"), foreign key("did") references `director`("did") ) 3 rows from directed_by table: Empty DataFrame Columns: [id, msid, did] Index: [] CREATE TABLE "keyword" ( "id" int, "keyword" text, primary key("id") ) 3 rows from keyword table: Empty DataFrame Columns: [id, keyword] Index: [] CREATE TABLE "made_by" ( "id" int, "msid" int, "pid" int, primary key("id"), foreign key("msid") references `copyright`("msid"), foreign key("pid") references `producer`("pid") ) 3 rows from made_by table: Empty DataFrame Columns: [id, msid, pid] Index: [] CREATE TABLE "movie" ( "mid" int, "title" text, "release_year" int, "title_aka" text, "budget" text, primary key("mid") ) 3 rows from movie table: Empty DataFrame Columns: [mid, title, release_year, title_aka, budget] Index: [] CREATE TABLE "tags" ( "id" int, "msid" int, "kid" int, primary key("id"), foreign key("msid") references `copyright`("msid"), foreign key("kid") references `keyword`("kid") ) 3 rows from tags table: Empty DataFrame Columns: [id, msid, kid] Index: [] CREATE TABLE "tv_series" ( "sid" int, "title" text, "release_year" int, "num_of_seasons" int, "num_of_episodes" int, "title_aka" text, "budget" text, primary key("sid") ) 3 rows from tv_series table: Empty DataFrame Columns: [sid, title, release_year, num_of_seasons, num_of_episodes, title_aka, budget] Index: [] CREATE TABLE "writer" ( "wid" int, "gender" text, "name" int, "nationality" int, "num_of_episodes" int, "birth_city" text, "birth_year" int, primary key("wid") ) 3 rows from writer table: Empty DataFrame Columns: [wid, gender, name, nationality, num_of_episodes, birth_city, birth_year] Index: [] CREATE TABLE "written_by" ( "id" int, "msid" int, "wid" int, foreign key("msid") references `copyright`("msid"), foreign key("wid") references `writer`("wid") ) 3 rows from written_by table: Empty DataFrame Columns: [id, msid, wid] Index: []
imdb
Find the actors who played in the movie " Camp X-Ray "
SELECT t1.name FROM CAST AS t2 JOIN actor AS t1 ON t2.aid = t1.aid JOIN movie AS t3 ON t3.mid = t2.msid WHERE t3.title = "Camp X-Ray";
CREATE TABLE "actor" ( "aid" int, "gender" text, "name" text, "nationality" text, "birth_city" text, "birth_year" int, primary key("aid") ) 3 rows from actor table: Empty DataFrame Columns: [aid, gender, name, nationality, birth_city, birth_year] Index: [] CREATE TABLE "copyright" ( "id" int, "msid" int, "cid" int, primary key("id") ) 3 rows from copyright table: Empty DataFrame Columns: [id, msid, cid] Index: [] CREATE TABLE "cast" ( "id" int, "msid" int, "aid" int, "role" int, primary key("id"), foreign key("aid") references `actor`("aid"), foreign key("msid") references `copyright`("msid") ) 3 rows from cast table: Empty DataFrame Columns: [id, msid, aid, role] Index: [] CREATE TABLE "genre" ( "gid" int, "genre" text, primary key("gid") ) 3 rows from genre table: Empty DataFrame Columns: [gid, genre] Index: [] CREATE TABLE "classification" ( "id" int, "msid" int, "gid" int, primary key("id"), foreign key("gid") references `genre`("gid"), foreign key("msid") references `copyright`("msid") ) 3 rows from classification table: Empty DataFrame Columns: [id, msid, gid] Index: [] CREATE TABLE "company" ( "id" int, "name" text, "country_code" text, primary key("id") ) 3 rows from company table: Empty DataFrame Columns: [id, name, country_code] Index: [] CREATE TABLE "director" ( "did" int, "gender" text, "name" text, "nationality" text, "birth_city" text, "birth_year" int, primary key("did") ) 3 rows from director table: Empty DataFrame Columns: [did, gender, name, nationality, birth_city, birth_year] Index: [] CREATE TABLE "producer" ( "pid" int, "gender" text, "name" text, "nationality" text, "birth_city" text, "birth_year" int, primary key("pid") ) 3 rows from producer table: Empty DataFrame Columns: [pid, gender, name, nationality, birth_city, birth_year] Index: [] CREATE TABLE "directed_by" ( "id" int, "msid" int, "did" int, primary key("id"), foreign key("msid") references `copyright`("msid"), foreign key("did") references `director`("did") ) 3 rows from directed_by table: Empty DataFrame Columns: [id, msid, did] Index: [] CREATE TABLE "keyword" ( "id" int, "keyword" text, primary key("id") ) 3 rows from keyword table: Empty DataFrame Columns: [id, keyword] Index: [] CREATE TABLE "made_by" ( "id" int, "msid" int, "pid" int, primary key("id"), foreign key("msid") references `copyright`("msid"), foreign key("pid") references `producer`("pid") ) 3 rows from made_by table: Empty DataFrame Columns: [id, msid, pid] Index: [] CREATE TABLE "movie" ( "mid" int, "title" text, "release_year" int, "title_aka" text, "budget" text, primary key("mid") ) 3 rows from movie table: Empty DataFrame Columns: [mid, title, release_year, title_aka, budget] Index: [] CREATE TABLE "tags" ( "id" int, "msid" int, "kid" int, primary key("id"), foreign key("msid") references `copyright`("msid"), foreign key("kid") references `keyword`("kid") ) 3 rows from tags table: Empty DataFrame Columns: [id, msid, kid] Index: [] CREATE TABLE "tv_series" ( "sid" int, "title" text, "release_year" int, "num_of_seasons" int, "num_of_episodes" int, "title_aka" text, "budget" text, primary key("sid") ) 3 rows from tv_series table: Empty DataFrame Columns: [sid, title, release_year, num_of_seasons, num_of_episodes, title_aka, budget] Index: [] CREATE TABLE "writer" ( "wid" int, "gender" text, "name" int, "nationality" int, "num_of_episodes" int, "birth_city" text, "birth_year" int, primary key("wid") ) 3 rows from writer table: Empty DataFrame Columns: [wid, gender, name, nationality, num_of_episodes, birth_city, birth_year] Index: [] CREATE TABLE "written_by" ( "id" int, "msid" int, "wid" int, foreign key("msid") references `copyright`("msid"), foreign key("wid") references `writer`("wid") ) 3 rows from written_by table: Empty DataFrame Columns: [id, msid, wid] Index: []
imdb
Find all actors from Canada who acted in " James Bond " movies
SELECT t1.name FROM CAST AS t2 JOIN actor AS t1 ON t2.aid = t1.aid JOIN movie AS t3 ON t3.mid = t2.msid WHERE t1.nationality = "Canada" AND t3.title = "James Bond";
CREATE TABLE "actor" ( "aid" int, "gender" text, "name" text, "nationality" text, "birth_city" text, "birth_year" int, primary key("aid") ) 3 rows from actor table: Empty DataFrame Columns: [aid, gender, name, nationality, birth_city, birth_year] Index: [] CREATE TABLE "copyright" ( "id" int, "msid" int, "cid" int, primary key("id") ) 3 rows from copyright table: Empty DataFrame Columns: [id, msid, cid] Index: [] CREATE TABLE "cast" ( "id" int, "msid" int, "aid" int, "role" int, primary key("id"), foreign key("aid") references `actor`("aid"), foreign key("msid") references `copyright`("msid") ) 3 rows from cast table: Empty DataFrame Columns: [id, msid, aid, role] Index: [] CREATE TABLE "genre" ( "gid" int, "genre" text, primary key("gid") ) 3 rows from genre table: Empty DataFrame Columns: [gid, genre] Index: [] CREATE TABLE "classification" ( "id" int, "msid" int, "gid" int, primary key("id"), foreign key("gid") references `genre`("gid"), foreign key("msid") references `copyright`("msid") ) 3 rows from classification table: Empty DataFrame Columns: [id, msid, gid] Index: [] CREATE TABLE "company" ( "id" int, "name" text, "country_code" text, primary key("id") ) 3 rows from company table: Empty DataFrame Columns: [id, name, country_code] Index: [] CREATE TABLE "director" ( "did" int, "gender" text, "name" text, "nationality" text, "birth_city" text, "birth_year" int, primary key("did") ) 3 rows from director table: Empty DataFrame Columns: [did, gender, name, nationality, birth_city, birth_year] Index: [] CREATE TABLE "producer" ( "pid" int, "gender" text, "name" text, "nationality" text, "birth_city" text, "birth_year" int, primary key("pid") ) 3 rows from producer table: Empty DataFrame Columns: [pid, gender, name, nationality, birth_city, birth_year] Index: [] CREATE TABLE "directed_by" ( "id" int, "msid" int, "did" int, primary key("id"), foreign key("msid") references `copyright`("msid"), foreign key("did") references `director`("did") ) 3 rows from directed_by table: Empty DataFrame Columns: [id, msid, did] Index: [] CREATE TABLE "keyword" ( "id" int, "keyword" text, primary key("id") ) 3 rows from keyword table: Empty DataFrame Columns: [id, keyword] Index: [] CREATE TABLE "made_by" ( "id" int, "msid" int, "pid" int, primary key("id"), foreign key("msid") references `copyright`("msid"), foreign key("pid") references `producer`("pid") ) 3 rows from made_by table: Empty DataFrame Columns: [id, msid, pid] Index: [] CREATE TABLE "movie" ( "mid" int, "title" text, "release_year" int, "title_aka" text, "budget" text, primary key("mid") ) 3 rows from movie table: Empty DataFrame Columns: [mid, title, release_year, title_aka, budget] Index: [] CREATE TABLE "tags" ( "id" int, "msid" int, "kid" int, primary key("id"), foreign key("msid") references `copyright`("msid"), foreign key("kid") references `keyword`("kid") ) 3 rows from tags table: Empty DataFrame Columns: [id, msid, kid] Index: [] CREATE TABLE "tv_series" ( "sid" int, "title" text, "release_year" int, "num_of_seasons" int, "num_of_episodes" int, "title_aka" text, "budget" text, primary key("sid") ) 3 rows from tv_series table: Empty DataFrame Columns: [sid, title, release_year, num_of_seasons, num_of_episodes, title_aka, budget] Index: [] CREATE TABLE "writer" ( "wid" int, "gender" text, "name" int, "nationality" int, "num_of_episodes" int, "birth_city" text, "birth_year" int, primary key("wid") ) 3 rows from writer table: Empty DataFrame Columns: [wid, gender, name, nationality, num_of_episodes, birth_city, birth_year] Index: [] CREATE TABLE "written_by" ( "id" int, "msid" int, "wid" int, foreign key("msid") references `copyright`("msid"), foreign key("wid") references `writer`("wid") ) 3 rows from written_by table: Empty DataFrame Columns: [id, msid, wid] Index: []
imdb
find all films in which " Rowan Atkinson " acted as " Mr. Bean "
SELECT t2.title FROM CAST AS t3 JOIN actor AS t1 ON t3.aid = t1.aid JOIN movie AS t2 ON t2.mid = t3.msid WHERE t1.name = "Rowan Atkinson" AND t3.role = "Mr. Bean";
CREATE TABLE "actor" ( "aid" int, "gender" text, "name" text, "nationality" text, "birth_city" text, "birth_year" int, primary key("aid") ) 3 rows from actor table: Empty DataFrame Columns: [aid, gender, name, nationality, birth_city, birth_year] Index: [] CREATE TABLE "copyright" ( "id" int, "msid" int, "cid" int, primary key("id") ) 3 rows from copyright table: Empty DataFrame Columns: [id, msid, cid] Index: [] CREATE TABLE "cast" ( "id" int, "msid" int, "aid" int, "role" int, primary key("id"), foreign key("aid") references `actor`("aid"), foreign key("msid") references `copyright`("msid") ) 3 rows from cast table: Empty DataFrame Columns: [id, msid, aid, role] Index: [] CREATE TABLE "genre" ( "gid" int, "genre" text, primary key("gid") ) 3 rows from genre table: Empty DataFrame Columns: [gid, genre] Index: [] CREATE TABLE "classification" ( "id" int, "msid" int, "gid" int, primary key("id"), foreign key("gid") references `genre`("gid"), foreign key("msid") references `copyright`("msid") ) 3 rows from classification table: Empty DataFrame Columns: [id, msid, gid] Index: [] CREATE TABLE "company" ( "id" int, "name" text, "country_code" text, primary key("id") ) 3 rows from company table: Empty DataFrame Columns: [id, name, country_code] Index: [] CREATE TABLE "director" ( "did" int, "gender" text, "name" text, "nationality" text, "birth_city" text, "birth_year" int, primary key("did") ) 3 rows from director table: Empty DataFrame Columns: [did, gender, name, nationality, birth_city, birth_year] Index: [] CREATE TABLE "producer" ( "pid" int, "gender" text, "name" text, "nationality" text, "birth_city" text, "birth_year" int, primary key("pid") ) 3 rows from producer table: Empty DataFrame Columns: [pid, gender, name, nationality, birth_city, birth_year] Index: [] CREATE TABLE "directed_by" ( "id" int, "msid" int, "did" int, primary key("id"), foreign key("msid") references `copyright`("msid"), foreign key("did") references `director`("did") ) 3 rows from directed_by table: Empty DataFrame Columns: [id, msid, did] Index: [] CREATE TABLE "keyword" ( "id" int, "keyword" text, primary key("id") ) 3 rows from keyword table: Empty DataFrame Columns: [id, keyword] Index: [] CREATE TABLE "made_by" ( "id" int, "msid" int, "pid" int, primary key("id"), foreign key("msid") references `copyright`("msid"), foreign key("pid") references `producer`("pid") ) 3 rows from made_by table: Empty DataFrame Columns: [id, msid, pid] Index: [] CREATE TABLE "movie" ( "mid" int, "title" text, "release_year" int, "title_aka" text, "budget" text, primary key("mid") ) 3 rows from movie table: Empty DataFrame Columns: [mid, title, release_year, title_aka, budget] Index: [] CREATE TABLE "tags" ( "id" int, "msid" int, "kid" int, primary key("id"), foreign key("msid") references `copyright`("msid"), foreign key("kid") references `keyword`("kid") ) 3 rows from tags table: Empty DataFrame Columns: [id, msid, kid] Index: [] CREATE TABLE "tv_series" ( "sid" int, "title" text, "release_year" int, "num_of_seasons" int, "num_of_episodes" int, "title_aka" text, "budget" text, primary key("sid") ) 3 rows from tv_series table: Empty DataFrame Columns: [sid, title, release_year, num_of_seasons, num_of_episodes, title_aka, budget] Index: [] CREATE TABLE "writer" ( "wid" int, "gender" text, "name" int, "nationality" int, "num_of_episodes" int, "birth_city" text, "birth_year" int, primary key("wid") ) 3 rows from writer table: Empty DataFrame Columns: [wid, gender, name, nationality, num_of_episodes, birth_city, birth_year] Index: [] CREATE TABLE "written_by" ( "id" int, "msid" int, "wid" int, foreign key("msid") references `copyright`("msid"), foreign key("wid") references `writer`("wid") ) 3 rows from written_by table: Empty DataFrame Columns: [id, msid, wid] Index: []
imdb
where is the director of " The Past " from
SELECT t2.birth_city FROM director AS t2 JOIN directed_by AS t1 ON t2.did = t1.did JOIN movie AS t3 ON t3.mid = t1.msid WHERE t3.title = "The Past";
CREATE TABLE "actor" ( "aid" int, "gender" text, "name" text, "nationality" text, "birth_city" text, "birth_year" int, primary key("aid") ) 3 rows from actor table: Empty DataFrame Columns: [aid, gender, name, nationality, birth_city, birth_year] Index: [] CREATE TABLE "copyright" ( "id" int, "msid" int, "cid" int, primary key("id") ) 3 rows from copyright table: Empty DataFrame Columns: [id, msid, cid] Index: [] CREATE TABLE "cast" ( "id" int, "msid" int, "aid" int, "role" int, primary key("id"), foreign key("aid") references `actor`("aid"), foreign key("msid") references `copyright`("msid") ) 3 rows from cast table: Empty DataFrame Columns: [id, msid, aid, role] Index: [] CREATE TABLE "genre" ( "gid" int, "genre" text, primary key("gid") ) 3 rows from genre table: Empty DataFrame Columns: [gid, genre] Index: [] CREATE TABLE "classification" ( "id" int, "msid" int, "gid" int, primary key("id"), foreign key("gid") references `genre`("gid"), foreign key("msid") references `copyright`("msid") ) 3 rows from classification table: Empty DataFrame Columns: [id, msid, gid] Index: [] CREATE TABLE "company" ( "id" int, "name" text, "country_code" text, primary key("id") ) 3 rows from company table: Empty DataFrame Columns: [id, name, country_code] Index: [] CREATE TABLE "director" ( "did" int, "gender" text, "name" text, "nationality" text, "birth_city" text, "birth_year" int, primary key("did") ) 3 rows from director table: Empty DataFrame Columns: [did, gender, name, nationality, birth_city, birth_year] Index: [] CREATE TABLE "producer" ( "pid" int, "gender" text, "name" text, "nationality" text, "birth_city" text, "birth_year" int, primary key("pid") ) 3 rows from producer table: Empty DataFrame Columns: [pid, gender, name, nationality, birth_city, birth_year] Index: [] CREATE TABLE "directed_by" ( "id" int, "msid" int, "did" int, primary key("id"), foreign key("msid") references `copyright`("msid"), foreign key("did") references `director`("did") ) 3 rows from directed_by table: Empty DataFrame Columns: [id, msid, did] Index: [] CREATE TABLE "keyword" ( "id" int, "keyword" text, primary key("id") ) 3 rows from keyword table: Empty DataFrame Columns: [id, keyword] Index: [] CREATE TABLE "made_by" ( "id" int, "msid" int, "pid" int, primary key("id"), foreign key("msid") references `copyright`("msid"), foreign key("pid") references `producer`("pid") ) 3 rows from made_by table: Empty DataFrame Columns: [id, msid, pid] Index: [] CREATE TABLE "movie" ( "mid" int, "title" text, "release_year" int, "title_aka" text, "budget" text, primary key("mid") ) 3 rows from movie table: Empty DataFrame Columns: [mid, title, release_year, title_aka, budget] Index: [] CREATE TABLE "tags" ( "id" int, "msid" int, "kid" int, primary key("id"), foreign key("msid") references `copyright`("msid"), foreign key("kid") references `keyword`("kid") ) 3 rows from tags table: Empty DataFrame Columns: [id, msid, kid] Index: [] CREATE TABLE "tv_series" ( "sid" int, "title" text, "release_year" int, "num_of_seasons" int, "num_of_episodes" int, "title_aka" text, "budget" text, primary key("sid") ) 3 rows from tv_series table: Empty DataFrame Columns: [sid, title, release_year, num_of_seasons, num_of_episodes, title_aka, budget] Index: [] CREATE TABLE "writer" ( "wid" int, "gender" text, "name" int, "nationality" int, "num_of_episodes" int, "birth_city" text, "birth_year" int, primary key("wid") ) 3 rows from writer table: Empty DataFrame Columns: [wid, gender, name, nationality, num_of_episodes, birth_city, birth_year] Index: [] CREATE TABLE "written_by" ( "id" int, "msid" int, "wid" int, foreign key("msid") references `copyright`("msid"), foreign key("wid") references `writer`("wid") ) 3 rows from written_by table: Empty DataFrame Columns: [id, msid, wid] Index: []
imdb
who acted the role of " Mr. Bean "
SELECT t1.name FROM CAST AS t2 JOIN actor AS t1 ON t2.aid = t1.aid WHERE t2.role = "Mr. Bean";
CREATE TABLE "actor" ( "aid" int, "gender" text, "name" text, "nationality" text, "birth_city" text, "birth_year" int, primary key("aid") ) 3 rows from actor table: Empty DataFrame Columns: [aid, gender, name, nationality, birth_city, birth_year] Index: [] CREATE TABLE "copyright" ( "id" int, "msid" int, "cid" int, primary key("id") ) 3 rows from copyright table: Empty DataFrame Columns: [id, msid, cid] Index: [] CREATE TABLE "cast" ( "id" int, "msid" int, "aid" int, "role" int, primary key("id"), foreign key("aid") references `actor`("aid"), foreign key("msid") references `copyright`("msid") ) 3 rows from cast table: Empty DataFrame Columns: [id, msid, aid, role] Index: [] CREATE TABLE "genre" ( "gid" int, "genre" text, primary key("gid") ) 3 rows from genre table: Empty DataFrame Columns: [gid, genre] Index: [] CREATE TABLE "classification" ( "id" int, "msid" int, "gid" int, primary key("id"), foreign key("gid") references `genre`("gid"), foreign key("msid") references `copyright`("msid") ) 3 rows from classification table: Empty DataFrame Columns: [id, msid, gid] Index: [] CREATE TABLE "company" ( "id" int, "name" text, "country_code" text, primary key("id") ) 3 rows from company table: Empty DataFrame Columns: [id, name, country_code] Index: [] CREATE TABLE "director" ( "did" int, "gender" text, "name" text, "nationality" text, "birth_city" text, "birth_year" int, primary key("did") ) 3 rows from director table: Empty DataFrame Columns: [did, gender, name, nationality, birth_city, birth_year] Index: [] CREATE TABLE "producer" ( "pid" int, "gender" text, "name" text, "nationality" text, "birth_city" text, "birth_year" int, primary key("pid") ) 3 rows from producer table: Empty DataFrame Columns: [pid, gender, name, nationality, birth_city, birth_year] Index: [] CREATE TABLE "directed_by" ( "id" int, "msid" int, "did" int, primary key("id"), foreign key("msid") references `copyright`("msid"), foreign key("did") references `director`("did") ) 3 rows from directed_by table: Empty DataFrame Columns: [id, msid, did] Index: [] CREATE TABLE "keyword" ( "id" int, "keyword" text, primary key("id") ) 3 rows from keyword table: Empty DataFrame Columns: [id, keyword] Index: [] CREATE TABLE "made_by" ( "id" int, "msid" int, "pid" int, primary key("id"), foreign key("msid") references `copyright`("msid"), foreign key("pid") references `producer`("pid") ) 3 rows from made_by table: Empty DataFrame Columns: [id, msid, pid] Index: [] CREATE TABLE "movie" ( "mid" int, "title" text, "release_year" int, "title_aka" text, "budget" text, primary key("mid") ) 3 rows from movie table: Empty DataFrame Columns: [mid, title, release_year, title_aka, budget] Index: [] CREATE TABLE "tags" ( "id" int, "msid" int, "kid" int, primary key("id"), foreign key("msid") references `copyright`("msid"), foreign key("kid") references `keyword`("kid") ) 3 rows from tags table: Empty DataFrame Columns: [id, msid, kid] Index: [] CREATE TABLE "tv_series" ( "sid" int, "title" text, "release_year" int, "num_of_seasons" int, "num_of_episodes" int, "title_aka" text, "budget" text, primary key("sid") ) 3 rows from tv_series table: Empty DataFrame Columns: [sid, title, release_year, num_of_seasons, num_of_episodes, title_aka, budget] Index: [] CREATE TABLE "writer" ( "wid" int, "gender" text, "name" int, "nationality" int, "num_of_episodes" int, "birth_city" text, "birth_year" int, primary key("wid") ) 3 rows from writer table: Empty DataFrame Columns: [wid, gender, name, nationality, num_of_episodes, birth_city, birth_year] Index: [] CREATE TABLE "written_by" ( "id" int, "msid" int, "wid" int, foreign key("msid") references `copyright`("msid"), foreign key("wid") references `writer`("wid") ) 3 rows from written_by table: Empty DataFrame Columns: [id, msid, wid] Index: []
imdb
what are the genres of movies directed by " Asghar Farhadi "
SELECT t3.genre FROM director AS t5 JOIN directed_by AS t2 ON t5.did = t2.did JOIN movie AS t4 ON t4.mid = t2.msid JOIN classification AS t1 ON t4.mid = t1.msid JOIN genre AS t3 ON t3.gid = t1.gid WHERE t5.name = "Asghar Farhadi";
CREATE TABLE "actor" ( "aid" int, "gender" text, "name" text, "nationality" text, "birth_city" text, "birth_year" int, primary key("aid") ) 3 rows from actor table: Empty DataFrame Columns: [aid, gender, name, nationality, birth_city, birth_year] Index: [] CREATE TABLE "copyright" ( "id" int, "msid" int, "cid" int, primary key("id") ) 3 rows from copyright table: Empty DataFrame Columns: [id, msid, cid] Index: [] CREATE TABLE "cast" ( "id" int, "msid" int, "aid" int, "role" int, primary key("id"), foreign key("aid") references `actor`("aid"), foreign key("msid") references `copyright`("msid") ) 3 rows from cast table: Empty DataFrame Columns: [id, msid, aid, role] Index: [] CREATE TABLE "genre" ( "gid" int, "genre" text, primary key("gid") ) 3 rows from genre table: Empty DataFrame Columns: [gid, genre] Index: [] CREATE TABLE "classification" ( "id" int, "msid" int, "gid" int, primary key("id"), foreign key("gid") references `genre`("gid"), foreign key("msid") references `copyright`("msid") ) 3 rows from classification table: Empty DataFrame Columns: [id, msid, gid] Index: [] CREATE TABLE "company" ( "id" int, "name" text, "country_code" text, primary key("id") ) 3 rows from company table: Empty DataFrame Columns: [id, name, country_code] Index: [] CREATE TABLE "director" ( "did" int, "gender" text, "name" text, "nationality" text, "birth_city" text, "birth_year" int, primary key("did") ) 3 rows from director table: Empty DataFrame Columns: [did, gender, name, nationality, birth_city, birth_year] Index: [] CREATE TABLE "producer" ( "pid" int, "gender" text, "name" text, "nationality" text, "birth_city" text, "birth_year" int, primary key("pid") ) 3 rows from producer table: Empty DataFrame Columns: [pid, gender, name, nationality, birth_city, birth_year] Index: [] CREATE TABLE "directed_by" ( "id" int, "msid" int, "did" int, primary key("id"), foreign key("msid") references `copyright`("msid"), foreign key("did") references `director`("did") ) 3 rows from directed_by table: Empty DataFrame Columns: [id, msid, did] Index: [] CREATE TABLE "keyword" ( "id" int, "keyword" text, primary key("id") ) 3 rows from keyword table: Empty DataFrame Columns: [id, keyword] Index: [] CREATE TABLE "made_by" ( "id" int, "msid" int, "pid" int, primary key("id"), foreign key("msid") references `copyright`("msid"), foreign key("pid") references `producer`("pid") ) 3 rows from made_by table: Empty DataFrame Columns: [id, msid, pid] Index: [] CREATE TABLE "movie" ( "mid" int, "title" text, "release_year" int, "title_aka" text, "budget" text, primary key("mid") ) 3 rows from movie table: Empty DataFrame Columns: [mid, title, release_year, title_aka, budget] Index: [] CREATE TABLE "tags" ( "id" int, "msid" int, "kid" int, primary key("id"), foreign key("msid") references `copyright`("msid"), foreign key("kid") references `keyword`("kid") ) 3 rows from tags table: Empty DataFrame Columns: [id, msid, kid] Index: [] CREATE TABLE "tv_series" ( "sid" int, "title" text, "release_year" int, "num_of_seasons" int, "num_of_episodes" int, "title_aka" text, "budget" text, primary key("sid") ) 3 rows from tv_series table: Empty DataFrame Columns: [sid, title, release_year, num_of_seasons, num_of_episodes, title_aka, budget] Index: [] CREATE TABLE "writer" ( "wid" int, "gender" text, "name" int, "nationality" int, "num_of_episodes" int, "birth_city" text, "birth_year" int, primary key("wid") ) 3 rows from writer table: Empty DataFrame Columns: [wid, gender, name, nationality, num_of_episodes, birth_city, birth_year] Index: [] CREATE TABLE "written_by" ( "id" int, "msid" int, "wid" int, foreign key("msid") references `copyright`("msid"), foreign key("wid") references `writer`("wid") ) 3 rows from written_by table: Empty DataFrame Columns: [id, msid, wid] Index: []
imdb
Which movie had the character " Daffy Duck "
SELECT t1.title FROM movie AS t1 JOIN CAST AS t2 ON t1.mid = t2.msid WHERE t2.role = "Daffy Duck";
CREATE TABLE "actor" ( "aid" int, "gender" text, "name" text, "nationality" text, "birth_city" text, "birth_year" int, primary key("aid") ) 3 rows from actor table: Empty DataFrame Columns: [aid, gender, name, nationality, birth_city, birth_year] Index: [] CREATE TABLE "copyright" ( "id" int, "msid" int, "cid" int, primary key("id") ) 3 rows from copyright table: Empty DataFrame Columns: [id, msid, cid] Index: [] CREATE TABLE "cast" ( "id" int, "msid" int, "aid" int, "role" int, primary key("id"), foreign key("aid") references `actor`("aid"), foreign key("msid") references `copyright`("msid") ) 3 rows from cast table: Empty DataFrame Columns: [id, msid, aid, role] Index: [] CREATE TABLE "genre" ( "gid" int, "genre" text, primary key("gid") ) 3 rows from genre table: Empty DataFrame Columns: [gid, genre] Index: [] CREATE TABLE "classification" ( "id" int, "msid" int, "gid" int, primary key("id"), foreign key("gid") references `genre`("gid"), foreign key("msid") references `copyright`("msid") ) 3 rows from classification table: Empty DataFrame Columns: [id, msid, gid] Index: [] CREATE TABLE "company" ( "id" int, "name" text, "country_code" text, primary key("id") ) 3 rows from company table: Empty DataFrame Columns: [id, name, country_code] Index: [] CREATE TABLE "director" ( "did" int, "gender" text, "name" text, "nationality" text, "birth_city" text, "birth_year" int, primary key("did") ) 3 rows from director table: Empty DataFrame Columns: [did, gender, name, nationality, birth_city, birth_year] Index: [] CREATE TABLE "producer" ( "pid" int, "gender" text, "name" text, "nationality" text, "birth_city" text, "birth_year" int, primary key("pid") ) 3 rows from producer table: Empty DataFrame Columns: [pid, gender, name, nationality, birth_city, birth_year] Index: [] CREATE TABLE "directed_by" ( "id" int, "msid" int, "did" int, primary key("id"), foreign key("msid") references `copyright`("msid"), foreign key("did") references `director`("did") ) 3 rows from directed_by table: Empty DataFrame Columns: [id, msid, did] Index: [] CREATE TABLE "keyword" ( "id" int, "keyword" text, primary key("id") ) 3 rows from keyword table: Empty DataFrame Columns: [id, keyword] Index: [] CREATE TABLE "made_by" ( "id" int, "msid" int, "pid" int, primary key("id"), foreign key("msid") references `copyright`("msid"), foreign key("pid") references `producer`("pid") ) 3 rows from made_by table: Empty DataFrame Columns: [id, msid, pid] Index: [] CREATE TABLE "movie" ( "mid" int, "title" text, "release_year" int, "title_aka" text, "budget" text, primary key("mid") ) 3 rows from movie table: Empty DataFrame Columns: [mid, title, release_year, title_aka, budget] Index: [] CREATE TABLE "tags" ( "id" int, "msid" int, "kid" int, primary key("id"), foreign key("msid") references `copyright`("msid"), foreign key("kid") references `keyword`("kid") ) 3 rows from tags table: Empty DataFrame Columns: [id, msid, kid] Index: [] CREATE TABLE "tv_series" ( "sid" int, "title" text, "release_year" int, "num_of_seasons" int, "num_of_episodes" int, "title_aka" text, "budget" text, primary key("sid") ) 3 rows from tv_series table: Empty DataFrame Columns: [sid, title, release_year, num_of_seasons, num_of_episodes, title_aka, budget] Index: [] CREATE TABLE "writer" ( "wid" int, "gender" text, "name" int, "nationality" int, "num_of_episodes" int, "birth_city" text, "birth_year" int, primary key("wid") ) 3 rows from writer table: Empty DataFrame Columns: [wid, gender, name, nationality, num_of_episodes, birth_city, birth_year] Index: [] CREATE TABLE "written_by" ( "id" int, "msid" int, "wid" int, foreign key("msid") references `copyright`("msid"), foreign key("wid") references `writer`("wid") ) 3 rows from written_by table: Empty DataFrame Columns: [id, msid, wid] Index: []
imdb
What are the major roles in the movie " Daddy Long Legs "
SELECT t2.role FROM CAST AS t2 JOIN actor AS t1 ON t2.aid = t1.aid JOIN movie AS t3 ON t3.mid = t2.msid WHERE t3.title = "Daddy Long Legs";
CREATE TABLE "actor" ( "aid" int, "gender" text, "name" text, "nationality" text, "birth_city" text, "birth_year" int, primary key("aid") ) 3 rows from actor table: Empty DataFrame Columns: [aid, gender, name, nationality, birth_city, birth_year] Index: [] CREATE TABLE "copyright" ( "id" int, "msid" int, "cid" int, primary key("id") ) 3 rows from copyright table: Empty DataFrame Columns: [id, msid, cid] Index: [] CREATE TABLE "cast" ( "id" int, "msid" int, "aid" int, "role" int, primary key("id"), foreign key("aid") references `actor`("aid"), foreign key("msid") references `copyright`("msid") ) 3 rows from cast table: Empty DataFrame Columns: [id, msid, aid, role] Index: [] CREATE TABLE "genre" ( "gid" int, "genre" text, primary key("gid") ) 3 rows from genre table: Empty DataFrame Columns: [gid, genre] Index: [] CREATE TABLE "classification" ( "id" int, "msid" int, "gid" int, primary key("id"), foreign key("gid") references `genre`("gid"), foreign key("msid") references `copyright`("msid") ) 3 rows from classification table: Empty DataFrame Columns: [id, msid, gid] Index: [] CREATE TABLE "company" ( "id" int, "name" text, "country_code" text, primary key("id") ) 3 rows from company table: Empty DataFrame Columns: [id, name, country_code] Index: [] CREATE TABLE "director" ( "did" int, "gender" text, "name" text, "nationality" text, "birth_city" text, "birth_year" int, primary key("did") ) 3 rows from director table: Empty DataFrame Columns: [did, gender, name, nationality, birth_city, birth_year] Index: [] CREATE TABLE "producer" ( "pid" int, "gender" text, "name" text, "nationality" text, "birth_city" text, "birth_year" int, primary key("pid") ) 3 rows from producer table: Empty DataFrame Columns: [pid, gender, name, nationality, birth_city, birth_year] Index: [] CREATE TABLE "directed_by" ( "id" int, "msid" int, "did" int, primary key("id"), foreign key("msid") references `copyright`("msid"), foreign key("did") references `director`("did") ) 3 rows from directed_by table: Empty DataFrame Columns: [id, msid, did] Index: [] CREATE TABLE "keyword" ( "id" int, "keyword" text, primary key("id") ) 3 rows from keyword table: Empty DataFrame Columns: [id, keyword] Index: [] CREATE TABLE "made_by" ( "id" int, "msid" int, "pid" int, primary key("id"), foreign key("msid") references `copyright`("msid"), foreign key("pid") references `producer`("pid") ) 3 rows from made_by table: Empty DataFrame Columns: [id, msid, pid] Index: [] CREATE TABLE "movie" ( "mid" int, "title" text, "release_year" int, "title_aka" text, "budget" text, primary key("mid") ) 3 rows from movie table: Empty DataFrame Columns: [mid, title, release_year, title_aka, budget] Index: [] CREATE TABLE "tags" ( "id" int, "msid" int, "kid" int, primary key("id"), foreign key("msid") references `copyright`("msid"), foreign key("kid") references `keyword`("kid") ) 3 rows from tags table: Empty DataFrame Columns: [id, msid, kid] Index: [] CREATE TABLE "tv_series" ( "sid" int, "title" text, "release_year" int, "num_of_seasons" int, "num_of_episodes" int, "title_aka" text, "budget" text, primary key("sid") ) 3 rows from tv_series table: Empty DataFrame Columns: [sid, title, release_year, num_of_seasons, num_of_episodes, title_aka, budget] Index: [] CREATE TABLE "writer" ( "wid" int, "gender" text, "name" int, "nationality" int, "num_of_episodes" int, "birth_city" text, "birth_year" int, primary key("wid") ) 3 rows from writer table: Empty DataFrame Columns: [wid, gender, name, nationality, num_of_episodes, birth_city, birth_year] Index: [] CREATE TABLE "written_by" ( "id" int, "msid" int, "wid" int, foreign key("msid") references `copyright`("msid"), foreign key("wid") references `writer`("wid") ) 3 rows from written_by table: Empty DataFrame Columns: [id, msid, wid] Index: []
imdb
List all the directors of movies about nuclear weapons
SELECT t3.name FROM director AS t3 JOIN directed_by AS t2 ON t3.did = t2.did JOIN movie AS t4 ON t4.mid = t2.msid JOIN tags AS t5 ON t5.msid = t4.mid JOIN keyword AS t1 ON t5.kid = t1.id WHERE t1.keyword = "nuclear weapons";
CREATE TABLE "actor" ( "aid" int, "gender" text, "name" text, "nationality" text, "birth_city" text, "birth_year" int, primary key("aid") ) 3 rows from actor table: Empty DataFrame Columns: [aid, gender, name, nationality, birth_city, birth_year] Index: [] CREATE TABLE "copyright" ( "id" int, "msid" int, "cid" int, primary key("id") ) 3 rows from copyright table: Empty DataFrame Columns: [id, msid, cid] Index: [] CREATE TABLE "cast" ( "id" int, "msid" int, "aid" int, "role" int, primary key("id"), foreign key("aid") references `actor`("aid"), foreign key("msid") references `copyright`("msid") ) 3 rows from cast table: Empty DataFrame Columns: [id, msid, aid, role] Index: [] CREATE TABLE "genre" ( "gid" int, "genre" text, primary key("gid") ) 3 rows from genre table: Empty DataFrame Columns: [gid, genre] Index: [] CREATE TABLE "classification" ( "id" int, "msid" int, "gid" int, primary key("id"), foreign key("gid") references `genre`("gid"), foreign key("msid") references `copyright`("msid") ) 3 rows from classification table: Empty DataFrame Columns: [id, msid, gid] Index: [] CREATE TABLE "company" ( "id" int, "name" text, "country_code" text, primary key("id") ) 3 rows from company table: Empty DataFrame Columns: [id, name, country_code] Index: [] CREATE TABLE "director" ( "did" int, "gender" text, "name" text, "nationality" text, "birth_city" text, "birth_year" int, primary key("did") ) 3 rows from director table: Empty DataFrame Columns: [did, gender, name, nationality, birth_city, birth_year] Index: [] CREATE TABLE "producer" ( "pid" int, "gender" text, "name" text, "nationality" text, "birth_city" text, "birth_year" int, primary key("pid") ) 3 rows from producer table: Empty DataFrame Columns: [pid, gender, name, nationality, birth_city, birth_year] Index: [] CREATE TABLE "directed_by" ( "id" int, "msid" int, "did" int, primary key("id"), foreign key("msid") references `copyright`("msid"), foreign key("did") references `director`("did") ) 3 rows from directed_by table: Empty DataFrame Columns: [id, msid, did] Index: [] CREATE TABLE "keyword" ( "id" int, "keyword" text, primary key("id") ) 3 rows from keyword table: Empty DataFrame Columns: [id, keyword] Index: [] CREATE TABLE "made_by" ( "id" int, "msid" int, "pid" int, primary key("id"), foreign key("msid") references `copyright`("msid"), foreign key("pid") references `producer`("pid") ) 3 rows from made_by table: Empty DataFrame Columns: [id, msid, pid] Index: [] CREATE TABLE "movie" ( "mid" int, "title" text, "release_year" int, "title_aka" text, "budget" text, primary key("mid") ) 3 rows from movie table: Empty DataFrame Columns: [mid, title, release_year, title_aka, budget] Index: [] CREATE TABLE "tags" ( "id" int, "msid" int, "kid" int, primary key("id"), foreign key("msid") references `copyright`("msid"), foreign key("kid") references `keyword`("kid") ) 3 rows from tags table: Empty DataFrame Columns: [id, msid, kid] Index: [] CREATE TABLE "tv_series" ( "sid" int, "title" text, "release_year" int, "num_of_seasons" int, "num_of_episodes" int, "title_aka" text, "budget" text, primary key("sid") ) 3 rows from tv_series table: Empty DataFrame Columns: [sid, title, release_year, num_of_seasons, num_of_episodes, title_aka, budget] Index: [] CREATE TABLE "writer" ( "wid" int, "gender" text, "name" int, "nationality" int, "num_of_episodes" int, "birth_city" text, "birth_year" int, primary key("wid") ) 3 rows from writer table: Empty DataFrame Columns: [wid, gender, name, nationality, num_of_episodes, birth_city, birth_year] Index: [] CREATE TABLE "written_by" ( "id" int, "msid" int, "wid" int, foreign key("msid") references `copyright`("msid"), foreign key("wid") references `writer`("wid") ) 3 rows from written_by table: Empty DataFrame Columns: [id, msid, wid] Index: []
imdb
What is the number of movies in which " Jennifer Aniston " acted after 2010 ?
SELECT COUNT ( DISTINCT t2.title ) FROM CAST AS t3 JOIN actor AS t1 ON t3.aid = t1.aid JOIN movie AS t2 ON t2.mid = t3.msid WHERE t1.name = "Jennifer Aniston" AND t2.release_year > 2010;
CREATE TABLE "actor" ( "aid" int, "gender" text, "name" text, "nationality" text, "birth_city" text, "birth_year" int, primary key("aid") ) 3 rows from actor table: Empty DataFrame Columns: [aid, gender, name, nationality, birth_city, birth_year] Index: [] CREATE TABLE "copyright" ( "id" int, "msid" int, "cid" int, primary key("id") ) 3 rows from copyright table: Empty DataFrame Columns: [id, msid, cid] Index: [] CREATE TABLE "cast" ( "id" int, "msid" int, "aid" int, "role" int, primary key("id"), foreign key("aid") references `actor`("aid"), foreign key("msid") references `copyright`("msid") ) 3 rows from cast table: Empty DataFrame Columns: [id, msid, aid, role] Index: [] CREATE TABLE "genre" ( "gid" int, "genre" text, primary key("gid") ) 3 rows from genre table: Empty DataFrame Columns: [gid, genre] Index: [] CREATE TABLE "classification" ( "id" int, "msid" int, "gid" int, primary key("id"), foreign key("gid") references `genre`("gid"), foreign key("msid") references `copyright`("msid") ) 3 rows from classification table: Empty DataFrame Columns: [id, msid, gid] Index: [] CREATE TABLE "company" ( "id" int, "name" text, "country_code" text, primary key("id") ) 3 rows from company table: Empty DataFrame Columns: [id, name, country_code] Index: [] CREATE TABLE "director" ( "did" int, "gender" text, "name" text, "nationality" text, "birth_city" text, "birth_year" int, primary key("did") ) 3 rows from director table: Empty DataFrame Columns: [did, gender, name, nationality, birth_city, birth_year] Index: [] CREATE TABLE "producer" ( "pid" int, "gender" text, "name" text, "nationality" text, "birth_city" text, "birth_year" int, primary key("pid") ) 3 rows from producer table: Empty DataFrame Columns: [pid, gender, name, nationality, birth_city, birth_year] Index: [] CREATE TABLE "directed_by" ( "id" int, "msid" int, "did" int, primary key("id"), foreign key("msid") references `copyright`("msid"), foreign key("did") references `director`("did") ) 3 rows from directed_by table: Empty DataFrame Columns: [id, msid, did] Index: [] CREATE TABLE "keyword" ( "id" int, "keyword" text, primary key("id") ) 3 rows from keyword table: Empty DataFrame Columns: [id, keyword] Index: [] CREATE TABLE "made_by" ( "id" int, "msid" int, "pid" int, primary key("id"), foreign key("msid") references `copyright`("msid"), foreign key("pid") references `producer`("pid") ) 3 rows from made_by table: Empty DataFrame Columns: [id, msid, pid] Index: [] CREATE TABLE "movie" ( "mid" int, "title" text, "release_year" int, "title_aka" text, "budget" text, primary key("mid") ) 3 rows from movie table: Empty DataFrame Columns: [mid, title, release_year, title_aka, budget] Index: [] CREATE TABLE "tags" ( "id" int, "msid" int, "kid" int, primary key("id"), foreign key("msid") references `copyright`("msid"), foreign key("kid") references `keyword`("kid") ) 3 rows from tags table: Empty DataFrame Columns: [id, msid, kid] Index: [] CREATE TABLE "tv_series" ( "sid" int, "title" text, "release_year" int, "num_of_seasons" int, "num_of_episodes" int, "title_aka" text, "budget" text, primary key("sid") ) 3 rows from tv_series table: Empty DataFrame Columns: [sid, title, release_year, num_of_seasons, num_of_episodes, title_aka, budget] Index: [] CREATE TABLE "writer" ( "wid" int, "gender" text, "name" int, "nationality" int, "num_of_episodes" int, "birth_city" text, "birth_year" int, primary key("wid") ) 3 rows from writer table: Empty DataFrame Columns: [wid, gender, name, nationality, num_of_episodes, birth_city, birth_year] Index: [] CREATE TABLE "written_by" ( "id" int, "msid" int, "wid" int, foreign key("msid") references `copyright`("msid"), foreign key("wid") references `writer`("wid") ) 3 rows from written_by table: Empty DataFrame Columns: [id, msid, wid] Index: []
imdb
What is the number of actors in the movie " Saving Private Ryan " ?
SELECT COUNT ( DISTINCT t1.name ) FROM CAST AS t2 JOIN actor AS t1 ON t2.aid = t1.aid JOIN movie AS t3 ON t3.mid = t2.msid WHERE t3.title = "Saving Private Ryan";
CREATE TABLE "actor" ( "aid" int, "gender" text, "name" text, "nationality" text, "birth_city" text, "birth_year" int, primary key("aid") ) 3 rows from actor table: Empty DataFrame Columns: [aid, gender, name, nationality, birth_city, birth_year] Index: [] CREATE TABLE "copyright" ( "id" int, "msid" int, "cid" int, primary key("id") ) 3 rows from copyright table: Empty DataFrame Columns: [id, msid, cid] Index: [] CREATE TABLE "cast" ( "id" int, "msid" int, "aid" int, "role" int, primary key("id"), foreign key("aid") references `actor`("aid"), foreign key("msid") references `copyright`("msid") ) 3 rows from cast table: Empty DataFrame Columns: [id, msid, aid, role] Index: [] CREATE TABLE "genre" ( "gid" int, "genre" text, primary key("gid") ) 3 rows from genre table: Empty DataFrame Columns: [gid, genre] Index: [] CREATE TABLE "classification" ( "id" int, "msid" int, "gid" int, primary key("id"), foreign key("gid") references `genre`("gid"), foreign key("msid") references `copyright`("msid") ) 3 rows from classification table: Empty DataFrame Columns: [id, msid, gid] Index: [] CREATE TABLE "company" ( "id" int, "name" text, "country_code" text, primary key("id") ) 3 rows from company table: Empty DataFrame Columns: [id, name, country_code] Index: [] CREATE TABLE "director" ( "did" int, "gender" text, "name" text, "nationality" text, "birth_city" text, "birth_year" int, primary key("did") ) 3 rows from director table: Empty DataFrame Columns: [did, gender, name, nationality, birth_city, birth_year] Index: [] CREATE TABLE "producer" ( "pid" int, "gender" text, "name" text, "nationality" text, "birth_city" text, "birth_year" int, primary key("pid") ) 3 rows from producer table: Empty DataFrame Columns: [pid, gender, name, nationality, birth_city, birth_year] Index: [] CREATE TABLE "directed_by" ( "id" int, "msid" int, "did" int, primary key("id"), foreign key("msid") references `copyright`("msid"), foreign key("did") references `director`("did") ) 3 rows from directed_by table: Empty DataFrame Columns: [id, msid, did] Index: [] CREATE TABLE "keyword" ( "id" int, "keyword" text, primary key("id") ) 3 rows from keyword table: Empty DataFrame Columns: [id, keyword] Index: [] CREATE TABLE "made_by" ( "id" int, "msid" int, "pid" int, primary key("id"), foreign key("msid") references `copyright`("msid"), foreign key("pid") references `producer`("pid") ) 3 rows from made_by table: Empty DataFrame Columns: [id, msid, pid] Index: [] CREATE TABLE "movie" ( "mid" int, "title" text, "release_year" int, "title_aka" text, "budget" text, primary key("mid") ) 3 rows from movie table: Empty DataFrame Columns: [mid, title, release_year, title_aka, budget] Index: [] CREATE TABLE "tags" ( "id" int, "msid" int, "kid" int, primary key("id"), foreign key("msid") references `copyright`("msid"), foreign key("kid") references `keyword`("kid") ) 3 rows from tags table: Empty DataFrame Columns: [id, msid, kid] Index: [] CREATE TABLE "tv_series" ( "sid" int, "title" text, "release_year" int, "num_of_seasons" int, "num_of_episodes" int, "title_aka" text, "budget" text, primary key("sid") ) 3 rows from tv_series table: Empty DataFrame Columns: [sid, title, release_year, num_of_seasons, num_of_episodes, title_aka, budget] Index: [] CREATE TABLE "writer" ( "wid" int, "gender" text, "name" int, "nationality" int, "num_of_episodes" int, "birth_city" text, "birth_year" int, primary key("wid") ) 3 rows from writer table: Empty DataFrame Columns: [wid, gender, name, nationality, num_of_episodes, birth_city, birth_year] Index: [] CREATE TABLE "written_by" ( "id" int, "msid" int, "wid" int, foreign key("msid") references `copyright`("msid"), foreign key("wid") references `writer`("wid") ) 3 rows from written_by table: Empty DataFrame Columns: [id, msid, wid] Index: []
imdb
How many actors are in the movie " Saving Private Ryan " ?
SELECT COUNT ( DISTINCT t1.name ) FROM CAST AS t2 JOIN actor AS t1 ON t2.aid = t1.aid JOIN movie AS t3 ON t3.mid = t2.msid WHERE t3.title = "Saving Private Ryan";
CREATE TABLE "actor" ( "aid" int, "gender" text, "name" text, "nationality" text, "birth_city" text, "birth_year" int, primary key("aid") ) 3 rows from actor table: Empty DataFrame Columns: [aid, gender, name, nationality, birth_city, birth_year] Index: [] CREATE TABLE "copyright" ( "id" int, "msid" int, "cid" int, primary key("id") ) 3 rows from copyright table: Empty DataFrame Columns: [id, msid, cid] Index: [] CREATE TABLE "cast" ( "id" int, "msid" int, "aid" int, "role" int, primary key("id"), foreign key("aid") references `actor`("aid"), foreign key("msid") references `copyright`("msid") ) 3 rows from cast table: Empty DataFrame Columns: [id, msid, aid, role] Index: [] CREATE TABLE "genre" ( "gid" int, "genre" text, primary key("gid") ) 3 rows from genre table: Empty DataFrame Columns: [gid, genre] Index: [] CREATE TABLE "classification" ( "id" int, "msid" int, "gid" int, primary key("id"), foreign key("gid") references `genre`("gid"), foreign key("msid") references `copyright`("msid") ) 3 rows from classification table: Empty DataFrame Columns: [id, msid, gid] Index: [] CREATE TABLE "company" ( "id" int, "name" text, "country_code" text, primary key("id") ) 3 rows from company table: Empty DataFrame Columns: [id, name, country_code] Index: [] CREATE TABLE "director" ( "did" int, "gender" text, "name" text, "nationality" text, "birth_city" text, "birth_year" int, primary key("did") ) 3 rows from director table: Empty DataFrame Columns: [did, gender, name, nationality, birth_city, birth_year] Index: [] CREATE TABLE "producer" ( "pid" int, "gender" text, "name" text, "nationality" text, "birth_city" text, "birth_year" int, primary key("pid") ) 3 rows from producer table: Empty DataFrame Columns: [pid, gender, name, nationality, birth_city, birth_year] Index: [] CREATE TABLE "directed_by" ( "id" int, "msid" int, "did" int, primary key("id"), foreign key("msid") references `copyright`("msid"), foreign key("did") references `director`("did") ) 3 rows from directed_by table: Empty DataFrame Columns: [id, msid, did] Index: [] CREATE TABLE "keyword" ( "id" int, "keyword" text, primary key("id") ) 3 rows from keyword table: Empty DataFrame Columns: [id, keyword] Index: [] CREATE TABLE "made_by" ( "id" int, "msid" int, "pid" int, primary key("id"), foreign key("msid") references `copyright`("msid"), foreign key("pid") references `producer`("pid") ) 3 rows from made_by table: Empty DataFrame Columns: [id, msid, pid] Index: [] CREATE TABLE "movie" ( "mid" int, "title" text, "release_year" int, "title_aka" text, "budget" text, primary key("mid") ) 3 rows from movie table: Empty DataFrame Columns: [mid, title, release_year, title_aka, budget] Index: [] CREATE TABLE "tags" ( "id" int, "msid" int, "kid" int, primary key("id"), foreign key("msid") references `copyright`("msid"), foreign key("kid") references `keyword`("kid") ) 3 rows from tags table: Empty DataFrame Columns: [id, msid, kid] Index: [] CREATE TABLE "tv_series" ( "sid" int, "title" text, "release_year" int, "num_of_seasons" int, "num_of_episodes" int, "title_aka" text, "budget" text, primary key("sid") ) 3 rows from tv_series table: Empty DataFrame Columns: [sid, title, release_year, num_of_seasons, num_of_episodes, title_aka, budget] Index: [] CREATE TABLE "writer" ( "wid" int, "gender" text, "name" int, "nationality" int, "num_of_episodes" int, "birth_city" text, "birth_year" int, primary key("wid") ) 3 rows from writer table: Empty DataFrame Columns: [wid, gender, name, nationality, num_of_episodes, birth_city, birth_year] Index: [] CREATE TABLE "written_by" ( "id" int, "msid" int, "wid" int, foreign key("msid") references `copyright`("msid"), foreign key("wid") references `writer`("wid") ) 3 rows from written_by table: Empty DataFrame Columns: [id, msid, wid] Index: []
imdb
How many movies did " Steven Spielberg " direct ?
SELECT COUNT ( DISTINCT t3.title ) FROM director AS t2 JOIN directed_by AS t1 ON t2.did = t1.did JOIN movie AS t3 ON t3.mid = t1.msid WHERE t2.name = "Steven Spielberg";
CREATE TABLE "actor" ( "aid" int, "gender" text, "name" text, "nationality" text, "birth_city" text, "birth_year" int, primary key("aid") ) 3 rows from actor table: Empty DataFrame Columns: [aid, gender, name, nationality, birth_city, birth_year] Index: [] CREATE TABLE "copyright" ( "id" int, "msid" int, "cid" int, primary key("id") ) 3 rows from copyright table: Empty DataFrame Columns: [id, msid, cid] Index: [] CREATE TABLE "cast" ( "id" int, "msid" int, "aid" int, "role" int, primary key("id"), foreign key("aid") references `actor`("aid"), foreign key("msid") references `copyright`("msid") ) 3 rows from cast table: Empty DataFrame Columns: [id, msid, aid, role] Index: [] CREATE TABLE "genre" ( "gid" int, "genre" text, primary key("gid") ) 3 rows from genre table: Empty DataFrame Columns: [gid, genre] Index: [] CREATE TABLE "classification" ( "id" int, "msid" int, "gid" int, primary key("id"), foreign key("gid") references `genre`("gid"), foreign key("msid") references `copyright`("msid") ) 3 rows from classification table: Empty DataFrame Columns: [id, msid, gid] Index: [] CREATE TABLE "company" ( "id" int, "name" text, "country_code" text, primary key("id") ) 3 rows from company table: Empty DataFrame Columns: [id, name, country_code] Index: [] CREATE TABLE "director" ( "did" int, "gender" text, "name" text, "nationality" text, "birth_city" text, "birth_year" int, primary key("did") ) 3 rows from director table: Empty DataFrame Columns: [did, gender, name, nationality, birth_city, birth_year] Index: [] CREATE TABLE "producer" ( "pid" int, "gender" text, "name" text, "nationality" text, "birth_city" text, "birth_year" int, primary key("pid") ) 3 rows from producer table: Empty DataFrame Columns: [pid, gender, name, nationality, birth_city, birth_year] Index: [] CREATE TABLE "directed_by" ( "id" int, "msid" int, "did" int, primary key("id"), foreign key("msid") references `copyright`("msid"), foreign key("did") references `director`("did") ) 3 rows from directed_by table: Empty DataFrame Columns: [id, msid, did] Index: [] CREATE TABLE "keyword" ( "id" int, "keyword" text, primary key("id") ) 3 rows from keyword table: Empty DataFrame Columns: [id, keyword] Index: [] CREATE TABLE "made_by" ( "id" int, "msid" int, "pid" int, primary key("id"), foreign key("msid") references `copyright`("msid"), foreign key("pid") references `producer`("pid") ) 3 rows from made_by table: Empty DataFrame Columns: [id, msid, pid] Index: [] CREATE TABLE "movie" ( "mid" int, "title" text, "release_year" int, "title_aka" text, "budget" text, primary key("mid") ) 3 rows from movie table: Empty DataFrame Columns: [mid, title, release_year, title_aka, budget] Index: [] CREATE TABLE "tags" ( "id" int, "msid" int, "kid" int, primary key("id"), foreign key("msid") references `copyright`("msid"), foreign key("kid") references `keyword`("kid") ) 3 rows from tags table: Empty DataFrame Columns: [id, msid, kid] Index: [] CREATE TABLE "tv_series" ( "sid" int, "title" text, "release_year" int, "num_of_seasons" int, "num_of_episodes" int, "title_aka" text, "budget" text, primary key("sid") ) 3 rows from tv_series table: Empty DataFrame Columns: [sid, title, release_year, num_of_seasons, num_of_episodes, title_aka, budget] Index: [] CREATE TABLE "writer" ( "wid" int, "gender" text, "name" int, "nationality" int, "num_of_episodes" int, "birth_city" text, "birth_year" int, primary key("wid") ) 3 rows from writer table: Empty DataFrame Columns: [wid, gender, name, nationality, num_of_episodes, birth_city, birth_year] Index: [] CREATE TABLE "written_by" ( "id" int, "msid" int, "wid" int, foreign key("msid") references `copyright`("msid"), foreign key("wid") references `writer`("wid") ) 3 rows from written_by table: Empty DataFrame Columns: [id, msid, wid] Index: []
imdb
How many movies were produced in the year 2013 ?
SELECT COUNT ( DISTINCT title ) FROM movie WHERE release_year = 2013;
CREATE TABLE "actor" ( "aid" int, "gender" text, "name" text, "nationality" text, "birth_city" text, "birth_year" int, primary key("aid") ) 3 rows from actor table: Empty DataFrame Columns: [aid, gender, name, nationality, birth_city, birth_year] Index: [] CREATE TABLE "copyright" ( "id" int, "msid" int, "cid" int, primary key("id") ) 3 rows from copyright table: Empty DataFrame Columns: [id, msid, cid] Index: [] CREATE TABLE "cast" ( "id" int, "msid" int, "aid" int, "role" int, primary key("id"), foreign key("aid") references `actor`("aid"), foreign key("msid") references `copyright`("msid") ) 3 rows from cast table: Empty DataFrame Columns: [id, msid, aid, role] Index: [] CREATE TABLE "genre" ( "gid" int, "genre" text, primary key("gid") ) 3 rows from genre table: Empty DataFrame Columns: [gid, genre] Index: [] CREATE TABLE "classification" ( "id" int, "msid" int, "gid" int, primary key("id"), foreign key("gid") references `genre`("gid"), foreign key("msid") references `copyright`("msid") ) 3 rows from classification table: Empty DataFrame Columns: [id, msid, gid] Index: [] CREATE TABLE "company" ( "id" int, "name" text, "country_code" text, primary key("id") ) 3 rows from company table: Empty DataFrame Columns: [id, name, country_code] Index: [] CREATE TABLE "director" ( "did" int, "gender" text, "name" text, "nationality" text, "birth_city" text, "birth_year" int, primary key("did") ) 3 rows from director table: Empty DataFrame Columns: [did, gender, name, nationality, birth_city, birth_year] Index: [] CREATE TABLE "producer" ( "pid" int, "gender" text, "name" text, "nationality" text, "birth_city" text, "birth_year" int, primary key("pid") ) 3 rows from producer table: Empty DataFrame Columns: [pid, gender, name, nationality, birth_city, birth_year] Index: [] CREATE TABLE "directed_by" ( "id" int, "msid" int, "did" int, primary key("id"), foreign key("msid") references `copyright`("msid"), foreign key("did") references `director`("did") ) 3 rows from directed_by table: Empty DataFrame Columns: [id, msid, did] Index: [] CREATE TABLE "keyword" ( "id" int, "keyword" text, primary key("id") ) 3 rows from keyword table: Empty DataFrame Columns: [id, keyword] Index: [] CREATE TABLE "made_by" ( "id" int, "msid" int, "pid" int, primary key("id"), foreign key("msid") references `copyright`("msid"), foreign key("pid") references `producer`("pid") ) 3 rows from made_by table: Empty DataFrame Columns: [id, msid, pid] Index: [] CREATE TABLE "movie" ( "mid" int, "title" text, "release_year" int, "title_aka" text, "budget" text, primary key("mid") ) 3 rows from movie table: Empty DataFrame Columns: [mid, title, release_year, title_aka, budget] Index: [] CREATE TABLE "tags" ( "id" int, "msid" int, "kid" int, primary key("id"), foreign key("msid") references `copyright`("msid"), foreign key("kid") references `keyword`("kid") ) 3 rows from tags table: Empty DataFrame Columns: [id, msid, kid] Index: [] CREATE TABLE "tv_series" ( "sid" int, "title" text, "release_year" int, "num_of_seasons" int, "num_of_episodes" int, "title_aka" text, "budget" text, primary key("sid") ) 3 rows from tv_series table: Empty DataFrame Columns: [sid, title, release_year, num_of_seasons, num_of_episodes, title_aka, budget] Index: [] CREATE TABLE "writer" ( "wid" int, "gender" text, "name" int, "nationality" int, "num_of_episodes" int, "birth_city" text, "birth_year" int, primary key("wid") ) 3 rows from writer table: Empty DataFrame Columns: [wid, gender, name, nationality, num_of_episodes, birth_city, birth_year] Index: [] CREATE TABLE "written_by" ( "id" int, "msid" int, "wid" int, foreign key("msid") references `copyright`("msid"), foreign key("wid") references `writer`("wid") ) 3 rows from written_by table: Empty DataFrame Columns: [id, msid, wid] Index: []
imdb
What is the number of movies produced in 2013 ?
SELECT COUNT ( DISTINCT title ) FROM movie WHERE release_year = 2013;
CREATE TABLE "actor" ( "aid" int, "gender" text, "name" text, "nationality" text, "birth_city" text, "birth_year" int, primary key("aid") ) 3 rows from actor table: Empty DataFrame Columns: [aid, gender, name, nationality, birth_city, birth_year] Index: [] CREATE TABLE "copyright" ( "id" int, "msid" int, "cid" int, primary key("id") ) 3 rows from copyright table: Empty DataFrame Columns: [id, msid, cid] Index: [] CREATE TABLE "cast" ( "id" int, "msid" int, "aid" int, "role" int, primary key("id"), foreign key("aid") references `actor`("aid"), foreign key("msid") references `copyright`("msid") ) 3 rows from cast table: Empty DataFrame Columns: [id, msid, aid, role] Index: [] CREATE TABLE "genre" ( "gid" int, "genre" text, primary key("gid") ) 3 rows from genre table: Empty DataFrame Columns: [gid, genre] Index: [] CREATE TABLE "classification" ( "id" int, "msid" int, "gid" int, primary key("id"), foreign key("gid") references `genre`("gid"), foreign key("msid") references `copyright`("msid") ) 3 rows from classification table: Empty DataFrame Columns: [id, msid, gid] Index: [] CREATE TABLE "company" ( "id" int, "name" text, "country_code" text, primary key("id") ) 3 rows from company table: Empty DataFrame Columns: [id, name, country_code] Index: [] CREATE TABLE "director" ( "did" int, "gender" text, "name" text, "nationality" text, "birth_city" text, "birth_year" int, primary key("did") ) 3 rows from director table: Empty DataFrame Columns: [did, gender, name, nationality, birth_city, birth_year] Index: [] CREATE TABLE "producer" ( "pid" int, "gender" text, "name" text, "nationality" text, "birth_city" text, "birth_year" int, primary key("pid") ) 3 rows from producer table: Empty DataFrame Columns: [pid, gender, name, nationality, birth_city, birth_year] Index: [] CREATE TABLE "directed_by" ( "id" int, "msid" int, "did" int, primary key("id"), foreign key("msid") references `copyright`("msid"), foreign key("did") references `director`("did") ) 3 rows from directed_by table: Empty DataFrame Columns: [id, msid, did] Index: [] CREATE TABLE "keyword" ( "id" int, "keyword" text, primary key("id") ) 3 rows from keyword table: Empty DataFrame Columns: [id, keyword] Index: [] CREATE TABLE "made_by" ( "id" int, "msid" int, "pid" int, primary key("id"), foreign key("msid") references `copyright`("msid"), foreign key("pid") references `producer`("pid") ) 3 rows from made_by table: Empty DataFrame Columns: [id, msid, pid] Index: [] CREATE TABLE "movie" ( "mid" int, "title" text, "release_year" int, "title_aka" text, "budget" text, primary key("mid") ) 3 rows from movie table: Empty DataFrame Columns: [mid, title, release_year, title_aka, budget] Index: [] CREATE TABLE "tags" ( "id" int, "msid" int, "kid" int, primary key("id"), foreign key("msid") references `copyright`("msid"), foreign key("kid") references `keyword`("kid") ) 3 rows from tags table: Empty DataFrame Columns: [id, msid, kid] Index: [] CREATE TABLE "tv_series" ( "sid" int, "title" text, "release_year" int, "num_of_seasons" int, "num_of_episodes" int, "title_aka" text, "budget" text, primary key("sid") ) 3 rows from tv_series table: Empty DataFrame Columns: [sid, title, release_year, num_of_seasons, num_of_episodes, title_aka, budget] Index: [] CREATE TABLE "writer" ( "wid" int, "gender" text, "name" int, "nationality" int, "num_of_episodes" int, "birth_city" text, "birth_year" int, primary key("wid") ) 3 rows from writer table: Empty DataFrame Columns: [wid, gender, name, nationality, num_of_episodes, birth_city, birth_year] Index: [] CREATE TABLE "written_by" ( "id" int, "msid" int, "wid" int, foreign key("msid") references `copyright`("msid"), foreign key("wid") references `writer`("wid") ) 3 rows from written_by table: Empty DataFrame Columns: [id, msid, wid] Index: []
imdb
What is the number of movies directed by " Woody Allen " per year ?
SELECT COUNT ( DISTINCT t3.title ) , t3.release_year FROM director AS t2 JOIN directed_by AS t1 ON t2.did = t1.did JOIN movie AS t3 ON t3.mid = t1.msid WHERE t2.name = "Woody Allen" GROUP BY t3.release_year;
CREATE TABLE "actor" ( "aid" int, "gender" text, "name" text, "nationality" text, "birth_city" text, "birth_year" int, primary key("aid") ) 3 rows from actor table: Empty DataFrame Columns: [aid, gender, name, nationality, birth_city, birth_year] Index: [] CREATE TABLE "copyright" ( "id" int, "msid" int, "cid" int, primary key("id") ) 3 rows from copyright table: Empty DataFrame Columns: [id, msid, cid] Index: [] CREATE TABLE "cast" ( "id" int, "msid" int, "aid" int, "role" int, primary key("id"), foreign key("aid") references `actor`("aid"), foreign key("msid") references `copyright`("msid") ) 3 rows from cast table: Empty DataFrame Columns: [id, msid, aid, role] Index: [] CREATE TABLE "genre" ( "gid" int, "genre" text, primary key("gid") ) 3 rows from genre table: Empty DataFrame Columns: [gid, genre] Index: [] CREATE TABLE "classification" ( "id" int, "msid" int, "gid" int, primary key("id"), foreign key("gid") references `genre`("gid"), foreign key("msid") references `copyright`("msid") ) 3 rows from classification table: Empty DataFrame Columns: [id, msid, gid] Index: [] CREATE TABLE "company" ( "id" int, "name" text, "country_code" text, primary key("id") ) 3 rows from company table: Empty DataFrame Columns: [id, name, country_code] Index: [] CREATE TABLE "director" ( "did" int, "gender" text, "name" text, "nationality" text, "birth_city" text, "birth_year" int, primary key("did") ) 3 rows from director table: Empty DataFrame Columns: [did, gender, name, nationality, birth_city, birth_year] Index: [] CREATE TABLE "producer" ( "pid" int, "gender" text, "name" text, "nationality" text, "birth_city" text, "birth_year" int, primary key("pid") ) 3 rows from producer table: Empty DataFrame Columns: [pid, gender, name, nationality, birth_city, birth_year] Index: [] CREATE TABLE "directed_by" ( "id" int, "msid" int, "did" int, primary key("id"), foreign key("msid") references `copyright`("msid"), foreign key("did") references `director`("did") ) 3 rows from directed_by table: Empty DataFrame Columns: [id, msid, did] Index: [] CREATE TABLE "keyword" ( "id" int, "keyword" text, primary key("id") ) 3 rows from keyword table: Empty DataFrame Columns: [id, keyword] Index: [] CREATE TABLE "made_by" ( "id" int, "msid" int, "pid" int, primary key("id"), foreign key("msid") references `copyright`("msid"), foreign key("pid") references `producer`("pid") ) 3 rows from made_by table: Empty DataFrame Columns: [id, msid, pid] Index: [] CREATE TABLE "movie" ( "mid" int, "title" text, "release_year" int, "title_aka" text, "budget" text, primary key("mid") ) 3 rows from movie table: Empty DataFrame Columns: [mid, title, release_year, title_aka, budget] Index: [] CREATE TABLE "tags" ( "id" int, "msid" int, "kid" int, primary key("id"), foreign key("msid") references `copyright`("msid"), foreign key("kid") references `keyword`("kid") ) 3 rows from tags table: Empty DataFrame Columns: [id, msid, kid] Index: [] CREATE TABLE "tv_series" ( "sid" int, "title" text, "release_year" int, "num_of_seasons" int, "num_of_episodes" int, "title_aka" text, "budget" text, primary key("sid") ) 3 rows from tv_series table: Empty DataFrame Columns: [sid, title, release_year, num_of_seasons, num_of_episodes, title_aka, budget] Index: [] CREATE TABLE "writer" ( "wid" int, "gender" text, "name" int, "nationality" int, "num_of_episodes" int, "birth_city" text, "birth_year" int, primary key("wid") ) 3 rows from writer table: Empty DataFrame Columns: [wid, gender, name, nationality, num_of_episodes, birth_city, birth_year] Index: [] CREATE TABLE "written_by" ( "id" int, "msid" int, "wid" int, foreign key("msid") references `copyright`("msid"), foreign key("wid") references `writer`("wid") ) 3 rows from written_by table: Empty DataFrame Columns: [id, msid, wid] Index: []
imdb
How many movies did " Shahab Hosseini " act in ?
SELECT COUNT ( DISTINCT t2.title ) FROM CAST AS t3 JOIN actor AS t1 ON t3.aid = t1.aid JOIN movie AS t2 ON t2.mid = t3.msid WHERE t1.name = "Shahab Hosseini";
CREATE TABLE "actor" ( "aid" int, "gender" text, "name" text, "nationality" text, "birth_city" text, "birth_year" int, primary key("aid") ) 3 rows from actor table: Empty DataFrame Columns: [aid, gender, name, nationality, birth_city, birth_year] Index: [] CREATE TABLE "copyright" ( "id" int, "msid" int, "cid" int, primary key("id") ) 3 rows from copyright table: Empty DataFrame Columns: [id, msid, cid] Index: [] CREATE TABLE "cast" ( "id" int, "msid" int, "aid" int, "role" int, primary key("id"), foreign key("aid") references `actor`("aid"), foreign key("msid") references `copyright`("msid") ) 3 rows from cast table: Empty DataFrame Columns: [id, msid, aid, role] Index: [] CREATE TABLE "genre" ( "gid" int, "genre" text, primary key("gid") ) 3 rows from genre table: Empty DataFrame Columns: [gid, genre] Index: [] CREATE TABLE "classification" ( "id" int, "msid" int, "gid" int, primary key("id"), foreign key("gid") references `genre`("gid"), foreign key("msid") references `copyright`("msid") ) 3 rows from classification table: Empty DataFrame Columns: [id, msid, gid] Index: [] CREATE TABLE "company" ( "id" int, "name" text, "country_code" text, primary key("id") ) 3 rows from company table: Empty DataFrame Columns: [id, name, country_code] Index: [] CREATE TABLE "director" ( "did" int, "gender" text, "name" text, "nationality" text, "birth_city" text, "birth_year" int, primary key("did") ) 3 rows from director table: Empty DataFrame Columns: [did, gender, name, nationality, birth_city, birth_year] Index: [] CREATE TABLE "producer" ( "pid" int, "gender" text, "name" text, "nationality" text, "birth_city" text, "birth_year" int, primary key("pid") ) 3 rows from producer table: Empty DataFrame Columns: [pid, gender, name, nationality, birth_city, birth_year] Index: [] CREATE TABLE "directed_by" ( "id" int, "msid" int, "did" int, primary key("id"), foreign key("msid") references `copyright`("msid"), foreign key("did") references `director`("did") ) 3 rows from directed_by table: Empty DataFrame Columns: [id, msid, did] Index: [] CREATE TABLE "keyword" ( "id" int, "keyword" text, primary key("id") ) 3 rows from keyword table: Empty DataFrame Columns: [id, keyword] Index: [] CREATE TABLE "made_by" ( "id" int, "msid" int, "pid" int, primary key("id"), foreign key("msid") references `copyright`("msid"), foreign key("pid") references `producer`("pid") ) 3 rows from made_by table: Empty DataFrame Columns: [id, msid, pid] Index: [] CREATE TABLE "movie" ( "mid" int, "title" text, "release_year" int, "title_aka" text, "budget" text, primary key("mid") ) 3 rows from movie table: Empty DataFrame Columns: [mid, title, release_year, title_aka, budget] Index: [] CREATE TABLE "tags" ( "id" int, "msid" int, "kid" int, primary key("id"), foreign key("msid") references `copyright`("msid"), foreign key("kid") references `keyword`("kid") ) 3 rows from tags table: Empty DataFrame Columns: [id, msid, kid] Index: [] CREATE TABLE "tv_series" ( "sid" int, "title" text, "release_year" int, "num_of_seasons" int, "num_of_episodes" int, "title_aka" text, "budget" text, primary key("sid") ) 3 rows from tv_series table: Empty DataFrame Columns: [sid, title, release_year, num_of_seasons, num_of_episodes, title_aka, budget] Index: [] CREATE TABLE "writer" ( "wid" int, "gender" text, "name" int, "nationality" int, "num_of_episodes" int, "birth_city" text, "birth_year" int, primary key("wid") ) 3 rows from writer table: Empty DataFrame Columns: [wid, gender, name, nationality, num_of_episodes, birth_city, birth_year] Index: [] CREATE TABLE "written_by" ( "id" int, "msid" int, "wid" int, foreign key("msid") references `copyright`("msid"), foreign key("wid") references `writer`("wid") ) 3 rows from written_by table: Empty DataFrame Columns: [id, msid, wid] Index: []
imdb
What is the number of movies in which " Shahab Hosseini " acted ?
SELECT COUNT ( DISTINCT t2.title ) FROM CAST AS t3 JOIN actor AS t1 ON t3.aid = t1.aid JOIN movie AS t2 ON t2.mid = t3.msid WHERE t1.name = "Shahab Hosseini";
CREATE TABLE "actor" ( "aid" int, "gender" text, "name" text, "nationality" text, "birth_city" text, "birth_year" int, primary key("aid") ) 3 rows from actor table: Empty DataFrame Columns: [aid, gender, name, nationality, birth_city, birth_year] Index: [] CREATE TABLE "copyright" ( "id" int, "msid" int, "cid" int, primary key("id") ) 3 rows from copyright table: Empty DataFrame Columns: [id, msid, cid] Index: [] CREATE TABLE "cast" ( "id" int, "msid" int, "aid" int, "role" int, primary key("id"), foreign key("aid") references `actor`("aid"), foreign key("msid") references `copyright`("msid") ) 3 rows from cast table: Empty DataFrame Columns: [id, msid, aid, role] Index: [] CREATE TABLE "genre" ( "gid" int, "genre" text, primary key("gid") ) 3 rows from genre table: Empty DataFrame Columns: [gid, genre] Index: [] CREATE TABLE "classification" ( "id" int, "msid" int, "gid" int, primary key("id"), foreign key("gid") references `genre`("gid"), foreign key("msid") references `copyright`("msid") ) 3 rows from classification table: Empty DataFrame Columns: [id, msid, gid] Index: [] CREATE TABLE "company" ( "id" int, "name" text, "country_code" text, primary key("id") ) 3 rows from company table: Empty DataFrame Columns: [id, name, country_code] Index: [] CREATE TABLE "director" ( "did" int, "gender" text, "name" text, "nationality" text, "birth_city" text, "birth_year" int, primary key("did") ) 3 rows from director table: Empty DataFrame Columns: [did, gender, name, nationality, birth_city, birth_year] Index: [] CREATE TABLE "producer" ( "pid" int, "gender" text, "name" text, "nationality" text, "birth_city" text, "birth_year" int, primary key("pid") ) 3 rows from producer table: Empty DataFrame Columns: [pid, gender, name, nationality, birth_city, birth_year] Index: [] CREATE TABLE "directed_by" ( "id" int, "msid" int, "did" int, primary key("id"), foreign key("msid") references `copyright`("msid"), foreign key("did") references `director`("did") ) 3 rows from directed_by table: Empty DataFrame Columns: [id, msid, did] Index: [] CREATE TABLE "keyword" ( "id" int, "keyword" text, primary key("id") ) 3 rows from keyword table: Empty DataFrame Columns: [id, keyword] Index: [] CREATE TABLE "made_by" ( "id" int, "msid" int, "pid" int, primary key("id"), foreign key("msid") references `copyright`("msid"), foreign key("pid") references `producer`("pid") ) 3 rows from made_by table: Empty DataFrame Columns: [id, msid, pid] Index: [] CREATE TABLE "movie" ( "mid" int, "title" text, "release_year" int, "title_aka" text, "budget" text, primary key("mid") ) 3 rows from movie table: Empty DataFrame Columns: [mid, title, release_year, title_aka, budget] Index: [] CREATE TABLE "tags" ( "id" int, "msid" int, "kid" int, primary key("id"), foreign key("msid") references `copyright`("msid"), foreign key("kid") references `keyword`("kid") ) 3 rows from tags table: Empty DataFrame Columns: [id, msid, kid] Index: [] CREATE TABLE "tv_series" ( "sid" int, "title" text, "release_year" int, "num_of_seasons" int, "num_of_episodes" int, "title_aka" text, "budget" text, primary key("sid") ) 3 rows from tv_series table: Empty DataFrame Columns: [sid, title, release_year, num_of_seasons, num_of_episodes, title_aka, budget] Index: [] CREATE TABLE "writer" ( "wid" int, "gender" text, "name" int, "nationality" int, "num_of_episodes" int, "birth_city" text, "birth_year" int, primary key("wid") ) 3 rows from writer table: Empty DataFrame Columns: [wid, gender, name, nationality, num_of_episodes, birth_city, birth_year] Index: [] CREATE TABLE "written_by" ( "id" int, "msid" int, "wid" int, foreign key("msid") references `copyright`("msid"), foreign key("wid") references `writer`("wid") ) 3 rows from written_by table: Empty DataFrame Columns: [id, msid, wid] Index: []
imdb
What is the number of movies featuring " Shahab Hosseini " ?
SELECT COUNT ( DISTINCT t2.title ) FROM CAST AS t3 JOIN actor AS t1 ON t3.aid = t1.aid JOIN movie AS t2 ON t2.mid = t3.msid WHERE t1.name = "Shahab Hosseini";
CREATE TABLE "actor" ( "aid" int, "gender" text, "name" text, "nationality" text, "birth_city" text, "birth_year" int, primary key("aid") ) 3 rows from actor table: Empty DataFrame Columns: [aid, gender, name, nationality, birth_city, birth_year] Index: [] CREATE TABLE "copyright" ( "id" int, "msid" int, "cid" int, primary key("id") ) 3 rows from copyright table: Empty DataFrame Columns: [id, msid, cid] Index: [] CREATE TABLE "cast" ( "id" int, "msid" int, "aid" int, "role" int, primary key("id"), foreign key("aid") references `actor`("aid"), foreign key("msid") references `copyright`("msid") ) 3 rows from cast table: Empty DataFrame Columns: [id, msid, aid, role] Index: [] CREATE TABLE "genre" ( "gid" int, "genre" text, primary key("gid") ) 3 rows from genre table: Empty DataFrame Columns: [gid, genre] Index: [] CREATE TABLE "classification" ( "id" int, "msid" int, "gid" int, primary key("id"), foreign key("gid") references `genre`("gid"), foreign key("msid") references `copyright`("msid") ) 3 rows from classification table: Empty DataFrame Columns: [id, msid, gid] Index: [] CREATE TABLE "company" ( "id" int, "name" text, "country_code" text, primary key("id") ) 3 rows from company table: Empty DataFrame Columns: [id, name, country_code] Index: [] CREATE TABLE "director" ( "did" int, "gender" text, "name" text, "nationality" text, "birth_city" text, "birth_year" int, primary key("did") ) 3 rows from director table: Empty DataFrame Columns: [did, gender, name, nationality, birth_city, birth_year] Index: [] CREATE TABLE "producer" ( "pid" int, "gender" text, "name" text, "nationality" text, "birth_city" text, "birth_year" int, primary key("pid") ) 3 rows from producer table: Empty DataFrame Columns: [pid, gender, name, nationality, birth_city, birth_year] Index: [] CREATE TABLE "directed_by" ( "id" int, "msid" int, "did" int, primary key("id"), foreign key("msid") references `copyright`("msid"), foreign key("did") references `director`("did") ) 3 rows from directed_by table: Empty DataFrame Columns: [id, msid, did] Index: [] CREATE TABLE "keyword" ( "id" int, "keyword" text, primary key("id") ) 3 rows from keyword table: Empty DataFrame Columns: [id, keyword] Index: [] CREATE TABLE "made_by" ( "id" int, "msid" int, "pid" int, primary key("id"), foreign key("msid") references `copyright`("msid"), foreign key("pid") references `producer`("pid") ) 3 rows from made_by table: Empty DataFrame Columns: [id, msid, pid] Index: [] CREATE TABLE "movie" ( "mid" int, "title" text, "release_year" int, "title_aka" text, "budget" text, primary key("mid") ) 3 rows from movie table: Empty DataFrame Columns: [mid, title, release_year, title_aka, budget] Index: [] CREATE TABLE "tags" ( "id" int, "msid" int, "kid" int, primary key("id"), foreign key("msid") references `copyright`("msid"), foreign key("kid") references `keyword`("kid") ) 3 rows from tags table: Empty DataFrame Columns: [id, msid, kid] Index: [] CREATE TABLE "tv_series" ( "sid" int, "title" text, "release_year" int, "num_of_seasons" int, "num_of_episodes" int, "title_aka" text, "budget" text, primary key("sid") ) 3 rows from tv_series table: Empty DataFrame Columns: [sid, title, release_year, num_of_seasons, num_of_episodes, title_aka, budget] Index: [] CREATE TABLE "writer" ( "wid" int, "gender" text, "name" int, "nationality" int, "num_of_episodes" int, "birth_city" text, "birth_year" int, primary key("wid") ) 3 rows from writer table: Empty DataFrame Columns: [wid, gender, name, nationality, num_of_episodes, birth_city, birth_year] Index: [] CREATE TABLE "written_by" ( "id" int, "msid" int, "wid" int, foreign key("msid") references `copyright`("msid"), foreign key("wid") references `writer`("wid") ) 3 rows from written_by table: Empty DataFrame Columns: [id, msid, wid] Index: []
imdb
How many movies did " Shahab Hosseini " act in
SELECT COUNT ( DISTINCT t2.title ) FROM CAST AS t3 JOIN actor AS t1 ON t3.aid = t1.aid JOIN movie AS t2 ON t2.mid = t3.msid WHERE t1.name = "Shahab Hosseini";
CREATE TABLE "actor" ( "aid" int, "gender" text, "name" text, "nationality" text, "birth_city" text, "birth_year" int, primary key("aid") ) 3 rows from actor table: Empty DataFrame Columns: [aid, gender, name, nationality, birth_city, birth_year] Index: [] CREATE TABLE "copyright" ( "id" int, "msid" int, "cid" int, primary key("id") ) 3 rows from copyright table: Empty DataFrame Columns: [id, msid, cid] Index: [] CREATE TABLE "cast" ( "id" int, "msid" int, "aid" int, "role" int, primary key("id"), foreign key("aid") references `actor`("aid"), foreign key("msid") references `copyright`("msid") ) 3 rows from cast table: Empty DataFrame Columns: [id, msid, aid, role] Index: [] CREATE TABLE "genre" ( "gid" int, "genre" text, primary key("gid") ) 3 rows from genre table: Empty DataFrame Columns: [gid, genre] Index: [] CREATE TABLE "classification" ( "id" int, "msid" int, "gid" int, primary key("id"), foreign key("gid") references `genre`("gid"), foreign key("msid") references `copyright`("msid") ) 3 rows from classification table: Empty DataFrame Columns: [id, msid, gid] Index: [] CREATE TABLE "company" ( "id" int, "name" text, "country_code" text, primary key("id") ) 3 rows from company table: Empty DataFrame Columns: [id, name, country_code] Index: [] CREATE TABLE "director" ( "did" int, "gender" text, "name" text, "nationality" text, "birth_city" text, "birth_year" int, primary key("did") ) 3 rows from director table: Empty DataFrame Columns: [did, gender, name, nationality, birth_city, birth_year] Index: [] CREATE TABLE "producer" ( "pid" int, "gender" text, "name" text, "nationality" text, "birth_city" text, "birth_year" int, primary key("pid") ) 3 rows from producer table: Empty DataFrame Columns: [pid, gender, name, nationality, birth_city, birth_year] Index: [] CREATE TABLE "directed_by" ( "id" int, "msid" int, "did" int, primary key("id"), foreign key("msid") references `copyright`("msid"), foreign key("did") references `director`("did") ) 3 rows from directed_by table: Empty DataFrame Columns: [id, msid, did] Index: [] CREATE TABLE "keyword" ( "id" int, "keyword" text, primary key("id") ) 3 rows from keyword table: Empty DataFrame Columns: [id, keyword] Index: [] CREATE TABLE "made_by" ( "id" int, "msid" int, "pid" int, primary key("id"), foreign key("msid") references `copyright`("msid"), foreign key("pid") references `producer`("pid") ) 3 rows from made_by table: Empty DataFrame Columns: [id, msid, pid] Index: [] CREATE TABLE "movie" ( "mid" int, "title" text, "release_year" int, "title_aka" text, "budget" text, primary key("mid") ) 3 rows from movie table: Empty DataFrame Columns: [mid, title, release_year, title_aka, budget] Index: [] CREATE TABLE "tags" ( "id" int, "msid" int, "kid" int, primary key("id"), foreign key("msid") references `copyright`("msid"), foreign key("kid") references `keyword`("kid") ) 3 rows from tags table: Empty DataFrame Columns: [id, msid, kid] Index: [] CREATE TABLE "tv_series" ( "sid" int, "title" text, "release_year" int, "num_of_seasons" int, "num_of_episodes" int, "title_aka" text, "budget" text, primary key("sid") ) 3 rows from tv_series table: Empty DataFrame Columns: [sid, title, release_year, num_of_seasons, num_of_episodes, title_aka, budget] Index: [] CREATE TABLE "writer" ( "wid" int, "gender" text, "name" int, "nationality" int, "num_of_episodes" int, "birth_city" text, "birth_year" int, primary key("wid") ) 3 rows from writer table: Empty DataFrame Columns: [wid, gender, name, nationality, num_of_episodes, birth_city, birth_year] Index: [] CREATE TABLE "written_by" ( "id" int, "msid" int, "wid" int, foreign key("msid") references `copyright`("msid"), foreign key("wid") references `writer`("wid") ) 3 rows from written_by table: Empty DataFrame Columns: [id, msid, wid] Index: []
imdb
How many actors were born in " Los Angeles " after 2000 ?
SELECT COUNT ( DISTINCT name ) FROM actor WHERE birth_city = "Los Angeles" AND birth_year > 2000;
CREATE TABLE "actor" ( "aid" int, "gender" text, "name" text, "nationality" text, "birth_city" text, "birth_year" int, primary key("aid") ) 3 rows from actor table: Empty DataFrame Columns: [aid, gender, name, nationality, birth_city, birth_year] Index: [] CREATE TABLE "copyright" ( "id" int, "msid" int, "cid" int, primary key("id") ) 3 rows from copyright table: Empty DataFrame Columns: [id, msid, cid] Index: [] CREATE TABLE "cast" ( "id" int, "msid" int, "aid" int, "role" int, primary key("id"), foreign key("aid") references `actor`("aid"), foreign key("msid") references `copyright`("msid") ) 3 rows from cast table: Empty DataFrame Columns: [id, msid, aid, role] Index: [] CREATE TABLE "genre" ( "gid" int, "genre" text, primary key("gid") ) 3 rows from genre table: Empty DataFrame Columns: [gid, genre] Index: [] CREATE TABLE "classification" ( "id" int, "msid" int, "gid" int, primary key("id"), foreign key("gid") references `genre`("gid"), foreign key("msid") references `copyright`("msid") ) 3 rows from classification table: Empty DataFrame Columns: [id, msid, gid] Index: [] CREATE TABLE "company" ( "id" int, "name" text, "country_code" text, primary key("id") ) 3 rows from company table: Empty DataFrame Columns: [id, name, country_code] Index: [] CREATE TABLE "director" ( "did" int, "gender" text, "name" text, "nationality" text, "birth_city" text, "birth_year" int, primary key("did") ) 3 rows from director table: Empty DataFrame Columns: [did, gender, name, nationality, birth_city, birth_year] Index: [] CREATE TABLE "producer" ( "pid" int, "gender" text, "name" text, "nationality" text, "birth_city" text, "birth_year" int, primary key("pid") ) 3 rows from producer table: Empty DataFrame Columns: [pid, gender, name, nationality, birth_city, birth_year] Index: [] CREATE TABLE "directed_by" ( "id" int, "msid" int, "did" int, primary key("id"), foreign key("msid") references `copyright`("msid"), foreign key("did") references `director`("did") ) 3 rows from directed_by table: Empty DataFrame Columns: [id, msid, did] Index: [] CREATE TABLE "keyword" ( "id" int, "keyword" text, primary key("id") ) 3 rows from keyword table: Empty DataFrame Columns: [id, keyword] Index: [] CREATE TABLE "made_by" ( "id" int, "msid" int, "pid" int, primary key("id"), foreign key("msid") references `copyright`("msid"), foreign key("pid") references `producer`("pid") ) 3 rows from made_by table: Empty DataFrame Columns: [id, msid, pid] Index: [] CREATE TABLE "movie" ( "mid" int, "title" text, "release_year" int, "title_aka" text, "budget" text, primary key("mid") ) 3 rows from movie table: Empty DataFrame Columns: [mid, title, release_year, title_aka, budget] Index: [] CREATE TABLE "tags" ( "id" int, "msid" int, "kid" int, primary key("id"), foreign key("msid") references `copyright`("msid"), foreign key("kid") references `keyword`("kid") ) 3 rows from tags table: Empty DataFrame Columns: [id, msid, kid] Index: [] CREATE TABLE "tv_series" ( "sid" int, "title" text, "release_year" int, "num_of_seasons" int, "num_of_episodes" int, "title_aka" text, "budget" text, primary key("sid") ) 3 rows from tv_series table: Empty DataFrame Columns: [sid, title, release_year, num_of_seasons, num_of_episodes, title_aka, budget] Index: [] CREATE TABLE "writer" ( "wid" int, "gender" text, "name" int, "nationality" int, "num_of_episodes" int, "birth_city" text, "birth_year" int, primary key("wid") ) 3 rows from writer table: Empty DataFrame Columns: [wid, gender, name, nationality, num_of_episodes, birth_city, birth_year] Index: [] CREATE TABLE "written_by" ( "id" int, "msid" int, "wid" int, foreign key("msid") references `copyright`("msid"), foreign key("wid") references `writer`("wid") ) 3 rows from written_by table: Empty DataFrame Columns: [id, msid, wid] Index: []
imdb
How many movies did " Humphrey Bogart " act in before 1942 ?
SELECT COUNT ( DISTINCT t2.title ) FROM CAST AS t3 JOIN actor AS t1 ON t3.aid = t1.aid JOIN movie AS t2 ON t2.mid = t3.msid WHERE t1.name = "Humphrey Bogart" AND t2.release_year < 1942;
CREATE TABLE "actor" ( "aid" int, "gender" text, "name" text, "nationality" text, "birth_city" text, "birth_year" int, primary key("aid") ) 3 rows from actor table: Empty DataFrame Columns: [aid, gender, name, nationality, birth_city, birth_year] Index: [] CREATE TABLE "copyright" ( "id" int, "msid" int, "cid" int, primary key("id") ) 3 rows from copyright table: Empty DataFrame Columns: [id, msid, cid] Index: [] CREATE TABLE "cast" ( "id" int, "msid" int, "aid" int, "role" int, primary key("id"), foreign key("aid") references `actor`("aid"), foreign key("msid") references `copyright`("msid") ) 3 rows from cast table: Empty DataFrame Columns: [id, msid, aid, role] Index: [] CREATE TABLE "genre" ( "gid" int, "genre" text, primary key("gid") ) 3 rows from genre table: Empty DataFrame Columns: [gid, genre] Index: [] CREATE TABLE "classification" ( "id" int, "msid" int, "gid" int, primary key("id"), foreign key("gid") references `genre`("gid"), foreign key("msid") references `copyright`("msid") ) 3 rows from classification table: Empty DataFrame Columns: [id, msid, gid] Index: [] CREATE TABLE "company" ( "id" int, "name" text, "country_code" text, primary key("id") ) 3 rows from company table: Empty DataFrame Columns: [id, name, country_code] Index: [] CREATE TABLE "director" ( "did" int, "gender" text, "name" text, "nationality" text, "birth_city" text, "birth_year" int, primary key("did") ) 3 rows from director table: Empty DataFrame Columns: [did, gender, name, nationality, birth_city, birth_year] Index: [] CREATE TABLE "producer" ( "pid" int, "gender" text, "name" text, "nationality" text, "birth_city" text, "birth_year" int, primary key("pid") ) 3 rows from producer table: Empty DataFrame Columns: [pid, gender, name, nationality, birth_city, birth_year] Index: [] CREATE TABLE "directed_by" ( "id" int, "msid" int, "did" int, primary key("id"), foreign key("msid") references `copyright`("msid"), foreign key("did") references `director`("did") ) 3 rows from directed_by table: Empty DataFrame Columns: [id, msid, did] Index: [] CREATE TABLE "keyword" ( "id" int, "keyword" text, primary key("id") ) 3 rows from keyword table: Empty DataFrame Columns: [id, keyword] Index: [] CREATE TABLE "made_by" ( "id" int, "msid" int, "pid" int, primary key("id"), foreign key("msid") references `copyright`("msid"), foreign key("pid") references `producer`("pid") ) 3 rows from made_by table: Empty DataFrame Columns: [id, msid, pid] Index: [] CREATE TABLE "movie" ( "mid" int, "title" text, "release_year" int, "title_aka" text, "budget" text, primary key("mid") ) 3 rows from movie table: Empty DataFrame Columns: [mid, title, release_year, title_aka, budget] Index: [] CREATE TABLE "tags" ( "id" int, "msid" int, "kid" int, primary key("id"), foreign key("msid") references `copyright`("msid"), foreign key("kid") references `keyword`("kid") ) 3 rows from tags table: Empty DataFrame Columns: [id, msid, kid] Index: [] CREATE TABLE "tv_series" ( "sid" int, "title" text, "release_year" int, "num_of_seasons" int, "num_of_episodes" int, "title_aka" text, "budget" text, primary key("sid") ) 3 rows from tv_series table: Empty DataFrame Columns: [sid, title, release_year, num_of_seasons, num_of_episodes, title_aka, budget] Index: [] CREATE TABLE "writer" ( "wid" int, "gender" text, "name" int, "nationality" int, "num_of_episodes" int, "birth_city" text, "birth_year" int, primary key("wid") ) 3 rows from writer table: Empty DataFrame Columns: [wid, gender, name, nationality, num_of_episodes, birth_city, birth_year] Index: [] CREATE TABLE "written_by" ( "id" int, "msid" int, "wid" int, foreign key("msid") references `copyright`("msid"), foreign key("wid") references `writer`("wid") ) 3 rows from written_by table: Empty DataFrame Columns: [id, msid, wid] Index: []
imdb
What is the number of movies that " Brad Pitt " acts in per year ?
SELECT COUNT ( DISTINCT t2.title ) , t2.release_year FROM CAST AS t3 JOIN actor AS t1 ON t3.aid = t1.aid JOIN movie AS t2 ON t2.mid = t3.msid WHERE t1.name = "Brad Pitt" GROUP BY t2.release_year;
CREATE TABLE "actor" ( "aid" int, "gender" text, "name" text, "nationality" text, "birth_city" text, "birth_year" int, primary key("aid") ) 3 rows from actor table: Empty DataFrame Columns: [aid, gender, name, nationality, birth_city, birth_year] Index: [] CREATE TABLE "copyright" ( "id" int, "msid" int, "cid" int, primary key("id") ) 3 rows from copyright table: Empty DataFrame Columns: [id, msid, cid] Index: [] CREATE TABLE "cast" ( "id" int, "msid" int, "aid" int, "role" int, primary key("id"), foreign key("aid") references `actor`("aid"), foreign key("msid") references `copyright`("msid") ) 3 rows from cast table: Empty DataFrame Columns: [id, msid, aid, role] Index: [] CREATE TABLE "genre" ( "gid" int, "genre" text, primary key("gid") ) 3 rows from genre table: Empty DataFrame Columns: [gid, genre] Index: [] CREATE TABLE "classification" ( "id" int, "msid" int, "gid" int, primary key("id"), foreign key("gid") references `genre`("gid"), foreign key("msid") references `copyright`("msid") ) 3 rows from classification table: Empty DataFrame Columns: [id, msid, gid] Index: [] CREATE TABLE "company" ( "id" int, "name" text, "country_code" text, primary key("id") ) 3 rows from company table: Empty DataFrame Columns: [id, name, country_code] Index: [] CREATE TABLE "director" ( "did" int, "gender" text, "name" text, "nationality" text, "birth_city" text, "birth_year" int, primary key("did") ) 3 rows from director table: Empty DataFrame Columns: [did, gender, name, nationality, birth_city, birth_year] Index: [] CREATE TABLE "producer" ( "pid" int, "gender" text, "name" text, "nationality" text, "birth_city" text, "birth_year" int, primary key("pid") ) 3 rows from producer table: Empty DataFrame Columns: [pid, gender, name, nationality, birth_city, birth_year] Index: [] CREATE TABLE "directed_by" ( "id" int, "msid" int, "did" int, primary key("id"), foreign key("msid") references `copyright`("msid"), foreign key("did") references `director`("did") ) 3 rows from directed_by table: Empty DataFrame Columns: [id, msid, did] Index: [] CREATE TABLE "keyword" ( "id" int, "keyword" text, primary key("id") ) 3 rows from keyword table: Empty DataFrame Columns: [id, keyword] Index: [] CREATE TABLE "made_by" ( "id" int, "msid" int, "pid" int, primary key("id"), foreign key("msid") references `copyright`("msid"), foreign key("pid") references `producer`("pid") ) 3 rows from made_by table: Empty DataFrame Columns: [id, msid, pid] Index: [] CREATE TABLE "movie" ( "mid" int, "title" text, "release_year" int, "title_aka" text, "budget" text, primary key("mid") ) 3 rows from movie table: Empty DataFrame Columns: [mid, title, release_year, title_aka, budget] Index: [] CREATE TABLE "tags" ( "id" int, "msid" int, "kid" int, primary key("id"), foreign key("msid") references `copyright`("msid"), foreign key("kid") references `keyword`("kid") ) 3 rows from tags table: Empty DataFrame Columns: [id, msid, kid] Index: [] CREATE TABLE "tv_series" ( "sid" int, "title" text, "release_year" int, "num_of_seasons" int, "num_of_episodes" int, "title_aka" text, "budget" text, primary key("sid") ) 3 rows from tv_series table: Empty DataFrame Columns: [sid, title, release_year, num_of_seasons, num_of_episodes, title_aka, budget] Index: [] CREATE TABLE "writer" ( "wid" int, "gender" text, "name" int, "nationality" int, "num_of_episodes" int, "birth_city" text, "birth_year" int, primary key("wid") ) 3 rows from writer table: Empty DataFrame Columns: [wid, gender, name, nationality, num_of_episodes, birth_city, birth_year] Index: [] CREATE TABLE "written_by" ( "id" int, "msid" int, "wid" int, foreign key("msid") references `copyright`("msid"), foreign key("wid") references `writer`("wid") ) 3 rows from written_by table: Empty DataFrame Columns: [id, msid, wid] Index: []
imdb
How many movies about Iraq war were produced in 2015 ?
SELECT COUNT ( DISTINCT t3.title ) FROM tags AS t2 JOIN keyword AS t1 ON t2.kid = t1.id JOIN movie AS t3 ON t2.msid = t3.mid WHERE t1.keyword = "Iraq war" AND t3.release_year = 2015;
CREATE TABLE "actor" ( "aid" int, "gender" text, "name" text, "nationality" text, "birth_city" text, "birth_year" int, primary key("aid") ) 3 rows from actor table: Empty DataFrame Columns: [aid, gender, name, nationality, birth_city, birth_year] Index: [] CREATE TABLE "copyright" ( "id" int, "msid" int, "cid" int, primary key("id") ) 3 rows from copyright table: Empty DataFrame Columns: [id, msid, cid] Index: [] CREATE TABLE "cast" ( "id" int, "msid" int, "aid" int, "role" int, primary key("id"), foreign key("aid") references `actor`("aid"), foreign key("msid") references `copyright`("msid") ) 3 rows from cast table: Empty DataFrame Columns: [id, msid, aid, role] Index: [] CREATE TABLE "genre" ( "gid" int, "genre" text, primary key("gid") ) 3 rows from genre table: Empty DataFrame Columns: [gid, genre] Index: [] CREATE TABLE "classification" ( "id" int, "msid" int, "gid" int, primary key("id"), foreign key("gid") references `genre`("gid"), foreign key("msid") references `copyright`("msid") ) 3 rows from classification table: Empty DataFrame Columns: [id, msid, gid] Index: [] CREATE TABLE "company" ( "id" int, "name" text, "country_code" text, primary key("id") ) 3 rows from company table: Empty DataFrame Columns: [id, name, country_code] Index: [] CREATE TABLE "director" ( "did" int, "gender" text, "name" text, "nationality" text, "birth_city" text, "birth_year" int, primary key("did") ) 3 rows from director table: Empty DataFrame Columns: [did, gender, name, nationality, birth_city, birth_year] Index: [] CREATE TABLE "producer" ( "pid" int, "gender" text, "name" text, "nationality" text, "birth_city" text, "birth_year" int, primary key("pid") ) 3 rows from producer table: Empty DataFrame Columns: [pid, gender, name, nationality, birth_city, birth_year] Index: [] CREATE TABLE "directed_by" ( "id" int, "msid" int, "did" int, primary key("id"), foreign key("msid") references `copyright`("msid"), foreign key("did") references `director`("did") ) 3 rows from directed_by table: Empty DataFrame Columns: [id, msid, did] Index: [] CREATE TABLE "keyword" ( "id" int, "keyword" text, primary key("id") ) 3 rows from keyword table: Empty DataFrame Columns: [id, keyword] Index: [] CREATE TABLE "made_by" ( "id" int, "msid" int, "pid" int, primary key("id"), foreign key("msid") references `copyright`("msid"), foreign key("pid") references `producer`("pid") ) 3 rows from made_by table: Empty DataFrame Columns: [id, msid, pid] Index: [] CREATE TABLE "movie" ( "mid" int, "title" text, "release_year" int, "title_aka" text, "budget" text, primary key("mid") ) 3 rows from movie table: Empty DataFrame Columns: [mid, title, release_year, title_aka, budget] Index: [] CREATE TABLE "tags" ( "id" int, "msid" int, "kid" int, primary key("id"), foreign key("msid") references `copyright`("msid"), foreign key("kid") references `keyword`("kid") ) 3 rows from tags table: Empty DataFrame Columns: [id, msid, kid] Index: [] CREATE TABLE "tv_series" ( "sid" int, "title" text, "release_year" int, "num_of_seasons" int, "num_of_episodes" int, "title_aka" text, "budget" text, primary key("sid") ) 3 rows from tv_series table: Empty DataFrame Columns: [sid, title, release_year, num_of_seasons, num_of_episodes, title_aka, budget] Index: [] CREATE TABLE "writer" ( "wid" int, "gender" text, "name" int, "nationality" int, "num_of_episodes" int, "birth_city" text, "birth_year" int, primary key("wid") ) 3 rows from writer table: Empty DataFrame Columns: [wid, gender, name, nationality, num_of_episodes, birth_city, birth_year] Index: [] CREATE TABLE "written_by" ( "id" int, "msid" int, "wid" int, foreign key("msid") references `copyright`("msid"), foreign key("wid") references `writer`("wid") ) 3 rows from written_by table: Empty DataFrame Columns: [id, msid, wid] Index: []
imdb
How many movies about Persians were released after 1990 ?
SELECT COUNT ( DISTINCT t3.title ) FROM tags AS t2 JOIN keyword AS t1 ON t2.kid = t1.id JOIN movie AS t3 ON t2.msid = t3.mid WHERE t1.keyword = "Persians" AND t3.release_year > 1990;
CREATE TABLE "actor" ( "aid" int, "gender" text, "name" text, "nationality" text, "birth_city" text, "birth_year" int, primary key("aid") ) 3 rows from actor table: Empty DataFrame Columns: [aid, gender, name, nationality, birth_city, birth_year] Index: [] CREATE TABLE "copyright" ( "id" int, "msid" int, "cid" int, primary key("id") ) 3 rows from copyright table: Empty DataFrame Columns: [id, msid, cid] Index: [] CREATE TABLE "cast" ( "id" int, "msid" int, "aid" int, "role" int, primary key("id"), foreign key("aid") references `actor`("aid"), foreign key("msid") references `copyright`("msid") ) 3 rows from cast table: Empty DataFrame Columns: [id, msid, aid, role] Index: [] CREATE TABLE "genre" ( "gid" int, "genre" text, primary key("gid") ) 3 rows from genre table: Empty DataFrame Columns: [gid, genre] Index: [] CREATE TABLE "classification" ( "id" int, "msid" int, "gid" int, primary key("id"), foreign key("gid") references `genre`("gid"), foreign key("msid") references `copyright`("msid") ) 3 rows from classification table: Empty DataFrame Columns: [id, msid, gid] Index: [] CREATE TABLE "company" ( "id" int, "name" text, "country_code" text, primary key("id") ) 3 rows from company table: Empty DataFrame Columns: [id, name, country_code] Index: [] CREATE TABLE "director" ( "did" int, "gender" text, "name" text, "nationality" text, "birth_city" text, "birth_year" int, primary key("did") ) 3 rows from director table: Empty DataFrame Columns: [did, gender, name, nationality, birth_city, birth_year] Index: [] CREATE TABLE "producer" ( "pid" int, "gender" text, "name" text, "nationality" text, "birth_city" text, "birth_year" int, primary key("pid") ) 3 rows from producer table: Empty DataFrame Columns: [pid, gender, name, nationality, birth_city, birth_year] Index: [] CREATE TABLE "directed_by" ( "id" int, "msid" int, "did" int, primary key("id"), foreign key("msid") references `copyright`("msid"), foreign key("did") references `director`("did") ) 3 rows from directed_by table: Empty DataFrame Columns: [id, msid, did] Index: [] CREATE TABLE "keyword" ( "id" int, "keyword" text, primary key("id") ) 3 rows from keyword table: Empty DataFrame Columns: [id, keyword] Index: [] CREATE TABLE "made_by" ( "id" int, "msid" int, "pid" int, primary key("id"), foreign key("msid") references `copyright`("msid"), foreign key("pid") references `producer`("pid") ) 3 rows from made_by table: Empty DataFrame Columns: [id, msid, pid] Index: [] CREATE TABLE "movie" ( "mid" int, "title" text, "release_year" int, "title_aka" text, "budget" text, primary key("mid") ) 3 rows from movie table: Empty DataFrame Columns: [mid, title, release_year, title_aka, budget] Index: [] CREATE TABLE "tags" ( "id" int, "msid" int, "kid" int, primary key("id"), foreign key("msid") references `copyright`("msid"), foreign key("kid") references `keyword`("kid") ) 3 rows from tags table: Empty DataFrame Columns: [id, msid, kid] Index: [] CREATE TABLE "tv_series" ( "sid" int, "title" text, "release_year" int, "num_of_seasons" int, "num_of_episodes" int, "title_aka" text, "budget" text, primary key("sid") ) 3 rows from tv_series table: Empty DataFrame Columns: [sid, title, release_year, num_of_seasons, num_of_episodes, title_aka, budget] Index: [] CREATE TABLE "writer" ( "wid" int, "gender" text, "name" int, "nationality" int, "num_of_episodes" int, "birth_city" text, "birth_year" int, primary key("wid") ) 3 rows from writer table: Empty DataFrame Columns: [wid, gender, name, nationality, num_of_episodes, birth_city, birth_year] Index: [] CREATE TABLE "written_by" ( "id" int, "msid" int, "wid" int, foreign key("msid") references `copyright`("msid"), foreign key("wid") references `writer`("wid") ) 3 rows from written_by table: Empty DataFrame Columns: [id, msid, wid] Index: []
imdb
How many movies did " Quentin Tarantino " direct after 2010 ?
SELECT COUNT ( DISTINCT t3.title ) FROM director AS t2 JOIN directed_by AS t1 ON t2.did = t1.did JOIN movie AS t3 ON t3.mid = t1.msid WHERE t2.name = "Quentin Tarantino" AND t3.release_year > 2010;
CREATE TABLE "actor" ( "aid" int, "gender" text, "name" text, "nationality" text, "birth_city" text, "birth_year" int, primary key("aid") ) 3 rows from actor table: Empty DataFrame Columns: [aid, gender, name, nationality, birth_city, birth_year] Index: [] CREATE TABLE "copyright" ( "id" int, "msid" int, "cid" int, primary key("id") ) 3 rows from copyright table: Empty DataFrame Columns: [id, msid, cid] Index: [] CREATE TABLE "cast" ( "id" int, "msid" int, "aid" int, "role" int, primary key("id"), foreign key("aid") references `actor`("aid"), foreign key("msid") references `copyright`("msid") ) 3 rows from cast table: Empty DataFrame Columns: [id, msid, aid, role] Index: [] CREATE TABLE "genre" ( "gid" int, "genre" text, primary key("gid") ) 3 rows from genre table: Empty DataFrame Columns: [gid, genre] Index: [] CREATE TABLE "classification" ( "id" int, "msid" int, "gid" int, primary key("id"), foreign key("gid") references `genre`("gid"), foreign key("msid") references `copyright`("msid") ) 3 rows from classification table: Empty DataFrame Columns: [id, msid, gid] Index: [] CREATE TABLE "company" ( "id" int, "name" text, "country_code" text, primary key("id") ) 3 rows from company table: Empty DataFrame Columns: [id, name, country_code] Index: [] CREATE TABLE "director" ( "did" int, "gender" text, "name" text, "nationality" text, "birth_city" text, "birth_year" int, primary key("did") ) 3 rows from director table: Empty DataFrame Columns: [did, gender, name, nationality, birth_city, birth_year] Index: [] CREATE TABLE "producer" ( "pid" int, "gender" text, "name" text, "nationality" text, "birth_city" text, "birth_year" int, primary key("pid") ) 3 rows from producer table: Empty DataFrame Columns: [pid, gender, name, nationality, birth_city, birth_year] Index: [] CREATE TABLE "directed_by" ( "id" int, "msid" int, "did" int, primary key("id"), foreign key("msid") references `copyright`("msid"), foreign key("did") references `director`("did") ) 3 rows from directed_by table: Empty DataFrame Columns: [id, msid, did] Index: [] CREATE TABLE "keyword" ( "id" int, "keyword" text, primary key("id") ) 3 rows from keyword table: Empty DataFrame Columns: [id, keyword] Index: [] CREATE TABLE "made_by" ( "id" int, "msid" int, "pid" int, primary key("id"), foreign key("msid") references `copyright`("msid"), foreign key("pid") references `producer`("pid") ) 3 rows from made_by table: Empty DataFrame Columns: [id, msid, pid] Index: [] CREATE TABLE "movie" ( "mid" int, "title" text, "release_year" int, "title_aka" text, "budget" text, primary key("mid") ) 3 rows from movie table: Empty DataFrame Columns: [mid, title, release_year, title_aka, budget] Index: [] CREATE TABLE "tags" ( "id" int, "msid" int, "kid" int, primary key("id"), foreign key("msid") references `copyright`("msid"), foreign key("kid") references `keyword`("kid") ) 3 rows from tags table: Empty DataFrame Columns: [id, msid, kid] Index: [] CREATE TABLE "tv_series" ( "sid" int, "title" text, "release_year" int, "num_of_seasons" int, "num_of_episodes" int, "title_aka" text, "budget" text, primary key("sid") ) 3 rows from tv_series table: Empty DataFrame Columns: [sid, title, release_year, num_of_seasons, num_of_episodes, title_aka, budget] Index: [] CREATE TABLE "writer" ( "wid" int, "gender" text, "name" int, "nationality" int, "num_of_episodes" int, "birth_city" text, "birth_year" int, primary key("wid") ) 3 rows from writer table: Empty DataFrame Columns: [wid, gender, name, nationality, num_of_episodes, birth_city, birth_year] Index: [] CREATE TABLE "written_by" ( "id" int, "msid" int, "wid" int, foreign key("msid") references `copyright`("msid"), foreign key("wid") references `writer`("wid") ) 3 rows from written_by table: Empty DataFrame Columns: [id, msid, wid] Index: []
imdb
How many movies did " Quentin Tarantino " direct before 2010 ?
SELECT COUNT ( DISTINCT t3.title ) FROM director AS t2 JOIN directed_by AS t1 ON t2.did = t1.did JOIN movie AS t3 ON t3.mid = t1.msid WHERE t2.name = "Quentin Tarantino" AND t3.release_year < 2010;
CREATE TABLE "actor" ( "aid" int, "gender" text, "name" text, "nationality" text, "birth_city" text, "birth_year" int, primary key("aid") ) 3 rows from actor table: Empty DataFrame Columns: [aid, gender, name, nationality, birth_city, birth_year] Index: [] CREATE TABLE "copyright" ( "id" int, "msid" int, "cid" int, primary key("id") ) 3 rows from copyright table: Empty DataFrame Columns: [id, msid, cid] Index: [] CREATE TABLE "cast" ( "id" int, "msid" int, "aid" int, "role" int, primary key("id"), foreign key("aid") references `actor`("aid"), foreign key("msid") references `copyright`("msid") ) 3 rows from cast table: Empty DataFrame Columns: [id, msid, aid, role] Index: [] CREATE TABLE "genre" ( "gid" int, "genre" text, primary key("gid") ) 3 rows from genre table: Empty DataFrame Columns: [gid, genre] Index: [] CREATE TABLE "classification" ( "id" int, "msid" int, "gid" int, primary key("id"), foreign key("gid") references `genre`("gid"), foreign key("msid") references `copyright`("msid") ) 3 rows from classification table: Empty DataFrame Columns: [id, msid, gid] Index: [] CREATE TABLE "company" ( "id" int, "name" text, "country_code" text, primary key("id") ) 3 rows from company table: Empty DataFrame Columns: [id, name, country_code] Index: [] CREATE TABLE "director" ( "did" int, "gender" text, "name" text, "nationality" text, "birth_city" text, "birth_year" int, primary key("did") ) 3 rows from director table: Empty DataFrame Columns: [did, gender, name, nationality, birth_city, birth_year] Index: [] CREATE TABLE "producer" ( "pid" int, "gender" text, "name" text, "nationality" text, "birth_city" text, "birth_year" int, primary key("pid") ) 3 rows from producer table: Empty DataFrame Columns: [pid, gender, name, nationality, birth_city, birth_year] Index: [] CREATE TABLE "directed_by" ( "id" int, "msid" int, "did" int, primary key("id"), foreign key("msid") references `copyright`("msid"), foreign key("did") references `director`("did") ) 3 rows from directed_by table: Empty DataFrame Columns: [id, msid, did] Index: [] CREATE TABLE "keyword" ( "id" int, "keyword" text, primary key("id") ) 3 rows from keyword table: Empty DataFrame Columns: [id, keyword] Index: [] CREATE TABLE "made_by" ( "id" int, "msid" int, "pid" int, primary key("id"), foreign key("msid") references `copyright`("msid"), foreign key("pid") references `producer`("pid") ) 3 rows from made_by table: Empty DataFrame Columns: [id, msid, pid] Index: [] CREATE TABLE "movie" ( "mid" int, "title" text, "release_year" int, "title_aka" text, "budget" text, primary key("mid") ) 3 rows from movie table: Empty DataFrame Columns: [mid, title, release_year, title_aka, budget] Index: [] CREATE TABLE "tags" ( "id" int, "msid" int, "kid" int, primary key("id"), foreign key("msid") references `copyright`("msid"), foreign key("kid") references `keyword`("kid") ) 3 rows from tags table: Empty DataFrame Columns: [id, msid, kid] Index: [] CREATE TABLE "tv_series" ( "sid" int, "title" text, "release_year" int, "num_of_seasons" int, "num_of_episodes" int, "title_aka" text, "budget" text, primary key("sid") ) 3 rows from tv_series table: Empty DataFrame Columns: [sid, title, release_year, num_of_seasons, num_of_episodes, title_aka, budget] Index: [] CREATE TABLE "writer" ( "wid" int, "gender" text, "name" int, "nationality" int, "num_of_episodes" int, "birth_city" text, "birth_year" int, primary key("wid") ) 3 rows from writer table: Empty DataFrame Columns: [wid, gender, name, nationality, num_of_episodes, birth_city, birth_year] Index: [] CREATE TABLE "written_by" ( "id" int, "msid" int, "wid" int, foreign key("msid") references `copyright`("msid"), foreign key("wid") references `writer`("wid") ) 3 rows from written_by table: Empty DataFrame Columns: [id, msid, wid] Index: []
imdb
How many movies did " Quentin Tarantino " direct before 2002 and after 2010 ?
SELECT COUNT ( DISTINCT t4.title ) FROM director AS t3 JOIN directed_by AS t2 ON t3.did = t2.did JOIN movie AS t4 ON t4.mid = t2.msid JOIN made_by AS t5 ON t4.mid = t5.msid JOIN producer AS t1 ON t1.pid = t5.pid WHERE t3.name = "Quentin Tarantino" AND t4.release_year < 2010 AND t4.release_year > 2002;
CREATE TABLE "actor" ( "aid" int, "gender" text, "name" text, "nationality" text, "birth_city" text, "birth_year" int, primary key("aid") ) 3 rows from actor table: Empty DataFrame Columns: [aid, gender, name, nationality, birth_city, birth_year] Index: [] CREATE TABLE "copyright" ( "id" int, "msid" int, "cid" int, primary key("id") ) 3 rows from copyright table: Empty DataFrame Columns: [id, msid, cid] Index: [] CREATE TABLE "cast" ( "id" int, "msid" int, "aid" int, "role" int, primary key("id"), foreign key("aid") references `actor`("aid"), foreign key("msid") references `copyright`("msid") ) 3 rows from cast table: Empty DataFrame Columns: [id, msid, aid, role] Index: [] CREATE TABLE "genre" ( "gid" int, "genre" text, primary key("gid") ) 3 rows from genre table: Empty DataFrame Columns: [gid, genre] Index: [] CREATE TABLE "classification" ( "id" int, "msid" int, "gid" int, primary key("id"), foreign key("gid") references `genre`("gid"), foreign key("msid") references `copyright`("msid") ) 3 rows from classification table: Empty DataFrame Columns: [id, msid, gid] Index: [] CREATE TABLE "company" ( "id" int, "name" text, "country_code" text, primary key("id") ) 3 rows from company table: Empty DataFrame Columns: [id, name, country_code] Index: [] CREATE TABLE "director" ( "did" int, "gender" text, "name" text, "nationality" text, "birth_city" text, "birth_year" int, primary key("did") ) 3 rows from director table: Empty DataFrame Columns: [did, gender, name, nationality, birth_city, birth_year] Index: [] CREATE TABLE "producer" ( "pid" int, "gender" text, "name" text, "nationality" text, "birth_city" text, "birth_year" int, primary key("pid") ) 3 rows from producer table: Empty DataFrame Columns: [pid, gender, name, nationality, birth_city, birth_year] Index: [] CREATE TABLE "directed_by" ( "id" int, "msid" int, "did" int, primary key("id"), foreign key("msid") references `copyright`("msid"), foreign key("did") references `director`("did") ) 3 rows from directed_by table: Empty DataFrame Columns: [id, msid, did] Index: [] CREATE TABLE "keyword" ( "id" int, "keyword" text, primary key("id") ) 3 rows from keyword table: Empty DataFrame Columns: [id, keyword] Index: [] CREATE TABLE "made_by" ( "id" int, "msid" int, "pid" int, primary key("id"), foreign key("msid") references `copyright`("msid"), foreign key("pid") references `producer`("pid") ) 3 rows from made_by table: Empty DataFrame Columns: [id, msid, pid] Index: [] CREATE TABLE "movie" ( "mid" int, "title" text, "release_year" int, "title_aka" text, "budget" text, primary key("mid") ) 3 rows from movie table: Empty DataFrame Columns: [mid, title, release_year, title_aka, budget] Index: [] CREATE TABLE "tags" ( "id" int, "msid" int, "kid" int, primary key("id"), foreign key("msid") references `copyright`("msid"), foreign key("kid") references `keyword`("kid") ) 3 rows from tags table: Empty DataFrame Columns: [id, msid, kid] Index: [] CREATE TABLE "tv_series" ( "sid" int, "title" text, "release_year" int, "num_of_seasons" int, "num_of_episodes" int, "title_aka" text, "budget" text, primary key("sid") ) 3 rows from tv_series table: Empty DataFrame Columns: [sid, title, release_year, num_of_seasons, num_of_episodes, title_aka, budget] Index: [] CREATE TABLE "writer" ( "wid" int, "gender" text, "name" int, "nationality" int, "num_of_episodes" int, "birth_city" text, "birth_year" int, primary key("wid") ) 3 rows from writer table: Empty DataFrame Columns: [wid, gender, name, nationality, num_of_episodes, birth_city, birth_year] Index: [] CREATE TABLE "written_by" ( "id" int, "msid" int, "wid" int, foreign key("msid") references `copyright`("msid"), foreign key("wid") references `writer`("wid") ) 3 rows from written_by table: Empty DataFrame Columns: [id, msid, wid] Index: []
imdb
How many female actors were born in " New York City " after 1980 ?
SELECT COUNT ( DISTINCT name ) FROM actor WHERE birth_city = "New York City" AND birth_year > 1980 AND gender = "female";
CREATE TABLE "actor" ( "aid" int, "gender" text, "name" text, "nationality" text, "birth_city" text, "birth_year" int, primary key("aid") ) 3 rows from actor table: Empty DataFrame Columns: [aid, gender, name, nationality, birth_city, birth_year] Index: [] CREATE TABLE "copyright" ( "id" int, "msid" int, "cid" int, primary key("id") ) 3 rows from copyright table: Empty DataFrame Columns: [id, msid, cid] Index: [] CREATE TABLE "cast" ( "id" int, "msid" int, "aid" int, "role" int, primary key("id"), foreign key("aid") references `actor`("aid"), foreign key("msid") references `copyright`("msid") ) 3 rows from cast table: Empty DataFrame Columns: [id, msid, aid, role] Index: [] CREATE TABLE "genre" ( "gid" int, "genre" text, primary key("gid") ) 3 rows from genre table: Empty DataFrame Columns: [gid, genre] Index: [] CREATE TABLE "classification" ( "id" int, "msid" int, "gid" int, primary key("id"), foreign key("gid") references `genre`("gid"), foreign key("msid") references `copyright`("msid") ) 3 rows from classification table: Empty DataFrame Columns: [id, msid, gid] Index: [] CREATE TABLE "company" ( "id" int, "name" text, "country_code" text, primary key("id") ) 3 rows from company table: Empty DataFrame Columns: [id, name, country_code] Index: [] CREATE TABLE "director" ( "did" int, "gender" text, "name" text, "nationality" text, "birth_city" text, "birth_year" int, primary key("did") ) 3 rows from director table: Empty DataFrame Columns: [did, gender, name, nationality, birth_city, birth_year] Index: [] CREATE TABLE "producer" ( "pid" int, "gender" text, "name" text, "nationality" text, "birth_city" text, "birth_year" int, primary key("pid") ) 3 rows from producer table: Empty DataFrame Columns: [pid, gender, name, nationality, birth_city, birth_year] Index: [] CREATE TABLE "directed_by" ( "id" int, "msid" int, "did" int, primary key("id"), foreign key("msid") references `copyright`("msid"), foreign key("did") references `director`("did") ) 3 rows from directed_by table: Empty DataFrame Columns: [id, msid, did] Index: [] CREATE TABLE "keyword" ( "id" int, "keyword" text, primary key("id") ) 3 rows from keyword table: Empty DataFrame Columns: [id, keyword] Index: [] CREATE TABLE "made_by" ( "id" int, "msid" int, "pid" int, primary key("id"), foreign key("msid") references `copyright`("msid"), foreign key("pid") references `producer`("pid") ) 3 rows from made_by table: Empty DataFrame Columns: [id, msid, pid] Index: [] CREATE TABLE "movie" ( "mid" int, "title" text, "release_year" int, "title_aka" text, "budget" text, primary key("mid") ) 3 rows from movie table: Empty DataFrame Columns: [mid, title, release_year, title_aka, budget] Index: [] CREATE TABLE "tags" ( "id" int, "msid" int, "kid" int, primary key("id"), foreign key("msid") references `copyright`("msid"), foreign key("kid") references `keyword`("kid") ) 3 rows from tags table: Empty DataFrame Columns: [id, msid, kid] Index: [] CREATE TABLE "tv_series" ( "sid" int, "title" text, "release_year" int, "num_of_seasons" int, "num_of_episodes" int, "title_aka" text, "budget" text, primary key("sid") ) 3 rows from tv_series table: Empty DataFrame Columns: [sid, title, release_year, num_of_seasons, num_of_episodes, title_aka, budget] Index: [] CREATE TABLE "writer" ( "wid" int, "gender" text, "name" int, "nationality" int, "num_of_episodes" int, "birth_city" text, "birth_year" int, primary key("wid") ) 3 rows from writer table: Empty DataFrame Columns: [wid, gender, name, nationality, num_of_episodes, birth_city, birth_year] Index: [] CREATE TABLE "written_by" ( "id" int, "msid" int, "wid" int, foreign key("msid") references `copyright`("msid"), foreign key("wid") references `writer`("wid") ) 3 rows from written_by table: Empty DataFrame Columns: [id, msid, wid] Index: []
imdb
find the number of actors from Iran who played in " Jim Jarmusch " movies
SELECT COUNT ( DISTINCT t1.name ) FROM CAST AS t4 JOIN actor AS t1 ON t4.aid = t1.aid JOIN movie AS t5 ON t5.mid = t4.msid JOIN directed_by AS t2 ON t5.mid = t2.msid JOIN director AS t3 ON t3.did = t2.did WHERE t1.nationality = "Iran" AND t3.name = "Jim Jarmusch";
CREATE TABLE "actor" ( "aid" int, "gender" text, "name" text, "nationality" text, "birth_city" text, "birth_year" int, primary key("aid") ) 3 rows from actor table: Empty DataFrame Columns: [aid, gender, name, nationality, birth_city, birth_year] Index: [] CREATE TABLE "copyright" ( "id" int, "msid" int, "cid" int, primary key("id") ) 3 rows from copyright table: Empty DataFrame Columns: [id, msid, cid] Index: [] CREATE TABLE "cast" ( "id" int, "msid" int, "aid" int, "role" int, primary key("id"), foreign key("aid") references `actor`("aid"), foreign key("msid") references `copyright`("msid") ) 3 rows from cast table: Empty DataFrame Columns: [id, msid, aid, role] Index: [] CREATE TABLE "genre" ( "gid" int, "genre" text, primary key("gid") ) 3 rows from genre table: Empty DataFrame Columns: [gid, genre] Index: [] CREATE TABLE "classification" ( "id" int, "msid" int, "gid" int, primary key("id"), foreign key("gid") references `genre`("gid"), foreign key("msid") references `copyright`("msid") ) 3 rows from classification table: Empty DataFrame Columns: [id, msid, gid] Index: [] CREATE TABLE "company" ( "id" int, "name" text, "country_code" text, primary key("id") ) 3 rows from company table: Empty DataFrame Columns: [id, name, country_code] Index: [] CREATE TABLE "director" ( "did" int, "gender" text, "name" text, "nationality" text, "birth_city" text, "birth_year" int, primary key("did") ) 3 rows from director table: Empty DataFrame Columns: [did, gender, name, nationality, birth_city, birth_year] Index: [] CREATE TABLE "producer" ( "pid" int, "gender" text, "name" text, "nationality" text, "birth_city" text, "birth_year" int, primary key("pid") ) 3 rows from producer table: Empty DataFrame Columns: [pid, gender, name, nationality, birth_city, birth_year] Index: [] CREATE TABLE "directed_by" ( "id" int, "msid" int, "did" int, primary key("id"), foreign key("msid") references `copyright`("msid"), foreign key("did") references `director`("did") ) 3 rows from directed_by table: Empty DataFrame Columns: [id, msid, did] Index: [] CREATE TABLE "keyword" ( "id" int, "keyword" text, primary key("id") ) 3 rows from keyword table: Empty DataFrame Columns: [id, keyword] Index: [] CREATE TABLE "made_by" ( "id" int, "msid" int, "pid" int, primary key("id"), foreign key("msid") references `copyright`("msid"), foreign key("pid") references `producer`("pid") ) 3 rows from made_by table: Empty DataFrame Columns: [id, msid, pid] Index: [] CREATE TABLE "movie" ( "mid" int, "title" text, "release_year" int, "title_aka" text, "budget" text, primary key("mid") ) 3 rows from movie table: Empty DataFrame Columns: [mid, title, release_year, title_aka, budget] Index: [] CREATE TABLE "tags" ( "id" int, "msid" int, "kid" int, primary key("id"), foreign key("msid") references `copyright`("msid"), foreign key("kid") references `keyword`("kid") ) 3 rows from tags table: Empty DataFrame Columns: [id, msid, kid] Index: [] CREATE TABLE "tv_series" ( "sid" int, "title" text, "release_year" int, "num_of_seasons" int, "num_of_episodes" int, "title_aka" text, "budget" text, primary key("sid") ) 3 rows from tv_series table: Empty DataFrame Columns: [sid, title, release_year, num_of_seasons, num_of_episodes, title_aka, budget] Index: [] CREATE TABLE "writer" ( "wid" int, "gender" text, "name" int, "nationality" int, "num_of_episodes" int, "birth_city" text, "birth_year" int, primary key("wid") ) 3 rows from writer table: Empty DataFrame Columns: [wid, gender, name, nationality, num_of_episodes, birth_city, birth_year] Index: [] CREATE TABLE "written_by" ( "id" int, "msid" int, "wid" int, foreign key("msid") references `copyright`("msid"), foreign key("wid") references `writer`("wid") ) 3 rows from written_by table: Empty DataFrame Columns: [id, msid, wid] Index: []
imdb
How many actors from China have acted in " Rush Hour 3 "
SELECT COUNT ( DISTINCT t1.name ) FROM CAST AS t2 JOIN actor AS t1 ON t2.aid = t1.aid JOIN movie AS t3 ON t3.mid = t2.msid WHERE t1.nationality = "China" AND t3.title = "Rush Hour 3";
CREATE TABLE "actor" ( "aid" int, "gender" text, "name" text, "nationality" text, "birth_city" text, "birth_year" int, primary key("aid") ) 3 rows from actor table: Empty DataFrame Columns: [aid, gender, name, nationality, birth_city, birth_year] Index: [] CREATE TABLE "copyright" ( "id" int, "msid" int, "cid" int, primary key("id") ) 3 rows from copyright table: Empty DataFrame Columns: [id, msid, cid] Index: [] CREATE TABLE "cast" ( "id" int, "msid" int, "aid" int, "role" int, primary key("id"), foreign key("aid") references `actor`("aid"), foreign key("msid") references `copyright`("msid") ) 3 rows from cast table: Empty DataFrame Columns: [id, msid, aid, role] Index: [] CREATE TABLE "genre" ( "gid" int, "genre" text, primary key("gid") ) 3 rows from genre table: Empty DataFrame Columns: [gid, genre] Index: [] CREATE TABLE "classification" ( "id" int, "msid" int, "gid" int, primary key("id"), foreign key("gid") references `genre`("gid"), foreign key("msid") references `copyright`("msid") ) 3 rows from classification table: Empty DataFrame Columns: [id, msid, gid] Index: [] CREATE TABLE "company" ( "id" int, "name" text, "country_code" text, primary key("id") ) 3 rows from company table: Empty DataFrame Columns: [id, name, country_code] Index: [] CREATE TABLE "director" ( "did" int, "gender" text, "name" text, "nationality" text, "birth_city" text, "birth_year" int, primary key("did") ) 3 rows from director table: Empty DataFrame Columns: [did, gender, name, nationality, birth_city, birth_year] Index: [] CREATE TABLE "producer" ( "pid" int, "gender" text, "name" text, "nationality" text, "birth_city" text, "birth_year" int, primary key("pid") ) 3 rows from producer table: Empty DataFrame Columns: [pid, gender, name, nationality, birth_city, birth_year] Index: [] CREATE TABLE "directed_by" ( "id" int, "msid" int, "did" int, primary key("id"), foreign key("msid") references `copyright`("msid"), foreign key("did") references `director`("did") ) 3 rows from directed_by table: Empty DataFrame Columns: [id, msid, did] Index: [] CREATE TABLE "keyword" ( "id" int, "keyword" text, primary key("id") ) 3 rows from keyword table: Empty DataFrame Columns: [id, keyword] Index: [] CREATE TABLE "made_by" ( "id" int, "msid" int, "pid" int, primary key("id"), foreign key("msid") references `copyright`("msid"), foreign key("pid") references `producer`("pid") ) 3 rows from made_by table: Empty DataFrame Columns: [id, msid, pid] Index: [] CREATE TABLE "movie" ( "mid" int, "title" text, "release_year" int, "title_aka" text, "budget" text, primary key("mid") ) 3 rows from movie table: Empty DataFrame Columns: [mid, title, release_year, title_aka, budget] Index: [] CREATE TABLE "tags" ( "id" int, "msid" int, "kid" int, primary key("id"), foreign key("msid") references `copyright`("msid"), foreign key("kid") references `keyword`("kid") ) 3 rows from tags table: Empty DataFrame Columns: [id, msid, kid] Index: [] CREATE TABLE "tv_series" ( "sid" int, "title" text, "release_year" int, "num_of_seasons" int, "num_of_episodes" int, "title_aka" text, "budget" text, primary key("sid") ) 3 rows from tv_series table: Empty DataFrame Columns: [sid, title, release_year, num_of_seasons, num_of_episodes, title_aka, budget] Index: [] CREATE TABLE "writer" ( "wid" int, "gender" text, "name" int, "nationality" int, "num_of_episodes" int, "birth_city" text, "birth_year" int, primary key("wid") ) 3 rows from writer table: Empty DataFrame Columns: [wid, gender, name, nationality, num_of_episodes, birth_city, birth_year] Index: [] CREATE TABLE "written_by" ( "id" int, "msid" int, "wid" int, foreign key("msid") references `copyright`("msid"), foreign key("wid") references `writer`("wid") ) 3 rows from written_by table: Empty DataFrame Columns: [id, msid, wid] Index: []
imdb
Find all movies that star both " Woody Strode " and " Jason Robards "
SELECT t4.title FROM CAST AS t5 JOIN actor AS t1 ON t5.aid = t1.aid JOIN movie AS t4 ON t4.mid = t5.msid JOIN CAST AS t3 ON t4.mid = t3.msid JOIN actor AS t2 ON t3.aid = t2.aid WHERE t1.name = "Woody Strode" AND t2.name = "Jason Robards";
CREATE TABLE "actor" ( "aid" int, "gender" text, "name" text, "nationality" text, "birth_city" text, "birth_year" int, primary key("aid") ) 3 rows from actor table: Empty DataFrame Columns: [aid, gender, name, nationality, birth_city, birth_year] Index: [] CREATE TABLE "copyright" ( "id" int, "msid" int, "cid" int, primary key("id") ) 3 rows from copyright table: Empty DataFrame Columns: [id, msid, cid] Index: [] CREATE TABLE "cast" ( "id" int, "msid" int, "aid" int, "role" int, primary key("id"), foreign key("aid") references `actor`("aid"), foreign key("msid") references `copyright`("msid") ) 3 rows from cast table: Empty DataFrame Columns: [id, msid, aid, role] Index: [] CREATE TABLE "genre" ( "gid" int, "genre" text, primary key("gid") ) 3 rows from genre table: Empty DataFrame Columns: [gid, genre] Index: [] CREATE TABLE "classification" ( "id" int, "msid" int, "gid" int, primary key("id"), foreign key("gid") references `genre`("gid"), foreign key("msid") references `copyright`("msid") ) 3 rows from classification table: Empty DataFrame Columns: [id, msid, gid] Index: [] CREATE TABLE "company" ( "id" int, "name" text, "country_code" text, primary key("id") ) 3 rows from company table: Empty DataFrame Columns: [id, name, country_code] Index: [] CREATE TABLE "director" ( "did" int, "gender" text, "name" text, "nationality" text, "birth_city" text, "birth_year" int, primary key("did") ) 3 rows from director table: Empty DataFrame Columns: [did, gender, name, nationality, birth_city, birth_year] Index: [] CREATE TABLE "producer" ( "pid" int, "gender" text, "name" text, "nationality" text, "birth_city" text, "birth_year" int, primary key("pid") ) 3 rows from producer table: Empty DataFrame Columns: [pid, gender, name, nationality, birth_city, birth_year] Index: [] CREATE TABLE "directed_by" ( "id" int, "msid" int, "did" int, primary key("id"), foreign key("msid") references `copyright`("msid"), foreign key("did") references `director`("did") ) 3 rows from directed_by table: Empty DataFrame Columns: [id, msid, did] Index: [] CREATE TABLE "keyword" ( "id" int, "keyword" text, primary key("id") ) 3 rows from keyword table: Empty DataFrame Columns: [id, keyword] Index: [] CREATE TABLE "made_by" ( "id" int, "msid" int, "pid" int, primary key("id"), foreign key("msid") references `copyright`("msid"), foreign key("pid") references `producer`("pid") ) 3 rows from made_by table: Empty DataFrame Columns: [id, msid, pid] Index: [] CREATE TABLE "movie" ( "mid" int, "title" text, "release_year" int, "title_aka" text, "budget" text, primary key("mid") ) 3 rows from movie table: Empty DataFrame Columns: [mid, title, release_year, title_aka, budget] Index: [] CREATE TABLE "tags" ( "id" int, "msid" int, "kid" int, primary key("id"), foreign key("msid") references `copyright`("msid"), foreign key("kid") references `keyword`("kid") ) 3 rows from tags table: Empty DataFrame Columns: [id, msid, kid] Index: [] CREATE TABLE "tv_series" ( "sid" int, "title" text, "release_year" int, "num_of_seasons" int, "num_of_episodes" int, "title_aka" text, "budget" text, primary key("sid") ) 3 rows from tv_series table: Empty DataFrame Columns: [sid, title, release_year, num_of_seasons, num_of_episodes, title_aka, budget] Index: [] CREATE TABLE "writer" ( "wid" int, "gender" text, "name" int, "nationality" int, "num_of_episodes" int, "birth_city" text, "birth_year" int, primary key("wid") ) 3 rows from writer table: Empty DataFrame Columns: [wid, gender, name, nationality, num_of_episodes, birth_city, birth_year] Index: [] CREATE TABLE "written_by" ( "id" int, "msid" int, "wid" int, foreign key("msid") references `copyright`("msid"), foreign key("wid") references `writer`("wid") ) 3 rows from written_by table: Empty DataFrame Columns: [id, msid, wid] Index: []
imdb
Find all movies featuring " Woody Strode " and " Jason Robards "
SELECT t4.title FROM CAST AS t5 JOIN actor AS t1 ON t5.aid = t1.aid JOIN movie AS t4 ON t4.mid = t5.msid JOIN CAST AS t3 ON t4.mid = t3.msid JOIN actor AS t2 ON t3.aid = t2.aid WHERE t1.name = "Woody Strode" AND t2.name = "Jason Robards";
CREATE TABLE "actor" ( "aid" int, "gender" text, "name" text, "nationality" text, "birth_city" text, "birth_year" int, primary key("aid") ) 3 rows from actor table: Empty DataFrame Columns: [aid, gender, name, nationality, birth_city, birth_year] Index: [] CREATE TABLE "copyright" ( "id" int, "msid" int, "cid" int, primary key("id") ) 3 rows from copyright table: Empty DataFrame Columns: [id, msid, cid] Index: [] CREATE TABLE "cast" ( "id" int, "msid" int, "aid" int, "role" int, primary key("id"), foreign key("aid") references `actor`("aid"), foreign key("msid") references `copyright`("msid") ) 3 rows from cast table: Empty DataFrame Columns: [id, msid, aid, role] Index: [] CREATE TABLE "genre" ( "gid" int, "genre" text, primary key("gid") ) 3 rows from genre table: Empty DataFrame Columns: [gid, genre] Index: [] CREATE TABLE "classification" ( "id" int, "msid" int, "gid" int, primary key("id"), foreign key("gid") references `genre`("gid"), foreign key("msid") references `copyright`("msid") ) 3 rows from classification table: Empty DataFrame Columns: [id, msid, gid] Index: [] CREATE TABLE "company" ( "id" int, "name" text, "country_code" text, primary key("id") ) 3 rows from company table: Empty DataFrame Columns: [id, name, country_code] Index: [] CREATE TABLE "director" ( "did" int, "gender" text, "name" text, "nationality" text, "birth_city" text, "birth_year" int, primary key("did") ) 3 rows from director table: Empty DataFrame Columns: [did, gender, name, nationality, birth_city, birth_year] Index: [] CREATE TABLE "producer" ( "pid" int, "gender" text, "name" text, "nationality" text, "birth_city" text, "birth_year" int, primary key("pid") ) 3 rows from producer table: Empty DataFrame Columns: [pid, gender, name, nationality, birth_city, birth_year] Index: [] CREATE TABLE "directed_by" ( "id" int, "msid" int, "did" int, primary key("id"), foreign key("msid") references `copyright`("msid"), foreign key("did") references `director`("did") ) 3 rows from directed_by table: Empty DataFrame Columns: [id, msid, did] Index: [] CREATE TABLE "keyword" ( "id" int, "keyword" text, primary key("id") ) 3 rows from keyword table: Empty DataFrame Columns: [id, keyword] Index: [] CREATE TABLE "made_by" ( "id" int, "msid" int, "pid" int, primary key("id"), foreign key("msid") references `copyright`("msid"), foreign key("pid") references `producer`("pid") ) 3 rows from made_by table: Empty DataFrame Columns: [id, msid, pid] Index: [] CREATE TABLE "movie" ( "mid" int, "title" text, "release_year" int, "title_aka" text, "budget" text, primary key("mid") ) 3 rows from movie table: Empty DataFrame Columns: [mid, title, release_year, title_aka, budget] Index: [] CREATE TABLE "tags" ( "id" int, "msid" int, "kid" int, primary key("id"), foreign key("msid") references `copyright`("msid"), foreign key("kid") references `keyword`("kid") ) 3 rows from tags table: Empty DataFrame Columns: [id, msid, kid] Index: [] CREATE TABLE "tv_series" ( "sid" int, "title" text, "release_year" int, "num_of_seasons" int, "num_of_episodes" int, "title_aka" text, "budget" text, primary key("sid") ) 3 rows from tv_series table: Empty DataFrame Columns: [sid, title, release_year, num_of_seasons, num_of_episodes, title_aka, budget] Index: [] CREATE TABLE "writer" ( "wid" int, "gender" text, "name" int, "nationality" int, "num_of_episodes" int, "birth_city" text, "birth_year" int, primary key("wid") ) 3 rows from writer table: Empty DataFrame Columns: [wid, gender, name, nationality, num_of_episodes, birth_city, birth_year] Index: [] CREATE TABLE "written_by" ( "id" int, "msid" int, "wid" int, foreign key("msid") references `copyright`("msid"), foreign key("wid") references `writer`("wid") ) 3 rows from written_by table: Empty DataFrame Columns: [id, msid, wid] Index: []
imdb
Find all movies featuring both " Woody Strode " and " Jason Robards "
SELECT t4.title FROM CAST AS t5 JOIN actor AS t1 ON t5.aid = t1.aid JOIN movie AS t4 ON t4.mid = t5.msid JOIN CAST AS t3 ON t4.mid = t3.msid JOIN actor AS t2 ON t3.aid = t2.aid WHERE t1.name = "Woody Strode" AND t2.name = "Jason Robards";
CREATE TABLE "actor" ( "aid" int, "gender" text, "name" text, "nationality" text, "birth_city" text, "birth_year" int, primary key("aid") ) 3 rows from actor table: Empty DataFrame Columns: [aid, gender, name, nationality, birth_city, birth_year] Index: [] CREATE TABLE "copyright" ( "id" int, "msid" int, "cid" int, primary key("id") ) 3 rows from copyright table: Empty DataFrame Columns: [id, msid, cid] Index: [] CREATE TABLE "cast" ( "id" int, "msid" int, "aid" int, "role" int, primary key("id"), foreign key("aid") references `actor`("aid"), foreign key("msid") references `copyright`("msid") ) 3 rows from cast table: Empty DataFrame Columns: [id, msid, aid, role] Index: [] CREATE TABLE "genre" ( "gid" int, "genre" text, primary key("gid") ) 3 rows from genre table: Empty DataFrame Columns: [gid, genre] Index: [] CREATE TABLE "classification" ( "id" int, "msid" int, "gid" int, primary key("id"), foreign key("gid") references `genre`("gid"), foreign key("msid") references `copyright`("msid") ) 3 rows from classification table: Empty DataFrame Columns: [id, msid, gid] Index: [] CREATE TABLE "company" ( "id" int, "name" text, "country_code" text, primary key("id") ) 3 rows from company table: Empty DataFrame Columns: [id, name, country_code] Index: [] CREATE TABLE "director" ( "did" int, "gender" text, "name" text, "nationality" text, "birth_city" text, "birth_year" int, primary key("did") ) 3 rows from director table: Empty DataFrame Columns: [did, gender, name, nationality, birth_city, birth_year] Index: [] CREATE TABLE "producer" ( "pid" int, "gender" text, "name" text, "nationality" text, "birth_city" text, "birth_year" int, primary key("pid") ) 3 rows from producer table: Empty DataFrame Columns: [pid, gender, name, nationality, birth_city, birth_year] Index: [] CREATE TABLE "directed_by" ( "id" int, "msid" int, "did" int, primary key("id"), foreign key("msid") references `copyright`("msid"), foreign key("did") references `director`("did") ) 3 rows from directed_by table: Empty DataFrame Columns: [id, msid, did] Index: [] CREATE TABLE "keyword" ( "id" int, "keyword" text, primary key("id") ) 3 rows from keyword table: Empty DataFrame Columns: [id, keyword] Index: [] CREATE TABLE "made_by" ( "id" int, "msid" int, "pid" int, primary key("id"), foreign key("msid") references `copyright`("msid"), foreign key("pid") references `producer`("pid") ) 3 rows from made_by table: Empty DataFrame Columns: [id, msid, pid] Index: [] CREATE TABLE "movie" ( "mid" int, "title" text, "release_year" int, "title_aka" text, "budget" text, primary key("mid") ) 3 rows from movie table: Empty DataFrame Columns: [mid, title, release_year, title_aka, budget] Index: [] CREATE TABLE "tags" ( "id" int, "msid" int, "kid" int, primary key("id"), foreign key("msid") references `copyright`("msid"), foreign key("kid") references `keyword`("kid") ) 3 rows from tags table: Empty DataFrame Columns: [id, msid, kid] Index: [] CREATE TABLE "tv_series" ( "sid" int, "title" text, "release_year" int, "num_of_seasons" int, "num_of_episodes" int, "title_aka" text, "budget" text, primary key("sid") ) 3 rows from tv_series table: Empty DataFrame Columns: [sid, title, release_year, num_of_seasons, num_of_episodes, title_aka, budget] Index: [] CREATE TABLE "writer" ( "wid" int, "gender" text, "name" int, "nationality" int, "num_of_episodes" int, "birth_city" text, "birth_year" int, primary key("wid") ) 3 rows from writer table: Empty DataFrame Columns: [wid, gender, name, nationality, num_of_episodes, birth_city, birth_year] Index: [] CREATE TABLE "written_by" ( "id" int, "msid" int, "wid" int, foreign key("msid") references `copyright`("msid"), foreign key("wid") references `writer`("wid") ) 3 rows from written_by table: Empty DataFrame Columns: [id, msid, wid] Index: []
imdb
Find all movies featuring " Jason Robards " and " Woody Strode "
SELECT t4.title FROM CAST AS t5 JOIN actor AS t1 ON t5.aid = t1.aid JOIN movie AS t4 ON t4.mid = t5.msid JOIN CAST AS t3 ON t4.mid = t3.msid JOIN actor AS t2 ON t3.aid = t2.aid WHERE t1.name = "Woody Strode" AND t2.name = "Jason Robards";
CREATE TABLE "actor" ( "aid" int, "gender" text, "name" text, "nationality" text, "birth_city" text, "birth_year" int, primary key("aid") ) 3 rows from actor table: Empty DataFrame Columns: [aid, gender, name, nationality, birth_city, birth_year] Index: [] CREATE TABLE "copyright" ( "id" int, "msid" int, "cid" int, primary key("id") ) 3 rows from copyright table: Empty DataFrame Columns: [id, msid, cid] Index: [] CREATE TABLE "cast" ( "id" int, "msid" int, "aid" int, "role" int, primary key("id"), foreign key("aid") references `actor`("aid"), foreign key("msid") references `copyright`("msid") ) 3 rows from cast table: Empty DataFrame Columns: [id, msid, aid, role] Index: [] CREATE TABLE "genre" ( "gid" int, "genre" text, primary key("gid") ) 3 rows from genre table: Empty DataFrame Columns: [gid, genre] Index: [] CREATE TABLE "classification" ( "id" int, "msid" int, "gid" int, primary key("id"), foreign key("gid") references `genre`("gid"), foreign key("msid") references `copyright`("msid") ) 3 rows from classification table: Empty DataFrame Columns: [id, msid, gid] Index: [] CREATE TABLE "company" ( "id" int, "name" text, "country_code" text, primary key("id") ) 3 rows from company table: Empty DataFrame Columns: [id, name, country_code] Index: [] CREATE TABLE "director" ( "did" int, "gender" text, "name" text, "nationality" text, "birth_city" text, "birth_year" int, primary key("did") ) 3 rows from director table: Empty DataFrame Columns: [did, gender, name, nationality, birth_city, birth_year] Index: [] CREATE TABLE "producer" ( "pid" int, "gender" text, "name" text, "nationality" text, "birth_city" text, "birth_year" int, primary key("pid") ) 3 rows from producer table: Empty DataFrame Columns: [pid, gender, name, nationality, birth_city, birth_year] Index: [] CREATE TABLE "directed_by" ( "id" int, "msid" int, "did" int, primary key("id"), foreign key("msid") references `copyright`("msid"), foreign key("did") references `director`("did") ) 3 rows from directed_by table: Empty DataFrame Columns: [id, msid, did] Index: [] CREATE TABLE "keyword" ( "id" int, "keyword" text, primary key("id") ) 3 rows from keyword table: Empty DataFrame Columns: [id, keyword] Index: [] CREATE TABLE "made_by" ( "id" int, "msid" int, "pid" int, primary key("id"), foreign key("msid") references `copyright`("msid"), foreign key("pid") references `producer`("pid") ) 3 rows from made_by table: Empty DataFrame Columns: [id, msid, pid] Index: [] CREATE TABLE "movie" ( "mid" int, "title" text, "release_year" int, "title_aka" text, "budget" text, primary key("mid") ) 3 rows from movie table: Empty DataFrame Columns: [mid, title, release_year, title_aka, budget] Index: [] CREATE TABLE "tags" ( "id" int, "msid" int, "kid" int, primary key("id"), foreign key("msid") references `copyright`("msid"), foreign key("kid") references `keyword`("kid") ) 3 rows from tags table: Empty DataFrame Columns: [id, msid, kid] Index: [] CREATE TABLE "tv_series" ( "sid" int, "title" text, "release_year" int, "num_of_seasons" int, "num_of_episodes" int, "title_aka" text, "budget" text, primary key("sid") ) 3 rows from tv_series table: Empty DataFrame Columns: [sid, title, release_year, num_of_seasons, num_of_episodes, title_aka, budget] Index: [] CREATE TABLE "writer" ( "wid" int, "gender" text, "name" int, "nationality" int, "num_of_episodes" int, "birth_city" text, "birth_year" int, primary key("wid") ) 3 rows from writer table: Empty DataFrame Columns: [wid, gender, name, nationality, num_of_episodes, birth_city, birth_year] Index: [] CREATE TABLE "written_by" ( "id" int, "msid" int, "wid" int, foreign key("msid") references `copyright`("msid"), foreign key("wid") references `writer`("wid") ) 3 rows from written_by table: Empty DataFrame Columns: [id, msid, wid] Index: []
imdb
Find all actors who acted in the same movie as " Tom Hanks "
SELECT t1.name FROM CAST AS t4 JOIN actor AS t1 ON t4.aid = t1.aid JOIN movie AS t5 ON t5.mid = t4.msid JOIN CAST AS t3 ON t5.mid = t3.msid JOIN actor AS t2 ON t3.aid = t2.aid WHERE t2.name = "Tom Hanks";
CREATE TABLE "actor" ( "aid" int, "gender" text, "name" text, "nationality" text, "birth_city" text, "birth_year" int, primary key("aid") ) 3 rows from actor table: Empty DataFrame Columns: [aid, gender, name, nationality, birth_city, birth_year] Index: [] CREATE TABLE "copyright" ( "id" int, "msid" int, "cid" int, primary key("id") ) 3 rows from copyright table: Empty DataFrame Columns: [id, msid, cid] Index: [] CREATE TABLE "cast" ( "id" int, "msid" int, "aid" int, "role" int, primary key("id"), foreign key("aid") references `actor`("aid"), foreign key("msid") references `copyright`("msid") ) 3 rows from cast table: Empty DataFrame Columns: [id, msid, aid, role] Index: [] CREATE TABLE "genre" ( "gid" int, "genre" text, primary key("gid") ) 3 rows from genre table: Empty DataFrame Columns: [gid, genre] Index: [] CREATE TABLE "classification" ( "id" int, "msid" int, "gid" int, primary key("id"), foreign key("gid") references `genre`("gid"), foreign key("msid") references `copyright`("msid") ) 3 rows from classification table: Empty DataFrame Columns: [id, msid, gid] Index: [] CREATE TABLE "company" ( "id" int, "name" text, "country_code" text, primary key("id") ) 3 rows from company table: Empty DataFrame Columns: [id, name, country_code] Index: [] CREATE TABLE "director" ( "did" int, "gender" text, "name" text, "nationality" text, "birth_city" text, "birth_year" int, primary key("did") ) 3 rows from director table: Empty DataFrame Columns: [did, gender, name, nationality, birth_city, birth_year] Index: [] CREATE TABLE "producer" ( "pid" int, "gender" text, "name" text, "nationality" text, "birth_city" text, "birth_year" int, primary key("pid") ) 3 rows from producer table: Empty DataFrame Columns: [pid, gender, name, nationality, birth_city, birth_year] Index: [] CREATE TABLE "directed_by" ( "id" int, "msid" int, "did" int, primary key("id"), foreign key("msid") references `copyright`("msid"), foreign key("did") references `director`("did") ) 3 rows from directed_by table: Empty DataFrame Columns: [id, msid, did] Index: [] CREATE TABLE "keyword" ( "id" int, "keyword" text, primary key("id") ) 3 rows from keyword table: Empty DataFrame Columns: [id, keyword] Index: [] CREATE TABLE "made_by" ( "id" int, "msid" int, "pid" int, primary key("id"), foreign key("msid") references `copyright`("msid"), foreign key("pid") references `producer`("pid") ) 3 rows from made_by table: Empty DataFrame Columns: [id, msid, pid] Index: [] CREATE TABLE "movie" ( "mid" int, "title" text, "release_year" int, "title_aka" text, "budget" text, primary key("mid") ) 3 rows from movie table: Empty DataFrame Columns: [mid, title, release_year, title_aka, budget] Index: [] CREATE TABLE "tags" ( "id" int, "msid" int, "kid" int, primary key("id"), foreign key("msid") references `copyright`("msid"), foreign key("kid") references `keyword`("kid") ) 3 rows from tags table: Empty DataFrame Columns: [id, msid, kid] Index: [] CREATE TABLE "tv_series" ( "sid" int, "title" text, "release_year" int, "num_of_seasons" int, "num_of_episodes" int, "title_aka" text, "budget" text, primary key("sid") ) 3 rows from tv_series table: Empty DataFrame Columns: [sid, title, release_year, num_of_seasons, num_of_episodes, title_aka, budget] Index: [] CREATE TABLE "writer" ( "wid" int, "gender" text, "name" int, "nationality" int, "num_of_episodes" int, "birth_city" text, "birth_year" int, primary key("wid") ) 3 rows from writer table: Empty DataFrame Columns: [wid, gender, name, nationality, num_of_episodes, birth_city, birth_year] Index: [] CREATE TABLE "written_by" ( "id" int, "msid" int, "wid" int, foreign key("msid") references `copyright`("msid"), foreign key("wid") references `writer`("wid") ) 3 rows from written_by table: Empty DataFrame Columns: [id, msid, wid] Index: []
imdb
What movies have the same director as the movie " Revolutionary Road " ?
SELECT t3.title FROM director AS t5 JOIN directed_by AS t2 ON t5.did = t2.did JOIN directed_by AS t1 ON t5.did = t1.did JOIN movie AS t4 ON t4.mid = t2.msid JOIN movie AS t3 ON t3.mid = t1.msid WHERE t4.title = "Revolutionary Road";
CREATE TABLE "actor" ( "aid" int, "gender" text, "name" text, "nationality" text, "birth_city" text, "birth_year" int, primary key("aid") ) 3 rows from actor table: Empty DataFrame Columns: [aid, gender, name, nationality, birth_city, birth_year] Index: [] CREATE TABLE "copyright" ( "id" int, "msid" int, "cid" int, primary key("id") ) 3 rows from copyright table: Empty DataFrame Columns: [id, msid, cid] Index: [] CREATE TABLE "cast" ( "id" int, "msid" int, "aid" int, "role" int, primary key("id"), foreign key("aid") references `actor`("aid"), foreign key("msid") references `copyright`("msid") ) 3 rows from cast table: Empty DataFrame Columns: [id, msid, aid, role] Index: [] CREATE TABLE "genre" ( "gid" int, "genre" text, primary key("gid") ) 3 rows from genre table: Empty DataFrame Columns: [gid, genre] Index: [] CREATE TABLE "classification" ( "id" int, "msid" int, "gid" int, primary key("id"), foreign key("gid") references `genre`("gid"), foreign key("msid") references `copyright`("msid") ) 3 rows from classification table: Empty DataFrame Columns: [id, msid, gid] Index: [] CREATE TABLE "company" ( "id" int, "name" text, "country_code" text, primary key("id") ) 3 rows from company table: Empty DataFrame Columns: [id, name, country_code] Index: [] CREATE TABLE "director" ( "did" int, "gender" text, "name" text, "nationality" text, "birth_city" text, "birth_year" int, primary key("did") ) 3 rows from director table: Empty DataFrame Columns: [did, gender, name, nationality, birth_city, birth_year] Index: [] CREATE TABLE "producer" ( "pid" int, "gender" text, "name" text, "nationality" text, "birth_city" text, "birth_year" int, primary key("pid") ) 3 rows from producer table: Empty DataFrame Columns: [pid, gender, name, nationality, birth_city, birth_year] Index: [] CREATE TABLE "directed_by" ( "id" int, "msid" int, "did" int, primary key("id"), foreign key("msid") references `copyright`("msid"), foreign key("did") references `director`("did") ) 3 rows from directed_by table: Empty DataFrame Columns: [id, msid, did] Index: [] CREATE TABLE "keyword" ( "id" int, "keyword" text, primary key("id") ) 3 rows from keyword table: Empty DataFrame Columns: [id, keyword] Index: [] CREATE TABLE "made_by" ( "id" int, "msid" int, "pid" int, primary key("id"), foreign key("msid") references `copyright`("msid"), foreign key("pid") references `producer`("pid") ) 3 rows from made_by table: Empty DataFrame Columns: [id, msid, pid] Index: [] CREATE TABLE "movie" ( "mid" int, "title" text, "release_year" int, "title_aka" text, "budget" text, primary key("mid") ) 3 rows from movie table: Empty DataFrame Columns: [mid, title, release_year, title_aka, budget] Index: [] CREATE TABLE "tags" ( "id" int, "msid" int, "kid" int, primary key("id"), foreign key("msid") references `copyright`("msid"), foreign key("kid") references `keyword`("kid") ) 3 rows from tags table: Empty DataFrame Columns: [id, msid, kid] Index: [] CREATE TABLE "tv_series" ( "sid" int, "title" text, "release_year" int, "num_of_seasons" int, "num_of_episodes" int, "title_aka" text, "budget" text, primary key("sid") ) 3 rows from tv_series table: Empty DataFrame Columns: [sid, title, release_year, num_of_seasons, num_of_episodes, title_aka, budget] Index: [] CREATE TABLE "writer" ( "wid" int, "gender" text, "name" int, "nationality" int, "num_of_episodes" int, "birth_city" text, "birth_year" int, primary key("wid") ) 3 rows from writer table: Empty DataFrame Columns: [wid, gender, name, nationality, num_of_episodes, birth_city, birth_year] Index: [] CREATE TABLE "written_by" ( "id" int, "msid" int, "wid" int, foreign key("msid") references `copyright`("msid"), foreign key("wid") references `writer`("wid") ) 3 rows from written_by table: Empty DataFrame Columns: [id, msid, wid] Index: []
imdb
Find the movie which is classified in the most number of genres
SELECT t3.title FROM genre AS t2 JOIN classification AS t1 ON t2.gid = t1.gid JOIN movie AS t3 ON t3.mid = t1.msid GROUP BY t3.title ORDER BY COUNT ( DISTINCT t2.genre ) DESC LIMIT 1;
CREATE TABLE "actor" ( "aid" int, "gender" text, "name" text, "nationality" text, "birth_city" text, "birth_year" int, primary key("aid") ) 3 rows from actor table: Empty DataFrame Columns: [aid, gender, name, nationality, birth_city, birth_year] Index: [] CREATE TABLE "copyright" ( "id" int, "msid" int, "cid" int, primary key("id") ) 3 rows from copyright table: Empty DataFrame Columns: [id, msid, cid] Index: [] CREATE TABLE "cast" ( "id" int, "msid" int, "aid" int, "role" int, primary key("id"), foreign key("aid") references `actor`("aid"), foreign key("msid") references `copyright`("msid") ) 3 rows from cast table: Empty DataFrame Columns: [id, msid, aid, role] Index: [] CREATE TABLE "genre" ( "gid" int, "genre" text, primary key("gid") ) 3 rows from genre table: Empty DataFrame Columns: [gid, genre] Index: [] CREATE TABLE "classification" ( "id" int, "msid" int, "gid" int, primary key("id"), foreign key("gid") references `genre`("gid"), foreign key("msid") references `copyright`("msid") ) 3 rows from classification table: Empty DataFrame Columns: [id, msid, gid] Index: [] CREATE TABLE "company" ( "id" int, "name" text, "country_code" text, primary key("id") ) 3 rows from company table: Empty DataFrame Columns: [id, name, country_code] Index: [] CREATE TABLE "director" ( "did" int, "gender" text, "name" text, "nationality" text, "birth_city" text, "birth_year" int, primary key("did") ) 3 rows from director table: Empty DataFrame Columns: [did, gender, name, nationality, birth_city, birth_year] Index: [] CREATE TABLE "producer" ( "pid" int, "gender" text, "name" text, "nationality" text, "birth_city" text, "birth_year" int, primary key("pid") ) 3 rows from producer table: Empty DataFrame Columns: [pid, gender, name, nationality, birth_city, birth_year] Index: [] CREATE TABLE "directed_by" ( "id" int, "msid" int, "did" int, primary key("id"), foreign key("msid") references `copyright`("msid"), foreign key("did") references `director`("did") ) 3 rows from directed_by table: Empty DataFrame Columns: [id, msid, did] Index: [] CREATE TABLE "keyword" ( "id" int, "keyword" text, primary key("id") ) 3 rows from keyword table: Empty DataFrame Columns: [id, keyword] Index: [] CREATE TABLE "made_by" ( "id" int, "msid" int, "pid" int, primary key("id"), foreign key("msid") references `copyright`("msid"), foreign key("pid") references `producer`("pid") ) 3 rows from made_by table: Empty DataFrame Columns: [id, msid, pid] Index: [] CREATE TABLE "movie" ( "mid" int, "title" text, "release_year" int, "title_aka" text, "budget" text, primary key("mid") ) 3 rows from movie table: Empty DataFrame Columns: [mid, title, release_year, title_aka, budget] Index: [] CREATE TABLE "tags" ( "id" int, "msid" int, "kid" int, primary key("id"), foreign key("msid") references `copyright`("msid"), foreign key("kid") references `keyword`("kid") ) 3 rows from tags table: Empty DataFrame Columns: [id, msid, kid] Index: [] CREATE TABLE "tv_series" ( "sid" int, "title" text, "release_year" int, "num_of_seasons" int, "num_of_episodes" int, "title_aka" text, "budget" text, primary key("sid") ) 3 rows from tv_series table: Empty DataFrame Columns: [sid, title, release_year, num_of_seasons, num_of_episodes, title_aka, budget] Index: [] CREATE TABLE "writer" ( "wid" int, "gender" text, "name" int, "nationality" int, "num_of_episodes" int, "birth_city" text, "birth_year" int, primary key("wid") ) 3 rows from writer table: Empty DataFrame Columns: [wid, gender, name, nationality, num_of_episodes, birth_city, birth_year] Index: [] CREATE TABLE "written_by" ( "id" int, "msid" int, "wid" int, foreign key("msid") references `copyright`("msid"), foreign key("wid") references `writer`("wid") ) 3 rows from written_by table: Empty DataFrame Columns: [id, msid, wid] Index: []
imdb
which movie has the most number of actors from China ?
SELECT t2.title FROM CAST AS t3 JOIN actor AS t1 ON t3.aid = t1.aid JOIN movie AS t2 ON t2.mid = t3.msid WHERE t1.nationality = "China" GROUP BY t2.title ORDER BY COUNT ( DISTINCT t1.name ) DESC LIMIT 1;
CREATE TABLE "actor" ( "aid" int, "gender" text, "name" text, "nationality" text, "birth_city" text, "birth_year" int, primary key("aid") ) 3 rows from actor table: Empty DataFrame Columns: [aid, gender, name, nationality, birth_city, birth_year] Index: [] CREATE TABLE "copyright" ( "id" int, "msid" int, "cid" int, primary key("id") ) 3 rows from copyright table: Empty DataFrame Columns: [id, msid, cid] Index: [] CREATE TABLE "cast" ( "id" int, "msid" int, "aid" int, "role" int, primary key("id"), foreign key("aid") references `actor`("aid"), foreign key("msid") references `copyright`("msid") ) 3 rows from cast table: Empty DataFrame Columns: [id, msid, aid, role] Index: [] CREATE TABLE "genre" ( "gid" int, "genre" text, primary key("gid") ) 3 rows from genre table: Empty DataFrame Columns: [gid, genre] Index: [] CREATE TABLE "classification" ( "id" int, "msid" int, "gid" int, primary key("id"), foreign key("gid") references `genre`("gid"), foreign key("msid") references `copyright`("msid") ) 3 rows from classification table: Empty DataFrame Columns: [id, msid, gid] Index: [] CREATE TABLE "company" ( "id" int, "name" text, "country_code" text, primary key("id") ) 3 rows from company table: Empty DataFrame Columns: [id, name, country_code] Index: [] CREATE TABLE "director" ( "did" int, "gender" text, "name" text, "nationality" text, "birth_city" text, "birth_year" int, primary key("did") ) 3 rows from director table: Empty DataFrame Columns: [did, gender, name, nationality, birth_city, birth_year] Index: [] CREATE TABLE "producer" ( "pid" int, "gender" text, "name" text, "nationality" text, "birth_city" text, "birth_year" int, primary key("pid") ) 3 rows from producer table: Empty DataFrame Columns: [pid, gender, name, nationality, birth_city, birth_year] Index: [] CREATE TABLE "directed_by" ( "id" int, "msid" int, "did" int, primary key("id"), foreign key("msid") references `copyright`("msid"), foreign key("did") references `director`("did") ) 3 rows from directed_by table: Empty DataFrame Columns: [id, msid, did] Index: [] CREATE TABLE "keyword" ( "id" int, "keyword" text, primary key("id") ) 3 rows from keyword table: Empty DataFrame Columns: [id, keyword] Index: [] CREATE TABLE "made_by" ( "id" int, "msid" int, "pid" int, primary key("id"), foreign key("msid") references `copyright`("msid"), foreign key("pid") references `producer`("pid") ) 3 rows from made_by table: Empty DataFrame Columns: [id, msid, pid] Index: [] CREATE TABLE "movie" ( "mid" int, "title" text, "release_year" int, "title_aka" text, "budget" text, primary key("mid") ) 3 rows from movie table: Empty DataFrame Columns: [mid, title, release_year, title_aka, budget] Index: [] CREATE TABLE "tags" ( "id" int, "msid" int, "kid" int, primary key("id"), foreign key("msid") references `copyright`("msid"), foreign key("kid") references `keyword`("kid") ) 3 rows from tags table: Empty DataFrame Columns: [id, msid, kid] Index: [] CREATE TABLE "tv_series" ( "sid" int, "title" text, "release_year" int, "num_of_seasons" int, "num_of_episodes" int, "title_aka" text, "budget" text, primary key("sid") ) 3 rows from tv_series table: Empty DataFrame Columns: [sid, title, release_year, num_of_seasons, num_of_episodes, title_aka, budget] Index: [] CREATE TABLE "writer" ( "wid" int, "gender" text, "name" int, "nationality" int, "num_of_episodes" int, "birth_city" text, "birth_year" int, primary key("wid") ) 3 rows from writer table: Empty DataFrame Columns: [wid, gender, name, nationality, num_of_episodes, birth_city, birth_year] Index: [] CREATE TABLE "written_by" ( "id" int, "msid" int, "wid" int, foreign key("msid") references `copyright`("msid"), foreign key("wid") references `writer`("wid") ) 3 rows from written_by table: Empty DataFrame Columns: [id, msid, wid] Index: []
imdb
Find the actors who played in the latest movie by " Quentin Tarantino "
SELECT t1.name FROM CAST AS t4 JOIN actor AS t1 ON t4.aid = t1.aid JOIN movie AS t5 ON t5.mid = t4.msid JOIN directed_by AS t2 ON t5.mid = t2.msid JOIN director AS t3 ON t3.did = t2.did WHERE t3.name = "Quentin Tarantino" ORDER BY t5.release_year DESC LIMIT 1;
CREATE TABLE "actor" ( "aid" int, "gender" text, "name" text, "nationality" text, "birth_city" text, "birth_year" int, primary key("aid") ) 3 rows from actor table: Empty DataFrame Columns: [aid, gender, name, nationality, birth_city, birth_year] Index: [] CREATE TABLE "copyright" ( "id" int, "msid" int, "cid" int, primary key("id") ) 3 rows from copyright table: Empty DataFrame Columns: [id, msid, cid] Index: [] CREATE TABLE "cast" ( "id" int, "msid" int, "aid" int, "role" int, primary key("id"), foreign key("aid") references `actor`("aid"), foreign key("msid") references `copyright`("msid") ) 3 rows from cast table: Empty DataFrame Columns: [id, msid, aid, role] Index: [] CREATE TABLE "genre" ( "gid" int, "genre" text, primary key("gid") ) 3 rows from genre table: Empty DataFrame Columns: [gid, genre] Index: [] CREATE TABLE "classification" ( "id" int, "msid" int, "gid" int, primary key("id"), foreign key("gid") references `genre`("gid"), foreign key("msid") references `copyright`("msid") ) 3 rows from classification table: Empty DataFrame Columns: [id, msid, gid] Index: [] CREATE TABLE "company" ( "id" int, "name" text, "country_code" text, primary key("id") ) 3 rows from company table: Empty DataFrame Columns: [id, name, country_code] Index: [] CREATE TABLE "director" ( "did" int, "gender" text, "name" text, "nationality" text, "birth_city" text, "birth_year" int, primary key("did") ) 3 rows from director table: Empty DataFrame Columns: [did, gender, name, nationality, birth_city, birth_year] Index: [] CREATE TABLE "producer" ( "pid" int, "gender" text, "name" text, "nationality" text, "birth_city" text, "birth_year" int, primary key("pid") ) 3 rows from producer table: Empty DataFrame Columns: [pid, gender, name, nationality, birth_city, birth_year] Index: [] CREATE TABLE "directed_by" ( "id" int, "msid" int, "did" int, primary key("id"), foreign key("msid") references `copyright`("msid"), foreign key("did") references `director`("did") ) 3 rows from directed_by table: Empty DataFrame Columns: [id, msid, did] Index: [] CREATE TABLE "keyword" ( "id" int, "keyword" text, primary key("id") ) 3 rows from keyword table: Empty DataFrame Columns: [id, keyword] Index: [] CREATE TABLE "made_by" ( "id" int, "msid" int, "pid" int, primary key("id"), foreign key("msid") references `copyright`("msid"), foreign key("pid") references `producer`("pid") ) 3 rows from made_by table: Empty DataFrame Columns: [id, msid, pid] Index: [] CREATE TABLE "movie" ( "mid" int, "title" text, "release_year" int, "title_aka" text, "budget" text, primary key("mid") ) 3 rows from movie table: Empty DataFrame Columns: [mid, title, release_year, title_aka, budget] Index: [] CREATE TABLE "tags" ( "id" int, "msid" int, "kid" int, primary key("id"), foreign key("msid") references `copyright`("msid"), foreign key("kid") references `keyword`("kid") ) 3 rows from tags table: Empty DataFrame Columns: [id, msid, kid] Index: [] CREATE TABLE "tv_series" ( "sid" int, "title" text, "release_year" int, "num_of_seasons" int, "num_of_episodes" int, "title_aka" text, "budget" text, primary key("sid") ) 3 rows from tv_series table: Empty DataFrame Columns: [sid, title, release_year, num_of_seasons, num_of_episodes, title_aka, budget] Index: [] CREATE TABLE "writer" ( "wid" int, "gender" text, "name" int, "nationality" int, "num_of_episodes" int, "birth_city" text, "birth_year" int, primary key("wid") ) 3 rows from writer table: Empty DataFrame Columns: [wid, gender, name, nationality, num_of_episodes, birth_city, birth_year] Index: [] CREATE TABLE "written_by" ( "id" int, "msid" int, "wid" int, foreign key("msid") references `copyright`("msid"), foreign key("wid") references `writer`("wid") ) 3 rows from written_by table: Empty DataFrame Columns: [id, msid, wid] Index: []
imdb
Find the name and budget of the latest movie by " Quentin Tarantino "
SELECT t3.budget , t3.title FROM director AS t2 JOIN directed_by AS t1 ON t2.did = t1.did JOIN movie AS t3 ON t3.mid = t1.msid WHERE t2.name = "Quentin Tarantino" ORDER BY t3.release_year DESC LIMIT 1;
CREATE TABLE "actor" ( "aid" int, "gender" text, "name" text, "nationality" text, "birth_city" text, "birth_year" int, primary key("aid") ) 3 rows from actor table: Empty DataFrame Columns: [aid, gender, name, nationality, birth_city, birth_year] Index: [] CREATE TABLE "copyright" ( "id" int, "msid" int, "cid" int, primary key("id") ) 3 rows from copyright table: Empty DataFrame Columns: [id, msid, cid] Index: [] CREATE TABLE "cast" ( "id" int, "msid" int, "aid" int, "role" int, primary key("id"), foreign key("aid") references `actor`("aid"), foreign key("msid") references `copyright`("msid") ) 3 rows from cast table: Empty DataFrame Columns: [id, msid, aid, role] Index: [] CREATE TABLE "genre" ( "gid" int, "genre" text, primary key("gid") ) 3 rows from genre table: Empty DataFrame Columns: [gid, genre] Index: [] CREATE TABLE "classification" ( "id" int, "msid" int, "gid" int, primary key("id"), foreign key("gid") references `genre`("gid"), foreign key("msid") references `copyright`("msid") ) 3 rows from classification table: Empty DataFrame Columns: [id, msid, gid] Index: [] CREATE TABLE "company" ( "id" int, "name" text, "country_code" text, primary key("id") ) 3 rows from company table: Empty DataFrame Columns: [id, name, country_code] Index: [] CREATE TABLE "director" ( "did" int, "gender" text, "name" text, "nationality" text, "birth_city" text, "birth_year" int, primary key("did") ) 3 rows from director table: Empty DataFrame Columns: [did, gender, name, nationality, birth_city, birth_year] Index: [] CREATE TABLE "producer" ( "pid" int, "gender" text, "name" text, "nationality" text, "birth_city" text, "birth_year" int, primary key("pid") ) 3 rows from producer table: Empty DataFrame Columns: [pid, gender, name, nationality, birth_city, birth_year] Index: [] CREATE TABLE "directed_by" ( "id" int, "msid" int, "did" int, primary key("id"), foreign key("msid") references `copyright`("msid"), foreign key("did") references `director`("did") ) 3 rows from directed_by table: Empty DataFrame Columns: [id, msid, did] Index: [] CREATE TABLE "keyword" ( "id" int, "keyword" text, primary key("id") ) 3 rows from keyword table: Empty DataFrame Columns: [id, keyword] Index: [] CREATE TABLE "made_by" ( "id" int, "msid" int, "pid" int, primary key("id"), foreign key("msid") references `copyright`("msid"), foreign key("pid") references `producer`("pid") ) 3 rows from made_by table: Empty DataFrame Columns: [id, msid, pid] Index: [] CREATE TABLE "movie" ( "mid" int, "title" text, "release_year" int, "title_aka" text, "budget" text, primary key("mid") ) 3 rows from movie table: Empty DataFrame Columns: [mid, title, release_year, title_aka, budget] Index: [] CREATE TABLE "tags" ( "id" int, "msid" int, "kid" int, primary key("id"), foreign key("msid") references `copyright`("msid"), foreign key("kid") references `keyword`("kid") ) 3 rows from tags table: Empty DataFrame Columns: [id, msid, kid] Index: [] CREATE TABLE "tv_series" ( "sid" int, "title" text, "release_year" int, "num_of_seasons" int, "num_of_episodes" int, "title_aka" text, "budget" text, primary key("sid") ) 3 rows from tv_series table: Empty DataFrame Columns: [sid, title, release_year, num_of_seasons, num_of_episodes, title_aka, budget] Index: [] CREATE TABLE "writer" ( "wid" int, "gender" text, "name" int, "nationality" int, "num_of_episodes" int, "birth_city" text, "birth_year" int, primary key("wid") ) 3 rows from writer table: Empty DataFrame Columns: [wid, gender, name, nationality, num_of_episodes, birth_city, birth_year] Index: [] CREATE TABLE "written_by" ( "id" int, "msid" int, "wid" int, foreign key("msid") references `copyright`("msid"), foreign key("wid") references `writer`("wid") ) 3 rows from written_by table: Empty DataFrame Columns: [id, msid, wid] Index: []
imdb
What is the latest movie by " Jim Jarmusch "
SELECT t3.title FROM director AS t2 JOIN directed_by AS t1 ON t2.did = t1.did JOIN movie AS t3 ON t3.mid = t1.msid WHERE t2.name = "Jim Jarmusch" ORDER BY t3.release_year DESC LIMIT 1;
CREATE TABLE "actor" ( "aid" int, "gender" text, "name" text, "nationality" text, "birth_city" text, "birth_year" int, primary key("aid") ) 3 rows from actor table: Empty DataFrame Columns: [aid, gender, name, nationality, birth_city, birth_year] Index: [] CREATE TABLE "copyright" ( "id" int, "msid" int, "cid" int, primary key("id") ) 3 rows from copyright table: Empty DataFrame Columns: [id, msid, cid] Index: [] CREATE TABLE "cast" ( "id" int, "msid" int, "aid" int, "role" int, primary key("id"), foreign key("aid") references `actor`("aid"), foreign key("msid") references `copyright`("msid") ) 3 rows from cast table: Empty DataFrame Columns: [id, msid, aid, role] Index: [] CREATE TABLE "genre" ( "gid" int, "genre" text, primary key("gid") ) 3 rows from genre table: Empty DataFrame Columns: [gid, genre] Index: [] CREATE TABLE "classification" ( "id" int, "msid" int, "gid" int, primary key("id"), foreign key("gid") references `genre`("gid"), foreign key("msid") references `copyright`("msid") ) 3 rows from classification table: Empty DataFrame Columns: [id, msid, gid] Index: [] CREATE TABLE "company" ( "id" int, "name" text, "country_code" text, primary key("id") ) 3 rows from company table: Empty DataFrame Columns: [id, name, country_code] Index: [] CREATE TABLE "director" ( "did" int, "gender" text, "name" text, "nationality" text, "birth_city" text, "birth_year" int, primary key("did") ) 3 rows from director table: Empty DataFrame Columns: [did, gender, name, nationality, birth_city, birth_year] Index: [] CREATE TABLE "producer" ( "pid" int, "gender" text, "name" text, "nationality" text, "birth_city" text, "birth_year" int, primary key("pid") ) 3 rows from producer table: Empty DataFrame Columns: [pid, gender, name, nationality, birth_city, birth_year] Index: [] CREATE TABLE "directed_by" ( "id" int, "msid" int, "did" int, primary key("id"), foreign key("msid") references `copyright`("msid"), foreign key("did") references `director`("did") ) 3 rows from directed_by table: Empty DataFrame Columns: [id, msid, did] Index: [] CREATE TABLE "keyword" ( "id" int, "keyword" text, primary key("id") ) 3 rows from keyword table: Empty DataFrame Columns: [id, keyword] Index: [] CREATE TABLE "made_by" ( "id" int, "msid" int, "pid" int, primary key("id"), foreign key("msid") references `copyright`("msid"), foreign key("pid") references `producer`("pid") ) 3 rows from made_by table: Empty DataFrame Columns: [id, msid, pid] Index: [] CREATE TABLE "movie" ( "mid" int, "title" text, "release_year" int, "title_aka" text, "budget" text, primary key("mid") ) 3 rows from movie table: Empty DataFrame Columns: [mid, title, release_year, title_aka, budget] Index: [] CREATE TABLE "tags" ( "id" int, "msid" int, "kid" int, primary key("id"), foreign key("msid") references `copyright`("msid"), foreign key("kid") references `keyword`("kid") ) 3 rows from tags table: Empty DataFrame Columns: [id, msid, kid] Index: [] CREATE TABLE "tv_series" ( "sid" int, "title" text, "release_year" int, "num_of_seasons" int, "num_of_episodes" int, "title_aka" text, "budget" text, primary key("sid") ) 3 rows from tv_series table: Empty DataFrame Columns: [sid, title, release_year, num_of_seasons, num_of_episodes, title_aka, budget] Index: [] CREATE TABLE "writer" ( "wid" int, "gender" text, "name" int, "nationality" int, "num_of_episodes" int, "birth_city" text, "birth_year" int, primary key("wid") ) 3 rows from writer table: Empty DataFrame Columns: [wid, gender, name, nationality, num_of_episodes, birth_city, birth_year] Index: [] CREATE TABLE "written_by" ( "id" int, "msid" int, "wid" int, foreign key("msid") references `copyright`("msid"), foreign key("wid") references `writer`("wid") ) 3 rows from written_by table: Empty DataFrame Columns: [id, msid, wid] Index: []
imdb
Which producer has worked with the most number of directors ?
SELECT t1.name FROM director AS t3 JOIN directed_by AS t2 ON t3.did = t2.did JOIN movie AS t4 ON t4.mid = t2.msid JOIN made_by AS t5 ON t4.mid = t5.msid JOIN producer AS t1 ON t1.pid = t5.pid GROUP BY t1.name ORDER BY COUNT ( DISTINCT t3.name ) DESC LIMIT 1;
CREATE TABLE "actor" ( "aid" int, "gender" text, "name" text, "nationality" text, "birth_city" text, "birth_year" int, primary key("aid") ) 3 rows from actor table: Empty DataFrame Columns: [aid, gender, name, nationality, birth_city, birth_year] Index: [] CREATE TABLE "copyright" ( "id" int, "msid" int, "cid" int, primary key("id") ) 3 rows from copyright table: Empty DataFrame Columns: [id, msid, cid] Index: [] CREATE TABLE "cast" ( "id" int, "msid" int, "aid" int, "role" int, primary key("id"), foreign key("aid") references `actor`("aid"), foreign key("msid") references `copyright`("msid") ) 3 rows from cast table: Empty DataFrame Columns: [id, msid, aid, role] Index: [] CREATE TABLE "genre" ( "gid" int, "genre" text, primary key("gid") ) 3 rows from genre table: Empty DataFrame Columns: [gid, genre] Index: [] CREATE TABLE "classification" ( "id" int, "msid" int, "gid" int, primary key("id"), foreign key("gid") references `genre`("gid"), foreign key("msid") references `copyright`("msid") ) 3 rows from classification table: Empty DataFrame Columns: [id, msid, gid] Index: [] CREATE TABLE "company" ( "id" int, "name" text, "country_code" text, primary key("id") ) 3 rows from company table: Empty DataFrame Columns: [id, name, country_code] Index: [] CREATE TABLE "director" ( "did" int, "gender" text, "name" text, "nationality" text, "birth_city" text, "birth_year" int, primary key("did") ) 3 rows from director table: Empty DataFrame Columns: [did, gender, name, nationality, birth_city, birth_year] Index: [] CREATE TABLE "producer" ( "pid" int, "gender" text, "name" text, "nationality" text, "birth_city" text, "birth_year" int, primary key("pid") ) 3 rows from producer table: Empty DataFrame Columns: [pid, gender, name, nationality, birth_city, birth_year] Index: [] CREATE TABLE "directed_by" ( "id" int, "msid" int, "did" int, primary key("id"), foreign key("msid") references `copyright`("msid"), foreign key("did") references `director`("did") ) 3 rows from directed_by table: Empty DataFrame Columns: [id, msid, did] Index: [] CREATE TABLE "keyword" ( "id" int, "keyword" text, primary key("id") ) 3 rows from keyword table: Empty DataFrame Columns: [id, keyword] Index: [] CREATE TABLE "made_by" ( "id" int, "msid" int, "pid" int, primary key("id"), foreign key("msid") references `copyright`("msid"), foreign key("pid") references `producer`("pid") ) 3 rows from made_by table: Empty DataFrame Columns: [id, msid, pid] Index: [] CREATE TABLE "movie" ( "mid" int, "title" text, "release_year" int, "title_aka" text, "budget" text, primary key("mid") ) 3 rows from movie table: Empty DataFrame Columns: [mid, title, release_year, title_aka, budget] Index: [] CREATE TABLE "tags" ( "id" int, "msid" int, "kid" int, primary key("id"), foreign key("msid") references `copyright`("msid"), foreign key("kid") references `keyword`("kid") ) 3 rows from tags table: Empty DataFrame Columns: [id, msid, kid] Index: [] CREATE TABLE "tv_series" ( "sid" int, "title" text, "release_year" int, "num_of_seasons" int, "num_of_episodes" int, "title_aka" text, "budget" text, primary key("sid") ) 3 rows from tv_series table: Empty DataFrame Columns: [sid, title, release_year, num_of_seasons, num_of_episodes, title_aka, budget] Index: [] CREATE TABLE "writer" ( "wid" int, "gender" text, "name" int, "nationality" int, "num_of_episodes" int, "birth_city" text, "birth_year" int, primary key("wid") ) 3 rows from writer table: Empty DataFrame Columns: [wid, gender, name, nationality, num_of_episodes, birth_city, birth_year] Index: [] CREATE TABLE "written_by" ( "id" int, "msid" int, "wid" int, foreign key("msid") references `copyright`("msid"), foreign key("wid") references `writer`("wid") ) 3 rows from written_by table: Empty DataFrame Columns: [id, msid, wid] Index: []
imdb
Find the latest movie which " Gabriele Ferzetti " acted in
SELECT t1.name FROM CAST AS t2 JOIN actor AS t1 ON t2.aid = t1.aid JOIN movie AS t3 ON t3.mid = t2.msid WHERE t1.name = "Gabriele Ferzetti" ORDER BY t3.release_year DESC LIMIT 1;
CREATE TABLE "actor" ( "aid" int, "gender" text, "name" text, "nationality" text, "birth_city" text, "birth_year" int, primary key("aid") ) 3 rows from actor table: Empty DataFrame Columns: [aid, gender, name, nationality, birth_city, birth_year] Index: [] CREATE TABLE "copyright" ( "id" int, "msid" int, "cid" int, primary key("id") ) 3 rows from copyright table: Empty DataFrame Columns: [id, msid, cid] Index: [] CREATE TABLE "cast" ( "id" int, "msid" int, "aid" int, "role" int, primary key("id"), foreign key("aid") references `actor`("aid"), foreign key("msid") references `copyright`("msid") ) 3 rows from cast table: Empty DataFrame Columns: [id, msid, aid, role] Index: [] CREATE TABLE "genre" ( "gid" int, "genre" text, primary key("gid") ) 3 rows from genre table: Empty DataFrame Columns: [gid, genre] Index: [] CREATE TABLE "classification" ( "id" int, "msid" int, "gid" int, primary key("id"), foreign key("gid") references `genre`("gid"), foreign key("msid") references `copyright`("msid") ) 3 rows from classification table: Empty DataFrame Columns: [id, msid, gid] Index: [] CREATE TABLE "company" ( "id" int, "name" text, "country_code" text, primary key("id") ) 3 rows from company table: Empty DataFrame Columns: [id, name, country_code] Index: [] CREATE TABLE "director" ( "did" int, "gender" text, "name" text, "nationality" text, "birth_city" text, "birth_year" int, primary key("did") ) 3 rows from director table: Empty DataFrame Columns: [did, gender, name, nationality, birth_city, birth_year] Index: [] CREATE TABLE "producer" ( "pid" int, "gender" text, "name" text, "nationality" text, "birth_city" text, "birth_year" int, primary key("pid") ) 3 rows from producer table: Empty DataFrame Columns: [pid, gender, name, nationality, birth_city, birth_year] Index: [] CREATE TABLE "directed_by" ( "id" int, "msid" int, "did" int, primary key("id"), foreign key("msid") references `copyright`("msid"), foreign key("did") references `director`("did") ) 3 rows from directed_by table: Empty DataFrame Columns: [id, msid, did] Index: [] CREATE TABLE "keyword" ( "id" int, "keyword" text, primary key("id") ) 3 rows from keyword table: Empty DataFrame Columns: [id, keyword] Index: [] CREATE TABLE "made_by" ( "id" int, "msid" int, "pid" int, primary key("id"), foreign key("msid") references `copyright`("msid"), foreign key("pid") references `producer`("pid") ) 3 rows from made_by table: Empty DataFrame Columns: [id, msid, pid] Index: [] CREATE TABLE "movie" ( "mid" int, "title" text, "release_year" int, "title_aka" text, "budget" text, primary key("mid") ) 3 rows from movie table: Empty DataFrame Columns: [mid, title, release_year, title_aka, budget] Index: [] CREATE TABLE "tags" ( "id" int, "msid" int, "kid" int, primary key("id"), foreign key("msid") references `copyright`("msid"), foreign key("kid") references `keyword`("kid") ) 3 rows from tags table: Empty DataFrame Columns: [id, msid, kid] Index: [] CREATE TABLE "tv_series" ( "sid" int, "title" text, "release_year" int, "num_of_seasons" int, "num_of_episodes" int, "title_aka" text, "budget" text, primary key("sid") ) 3 rows from tv_series table: Empty DataFrame Columns: [sid, title, release_year, num_of_seasons, num_of_episodes, title_aka, budget] Index: [] CREATE TABLE "writer" ( "wid" int, "gender" text, "name" int, "nationality" int, "num_of_episodes" int, "birth_city" text, "birth_year" int, primary key("wid") ) 3 rows from writer table: Empty DataFrame Columns: [wid, gender, name, nationality, num_of_episodes, birth_city, birth_year] Index: [] CREATE TABLE "written_by" ( "id" int, "msid" int, "wid" int, foreign key("msid") references `copyright`("msid"), foreign key("wid") references `writer`("wid") ) 3 rows from written_by table: Empty DataFrame Columns: [id, msid, wid] Index: []
restaurants
how many buttercup kitchen are there in san francisco ?
SELECT COUNT ( * ) FROM restaurant AS t1 JOIN LOCATION AS t2 ON t1.id = t2.restaurant_id WHERE t2.city_name = "san francisco" AND t1.name = "buttercup kitchen";
CREATE TABLE "GEOGRAPHIC" ( "CITY_NAME" text, "COUNTY" text, "REGION" text, primary key("CITY_NAME") ) 3 rows from GEOGRAPHIC table: Empty DataFrame Columns: [CITY_NAME, COUNTY, REGION] Index: [] CREATE TABLE "RESTAURANT" ( "ID" int, "NAME" text, "FOOD_TYPE" text, "CITY_NAME" text, "RATING" real, primary key("ID"), foreign key ("CITY_NAME") references `GEOGRAPHIC`("CITY_NAME") ) 3 rows from RESTAURANT table: Empty DataFrame Columns: [ID, NAME, FOOD_TYPE, CITY_NAME, RATING] Index: [] CREATE TABLE "LOCATION" ( "RESTAURANT_ID" int, "HOUSE_NUMBER" int, "STREET_NAME" text, "CITY_NAME" text, primary key("RESTAURANT_ID"), foreign key ("CITY_NAME") references `GEOGRAPHIC`("CITY_NAME") foreign key ("RESTAURANT_ID") references `RESTAURANT`("RESTAURANT_ID") ) 3 rows from LOCATION table: Empty DataFrame Columns: [RESTAURANT_ID, HOUSE_NUMBER, STREET_NAME, CITY_NAME] Index: []
restaurants
how many chinese restaurants are there in the bay area ?
SELECT COUNT ( * ) FROM restaurant AS t1 JOIN geographic AS t2 ON t1.city_name = t2.city_name WHERE t2.region = "bay area" AND t1.food_type = "chinese";
CREATE TABLE "GEOGRAPHIC" ( "CITY_NAME" text, "COUNTY" text, "REGION" text, primary key("CITY_NAME") ) 3 rows from GEOGRAPHIC table: Empty DataFrame Columns: [CITY_NAME, COUNTY, REGION] Index: [] CREATE TABLE "RESTAURANT" ( "ID" int, "NAME" text, "FOOD_TYPE" text, "CITY_NAME" text, "RATING" real, primary key("ID"), foreign key ("CITY_NAME") references `GEOGRAPHIC`("CITY_NAME") ) 3 rows from RESTAURANT table: Empty DataFrame Columns: [ID, NAME, FOOD_TYPE, CITY_NAME, RATING] Index: [] CREATE TABLE "LOCATION" ( "RESTAURANT_ID" int, "HOUSE_NUMBER" int, "STREET_NAME" text, "CITY_NAME" text, primary key("RESTAURANT_ID"), foreign key ("CITY_NAME") references `GEOGRAPHIC`("CITY_NAME") foreign key ("RESTAURANT_ID") references `RESTAURANT`("RESTAURANT_ID") ) 3 rows from LOCATION table: Empty DataFrame Columns: [RESTAURANT_ID, HOUSE_NUMBER, STREET_NAME, CITY_NAME] Index: []
restaurants
how many places for chinese food are there in the bay area ?
SELECT COUNT ( * ) FROM restaurant AS t1 JOIN geographic AS t2 ON t1.city_name = t2.city_name WHERE t2.region = "bay area" AND t1.food_type = "chinese";
CREATE TABLE "GEOGRAPHIC" ( "CITY_NAME" text, "COUNTY" text, "REGION" text, primary key("CITY_NAME") ) 3 rows from GEOGRAPHIC table: Empty DataFrame Columns: [CITY_NAME, COUNTY, REGION] Index: [] CREATE TABLE "RESTAURANT" ( "ID" int, "NAME" text, "FOOD_TYPE" text, "CITY_NAME" text, "RATING" real, primary key("ID"), foreign key ("CITY_NAME") references `GEOGRAPHIC`("CITY_NAME") ) 3 rows from RESTAURANT table: Empty DataFrame Columns: [ID, NAME, FOOD_TYPE, CITY_NAME, RATING] Index: [] CREATE TABLE "LOCATION" ( "RESTAURANT_ID" int, "HOUSE_NUMBER" int, "STREET_NAME" text, "CITY_NAME" text, primary key("RESTAURANT_ID"), foreign key ("CITY_NAME") references `GEOGRAPHIC`("CITY_NAME") foreign key ("RESTAURANT_ID") references `RESTAURANT`("RESTAURANT_ID") ) 3 rows from LOCATION table: Empty DataFrame Columns: [RESTAURANT_ID, HOUSE_NUMBER, STREET_NAME, CITY_NAME] Index: []
restaurants
how many chinese places are there in the bay area ?
SELECT COUNT ( * ) FROM restaurant AS t1 JOIN geographic AS t2 ON t1.city_name = t2.city_name WHERE t2.region = "bay area" AND t1.food_type = "chinese";
CREATE TABLE "GEOGRAPHIC" ( "CITY_NAME" text, "COUNTY" text, "REGION" text, primary key("CITY_NAME") ) 3 rows from GEOGRAPHIC table: Empty DataFrame Columns: [CITY_NAME, COUNTY, REGION] Index: [] CREATE TABLE "RESTAURANT" ( "ID" int, "NAME" text, "FOOD_TYPE" text, "CITY_NAME" text, "RATING" real, primary key("ID"), foreign key ("CITY_NAME") references `GEOGRAPHIC`("CITY_NAME") ) 3 rows from RESTAURANT table: Empty DataFrame Columns: [ID, NAME, FOOD_TYPE, CITY_NAME, RATING] Index: [] CREATE TABLE "LOCATION" ( "RESTAURANT_ID" int, "HOUSE_NUMBER" int, "STREET_NAME" text, "CITY_NAME" text, primary key("RESTAURANT_ID"), foreign key ("CITY_NAME") references `GEOGRAPHIC`("CITY_NAME") foreign key ("RESTAURANT_ID") references `RESTAURANT`("RESTAURANT_ID") ) 3 rows from LOCATION table: Empty DataFrame Columns: [RESTAURANT_ID, HOUSE_NUMBER, STREET_NAME, CITY_NAME] Index: []
restaurants
how many places for chinese are there in the bay area ?
SELECT COUNT ( * ) FROM restaurant AS t1 JOIN geographic AS t2 ON t1.city_name = t2.city_name WHERE t2.region = "bay area" AND t1.food_type = "chinese";
CREATE TABLE "GEOGRAPHIC" ( "CITY_NAME" text, "COUNTY" text, "REGION" text, primary key("CITY_NAME") ) 3 rows from GEOGRAPHIC table: Empty DataFrame Columns: [CITY_NAME, COUNTY, REGION] Index: [] CREATE TABLE "RESTAURANT" ( "ID" int, "NAME" text, "FOOD_TYPE" text, "CITY_NAME" text, "RATING" real, primary key("ID"), foreign key ("CITY_NAME") references `GEOGRAPHIC`("CITY_NAME") ) 3 rows from RESTAURANT table: Empty DataFrame Columns: [ID, NAME, FOOD_TYPE, CITY_NAME, RATING] Index: [] CREATE TABLE "LOCATION" ( "RESTAURANT_ID" int, "HOUSE_NUMBER" int, "STREET_NAME" text, "CITY_NAME" text, primary key("RESTAURANT_ID"), foreign key ("CITY_NAME") references `GEOGRAPHIC`("CITY_NAME") foreign key ("RESTAURANT_ID") references `RESTAURANT`("RESTAURANT_ID") ) 3 rows from LOCATION table: Empty DataFrame Columns: [RESTAURANT_ID, HOUSE_NUMBER, STREET_NAME, CITY_NAME] Index: []
restaurants
how many jamerican cuisine are there in santa cruz county ?
SELECT COUNT ( * ) FROM restaurant AS t1 JOIN geographic AS t2 ON t1.city_name = t2.city_name WHERE t2.county = "santa cruz county" AND t1.name = "jamerican cuisine";
CREATE TABLE "GEOGRAPHIC" ( "CITY_NAME" text, "COUNTY" text, "REGION" text, primary key("CITY_NAME") ) 3 rows from GEOGRAPHIC table: Empty DataFrame Columns: [CITY_NAME, COUNTY, REGION] Index: [] CREATE TABLE "RESTAURANT" ( "ID" int, "NAME" text, "FOOD_TYPE" text, "CITY_NAME" text, "RATING" real, primary key("ID"), foreign key ("CITY_NAME") references `GEOGRAPHIC`("CITY_NAME") ) 3 rows from RESTAURANT table: Empty DataFrame Columns: [ID, NAME, FOOD_TYPE, CITY_NAME, RATING] Index: [] CREATE TABLE "LOCATION" ( "RESTAURANT_ID" int, "HOUSE_NUMBER" int, "STREET_NAME" text, "CITY_NAME" text, primary key("RESTAURANT_ID"), foreign key ("CITY_NAME") references `GEOGRAPHIC`("CITY_NAME") foreign key ("RESTAURANT_ID") references `RESTAURANT`("RESTAURANT_ID") ) 3 rows from LOCATION table: Empty DataFrame Columns: [RESTAURANT_ID, HOUSE_NUMBER, STREET_NAME, CITY_NAME] Index: []
restaurants
where is jamerican cuisine ?
SELECT t2.house_number , t1.name FROM restaurant AS t1 JOIN LOCATION AS t2 ON t1.id = t2.restaurant_id WHERE t1.name = "jamerican cuisine";
CREATE TABLE "GEOGRAPHIC" ( "CITY_NAME" text, "COUNTY" text, "REGION" text, primary key("CITY_NAME") ) 3 rows from GEOGRAPHIC table: Empty DataFrame Columns: [CITY_NAME, COUNTY, REGION] Index: [] CREATE TABLE "RESTAURANT" ( "ID" int, "NAME" text, "FOOD_TYPE" text, "CITY_NAME" text, "RATING" real, primary key("ID"), foreign key ("CITY_NAME") references `GEOGRAPHIC`("CITY_NAME") ) 3 rows from RESTAURANT table: Empty DataFrame Columns: [ID, NAME, FOOD_TYPE, CITY_NAME, RATING] Index: [] CREATE TABLE "LOCATION" ( "RESTAURANT_ID" int, "HOUSE_NUMBER" int, "STREET_NAME" text, "CITY_NAME" text, primary key("RESTAURANT_ID"), foreign key ("CITY_NAME") references `GEOGRAPHIC`("CITY_NAME") foreign key ("RESTAURANT_ID") references `RESTAURANT`("RESTAURANT_ID") ) 3 rows from LOCATION table: Empty DataFrame Columns: [RESTAURANT_ID, HOUSE_NUMBER, STREET_NAME, CITY_NAME] Index: []