Search is not available for this dataset
db_id
stringlengths
3
31
query
stringlengths
20
523
question
stringlengths
3
224
schema
stringlengths
589
322M
query_res
stringlengths
0
363k
academic
SELECT COUNT ( DISTINCT t2.name ) FROM publication AS t7 JOIN cite AS t5 ON t7.pid = t5.citing JOIN publication AS t6 ON t6.pid = t5.cited JOIN writes AS t3 ON t3.pid = t7.pid JOIN writes AS t4 ON t4.pid = t6.pid JOIN author AS t2 ON t3.aid = t2.aid JOIN author AS t1 ON t4.aid = t1.aid WHERE t1.name = "H. V. Jagadish";
return me the number of authors who have cited the papers by " H. V. Jagadish " .
PRAGMA foreign_keys = ON; CREATE TABLE "author" ( "aid" int, "homepage" text, "name" text, "oid" int, primary key("aid") ); CREATE TABLE "conference" ( "cid" int, "homepage" text, "name" text, primary key ("cid") ); CREATE TABLE "domain" ( "did" int, "name" text, primary key ("did") ); CREATE TABLE "domain_author" ( "aid" int, "did" int, primary key ("did", "aid"), foreign key("aid") references `author`("aid"), foreign key("did") references `domain`("did") ); CREATE TABLE "domain_conference" ( "cid" int, "did" int, primary key ("did", "cid"), foreign key("cid") references `conference`("cid"), foreign key("did") references `domain`("did") ); CREATE TABLE "journal" ( "homepage" text, "jid" int, "name" text, primary key("jid") ); CREATE TABLE "domain_journal" ( "did" int, "jid" int, primary key ("did", "jid"), foreign key("jid") references "journal"("jid"), foreign key("did") references "domain"("did") ); CREATE TABLE "keyword" ( "keyword" text, "kid" int, primary key("kid") ); CREATE TABLE "domain_keyword" ( "did" int, "kid" int, primary key ("did", "kid"), foreign key("kid") references "keyword"("kid"), foreign key("did") references "domain"("did") ); CREATE TABLE "publication" ( "abstract" text, "cid" text, "citation_num" int, "jid" int, "pid" int, "reference_num" int, "title" text, "year" int, primary key("pid"), foreign key("jid") references "journal"("jid"), foreign key("cid") references "conference"("cid") ); CREATE TABLE "domain_publication" ( "did" int, "pid" int, primary key ("did", "pid"), foreign key("pid") references "publication"("pid"), foreign key("did") references "domain"("did") ); CREATE TABLE "organization" ( "continent" text, "homepage" text, "name" text, "oid" int, primary key("oid") ); CREATE TABLE "publication_keyword" ( "pid" int, "kid" int, primary key ("kid", "pid"), foreign key("pid") references "publication"("pid"), foreign key("kid") references "keyword"("kid") ); CREATE TABLE "writes" ( "aid" int, "pid" int, primary key ("aid", "pid"), foreign key("pid") references "publication"("pid"), foreign key("aid") references "author"("aid") ); CREATE TABLE "cite" ( "cited" int, "citing" int, foreign key("cited") references "publication"("pid"), foreign key("citing") references "publication"("pid") );
(0,)
academic
SELECT t5.title FROM writes AS t3 JOIN author AS t2 ON t3.aid = t2.aid JOIN publication AS t5 ON t3.pid = t5.pid JOIN writes AS t4 ON t4.pid = t5.pid JOIN author AS t1 ON t4.aid = t1.aid WHERE t2.name = "H. V. Jagadish" AND t1.name = "Divesh Srivastava" AND t5.citation_num > 200;
return me the papers written by " H. V. Jagadish " and " Divesh Srivastava " with more than 200 citations .
PRAGMA foreign_keys = ON; CREATE TABLE "author" ( "aid" int, "homepage" text, "name" text, "oid" int, primary key("aid") ); CREATE TABLE "conference" ( "cid" int, "homepage" text, "name" text, primary key ("cid") ); CREATE TABLE "domain" ( "did" int, "name" text, primary key ("did") ); CREATE TABLE "domain_author" ( "aid" int, "did" int, primary key ("did", "aid"), foreign key("aid") references `author`("aid"), foreign key("did") references `domain`("did") ); CREATE TABLE "domain_conference" ( "cid" int, "did" int, primary key ("did", "cid"), foreign key("cid") references `conference`("cid"), foreign key("did") references `domain`("did") ); CREATE TABLE "journal" ( "homepage" text, "jid" int, "name" text, primary key("jid") ); CREATE TABLE "domain_journal" ( "did" int, "jid" int, primary key ("did", "jid"), foreign key("jid") references "journal"("jid"), foreign key("did") references "domain"("did") ); CREATE TABLE "keyword" ( "keyword" text, "kid" int, primary key("kid") ); CREATE TABLE "domain_keyword" ( "did" int, "kid" int, primary key ("did", "kid"), foreign key("kid") references "keyword"("kid"), foreign key("did") references "domain"("did") ); CREATE TABLE "publication" ( "abstract" text, "cid" text, "citation_num" int, "jid" int, "pid" int, "reference_num" int, "title" text, "year" int, primary key("pid"), foreign key("jid") references "journal"("jid"), foreign key("cid") references "conference"("cid") ); CREATE TABLE "domain_publication" ( "did" int, "pid" int, primary key ("did", "pid"), foreign key("pid") references "publication"("pid"), foreign key("did") references "domain"("did") ); CREATE TABLE "organization" ( "continent" text, "homepage" text, "name" text, "oid" int, primary key("oid") ); CREATE TABLE "publication_keyword" ( "pid" int, "kid" int, primary key ("kid", "pid"), foreign key("pid") references "publication"("pid"), foreign key("kid") references "keyword"("kid") ); CREATE TABLE "writes" ( "aid" int, "pid" int, primary key ("aid", "pid"), foreign key("pid") references "publication"("pid"), foreign key("aid") references "author"("aid") ); CREATE TABLE "cite" ( "cited" int, "citing" int, foreign key("cited") references "publication"("pid"), foreign key("citing") references "publication"("pid") );
academic
SELECT t2.name FROM publication_keyword AS t5 JOIN keyword AS t1 ON t5.kid = t1.kid JOIN publication AS t3 ON t3.pid = t5.pid JOIN writes AS t4 ON t4.pid = t3.pid JOIN author AS t2 ON t4.aid = t2.aid WHERE t1.keyword = "Relational Database" GROUP BY t2.name ORDER BY COUNT ( DISTINCT t3.title ) DESC LIMIT 1;
return me the author who has the most number of papers containing keyword " Relational Database " .
PRAGMA foreign_keys = ON; CREATE TABLE "author" ( "aid" int, "homepage" text, "name" text, "oid" int, primary key("aid") ); CREATE TABLE "conference" ( "cid" int, "homepage" text, "name" text, primary key ("cid") ); CREATE TABLE "domain" ( "did" int, "name" text, primary key ("did") ); CREATE TABLE "domain_author" ( "aid" int, "did" int, primary key ("did", "aid"), foreign key("aid") references `author`("aid"), foreign key("did") references `domain`("did") ); CREATE TABLE "domain_conference" ( "cid" int, "did" int, primary key ("did", "cid"), foreign key("cid") references `conference`("cid"), foreign key("did") references `domain`("did") ); CREATE TABLE "journal" ( "homepage" text, "jid" int, "name" text, primary key("jid") ); CREATE TABLE "domain_journal" ( "did" int, "jid" int, primary key ("did", "jid"), foreign key("jid") references "journal"("jid"), foreign key("did") references "domain"("did") ); CREATE TABLE "keyword" ( "keyword" text, "kid" int, primary key("kid") ); CREATE TABLE "domain_keyword" ( "did" int, "kid" int, primary key ("did", "kid"), foreign key("kid") references "keyword"("kid"), foreign key("did") references "domain"("did") ); CREATE TABLE "publication" ( "abstract" text, "cid" text, "citation_num" int, "jid" int, "pid" int, "reference_num" int, "title" text, "year" int, primary key("pid"), foreign key("jid") references "journal"("jid"), foreign key("cid") references "conference"("cid") ); CREATE TABLE "domain_publication" ( "did" int, "pid" int, primary key ("did", "pid"), foreign key("pid") references "publication"("pid"), foreign key("did") references "domain"("did") ); CREATE TABLE "organization" ( "continent" text, "homepage" text, "name" text, "oid" int, primary key("oid") ); CREATE TABLE "publication_keyword" ( "pid" int, "kid" int, primary key ("kid", "pid"), foreign key("pid") references "publication"("pid"), foreign key("kid") references "keyword"("kid") ); CREATE TABLE "writes" ( "aid" int, "pid" int, primary key ("aid", "pid"), foreign key("pid") references "publication"("pid"), foreign key("aid") references "author"("aid") ); CREATE TABLE "cite" ( "cited" int, "citing" int, foreign key("cited") references "publication"("pid"), foreign key("citing") references "publication"("pid") );
academic
SELECT t2.name FROM publication_keyword AS t4 JOIN keyword AS t1 ON t4.kid = t1.kid JOIN publication AS t3 ON t3.pid = t4.pid JOIN conference AS t2 ON t3.cid = t2.cid WHERE t1.keyword = "Relational Database" GROUP BY t2.name ORDER BY COUNT ( DISTINCT t3.title ) DESC LIMIT 1;
return me the conference that has the most number of papers containing keyword " Relational Database " .
PRAGMA foreign_keys = ON; CREATE TABLE "author" ( "aid" int, "homepage" text, "name" text, "oid" int, primary key("aid") ); CREATE TABLE "conference" ( "cid" int, "homepage" text, "name" text, primary key ("cid") ); CREATE TABLE "domain" ( "did" int, "name" text, primary key ("did") ); CREATE TABLE "domain_author" ( "aid" int, "did" int, primary key ("did", "aid"), foreign key("aid") references `author`("aid"), foreign key("did") references `domain`("did") ); CREATE TABLE "domain_conference" ( "cid" int, "did" int, primary key ("did", "cid"), foreign key("cid") references `conference`("cid"), foreign key("did") references `domain`("did") ); CREATE TABLE "journal" ( "homepage" text, "jid" int, "name" text, primary key("jid") ); CREATE TABLE "domain_journal" ( "did" int, "jid" int, primary key ("did", "jid"), foreign key("jid") references "journal"("jid"), foreign key("did") references "domain"("did") ); CREATE TABLE "keyword" ( "keyword" text, "kid" int, primary key("kid") ); CREATE TABLE "domain_keyword" ( "did" int, "kid" int, primary key ("did", "kid"), foreign key("kid") references "keyword"("kid"), foreign key("did") references "domain"("did") ); CREATE TABLE "publication" ( "abstract" text, "cid" text, "citation_num" int, "jid" int, "pid" int, "reference_num" int, "title" text, "year" int, primary key("pid"), foreign key("jid") references "journal"("jid"), foreign key("cid") references "conference"("cid") ); CREATE TABLE "domain_publication" ( "did" int, "pid" int, primary key ("did", "pid"), foreign key("pid") references "publication"("pid"), foreign key("did") references "domain"("did") ); CREATE TABLE "organization" ( "continent" text, "homepage" text, "name" text, "oid" int, primary key("oid") ); CREATE TABLE "publication_keyword" ( "pid" int, "kid" int, primary key ("kid", "pid"), foreign key("pid") references "publication"("pid"), foreign key("kid") references "keyword"("kid") ); CREATE TABLE "writes" ( "aid" int, "pid" int, primary key ("aid", "pid"), foreign key("pid") references "publication"("pid"), foreign key("aid") references "author"("aid") ); CREATE TABLE "cite" ( "cited" int, "citing" int, foreign key("cited") references "publication"("pid"), foreign key("citing") references "publication"("pid") );
academic
SELECT t2.name FROM publication_keyword AS t4 JOIN keyword AS t1 ON t4.kid = t1.kid JOIN publication AS t3 ON t3.pid = t4.pid JOIN conference AS t2 ON t3.cid = t2.cid WHERE t1.keyword = "Relational Database" GROUP BY t2.name ORDER BY COUNT ( DISTINCT t3.title ) DESC LIMIT 1;
return me the conference, which has the most number of papers containing keyword " Relational Database " .
PRAGMA foreign_keys = ON; CREATE TABLE "author" ( "aid" int, "homepage" text, "name" text, "oid" int, primary key("aid") ); CREATE TABLE "conference" ( "cid" int, "homepage" text, "name" text, primary key ("cid") ); CREATE TABLE "domain" ( "did" int, "name" text, primary key ("did") ); CREATE TABLE "domain_author" ( "aid" int, "did" int, primary key ("did", "aid"), foreign key("aid") references `author`("aid"), foreign key("did") references `domain`("did") ); CREATE TABLE "domain_conference" ( "cid" int, "did" int, primary key ("did", "cid"), foreign key("cid") references `conference`("cid"), foreign key("did") references `domain`("did") ); CREATE TABLE "journal" ( "homepage" text, "jid" int, "name" text, primary key("jid") ); CREATE TABLE "domain_journal" ( "did" int, "jid" int, primary key ("did", "jid"), foreign key("jid") references "journal"("jid"), foreign key("did") references "domain"("did") ); CREATE TABLE "keyword" ( "keyword" text, "kid" int, primary key("kid") ); CREATE TABLE "domain_keyword" ( "did" int, "kid" int, primary key ("did", "kid"), foreign key("kid") references "keyword"("kid"), foreign key("did") references "domain"("did") ); CREATE TABLE "publication" ( "abstract" text, "cid" text, "citation_num" int, "jid" int, "pid" int, "reference_num" int, "title" text, "year" int, primary key("pid"), foreign key("jid") references "journal"("jid"), foreign key("cid") references "conference"("cid") ); CREATE TABLE "domain_publication" ( "did" int, "pid" int, primary key ("did", "pid"), foreign key("pid") references "publication"("pid"), foreign key("did") references "domain"("did") ); CREATE TABLE "organization" ( "continent" text, "homepage" text, "name" text, "oid" int, primary key("oid") ); CREATE TABLE "publication_keyword" ( "pid" int, "kid" int, primary key ("kid", "pid"), foreign key("pid") references "publication"("pid"), foreign key("kid") references "keyword"("kid") ); CREATE TABLE "writes" ( "aid" int, "pid" int, primary key ("aid", "pid"), foreign key("pid") references "publication"("pid"), foreign key("aid") references "author"("aid") ); CREATE TABLE "cite" ( "cited" int, "citing" int, foreign key("cited") references "publication"("pid"), foreign key("citing") references "publication"("pid") );
academic
SELECT t3.name FROM publication_keyword AS t4 JOIN keyword AS t1 ON t4.kid = t1.kid JOIN publication AS t2 ON t2.pid = t4.pid JOIN journal AS t3 ON t2.jid = t3.jid WHERE t1.keyword = "Relational Database" GROUP BY t3.name ORDER BY COUNT ( DISTINCT t2.title ) DESC LIMIT 1;
return me the journal that has the most number of papers containing keyword " Relational Database " .
PRAGMA foreign_keys = ON; CREATE TABLE "author" ( "aid" int, "homepage" text, "name" text, "oid" int, primary key("aid") ); CREATE TABLE "conference" ( "cid" int, "homepage" text, "name" text, primary key ("cid") ); CREATE TABLE "domain" ( "did" int, "name" text, primary key ("did") ); CREATE TABLE "domain_author" ( "aid" int, "did" int, primary key ("did", "aid"), foreign key("aid") references `author`("aid"), foreign key("did") references `domain`("did") ); CREATE TABLE "domain_conference" ( "cid" int, "did" int, primary key ("did", "cid"), foreign key("cid") references `conference`("cid"), foreign key("did") references `domain`("did") ); CREATE TABLE "journal" ( "homepage" text, "jid" int, "name" text, primary key("jid") ); CREATE TABLE "domain_journal" ( "did" int, "jid" int, primary key ("did", "jid"), foreign key("jid") references "journal"("jid"), foreign key("did") references "domain"("did") ); CREATE TABLE "keyword" ( "keyword" text, "kid" int, primary key("kid") ); CREATE TABLE "domain_keyword" ( "did" int, "kid" int, primary key ("did", "kid"), foreign key("kid") references "keyword"("kid"), foreign key("did") references "domain"("did") ); CREATE TABLE "publication" ( "abstract" text, "cid" text, "citation_num" int, "jid" int, "pid" int, "reference_num" int, "title" text, "year" int, primary key("pid"), foreign key("jid") references "journal"("jid"), foreign key("cid") references "conference"("cid") ); CREATE TABLE "domain_publication" ( "did" int, "pid" int, primary key ("did", "pid"), foreign key("pid") references "publication"("pid"), foreign key("did") references "domain"("did") ); CREATE TABLE "organization" ( "continent" text, "homepage" text, "name" text, "oid" int, primary key("oid") ); CREATE TABLE "publication_keyword" ( "pid" int, "kid" int, primary key ("kid", "pid"), foreign key("pid") references "publication"("pid"), foreign key("kid") references "keyword"("kid") ); CREATE TABLE "writes" ( "aid" int, "pid" int, primary key ("aid", "pid"), foreign key("pid") references "publication"("pid"), foreign key("aid") references "author"("aid") ); CREATE TABLE "cite" ( "cited" int, "citing" int, foreign key("cited") references "publication"("pid"), foreign key("citing") references "publication"("pid") );
academic
SELECT t3.name FROM publication_keyword AS t4 JOIN keyword AS t1 ON t4.kid = t1.kid JOIN publication AS t2 ON t2.pid = t4.pid JOIN journal AS t3 ON t2.jid = t3.jid WHERE t1.keyword = "Relational Database" GROUP BY t3.name ORDER BY COUNT ( DISTINCT t2.title ) DESC LIMIT 1;
return me the journal, which has the most number of papers containing keyword " Relational Database " .
PRAGMA foreign_keys = ON; CREATE TABLE "author" ( "aid" int, "homepage" text, "name" text, "oid" int, primary key("aid") ); CREATE TABLE "conference" ( "cid" int, "homepage" text, "name" text, primary key ("cid") ); CREATE TABLE "domain" ( "did" int, "name" text, primary key ("did") ); CREATE TABLE "domain_author" ( "aid" int, "did" int, primary key ("did", "aid"), foreign key("aid") references `author`("aid"), foreign key("did") references `domain`("did") ); CREATE TABLE "domain_conference" ( "cid" int, "did" int, primary key ("did", "cid"), foreign key("cid") references `conference`("cid"), foreign key("did") references `domain`("did") ); CREATE TABLE "journal" ( "homepage" text, "jid" int, "name" text, primary key("jid") ); CREATE TABLE "domain_journal" ( "did" int, "jid" int, primary key ("did", "jid"), foreign key("jid") references "journal"("jid"), foreign key("did") references "domain"("did") ); CREATE TABLE "keyword" ( "keyword" text, "kid" int, primary key("kid") ); CREATE TABLE "domain_keyword" ( "did" int, "kid" int, primary key ("did", "kid"), foreign key("kid") references "keyword"("kid"), foreign key("did") references "domain"("did") ); CREATE TABLE "publication" ( "abstract" text, "cid" text, "citation_num" int, "jid" int, "pid" int, "reference_num" int, "title" text, "year" int, primary key("pid"), foreign key("jid") references "journal"("jid"), foreign key("cid") references "conference"("cid") ); CREATE TABLE "domain_publication" ( "did" int, "pid" int, primary key ("did", "pid"), foreign key("pid") references "publication"("pid"), foreign key("did") references "domain"("did") ); CREATE TABLE "organization" ( "continent" text, "homepage" text, "name" text, "oid" int, primary key("oid") ); CREATE TABLE "publication_keyword" ( "pid" int, "kid" int, primary key ("kid", "pid"), foreign key("pid") references "publication"("pid"), foreign key("kid") references "keyword"("kid") ); CREATE TABLE "writes" ( "aid" int, "pid" int, primary key ("aid", "pid"), foreign key("pid") references "publication"("pid"), foreign key("aid") references "author"("aid") ); CREATE TABLE "cite" ( "cited" int, "citing" int, foreign key("cited") references "publication"("pid"), foreign key("citing") references "publication"("pid") );
academic
SELECT t1.keyword FROM publication_keyword AS t4 JOIN keyword AS t1 ON t4.kid = t1.kid JOIN publication AS t3 ON t3.pid = t4.pid JOIN conference AS t2 ON t3.cid = t2.cid WHERE t2.name = "VLDB" GROUP BY t1.keyword ORDER BY COUNT ( DISTINCT t3.title ) DESC LIMIT 1;
return me the keyword, which have been contained by the most number of papers in VLDB conference .
PRAGMA foreign_keys = ON; CREATE TABLE "author" ( "aid" int, "homepage" text, "name" text, "oid" int, primary key("aid") ); CREATE TABLE "conference" ( "cid" int, "homepage" text, "name" text, primary key ("cid") ); CREATE TABLE "domain" ( "did" int, "name" text, primary key ("did") ); CREATE TABLE "domain_author" ( "aid" int, "did" int, primary key ("did", "aid"), foreign key("aid") references `author`("aid"), foreign key("did") references `domain`("did") ); CREATE TABLE "domain_conference" ( "cid" int, "did" int, primary key ("did", "cid"), foreign key("cid") references `conference`("cid"), foreign key("did") references `domain`("did") ); CREATE TABLE "journal" ( "homepage" text, "jid" int, "name" text, primary key("jid") ); CREATE TABLE "domain_journal" ( "did" int, "jid" int, primary key ("did", "jid"), foreign key("jid") references "journal"("jid"), foreign key("did") references "domain"("did") ); CREATE TABLE "keyword" ( "keyword" text, "kid" int, primary key("kid") ); CREATE TABLE "domain_keyword" ( "did" int, "kid" int, primary key ("did", "kid"), foreign key("kid") references "keyword"("kid"), foreign key("did") references "domain"("did") ); CREATE TABLE "publication" ( "abstract" text, "cid" text, "citation_num" int, "jid" int, "pid" int, "reference_num" int, "title" text, "year" int, primary key("pid"), foreign key("jid") references "journal"("jid"), foreign key("cid") references "conference"("cid") ); CREATE TABLE "domain_publication" ( "did" int, "pid" int, primary key ("did", "pid"), foreign key("pid") references "publication"("pid"), foreign key("did") references "domain"("did") ); CREATE TABLE "organization" ( "continent" text, "homepage" text, "name" text, "oid" int, primary key("oid") ); CREATE TABLE "publication_keyword" ( "pid" int, "kid" int, primary key ("kid", "pid"), foreign key("pid") references "publication"("pid"), foreign key("kid") references "keyword"("kid") ); CREATE TABLE "writes" ( "aid" int, "pid" int, primary key ("aid", "pid"), foreign key("pid") references "publication"("pid"), foreign key("aid") references "author"("aid") ); CREATE TABLE "cite" ( "cited" int, "citing" int, foreign key("cited") references "publication"("pid"), foreign key("citing") references "publication"("pid") );
academic
SELECT t1.keyword FROM publication_keyword AS t4 JOIN keyword AS t1 ON t4.kid = t1.kid JOIN publication AS t2 ON t2.pid = t4.pid JOIN journal AS t3 ON t2.jid = t3.jid WHERE t3.name = "PVLDB" GROUP BY t1.keyword ORDER BY COUNT ( DISTINCT t2.title ) DESC LIMIT 1;
return me the keyword, which have been contained by the most number of papers in PVLDB .
PRAGMA foreign_keys = ON; CREATE TABLE "author" ( "aid" int, "homepage" text, "name" text, "oid" int, primary key("aid") ); CREATE TABLE "conference" ( "cid" int, "homepage" text, "name" text, primary key ("cid") ); CREATE TABLE "domain" ( "did" int, "name" text, primary key ("did") ); CREATE TABLE "domain_author" ( "aid" int, "did" int, primary key ("did", "aid"), foreign key("aid") references `author`("aid"), foreign key("did") references `domain`("did") ); CREATE TABLE "domain_conference" ( "cid" int, "did" int, primary key ("did", "cid"), foreign key("cid") references `conference`("cid"), foreign key("did") references `domain`("did") ); CREATE TABLE "journal" ( "homepage" text, "jid" int, "name" text, primary key("jid") ); CREATE TABLE "domain_journal" ( "did" int, "jid" int, primary key ("did", "jid"), foreign key("jid") references "journal"("jid"), foreign key("did") references "domain"("did") ); CREATE TABLE "keyword" ( "keyword" text, "kid" int, primary key("kid") ); CREATE TABLE "domain_keyword" ( "did" int, "kid" int, primary key ("did", "kid"), foreign key("kid") references "keyword"("kid"), foreign key("did") references "domain"("did") ); CREATE TABLE "publication" ( "abstract" text, "cid" text, "citation_num" int, "jid" int, "pid" int, "reference_num" int, "title" text, "year" int, primary key("pid"), foreign key("jid") references "journal"("jid"), foreign key("cid") references "conference"("cid") ); CREATE TABLE "domain_publication" ( "did" int, "pid" int, primary key ("did", "pid"), foreign key("pid") references "publication"("pid"), foreign key("did") references "domain"("did") ); CREATE TABLE "organization" ( "continent" text, "homepage" text, "name" text, "oid" int, primary key("oid") ); CREATE TABLE "publication_keyword" ( "pid" int, "kid" int, primary key ("kid", "pid"), foreign key("pid") references "publication"("pid"), foreign key("kid") references "keyword"("kid") ); CREATE TABLE "writes" ( "aid" int, "pid" int, primary key ("aid", "pid"), foreign key("pid") references "publication"("pid"), foreign key("aid") references "author"("aid") ); CREATE TABLE "cite" ( "cited" int, "citing" int, foreign key("cited") references "publication"("pid"), foreign key("citing") references "publication"("pid") );
academic
SELECT t1.keyword FROM publication_keyword AS t5 JOIN keyword AS t1 ON t5.kid = t1.kid JOIN publication AS t3 ON t3.pid = t5.pid JOIN writes AS t4 ON t4.pid = t3.pid JOIN author AS t2 ON t4.aid = t2.aid WHERE t2.name = "H. V. Jagadish" GROUP BY t1.keyword ORDER BY COUNT ( DISTINCT t3.title ) DESC LIMIT 1;
return me the keyword, which have been contained by the most number of papers by " H. V. Jagadish " .
PRAGMA foreign_keys = ON; CREATE TABLE "author" ( "aid" int, "homepage" text, "name" text, "oid" int, primary key("aid") ); CREATE TABLE "conference" ( "cid" int, "homepage" text, "name" text, primary key ("cid") ); CREATE TABLE "domain" ( "did" int, "name" text, primary key ("did") ); CREATE TABLE "domain_author" ( "aid" int, "did" int, primary key ("did", "aid"), foreign key("aid") references `author`("aid"), foreign key("did") references `domain`("did") ); CREATE TABLE "domain_conference" ( "cid" int, "did" int, primary key ("did", "cid"), foreign key("cid") references `conference`("cid"), foreign key("did") references `domain`("did") ); CREATE TABLE "journal" ( "homepage" text, "jid" int, "name" text, primary key("jid") ); CREATE TABLE "domain_journal" ( "did" int, "jid" int, primary key ("did", "jid"), foreign key("jid") references "journal"("jid"), foreign key("did") references "domain"("did") ); CREATE TABLE "keyword" ( "keyword" text, "kid" int, primary key("kid") ); CREATE TABLE "domain_keyword" ( "did" int, "kid" int, primary key ("did", "kid"), foreign key("kid") references "keyword"("kid"), foreign key("did") references "domain"("did") ); CREATE TABLE "publication" ( "abstract" text, "cid" text, "citation_num" int, "jid" int, "pid" int, "reference_num" int, "title" text, "year" int, primary key("pid"), foreign key("jid") references "journal"("jid"), foreign key("cid") references "conference"("cid") ); CREATE TABLE "domain_publication" ( "did" int, "pid" int, primary key ("did", "pid"), foreign key("pid") references "publication"("pid"), foreign key("did") references "domain"("did") ); CREATE TABLE "organization" ( "continent" text, "homepage" text, "name" text, "oid" int, primary key("oid") ); CREATE TABLE "publication_keyword" ( "pid" int, "kid" int, primary key ("kid", "pid"), foreign key("pid") references "publication"("pid"), foreign key("kid") references "keyword"("kid") ); CREATE TABLE "writes" ( "aid" int, "pid" int, primary key ("aid", "pid"), foreign key("pid") references "publication"("pid"), foreign key("aid") references "author"("aid") ); CREATE TABLE "cite" ( "cited" int, "citing" int, foreign key("cited") references "publication"("pid"), foreign key("citing") references "publication"("pid") );
academic
SELECT t1.name FROM organization AS t2 JOIN author AS t1 ON t2.oid = t1.oid JOIN writes AS t3 ON t3.aid = t1.aid JOIN publication AS t4 ON t3.pid = t4.pid WHERE t2.name = "University of Michigan" GROUP BY t1.name ORDER BY SUM ( t4.citation_num ) DESC LIMIT 1;
return me the author in the " University of Michigan " whose papers have the most total citations .
PRAGMA foreign_keys = ON; CREATE TABLE "author" ( "aid" int, "homepage" text, "name" text, "oid" int, primary key("aid") ); CREATE TABLE "conference" ( "cid" int, "homepage" text, "name" text, primary key ("cid") ); CREATE TABLE "domain" ( "did" int, "name" text, primary key ("did") ); CREATE TABLE "domain_author" ( "aid" int, "did" int, primary key ("did", "aid"), foreign key("aid") references `author`("aid"), foreign key("did") references `domain`("did") ); CREATE TABLE "domain_conference" ( "cid" int, "did" int, primary key ("did", "cid"), foreign key("cid") references `conference`("cid"), foreign key("did") references `domain`("did") ); CREATE TABLE "journal" ( "homepage" text, "jid" int, "name" text, primary key("jid") ); CREATE TABLE "domain_journal" ( "did" int, "jid" int, primary key ("did", "jid"), foreign key("jid") references "journal"("jid"), foreign key("did") references "domain"("did") ); CREATE TABLE "keyword" ( "keyword" text, "kid" int, primary key("kid") ); CREATE TABLE "domain_keyword" ( "did" int, "kid" int, primary key ("did", "kid"), foreign key("kid") references "keyword"("kid"), foreign key("did") references "domain"("did") ); CREATE TABLE "publication" ( "abstract" text, "cid" text, "citation_num" int, "jid" int, "pid" int, "reference_num" int, "title" text, "year" int, primary key("pid"), foreign key("jid") references "journal"("jid"), foreign key("cid") references "conference"("cid") ); CREATE TABLE "domain_publication" ( "did" int, "pid" int, primary key ("did", "pid"), foreign key("pid") references "publication"("pid"), foreign key("did") references "domain"("did") ); CREATE TABLE "organization" ( "continent" text, "homepage" text, "name" text, "oid" int, primary key("oid") ); CREATE TABLE "publication_keyword" ( "pid" int, "kid" int, primary key ("kid", "pid"), foreign key("pid") references "publication"("pid"), foreign key("kid") references "keyword"("kid") ); CREATE TABLE "writes" ( "aid" int, "pid" int, primary key ("aid", "pid"), foreign key("pid") references "publication"("pid"), foreign key("aid") references "author"("aid") ); CREATE TABLE "cite" ( "cited" int, "citing" int, foreign key("cited") references "publication"("pid"), foreign key("citing") references "publication"("pid") );
academic
SELECT t1.name FROM DOMAIN AS t4 JOIN domain_publication AS t2 ON t4.did = t2.did JOIN publication AS t5 ON t5.pid = t2.pid JOIN writes AS t3 ON t3.pid = t5.pid JOIN author AS t1 ON t3.aid = t1.aid JOIN organization AS t6 ON t6.oid = t1.oid WHERE t4.name = "Databases" AND t6.name = "University of Michigan" GROUP BY t1.name ORDER BY SUM ( t5.citation_num ) DESC LIMIT 1;
return me the author in the " University of Michigan " whose papers in Databases area have the most total citations .
PRAGMA foreign_keys = ON; CREATE TABLE "author" ( "aid" int, "homepage" text, "name" text, "oid" int, primary key("aid") ); CREATE TABLE "conference" ( "cid" int, "homepage" text, "name" text, primary key ("cid") ); CREATE TABLE "domain" ( "did" int, "name" text, primary key ("did") ); CREATE TABLE "domain_author" ( "aid" int, "did" int, primary key ("did", "aid"), foreign key("aid") references `author`("aid"), foreign key("did") references `domain`("did") ); CREATE TABLE "domain_conference" ( "cid" int, "did" int, primary key ("did", "cid"), foreign key("cid") references `conference`("cid"), foreign key("did") references `domain`("did") ); CREATE TABLE "journal" ( "homepage" text, "jid" int, "name" text, primary key("jid") ); CREATE TABLE "domain_journal" ( "did" int, "jid" int, primary key ("did", "jid"), foreign key("jid") references "journal"("jid"), foreign key("did") references "domain"("did") ); CREATE TABLE "keyword" ( "keyword" text, "kid" int, primary key("kid") ); CREATE TABLE "domain_keyword" ( "did" int, "kid" int, primary key ("did", "kid"), foreign key("kid") references "keyword"("kid"), foreign key("did") references "domain"("did") ); CREATE TABLE "publication" ( "abstract" text, "cid" text, "citation_num" int, "jid" int, "pid" int, "reference_num" int, "title" text, "year" int, primary key("pid"), foreign key("jid") references "journal"("jid"), foreign key("cid") references "conference"("cid") ); CREATE TABLE "domain_publication" ( "did" int, "pid" int, primary key ("did", "pid"), foreign key("pid") references "publication"("pid"), foreign key("did") references "domain"("did") ); CREATE TABLE "organization" ( "continent" text, "homepage" text, "name" text, "oid" int, primary key("oid") ); CREATE TABLE "publication_keyword" ( "pid" int, "kid" int, primary key ("kid", "pid"), foreign key("pid") references "publication"("pid"), foreign key("kid") references "keyword"("kid") ); CREATE TABLE "writes" ( "aid" int, "pid" int, primary key ("aid", "pid"), foreign key("pid") references "publication"("pid"), foreign key("aid") references "author"("aid") ); CREATE TABLE "cite" ( "cited" int, "citing" int, foreign key("cited") references "publication"("pid"), foreign key("citing") references "publication"("pid") );
academic
SELECT t5.title FROM writes AS t3 JOIN author AS t2 ON t3.aid = t2.aid JOIN publication AS t5 ON t3.pid = t5.pid JOIN writes AS t4 ON t4.pid = t5.pid JOIN author AS t1 ON t4.aid = t1.aid WHERE t2.name = "Divesh Srivastava" AND t1.name = "H. V. Jagadish" ORDER BY t5.citation_num DESC LIMIT 1;
return me the papers written by " H. V. Jagadish " and " Divesh Srivastava " with the most number of citations .
PRAGMA foreign_keys = ON; CREATE TABLE "author" ( "aid" int, "homepage" text, "name" text, "oid" int, primary key("aid") ); CREATE TABLE "conference" ( "cid" int, "homepage" text, "name" text, primary key ("cid") ); CREATE TABLE "domain" ( "did" int, "name" text, primary key ("did") ); CREATE TABLE "domain_author" ( "aid" int, "did" int, primary key ("did", "aid"), foreign key("aid") references `author`("aid"), foreign key("did") references `domain`("did") ); CREATE TABLE "domain_conference" ( "cid" int, "did" int, primary key ("did", "cid"), foreign key("cid") references `conference`("cid"), foreign key("did") references `domain`("did") ); CREATE TABLE "journal" ( "homepage" text, "jid" int, "name" text, primary key("jid") ); CREATE TABLE "domain_journal" ( "did" int, "jid" int, primary key ("did", "jid"), foreign key("jid") references "journal"("jid"), foreign key("did") references "domain"("did") ); CREATE TABLE "keyword" ( "keyword" text, "kid" int, primary key("kid") ); CREATE TABLE "domain_keyword" ( "did" int, "kid" int, primary key ("did", "kid"), foreign key("kid") references "keyword"("kid"), foreign key("did") references "domain"("did") ); CREATE TABLE "publication" ( "abstract" text, "cid" text, "citation_num" int, "jid" int, "pid" int, "reference_num" int, "title" text, "year" int, primary key("pid"), foreign key("jid") references "journal"("jid"), foreign key("cid") references "conference"("cid") ); CREATE TABLE "domain_publication" ( "did" int, "pid" int, primary key ("did", "pid"), foreign key("pid") references "publication"("pid"), foreign key("did") references "domain"("did") ); CREATE TABLE "organization" ( "continent" text, "homepage" text, "name" text, "oid" int, primary key("oid") ); CREATE TABLE "publication_keyword" ( "pid" int, "kid" int, primary key ("kid", "pid"), foreign key("pid") references "publication"("pid"), foreign key("kid") references "keyword"("kid") ); CREATE TABLE "writes" ( "aid" int, "pid" int, primary key ("aid", "pid"), foreign key("pid") references "publication"("pid"), foreign key("aid") references "author"("aid") ); CREATE TABLE "cite" ( "cited" int, "citing" int, foreign key("cited") references "publication"("pid"), foreign key("citing") references "publication"("pid") );
academic
SELECT t2.name FROM publication AS t4 JOIN conference AS t2 ON t4.cid = t2.cid JOIN writes AS t3 ON t3.pid = t4.pid JOIN author AS t1 ON t3.aid = t1.aid WHERE t1.name = "H. V. Jagadish" GROUP BY t2.name HAVING COUNT ( DISTINCT t4.title ) > 10;
return me the conferences, which have more than 10 papers by " H. V. Jagadish " .
PRAGMA foreign_keys = ON; CREATE TABLE "author" ( "aid" int, "homepage" text, "name" text, "oid" int, primary key("aid") ); CREATE TABLE "conference" ( "cid" int, "homepage" text, "name" text, primary key ("cid") ); CREATE TABLE "domain" ( "did" int, "name" text, primary key ("did") ); CREATE TABLE "domain_author" ( "aid" int, "did" int, primary key ("did", "aid"), foreign key("aid") references `author`("aid"), foreign key("did") references `domain`("did") ); CREATE TABLE "domain_conference" ( "cid" int, "did" int, primary key ("did", "cid"), foreign key("cid") references `conference`("cid"), foreign key("did") references `domain`("did") ); CREATE TABLE "journal" ( "homepage" text, "jid" int, "name" text, primary key("jid") ); CREATE TABLE "domain_journal" ( "did" int, "jid" int, primary key ("did", "jid"), foreign key("jid") references "journal"("jid"), foreign key("did") references "domain"("did") ); CREATE TABLE "keyword" ( "keyword" text, "kid" int, primary key("kid") ); CREATE TABLE "domain_keyword" ( "did" int, "kid" int, primary key ("did", "kid"), foreign key("kid") references "keyword"("kid"), foreign key("did") references "domain"("did") ); CREATE TABLE "publication" ( "abstract" text, "cid" text, "citation_num" int, "jid" int, "pid" int, "reference_num" int, "title" text, "year" int, primary key("pid"), foreign key("jid") references "journal"("jid"), foreign key("cid") references "conference"("cid") ); CREATE TABLE "domain_publication" ( "did" int, "pid" int, primary key ("did", "pid"), foreign key("pid") references "publication"("pid"), foreign key("did") references "domain"("did") ); CREATE TABLE "organization" ( "continent" text, "homepage" text, "name" text, "oid" int, primary key("oid") ); CREATE TABLE "publication_keyword" ( "pid" int, "kid" int, primary key ("kid", "pid"), foreign key("pid") references "publication"("pid"), foreign key("kid") references "keyword"("kid") ); CREATE TABLE "writes" ( "aid" int, "pid" int, primary key ("aid", "pid"), foreign key("pid") references "publication"("pid"), foreign key("aid") references "author"("aid") ); CREATE TABLE "cite" ( "cited" int, "citing" int, foreign key("cited") references "publication"("pid"), foreign key("citing") references "publication"("pid") );
academic
SELECT t2.name FROM publication AS t4 JOIN conference AS t2 ON t4.cid = t2.cid JOIN writes AS t3 ON t3.pid = t4.pid JOIN author AS t1 ON t3.aid = t1.aid WHERE t1.name = "H. V. Jagadish" GROUP BY t2.name ORDER BY COUNT ( DISTINCT t4.title ) DESC LIMIT 1;
return me the conference, which have the most number of papers by " H. V. Jagadish " .
PRAGMA foreign_keys = ON; CREATE TABLE "author" ( "aid" int, "homepage" text, "name" text, "oid" int, primary key("aid") ); CREATE TABLE "conference" ( "cid" int, "homepage" text, "name" text, primary key ("cid") ); CREATE TABLE "domain" ( "did" int, "name" text, primary key ("did") ); CREATE TABLE "domain_author" ( "aid" int, "did" int, primary key ("did", "aid"), foreign key("aid") references `author`("aid"), foreign key("did") references `domain`("did") ); CREATE TABLE "domain_conference" ( "cid" int, "did" int, primary key ("did", "cid"), foreign key("cid") references `conference`("cid"), foreign key("did") references `domain`("did") ); CREATE TABLE "journal" ( "homepage" text, "jid" int, "name" text, primary key("jid") ); CREATE TABLE "domain_journal" ( "did" int, "jid" int, primary key ("did", "jid"), foreign key("jid") references "journal"("jid"), foreign key("did") references "domain"("did") ); CREATE TABLE "keyword" ( "keyword" text, "kid" int, primary key("kid") ); CREATE TABLE "domain_keyword" ( "did" int, "kid" int, primary key ("did", "kid"), foreign key("kid") references "keyword"("kid"), foreign key("did") references "domain"("did") ); CREATE TABLE "publication" ( "abstract" text, "cid" text, "citation_num" int, "jid" int, "pid" int, "reference_num" int, "title" text, "year" int, primary key("pid"), foreign key("jid") references "journal"("jid"), foreign key("cid") references "conference"("cid") ); CREATE TABLE "domain_publication" ( "did" int, "pid" int, primary key ("did", "pid"), foreign key("pid") references "publication"("pid"), foreign key("did") references "domain"("did") ); CREATE TABLE "organization" ( "continent" text, "homepage" text, "name" text, "oid" int, primary key("oid") ); CREATE TABLE "publication_keyword" ( "pid" int, "kid" int, primary key ("kid", "pid"), foreign key("pid") references "publication"("pid"), foreign key("kid") references "keyword"("kid") ); CREATE TABLE "writes" ( "aid" int, "pid" int, primary key ("aid", "pid"), foreign key("pid") references "publication"("pid"), foreign key("aid") references "author"("aid") ); CREATE TABLE "cite" ( "cited" int, "citing" int, foreign key("cited") references "publication"("pid"), foreign key("citing") references "publication"("pid") );
academic
SELECT t2.name FROM publication AS t4 JOIN journal AS t2 ON t4.jid = t2.jid JOIN writes AS t3 ON t3.pid = t4.pid JOIN author AS t1 ON t3.aid = t1.aid WHERE t1.name = "H. V. Jagadish" GROUP BY t2.name HAVING COUNT ( DISTINCT t4.title ) > 10;
return me the journals, which have more than 10 papers by " H. V. Jagadish " .
PRAGMA foreign_keys = ON; CREATE TABLE "author" ( "aid" int, "homepage" text, "name" text, "oid" int, primary key("aid") ); CREATE TABLE "conference" ( "cid" int, "homepage" text, "name" text, primary key ("cid") ); CREATE TABLE "domain" ( "did" int, "name" text, primary key ("did") ); CREATE TABLE "domain_author" ( "aid" int, "did" int, primary key ("did", "aid"), foreign key("aid") references `author`("aid"), foreign key("did") references `domain`("did") ); CREATE TABLE "domain_conference" ( "cid" int, "did" int, primary key ("did", "cid"), foreign key("cid") references `conference`("cid"), foreign key("did") references `domain`("did") ); CREATE TABLE "journal" ( "homepage" text, "jid" int, "name" text, primary key("jid") ); CREATE TABLE "domain_journal" ( "did" int, "jid" int, primary key ("did", "jid"), foreign key("jid") references "journal"("jid"), foreign key("did") references "domain"("did") ); CREATE TABLE "keyword" ( "keyword" text, "kid" int, primary key("kid") ); CREATE TABLE "domain_keyword" ( "did" int, "kid" int, primary key ("did", "kid"), foreign key("kid") references "keyword"("kid"), foreign key("did") references "domain"("did") ); CREATE TABLE "publication" ( "abstract" text, "cid" text, "citation_num" int, "jid" int, "pid" int, "reference_num" int, "title" text, "year" int, primary key("pid"), foreign key("jid") references "journal"("jid"), foreign key("cid") references "conference"("cid") ); CREATE TABLE "domain_publication" ( "did" int, "pid" int, primary key ("did", "pid"), foreign key("pid") references "publication"("pid"), foreign key("did") references "domain"("did") ); CREATE TABLE "organization" ( "continent" text, "homepage" text, "name" text, "oid" int, primary key("oid") ); CREATE TABLE "publication_keyword" ( "pid" int, "kid" int, primary key ("kid", "pid"), foreign key("pid") references "publication"("pid"), foreign key("kid") references "keyword"("kid") ); CREATE TABLE "writes" ( "aid" int, "pid" int, primary key ("aid", "pid"), foreign key("pid") references "publication"("pid"), foreign key("aid") references "author"("aid") ); CREATE TABLE "cite" ( "cited" int, "citing" int, foreign key("cited") references "publication"("pid"), foreign key("citing") references "publication"("pid") );
academic
SELECT t2.name FROM publication AS t4 JOIN journal AS t2 ON t4.jid = t2.jid JOIN writes AS t3 ON t3.pid = t4.pid JOIN author AS t1 ON t3.aid = t1.aid WHERE t1.name = "H. V. Jagadish" GROUP BY t2.name ORDER BY COUNT ( DISTINCT t4.title ) DESC LIMIT 1;
return me the journal, which have the most number of papers by " H. V. Jagadish " .
PRAGMA foreign_keys = ON; CREATE TABLE "author" ( "aid" int, "homepage" text, "name" text, "oid" int, primary key("aid") ); CREATE TABLE "conference" ( "cid" int, "homepage" text, "name" text, primary key ("cid") ); CREATE TABLE "domain" ( "did" int, "name" text, primary key ("did") ); CREATE TABLE "domain_author" ( "aid" int, "did" int, primary key ("did", "aid"), foreign key("aid") references `author`("aid"), foreign key("did") references `domain`("did") ); CREATE TABLE "domain_conference" ( "cid" int, "did" int, primary key ("did", "cid"), foreign key("cid") references `conference`("cid"), foreign key("did") references `domain`("did") ); CREATE TABLE "journal" ( "homepage" text, "jid" int, "name" text, primary key("jid") ); CREATE TABLE "domain_journal" ( "did" int, "jid" int, primary key ("did", "jid"), foreign key("jid") references "journal"("jid"), foreign key("did") references "domain"("did") ); CREATE TABLE "keyword" ( "keyword" text, "kid" int, primary key("kid") ); CREATE TABLE "domain_keyword" ( "did" int, "kid" int, primary key ("did", "kid"), foreign key("kid") references "keyword"("kid"), foreign key("did") references "domain"("did") ); CREATE TABLE "publication" ( "abstract" text, "cid" text, "citation_num" int, "jid" int, "pid" int, "reference_num" int, "title" text, "year" int, primary key("pid"), foreign key("jid") references "journal"("jid"), foreign key("cid") references "conference"("cid") ); CREATE TABLE "domain_publication" ( "did" int, "pid" int, primary key ("did", "pid"), foreign key("pid") references "publication"("pid"), foreign key("did") references "domain"("did") ); CREATE TABLE "organization" ( "continent" text, "homepage" text, "name" text, "oid" int, primary key("oid") ); CREATE TABLE "publication_keyword" ( "pid" int, "kid" int, primary key ("kid", "pid"), foreign key("pid") references "publication"("pid"), foreign key("kid") references "keyword"("kid") ); CREATE TABLE "writes" ( "aid" int, "pid" int, primary key ("aid", "pid"), foreign key("pid") references "publication"("pid"), foreign key("aid") references "author"("aid") ); CREATE TABLE "cite" ( "cited" int, "citing" int, foreign key("cited") references "publication"("pid"), foreign key("citing") references "publication"("pid") );
academic
SELECT title FROM publication ORDER BY citation_num DESC LIMIT 1;
return me the paper with the most citations .
PRAGMA foreign_keys = ON; CREATE TABLE "author" ( "aid" int, "homepage" text, "name" text, "oid" int, primary key("aid") ); CREATE TABLE "conference" ( "cid" int, "homepage" text, "name" text, primary key ("cid") ); CREATE TABLE "domain" ( "did" int, "name" text, primary key ("did") ); CREATE TABLE "domain_author" ( "aid" int, "did" int, primary key ("did", "aid"), foreign key("aid") references `author`("aid"), foreign key("did") references `domain`("did") ); CREATE TABLE "domain_conference" ( "cid" int, "did" int, primary key ("did", "cid"), foreign key("cid") references `conference`("cid"), foreign key("did") references `domain`("did") ); CREATE TABLE "journal" ( "homepage" text, "jid" int, "name" text, primary key("jid") ); CREATE TABLE "domain_journal" ( "did" int, "jid" int, primary key ("did", "jid"), foreign key("jid") references "journal"("jid"), foreign key("did") references "domain"("did") ); CREATE TABLE "keyword" ( "keyword" text, "kid" int, primary key("kid") ); CREATE TABLE "domain_keyword" ( "did" int, "kid" int, primary key ("did", "kid"), foreign key("kid") references "keyword"("kid"), foreign key("did") references "domain"("did") ); CREATE TABLE "publication" ( "abstract" text, "cid" text, "citation_num" int, "jid" int, "pid" int, "reference_num" int, "title" text, "year" int, primary key("pid"), foreign key("jid") references "journal"("jid"), foreign key("cid") references "conference"("cid") ); CREATE TABLE "domain_publication" ( "did" int, "pid" int, primary key ("did", "pid"), foreign key("pid") references "publication"("pid"), foreign key("did") references "domain"("did") ); CREATE TABLE "organization" ( "continent" text, "homepage" text, "name" text, "oid" int, primary key("oid") ); CREATE TABLE "publication_keyword" ( "pid" int, "kid" int, primary key ("kid", "pid"), foreign key("pid") references "publication"("pid"), foreign key("kid") references "keyword"("kid") ); CREATE TABLE "writes" ( "aid" int, "pid" int, primary key ("aid", "pid"), foreign key("pid") references "publication"("pid"), foreign key("aid") references "author"("aid") ); CREATE TABLE "cite" ( "cited" int, "citing" int, foreign key("cited") references "publication"("pid"), foreign key("citing") references "publication"("pid") );
academic
SELECT t3.title FROM DOMAIN AS t2 JOIN domain_publication AS t1 ON t2.did = t1.did JOIN publication AS t3 ON t3.pid = t1.pid WHERE t2.name = "Databases" ORDER BY t3.citation_num DESC LIMIT 1;
return me the paper in Databases area with the most citations .
PRAGMA foreign_keys = ON; CREATE TABLE "author" ( "aid" int, "homepage" text, "name" text, "oid" int, primary key("aid") ); CREATE TABLE "conference" ( "cid" int, "homepage" text, "name" text, primary key ("cid") ); CREATE TABLE "domain" ( "did" int, "name" text, primary key ("did") ); CREATE TABLE "domain_author" ( "aid" int, "did" int, primary key ("did", "aid"), foreign key("aid") references `author`("aid"), foreign key("did") references `domain`("did") ); CREATE TABLE "domain_conference" ( "cid" int, "did" int, primary key ("did", "cid"), foreign key("cid") references `conference`("cid"), foreign key("did") references `domain`("did") ); CREATE TABLE "journal" ( "homepage" text, "jid" int, "name" text, primary key("jid") ); CREATE TABLE "domain_journal" ( "did" int, "jid" int, primary key ("did", "jid"), foreign key("jid") references "journal"("jid"), foreign key("did") references "domain"("did") ); CREATE TABLE "keyword" ( "keyword" text, "kid" int, primary key("kid") ); CREATE TABLE "domain_keyword" ( "did" int, "kid" int, primary key ("did", "kid"), foreign key("kid") references "keyword"("kid"), foreign key("did") references "domain"("did") ); CREATE TABLE "publication" ( "abstract" text, "cid" text, "citation_num" int, "jid" int, "pid" int, "reference_num" int, "title" text, "year" int, primary key("pid"), foreign key("jid") references "journal"("jid"), foreign key("cid") references "conference"("cid") ); CREATE TABLE "domain_publication" ( "did" int, "pid" int, primary key ("did", "pid"), foreign key("pid") references "publication"("pid"), foreign key("did") references "domain"("did") ); CREATE TABLE "organization" ( "continent" text, "homepage" text, "name" text, "oid" int, primary key("oid") ); CREATE TABLE "publication_keyword" ( "pid" int, "kid" int, primary key ("kid", "pid"), foreign key("pid") references "publication"("pid"), foreign key("kid") references "keyword"("kid") ); CREATE TABLE "writes" ( "aid" int, "pid" int, primary key ("aid", "pid"), foreign key("pid") references "publication"("pid"), foreign key("aid") references "author"("aid") ); CREATE TABLE "cite" ( "cited" int, "citing" int, foreign key("cited") references "publication"("pid"), foreign key("citing") references "publication"("pid") );
academic
SELECT t2.title FROM publication AS t2 JOIN journal AS t1 ON t2.jid = t1.jid WHERE t1.name = "PVLDB" ORDER BY t2.citation_num DESC LIMIT 1;
return me the paper in PVLDB with the most citations .
PRAGMA foreign_keys = ON; CREATE TABLE "author" ( "aid" int, "homepage" text, "name" text, "oid" int, primary key("aid") ); CREATE TABLE "conference" ( "cid" int, "homepage" text, "name" text, primary key ("cid") ); CREATE TABLE "domain" ( "did" int, "name" text, primary key ("did") ); CREATE TABLE "domain_author" ( "aid" int, "did" int, primary key ("did", "aid"), foreign key("aid") references `author`("aid"), foreign key("did") references `domain`("did") ); CREATE TABLE "domain_conference" ( "cid" int, "did" int, primary key ("did", "cid"), foreign key("cid") references `conference`("cid"), foreign key("did") references `domain`("did") ); CREATE TABLE "journal" ( "homepage" text, "jid" int, "name" text, primary key("jid") ); CREATE TABLE "domain_journal" ( "did" int, "jid" int, primary key ("did", "jid"), foreign key("jid") references "journal"("jid"), foreign key("did") references "domain"("did") ); CREATE TABLE "keyword" ( "keyword" text, "kid" int, primary key("kid") ); CREATE TABLE "domain_keyword" ( "did" int, "kid" int, primary key ("did", "kid"), foreign key("kid") references "keyword"("kid"), foreign key("did") references "domain"("did") ); CREATE TABLE "publication" ( "abstract" text, "cid" text, "citation_num" int, "jid" int, "pid" int, "reference_num" int, "title" text, "year" int, primary key("pid"), foreign key("jid") references "journal"("jid"), foreign key("cid") references "conference"("cid") ); CREATE TABLE "domain_publication" ( "did" int, "pid" int, primary key ("did", "pid"), foreign key("pid") references "publication"("pid"), foreign key("did") references "domain"("did") ); CREATE TABLE "organization" ( "continent" text, "homepage" text, "name" text, "oid" int, primary key("oid") ); CREATE TABLE "publication_keyword" ( "pid" int, "kid" int, primary key ("kid", "pid"), foreign key("pid") references "publication"("pid"), foreign key("kid") references "keyword"("kid") ); CREATE TABLE "writes" ( "aid" int, "pid" int, primary key ("aid", "pid"), foreign key("pid") references "publication"("pid"), foreign key("aid") references "author"("aid") ); CREATE TABLE "cite" ( "cited" int, "citing" int, foreign key("cited") references "publication"("pid"), foreign key("citing") references "publication"("pid") );
academic
SELECT t2.title FROM publication AS t2 JOIN conference AS t1 ON t2.cid = t1.cid WHERE t1.name = "VLDB" ORDER BY t2.citation_num DESC LIMIT 1;
return me the paper in VLDB conference with the most citations .
PRAGMA foreign_keys = ON; CREATE TABLE "author" ( "aid" int, "homepage" text, "name" text, "oid" int, primary key("aid") ); CREATE TABLE "conference" ( "cid" int, "homepage" text, "name" text, primary key ("cid") ); CREATE TABLE "domain" ( "did" int, "name" text, primary key ("did") ); CREATE TABLE "domain_author" ( "aid" int, "did" int, primary key ("did", "aid"), foreign key("aid") references `author`("aid"), foreign key("did") references `domain`("did") ); CREATE TABLE "domain_conference" ( "cid" int, "did" int, primary key ("did", "cid"), foreign key("cid") references `conference`("cid"), foreign key("did") references `domain`("did") ); CREATE TABLE "journal" ( "homepage" text, "jid" int, "name" text, primary key("jid") ); CREATE TABLE "domain_journal" ( "did" int, "jid" int, primary key ("did", "jid"), foreign key("jid") references "journal"("jid"), foreign key("did") references "domain"("did") ); CREATE TABLE "keyword" ( "keyword" text, "kid" int, primary key("kid") ); CREATE TABLE "domain_keyword" ( "did" int, "kid" int, primary key ("did", "kid"), foreign key("kid") references "keyword"("kid"), foreign key("did") references "domain"("did") ); CREATE TABLE "publication" ( "abstract" text, "cid" text, "citation_num" int, "jid" int, "pid" int, "reference_num" int, "title" text, "year" int, primary key("pid"), foreign key("jid") references "journal"("jid"), foreign key("cid") references "conference"("cid") ); CREATE TABLE "domain_publication" ( "did" int, "pid" int, primary key ("did", "pid"), foreign key("pid") references "publication"("pid"), foreign key("did") references "domain"("did") ); CREATE TABLE "organization" ( "continent" text, "homepage" text, "name" text, "oid" int, primary key("oid") ); CREATE TABLE "publication_keyword" ( "pid" int, "kid" int, primary key ("kid", "pid"), foreign key("pid") references "publication"("pid"), foreign key("kid") references "keyword"("kid") ); CREATE TABLE "writes" ( "aid" int, "pid" int, primary key ("aid", "pid"), foreign key("pid") references "publication"("pid"), foreign key("aid") references "author"("aid") ); CREATE TABLE "cite" ( "cited" int, "citing" int, foreign key("cited") references "publication"("pid"), foreign key("citing") references "publication"("pid") );
academic
SELECT t3.title FROM writes AS t2 JOIN author AS t1 ON t2.aid = t1.aid JOIN publication AS t3 ON t2.pid = t3.pid WHERE t1.name = "H. V. Jagadish" ORDER BY t3.citation_num DESC LIMIT 1;
return me the paper by " H. V. Jagadish " with the most citations .
PRAGMA foreign_keys = ON; CREATE TABLE "author" ( "aid" int, "homepage" text, "name" text, "oid" int, primary key("aid") ); CREATE TABLE "conference" ( "cid" int, "homepage" text, "name" text, primary key ("cid") ); CREATE TABLE "domain" ( "did" int, "name" text, primary key ("did") ); CREATE TABLE "domain_author" ( "aid" int, "did" int, primary key ("did", "aid"), foreign key("aid") references `author`("aid"), foreign key("did") references `domain`("did") ); CREATE TABLE "domain_conference" ( "cid" int, "did" int, primary key ("did", "cid"), foreign key("cid") references `conference`("cid"), foreign key("did") references `domain`("did") ); CREATE TABLE "journal" ( "homepage" text, "jid" int, "name" text, primary key("jid") ); CREATE TABLE "domain_journal" ( "did" int, "jid" int, primary key ("did", "jid"), foreign key("jid") references "journal"("jid"), foreign key("did") references "domain"("did") ); CREATE TABLE "keyword" ( "keyword" text, "kid" int, primary key("kid") ); CREATE TABLE "domain_keyword" ( "did" int, "kid" int, primary key ("did", "kid"), foreign key("kid") references "keyword"("kid"), foreign key("did") references "domain"("did") ); CREATE TABLE "publication" ( "abstract" text, "cid" text, "citation_num" int, "jid" int, "pid" int, "reference_num" int, "title" text, "year" int, primary key("pid"), foreign key("jid") references "journal"("jid"), foreign key("cid") references "conference"("cid") ); CREATE TABLE "domain_publication" ( "did" int, "pid" int, primary key ("did", "pid"), foreign key("pid") references "publication"("pid"), foreign key("did") references "domain"("did") ); CREATE TABLE "organization" ( "continent" text, "homepage" text, "name" text, "oid" int, primary key("oid") ); CREATE TABLE "publication_keyword" ( "pid" int, "kid" int, primary key ("kid", "pid"), foreign key("pid") references "publication"("pid"), foreign key("kid") references "keyword"("kid") ); CREATE TABLE "writes" ( "aid" int, "pid" int, primary key ("aid", "pid"), foreign key("pid") references "publication"("pid"), foreign key("aid") references "author"("aid") ); CREATE TABLE "cite" ( "cited" int, "citing" int, foreign key("cited") references "publication"("pid"), foreign key("citing") references "publication"("pid") );
academic
SELECT title FROM publication WHERE YEAR > 2000 ORDER BY citation_num DESC LIMIT 1;
return me the paper after 2000 with the most citations .
PRAGMA foreign_keys = ON; CREATE TABLE "author" ( "aid" int, "homepage" text, "name" text, "oid" int, primary key("aid") ); CREATE TABLE "conference" ( "cid" int, "homepage" text, "name" text, primary key ("cid") ); CREATE TABLE "domain" ( "did" int, "name" text, primary key ("did") ); CREATE TABLE "domain_author" ( "aid" int, "did" int, primary key ("did", "aid"), foreign key("aid") references `author`("aid"), foreign key("did") references `domain`("did") ); CREATE TABLE "domain_conference" ( "cid" int, "did" int, primary key ("did", "cid"), foreign key("cid") references `conference`("cid"), foreign key("did") references `domain`("did") ); CREATE TABLE "journal" ( "homepage" text, "jid" int, "name" text, primary key("jid") ); CREATE TABLE "domain_journal" ( "did" int, "jid" int, primary key ("did", "jid"), foreign key("jid") references "journal"("jid"), foreign key("did") references "domain"("did") ); CREATE TABLE "keyword" ( "keyword" text, "kid" int, primary key("kid") ); CREATE TABLE "domain_keyword" ( "did" int, "kid" int, primary key ("did", "kid"), foreign key("kid") references "keyword"("kid"), foreign key("did") references "domain"("did") ); CREATE TABLE "publication" ( "abstract" text, "cid" text, "citation_num" int, "jid" int, "pid" int, "reference_num" int, "title" text, "year" int, primary key("pid"), foreign key("jid") references "journal"("jid"), foreign key("cid") references "conference"("cid") ); CREATE TABLE "domain_publication" ( "did" int, "pid" int, primary key ("did", "pid"), foreign key("pid") references "publication"("pid"), foreign key("did") references "domain"("did") ); CREATE TABLE "organization" ( "continent" text, "homepage" text, "name" text, "oid" int, primary key("oid") ); CREATE TABLE "publication_keyword" ( "pid" int, "kid" int, primary key ("kid", "pid"), foreign key("pid") references "publication"("pid"), foreign key("kid") references "keyword"("kid") ); CREATE TABLE "writes" ( "aid" int, "pid" int, primary key ("aid", "pid"), foreign key("pid") references "publication"("pid"), foreign key("aid") references "author"("aid") ); CREATE TABLE "cite" ( "cited" int, "citing" int, foreign key("cited") references "publication"("pid"), foreign key("citing") references "publication"("pid") );
academic
SELECT t3.title FROM DOMAIN AS t2 JOIN domain_publication AS t1 ON t2.did = t1.did JOIN publication AS t3 ON t3.pid = t1.pid WHERE t2.name = "Databases" AND t3.year > 2000 ORDER BY t3.citation_num DESC LIMIT 1;
return me the paper after 2000 in Databases area with the most citations .
PRAGMA foreign_keys = ON; CREATE TABLE "author" ( "aid" int, "homepage" text, "name" text, "oid" int, primary key("aid") ); CREATE TABLE "conference" ( "cid" int, "homepage" text, "name" text, primary key ("cid") ); CREATE TABLE "domain" ( "did" int, "name" text, primary key ("did") ); CREATE TABLE "domain_author" ( "aid" int, "did" int, primary key ("did", "aid"), foreign key("aid") references `author`("aid"), foreign key("did") references `domain`("did") ); CREATE TABLE "domain_conference" ( "cid" int, "did" int, primary key ("did", "cid"), foreign key("cid") references `conference`("cid"), foreign key("did") references `domain`("did") ); CREATE TABLE "journal" ( "homepage" text, "jid" int, "name" text, primary key("jid") ); CREATE TABLE "domain_journal" ( "did" int, "jid" int, primary key ("did", "jid"), foreign key("jid") references "journal"("jid"), foreign key("did") references "domain"("did") ); CREATE TABLE "keyword" ( "keyword" text, "kid" int, primary key("kid") ); CREATE TABLE "domain_keyword" ( "did" int, "kid" int, primary key ("did", "kid"), foreign key("kid") references "keyword"("kid"), foreign key("did") references "domain"("did") ); CREATE TABLE "publication" ( "abstract" text, "cid" text, "citation_num" int, "jid" int, "pid" int, "reference_num" int, "title" text, "year" int, primary key("pid"), foreign key("jid") references "journal"("jid"), foreign key("cid") references "conference"("cid") ); CREATE TABLE "domain_publication" ( "did" int, "pid" int, primary key ("did", "pid"), foreign key("pid") references "publication"("pid"), foreign key("did") references "domain"("did") ); CREATE TABLE "organization" ( "continent" text, "homepage" text, "name" text, "oid" int, primary key("oid") ); CREATE TABLE "publication_keyword" ( "pid" int, "kid" int, primary key ("kid", "pid"), foreign key("pid") references "publication"("pid"), foreign key("kid") references "keyword"("kid") ); CREATE TABLE "writes" ( "aid" int, "pid" int, primary key ("aid", "pid"), foreign key("pid") references "publication"("pid"), foreign key("aid") references "author"("aid") ); CREATE TABLE "cite" ( "cited" int, "citing" int, foreign key("cited") references "publication"("pid"), foreign key("citing") references "publication"("pid") );
academic
SELECT t2.title FROM publication AS t2 JOIN journal AS t1 ON t2.jid = t1.jid WHERE t1.name = "PVLDB" AND t2.year > 2000 ORDER BY t2.citation_num DESC LIMIT 1;
return me the paper after 2000 in PVLDB with the most citations .
PRAGMA foreign_keys = ON; CREATE TABLE "author" ( "aid" int, "homepage" text, "name" text, "oid" int, primary key("aid") ); CREATE TABLE "conference" ( "cid" int, "homepage" text, "name" text, primary key ("cid") ); CREATE TABLE "domain" ( "did" int, "name" text, primary key ("did") ); CREATE TABLE "domain_author" ( "aid" int, "did" int, primary key ("did", "aid"), foreign key("aid") references `author`("aid"), foreign key("did") references `domain`("did") ); CREATE TABLE "domain_conference" ( "cid" int, "did" int, primary key ("did", "cid"), foreign key("cid") references `conference`("cid"), foreign key("did") references `domain`("did") ); CREATE TABLE "journal" ( "homepage" text, "jid" int, "name" text, primary key("jid") ); CREATE TABLE "domain_journal" ( "did" int, "jid" int, primary key ("did", "jid"), foreign key("jid") references "journal"("jid"), foreign key("did") references "domain"("did") ); CREATE TABLE "keyword" ( "keyword" text, "kid" int, primary key("kid") ); CREATE TABLE "domain_keyword" ( "did" int, "kid" int, primary key ("did", "kid"), foreign key("kid") references "keyword"("kid"), foreign key("did") references "domain"("did") ); CREATE TABLE "publication" ( "abstract" text, "cid" text, "citation_num" int, "jid" int, "pid" int, "reference_num" int, "title" text, "year" int, primary key("pid"), foreign key("jid") references "journal"("jid"), foreign key("cid") references "conference"("cid") ); CREATE TABLE "domain_publication" ( "did" int, "pid" int, primary key ("did", "pid"), foreign key("pid") references "publication"("pid"), foreign key("did") references "domain"("did") ); CREATE TABLE "organization" ( "continent" text, "homepage" text, "name" text, "oid" int, primary key("oid") ); CREATE TABLE "publication_keyword" ( "pid" int, "kid" int, primary key ("kid", "pid"), foreign key("pid") references "publication"("pid"), foreign key("kid") references "keyword"("kid") ); CREATE TABLE "writes" ( "aid" int, "pid" int, primary key ("aid", "pid"), foreign key("pid") references "publication"("pid"), foreign key("aid") references "author"("aid") ); CREATE TABLE "cite" ( "cited" int, "citing" int, foreign key("cited") references "publication"("pid"), foreign key("citing") references "publication"("pid") );
academic
SELECT t2.title FROM publication AS t2 JOIN conference AS t1 ON t2.cid = t1.cid WHERE t1.name = "VLDB" AND t2.year > 2000 ORDER BY t2.citation_num DESC LIMIT 1;
return me the paper after 2000 in VLDB conference with the most citations .
PRAGMA foreign_keys = ON; CREATE TABLE "author" ( "aid" int, "homepage" text, "name" text, "oid" int, primary key("aid") ); CREATE TABLE "conference" ( "cid" int, "homepage" text, "name" text, primary key ("cid") ); CREATE TABLE "domain" ( "did" int, "name" text, primary key ("did") ); CREATE TABLE "domain_author" ( "aid" int, "did" int, primary key ("did", "aid"), foreign key("aid") references `author`("aid"), foreign key("did") references `domain`("did") ); CREATE TABLE "domain_conference" ( "cid" int, "did" int, primary key ("did", "cid"), foreign key("cid") references `conference`("cid"), foreign key("did") references `domain`("did") ); CREATE TABLE "journal" ( "homepage" text, "jid" int, "name" text, primary key("jid") ); CREATE TABLE "domain_journal" ( "did" int, "jid" int, primary key ("did", "jid"), foreign key("jid") references "journal"("jid"), foreign key("did") references "domain"("did") ); CREATE TABLE "keyword" ( "keyword" text, "kid" int, primary key("kid") ); CREATE TABLE "domain_keyword" ( "did" int, "kid" int, primary key ("did", "kid"), foreign key("kid") references "keyword"("kid"), foreign key("did") references "domain"("did") ); CREATE TABLE "publication" ( "abstract" text, "cid" text, "citation_num" int, "jid" int, "pid" int, "reference_num" int, "title" text, "year" int, primary key("pid"), foreign key("jid") references "journal"("jid"), foreign key("cid") references "conference"("cid") ); CREATE TABLE "domain_publication" ( "did" int, "pid" int, primary key ("did", "pid"), foreign key("pid") references "publication"("pid"), foreign key("did") references "domain"("did") ); CREATE TABLE "organization" ( "continent" text, "homepage" text, "name" text, "oid" int, primary key("oid") ); CREATE TABLE "publication_keyword" ( "pid" int, "kid" int, primary key ("kid", "pid"), foreign key("pid") references "publication"("pid"), foreign key("kid") references "keyword"("kid") ); CREATE TABLE "writes" ( "aid" int, "pid" int, primary key ("aid", "pid"), foreign key("pid") references "publication"("pid"), foreign key("aid") references "author"("aid") ); CREATE TABLE "cite" ( "cited" int, "citing" int, foreign key("cited") references "publication"("pid"), foreign key("citing") references "publication"("pid") );
academic
SELECT t1.name FROM publication AS t4 JOIN journal AS t2 ON t4.jid = t2.jid JOIN writes AS t3 ON t3.pid = t4.pid JOIN author AS t1 ON t3.aid = t1.aid WHERE t2.name = "PVLDB" GROUP BY t1.name HAVING COUNT ( DISTINCT t4.title ) > 10;
return me the authors who have more than 10 papers in PVLDB .
PRAGMA foreign_keys = ON; CREATE TABLE "author" ( "aid" int, "homepage" text, "name" text, "oid" int, primary key("aid") ); CREATE TABLE "conference" ( "cid" int, "homepage" text, "name" text, primary key ("cid") ); CREATE TABLE "domain" ( "did" int, "name" text, primary key ("did") ); CREATE TABLE "domain_author" ( "aid" int, "did" int, primary key ("did", "aid"), foreign key("aid") references `author`("aid"), foreign key("did") references `domain`("did") ); CREATE TABLE "domain_conference" ( "cid" int, "did" int, primary key ("did", "cid"), foreign key("cid") references `conference`("cid"), foreign key("did") references `domain`("did") ); CREATE TABLE "journal" ( "homepage" text, "jid" int, "name" text, primary key("jid") ); CREATE TABLE "domain_journal" ( "did" int, "jid" int, primary key ("did", "jid"), foreign key("jid") references "journal"("jid"), foreign key("did") references "domain"("did") ); CREATE TABLE "keyword" ( "keyword" text, "kid" int, primary key("kid") ); CREATE TABLE "domain_keyword" ( "did" int, "kid" int, primary key ("did", "kid"), foreign key("kid") references "keyword"("kid"), foreign key("did") references "domain"("did") ); CREATE TABLE "publication" ( "abstract" text, "cid" text, "citation_num" int, "jid" int, "pid" int, "reference_num" int, "title" text, "year" int, primary key("pid"), foreign key("jid") references "journal"("jid"), foreign key("cid") references "conference"("cid") ); CREATE TABLE "domain_publication" ( "did" int, "pid" int, primary key ("did", "pid"), foreign key("pid") references "publication"("pid"), foreign key("did") references "domain"("did") ); CREATE TABLE "organization" ( "continent" text, "homepage" text, "name" text, "oid" int, primary key("oid") ); CREATE TABLE "publication_keyword" ( "pid" int, "kid" int, primary key ("kid", "pid"), foreign key("pid") references "publication"("pid"), foreign key("kid") references "keyword"("kid") ); CREATE TABLE "writes" ( "aid" int, "pid" int, primary key ("aid", "pid"), foreign key("pid") references "publication"("pid"), foreign key("aid") references "author"("aid") ); CREATE TABLE "cite" ( "cited" int, "citing" int, foreign key("cited") references "publication"("pid"), foreign key("citing") references "publication"("pid") );
academic
SELECT t1.name FROM publication AS t4 JOIN journal AS t2 ON t4.jid = t2.jid JOIN writes AS t3 ON t3.pid = t4.pid JOIN author AS t1 ON t3.aid = t1.aid WHERE t2.name = "PVLDB" GROUP BY t1.name ORDER BY COUNT ( DISTINCT t4.title ) DESC LIMIT 1;
return me the authors who have the most number of papers in PVLDB .
PRAGMA foreign_keys = ON; CREATE TABLE "author" ( "aid" int, "homepage" text, "name" text, "oid" int, primary key("aid") ); CREATE TABLE "conference" ( "cid" int, "homepage" text, "name" text, primary key ("cid") ); CREATE TABLE "domain" ( "did" int, "name" text, primary key ("did") ); CREATE TABLE "domain_author" ( "aid" int, "did" int, primary key ("did", "aid"), foreign key("aid") references `author`("aid"), foreign key("did") references `domain`("did") ); CREATE TABLE "domain_conference" ( "cid" int, "did" int, primary key ("did", "cid"), foreign key("cid") references `conference`("cid"), foreign key("did") references `domain`("did") ); CREATE TABLE "journal" ( "homepage" text, "jid" int, "name" text, primary key("jid") ); CREATE TABLE "domain_journal" ( "did" int, "jid" int, primary key ("did", "jid"), foreign key("jid") references "journal"("jid"), foreign key("did") references "domain"("did") ); CREATE TABLE "keyword" ( "keyword" text, "kid" int, primary key("kid") ); CREATE TABLE "domain_keyword" ( "did" int, "kid" int, primary key ("did", "kid"), foreign key("kid") references "keyword"("kid"), foreign key("did") references "domain"("did") ); CREATE TABLE "publication" ( "abstract" text, "cid" text, "citation_num" int, "jid" int, "pid" int, "reference_num" int, "title" text, "year" int, primary key("pid"), foreign key("jid") references "journal"("jid"), foreign key("cid") references "conference"("cid") ); CREATE TABLE "domain_publication" ( "did" int, "pid" int, primary key ("did", "pid"), foreign key("pid") references "publication"("pid"), foreign key("did") references "domain"("did") ); CREATE TABLE "organization" ( "continent" text, "homepage" text, "name" text, "oid" int, primary key("oid") ); CREATE TABLE "publication_keyword" ( "pid" int, "kid" int, primary key ("kid", "pid"), foreign key("pid") references "publication"("pid"), foreign key("kid") references "keyword"("kid") ); CREATE TABLE "writes" ( "aid" int, "pid" int, primary key ("aid", "pid"), foreign key("pid") references "publication"("pid"), foreign key("aid") references "author"("aid") ); CREATE TABLE "cite" ( "cited" int, "citing" int, foreign key("cited") references "publication"("pid"), foreign key("citing") references "publication"("pid") );
academic
SELECT t2.name FROM publication_keyword AS t5 JOIN keyword AS t1 ON t5.kid = t1.kid JOIN publication AS t3 ON t3.pid = t5.pid JOIN writes AS t4 ON t4.pid = t3.pid JOIN author AS t2 ON t4.aid = t2.aid WHERE t1.keyword = "Relational Database" GROUP BY t2.name HAVING COUNT ( DISTINCT t3.title ) > 10;
return me the authors who have more than 10 papers containing keyword " Relational Database " .
PRAGMA foreign_keys = ON; CREATE TABLE "author" ( "aid" int, "homepage" text, "name" text, "oid" int, primary key("aid") ); CREATE TABLE "conference" ( "cid" int, "homepage" text, "name" text, primary key ("cid") ); CREATE TABLE "domain" ( "did" int, "name" text, primary key ("did") ); CREATE TABLE "domain_author" ( "aid" int, "did" int, primary key ("did", "aid"), foreign key("aid") references `author`("aid"), foreign key("did") references `domain`("did") ); CREATE TABLE "domain_conference" ( "cid" int, "did" int, primary key ("did", "cid"), foreign key("cid") references `conference`("cid"), foreign key("did") references `domain`("did") ); CREATE TABLE "journal" ( "homepage" text, "jid" int, "name" text, primary key("jid") ); CREATE TABLE "domain_journal" ( "did" int, "jid" int, primary key ("did", "jid"), foreign key("jid") references "journal"("jid"), foreign key("did") references "domain"("did") ); CREATE TABLE "keyword" ( "keyword" text, "kid" int, primary key("kid") ); CREATE TABLE "domain_keyword" ( "did" int, "kid" int, primary key ("did", "kid"), foreign key("kid") references "keyword"("kid"), foreign key("did") references "domain"("did") ); CREATE TABLE "publication" ( "abstract" text, "cid" text, "citation_num" int, "jid" int, "pid" int, "reference_num" int, "title" text, "year" int, primary key("pid"), foreign key("jid") references "journal"("jid"), foreign key("cid") references "conference"("cid") ); CREATE TABLE "domain_publication" ( "did" int, "pid" int, primary key ("did", "pid"), foreign key("pid") references "publication"("pid"), foreign key("did") references "domain"("did") ); CREATE TABLE "organization" ( "continent" text, "homepage" text, "name" text, "oid" int, primary key("oid") ); CREATE TABLE "publication_keyword" ( "pid" int, "kid" int, primary key ("kid", "pid"), foreign key("pid") references "publication"("pid"), foreign key("kid") references "keyword"("kid") ); CREATE TABLE "writes" ( "aid" int, "pid" int, primary key ("aid", "pid"), foreign key("pid") references "publication"("pid"), foreign key("aid") references "author"("aid") ); CREATE TABLE "cite" ( "cited" int, "citing" int, foreign key("cited") references "publication"("pid"), foreign key("citing") references "publication"("pid") );
academic
SELECT t2.name FROM publication_keyword AS t4 JOIN keyword AS t1 ON t4.kid = t1.kid JOIN publication AS t3 ON t3.pid = t4.pid JOIN conference AS t2 ON t3.cid = t2.cid WHERE t1.keyword = "Relational Database" GROUP BY t2.name HAVING COUNT ( DISTINCT t3.title ) > 60;
return me the conferences, which have more than 60 papers containing keyword " Relational Database " .
PRAGMA foreign_keys = ON; CREATE TABLE "author" ( "aid" int, "homepage" text, "name" text, "oid" int, primary key("aid") ); CREATE TABLE "conference" ( "cid" int, "homepage" text, "name" text, primary key ("cid") ); CREATE TABLE "domain" ( "did" int, "name" text, primary key ("did") ); CREATE TABLE "domain_author" ( "aid" int, "did" int, primary key ("did", "aid"), foreign key("aid") references `author`("aid"), foreign key("did") references `domain`("did") ); CREATE TABLE "domain_conference" ( "cid" int, "did" int, primary key ("did", "cid"), foreign key("cid") references `conference`("cid"), foreign key("did") references `domain`("did") ); CREATE TABLE "journal" ( "homepage" text, "jid" int, "name" text, primary key("jid") ); CREATE TABLE "domain_journal" ( "did" int, "jid" int, primary key ("did", "jid"), foreign key("jid") references "journal"("jid"), foreign key("did") references "domain"("did") ); CREATE TABLE "keyword" ( "keyword" text, "kid" int, primary key("kid") ); CREATE TABLE "domain_keyword" ( "did" int, "kid" int, primary key ("did", "kid"), foreign key("kid") references "keyword"("kid"), foreign key("did") references "domain"("did") ); CREATE TABLE "publication" ( "abstract" text, "cid" text, "citation_num" int, "jid" int, "pid" int, "reference_num" int, "title" text, "year" int, primary key("pid"), foreign key("jid") references "journal"("jid"), foreign key("cid") references "conference"("cid") ); CREATE TABLE "domain_publication" ( "did" int, "pid" int, primary key ("did", "pid"), foreign key("pid") references "publication"("pid"), foreign key("did") references "domain"("did") ); CREATE TABLE "organization" ( "continent" text, "homepage" text, "name" text, "oid" int, primary key("oid") ); CREATE TABLE "publication_keyword" ( "pid" int, "kid" int, primary key ("kid", "pid"), foreign key("pid") references "publication"("pid"), foreign key("kid") references "keyword"("kid") ); CREATE TABLE "writes" ( "aid" int, "pid" int, primary key ("aid", "pid"), foreign key("pid") references "publication"("pid"), foreign key("aid") references "author"("aid") ); CREATE TABLE "cite" ( "cited" int, "citing" int, foreign key("cited") references "publication"("pid"), foreign key("citing") references "publication"("pid") );
academic
SELECT t3.name FROM publication_keyword AS t4 JOIN keyword AS t1 ON t4.kid = t1.kid JOIN publication AS t2 ON t2.pid = t4.pid JOIN journal AS t3 ON t2.jid = t3.jid WHERE t1.keyword = "Relational Database" GROUP BY t3.name HAVING COUNT ( DISTINCT t2.title ) > 60;
return me the journals, which have more than 60 papers containing keyword " Relational Database " .
PRAGMA foreign_keys = ON; CREATE TABLE "author" ( "aid" int, "homepage" text, "name" text, "oid" int, primary key("aid") ); CREATE TABLE "conference" ( "cid" int, "homepage" text, "name" text, primary key ("cid") ); CREATE TABLE "domain" ( "did" int, "name" text, primary key ("did") ); CREATE TABLE "domain_author" ( "aid" int, "did" int, primary key ("did", "aid"), foreign key("aid") references `author`("aid"), foreign key("did") references `domain`("did") ); CREATE TABLE "domain_conference" ( "cid" int, "did" int, primary key ("did", "cid"), foreign key("cid") references `conference`("cid"), foreign key("did") references `domain`("did") ); CREATE TABLE "journal" ( "homepage" text, "jid" int, "name" text, primary key("jid") ); CREATE TABLE "domain_journal" ( "did" int, "jid" int, primary key ("did", "jid"), foreign key("jid") references "journal"("jid"), foreign key("did") references "domain"("did") ); CREATE TABLE "keyword" ( "keyword" text, "kid" int, primary key("kid") ); CREATE TABLE "domain_keyword" ( "did" int, "kid" int, primary key ("did", "kid"), foreign key("kid") references "keyword"("kid"), foreign key("did") references "domain"("did") ); CREATE TABLE "publication" ( "abstract" text, "cid" text, "citation_num" int, "jid" int, "pid" int, "reference_num" int, "title" text, "year" int, primary key("pid"), foreign key("jid") references "journal"("jid"), foreign key("cid") references "conference"("cid") ); CREATE TABLE "domain_publication" ( "did" int, "pid" int, primary key ("did", "pid"), foreign key("pid") references "publication"("pid"), foreign key("did") references "domain"("did") ); CREATE TABLE "organization" ( "continent" text, "homepage" text, "name" text, "oid" int, primary key("oid") ); CREATE TABLE "publication_keyword" ( "pid" int, "kid" int, primary key ("kid", "pid"), foreign key("pid") references "publication"("pid"), foreign key("kid") references "keyword"("kid") ); CREATE TABLE "writes" ( "aid" int, "pid" int, primary key ("aid", "pid"), foreign key("pid") references "publication"("pid"), foreign key("aid") references "author"("aid") ); CREATE TABLE "cite" ( "cited" int, "citing" int, foreign key("cited") references "publication"("pid"), foreign key("citing") references "publication"("pid") );
academic
SELECT t1.keyword FROM publication_keyword AS t4 JOIN keyword AS t1 ON t4.kid = t1.kid JOIN publication AS t3 ON t3.pid = t4.pid JOIN conference AS t2 ON t3.cid = t2.cid WHERE t2.name = "VLDB" GROUP BY t1.keyword HAVING COUNT ( DISTINCT t3.title ) > 100;
return me the keywords, which have been contained by more than 100 papers in VLDB conference .
PRAGMA foreign_keys = ON; CREATE TABLE "author" ( "aid" int, "homepage" text, "name" text, "oid" int, primary key("aid") ); CREATE TABLE "conference" ( "cid" int, "homepage" text, "name" text, primary key ("cid") ); CREATE TABLE "domain" ( "did" int, "name" text, primary key ("did") ); CREATE TABLE "domain_author" ( "aid" int, "did" int, primary key ("did", "aid"), foreign key("aid") references `author`("aid"), foreign key("did") references `domain`("did") ); CREATE TABLE "domain_conference" ( "cid" int, "did" int, primary key ("did", "cid"), foreign key("cid") references `conference`("cid"), foreign key("did") references `domain`("did") ); CREATE TABLE "journal" ( "homepage" text, "jid" int, "name" text, primary key("jid") ); CREATE TABLE "domain_journal" ( "did" int, "jid" int, primary key ("did", "jid"), foreign key("jid") references "journal"("jid"), foreign key("did") references "domain"("did") ); CREATE TABLE "keyword" ( "keyword" text, "kid" int, primary key("kid") ); CREATE TABLE "domain_keyword" ( "did" int, "kid" int, primary key ("did", "kid"), foreign key("kid") references "keyword"("kid"), foreign key("did") references "domain"("did") ); CREATE TABLE "publication" ( "abstract" text, "cid" text, "citation_num" int, "jid" int, "pid" int, "reference_num" int, "title" text, "year" int, primary key("pid"), foreign key("jid") references "journal"("jid"), foreign key("cid") references "conference"("cid") ); CREATE TABLE "domain_publication" ( "did" int, "pid" int, primary key ("did", "pid"), foreign key("pid") references "publication"("pid"), foreign key("did") references "domain"("did") ); CREATE TABLE "organization" ( "continent" text, "homepage" text, "name" text, "oid" int, primary key("oid") ); CREATE TABLE "publication_keyword" ( "pid" int, "kid" int, primary key ("kid", "pid"), foreign key("pid") references "publication"("pid"), foreign key("kid") references "keyword"("kid") ); CREATE TABLE "writes" ( "aid" int, "pid" int, primary key ("aid", "pid"), foreign key("pid") references "publication"("pid"), foreign key("aid") references "author"("aid") ); CREATE TABLE "cite" ( "cited" int, "citing" int, foreign key("cited") references "publication"("pid"), foreign key("citing") references "publication"("pid") );
academic
SELECT t1.keyword FROM publication_keyword AS t4 JOIN keyword AS t1 ON t4.kid = t1.kid JOIN publication AS t2 ON t2.pid = t4.pid JOIN journal AS t3 ON t2.jid = t3.jid WHERE t3.name = "PVLDB" GROUP BY t1.keyword HAVING COUNT ( DISTINCT t2.title ) > 100;
return me the keywords, which have been contained by more than 100 papers in PVLDB .
PRAGMA foreign_keys = ON; CREATE TABLE "author" ( "aid" int, "homepage" text, "name" text, "oid" int, primary key("aid") ); CREATE TABLE "conference" ( "cid" int, "homepage" text, "name" text, primary key ("cid") ); CREATE TABLE "domain" ( "did" int, "name" text, primary key ("did") ); CREATE TABLE "domain_author" ( "aid" int, "did" int, primary key ("did", "aid"), foreign key("aid") references `author`("aid"), foreign key("did") references `domain`("did") ); CREATE TABLE "domain_conference" ( "cid" int, "did" int, primary key ("did", "cid"), foreign key("cid") references `conference`("cid"), foreign key("did") references `domain`("did") ); CREATE TABLE "journal" ( "homepage" text, "jid" int, "name" text, primary key("jid") ); CREATE TABLE "domain_journal" ( "did" int, "jid" int, primary key ("did", "jid"), foreign key("jid") references "journal"("jid"), foreign key("did") references "domain"("did") ); CREATE TABLE "keyword" ( "keyword" text, "kid" int, primary key("kid") ); CREATE TABLE "domain_keyword" ( "did" int, "kid" int, primary key ("did", "kid"), foreign key("kid") references "keyword"("kid"), foreign key("did") references "domain"("did") ); CREATE TABLE "publication" ( "abstract" text, "cid" text, "citation_num" int, "jid" int, "pid" int, "reference_num" int, "title" text, "year" int, primary key("pid"), foreign key("jid") references "journal"("jid"), foreign key("cid") references "conference"("cid") ); CREATE TABLE "domain_publication" ( "did" int, "pid" int, primary key ("did", "pid"), foreign key("pid") references "publication"("pid"), foreign key("did") references "domain"("did") ); CREATE TABLE "organization" ( "continent" text, "homepage" text, "name" text, "oid" int, primary key("oid") ); CREATE TABLE "publication_keyword" ( "pid" int, "kid" int, primary key ("kid", "pid"), foreign key("pid") references "publication"("pid"), foreign key("kid") references "keyword"("kid") ); CREATE TABLE "writes" ( "aid" int, "pid" int, primary key ("aid", "pid"), foreign key("pid") references "publication"("pid"), foreign key("aid") references "author"("aid") ); CREATE TABLE "cite" ( "cited" int, "citing" int, foreign key("cited") references "publication"("pid"), foreign key("citing") references "publication"("pid") );
academic
SELECT t1.keyword FROM publication_keyword AS t5 JOIN keyword AS t1 ON t5.kid = t1.kid JOIN publication AS t3 ON t3.pid = t5.pid JOIN writes AS t4 ON t4.pid = t3.pid JOIN author AS t2 ON t4.aid = t2.aid WHERE t2.name = "H. V. Jagadish" GROUP BY t1.keyword HAVING COUNT ( DISTINCT t3.title ) > 10;
return me the keywords, which have been contained by more than 10 papers of " H. V. Jagadish " .
PRAGMA foreign_keys = ON; CREATE TABLE "author" ( "aid" int, "homepage" text, "name" text, "oid" int, primary key("aid") ); CREATE TABLE "conference" ( "cid" int, "homepage" text, "name" text, primary key ("cid") ); CREATE TABLE "domain" ( "did" int, "name" text, primary key ("did") ); CREATE TABLE "domain_author" ( "aid" int, "did" int, primary key ("did", "aid"), foreign key("aid") references `author`("aid"), foreign key("did") references `domain`("did") ); CREATE TABLE "domain_conference" ( "cid" int, "did" int, primary key ("did", "cid"), foreign key("cid") references `conference`("cid"), foreign key("did") references `domain`("did") ); CREATE TABLE "journal" ( "homepage" text, "jid" int, "name" text, primary key("jid") ); CREATE TABLE "domain_journal" ( "did" int, "jid" int, primary key ("did", "jid"), foreign key("jid") references "journal"("jid"), foreign key("did") references "domain"("did") ); CREATE TABLE "keyword" ( "keyword" text, "kid" int, primary key("kid") ); CREATE TABLE "domain_keyword" ( "did" int, "kid" int, primary key ("did", "kid"), foreign key("kid") references "keyword"("kid"), foreign key("did") references "domain"("did") ); CREATE TABLE "publication" ( "abstract" text, "cid" text, "citation_num" int, "jid" int, "pid" int, "reference_num" int, "title" text, "year" int, primary key("pid"), foreign key("jid") references "journal"("jid"), foreign key("cid") references "conference"("cid") ); CREATE TABLE "domain_publication" ( "did" int, "pid" int, primary key ("did", "pid"), foreign key("pid") references "publication"("pid"), foreign key("did") references "domain"("did") ); CREATE TABLE "organization" ( "continent" text, "homepage" text, "name" text, "oid" int, primary key("oid") ); CREATE TABLE "publication_keyword" ( "pid" int, "kid" int, primary key ("kid", "pid"), foreign key("pid") references "publication"("pid"), foreign key("kid") references "keyword"("kid") ); CREATE TABLE "writes" ( "aid" int, "pid" int, primary key ("aid", "pid"), foreign key("pid") references "publication"("pid"), foreign key("aid") references "author"("aid") ); CREATE TABLE "cite" ( "cited" int, "citing" int, foreign key("cited") references "publication"("pid"), foreign key("citing") references "publication"("pid") );
academic
SELECT t1.name FROM publication AS t4 JOIN conference AS t2 ON t4.cid = t2.cid JOIN writes AS t3 ON t3.pid = t4.pid JOIN author AS t1 ON t3.aid = t1.aid WHERE t2.name = "VLDB" GROUP BY t1.name HAVING COUNT ( DISTINCT t4.title ) > 10;
return me the authors who have more than 10 papers in the VLDB conference .
PRAGMA foreign_keys = ON; CREATE TABLE "author" ( "aid" int, "homepage" text, "name" text, "oid" int, primary key("aid") ); CREATE TABLE "conference" ( "cid" int, "homepage" text, "name" text, primary key ("cid") ); CREATE TABLE "domain" ( "did" int, "name" text, primary key ("did") ); CREATE TABLE "domain_author" ( "aid" int, "did" int, primary key ("did", "aid"), foreign key("aid") references `author`("aid"), foreign key("did") references `domain`("did") ); CREATE TABLE "domain_conference" ( "cid" int, "did" int, primary key ("did", "cid"), foreign key("cid") references `conference`("cid"), foreign key("did") references `domain`("did") ); CREATE TABLE "journal" ( "homepage" text, "jid" int, "name" text, primary key("jid") ); CREATE TABLE "domain_journal" ( "did" int, "jid" int, primary key ("did", "jid"), foreign key("jid") references "journal"("jid"), foreign key("did") references "domain"("did") ); CREATE TABLE "keyword" ( "keyword" text, "kid" int, primary key("kid") ); CREATE TABLE "domain_keyword" ( "did" int, "kid" int, primary key ("did", "kid"), foreign key("kid") references "keyword"("kid"), foreign key("did") references "domain"("did") ); CREATE TABLE "publication" ( "abstract" text, "cid" text, "citation_num" int, "jid" int, "pid" int, "reference_num" int, "title" text, "year" int, primary key("pid"), foreign key("jid") references "journal"("jid"), foreign key("cid") references "conference"("cid") ); CREATE TABLE "domain_publication" ( "did" int, "pid" int, primary key ("did", "pid"), foreign key("pid") references "publication"("pid"), foreign key("did") references "domain"("did") ); CREATE TABLE "organization" ( "continent" text, "homepage" text, "name" text, "oid" int, primary key("oid") ); CREATE TABLE "publication_keyword" ( "pid" int, "kid" int, primary key ("kid", "pid"), foreign key("pid") references "publication"("pid"), foreign key("kid") references "keyword"("kid") ); CREATE TABLE "writes" ( "aid" int, "pid" int, primary key ("aid", "pid"), foreign key("pid") references "publication"("pid"), foreign key("aid") references "author"("aid") ); CREATE TABLE "cite" ( "cited" int, "citing" int, foreign key("cited") references "publication"("pid"), foreign key("citing") references "publication"("pid") );
academic
SELECT t1.name FROM publication AS t4 JOIN conference AS t2 ON t4.cid = t2.cid JOIN writes AS t3 ON t3.pid = t4.pid JOIN author AS t1 ON t3.aid = t1.aid WHERE t2.name = "VLDB" GROUP BY t1.name ORDER BY COUNT ( DISTINCT t4.title ) DESC LIMIT 1;
return me the author who has the most number of papers in the VLDB conference .
PRAGMA foreign_keys = ON; CREATE TABLE "author" ( "aid" int, "homepage" text, "name" text, "oid" int, primary key("aid") ); CREATE TABLE "conference" ( "cid" int, "homepage" text, "name" text, primary key ("cid") ); CREATE TABLE "domain" ( "did" int, "name" text, primary key ("did") ); CREATE TABLE "domain_author" ( "aid" int, "did" int, primary key ("did", "aid"), foreign key("aid") references `author`("aid"), foreign key("did") references `domain`("did") ); CREATE TABLE "domain_conference" ( "cid" int, "did" int, primary key ("did", "cid"), foreign key("cid") references `conference`("cid"), foreign key("did") references `domain`("did") ); CREATE TABLE "journal" ( "homepage" text, "jid" int, "name" text, primary key("jid") ); CREATE TABLE "domain_journal" ( "did" int, "jid" int, primary key ("did", "jid"), foreign key("jid") references "journal"("jid"), foreign key("did") references "domain"("did") ); CREATE TABLE "keyword" ( "keyword" text, "kid" int, primary key("kid") ); CREATE TABLE "domain_keyword" ( "did" int, "kid" int, primary key ("did", "kid"), foreign key("kid") references "keyword"("kid"), foreign key("did") references "domain"("did") ); CREATE TABLE "publication" ( "abstract" text, "cid" text, "citation_num" int, "jid" int, "pid" int, "reference_num" int, "title" text, "year" int, primary key("pid"), foreign key("jid") references "journal"("jid"), foreign key("cid") references "conference"("cid") ); CREATE TABLE "domain_publication" ( "did" int, "pid" int, primary key ("did", "pid"), foreign key("pid") references "publication"("pid"), foreign key("did") references "domain"("did") ); CREATE TABLE "organization" ( "continent" text, "homepage" text, "name" text, "oid" int, primary key("oid") ); CREATE TABLE "publication_keyword" ( "pid" int, "kid" int, primary key ("kid", "pid"), foreign key("pid") references "publication"("pid"), foreign key("kid") references "keyword"("kid") ); CREATE TABLE "writes" ( "aid" int, "pid" int, primary key ("aid", "pid"), foreign key("pid") references "publication"("pid"), foreign key("aid") references "author"("aid") ); CREATE TABLE "cite" ( "cited" int, "citing" int, foreign key("cited") references "publication"("pid"), foreign key("citing") references "publication"("pid") );
academic
SELECT t1.name FROM organization AS t2 JOIN author AS t1 ON t2.oid = t1.oid JOIN writes AS t3 ON t3.aid = t1.aid JOIN publication AS t4 ON t3.pid = t4.pid WHERE t2.name = "University of Michigan" GROUP BY t1.name HAVING SUM ( t4.citation_num ) > 5000;
return me the author in the " University of Michigan " whose papers have more than 5000 total citations .
PRAGMA foreign_keys = ON; CREATE TABLE "author" ( "aid" int, "homepage" text, "name" text, "oid" int, primary key("aid") ); CREATE TABLE "conference" ( "cid" int, "homepage" text, "name" text, primary key ("cid") ); CREATE TABLE "domain" ( "did" int, "name" text, primary key ("did") ); CREATE TABLE "domain_author" ( "aid" int, "did" int, primary key ("did", "aid"), foreign key("aid") references `author`("aid"), foreign key("did") references `domain`("did") ); CREATE TABLE "domain_conference" ( "cid" int, "did" int, primary key ("did", "cid"), foreign key("cid") references `conference`("cid"), foreign key("did") references `domain`("did") ); CREATE TABLE "journal" ( "homepage" text, "jid" int, "name" text, primary key("jid") ); CREATE TABLE "domain_journal" ( "did" int, "jid" int, primary key ("did", "jid"), foreign key("jid") references "journal"("jid"), foreign key("did") references "domain"("did") ); CREATE TABLE "keyword" ( "keyword" text, "kid" int, primary key("kid") ); CREATE TABLE "domain_keyword" ( "did" int, "kid" int, primary key ("did", "kid"), foreign key("kid") references "keyword"("kid"), foreign key("did") references "domain"("did") ); CREATE TABLE "publication" ( "abstract" text, "cid" text, "citation_num" int, "jid" int, "pid" int, "reference_num" int, "title" text, "year" int, primary key("pid"), foreign key("jid") references "journal"("jid"), foreign key("cid") references "conference"("cid") ); CREATE TABLE "domain_publication" ( "did" int, "pid" int, primary key ("did", "pid"), foreign key("pid") references "publication"("pid"), foreign key("did") references "domain"("did") ); CREATE TABLE "organization" ( "continent" text, "homepage" text, "name" text, "oid" int, primary key("oid") ); CREATE TABLE "publication_keyword" ( "pid" int, "kid" int, primary key ("kid", "pid"), foreign key("pid") references "publication"("pid"), foreign key("kid") references "keyword"("kid") ); CREATE TABLE "writes" ( "aid" int, "pid" int, primary key ("aid", "pid"), foreign key("pid") references "publication"("pid"), foreign key("aid") references "author"("aid") ); CREATE TABLE "cite" ( "cited" int, "citing" int, foreign key("cited") references "publication"("pid"), foreign key("citing") references "publication"("pid") );
academic
SELECT t1.name FROM domain_author AS t6 JOIN author AS t1 ON t6.aid = t1.aid JOIN DOMAIN AS t3 ON t3.did = t6.did JOIN organization AS t5 ON t5.oid = t1.oid JOIN writes AS t2 ON t2.aid = t1.aid JOIN publication AS t4 ON t2.pid = t4.pid WHERE t3.name = "Databases" AND t5.name = "University of Michigan" GROUP BY t1.name HAVING SUM ( t4.citation_num ) > 5000;
return me the author in the " University of Michigan " in Databases area whose papers have more than 5000 total citations .
PRAGMA foreign_keys = ON; CREATE TABLE "author" ( "aid" int, "homepage" text, "name" text, "oid" int, primary key("aid") ); CREATE TABLE "conference" ( "cid" int, "homepage" text, "name" text, primary key ("cid") ); CREATE TABLE "domain" ( "did" int, "name" text, primary key ("did") ); CREATE TABLE "domain_author" ( "aid" int, "did" int, primary key ("did", "aid"), foreign key("aid") references `author`("aid"), foreign key("did") references `domain`("did") ); CREATE TABLE "domain_conference" ( "cid" int, "did" int, primary key ("did", "cid"), foreign key("cid") references `conference`("cid"), foreign key("did") references `domain`("did") ); CREATE TABLE "journal" ( "homepage" text, "jid" int, "name" text, primary key("jid") ); CREATE TABLE "domain_journal" ( "did" int, "jid" int, primary key ("did", "jid"), foreign key("jid") references "journal"("jid"), foreign key("did") references "domain"("did") ); CREATE TABLE "keyword" ( "keyword" text, "kid" int, primary key("kid") ); CREATE TABLE "domain_keyword" ( "did" int, "kid" int, primary key ("did", "kid"), foreign key("kid") references "keyword"("kid"), foreign key("did") references "domain"("did") ); CREATE TABLE "publication" ( "abstract" text, "cid" text, "citation_num" int, "jid" int, "pid" int, "reference_num" int, "title" text, "year" int, primary key("pid"), foreign key("jid") references "journal"("jid"), foreign key("cid") references "conference"("cid") ); CREATE TABLE "domain_publication" ( "did" int, "pid" int, primary key ("did", "pid"), foreign key("pid") references "publication"("pid"), foreign key("did") references "domain"("did") ); CREATE TABLE "organization" ( "continent" text, "homepage" text, "name" text, "oid" int, primary key("oid") ); CREATE TABLE "publication_keyword" ( "pid" int, "kid" int, primary key ("kid", "pid"), foreign key("pid") references "publication"("pid"), foreign key("kid") references "keyword"("kid") ); CREATE TABLE "writes" ( "aid" int, "pid" int, primary key ("aid", "pid"), foreign key("pid") references "publication"("pid"), foreign key("aid") references "author"("aid") ); CREATE TABLE "cite" ( "cited" int, "citing" int, foreign key("cited") references "publication"("pid"), foreign key("citing") references "publication"("pid") );
imdb
SELECT release_year FROM movie WHERE title = "The Imitation Game";
What year is the movie " The Imitation Game " from ?
PRAGMA foreign_keys = ON; CREATE TABLE "actor" ( "aid" int, "gender" text, "name" text, "nationality" text, "birth_city" text, "birth_year" int, primary key("aid") ); CREATE TABLE "copyright" ( "id" int, "msid" int, "cid" int, primary key("id") ); 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") ); CREATE TABLE "genre" ( "gid" int, "genre" text, primary key("gid") ); CREATE TABLE "classification" ( "id" int, "msid" int, "gid" int, primary key("id"), foreign key("gid") references `genre`("gid"), foreign key("msid") references `copyright`("msid") ); CREATE TABLE "company" ( "id" int, "name" text, "country_code" text, primary key("id") ); CREATE TABLE "director" ( "did" int, "gender" text, "name" text, "nationality" text, "birth_city" text, "birth_year" int, primary key("did") ); CREATE TABLE "producer" ( "pid" int, "gender" text, "name" text, "nationality" text, "birth_city" text, "birth_year" int, primary key("pid") ); 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") ); CREATE TABLE "keyword" ( "id" int, "keyword" text, primary key("id") ); 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") ); CREATE TABLE "movie" ( "mid" int, "title" text, "release_year" int, "title_aka" text, "budget" text, primary key("mid") ); CREATE TABLE "tags" ( "id" int, "msid" int, "kid" int, primary key("id"), foreign key("msid") references `copyright`("msid"), foreign key("kid") references `keyword`("kid") ); 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") ); CREATE TABLE "writer" ( "wid" int, "gender" text, "name" int, "nationality" int, "num_of_episodes" int, "birth_city" text, "birth_year" int, primary key("wid") ); CREATE TABLE "written_by" ( "id" int, "msid" int, "wid" int, foreign key("msid") references `copyright`("msid"), foreign key("wid") references `writer`("wid") );
imdb
SELECT release_year FROM movie WHERE title = "The Imitation Game";
What year was the movie " The Imitation Game " produced
PRAGMA foreign_keys = ON; CREATE TABLE "actor" ( "aid" int, "gender" text, "name" text, "nationality" text, "birth_city" text, "birth_year" int, primary key("aid") ); CREATE TABLE "copyright" ( "id" int, "msid" int, "cid" int, primary key("id") ); 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") ); CREATE TABLE "genre" ( "gid" int, "genre" text, primary key("gid") ); CREATE TABLE "classification" ( "id" int, "msid" int, "gid" int, primary key("id"), foreign key("gid") references `genre`("gid"), foreign key("msid") references `copyright`("msid") ); CREATE TABLE "company" ( "id" int, "name" text, "country_code" text, primary key("id") ); CREATE TABLE "director" ( "did" int, "gender" text, "name" text, "nationality" text, "birth_city" text, "birth_year" int, primary key("did") ); CREATE TABLE "producer" ( "pid" int, "gender" text, "name" text, "nationality" text, "birth_city" text, "birth_year" int, primary key("pid") ); 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") ); CREATE TABLE "keyword" ( "id" int, "keyword" text, primary key("id") ); 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") ); CREATE TABLE "movie" ( "mid" int, "title" text, "release_year" int, "title_aka" text, "budget" text, primary key("mid") ); CREATE TABLE "tags" ( "id" int, "msid" int, "kid" int, primary key("id"), foreign key("msid") references `copyright`("msid"), foreign key("kid") references `keyword`("kid") ); 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") ); CREATE TABLE "writer" ( "wid" int, "gender" text, "name" int, "nationality" int, "num_of_episodes" int, "birth_city" text, "birth_year" int, primary key("wid") ); CREATE TABLE "written_by" ( "id" int, "msid" int, "wid" int, foreign key("msid") references `copyright`("msid"), foreign key("wid") references `writer`("wid") );
imdb
SELECT birth_year FROM actor WHERE name = "Benedict Cumberbatch";
What year was " Benedict Cumberbatch " born ?
PRAGMA foreign_keys = ON; CREATE TABLE "actor" ( "aid" int, "gender" text, "name" text, "nationality" text, "birth_city" text, "birth_year" int, primary key("aid") ); CREATE TABLE "copyright" ( "id" int, "msid" int, "cid" int, primary key("id") ); 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") ); CREATE TABLE "genre" ( "gid" int, "genre" text, primary key("gid") ); CREATE TABLE "classification" ( "id" int, "msid" int, "gid" int, primary key("id"), foreign key("gid") references `genre`("gid"), foreign key("msid") references `copyright`("msid") ); CREATE TABLE "company" ( "id" int, "name" text, "country_code" text, primary key("id") ); CREATE TABLE "director" ( "did" int, "gender" text, "name" text, "nationality" text, "birth_city" text, "birth_year" int, primary key("did") ); CREATE TABLE "producer" ( "pid" int, "gender" text, "name" text, "nationality" text, "birth_city" text, "birth_year" int, primary key("pid") ); 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") ); CREATE TABLE "keyword" ( "id" int, "keyword" text, primary key("id") ); 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") ); CREATE TABLE "movie" ( "mid" int, "title" text, "release_year" int, "title_aka" text, "budget" text, primary key("mid") ); CREATE TABLE "tags" ( "id" int, "msid" int, "kid" int, primary key("id"), foreign key("msid") references `copyright`("msid"), foreign key("kid") references `keyword`("kid") ); 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") ); CREATE TABLE "writer" ( "wid" int, "gender" text, "name" int, "nationality" int, "num_of_episodes" int, "birth_city" text, "birth_year" int, primary key("wid") ); CREATE TABLE "written_by" ( "id" int, "msid" int, "wid" int, foreign key("msid") references `copyright`("msid"), foreign key("wid") references `writer`("wid") );
imdb
SELECT birth_year FROM actor WHERE name = "Benedict Cumberbatch";
In what year was " Benedict Cumberbatch " born
PRAGMA foreign_keys = ON; CREATE TABLE "actor" ( "aid" int, "gender" text, "name" text, "nationality" text, "birth_city" text, "birth_year" int, primary key("aid") ); CREATE TABLE "copyright" ( "id" int, "msid" int, "cid" int, primary key("id") ); 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") ); CREATE TABLE "genre" ( "gid" int, "genre" text, primary key("gid") ); CREATE TABLE "classification" ( "id" int, "msid" int, "gid" int, primary key("id"), foreign key("gid") references `genre`("gid"), foreign key("msid") references `copyright`("msid") ); CREATE TABLE "company" ( "id" int, "name" text, "country_code" text, primary key("id") ); CREATE TABLE "director" ( "did" int, "gender" text, "name" text, "nationality" text, "birth_city" text, "birth_year" int, primary key("did") ); CREATE TABLE "producer" ( "pid" int, "gender" text, "name" text, "nationality" text, "birth_city" text, "birth_year" int, primary key("pid") ); 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") ); CREATE TABLE "keyword" ( "id" int, "keyword" text, primary key("id") ); 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") ); CREATE TABLE "movie" ( "mid" int, "title" text, "release_year" int, "title_aka" text, "budget" text, primary key("mid") ); CREATE TABLE "tags" ( "id" int, "msid" int, "kid" int, primary key("id"), foreign key("msid") references `copyright`("msid"), foreign key("kid") references `keyword`("kid") ); 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") ); CREATE TABLE "writer" ( "wid" int, "gender" text, "name" int, "nationality" int, "num_of_episodes" int, "birth_city" text, "birth_year" int, primary key("wid") ); CREATE TABLE "written_by" ( "id" int, "msid" int, "wid" int, foreign key("msid") references `copyright`("msid"), foreign key("wid") references `writer`("wid") );
imdb
SELECT nationality FROM actor WHERE name = "Christoph Waltz";
What is the nationality of the actress " Christoph Waltz " ?
PRAGMA foreign_keys = ON; CREATE TABLE "actor" ( "aid" int, "gender" text, "name" text, "nationality" text, "birth_city" text, "birth_year" int, primary key("aid") ); CREATE TABLE "copyright" ( "id" int, "msid" int, "cid" int, primary key("id") ); 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") ); CREATE TABLE "genre" ( "gid" int, "genre" text, primary key("gid") ); CREATE TABLE "classification" ( "id" int, "msid" int, "gid" int, primary key("id"), foreign key("gid") references `genre`("gid"), foreign key("msid") references `copyright`("msid") ); CREATE TABLE "company" ( "id" int, "name" text, "country_code" text, primary key("id") ); CREATE TABLE "director" ( "did" int, "gender" text, "name" text, "nationality" text, "birth_city" text, "birth_year" int, primary key("did") ); CREATE TABLE "producer" ( "pid" int, "gender" text, "name" text, "nationality" text, "birth_city" text, "birth_year" int, primary key("pid") ); 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") ); CREATE TABLE "keyword" ( "id" int, "keyword" text, primary key("id") ); 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") ); CREATE TABLE "movie" ( "mid" int, "title" text, "release_year" int, "title_aka" text, "budget" text, primary key("mid") ); CREATE TABLE "tags" ( "id" int, "msid" int, "kid" int, primary key("id"), foreign key("msid") references `copyright`("msid"), foreign key("kid") references `keyword`("kid") ); 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") ); CREATE TABLE "writer" ( "wid" int, "gender" text, "name" int, "nationality" int, "num_of_episodes" int, "birth_city" text, "birth_year" int, primary key("wid") ); CREATE TABLE "written_by" ( "id" int, "msid" int, "wid" int, foreign key("msid") references `copyright`("msid"), foreign key("wid") references `writer`("wid") );
imdb
SELECT nationality FROM actor WHERE name = "Christoph Waltz";
What is the nationality of the actor " Christoph Waltz " ?
PRAGMA foreign_keys = ON; CREATE TABLE "actor" ( "aid" int, "gender" text, "name" text, "nationality" text, "birth_city" text, "birth_year" int, primary key("aid") ); CREATE TABLE "copyright" ( "id" int, "msid" int, "cid" int, primary key("id") ); 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") ); CREATE TABLE "genre" ( "gid" int, "genre" text, primary key("gid") ); CREATE TABLE "classification" ( "id" int, "msid" int, "gid" int, primary key("id"), foreign key("gid") references `genre`("gid"), foreign key("msid") references `copyright`("msid") ); CREATE TABLE "company" ( "id" int, "name" text, "country_code" text, primary key("id") ); CREATE TABLE "director" ( "did" int, "gender" text, "name" text, "nationality" text, "birth_city" text, "birth_year" int, primary key("did") ); CREATE TABLE "producer" ( "pid" int, "gender" text, "name" text, "nationality" text, "birth_city" text, "birth_year" int, primary key("pid") ); 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") ); CREATE TABLE "keyword" ( "id" int, "keyword" text, primary key("id") ); 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") ); CREATE TABLE "movie" ( "mid" int, "title" text, "release_year" int, "title_aka" text, "budget" text, primary key("mid") ); CREATE TABLE "tags" ( "id" int, "msid" int, "kid" int, primary key("id"), foreign key("msid") references `copyright`("msid"), foreign key("kid") references `keyword`("kid") ); 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") ); CREATE TABLE "writer" ( "wid" int, "gender" text, "name" int, "nationality" int, "num_of_episodes" int, "birth_city" text, "birth_year" int, primary key("wid") ); CREATE TABLE "written_by" ( "id" int, "msid" int, "wid" int, foreign key("msid") references `copyright`("msid"), foreign key("wid") references `writer`("wid") );
imdb
SELECT title FROM movie WHERE release_year = 2015;
Find all movies produced in 2015
PRAGMA foreign_keys = ON; CREATE TABLE "actor" ( "aid" int, "gender" text, "name" text, "nationality" text, "birth_city" text, "birth_year" int, primary key("aid") ); CREATE TABLE "copyright" ( "id" int, "msid" int, "cid" int, primary key("id") ); 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") ); CREATE TABLE "genre" ( "gid" int, "genre" text, primary key("gid") ); CREATE TABLE "classification" ( "id" int, "msid" int, "gid" int, primary key("id"), foreign key("gid") references `genre`("gid"), foreign key("msid") references `copyright`("msid") ); CREATE TABLE "company" ( "id" int, "name" text, "country_code" text, primary key("id") ); CREATE TABLE "director" ( "did" int, "gender" text, "name" text, "nationality" text, "birth_city" text, "birth_year" int, primary key("did") ); CREATE TABLE "producer" ( "pid" int, "gender" text, "name" text, "nationality" text, "birth_city" text, "birth_year" int, primary key("pid") ); 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") ); CREATE TABLE "keyword" ( "id" int, "keyword" text, primary key("id") ); 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") ); CREATE TABLE "movie" ( "mid" int, "title" text, "release_year" int, "title_aka" text, "budget" text, primary key("mid") ); CREATE TABLE "tags" ( "id" int, "msid" int, "kid" int, primary key("id"), foreign key("msid") references `copyright`("msid"), foreign key("kid") references `keyword`("kid") ); 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") ); CREATE TABLE "writer" ( "wid" int, "gender" text, "name" int, "nationality" int, "num_of_episodes" int, "birth_city" text, "birth_year" int, primary key("wid") ); CREATE TABLE "written_by" ( "id" int, "msid" int, "wid" int, foreign key("msid") references `copyright`("msid"), foreign key("wid") references `writer`("wid") );
imdb
SELECT name FROM actor WHERE birth_city = "Tehran";
Find all actors born in " Tehran "
PRAGMA foreign_keys = ON; CREATE TABLE "actor" ( "aid" int, "gender" text, "name" text, "nationality" text, "birth_city" text, "birth_year" int, primary key("aid") ); CREATE TABLE "copyright" ( "id" int, "msid" int, "cid" int, primary key("id") ); 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") ); CREATE TABLE "genre" ( "gid" int, "genre" text, primary key("gid") ); CREATE TABLE "classification" ( "id" int, "msid" int, "gid" int, primary key("id"), foreign key("gid") references `genre`("gid"), foreign key("msid") references `copyright`("msid") ); CREATE TABLE "company" ( "id" int, "name" text, "country_code" text, primary key("id") ); CREATE TABLE "director" ( "did" int, "gender" text, "name" text, "nationality" text, "birth_city" text, "birth_year" int, primary key("did") ); CREATE TABLE "producer" ( "pid" int, "gender" text, "name" text, "nationality" text, "birth_city" text, "birth_year" int, primary key("pid") ); 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") ); CREATE TABLE "keyword" ( "id" int, "keyword" text, primary key("id") ); 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") ); CREATE TABLE "movie" ( "mid" int, "title" text, "release_year" int, "title_aka" text, "budget" text, primary key("mid") ); CREATE TABLE "tags" ( "id" int, "msid" int, "kid" int, primary key("id"), foreign key("msid") references `copyright`("msid"), foreign key("kid") references `keyword`("kid") ); 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") ); CREATE TABLE "writer" ( "wid" int, "gender" text, "name" int, "nationality" int, "num_of_episodes" int, "birth_city" text, "birth_year" int, primary key("wid") ); CREATE TABLE "written_by" ( "id" int, "msid" int, "wid" int, foreign key("msid") references `copyright`("msid"), foreign key("wid") references `writer`("wid") );
imdb
SELECT name FROM actor WHERE birth_city = "Tehran";
Find all actors born in Tehran
PRAGMA foreign_keys = ON; CREATE TABLE "actor" ( "aid" int, "gender" text, "name" text, "nationality" text, "birth_city" text, "birth_year" int, primary key("aid") ); CREATE TABLE "copyright" ( "id" int, "msid" int, "cid" int, primary key("id") ); 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") ); CREATE TABLE "genre" ( "gid" int, "genre" text, primary key("gid") ); CREATE TABLE "classification" ( "id" int, "msid" int, "gid" int, primary key("id"), foreign key("gid") references `genre`("gid"), foreign key("msid") references `copyright`("msid") ); CREATE TABLE "company" ( "id" int, "name" text, "country_code" text, primary key("id") ); CREATE TABLE "director" ( "did" int, "gender" text, "name" text, "nationality" text, "birth_city" text, "birth_year" int, primary key("did") ); CREATE TABLE "producer" ( "pid" int, "gender" text, "name" text, "nationality" text, "birth_city" text, "birth_year" int, primary key("pid") ); 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") ); CREATE TABLE "keyword" ( "id" int, "keyword" text, primary key("id") ); 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") ); CREATE TABLE "movie" ( "mid" int, "title" text, "release_year" int, "title_aka" text, "budget" text, primary key("mid") ); CREATE TABLE "tags" ( "id" int, "msid" int, "kid" int, primary key("id"), foreign key("msid") references `copyright`("msid"), foreign key("kid") references `keyword`("kid") ); 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") ); CREATE TABLE "writer" ( "wid" int, "gender" text, "name" int, "nationality" int, "num_of_episodes" int, "birth_city" text, "birth_year" int, primary key("wid") ); CREATE TABLE "written_by" ( "id" int, "msid" int, "wid" int, foreign key("msid") references `copyright`("msid"), foreign key("wid") references `writer`("wid") );
imdb
SELECT name FROM actor WHERE birth_city = "Tehran";
Which actors were born in Tehran
PRAGMA foreign_keys = ON; CREATE TABLE "actor" ( "aid" int, "gender" text, "name" text, "nationality" text, "birth_city" text, "birth_year" int, primary key("aid") ); CREATE TABLE "copyright" ( "id" int, "msid" int, "cid" int, primary key("id") ); 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") ); CREATE TABLE "genre" ( "gid" int, "genre" text, primary key("gid") ); CREATE TABLE "classification" ( "id" int, "msid" int, "gid" int, primary key("id"), foreign key("gid") references `genre`("gid"), foreign key("msid") references `copyright`("msid") ); CREATE TABLE "company" ( "id" int, "name" text, "country_code" text, primary key("id") ); CREATE TABLE "director" ( "did" int, "gender" text, "name" text, "nationality" text, "birth_city" text, "birth_year" int, primary key("did") ); CREATE TABLE "producer" ( "pid" int, "gender" text, "name" text, "nationality" text, "birth_city" text, "birth_year" int, primary key("pid") ); 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") ); CREATE TABLE "keyword" ( "id" int, "keyword" text, primary key("id") ); 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") ); CREATE TABLE "movie" ( "mid" int, "title" text, "release_year" int, "title_aka" text, "budget" text, primary key("mid") ); CREATE TABLE "tags" ( "id" int, "msid" int, "kid" int, primary key("id"), foreign key("msid") references `copyright`("msid"), foreign key("kid") references `keyword`("kid") ); 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") ); CREATE TABLE "writer" ( "wid" int, "gender" text, "name" int, "nationality" int, "num_of_episodes" int, "birth_city" text, "birth_year" int, primary key("wid") ); CREATE TABLE "written_by" ( "id" int, "msid" int, "wid" int, foreign key("msid") references `copyright`("msid"), foreign key("wid") references `writer`("wid") );
imdb
SELECT name FROM actor WHERE nationality = "Afghanistan";
Find all actors who are from Afghanistan
PRAGMA foreign_keys = ON; CREATE TABLE "actor" ( "aid" int, "gender" text, "name" text, "nationality" text, "birth_city" text, "birth_year" int, primary key("aid") ); CREATE TABLE "copyright" ( "id" int, "msid" int, "cid" int, primary key("id") ); 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") ); CREATE TABLE "genre" ( "gid" int, "genre" text, primary key("gid") ); CREATE TABLE "classification" ( "id" int, "msid" int, "gid" int, primary key("id"), foreign key("gid") references `genre`("gid"), foreign key("msid") references `copyright`("msid") ); CREATE TABLE "company" ( "id" int, "name" text, "country_code" text, primary key("id") ); CREATE TABLE "director" ( "did" int, "gender" text, "name" text, "nationality" text, "birth_city" text, "birth_year" int, primary key("did") ); CREATE TABLE "producer" ( "pid" int, "gender" text, "name" text, "nationality" text, "birth_city" text, "birth_year" int, primary key("pid") ); 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") ); CREATE TABLE "keyword" ( "id" int, "keyword" text, primary key("id") ); 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") ); CREATE TABLE "movie" ( "mid" int, "title" text, "release_year" int, "title_aka" text, "budget" text, primary key("mid") ); CREATE TABLE "tags" ( "id" int, "msid" int, "kid" int, primary key("id"), foreign key("msid") references `copyright`("msid"), foreign key("kid") references `keyword`("kid") ); 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") ); CREATE TABLE "writer" ( "wid" int, "gender" text, "name" int, "nationality" int, "num_of_episodes" int, "birth_city" text, "birth_year" int, primary key("wid") ); CREATE TABLE "written_by" ( "id" int, "msid" int, "wid" int, foreign key("msid") references `copyright`("msid"), foreign key("wid") references `writer`("wid") );
imdb
SELECT name FROM actor WHERE nationality = "Afghanistan";
Find all actors from Afghanistan
PRAGMA foreign_keys = ON; CREATE TABLE "actor" ( "aid" int, "gender" text, "name" text, "nationality" text, "birth_city" text, "birth_year" int, primary key("aid") ); CREATE TABLE "copyright" ( "id" int, "msid" int, "cid" int, primary key("id") ); 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") ); CREATE TABLE "genre" ( "gid" int, "genre" text, primary key("gid") ); CREATE TABLE "classification" ( "id" int, "msid" int, "gid" int, primary key("id"), foreign key("gid") references `genre`("gid"), foreign key("msid") references `copyright`("msid") ); CREATE TABLE "company" ( "id" int, "name" text, "country_code" text, primary key("id") ); CREATE TABLE "director" ( "did" int, "gender" text, "name" text, "nationality" text, "birth_city" text, "birth_year" int, primary key("did") ); CREATE TABLE "producer" ( "pid" int, "gender" text, "name" text, "nationality" text, "birth_city" text, "birth_year" int, primary key("pid") ); 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") ); CREATE TABLE "keyword" ( "id" int, "keyword" text, primary key("id") ); 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") ); CREATE TABLE "movie" ( "mid" int, "title" text, "release_year" int, "title_aka" text, "budget" text, primary key("mid") ); CREATE TABLE "tags" ( "id" int, "msid" int, "kid" int, primary key("id"), foreign key("msid") references `copyright`("msid"), foreign key("kid") references `keyword`("kid") ); 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") ); CREATE TABLE "writer" ( "wid" int, "gender" text, "name" int, "nationality" int, "num_of_episodes" int, "birth_city" text, "birth_year" int, primary key("wid") ); CREATE TABLE "written_by" ( "id" int, "msid" int, "wid" int, foreign key("msid") references `copyright`("msid"), foreign key("wid") references `writer`("wid") );
imdb
SELECT name FROM actor WHERE nationality = "Afghanistan";
Give me the name of all the actors from Afghanistan
PRAGMA foreign_keys = ON; CREATE TABLE "actor" ( "aid" int, "gender" text, "name" text, "nationality" text, "birth_city" text, "birth_year" int, primary key("aid") ); CREATE TABLE "copyright" ( "id" int, "msid" int, "cid" int, primary key("id") ); 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") ); CREATE TABLE "genre" ( "gid" int, "genre" text, primary key("gid") ); CREATE TABLE "classification" ( "id" int, "msid" int, "gid" int, primary key("id"), foreign key("gid") references `genre`("gid"), foreign key("msid") references `copyright`("msid") ); CREATE TABLE "company" ( "id" int, "name" text, "country_code" text, primary key("id") ); CREATE TABLE "director" ( "did" int, "gender" text, "name" text, "nationality" text, "birth_city" text, "birth_year" int, primary key("did") ); CREATE TABLE "producer" ( "pid" int, "gender" text, "name" text, "nationality" text, "birth_city" text, "birth_year" int, primary key("pid") ); 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") ); CREATE TABLE "keyword" ( "id" int, "keyword" text, primary key("id") ); 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") ); CREATE TABLE "movie" ( "mid" int, "title" text, "release_year" int, "title_aka" text, "budget" text, primary key("mid") ); CREATE TABLE "tags" ( "id" int, "msid" int, "kid" int, primary key("id"), foreign key("msid") references `copyright`("msid"), foreign key("kid") references `keyword`("kid") ); 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") ); CREATE TABLE "writer" ( "wid" int, "gender" text, "name" int, "nationality" int, "num_of_episodes" int, "birth_city" text, "birth_year" int, primary key("wid") ); CREATE TABLE "written_by" ( "id" int, "msid" int, "wid" int, foreign key("msid") references `copyright`("msid"), foreign key("wid") references `writer`("wid") );
imdb
SELECT name FROM actor WHERE birth_year = 1984;
Find all actors who were born in 1984
PRAGMA foreign_keys = ON; CREATE TABLE "actor" ( "aid" int, "gender" text, "name" text, "nationality" text, "birth_city" text, "birth_year" int, primary key("aid") ); CREATE TABLE "copyright" ( "id" int, "msid" int, "cid" int, primary key("id") ); 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") ); CREATE TABLE "genre" ( "gid" int, "genre" text, primary key("gid") ); CREATE TABLE "classification" ( "id" int, "msid" int, "gid" int, primary key("id"), foreign key("gid") references `genre`("gid"), foreign key("msid") references `copyright`("msid") ); CREATE TABLE "company" ( "id" int, "name" text, "country_code" text, primary key("id") ); CREATE TABLE "director" ( "did" int, "gender" text, "name" text, "nationality" text, "birth_city" text, "birth_year" int, primary key("did") ); CREATE TABLE "producer" ( "pid" int, "gender" text, "name" text, "nationality" text, "birth_city" text, "birth_year" int, primary key("pid") ); 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") ); CREATE TABLE "keyword" ( "id" int, "keyword" text, primary key("id") ); 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") ); CREATE TABLE "movie" ( "mid" int, "title" text, "release_year" int, "title_aka" text, "budget" text, primary key("mid") ); CREATE TABLE "tags" ( "id" int, "msid" int, "kid" int, primary key("id"), foreign key("msid") references `copyright`("msid"), foreign key("kid") references `keyword`("kid") ); 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") ); CREATE TABLE "writer" ( "wid" int, "gender" text, "name" int, "nationality" int, "num_of_episodes" int, "birth_city" text, "birth_year" int, primary key("wid") ); CREATE TABLE "written_by" ( "id" int, "msid" int, "wid" int, foreign key("msid") references `copyright`("msid"), foreign key("wid") references `writer`("wid") );
imdb
SELECT birth_year FROM actor WHERE name = "actor_name0";
When was " Kevin Spacey " born ?
PRAGMA foreign_keys = ON; CREATE TABLE "actor" ( "aid" int, "gender" text, "name" text, "nationality" text, "birth_city" text, "birth_year" int, primary key("aid") ); CREATE TABLE "copyright" ( "id" int, "msid" int, "cid" int, primary key("id") ); 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") ); CREATE TABLE "genre" ( "gid" int, "genre" text, primary key("gid") ); CREATE TABLE "classification" ( "id" int, "msid" int, "gid" int, primary key("id"), foreign key("gid") references `genre`("gid"), foreign key("msid") references `copyright`("msid") ); CREATE TABLE "company" ( "id" int, "name" text, "country_code" text, primary key("id") ); CREATE TABLE "director" ( "did" int, "gender" text, "name" text, "nationality" text, "birth_city" text, "birth_year" int, primary key("did") ); CREATE TABLE "producer" ( "pid" int, "gender" text, "name" text, "nationality" text, "birth_city" text, "birth_year" int, primary key("pid") ); 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") ); CREATE TABLE "keyword" ( "id" int, "keyword" text, primary key("id") ); 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") ); CREATE TABLE "movie" ( "mid" int, "title" text, "release_year" int, "title_aka" text, "budget" text, primary key("mid") ); CREATE TABLE "tags" ( "id" int, "msid" int, "kid" int, primary key("id"), foreign key("msid") references `copyright`("msid"), foreign key("kid") references `keyword`("kid") ); 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") ); CREATE TABLE "writer" ( "wid" int, "gender" text, "name" int, "nationality" int, "num_of_episodes" int, "birth_city" text, "birth_year" int, primary key("wid") ); CREATE TABLE "written_by" ( "id" int, "msid" int, "wid" int, foreign key("msid") references `copyright`("msid"), foreign key("wid") references `writer`("wid") );
imdb
SELECT birth_year FROM actor WHERE name = "actor_name0";
In what year was " Kevin Spacey " born ?
PRAGMA foreign_keys = ON; CREATE TABLE "actor" ( "aid" int, "gender" text, "name" text, "nationality" text, "birth_city" text, "birth_year" int, primary key("aid") ); CREATE TABLE "copyright" ( "id" int, "msid" int, "cid" int, primary key("id") ); 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") ); CREATE TABLE "genre" ( "gid" int, "genre" text, primary key("gid") ); CREATE TABLE "classification" ( "id" int, "msid" int, "gid" int, primary key("id"), foreign key("gid") references `genre`("gid"), foreign key("msid") references `copyright`("msid") ); CREATE TABLE "company" ( "id" int, "name" text, "country_code" text, primary key("id") ); CREATE TABLE "director" ( "did" int, "gender" text, "name" text, "nationality" text, "birth_city" text, "birth_year" int, primary key("did") ); CREATE TABLE "producer" ( "pid" int, "gender" text, "name" text, "nationality" text, "birth_city" text, "birth_year" int, primary key("pid") ); 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") ); CREATE TABLE "keyword" ( "id" int, "keyword" text, primary key("id") ); 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") ); CREATE TABLE "movie" ( "mid" int, "title" text, "release_year" int, "title_aka" text, "budget" text, primary key("mid") ); CREATE TABLE "tags" ( "id" int, "msid" int, "kid" int, primary key("id"), foreign key("msid") references `copyright`("msid"), foreign key("kid") references `keyword`("kid") ); 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") ); CREATE TABLE "writer" ( "wid" int, "gender" text, "name" int, "nationality" int, "num_of_episodes" int, "birth_city" text, "birth_year" int, primary key("wid") ); CREATE TABLE "written_by" ( "id" int, "msid" int, "wid" int, foreign key("msid") references `copyright`("msid"), foreign key("wid") references `writer`("wid") );
imdb
SELECT birth_city FROM director WHERE name = "director_name0";
Where is the birth place of " Kevin Spacey "
PRAGMA foreign_keys = ON; CREATE TABLE "actor" ( "aid" int, "gender" text, "name" text, "nationality" text, "birth_city" text, "birth_year" int, primary key("aid") ); CREATE TABLE "copyright" ( "id" int, "msid" int, "cid" int, primary key("id") ); 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") ); CREATE TABLE "genre" ( "gid" int, "genre" text, primary key("gid") ); CREATE TABLE "classification" ( "id" int, "msid" int, "gid" int, primary key("id"), foreign key("gid") references `genre`("gid"), foreign key("msid") references `copyright`("msid") ); CREATE TABLE "company" ( "id" int, "name" text, "country_code" text, primary key("id") ); CREATE TABLE "director" ( "did" int, "gender" text, "name" text, "nationality" text, "birth_city" text, "birth_year" int, primary key("did") ); CREATE TABLE "producer" ( "pid" int, "gender" text, "name" text, "nationality" text, "birth_city" text, "birth_year" int, primary key("pid") ); 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") ); CREATE TABLE "keyword" ( "id" int, "keyword" text, primary key("id") ); 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") ); CREATE TABLE "movie" ( "mid" int, "title" text, "release_year" int, "title_aka" text, "budget" text, primary key("mid") ); CREATE TABLE "tags" ( "id" int, "msid" int, "kid" int, primary key("id"), foreign key("msid") references `copyright`("msid"), foreign key("kid") references `keyword`("kid") ); 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") ); CREATE TABLE "writer" ( "wid" int, "gender" text, "name" int, "nationality" int, "num_of_episodes" int, "birth_city" text, "birth_year" int, primary key("wid") ); CREATE TABLE "written_by" ( "id" int, "msid" int, "wid" int, foreign key("msid") references `copyright`("msid"), foreign key("wid") references `writer`("wid") );
imdb
SELECT birth_city FROM director WHERE name = "director_name0";
In what city was " Kevin Spacey " born ?
PRAGMA foreign_keys = ON; CREATE TABLE "actor" ( "aid" int, "gender" text, "name" text, "nationality" text, "birth_city" text, "birth_year" int, primary key("aid") ); CREATE TABLE "copyright" ( "id" int, "msid" int, "cid" int, primary key("id") ); 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") ); CREATE TABLE "genre" ( "gid" int, "genre" text, primary key("gid") ); CREATE TABLE "classification" ( "id" int, "msid" int, "gid" int, primary key("id"), foreign key("gid") references `genre`("gid"), foreign key("msid") references `copyright`("msid") ); CREATE TABLE "company" ( "id" int, "name" text, "country_code" text, primary key("id") ); CREATE TABLE "director" ( "did" int, "gender" text, "name" text, "nationality" text, "birth_city" text, "birth_year" int, primary key("did") ); CREATE TABLE "producer" ( "pid" int, "gender" text, "name" text, "nationality" text, "birth_city" text, "birth_year" int, primary key("pid") ); 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") ); CREATE TABLE "keyword" ( "id" int, "keyword" text, primary key("id") ); 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") ); CREATE TABLE "movie" ( "mid" int, "title" text, "release_year" int, "title_aka" text, "budget" text, primary key("mid") ); CREATE TABLE "tags" ( "id" int, "msid" int, "kid" int, primary key("id"), foreign key("msid") references `copyright`("msid"), foreign key("kid") references `keyword`("kid") ); 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") ); CREATE TABLE "writer" ( "wid" int, "gender" text, "name" int, "nationality" int, "num_of_episodes" int, "birth_city" text, "birth_year" int, primary key("wid") ); CREATE TABLE "written_by" ( "id" int, "msid" int, "wid" int, foreign key("msid") references `copyright`("msid"), foreign key("wid") references `writer`("wid") );
imdb
SELECT nationality FROM director WHERE name = "director_name0";
What is the nationality of " Kevin Spacey " ?
PRAGMA foreign_keys = ON; CREATE TABLE "actor" ( "aid" int, "gender" text, "name" text, "nationality" text, "birth_city" text, "birth_year" int, primary key("aid") ); CREATE TABLE "copyright" ( "id" int, "msid" int, "cid" int, primary key("id") ); 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") ); CREATE TABLE "genre" ( "gid" int, "genre" text, primary key("gid") ); CREATE TABLE "classification" ( "id" int, "msid" int, "gid" int, primary key("id"), foreign key("gid") references `genre`("gid"), foreign key("msid") references `copyright`("msid") ); CREATE TABLE "company" ( "id" int, "name" text, "country_code" text, primary key("id") ); CREATE TABLE "director" ( "did" int, "gender" text, "name" text, "nationality" text, "birth_city" text, "birth_year" int, primary key("did") ); CREATE TABLE "producer" ( "pid" int, "gender" text, "name" text, "nationality" text, "birth_city" text, "birth_year" int, primary key("pid") ); 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") ); CREATE TABLE "keyword" ( "id" int, "keyword" text, primary key("id") ); 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") ); CREATE TABLE "movie" ( "mid" int, "title" text, "release_year" int, "title_aka" text, "budget" text, primary key("mid") ); CREATE TABLE "tags" ( "id" int, "msid" int, "kid" int, primary key("id"), foreign key("msid") references `copyright`("msid"), foreign key("kid") references `keyword`("kid") ); 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") ); CREATE TABLE "writer" ( "wid" int, "gender" text, "name" int, "nationality" int, "num_of_episodes" int, "birth_city" text, "birth_year" int, primary key("wid") ); CREATE TABLE "written_by" ( "id" int, "msid" int, "wid" int, foreign key("msid") references `copyright`("msid"), foreign key("wid") references `writer`("wid") );
imdb
SELECT budget FROM movie WHERE title = "Finding Nemo";
How much was the budget of " Finding Nemo "
PRAGMA foreign_keys = ON; CREATE TABLE "actor" ( "aid" int, "gender" text, "name" text, "nationality" text, "birth_city" text, "birth_year" int, primary key("aid") ); CREATE TABLE "copyright" ( "id" int, "msid" int, "cid" int, primary key("id") ); 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") ); CREATE TABLE "genre" ( "gid" int, "genre" text, primary key("gid") ); CREATE TABLE "classification" ( "id" int, "msid" int, "gid" int, primary key("id"), foreign key("gid") references `genre`("gid"), foreign key("msid") references `copyright`("msid") ); CREATE TABLE "company" ( "id" int, "name" text, "country_code" text, primary key("id") ); CREATE TABLE "director" ( "did" int, "gender" text, "name" text, "nationality" text, "birth_city" text, "birth_year" int, primary key("did") ); CREATE TABLE "producer" ( "pid" int, "gender" text, "name" text, "nationality" text, "birth_city" text, "birth_year" int, primary key("pid") ); 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") ); CREATE TABLE "keyword" ( "id" int, "keyword" text, primary key("id") ); 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") ); CREATE TABLE "movie" ( "mid" int, "title" text, "release_year" int, "title_aka" text, "budget" text, primary key("mid") ); CREATE TABLE "tags" ( "id" int, "msid" int, "kid" int, primary key("id"), foreign key("msid") references `copyright`("msid"), foreign key("kid") references `keyword`("kid") ); 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") ); CREATE TABLE "writer" ( "wid" int, "gender" text, "name" int, "nationality" int, "num_of_episodes" int, "birth_city" text, "birth_year" int, primary key("wid") ); CREATE TABLE "written_by" ( "id" int, "msid" int, "wid" int, foreign key("msid") references `copyright`("msid"), foreign key("wid") references `writer`("wid") );
imdb
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;
Find all movies directed by " Steven Spielberg " after 2006
PRAGMA foreign_keys = ON; CREATE TABLE "actor" ( "aid" int, "gender" text, "name" text, "nationality" text, "birth_city" text, "birth_year" int, primary key("aid") ); CREATE TABLE "copyright" ( "id" int, "msid" int, "cid" int, primary key("id") ); 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") ); CREATE TABLE "genre" ( "gid" int, "genre" text, primary key("gid") ); CREATE TABLE "classification" ( "id" int, "msid" int, "gid" int, primary key("id"), foreign key("gid") references `genre`("gid"), foreign key("msid") references `copyright`("msid") ); CREATE TABLE "company" ( "id" int, "name" text, "country_code" text, primary key("id") ); CREATE TABLE "director" ( "did" int, "gender" text, "name" text, "nationality" text, "birth_city" text, "birth_year" int, primary key("did") ); CREATE TABLE "producer" ( "pid" int, "gender" text, "name" text, "nationality" text, "birth_city" text, "birth_year" int, primary key("pid") ); 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") ); CREATE TABLE "keyword" ( "id" int, "keyword" text, primary key("id") ); 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") ); CREATE TABLE "movie" ( "mid" int, "title" text, "release_year" int, "title_aka" text, "budget" text, primary key("mid") ); CREATE TABLE "tags" ( "id" int, "msid" int, "kid" int, primary key("id"), foreign key("msid") references `copyright`("msid"), foreign key("kid") references `keyword`("kid") ); 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") ); CREATE TABLE "writer" ( "wid" int, "gender" text, "name" int, "nationality" int, "num_of_episodes" int, "birth_city" text, "birth_year" int, primary key("wid") ); CREATE TABLE "written_by" ( "id" int, "msid" int, "wid" int, foreign key("msid") references `copyright`("msid"), foreign key("wid") references `writer`("wid") );
imdb
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";
Who is the director of the movie " James Bond " ?
PRAGMA foreign_keys = ON; CREATE TABLE "actor" ( "aid" int, "gender" text, "name" text, "nationality" text, "birth_city" text, "birth_year" int, primary key("aid") ); CREATE TABLE "copyright" ( "id" int, "msid" int, "cid" int, primary key("id") ); 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") ); CREATE TABLE "genre" ( "gid" int, "genre" text, primary key("gid") ); CREATE TABLE "classification" ( "id" int, "msid" int, "gid" int, primary key("id"), foreign key("gid") references `genre`("gid"), foreign key("msid") references `copyright`("msid") ); CREATE TABLE "company" ( "id" int, "name" text, "country_code" text, primary key("id") ); CREATE TABLE "director" ( "did" int, "gender" text, "name" text, "nationality" text, "birth_city" text, "birth_year" int, primary key("did") ); CREATE TABLE "producer" ( "pid" int, "gender" text, "name" text, "nationality" text, "birth_city" text, "birth_year" int, primary key("pid") ); 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") ); CREATE TABLE "keyword" ( "id" int, "keyword" text, primary key("id") ); 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") ); CREATE TABLE "movie" ( "mid" int, "title" text, "release_year" int, "title_aka" text, "budget" text, primary key("mid") ); CREATE TABLE "tags" ( "id" int, "msid" int, "kid" int, primary key("id"), foreign key("msid") references `copyright`("msid"), foreign key("kid") references `keyword`("kid") ); 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") ); CREATE TABLE "writer" ( "wid" int, "gender" text, "name" int, "nationality" int, "num_of_episodes" int, "birth_city" text, "birth_year" int, primary key("wid") ); CREATE TABLE "written_by" ( "id" int, "msid" int, "wid" int, foreign key("msid") references `copyright`("msid"), foreign key("wid") references `writer`("wid") );
imdb
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";
Who directed the movie " James Bond " ?
PRAGMA foreign_keys = ON; CREATE TABLE "actor" ( "aid" int, "gender" text, "name" text, "nationality" text, "birth_city" text, "birth_year" int, primary key("aid") ); CREATE TABLE "copyright" ( "id" int, "msid" int, "cid" int, primary key("id") ); 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") ); CREATE TABLE "genre" ( "gid" int, "genre" text, primary key("gid") ); CREATE TABLE "classification" ( "id" int, "msid" int, "gid" int, primary key("id"), foreign key("gid") references `genre`("gid"), foreign key("msid") references `copyright`("msid") ); CREATE TABLE "company" ( "id" int, "name" text, "country_code" text, primary key("id") ); CREATE TABLE "director" ( "did" int, "gender" text, "name" text, "nationality" text, "birth_city" text, "birth_year" int, primary key("did") ); CREATE TABLE "producer" ( "pid" int, "gender" text, "name" text, "nationality" text, "birth_city" text, "birth_year" int, primary key("pid") ); 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") ); CREATE TABLE "keyword" ( "id" int, "keyword" text, primary key("id") ); 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") ); CREATE TABLE "movie" ( "mid" int, "title" text, "release_year" int, "title_aka" text, "budget" text, primary key("mid") ); CREATE TABLE "tags" ( "id" int, "msid" int, "kid" int, primary key("id"), foreign key("msid") references `copyright`("msid"), foreign key("kid") references `keyword`("kid") ); 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") ); CREATE TABLE "writer" ( "wid" int, "gender" text, "name" int, "nationality" int, "num_of_episodes" int, "birth_city" text, "birth_year" int, primary key("wid") ); CREATE TABLE "written_by" ( "id" int, "msid" int, "wid" int, foreign key("msid") references `copyright`("msid"), foreign key("wid") references `writer`("wid") );
imdb
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";
List " James Bond " directors
PRAGMA foreign_keys = ON; CREATE TABLE "actor" ( "aid" int, "gender" text, "name" text, "nationality" text, "birth_city" text, "birth_year" int, primary key("aid") ); CREATE TABLE "copyright" ( "id" int, "msid" int, "cid" int, primary key("id") ); 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") ); CREATE TABLE "genre" ( "gid" int, "genre" text, primary key("gid") ); CREATE TABLE "classification" ( "id" int, "msid" int, "gid" int, primary key("id"), foreign key("gid") references `genre`("gid"), foreign key("msid") references `copyright`("msid") ); CREATE TABLE "company" ( "id" int, "name" text, "country_code" text, primary key("id") ); CREATE TABLE "director" ( "did" int, "gender" text, "name" text, "nationality" text, "birth_city" text, "birth_year" int, primary key("did") ); CREATE TABLE "producer" ( "pid" int, "gender" text, "name" text, "nationality" text, "birth_city" text, "birth_year" int, primary key("pid") ); 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") ); CREATE TABLE "keyword" ( "id" int, "keyword" text, primary key("id") ); 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") ); CREATE TABLE "movie" ( "mid" int, "title" text, "release_year" int, "title_aka" text, "budget" text, primary key("mid") ); CREATE TABLE "tags" ( "id" int, "msid" int, "kid" int, primary key("id"), foreign key("msid") references `copyright`("msid"), foreign key("kid") references `keyword`("kid") ); 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") ); CREATE TABLE "writer" ( "wid" int, "gender" text, "name" int, "nationality" int, "num_of_episodes" int, "birth_city" text, "birth_year" int, primary key("wid") ); CREATE TABLE "written_by" ( "id" int, "msid" int, "wid" int, foreign key("msid") references `copyright`("msid"), foreign key("wid") references `writer`("wid") );
imdb
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";
Find the actor who played " Alan Turing " in the movie " The Imitation Game "
PRAGMA foreign_keys = ON; CREATE TABLE "actor" ( "aid" int, "gender" text, "name" text, "nationality" text, "birth_city" text, "birth_year" int, primary key("aid") ); CREATE TABLE "copyright" ( "id" int, "msid" int, "cid" int, primary key("id") ); 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") ); CREATE TABLE "genre" ( "gid" int, "genre" text, primary key("gid") ); CREATE TABLE "classification" ( "id" int, "msid" int, "gid" int, primary key("id"), foreign key("gid") references `genre`("gid"), foreign key("msid") references `copyright`("msid") ); CREATE TABLE "company" ( "id" int, "name" text, "country_code" text, primary key("id") ); CREATE TABLE "director" ( "did" int, "gender" text, "name" text, "nationality" text, "birth_city" text, "birth_year" int, primary key("did") ); CREATE TABLE "producer" ( "pid" int, "gender" text, "name" text, "nationality" text, "birth_city" text, "birth_year" int, primary key("pid") ); 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") ); CREATE TABLE "keyword" ( "id" int, "keyword" text, primary key("id") ); 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") ); CREATE TABLE "movie" ( "mid" int, "title" text, "release_year" int, "title_aka" text, "budget" text, primary key("mid") ); CREATE TABLE "tags" ( "id" int, "msid" int, "kid" int, primary key("id"), foreign key("msid") references `copyright`("msid"), foreign key("kid") references `keyword`("kid") ); 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") ); CREATE TABLE "writer" ( "wid" int, "gender" text, "name" int, "nationality" int, "num_of_episodes" int, "birth_city" text, "birth_year" int, primary key("wid") ); CREATE TABLE "written_by" ( "id" int, "msid" int, "wid" int, foreign key("msid") references `copyright`("msid"), foreign key("wid") references `writer`("wid") );
imdb
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";
Who acted " Alan Turing " in the movie " The Imitation Game " ?
PRAGMA foreign_keys = ON; CREATE TABLE "actor" ( "aid" int, "gender" text, "name" text, "nationality" text, "birth_city" text, "birth_year" int, primary key("aid") ); CREATE TABLE "copyright" ( "id" int, "msid" int, "cid" int, primary key("id") ); 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") ); CREATE TABLE "genre" ( "gid" int, "genre" text, primary key("gid") ); CREATE TABLE "classification" ( "id" int, "msid" int, "gid" int, primary key("id"), foreign key("gid") references `genre`("gid"), foreign key("msid") references `copyright`("msid") ); CREATE TABLE "company" ( "id" int, "name" text, "country_code" text, primary key("id") ); CREATE TABLE "director" ( "did" int, "gender" text, "name" text, "nationality" text, "birth_city" text, "birth_year" int, primary key("did") ); CREATE TABLE "producer" ( "pid" int, "gender" text, "name" text, "nationality" text, "birth_city" text, "birth_year" int, primary key("pid") ); 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") ); CREATE TABLE "keyword" ( "id" int, "keyword" text, primary key("id") ); 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") ); CREATE TABLE "movie" ( "mid" int, "title" text, "release_year" int, "title_aka" text, "budget" text, primary key("mid") ); CREATE TABLE "tags" ( "id" int, "msid" int, "kid" int, primary key("id"), foreign key("msid") references `copyright`("msid"), foreign key("kid") references `keyword`("kid") ); 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") ); CREATE TABLE "writer" ( "wid" int, "gender" text, "name" int, "nationality" int, "num_of_episodes" int, "birth_city" text, "birth_year" int, primary key("wid") ); CREATE TABLE "written_by" ( "id" int, "msid" int, "wid" int, foreign key("msid") references `copyright`("msid"), foreign key("wid") references `writer`("wid") );
imdb
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";
Who was the actor that played " Alan Turing " in the movie " The Imitation Game " ?
PRAGMA foreign_keys = ON; CREATE TABLE "actor" ( "aid" int, "gender" text, "name" text, "nationality" text, "birth_city" text, "birth_year" int, primary key("aid") ); CREATE TABLE "copyright" ( "id" int, "msid" int, "cid" int, primary key("id") ); 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") ); CREATE TABLE "genre" ( "gid" int, "genre" text, primary key("gid") ); CREATE TABLE "classification" ( "id" int, "msid" int, "gid" int, primary key("id"), foreign key("gid") references `genre`("gid"), foreign key("msid") references `copyright`("msid") ); CREATE TABLE "company" ( "id" int, "name" text, "country_code" text, primary key("id") ); CREATE TABLE "director" ( "did" int, "gender" text, "name" text, "nationality" text, "birth_city" text, "birth_year" int, primary key("did") ); CREATE TABLE "producer" ( "pid" int, "gender" text, "name" text, "nationality" text, "birth_city" text, "birth_year" int, primary key("pid") ); 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") ); CREATE TABLE "keyword" ( "id" int, "keyword" text, primary key("id") ); 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") ); CREATE TABLE "movie" ( "mid" int, "title" text, "release_year" int, "title_aka" text, "budget" text, primary key("mid") ); CREATE TABLE "tags" ( "id" int, "msid" int, "kid" int, primary key("id"), foreign key("msid") references `copyright`("msid"), foreign key("kid") references `keyword`("kid") ); 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") ); CREATE TABLE "writer" ( "wid" int, "gender" text, "name" int, "nationality" int, "num_of_episodes" int, "birth_city" text, "birth_year" int, primary key("wid") ); CREATE TABLE "written_by" ( "id" int, "msid" int, "wid" int, foreign key("msid") references `copyright`("msid"), foreign key("wid") references `writer`("wid") );
imdb
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";
Who acts as " Alan Turing " in the movie " The Imitation Game " ?
PRAGMA foreign_keys = ON; CREATE TABLE "actor" ( "aid" int, "gender" text, "name" text, "nationality" text, "birth_city" text, "birth_year" int, primary key("aid") ); CREATE TABLE "copyright" ( "id" int, "msid" int, "cid" int, primary key("id") ); 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") ); CREATE TABLE "genre" ( "gid" int, "genre" text, primary key("gid") ); CREATE TABLE "classification" ( "id" int, "msid" int, "gid" int, primary key("id"), foreign key("gid") references `genre`("gid"), foreign key("msid") references `copyright`("msid") ); CREATE TABLE "company" ( "id" int, "name" text, "country_code" text, primary key("id") ); CREATE TABLE "director" ( "did" int, "gender" text, "name" text, "nationality" text, "birth_city" text, "birth_year" int, primary key("did") ); CREATE TABLE "producer" ( "pid" int, "gender" text, "name" text, "nationality" text, "birth_city" text, "birth_year" int, primary key("pid") ); 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") ); CREATE TABLE "keyword" ( "id" int, "keyword" text, primary key("id") ); 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") ); CREATE TABLE "movie" ( "mid" int, "title" text, "release_year" int, "title_aka" text, "budget" text, primary key("mid") ); CREATE TABLE "tags" ( "id" int, "msid" int, "kid" int, primary key("id"), foreign key("msid") references `copyright`("msid"), foreign key("kid") references `keyword`("kid") ); 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") ); CREATE TABLE "writer" ( "wid" int, "gender" text, "name" int, "nationality" int, "num_of_episodes" int, "birth_city" text, "birth_year" int, primary key("wid") ); CREATE TABLE "written_by" ( "id" int, "msid" int, "wid" int, foreign key("msid") references `copyright`("msid"), foreign key("wid") references `writer`("wid") );
imdb
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";
Who is the actor playing " Alan Turing " in " The Imitation Game " ?
PRAGMA foreign_keys = ON; CREATE TABLE "actor" ( "aid" int, "gender" text, "name" text, "nationality" text, "birth_city" text, "birth_year" int, primary key("aid") ); CREATE TABLE "copyright" ( "id" int, "msid" int, "cid" int, primary key("id") ); 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") ); CREATE TABLE "genre" ( "gid" int, "genre" text, primary key("gid") ); CREATE TABLE "classification" ( "id" int, "msid" int, "gid" int, primary key("id"), foreign key("gid") references `genre`("gid"), foreign key("msid") references `copyright`("msid") ); CREATE TABLE "company" ( "id" int, "name" text, "country_code" text, primary key("id") ); CREATE TABLE "director" ( "did" int, "gender" text, "name" text, "nationality" text, "birth_city" text, "birth_year" int, primary key("did") ); CREATE TABLE "producer" ( "pid" int, "gender" text, "name" text, "nationality" text, "birth_city" text, "birth_year" int, primary key("pid") ); 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") ); CREATE TABLE "keyword" ( "id" int, "keyword" text, primary key("id") ); 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") ); CREATE TABLE "movie" ( "mid" int, "title" text, "release_year" int, "title_aka" text, "budget" text, primary key("mid") ); CREATE TABLE "tags" ( "id" int, "msid" int, "kid" int, primary key("id"), foreign key("msid") references `copyright`("msid"), foreign key("kid") references `keyword`("kid") ); 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") ); CREATE TABLE "writer" ( "wid" int, "gender" text, "name" int, "nationality" int, "num_of_episodes" int, "birth_city" text, "birth_year" int, primary key("wid") ); CREATE TABLE "written_by" ( "id" int, "msid" int, "wid" int, foreign key("msid") references `copyright`("msid"), foreign key("wid") references `writer`("wid") );
imdb
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";
What is the genre of the movie " Jurassic Park " ?
PRAGMA foreign_keys = ON; CREATE TABLE "actor" ( "aid" int, "gender" text, "name" text, "nationality" text, "birth_city" text, "birth_year" int, primary key("aid") ); CREATE TABLE "copyright" ( "id" int, "msid" int, "cid" int, primary key("id") ); 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") ); CREATE TABLE "genre" ( "gid" int, "genre" text, primary key("gid") ); CREATE TABLE "classification" ( "id" int, "msid" int, "gid" int, primary key("id"), foreign key("gid") references `genre`("gid"), foreign key("msid") references `copyright`("msid") ); CREATE TABLE "company" ( "id" int, "name" text, "country_code" text, primary key("id") ); CREATE TABLE "director" ( "did" int, "gender" text, "name" text, "nationality" text, "birth_city" text, "birth_year" int, primary key("did") ); CREATE TABLE "producer" ( "pid" int, "gender" text, "name" text, "nationality" text, "birth_city" text, "birth_year" int, primary key("pid") ); 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") ); CREATE TABLE "keyword" ( "id" int, "keyword" text, primary key("id") ); 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") ); CREATE TABLE "movie" ( "mid" int, "title" text, "release_year" int, "title_aka" text, "budget" text, primary key("mid") ); CREATE TABLE "tags" ( "id" int, "msid" int, "kid" int, primary key("id"), foreign key("msid") references `copyright`("msid"), foreign key("kid") references `keyword`("kid") ); 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") ); CREATE TABLE "writer" ( "wid" int, "gender" text, "name" int, "nationality" int, "num_of_episodes" int, "birth_city" text, "birth_year" int, primary key("wid") ); CREATE TABLE "written_by" ( "id" int, "msid" int, "wid" int, foreign key("msid") references `copyright`("msid"), foreign key("wid") references `writer`("wid") );
imdb
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";
Who was the director of the movie Joy from 2015 ?
PRAGMA foreign_keys = ON; CREATE TABLE "actor" ( "aid" int, "gender" text, "name" text, "nationality" text, "birth_city" text, "birth_year" int, primary key("aid") ); CREATE TABLE "copyright" ( "id" int, "msid" int, "cid" int, primary key("id") ); 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") ); CREATE TABLE "genre" ( "gid" int, "genre" text, primary key("gid") ); CREATE TABLE "classification" ( "id" int, "msid" int, "gid" int, primary key("id"), foreign key("gid") references `genre`("gid"), foreign key("msid") references `copyright`("msid") ); CREATE TABLE "company" ( "id" int, "name" text, "country_code" text, primary key("id") ); CREATE TABLE "director" ( "did" int, "gender" text, "name" text, "nationality" text, "birth_city" text, "birth_year" int, primary key("did") ); CREATE TABLE "producer" ( "pid" int, "gender" text, "name" text, "nationality" text, "birth_city" text, "birth_year" int, primary key("pid") ); 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") ); CREATE TABLE "keyword" ( "id" int, "keyword" text, primary key("id") ); 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") ); CREATE TABLE "movie" ( "mid" int, "title" text, "release_year" int, "title_aka" text, "budget" text, primary key("mid") ); CREATE TABLE "tags" ( "id" int, "msid" int, "kid" int, primary key("id"), foreign key("msid") references `copyright`("msid"), foreign key("kid") references `keyword`("kid") ); 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") ); CREATE TABLE "writer" ( "wid" int, "gender" text, "name" int, "nationality" int, "num_of_episodes" int, "birth_city" text, "birth_year" int, primary key("wid") ); CREATE TABLE "written_by" ( "id" int, "msid" int, "wid" int, foreign key("msid") references `copyright`("msid"), foreign key("wid") references `writer`("wid") );
imdb
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";
Find all movies written by " Matt Damon "
PRAGMA foreign_keys = ON; CREATE TABLE "actor" ( "aid" int, "gender" text, "name" text, "nationality" text, "birth_city" text, "birth_year" int, primary key("aid") ); CREATE TABLE "copyright" ( "id" int, "msid" int, "cid" int, primary key("id") ); 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") ); CREATE TABLE "genre" ( "gid" int, "genre" text, primary key("gid") ); CREATE TABLE "classification" ( "id" int, "msid" int, "gid" int, primary key("id"), foreign key("gid") references `genre`("gid"), foreign key("msid") references `copyright`("msid") ); CREATE TABLE "company" ( "id" int, "name" text, "country_code" text, primary key("id") ); CREATE TABLE "director" ( "did" int, "gender" text, "name" text, "nationality" text, "birth_city" text, "birth_year" int, primary key("did") ); CREATE TABLE "producer" ( "pid" int, "gender" text, "name" text, "nationality" text, "birth_city" text, "birth_year" int, primary key("pid") ); 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") ); CREATE TABLE "keyword" ( "id" int, "keyword" text, primary key("id") ); 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") ); CREATE TABLE "movie" ( "mid" int, "title" text, "release_year" int, "title_aka" text, "budget" text, primary key("mid") ); CREATE TABLE "tags" ( "id" int, "msid" int, "kid" int, primary key("id"), foreign key("msid") references `copyright`("msid"), foreign key("kid") references `keyword`("kid") ); 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") ); CREATE TABLE "writer" ( "wid" int, "gender" text, "name" int, "nationality" int, "num_of_episodes" int, "birth_city" text, "birth_year" int, primary key("wid") ); CREATE TABLE "written_by" ( "id" int, "msid" int, "wid" int, foreign key("msid") references `copyright`("msid"), foreign key("wid") references `writer`("wid") );
imdb
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";
Find all movies written and produced by " Woody Allen "
PRAGMA foreign_keys = ON; CREATE TABLE "actor" ( "aid" int, "gender" text, "name" text, "nationality" text, "birth_city" text, "birth_year" int, primary key("aid") ); CREATE TABLE "copyright" ( "id" int, "msid" int, "cid" int, primary key("id") ); 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") ); CREATE TABLE "genre" ( "gid" int, "genre" text, primary key("gid") ); CREATE TABLE "classification" ( "id" int, "msid" int, "gid" int, primary key("id"), foreign key("gid") references `genre`("gid"), foreign key("msid") references `copyright`("msid") ); CREATE TABLE "company" ( "id" int, "name" text, "country_code" text, primary key("id") ); CREATE TABLE "director" ( "did" int, "gender" text, "name" text, "nationality" text, "birth_city" text, "birth_year" int, primary key("did") ); CREATE TABLE "producer" ( "pid" int, "gender" text, "name" text, "nationality" text, "birth_city" text, "birth_year" int, primary key("pid") ); 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") ); CREATE TABLE "keyword" ( "id" int, "keyword" text, primary key("id") ); 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") ); CREATE TABLE "movie" ( "mid" int, "title" text, "release_year" int, "title_aka" text, "budget" text, primary key("mid") ); CREATE TABLE "tags" ( "id" int, "msid" int, "kid" int, primary key("id"), foreign key("msid") references `copyright`("msid"), foreign key("kid") references `keyword`("kid") ); 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") ); CREATE TABLE "writer" ( "wid" int, "gender" text, "name" int, "nationality" int, "num_of_episodes" int, "birth_city" text, "birth_year" int, primary key("wid") ); CREATE TABLE "written_by" ( "id" int, "msid" int, "wid" int, foreign key("msid") references `copyright`("msid"), foreign key("wid") references `writer`("wid") );
imdb
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";
Find all movies featuring " Robin Wright "
PRAGMA foreign_keys = ON; CREATE TABLE "actor" ( "aid" int, "gender" text, "name" text, "nationality" text, "birth_city" text, "birth_year" int, primary key("aid") ); CREATE TABLE "copyright" ( "id" int, "msid" int, "cid" int, primary key("id") ); 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") ); CREATE TABLE "genre" ( "gid" int, "genre" text, primary key("gid") ); CREATE TABLE "classification" ( "id" int, "msid" int, "gid" int, primary key("id"), foreign key("gid") references `genre`("gid"), foreign key("msid") references `copyright`("msid") ); CREATE TABLE "company" ( "id" int, "name" text, "country_code" text, primary key("id") ); CREATE TABLE "director" ( "did" int, "gender" text, "name" text, "nationality" text, "birth_city" text, "birth_year" int, primary key("did") ); CREATE TABLE "producer" ( "pid" int, "gender" text, "name" text, "nationality" text, "birth_city" text, "birth_year" int, primary key("pid") ); 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") ); CREATE TABLE "keyword" ( "id" int, "keyword" text, primary key("id") ); 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") ); CREATE TABLE "movie" ( "mid" int, "title" text, "release_year" int, "title_aka" text, "budget" text, primary key("mid") ); CREATE TABLE "tags" ( "id" int, "msid" int, "kid" int, primary key("id"), foreign key("msid") references `copyright`("msid"), foreign key("kid") references `keyword`("kid") ); 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") ); CREATE TABLE "writer" ( "wid" int, "gender" text, "name" int, "nationality" int, "num_of_episodes" int, "birth_city" text, "birth_year" int, primary key("wid") ); CREATE TABLE "written_by" ( "id" int, "msid" int, "wid" int, foreign key("msid") references `copyright`("msid"), foreign key("wid") references `writer`("wid") );
imdb
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";
What are all the movies featuring " Robin Wright " ?
PRAGMA foreign_keys = ON; CREATE TABLE "actor" ( "aid" int, "gender" text, "name" text, "nationality" text, "birth_city" text, "birth_year" int, primary key("aid") ); CREATE TABLE "copyright" ( "id" int, "msid" int, "cid" int, primary key("id") ); 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") ); CREATE TABLE "genre" ( "gid" int, "genre" text, primary key("gid") ); CREATE TABLE "classification" ( "id" int, "msid" int, "gid" int, primary key("id"), foreign key("gid") references `genre`("gid"), foreign key("msid") references `copyright`("msid") ); CREATE TABLE "company" ( "id" int, "name" text, "country_code" text, primary key("id") ); CREATE TABLE "director" ( "did" int, "gender" text, "name" text, "nationality" text, "birth_city" text, "birth_year" int, primary key("did") ); CREATE TABLE "producer" ( "pid" int, "gender" text, "name" text, "nationality" text, "birth_city" text, "birth_year" int, primary key("pid") ); 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") ); CREATE TABLE "keyword" ( "id" int, "keyword" text, primary key("id") ); 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") ); CREATE TABLE "movie" ( "mid" int, "title" text, "release_year" int, "title_aka" text, "budget" text, primary key("mid") ); CREATE TABLE "tags" ( "id" int, "msid" int, "kid" int, primary key("id"), foreign key("msid") references `copyright`("msid"), foreign key("kid") references `keyword`("kid") ); 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") ); CREATE TABLE "writer" ( "wid" int, "gender" text, "name" int, "nationality" int, "num_of_episodes" int, "birth_city" text, "birth_year" int, primary key("wid") ); CREATE TABLE "written_by" ( "id" int, "msid" int, "wid" int, foreign key("msid") references `copyright`("msid"), foreign key("wid") references `writer`("wid") );
imdb
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";
Find all movies in which " Robin Wright " appears
PRAGMA foreign_keys = ON; CREATE TABLE "actor" ( "aid" int, "gender" text, "name" text, "nationality" text, "birth_city" text, "birth_year" int, primary key("aid") ); CREATE TABLE "copyright" ( "id" int, "msid" int, "cid" int, primary key("id") ); 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") ); CREATE TABLE "genre" ( "gid" int, "genre" text, primary key("gid") ); CREATE TABLE "classification" ( "id" int, "msid" int, "gid" int, primary key("id"), foreign key("gid") references `genre`("gid"), foreign key("msid") references `copyright`("msid") ); CREATE TABLE "company" ( "id" int, "name" text, "country_code" text, primary key("id") ); CREATE TABLE "director" ( "did" int, "gender" text, "name" text, "nationality" text, "birth_city" text, "birth_year" int, primary key("did") ); CREATE TABLE "producer" ( "pid" int, "gender" text, "name" text, "nationality" text, "birth_city" text, "birth_year" int, primary key("pid") ); 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") ); CREATE TABLE "keyword" ( "id" int, "keyword" text, primary key("id") ); 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") ); CREATE TABLE "movie" ( "mid" int, "title" text, "release_year" int, "title_aka" text, "budget" text, primary key("mid") ); CREATE TABLE "tags" ( "id" int, "msid" int, "kid" int, primary key("id"), foreign key("msid") references `copyright`("msid"), foreign key("kid") references `keyword`("kid") ); 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") ); CREATE TABLE "writer" ( "wid" int, "gender" text, "name" int, "nationality" int, "num_of_episodes" int, "birth_city" text, "birth_year" int, primary key("wid") ); CREATE TABLE "written_by" ( "id" int, "msid" int, "wid" int, foreign key("msid") references `copyright`("msid"), foreign key("wid") references `writer`("wid") );
imdb
SELECT budget FROM movie WHERE release_year = 2007 AND title = "Juno";
What was the budget of the movie Juno from 2007 ?
PRAGMA foreign_keys = ON; CREATE TABLE "actor" ( "aid" int, "gender" text, "name" text, "nationality" text, "birth_city" text, "birth_year" int, primary key("aid") ); CREATE TABLE "copyright" ( "id" int, "msid" int, "cid" int, primary key("id") ); 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") ); CREATE TABLE "genre" ( "gid" int, "genre" text, primary key("gid") ); CREATE TABLE "classification" ( "id" int, "msid" int, "gid" int, primary key("id"), foreign key("gid") references `genre`("gid"), foreign key("msid") references `copyright`("msid") ); CREATE TABLE "company" ( "id" int, "name" text, "country_code" text, primary key("id") ); CREATE TABLE "director" ( "did" int, "gender" text, "name" text, "nationality" text, "birth_city" text, "birth_year" int, primary key("did") ); CREATE TABLE "producer" ( "pid" int, "gender" text, "name" text, "nationality" text, "birth_city" text, "birth_year" int, primary key("pid") ); 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") ); CREATE TABLE "keyword" ( "id" int, "keyword" text, primary key("id") ); 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") ); CREATE TABLE "movie" ( "mid" int, "title" text, "release_year" int, "title_aka" text, "budget" text, primary key("mid") ); CREATE TABLE "tags" ( "id" int, "msid" int, "kid" int, primary key("id"), foreign key("msid") references `copyright`("msid"), foreign key("kid") references `keyword`("kid") ); 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") ); CREATE TABLE "writer" ( "wid" int, "gender" text, "name" int, "nationality" int, "num_of_episodes" int, "birth_city" text, "birth_year" int, primary key("wid") ); CREATE TABLE "written_by" ( "id" int, "msid" int, "wid" int, foreign key("msid") references `copyright`("msid"), foreign key("wid") references `writer`("wid") );
imdb
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;
Find all Sci-Fi produced in year 2010
PRAGMA foreign_keys = ON; CREATE TABLE "actor" ( "aid" int, "gender" text, "name" text, "nationality" text, "birth_city" text, "birth_year" int, primary key("aid") ); CREATE TABLE "copyright" ( "id" int, "msid" int, "cid" int, primary key("id") ); 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") ); CREATE TABLE "genre" ( "gid" int, "genre" text, primary key("gid") ); CREATE TABLE "classification" ( "id" int, "msid" int, "gid" int, primary key("id"), foreign key("gid") references `genre`("gid"), foreign key("msid") references `copyright`("msid") ); CREATE TABLE "company" ( "id" int, "name" text, "country_code" text, primary key("id") ); CREATE TABLE "director" ( "did" int, "gender" text, "name" text, "nationality" text, "birth_city" text, "birth_year" int, primary key("did") ); CREATE TABLE "producer" ( "pid" int, "gender" text, "name" text, "nationality" text, "birth_city" text, "birth_year" int, primary key("pid") ); 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") ); CREATE TABLE "keyword" ( "id" int, "keyword" text, primary key("id") ); 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") ); CREATE TABLE "movie" ( "mid" int, "title" text, "release_year" int, "title_aka" text, "budget" text, primary key("mid") ); CREATE TABLE "tags" ( "id" int, "msid" int, "kid" int, primary key("id"), foreign key("msid") references `copyright`("msid"), foreign key("kid") references `keyword`("kid") ); 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") ); CREATE TABLE "writer" ( "wid" int, "gender" text, "name" int, "nationality" int, "num_of_episodes" int, "birth_city" text, "birth_year" int, primary key("wid") ); CREATE TABLE "written_by" ( "id" int, "msid" int, "wid" int, foreign key("msid") references `copyright`("msid"), foreign key("wid") references `writer`("wid") );
imdb
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;
List all the Sci-Fi movies which released in 2010
PRAGMA foreign_keys = ON; CREATE TABLE "actor" ( "aid" int, "gender" text, "name" text, "nationality" text, "birth_city" text, "birth_year" int, primary key("aid") ); CREATE TABLE "copyright" ( "id" int, "msid" int, "cid" int, primary key("id") ); 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") ); CREATE TABLE "genre" ( "gid" int, "genre" text, primary key("gid") ); CREATE TABLE "classification" ( "id" int, "msid" int, "gid" int, primary key("id"), foreign key("gid") references `genre`("gid"), foreign key("msid") references `copyright`("msid") ); CREATE TABLE "company" ( "id" int, "name" text, "country_code" text, primary key("id") ); CREATE TABLE "director" ( "did" int, "gender" text, "name" text, "nationality" text, "birth_city" text, "birth_year" int, primary key("did") ); CREATE TABLE "producer" ( "pid" int, "gender" text, "name" text, "nationality" text, "birth_city" text, "birth_year" int, primary key("pid") ); 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") ); CREATE TABLE "keyword" ( "id" int, "keyword" text, primary key("id") ); 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") ); CREATE TABLE "movie" ( "mid" int, "title" text, "release_year" int, "title_aka" text, "budget" text, primary key("mid") ); CREATE TABLE "tags" ( "id" int, "msid" int, "kid" int, primary key("id"), foreign key("msid") references `copyright`("msid"), foreign key("kid") references `keyword`("kid") ); 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") ); CREATE TABLE "writer" ( "wid" int, "gender" text, "name" int, "nationality" int, "num_of_episodes" int, "birth_city" text, "birth_year" int, primary key("wid") ); CREATE TABLE "written_by" ( "id" int, "msid" int, "wid" int, foreign key("msid") references `copyright`("msid"), foreign key("wid") references `writer`("wid") );
imdb
SELECT name FROM actor WHERE birth_city = "Austin" AND birth_year > 1980;
Find all actors born in " Austin " after 1980
PRAGMA foreign_keys = ON; CREATE TABLE "actor" ( "aid" int, "gender" text, "name" text, "nationality" text, "birth_city" text, "birth_year" int, primary key("aid") ); CREATE TABLE "copyright" ( "id" int, "msid" int, "cid" int, primary key("id") ); 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") ); CREATE TABLE "genre" ( "gid" int, "genre" text, primary key("gid") ); CREATE TABLE "classification" ( "id" int, "msid" int, "gid" int, primary key("id"), foreign key("gid") references `genre`("gid"), foreign key("msid") references `copyright`("msid") ); CREATE TABLE "company" ( "id" int, "name" text, "country_code" text, primary key("id") ); CREATE TABLE "director" ( "did" int, "gender" text, "name" text, "nationality" text, "birth_city" text, "birth_year" int, primary key("did") ); CREATE TABLE "producer" ( "pid" int, "gender" text, "name" text, "nationality" text, "birth_city" text, "birth_year" int, primary key("pid") ); 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") ); CREATE TABLE "keyword" ( "id" int, "keyword" text, primary key("id") ); 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") ); CREATE TABLE "movie" ( "mid" int, "title" text, "release_year" int, "title_aka" text, "budget" text, primary key("mid") ); CREATE TABLE "tags" ( "id" int, "msid" int, "kid" int, primary key("id"), foreign key("msid") references `copyright`("msid"), foreign key("kid") references `keyword`("kid") ); 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") ); CREATE TABLE "writer" ( "wid" int, "gender" text, "name" int, "nationality" int, "num_of_episodes" int, "birth_city" text, "birth_year" int, primary key("wid") ); CREATE TABLE "written_by" ( "id" int, "msid" int, "wid" int, foreign key("msid") references `copyright`("msid"), foreign key("wid") references `writer`("wid") );
imdb
SELECT name FROM actor WHERE birth_city = "Austin" AND birth_year > 1980;
Who are the actors born in " Austin " after 1980 ?
PRAGMA foreign_keys = ON; CREATE TABLE "actor" ( "aid" int, "gender" text, "name" text, "nationality" text, "birth_city" text, "birth_year" int, primary key("aid") ); CREATE TABLE "copyright" ( "id" int, "msid" int, "cid" int, primary key("id") ); 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") ); CREATE TABLE "genre" ( "gid" int, "genre" text, primary key("gid") ); CREATE TABLE "classification" ( "id" int, "msid" int, "gid" int, primary key("id"), foreign key("gid") references `genre`("gid"), foreign key("msid") references `copyright`("msid") ); CREATE TABLE "company" ( "id" int, "name" text, "country_code" text, primary key("id") ); CREATE TABLE "director" ( "did" int, "gender" text, "name" text, "nationality" text, "birth_city" text, "birth_year" int, primary key("did") ); CREATE TABLE "producer" ( "pid" int, "gender" text, "name" text, "nationality" text, "birth_city" text, "birth_year" int, primary key("pid") ); 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") ); CREATE TABLE "keyword" ( "id" int, "keyword" text, primary key("id") ); 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") ); CREATE TABLE "movie" ( "mid" int, "title" text, "release_year" int, "title_aka" text, "budget" text, primary key("mid") ); CREATE TABLE "tags" ( "id" int, "msid" int, "kid" int, primary key("id"), foreign key("msid") references `copyright`("msid"), foreign key("kid") references `keyword`("kid") ); 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") ); CREATE TABLE "writer" ( "wid" int, "gender" text, "name" int, "nationality" int, "num_of_episodes" int, "birth_city" text, "birth_year" int, primary key("wid") ); CREATE TABLE "written_by" ( "id" int, "msid" int, "wid" int, foreign key("msid") references `copyright`("msid"), foreign key("wid") references `writer`("wid") );
imdb
SELECT name FROM actor WHERE birth_city = "Austin" AND birth_year > 1980;
Find all actors from Austin born after 1980
PRAGMA foreign_keys = ON; CREATE TABLE "actor" ( "aid" int, "gender" text, "name" text, "nationality" text, "birth_city" text, "birth_year" int, primary key("aid") ); CREATE TABLE "copyright" ( "id" int, "msid" int, "cid" int, primary key("id") ); 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") ); CREATE TABLE "genre" ( "gid" int, "genre" text, primary key("gid") ); CREATE TABLE "classification" ( "id" int, "msid" int, "gid" int, primary key("id"), foreign key("gid") references `genre`("gid"), foreign key("msid") references `copyright`("msid") ); CREATE TABLE "company" ( "id" int, "name" text, "country_code" text, primary key("id") ); CREATE TABLE "director" ( "did" int, "gender" text, "name" text, "nationality" text, "birth_city" text, "birth_year" int, primary key("did") ); CREATE TABLE "producer" ( "pid" int, "gender" text, "name" text, "nationality" text, "birth_city" text, "birth_year" int, primary key("pid") ); 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") ); CREATE TABLE "keyword" ( "id" int, "keyword" text, primary key("id") ); 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") ); CREATE TABLE "movie" ( "mid" int, "title" text, "release_year" int, "title_aka" text, "budget" text, primary key("mid") ); CREATE TABLE "tags" ( "id" int, "msid" int, "kid" int, primary key("id"), foreign key("msid") references `copyright`("msid"), foreign key("kid") references `keyword`("kid") ); 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") ); CREATE TABLE "writer" ( "wid" int, "gender" text, "name" int, "nationality" int, "num_of_episodes" int, "birth_city" text, "birth_year" int, primary key("wid") ); CREATE TABLE "written_by" ( "id" int, "msid" int, "wid" int, foreign key("msid") references `copyright`("msid"), foreign key("wid") references `writer`("wid") );
imdb
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";
Find all movies by directors born in " Los Angeles "
PRAGMA foreign_keys = ON; CREATE TABLE "actor" ( "aid" int, "gender" text, "name" text, "nationality" text, "birth_city" text, "birth_year" int, primary key("aid") ); CREATE TABLE "copyright" ( "id" int, "msid" int, "cid" int, primary key("id") ); 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") ); CREATE TABLE "genre" ( "gid" int, "genre" text, primary key("gid") ); CREATE TABLE "classification" ( "id" int, "msid" int, "gid" int, primary key("id"), foreign key("gid") references `genre`("gid"), foreign key("msid") references `copyright`("msid") ); CREATE TABLE "company" ( "id" int, "name" text, "country_code" text, primary key("id") ); CREATE TABLE "director" ( "did" int, "gender" text, "name" text, "nationality" text, "birth_city" text, "birth_year" int, primary key("did") ); CREATE TABLE "producer" ( "pid" int, "gender" text, "name" text, "nationality" text, "birth_city" text, "birth_year" int, primary key("pid") ); 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") ); CREATE TABLE "keyword" ( "id" int, "keyword" text, primary key("id") ); 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") ); CREATE TABLE "movie" ( "mid" int, "title" text, "release_year" int, "title_aka" text, "budget" text, primary key("mid") ); CREATE TABLE "tags" ( "id" int, "msid" int, "kid" int, primary key("id"), foreign key("msid") references `copyright`("msid"), foreign key("kid") references `keyword`("kid") ); 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") ); CREATE TABLE "writer" ( "wid" int, "gender" text, "name" int, "nationality" int, "num_of_episodes" int, "birth_city" text, "birth_year" int, primary key("wid") ); CREATE TABLE "written_by" ( "id" int, "msid" int, "wid" int, foreign key("msid") references `copyright`("msid"), foreign key("wid") references `writer`("wid") );
imdb
SELECT name FROM actor WHERE birth_city = "New York City" AND birth_year = 1984;
Find all actors who were born in " New York City " in 1984
PRAGMA foreign_keys = ON; CREATE TABLE "actor" ( "aid" int, "gender" text, "name" text, "nationality" text, "birth_city" text, "birth_year" int, primary key("aid") ); CREATE TABLE "copyright" ( "id" int, "msid" int, "cid" int, primary key("id") ); 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") ); CREATE TABLE "genre" ( "gid" int, "genre" text, primary key("gid") ); CREATE TABLE "classification" ( "id" int, "msid" int, "gid" int, primary key("id"), foreign key("gid") references `genre`("gid"), foreign key("msid") references `copyright`("msid") ); CREATE TABLE "company" ( "id" int, "name" text, "country_code" text, primary key("id") ); CREATE TABLE "director" ( "did" int, "gender" text, "name" text, "nationality" text, "birth_city" text, "birth_year" int, primary key("did") ); CREATE TABLE "producer" ( "pid" int, "gender" text, "name" text, "nationality" text, "birth_city" text, "birth_year" int, primary key("pid") ); 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") ); CREATE TABLE "keyword" ( "id" int, "keyword" text, primary key("id") ); 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") ); CREATE TABLE "movie" ( "mid" int, "title" text, "release_year" int, "title_aka" text, "budget" text, primary key("mid") ); CREATE TABLE "tags" ( "id" int, "msid" int, "kid" int, primary key("id"), foreign key("msid") references `copyright`("msid"), foreign key("kid") references `keyword`("kid") ); 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") ); CREATE TABLE "writer" ( "wid" int, "gender" text, "name" int, "nationality" int, "num_of_episodes" int, "birth_city" text, "birth_year" int, primary key("wid") ); CREATE TABLE "written_by" ( "id" int, "msid" int, "wid" int, foreign key("msid") references `copyright`("msid"), foreign key("wid") references `writer`("wid") );
imdb
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";
Find all movies about nuclear weapons
PRAGMA foreign_keys = ON; CREATE TABLE "actor" ( "aid" int, "gender" text, "name" text, "nationality" text, "birth_city" text, "birth_year" int, primary key("aid") ); CREATE TABLE "copyright" ( "id" int, "msid" int, "cid" int, primary key("id") ); 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") ); CREATE TABLE "genre" ( "gid" int, "genre" text, primary key("gid") ); CREATE TABLE "classification" ( "id" int, "msid" int, "gid" int, primary key("id"), foreign key("gid") references `genre`("gid"), foreign key("msid") references `copyright`("msid") ); CREATE TABLE "company" ( "id" int, "name" text, "country_code" text, primary key("id") ); CREATE TABLE "director" ( "did" int, "gender" text, "name" text, "nationality" text, "birth_city" text, "birth_year" int, primary key("did") ); CREATE TABLE "producer" ( "pid" int, "gender" text, "name" text, "nationality" text, "birth_city" text, "birth_year" int, primary key("pid") ); 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") ); CREATE TABLE "keyword" ( "id" int, "keyword" text, primary key("id") ); 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") ); CREATE TABLE "movie" ( "mid" int, "title" text, "release_year" int, "title_aka" text, "budget" text, primary key("mid") ); CREATE TABLE "tags" ( "id" int, "msid" int, "kid" int, primary key("id"), foreign key("msid") references `copyright`("msid"), foreign key("kid") references `keyword`("kid") ); 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") ); CREATE TABLE "writer" ( "wid" int, "gender" text, "name" int, "nationality" int, "num_of_episodes" int, "birth_city" text, "birth_year" int, primary key("wid") ); CREATE TABLE "written_by" ( "id" int, "msid" int, "wid" int, foreign key("msid") references `copyright`("msid"), foreign key("wid") references `writer`("wid") );
imdb
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";
What are the movies related to nuclear weapons
PRAGMA foreign_keys = ON; CREATE TABLE "actor" ( "aid" int, "gender" text, "name" text, "nationality" text, "birth_city" text, "birth_year" int, primary key("aid") ); CREATE TABLE "copyright" ( "id" int, "msid" int, "cid" int, primary key("id") ); 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") ); CREATE TABLE "genre" ( "gid" int, "genre" text, primary key("gid") ); CREATE TABLE "classification" ( "id" int, "msid" int, "gid" int, primary key("id"), foreign key("gid") references `genre`("gid"), foreign key("msid") references `copyright`("msid") ); CREATE TABLE "company" ( "id" int, "name" text, "country_code" text, primary key("id") ); CREATE TABLE "director" ( "did" int, "gender" text, "name" text, "nationality" text, "birth_city" text, "birth_year" int, primary key("did") ); CREATE TABLE "producer" ( "pid" int, "gender" text, "name" text, "nationality" text, "birth_city" text, "birth_year" int, primary key("pid") ); 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") ); CREATE TABLE "keyword" ( "id" int, "keyword" text, primary key("id") ); 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") ); CREATE TABLE "movie" ( "mid" int, "title" text, "release_year" int, "title_aka" text, "budget" text, primary key("mid") ); CREATE TABLE "tags" ( "id" int, "msid" int, "kid" int, primary key("id"), foreign key("msid") references `copyright`("msid"), foreign key("kid") references `keyword`("kid") ); 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") ); CREATE TABLE "writer" ( "wid" int, "gender" text, "name" int, "nationality" int, "num_of_episodes" int, "birth_city" text, "birth_year" int, primary key("wid") ); CREATE TABLE "written_by" ( "id" int, "msid" int, "wid" int, foreign key("msid") references `copyright`("msid"), foreign key("wid") references `writer`("wid") );
imdb
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";
Which movies did " Alfred Hitchcock " direct ?
PRAGMA foreign_keys = ON; CREATE TABLE "actor" ( "aid" int, "gender" text, "name" text, "nationality" text, "birth_city" text, "birth_year" int, primary key("aid") ); CREATE TABLE "copyright" ( "id" int, "msid" int, "cid" int, primary key("id") ); 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") ); CREATE TABLE "genre" ( "gid" int, "genre" text, primary key("gid") ); CREATE TABLE "classification" ( "id" int, "msid" int, "gid" int, primary key("id"), foreign key("gid") references `genre`("gid"), foreign key("msid") references `copyright`("msid") ); CREATE TABLE "company" ( "id" int, "name" text, "country_code" text, primary key("id") ); CREATE TABLE "director" ( "did" int, "gender" text, "name" text, "nationality" text, "birth_city" text, "birth_year" int, primary key("did") ); CREATE TABLE "producer" ( "pid" int, "gender" text, "name" text, "nationality" text, "birth_city" text, "birth_year" int, primary key("pid") ); 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") ); CREATE TABLE "keyword" ( "id" int, "keyword" text, primary key("id") ); 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") ); CREATE TABLE "movie" ( "mid" int, "title" text, "release_year" int, "title_aka" text, "budget" text, primary key("mid") ); CREATE TABLE "tags" ( "id" int, "msid" int, "kid" int, primary key("id"), foreign key("msid") references `copyright`("msid"), foreign key("kid") references `keyword`("kid") ); 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") ); CREATE TABLE "writer" ( "wid" int, "gender" text, "name" int, "nationality" int, "num_of_episodes" int, "birth_city" text, "birth_year" int, primary key("wid") ); CREATE TABLE "written_by" ( "id" int, "msid" int, "wid" int, foreign key("msid") references `copyright`("msid"), foreign key("wid") references `writer`("wid") );
imdb
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";
Find all movies directed by " Asghar Farhadi " and featuring " Taraneh Alidoosti "
PRAGMA foreign_keys = ON; CREATE TABLE "actor" ( "aid" int, "gender" text, "name" text, "nationality" text, "birth_city" text, "birth_year" int, primary key("aid") ); CREATE TABLE "copyright" ( "id" int, "msid" int, "cid" int, primary key("id") ); 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") ); CREATE TABLE "genre" ( "gid" int, "genre" text, primary key("gid") ); CREATE TABLE "classification" ( "id" int, "msid" int, "gid" int, primary key("id"), foreign key("gid") references `genre`("gid"), foreign key("msid") references `copyright`("msid") ); CREATE TABLE "company" ( "id" int, "name" text, "country_code" text, primary key("id") ); CREATE TABLE "director" ( "did" int, "gender" text, "name" text, "nationality" text, "birth_city" text, "birth_year" int, primary key("did") ); CREATE TABLE "producer" ( "pid" int, "gender" text, "name" text, "nationality" text, "birth_city" text, "birth_year" int, primary key("pid") ); 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") ); CREATE TABLE "keyword" ( "id" int, "keyword" text, primary key("id") ); 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") ); CREATE TABLE "movie" ( "mid" int, "title" text, "release_year" int, "title_aka" text, "budget" text, primary key("mid") ); CREATE TABLE "tags" ( "id" int, "msid" int, "kid" int, primary key("id"), foreign key("msid") references `copyright`("msid"), foreign key("kid") references `keyword`("kid") ); 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") ); CREATE TABLE "writer" ( "wid" int, "gender" text, "name" int, "nationality" int, "num_of_episodes" int, "birth_city" text, "birth_year" int, primary key("wid") ); CREATE TABLE "written_by" ( "id" int, "msid" int, "wid" int, foreign key("msid") references `copyright`("msid"), foreign key("wid") references `writer`("wid") );
imdb
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";
What are all the movies directed by " Asghar Farhadi " featuring " Taraneh Alidoosti " ?
PRAGMA foreign_keys = ON; CREATE TABLE "actor" ( "aid" int, "gender" text, "name" text, "nationality" text, "birth_city" text, "birth_year" int, primary key("aid") ); CREATE TABLE "copyright" ( "id" int, "msid" int, "cid" int, primary key("id") ); 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") ); CREATE TABLE "genre" ( "gid" int, "genre" text, primary key("gid") ); CREATE TABLE "classification" ( "id" int, "msid" int, "gid" int, primary key("id"), foreign key("gid") references `genre`("gid"), foreign key("msid") references `copyright`("msid") ); CREATE TABLE "company" ( "id" int, "name" text, "country_code" text, primary key("id") ); CREATE TABLE "director" ( "did" int, "gender" text, "name" text, "nationality" text, "birth_city" text, "birth_year" int, primary key("did") ); CREATE TABLE "producer" ( "pid" int, "gender" text, "name" text, "nationality" text, "birth_city" text, "birth_year" int, primary key("pid") ); 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") ); CREATE TABLE "keyword" ( "id" int, "keyword" text, primary key("id") ); 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") ); CREATE TABLE "movie" ( "mid" int, "title" text, "release_year" int, "title_aka" text, "budget" text, primary key("mid") ); CREATE TABLE "tags" ( "id" int, "msid" int, "kid" int, primary key("id"), foreign key("msid") references `copyright`("msid"), foreign key("kid") references `keyword`("kid") ); 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") ); CREATE TABLE "writer" ( "wid" int, "gender" text, "name" int, "nationality" int, "num_of_episodes" int, "birth_city" text, "birth_year" int, primary key("wid") ); CREATE TABLE "written_by" ( "id" int, "msid" int, "wid" int, foreign key("msid") references `copyright`("msid"), foreign key("wid") references `writer`("wid") );
imdb
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";
How many movies are there that are directed by " Asghar Farhadi " and featuring " Taraneh Alidoosti " ?
PRAGMA foreign_keys = ON; CREATE TABLE "actor" ( "aid" int, "gender" text, "name" text, "nationality" text, "birth_city" text, "birth_year" int, primary key("aid") ); CREATE TABLE "copyright" ( "id" int, "msid" int, "cid" int, primary key("id") ); 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") ); CREATE TABLE "genre" ( "gid" int, "genre" text, primary key("gid") ); CREATE TABLE "classification" ( "id" int, "msid" int, "gid" int, primary key("id"), foreign key("gid") references `genre`("gid"), foreign key("msid") references `copyright`("msid") ); CREATE TABLE "company" ( "id" int, "name" text, "country_code" text, primary key("id") ); CREATE TABLE "director" ( "did" int, "gender" text, "name" text, "nationality" text, "birth_city" text, "birth_year" int, primary key("did") ); CREATE TABLE "producer" ( "pid" int, "gender" text, "name" text, "nationality" text, "birth_city" text, "birth_year" int, primary key("pid") ); 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") ); CREATE TABLE "keyword" ( "id" int, "keyword" text, primary key("id") ); 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") ); CREATE TABLE "movie" ( "mid" int, "title" text, "release_year" int, "title_aka" text, "budget" text, primary key("mid") ); CREATE TABLE "tags" ( "id" int, "msid" int, "kid" int, primary key("id"), foreign key("msid") references `copyright`("msid"), foreign key("kid") references `keyword`("kid") ); 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") ); CREATE TABLE "writer" ( "wid" int, "gender" text, "name" int, "nationality" int, "num_of_episodes" int, "birth_city" text, "birth_year" int, primary key("wid") ); CREATE TABLE "written_by" ( "id" int, "msid" int, "wid" int, foreign key("msid") references `copyright`("msid"), foreign key("wid") references `writer`("wid") );
imdb
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";
List all the movies directed by " Asghar Farhadi " in which " Taraneh Alidoosti " played
PRAGMA foreign_keys = ON; CREATE TABLE "actor" ( "aid" int, "gender" text, "name" text, "nationality" text, "birth_city" text, "birth_year" int, primary key("aid") ); CREATE TABLE "copyright" ( "id" int, "msid" int, "cid" int, primary key("id") ); 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") ); CREATE TABLE "genre" ( "gid" int, "genre" text, primary key("gid") ); CREATE TABLE "classification" ( "id" int, "msid" int, "gid" int, primary key("id"), foreign key("gid") references `genre`("gid"), foreign key("msid") references `copyright`("msid") ); CREATE TABLE "company" ( "id" int, "name" text, "country_code" text, primary key("id") ); CREATE TABLE "director" ( "did" int, "gender" text, "name" text, "nationality" text, "birth_city" text, "birth_year" int, primary key("did") ); CREATE TABLE "producer" ( "pid" int, "gender" text, "name" text, "nationality" text, "birth_city" text, "birth_year" int, primary key("pid") ); 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") ); CREATE TABLE "keyword" ( "id" int, "keyword" text, primary key("id") ); 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") ); CREATE TABLE "movie" ( "mid" int, "title" text, "release_year" int, "title_aka" text, "budget" text, primary key("mid") ); CREATE TABLE "tags" ( "id" int, "msid" int, "kid" int, primary key("id"), foreign key("msid") references `copyright`("msid"), foreign key("kid") references `keyword`("kid") ); 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") ); CREATE TABLE "writer" ( "wid" int, "gender" text, "name" int, "nationality" int, "num_of_episodes" int, "birth_city" text, "birth_year" int, primary key("wid") ); CREATE TABLE "written_by" ( "id" int, "msid" int, "wid" int, foreign key("msid") references `copyright`("msid"), foreign key("wid") references `writer`("wid") );
imdb
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";
What are all the tv series created by " Shonda Rhimes " ?
PRAGMA foreign_keys = ON; CREATE TABLE "actor" ( "aid" int, "gender" text, "name" text, "nationality" text, "birth_city" text, "birth_year" int, primary key("aid") ); CREATE TABLE "copyright" ( "id" int, "msid" int, "cid" int, primary key("id") ); 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") ); CREATE TABLE "genre" ( "gid" int, "genre" text, primary key("gid") ); CREATE TABLE "classification" ( "id" int, "msid" int, "gid" int, primary key("id"), foreign key("gid") references `genre`("gid"), foreign key("msid") references `copyright`("msid") ); CREATE TABLE "company" ( "id" int, "name" text, "country_code" text, primary key("id") ); CREATE TABLE "director" ( "did" int, "gender" text, "name" text, "nationality" text, "birth_city" text, "birth_year" int, primary key("did") ); CREATE TABLE "producer" ( "pid" int, "gender" text, "name" text, "nationality" text, "birth_city" text, "birth_year" int, primary key("pid") ); 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") ); CREATE TABLE "keyword" ( "id" int, "keyword" text, primary key("id") ); 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") ); CREATE TABLE "movie" ( "mid" int, "title" text, "release_year" int, "title_aka" text, "budget" text, primary key("mid") ); CREATE TABLE "tags" ( "id" int, "msid" int, "kid" int, primary key("id"), foreign key("msid") references `copyright`("msid"), foreign key("kid") references `keyword`("kid") ); 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") ); CREATE TABLE "writer" ( "wid" int, "gender" text, "name" int, "nationality" int, "num_of_episodes" int, "birth_city" text, "birth_year" int, primary key("wid") ); CREATE TABLE "written_by" ( "id" int, "msid" int, "wid" int, foreign key("msid") references `copyright`("msid"), foreign key("wid") references `writer`("wid") );
imdb
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";
Who acts " Olivia Pope " in the series Scandal ?
PRAGMA foreign_keys = ON; CREATE TABLE "actor" ( "aid" int, "gender" text, "name" text, "nationality" text, "birth_city" text, "birth_year" int, primary key("aid") ); CREATE TABLE "copyright" ( "id" int, "msid" int, "cid" int, primary key("id") ); 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") ); CREATE TABLE "genre" ( "gid" int, "genre" text, primary key("gid") ); CREATE TABLE "classification" ( "id" int, "msid" int, "gid" int, primary key("id"), foreign key("gid") references `genre`("gid"), foreign key("msid") references `copyright`("msid") ); CREATE TABLE "company" ( "id" int, "name" text, "country_code" text, primary key("id") ); CREATE TABLE "director" ( "did" int, "gender" text, "name" text, "nationality" text, "birth_city" text, "birth_year" int, primary key("did") ); CREATE TABLE "producer" ( "pid" int, "gender" text, "name" text, "nationality" text, "birth_city" text, "birth_year" int, primary key("pid") ); 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") ); CREATE TABLE "keyword" ( "id" int, "keyword" text, primary key("id") ); 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") ); CREATE TABLE "movie" ( "mid" int, "title" text, "release_year" int, "title_aka" text, "budget" text, primary key("mid") ); CREATE TABLE "tags" ( "id" int, "msid" int, "kid" int, primary key("id"), foreign key("msid") references `copyright`("msid"), foreign key("kid") references `keyword`("kid") ); 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") ); CREATE TABLE "writer" ( "wid" int, "gender" text, "name" int, "nationality" int, "num_of_episodes" int, "birth_city" text, "birth_year" int, primary key("wid") ); CREATE TABLE "written_by" ( "id" int, "msid" int, "wid" int, foreign key("msid") references `copyright`("msid"), foreign key("wid") references `writer`("wid") );
imdb
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";
Who is the writer of the movie " The Truman Show "
PRAGMA foreign_keys = ON; CREATE TABLE "actor" ( "aid" int, "gender" text, "name" text, "nationality" text, "birth_city" text, "birth_year" int, primary key("aid") ); CREATE TABLE "copyright" ( "id" int, "msid" int, "cid" int, primary key("id") ); 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") ); CREATE TABLE "genre" ( "gid" int, "genre" text, primary key("gid") ); CREATE TABLE "classification" ( "id" int, "msid" int, "gid" int, primary key("id"), foreign key("gid") references `genre`("gid"), foreign key("msid") references `copyright`("msid") ); CREATE TABLE "company" ( "id" int, "name" text, "country_code" text, primary key("id") ); CREATE TABLE "director" ( "did" int, "gender" text, "name" text, "nationality" text, "birth_city" text, "birth_year" int, primary key("did") ); CREATE TABLE "producer" ( "pid" int, "gender" text, "name" text, "nationality" text, "birth_city" text, "birth_year" int, primary key("pid") ); 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") ); CREATE TABLE "keyword" ( "id" int, "keyword" text, primary key("id") ); 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") ); CREATE TABLE "movie" ( "mid" int, "title" text, "release_year" int, "title_aka" text, "budget" text, primary key("mid") ); CREATE TABLE "tags" ( "id" int, "msid" int, "kid" int, primary key("id"), foreign key("msid") references `copyright`("msid"), foreign key("kid") references `keyword`("kid") ); 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") ); CREATE TABLE "writer" ( "wid" int, "gender" text, "name" int, "nationality" int, "num_of_episodes" int, "birth_city" text, "birth_year" int, primary key("wid") ); CREATE TABLE "written_by" ( "id" int, "msid" int, "wid" int, foreign key("msid") references `copyright`("msid"), foreign key("wid") references `writer`("wid") );
imdb
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";
Who is the writer of " The Truman Show "
PRAGMA foreign_keys = ON; CREATE TABLE "actor" ( "aid" int, "gender" text, "name" text, "nationality" text, "birth_city" text, "birth_year" int, primary key("aid") ); CREATE TABLE "copyright" ( "id" int, "msid" int, "cid" int, primary key("id") ); 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") ); CREATE TABLE "genre" ( "gid" int, "genre" text, primary key("gid") ); CREATE TABLE "classification" ( "id" int, "msid" int, "gid" int, primary key("id"), foreign key("gid") references `genre`("gid"), foreign key("msid") references `copyright`("msid") ); CREATE TABLE "company" ( "id" int, "name" text, "country_code" text, primary key("id") ); CREATE TABLE "director" ( "did" int, "gender" text, "name" text, "nationality" text, "birth_city" text, "birth_year" int, primary key("did") ); CREATE TABLE "producer" ( "pid" int, "gender" text, "name" text, "nationality" text, "birth_city" text, "birth_year" int, primary key("pid") ); 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") ); CREATE TABLE "keyword" ( "id" int, "keyword" text, primary key("id") ); 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") ); CREATE TABLE "movie" ( "mid" int, "title" text, "release_year" int, "title_aka" text, "budget" text, primary key("mid") ); CREATE TABLE "tags" ( "id" int, "msid" int, "kid" int, primary key("id"), foreign key("msid") references `copyright`("msid"), foreign key("kid") references `keyword`("kid") ); 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") ); CREATE TABLE "writer" ( "wid" int, "gender" text, "name" int, "nationality" int, "num_of_episodes" int, "birth_city" text, "birth_year" int, primary key("wid") ); CREATE TABLE "written_by" ( "id" int, "msid" int, "wid" int, foreign key("msid") references `copyright`("msid"), foreign key("wid") references `writer`("wid") );
imdb
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";
What are the series featuring " Scott Foley " ?
PRAGMA foreign_keys = ON; CREATE TABLE "actor" ( "aid" int, "gender" text, "name" text, "nationality" text, "birth_city" text, "birth_year" int, primary key("aid") ); CREATE TABLE "copyright" ( "id" int, "msid" int, "cid" int, primary key("id") ); 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") ); CREATE TABLE "genre" ( "gid" int, "genre" text, primary key("gid") ); CREATE TABLE "classification" ( "id" int, "msid" int, "gid" int, primary key("id"), foreign key("gid") references `genre`("gid"), foreign key("msid") references `copyright`("msid") ); CREATE TABLE "company" ( "id" int, "name" text, "country_code" text, primary key("id") ); CREATE TABLE "director" ( "did" int, "gender" text, "name" text, "nationality" text, "birth_city" text, "birth_year" int, primary key("did") ); CREATE TABLE "producer" ( "pid" int, "gender" text, "name" text, "nationality" text, "birth_city" text, "birth_year" int, primary key("pid") ); 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") ); CREATE TABLE "keyword" ( "id" int, "keyword" text, primary key("id") ); 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") ); CREATE TABLE "movie" ( "mid" int, "title" text, "release_year" int, "title_aka" text, "budget" text, primary key("mid") ); CREATE TABLE "tags" ( "id" int, "msid" int, "kid" int, primary key("id"), foreign key("msid") references `copyright`("msid"), foreign key("kid") references `keyword`("kid") ); 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") ); CREATE TABLE "writer" ( "wid" int, "gender" text, "name" int, "nationality" int, "num_of_episodes" int, "birth_city" text, "birth_year" int, primary key("wid") ); CREATE TABLE "written_by" ( "id" int, "msid" int, "wid" int, foreign key("msid") references `copyright`("msid"), foreign key("wid") references `writer`("wid") );
imdb
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";
What are the series in which " Scott Foley " is an actor ?
PRAGMA foreign_keys = ON; CREATE TABLE "actor" ( "aid" int, "gender" text, "name" text, "nationality" text, "birth_city" text, "birth_year" int, primary key("aid") ); CREATE TABLE "copyright" ( "id" int, "msid" int, "cid" int, primary key("id") ); 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") ); CREATE TABLE "genre" ( "gid" int, "genre" text, primary key("gid") ); CREATE TABLE "classification" ( "id" int, "msid" int, "gid" int, primary key("id"), foreign key("gid") references `genre`("gid"), foreign key("msid") references `copyright`("msid") ); CREATE TABLE "company" ( "id" int, "name" text, "country_code" text, primary key("id") ); CREATE TABLE "director" ( "did" int, "gender" text, "name" text, "nationality" text, "birth_city" text, "birth_year" int, primary key("did") ); CREATE TABLE "producer" ( "pid" int, "gender" text, "name" text, "nationality" text, "birth_city" text, "birth_year" int, primary key("pid") ); 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") ); CREATE TABLE "keyword" ( "id" int, "keyword" text, primary key("id") ); 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") ); CREATE TABLE "movie" ( "mid" int, "title" text, "release_year" int, "title_aka" text, "budget" text, primary key("mid") ); CREATE TABLE "tags" ( "id" int, "msid" int, "kid" int, primary key("id"), foreign key("msid") references `copyright`("msid"), foreign key("kid") references `keyword`("kid") ); 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") ); CREATE TABLE "writer" ( "wid" int, "gender" text, "name" int, "nationality" int, "num_of_episodes" int, "birth_city" text, "birth_year" int, primary key("wid") ); CREATE TABLE "written_by" ( "id" int, "msid" int, "wid" int, foreign key("msid") references `copyright`("msid"), foreign key("wid") references `writer`("wid") );
imdb
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";
Find the directors of all movies featuring " Kate Winslet "
PRAGMA foreign_keys = ON; CREATE TABLE "actor" ( "aid" int, "gender" text, "name" text, "nationality" text, "birth_city" text, "birth_year" int, primary key("aid") ); CREATE TABLE "copyright" ( "id" int, "msid" int, "cid" int, primary key("id") ); 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") ); CREATE TABLE "genre" ( "gid" int, "genre" text, primary key("gid") ); CREATE TABLE "classification" ( "id" int, "msid" int, "gid" int, primary key("id"), foreign key("gid") references `genre`("gid"), foreign key("msid") references `copyright`("msid") ); CREATE TABLE "company" ( "id" int, "name" text, "country_code" text, primary key("id") ); CREATE TABLE "director" ( "did" int, "gender" text, "name" text, "nationality" text, "birth_city" text, "birth_year" int, primary key("did") ); CREATE TABLE "producer" ( "pid" int, "gender" text, "name" text, "nationality" text, "birth_city" text, "birth_year" int, primary key("pid") ); 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") ); CREATE TABLE "keyword" ( "id" int, "keyword" text, primary key("id") ); 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") ); CREATE TABLE "movie" ( "mid" int, "title" text, "release_year" int, "title_aka" text, "budget" text, primary key("mid") ); CREATE TABLE "tags" ( "id" int, "msid" int, "kid" int, primary key("id"), foreign key("msid") references `copyright`("msid"), foreign key("kid") references `keyword`("kid") ); 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") ); CREATE TABLE "writer" ( "wid" int, "gender" text, "name" int, "nationality" int, "num_of_episodes" int, "birth_city" text, "birth_year" int, primary key("wid") ); CREATE TABLE "written_by" ( "id" int, "msid" int, "wid" int, foreign key("msid") references `copyright`("msid"), foreign key("wid") references `writer`("wid") );
imdb
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";
Find the producers of all movies in which " Kate Winslet " is an actor
PRAGMA foreign_keys = ON; CREATE TABLE "actor" ( "aid" int, "gender" text, "name" text, "nationality" text, "birth_city" text, "birth_year" int, primary key("aid") ); CREATE TABLE "copyright" ( "id" int, "msid" int, "cid" int, primary key("id") ); 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") ); CREATE TABLE "genre" ( "gid" int, "genre" text, primary key("gid") ); CREATE TABLE "classification" ( "id" int, "msid" int, "gid" int, primary key("id"), foreign key("gid") references `genre`("gid"), foreign key("msid") references `copyright`("msid") ); CREATE TABLE "company" ( "id" int, "name" text, "country_code" text, primary key("id") ); CREATE TABLE "director" ( "did" int, "gender" text, "name" text, "nationality" text, "birth_city" text, "birth_year" int, primary key("did") ); CREATE TABLE "producer" ( "pid" int, "gender" text, "name" text, "nationality" text, "birth_city" text, "birth_year" int, primary key("pid") ); 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") ); CREATE TABLE "keyword" ( "id" int, "keyword" text, primary key("id") ); 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") ); CREATE TABLE "movie" ( "mid" int, "title" text, "release_year" int, "title_aka" text, "budget" text, primary key("mid") ); CREATE TABLE "tags" ( "id" int, "msid" int, "kid" int, primary key("id"), foreign key("msid") references `copyright`("msid"), foreign key("kid") references `keyword`("kid") ); 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") ); CREATE TABLE "writer" ( "wid" int, "gender" text, "name" int, "nationality" int, "num_of_episodes" int, "birth_city" text, "birth_year" int, primary key("wid") ); CREATE TABLE "written_by" ( "id" int, "msid" int, "wid" int, foreign key("msid") references `copyright`("msid"), foreign key("wid") references `writer`("wid") );
imdb
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";
Who is the director of the tv series " House of Cards " from 2013 ?
PRAGMA foreign_keys = ON; CREATE TABLE "actor" ( "aid" int, "gender" text, "name" text, "nationality" text, "birth_city" text, "birth_year" int, primary key("aid") ); CREATE TABLE "copyright" ( "id" int, "msid" int, "cid" int, primary key("id") ); 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") ); CREATE TABLE "genre" ( "gid" int, "genre" text, primary key("gid") ); CREATE TABLE "classification" ( "id" int, "msid" int, "gid" int, primary key("id"), foreign key("gid") references `genre`("gid"), foreign key("msid") references `copyright`("msid") ); CREATE TABLE "company" ( "id" int, "name" text, "country_code" text, primary key("id") ); CREATE TABLE "director" ( "did" int, "gender" text, "name" text, "nationality" text, "birth_city" text, "birth_year" int, primary key("did") ); CREATE TABLE "producer" ( "pid" int, "gender" text, "name" text, "nationality" text, "birth_city" text, "birth_year" int, primary key("pid") ); 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") ); CREATE TABLE "keyword" ( "id" int, "keyword" text, primary key("id") ); 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") ); CREATE TABLE "movie" ( "mid" int, "title" text, "release_year" int, "title_aka" text, "budget" text, primary key("mid") ); CREATE TABLE "tags" ( "id" int, "msid" int, "kid" int, primary key("id"), foreign key("msid") references `copyright`("msid"), foreign key("kid") references `keyword`("kid") ); 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") ); CREATE TABLE "writer" ( "wid" int, "gender" text, "name" int, "nationality" int, "num_of_episodes" int, "birth_city" text, "birth_year" int, primary key("wid") ); CREATE TABLE "written_by" ( "id" int, "msid" int, "wid" int, foreign key("msid") references `copyright`("msid"), foreign key("wid") references `writer`("wid") );
imdb
SELECT name FROM actor WHERE birth_city = "Austin" AND gender = "female";
Find all the female actors from Austin
PRAGMA foreign_keys = ON; CREATE TABLE "actor" ( "aid" int, "gender" text, "name" text, "nationality" text, "birth_city" text, "birth_year" int, primary key("aid") ); CREATE TABLE "copyright" ( "id" int, "msid" int, "cid" int, primary key("id") ); 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") ); CREATE TABLE "genre" ( "gid" int, "genre" text, primary key("gid") ); CREATE TABLE "classification" ( "id" int, "msid" int, "gid" int, primary key("id"), foreign key("gid") references `genre`("gid"), foreign key("msid") references `copyright`("msid") ); CREATE TABLE "company" ( "id" int, "name" text, "country_code" text, primary key("id") ); CREATE TABLE "director" ( "did" int, "gender" text, "name" text, "nationality" text, "birth_city" text, "birth_year" int, primary key("did") ); CREATE TABLE "producer" ( "pid" int, "gender" text, "name" text, "nationality" text, "birth_city" text, "birth_year" int, primary key("pid") ); 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") ); CREATE TABLE "keyword" ( "id" int, "keyword" text, primary key("id") ); 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") ); CREATE TABLE "movie" ( "mid" int, "title" text, "release_year" int, "title_aka" text, "budget" text, primary key("mid") ); CREATE TABLE "tags" ( "id" int, "msid" int, "kid" int, primary key("id"), foreign key("msid") references `copyright`("msid"), foreign key("kid") references `keyword`("kid") ); 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") ); CREATE TABLE "writer" ( "wid" int, "gender" text, "name" int, "nationality" int, "num_of_episodes" int, "birth_city" text, "birth_year" int, primary key("wid") ); CREATE TABLE "written_by" ( "id" int, "msid" int, "wid" int, foreign key("msid") references `copyright`("msid"), foreign key("wid") references `writer`("wid") );
imdb
SELECT name FROM actor WHERE birth_year > 1980 AND nationality = "Italy";
Find all actors from Italy born after 1980
PRAGMA foreign_keys = ON; CREATE TABLE "actor" ( "aid" int, "gender" text, "name" text, "nationality" text, "birth_city" text, "birth_year" int, primary key("aid") ); CREATE TABLE "copyright" ( "id" int, "msid" int, "cid" int, primary key("id") ); 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") ); CREATE TABLE "genre" ( "gid" int, "genre" text, primary key("gid") ); CREATE TABLE "classification" ( "id" int, "msid" int, "gid" int, primary key("id"), foreign key("gid") references `genre`("gid"), foreign key("msid") references `copyright`("msid") ); CREATE TABLE "company" ( "id" int, "name" text, "country_code" text, primary key("id") ); CREATE TABLE "director" ( "did" int, "gender" text, "name" text, "nationality" text, "birth_city" text, "birth_year" int, primary key("did") ); CREATE TABLE "producer" ( "pid" int, "gender" text, "name" text, "nationality" text, "birth_city" text, "birth_year" int, primary key("pid") ); 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") ); CREATE TABLE "keyword" ( "id" int, "keyword" text, primary key("id") ); 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") ); CREATE TABLE "movie" ( "mid" int, "title" text, "release_year" int, "title_aka" text, "budget" text, primary key("mid") ); CREATE TABLE "tags" ( "id" int, "msid" int, "kid" int, primary key("id"), foreign key("msid") references `copyright`("msid"), foreign key("kid") references `keyword`("kid") ); 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") ); CREATE TABLE "writer" ( "wid" int, "gender" text, "name" int, "nationality" int, "num_of_episodes" int, "birth_city" text, "birth_year" int, primary key("wid") ); CREATE TABLE "written_by" ( "id" int, "msid" int, "wid" int, foreign key("msid") references `copyright`("msid"), foreign key("wid") references `writer`("wid") );