db_name
stringclasses
146 values
prompt
stringlengths
310
4.81k
imdb
### Complete SQL query only and with no explanation ### SQL tables followed by foreign key information: # # actor ( aid, gender, name, nationality, birth_city, birth_year ) # copyright ( id, msid, cid ) # cast ( id, msid, aid, role ) # genre ( gid, genre ) # classification ( id, msid, gid ) # company ( id, name, country_code ) # director ( did, gender, name, nationality, birth_city, birth_year ) # producer ( pid, gender, name, nationality, birth_city, birth_year ) # directed_by ( id, msid, did ) # keyword ( id, keyword ) # made_by ( id, msid, pid ) # movie ( mid, title, release_year, title_aka, budget ) # tags ( id, msid, kid ) # tv_series ( sid, title, release_year, num_of_seasons, num_of_episodes, title_aka, budget ) # writer ( wid, gender, name, nationality, num_of_episodes, birth_city, birth_year ) # written_by ( id, msid, wid ) # # cast.msid can be joined with copyright.msid # cast.aid can be joined with actor.aid # classification.msid can be joined with copyright.msid # classification.gid can be joined with genre.gid # directed_by.did can be joined with director.did # directed_by.msid can be joined with copyright.msid # made_by.pid can be joined with producer.pid # made_by.msid can be joined with copyright.msid # tags.msid can be joined with copyright.msid # written_by.wid can be joined with writer.wid # written_by.msid can be joined with copyright.msid # ### Question: # # What is the number of actors in the movie " Saving Private Ryan " ? # ### SQL: # # SELECT COUNT ( DISTINCT t1.name ) FROM CAST AS t2 JOIN actor AS t1 ON t2.aid = t1.aid JOIN movie AS t3 ON t3.mid = t2.msid WHERE t3.title = "Saving Private Ryan"; # ### End.
imdb
### Complete SQL query only and with no explanation ### SQL tables followed by foreign key information: # # actor ( aid, gender, name, nationality, birth_city, birth_year ) # copyright ( id, msid, cid ) # cast ( id, msid, aid, role ) # genre ( gid, genre ) # classification ( id, msid, gid ) # company ( id, name, country_code ) # director ( did, gender, name, nationality, birth_city, birth_year ) # producer ( pid, gender, name, nationality, birth_city, birth_year ) # directed_by ( id, msid, did ) # keyword ( id, keyword ) # made_by ( id, msid, pid ) # movie ( mid, title, release_year, title_aka, budget ) # tags ( id, msid, kid ) # tv_series ( sid, title, release_year, num_of_seasons, num_of_episodes, title_aka, budget ) # writer ( wid, gender, name, nationality, num_of_episodes, birth_city, birth_year ) # written_by ( id, msid, wid ) # # cast.msid can be joined with copyright.msid # cast.aid can be joined with actor.aid # classification.msid can be joined with copyright.msid # classification.gid can be joined with genre.gid # directed_by.did can be joined with director.did # directed_by.msid can be joined with copyright.msid # made_by.pid can be joined with producer.pid # made_by.msid can be joined with copyright.msid # tags.msid can be joined with copyright.msid # written_by.wid can be joined with writer.wid # written_by.msid can be joined with copyright.msid # ### Question: # # How many actors are in the movie " Saving Private Ryan " ? # ### SQL: # # SELECT COUNT ( DISTINCT t1.name ) FROM CAST AS t2 JOIN actor AS t1 ON t2.aid = t1.aid JOIN movie AS t3 ON t3.mid = t2.msid WHERE t3.title = "Saving Private Ryan"; # ### End.
imdb
### Complete SQL query only and with no explanation ### SQL tables followed by foreign key information: # # actor ( aid, gender, name, nationality, birth_city, birth_year ) # copyright ( id, msid, cid ) # cast ( id, msid, aid, role ) # genre ( gid, genre ) # classification ( id, msid, gid ) # company ( id, name, country_code ) # director ( did, gender, name, nationality, birth_city, birth_year ) # producer ( pid, gender, name, nationality, birth_city, birth_year ) # directed_by ( id, msid, did ) # keyword ( id, keyword ) # made_by ( id, msid, pid ) # movie ( mid, title, release_year, title_aka, budget ) # tags ( id, msid, kid ) # tv_series ( sid, title, release_year, num_of_seasons, num_of_episodes, title_aka, budget ) # writer ( wid, gender, name, nationality, num_of_episodes, birth_city, birth_year ) # written_by ( id, msid, wid ) # # cast.msid can be joined with copyright.msid # cast.aid can be joined with actor.aid # classification.msid can be joined with copyright.msid # classification.gid can be joined with genre.gid # directed_by.did can be joined with director.did # directed_by.msid can be joined with copyright.msid # made_by.pid can be joined with producer.pid # made_by.msid can be joined with copyright.msid # tags.msid can be joined with copyright.msid # written_by.wid can be joined with writer.wid # written_by.msid can be joined with copyright.msid # ### Question: # # How many movies did " Steven Spielberg " direct ? # ### SQL: # # SELECT COUNT ( DISTINCT t3.title ) FROM director AS t2 JOIN directed_by AS t1 ON t2.did = t1.did JOIN movie AS t3 ON t3.mid = t1.msid WHERE t2.name = "Steven Spielberg"; # ### End.
imdb
### Complete SQL query only and with no explanation ### SQL tables followed by foreign key information: # # actor ( aid, gender, name, nationality, birth_city, birth_year ) # copyright ( id, msid, cid ) # cast ( id, msid, aid, role ) # genre ( gid, genre ) # classification ( id, msid, gid ) # company ( id, name, country_code ) # director ( did, gender, name, nationality, birth_city, birth_year ) # producer ( pid, gender, name, nationality, birth_city, birth_year ) # directed_by ( id, msid, did ) # keyword ( id, keyword ) # made_by ( id, msid, pid ) # movie ( mid, title, release_year, title_aka, budget ) # tags ( id, msid, kid ) # tv_series ( sid, title, release_year, num_of_seasons, num_of_episodes, title_aka, budget ) # writer ( wid, gender, name, nationality, num_of_episodes, birth_city, birth_year ) # written_by ( id, msid, wid ) # # cast.msid can be joined with copyright.msid # cast.aid can be joined with actor.aid # classification.msid can be joined with copyright.msid # classification.gid can be joined with genre.gid # directed_by.did can be joined with director.did # directed_by.msid can be joined with copyright.msid # made_by.pid can be joined with producer.pid # made_by.msid can be joined with copyright.msid # tags.msid can be joined with copyright.msid # written_by.wid can be joined with writer.wid # written_by.msid can be joined with copyright.msid # ### Question: # # How many movies were produced in the year 2013 ? # ### SQL: # # SELECT COUNT ( DISTINCT title ) FROM movie WHERE release_year = 2013; # ### End.
imdb
### Complete SQL query only and with no explanation ### SQL tables followed by foreign key information: # # actor ( aid, gender, name, nationality, birth_city, birth_year ) # copyright ( id, msid, cid ) # cast ( id, msid, aid, role ) # genre ( gid, genre ) # classification ( id, msid, gid ) # company ( id, name, country_code ) # director ( did, gender, name, nationality, birth_city, birth_year ) # producer ( pid, gender, name, nationality, birth_city, birth_year ) # directed_by ( id, msid, did ) # keyword ( id, keyword ) # made_by ( id, msid, pid ) # movie ( mid, title, release_year, title_aka, budget ) # tags ( id, msid, kid ) # tv_series ( sid, title, release_year, num_of_seasons, num_of_episodes, title_aka, budget ) # writer ( wid, gender, name, nationality, num_of_episodes, birth_city, birth_year ) # written_by ( id, msid, wid ) # # cast.msid can be joined with copyright.msid # cast.aid can be joined with actor.aid # classification.msid can be joined with copyright.msid # classification.gid can be joined with genre.gid # directed_by.did can be joined with director.did # directed_by.msid can be joined with copyright.msid # made_by.pid can be joined with producer.pid # made_by.msid can be joined with copyright.msid # tags.msid can be joined with copyright.msid # written_by.wid can be joined with writer.wid # written_by.msid can be joined with copyright.msid # ### Question: # # What is the number of movies produced in 2013 ? # ### SQL: # # SELECT COUNT ( DISTINCT title ) FROM movie WHERE release_year = 2013; # ### End.
imdb
### Complete SQL query only and with no explanation ### SQL tables followed by foreign key information: # # actor ( aid, gender, name, nationality, birth_city, birth_year ) # copyright ( id, msid, cid ) # cast ( id, msid, aid, role ) # genre ( gid, genre ) # classification ( id, msid, gid ) # company ( id, name, country_code ) # director ( did, gender, name, nationality, birth_city, birth_year ) # producer ( pid, gender, name, nationality, birth_city, birth_year ) # directed_by ( id, msid, did ) # keyword ( id, keyword ) # made_by ( id, msid, pid ) # movie ( mid, title, release_year, title_aka, budget ) # tags ( id, msid, kid ) # tv_series ( sid, title, release_year, num_of_seasons, num_of_episodes, title_aka, budget ) # writer ( wid, gender, name, nationality, num_of_episodes, birth_city, birth_year ) # written_by ( id, msid, wid ) # # cast.msid can be joined with copyright.msid # cast.aid can be joined with actor.aid # classification.msid can be joined with copyright.msid # classification.gid can be joined with genre.gid # directed_by.did can be joined with director.did # directed_by.msid can be joined with copyright.msid # made_by.pid can be joined with producer.pid # made_by.msid can be joined with copyright.msid # tags.msid can be joined with copyright.msid # written_by.wid can be joined with writer.wid # written_by.msid can be joined with copyright.msid # ### Question: # # What is the number of movies directed by " Woody Allen " per year ? # ### SQL: # # SELECT COUNT ( DISTINCT t3.title ) , t3.release_year FROM director AS t2 JOIN directed_by AS t1 ON t2.did = t1.did JOIN movie AS t3 ON t3.mid = t1.msid WHERE t2.name = "Woody Allen" GROUP BY t3.release_year; # ### End.
imdb
### Complete SQL query only and with no explanation ### SQL tables followed by foreign key information: # # actor ( aid, gender, name, nationality, birth_city, birth_year ) # copyright ( id, msid, cid ) # cast ( id, msid, aid, role ) # genre ( gid, genre ) # classification ( id, msid, gid ) # company ( id, name, country_code ) # director ( did, gender, name, nationality, birth_city, birth_year ) # producer ( pid, gender, name, nationality, birth_city, birth_year ) # directed_by ( id, msid, did ) # keyword ( id, keyword ) # made_by ( id, msid, pid ) # movie ( mid, title, release_year, title_aka, budget ) # tags ( id, msid, kid ) # tv_series ( sid, title, release_year, num_of_seasons, num_of_episodes, title_aka, budget ) # writer ( wid, gender, name, nationality, num_of_episodes, birth_city, birth_year ) # written_by ( id, msid, wid ) # # cast.msid can be joined with copyright.msid # cast.aid can be joined with actor.aid # classification.msid can be joined with copyright.msid # classification.gid can be joined with genre.gid # directed_by.did can be joined with director.did # directed_by.msid can be joined with copyright.msid # made_by.pid can be joined with producer.pid # made_by.msid can be joined with copyright.msid # tags.msid can be joined with copyright.msid # written_by.wid can be joined with writer.wid # written_by.msid can be joined with copyright.msid # ### Question: # # How many movies did " Shahab Hosseini " act in ? # ### SQL: # # SELECT COUNT ( DISTINCT t2.title ) FROM CAST AS t3 JOIN actor AS t1 ON t3.aid = t1.aid JOIN movie AS t2 ON t2.mid = t3.msid WHERE t1.name = "Shahab Hosseini"; # ### End.
imdb
### Complete SQL query only and with no explanation ### SQL tables followed by foreign key information: # # actor ( aid, gender, name, nationality, birth_city, birth_year ) # copyright ( id, msid, cid ) # cast ( id, msid, aid, role ) # genre ( gid, genre ) # classification ( id, msid, gid ) # company ( id, name, country_code ) # director ( did, gender, name, nationality, birth_city, birth_year ) # producer ( pid, gender, name, nationality, birth_city, birth_year ) # directed_by ( id, msid, did ) # keyword ( id, keyword ) # made_by ( id, msid, pid ) # movie ( mid, title, release_year, title_aka, budget ) # tags ( id, msid, kid ) # tv_series ( sid, title, release_year, num_of_seasons, num_of_episodes, title_aka, budget ) # writer ( wid, gender, name, nationality, num_of_episodes, birth_city, birth_year ) # written_by ( id, msid, wid ) # # cast.msid can be joined with copyright.msid # cast.aid can be joined with actor.aid # classification.msid can be joined with copyright.msid # classification.gid can be joined with genre.gid # directed_by.did can be joined with director.did # directed_by.msid can be joined with copyright.msid # made_by.pid can be joined with producer.pid # made_by.msid can be joined with copyright.msid # tags.msid can be joined with copyright.msid # written_by.wid can be joined with writer.wid # written_by.msid can be joined with copyright.msid # ### Question: # # What is the number of movies in which " Shahab Hosseini " acted ? # ### SQL: # # SELECT COUNT ( DISTINCT t2.title ) FROM CAST AS t3 JOIN actor AS t1 ON t3.aid = t1.aid JOIN movie AS t2 ON t2.mid = t3.msid WHERE t1.name = "Shahab Hosseini"; # ### End.
imdb
### Complete SQL query only and with no explanation ### SQL tables followed by foreign key information: # # actor ( aid, gender, name, nationality, birth_city, birth_year ) # copyright ( id, msid, cid ) # cast ( id, msid, aid, role ) # genre ( gid, genre ) # classification ( id, msid, gid ) # company ( id, name, country_code ) # director ( did, gender, name, nationality, birth_city, birth_year ) # producer ( pid, gender, name, nationality, birth_city, birth_year ) # directed_by ( id, msid, did ) # keyword ( id, keyword ) # made_by ( id, msid, pid ) # movie ( mid, title, release_year, title_aka, budget ) # tags ( id, msid, kid ) # tv_series ( sid, title, release_year, num_of_seasons, num_of_episodes, title_aka, budget ) # writer ( wid, gender, name, nationality, num_of_episodes, birth_city, birth_year ) # written_by ( id, msid, wid ) # # cast.msid can be joined with copyright.msid # cast.aid can be joined with actor.aid # classification.msid can be joined with copyright.msid # classification.gid can be joined with genre.gid # directed_by.did can be joined with director.did # directed_by.msid can be joined with copyright.msid # made_by.pid can be joined with producer.pid # made_by.msid can be joined with copyright.msid # tags.msid can be joined with copyright.msid # written_by.wid can be joined with writer.wid # written_by.msid can be joined with copyright.msid # ### Question: # # What is the number of movies featuring " Shahab Hosseini " ? # ### SQL: # # SELECT COUNT ( DISTINCT t2.title ) FROM CAST AS t3 JOIN actor AS t1 ON t3.aid = t1.aid JOIN movie AS t2 ON t2.mid = t3.msid WHERE t1.name = "Shahab Hosseini"; # ### End.
imdb
### Complete SQL query only and with no explanation ### SQL tables followed by foreign key information: # # actor ( aid, gender, name, nationality, birth_city, birth_year ) # copyright ( id, msid, cid ) # cast ( id, msid, aid, role ) # genre ( gid, genre ) # classification ( id, msid, gid ) # company ( id, name, country_code ) # director ( did, gender, name, nationality, birth_city, birth_year ) # producer ( pid, gender, name, nationality, birth_city, birth_year ) # directed_by ( id, msid, did ) # keyword ( id, keyword ) # made_by ( id, msid, pid ) # movie ( mid, title, release_year, title_aka, budget ) # tags ( id, msid, kid ) # tv_series ( sid, title, release_year, num_of_seasons, num_of_episodes, title_aka, budget ) # writer ( wid, gender, name, nationality, num_of_episodes, birth_city, birth_year ) # written_by ( id, msid, wid ) # # cast.msid can be joined with copyright.msid # cast.aid can be joined with actor.aid # classification.msid can be joined with copyright.msid # classification.gid can be joined with genre.gid # directed_by.did can be joined with director.did # directed_by.msid can be joined with copyright.msid # made_by.pid can be joined with producer.pid # made_by.msid can be joined with copyright.msid # tags.msid can be joined with copyright.msid # written_by.wid can be joined with writer.wid # written_by.msid can be joined with copyright.msid # ### Question: # # How many movies did " Shahab Hosseini " act in # ### SQL: # # SELECT COUNT ( DISTINCT t2.title ) FROM CAST AS t3 JOIN actor AS t1 ON t3.aid = t1.aid JOIN movie AS t2 ON t2.mid = t3.msid WHERE t1.name = "Shahab Hosseini"; # ### End.
imdb
### Complete SQL query only and with no explanation ### SQL tables followed by foreign key information: # # actor ( aid, gender, name, nationality, birth_city, birth_year ) # copyright ( id, msid, cid ) # cast ( id, msid, aid, role ) # genre ( gid, genre ) # classification ( id, msid, gid ) # company ( id, name, country_code ) # director ( did, gender, name, nationality, birth_city, birth_year ) # producer ( pid, gender, name, nationality, birth_city, birth_year ) # directed_by ( id, msid, did ) # keyword ( id, keyword ) # made_by ( id, msid, pid ) # movie ( mid, title, release_year, title_aka, budget ) # tags ( id, msid, kid ) # tv_series ( sid, title, release_year, num_of_seasons, num_of_episodes, title_aka, budget ) # writer ( wid, gender, name, nationality, num_of_episodes, birth_city, birth_year ) # written_by ( id, msid, wid ) # # cast.msid can be joined with copyright.msid # cast.aid can be joined with actor.aid # classification.msid can be joined with copyright.msid # classification.gid can be joined with genre.gid # directed_by.did can be joined with director.did # directed_by.msid can be joined with copyright.msid # made_by.pid can be joined with producer.pid # made_by.msid can be joined with copyright.msid # tags.msid can be joined with copyright.msid # written_by.wid can be joined with writer.wid # written_by.msid can be joined with copyright.msid # ### Question: # # How many actors were born in " Los Angeles " after 2000 ? # ### SQL: # # SELECT COUNT ( DISTINCT name ) FROM actor WHERE birth_city = "Los Angeles" AND birth_year > 2000; # ### End.
imdb
### Complete SQL query only and with no explanation ### SQL tables followed by foreign key information: # # actor ( aid, gender, name, nationality, birth_city, birth_year ) # copyright ( id, msid, cid ) # cast ( id, msid, aid, role ) # genre ( gid, genre ) # classification ( id, msid, gid ) # company ( id, name, country_code ) # director ( did, gender, name, nationality, birth_city, birth_year ) # producer ( pid, gender, name, nationality, birth_city, birth_year ) # directed_by ( id, msid, did ) # keyword ( id, keyword ) # made_by ( id, msid, pid ) # movie ( mid, title, release_year, title_aka, budget ) # tags ( id, msid, kid ) # tv_series ( sid, title, release_year, num_of_seasons, num_of_episodes, title_aka, budget ) # writer ( wid, gender, name, nationality, num_of_episodes, birth_city, birth_year ) # written_by ( id, msid, wid ) # # cast.msid can be joined with copyright.msid # cast.aid can be joined with actor.aid # classification.msid can be joined with copyright.msid # classification.gid can be joined with genre.gid # directed_by.did can be joined with director.did # directed_by.msid can be joined with copyright.msid # made_by.pid can be joined with producer.pid # made_by.msid can be joined with copyright.msid # tags.msid can be joined with copyright.msid # written_by.wid can be joined with writer.wid # written_by.msid can be joined with copyright.msid # ### Question: # # How many movies did " Humphrey Bogart " act in before 1942 ? # ### SQL: # # SELECT COUNT ( DISTINCT t2.title ) FROM CAST AS t3 JOIN actor AS t1 ON t3.aid = t1.aid JOIN movie AS t2 ON t2.mid = t3.msid WHERE t1.name = "Humphrey Bogart" AND t2.release_year < 1942; # ### End.
imdb
### Complete SQL query only and with no explanation ### SQL tables followed by foreign key information: # # actor ( aid, gender, name, nationality, birth_city, birth_year ) # copyright ( id, msid, cid ) # cast ( id, msid, aid, role ) # genre ( gid, genre ) # classification ( id, msid, gid ) # company ( id, name, country_code ) # director ( did, gender, name, nationality, birth_city, birth_year ) # producer ( pid, gender, name, nationality, birth_city, birth_year ) # directed_by ( id, msid, did ) # keyword ( id, keyword ) # made_by ( id, msid, pid ) # movie ( mid, title, release_year, title_aka, budget ) # tags ( id, msid, kid ) # tv_series ( sid, title, release_year, num_of_seasons, num_of_episodes, title_aka, budget ) # writer ( wid, gender, name, nationality, num_of_episodes, birth_city, birth_year ) # written_by ( id, msid, wid ) # # cast.msid can be joined with copyright.msid # cast.aid can be joined with actor.aid # classification.msid can be joined with copyright.msid # classification.gid can be joined with genre.gid # directed_by.did can be joined with director.did # directed_by.msid can be joined with copyright.msid # made_by.pid can be joined with producer.pid # made_by.msid can be joined with copyright.msid # tags.msid can be joined with copyright.msid # written_by.wid can be joined with writer.wid # written_by.msid can be joined with copyright.msid # ### Question: # # What is the number of movies that " Brad Pitt " acts in per year ? # ### SQL: # # SELECT COUNT ( DISTINCT t2.title ) , t2.release_year FROM CAST AS t3 JOIN actor AS t1 ON t3.aid = t1.aid JOIN movie AS t2 ON t2.mid = t3.msid WHERE t1.name = "Brad Pitt" GROUP BY t2.release_year; # ### End.
imdb
### Complete SQL query only and with no explanation ### SQL tables followed by foreign key information: # # actor ( aid, gender, name, nationality, birth_city, birth_year ) # copyright ( id, msid, cid ) # cast ( id, msid, aid, role ) # genre ( gid, genre ) # classification ( id, msid, gid ) # company ( id, name, country_code ) # director ( did, gender, name, nationality, birth_city, birth_year ) # producer ( pid, gender, name, nationality, birth_city, birth_year ) # directed_by ( id, msid, did ) # keyword ( id, keyword ) # made_by ( id, msid, pid ) # movie ( mid, title, release_year, title_aka, budget ) # tags ( id, msid, kid ) # tv_series ( sid, title, release_year, num_of_seasons, num_of_episodes, title_aka, budget ) # writer ( wid, gender, name, nationality, num_of_episodes, birth_city, birth_year ) # written_by ( id, msid, wid ) # # cast.msid can be joined with copyright.msid # cast.aid can be joined with actor.aid # classification.msid can be joined with copyright.msid # classification.gid can be joined with genre.gid # directed_by.did can be joined with director.did # directed_by.msid can be joined with copyright.msid # made_by.pid can be joined with producer.pid # made_by.msid can be joined with copyright.msid # tags.msid can be joined with copyright.msid # written_by.wid can be joined with writer.wid # written_by.msid can be joined with copyright.msid # ### Question: # # How many movies about Iraq war were produced in 2015 ? # ### SQL: # # SELECT COUNT ( DISTINCT t3.title ) FROM tags AS t2 JOIN keyword AS t1 ON t2.kid = t1.id JOIN movie AS t3 ON t2.msid = t3.mid WHERE t1.keyword = "Iraq war" AND t3.release_year = 2015; # ### End.
imdb
### Complete SQL query only and with no explanation ### SQL tables followed by foreign key information: # # actor ( aid, gender, name, nationality, birth_city, birth_year ) # copyright ( id, msid, cid ) # cast ( id, msid, aid, role ) # genre ( gid, genre ) # classification ( id, msid, gid ) # company ( id, name, country_code ) # director ( did, gender, name, nationality, birth_city, birth_year ) # producer ( pid, gender, name, nationality, birth_city, birth_year ) # directed_by ( id, msid, did ) # keyword ( id, keyword ) # made_by ( id, msid, pid ) # movie ( mid, title, release_year, title_aka, budget ) # tags ( id, msid, kid ) # tv_series ( sid, title, release_year, num_of_seasons, num_of_episodes, title_aka, budget ) # writer ( wid, gender, name, nationality, num_of_episodes, birth_city, birth_year ) # written_by ( id, msid, wid ) # # cast.msid can be joined with copyright.msid # cast.aid can be joined with actor.aid # classification.msid can be joined with copyright.msid # classification.gid can be joined with genre.gid # directed_by.did can be joined with director.did # directed_by.msid can be joined with copyright.msid # made_by.pid can be joined with producer.pid # made_by.msid can be joined with copyright.msid # tags.msid can be joined with copyright.msid # written_by.wid can be joined with writer.wid # written_by.msid can be joined with copyright.msid # ### Question: # # How many movies about Persians were released after 1990 ? # ### SQL: # # SELECT COUNT ( DISTINCT t3.title ) FROM tags AS t2 JOIN keyword AS t1 ON t2.kid = t1.id JOIN movie AS t3 ON t2.msid = t3.mid WHERE t1.keyword = "Persians" AND t3.release_year > 1990; # ### End.
imdb
### Complete SQL query only and with no explanation ### SQL tables followed by foreign key information: # # actor ( aid, gender, name, nationality, birth_city, birth_year ) # copyright ( id, msid, cid ) # cast ( id, msid, aid, role ) # genre ( gid, genre ) # classification ( id, msid, gid ) # company ( id, name, country_code ) # director ( did, gender, name, nationality, birth_city, birth_year ) # producer ( pid, gender, name, nationality, birth_city, birth_year ) # directed_by ( id, msid, did ) # keyword ( id, keyword ) # made_by ( id, msid, pid ) # movie ( mid, title, release_year, title_aka, budget ) # tags ( id, msid, kid ) # tv_series ( sid, title, release_year, num_of_seasons, num_of_episodes, title_aka, budget ) # writer ( wid, gender, name, nationality, num_of_episodes, birth_city, birth_year ) # written_by ( id, msid, wid ) # # cast.msid can be joined with copyright.msid # cast.aid can be joined with actor.aid # classification.msid can be joined with copyright.msid # classification.gid can be joined with genre.gid # directed_by.did can be joined with director.did # directed_by.msid can be joined with copyright.msid # made_by.pid can be joined with producer.pid # made_by.msid can be joined with copyright.msid # tags.msid can be joined with copyright.msid # written_by.wid can be joined with writer.wid # written_by.msid can be joined with copyright.msid # ### Question: # # How many movies did " Quentin Tarantino " direct after 2010 ? # ### SQL: # # SELECT COUNT ( DISTINCT t3.title ) FROM director AS t2 JOIN directed_by AS t1 ON t2.did = t1.did JOIN movie AS t3 ON t3.mid = t1.msid WHERE t2.name = "Quentin Tarantino" AND t3.release_year > 2010; # ### End.
imdb
### Complete SQL query only and with no explanation ### SQL tables followed by foreign key information: # # actor ( aid, gender, name, nationality, birth_city, birth_year ) # copyright ( id, msid, cid ) # cast ( id, msid, aid, role ) # genre ( gid, genre ) # classification ( id, msid, gid ) # company ( id, name, country_code ) # director ( did, gender, name, nationality, birth_city, birth_year ) # producer ( pid, gender, name, nationality, birth_city, birth_year ) # directed_by ( id, msid, did ) # keyword ( id, keyword ) # made_by ( id, msid, pid ) # movie ( mid, title, release_year, title_aka, budget ) # tags ( id, msid, kid ) # tv_series ( sid, title, release_year, num_of_seasons, num_of_episodes, title_aka, budget ) # writer ( wid, gender, name, nationality, num_of_episodes, birth_city, birth_year ) # written_by ( id, msid, wid ) # # cast.msid can be joined with copyright.msid # cast.aid can be joined with actor.aid # classification.msid can be joined with copyright.msid # classification.gid can be joined with genre.gid # directed_by.did can be joined with director.did # directed_by.msid can be joined with copyright.msid # made_by.pid can be joined with producer.pid # made_by.msid can be joined with copyright.msid # tags.msid can be joined with copyright.msid # written_by.wid can be joined with writer.wid # written_by.msid can be joined with copyright.msid # ### Question: # # How many movies did " Quentin Tarantino " direct before 2010 ? # ### SQL: # # SELECT COUNT ( DISTINCT t3.title ) FROM director AS t2 JOIN directed_by AS t1 ON t2.did = t1.did JOIN movie AS t3 ON t3.mid = t1.msid WHERE t2.name = "Quentin Tarantino" AND t3.release_year < 2010; # ### End.
imdb
### Complete SQL query only and with no explanation ### SQL tables followed by foreign key information: # # actor ( aid, gender, name, nationality, birth_city, birth_year ) # copyright ( id, msid, cid ) # cast ( id, msid, aid, role ) # genre ( gid, genre ) # classification ( id, msid, gid ) # company ( id, name, country_code ) # director ( did, gender, name, nationality, birth_city, birth_year ) # producer ( pid, gender, name, nationality, birth_city, birth_year ) # directed_by ( id, msid, did ) # keyword ( id, keyword ) # made_by ( id, msid, pid ) # movie ( mid, title, release_year, title_aka, budget ) # tags ( id, msid, kid ) # tv_series ( sid, title, release_year, num_of_seasons, num_of_episodes, title_aka, budget ) # writer ( wid, gender, name, nationality, num_of_episodes, birth_city, birth_year ) # written_by ( id, msid, wid ) # # cast.msid can be joined with copyright.msid # cast.aid can be joined with actor.aid # classification.msid can be joined with copyright.msid # classification.gid can be joined with genre.gid # directed_by.did can be joined with director.did # directed_by.msid can be joined with copyright.msid # made_by.pid can be joined with producer.pid # made_by.msid can be joined with copyright.msid # tags.msid can be joined with copyright.msid # written_by.wid can be joined with writer.wid # written_by.msid can be joined with copyright.msid # ### Question: # # How many movies did " Quentin Tarantino " direct before 2002 and after 2010 ? # ### SQL: # # SELECT COUNT ( DISTINCT t4.title ) FROM director AS t3 JOIN directed_by AS t2 ON t3.did = t2.did JOIN movie AS t4 ON t4.mid = t2.msid JOIN made_by AS t5 ON t4.mid = t5.msid JOIN producer AS t1 ON t1.pid = t5.pid WHERE t3.name = "Quentin Tarantino" AND t4.release_year < 2010 AND t4.release_year > 2002; # ### End.
imdb
### Complete SQL query only and with no explanation ### SQL tables followed by foreign key information: # # actor ( aid, gender, name, nationality, birth_city, birth_year ) # copyright ( id, msid, cid ) # cast ( id, msid, aid, role ) # genre ( gid, genre ) # classification ( id, msid, gid ) # company ( id, name, country_code ) # director ( did, gender, name, nationality, birth_city, birth_year ) # producer ( pid, gender, name, nationality, birth_city, birth_year ) # directed_by ( id, msid, did ) # keyword ( id, keyword ) # made_by ( id, msid, pid ) # movie ( mid, title, release_year, title_aka, budget ) # tags ( id, msid, kid ) # tv_series ( sid, title, release_year, num_of_seasons, num_of_episodes, title_aka, budget ) # writer ( wid, gender, name, nationality, num_of_episodes, birth_city, birth_year ) # written_by ( id, msid, wid ) # # cast.msid can be joined with copyright.msid # cast.aid can be joined with actor.aid # classification.msid can be joined with copyright.msid # classification.gid can be joined with genre.gid # directed_by.did can be joined with director.did # directed_by.msid can be joined with copyright.msid # made_by.pid can be joined with producer.pid # made_by.msid can be joined with copyright.msid # tags.msid can be joined with copyright.msid # written_by.wid can be joined with writer.wid # written_by.msid can be joined with copyright.msid # ### Question: # # How many female actors were born in " New York City " after 1980 ? # ### SQL: # # SELECT COUNT ( DISTINCT name ) FROM actor WHERE birth_city = "New York City" AND birth_year > 1980 AND gender = "female"; # ### End.
imdb
### Complete SQL query only and with no explanation ### SQL tables followed by foreign key information: # # actor ( aid, gender, name, nationality, birth_city, birth_year ) # copyright ( id, msid, cid ) # cast ( id, msid, aid, role ) # genre ( gid, genre ) # classification ( id, msid, gid ) # company ( id, name, country_code ) # director ( did, gender, name, nationality, birth_city, birth_year ) # producer ( pid, gender, name, nationality, birth_city, birth_year ) # directed_by ( id, msid, did ) # keyword ( id, keyword ) # made_by ( id, msid, pid ) # movie ( mid, title, release_year, title_aka, budget ) # tags ( id, msid, kid ) # tv_series ( sid, title, release_year, num_of_seasons, num_of_episodes, title_aka, budget ) # writer ( wid, gender, name, nationality, num_of_episodes, birth_city, birth_year ) # written_by ( id, msid, wid ) # # cast.msid can be joined with copyright.msid # cast.aid can be joined with actor.aid # classification.msid can be joined with copyright.msid # classification.gid can be joined with genre.gid # directed_by.did can be joined with director.did # directed_by.msid can be joined with copyright.msid # made_by.pid can be joined with producer.pid # made_by.msid can be joined with copyright.msid # tags.msid can be joined with copyright.msid # written_by.wid can be joined with writer.wid # written_by.msid can be joined with copyright.msid # ### Question: # # find the number of actors from Iran who played in " Jim Jarmusch " movies # ### SQL: # # SELECT COUNT ( DISTINCT t1.name ) FROM CAST AS t4 JOIN actor AS t1 ON t4.aid = t1.aid JOIN movie AS t5 ON t5.mid = t4.msid JOIN directed_by AS t2 ON t5.mid = t2.msid JOIN director AS t3 ON t3.did = t2.did WHERE t1.nationality = "Iran" AND t3.name = "Jim Jarmusch"; # ### End.
imdb
### Complete SQL query only and with no explanation ### SQL tables followed by foreign key information: # # actor ( aid, gender, name, nationality, birth_city, birth_year ) # copyright ( id, msid, cid ) # cast ( id, msid, aid, role ) # genre ( gid, genre ) # classification ( id, msid, gid ) # company ( id, name, country_code ) # director ( did, gender, name, nationality, birth_city, birth_year ) # producer ( pid, gender, name, nationality, birth_city, birth_year ) # directed_by ( id, msid, did ) # keyword ( id, keyword ) # made_by ( id, msid, pid ) # movie ( mid, title, release_year, title_aka, budget ) # tags ( id, msid, kid ) # tv_series ( sid, title, release_year, num_of_seasons, num_of_episodes, title_aka, budget ) # writer ( wid, gender, name, nationality, num_of_episodes, birth_city, birth_year ) # written_by ( id, msid, wid ) # # cast.msid can be joined with copyright.msid # cast.aid can be joined with actor.aid # classification.msid can be joined with copyright.msid # classification.gid can be joined with genre.gid # directed_by.did can be joined with director.did # directed_by.msid can be joined with copyright.msid # made_by.pid can be joined with producer.pid # made_by.msid can be joined with copyright.msid # tags.msid can be joined with copyright.msid # written_by.wid can be joined with writer.wid # written_by.msid can be joined with copyright.msid # ### Question: # # How many actors from China have acted in " Rush Hour 3 " # ### SQL: # # SELECT COUNT ( DISTINCT t1.name ) FROM CAST AS t2 JOIN actor AS t1 ON t2.aid = t1.aid JOIN movie AS t3 ON t3.mid = t2.msid WHERE t1.nationality = "China" AND t3.title = "Rush Hour 3"; # ### End.
imdb
### Complete SQL query only and with no explanation ### SQL tables followed by foreign key information: # # actor ( aid, gender, name, nationality, birth_city, birth_year ) # copyright ( id, msid, cid ) # cast ( id, msid, aid, role ) # genre ( gid, genre ) # classification ( id, msid, gid ) # company ( id, name, country_code ) # director ( did, gender, name, nationality, birth_city, birth_year ) # producer ( pid, gender, name, nationality, birth_city, birth_year ) # directed_by ( id, msid, did ) # keyword ( id, keyword ) # made_by ( id, msid, pid ) # movie ( mid, title, release_year, title_aka, budget ) # tags ( id, msid, kid ) # tv_series ( sid, title, release_year, num_of_seasons, num_of_episodes, title_aka, budget ) # writer ( wid, gender, name, nationality, num_of_episodes, birth_city, birth_year ) # written_by ( id, msid, wid ) # # cast.msid can be joined with copyright.msid # cast.aid can be joined with actor.aid # classification.msid can be joined with copyright.msid # classification.gid can be joined with genre.gid # directed_by.did can be joined with director.did # directed_by.msid can be joined with copyright.msid # made_by.pid can be joined with producer.pid # made_by.msid can be joined with copyright.msid # tags.msid can be joined with copyright.msid # written_by.wid can be joined with writer.wid # written_by.msid can be joined with copyright.msid # ### Question: # # Find all movies that star both " Woody Strode " and " Jason Robards " # ### SQL: # # SELECT t4.title FROM CAST AS t5 JOIN actor AS t1 ON t5.aid = t1.aid JOIN movie AS t4 ON t4.mid = t5.msid JOIN CAST AS t3 ON t4.mid = t3.msid JOIN actor AS t2 ON t3.aid = t2.aid WHERE t1.name = "Woody Strode" AND t2.name = "Jason Robards"; # ### End.
imdb
### Complete SQL query only and with no explanation ### SQL tables followed by foreign key information: # # actor ( aid, gender, name, nationality, birth_city, birth_year ) # copyright ( id, msid, cid ) # cast ( id, msid, aid, role ) # genre ( gid, genre ) # classification ( id, msid, gid ) # company ( id, name, country_code ) # director ( did, gender, name, nationality, birth_city, birth_year ) # producer ( pid, gender, name, nationality, birth_city, birth_year ) # directed_by ( id, msid, did ) # keyword ( id, keyword ) # made_by ( id, msid, pid ) # movie ( mid, title, release_year, title_aka, budget ) # tags ( id, msid, kid ) # tv_series ( sid, title, release_year, num_of_seasons, num_of_episodes, title_aka, budget ) # writer ( wid, gender, name, nationality, num_of_episodes, birth_city, birth_year ) # written_by ( id, msid, wid ) # # cast.msid can be joined with copyright.msid # cast.aid can be joined with actor.aid # classification.msid can be joined with copyright.msid # classification.gid can be joined with genre.gid # directed_by.did can be joined with director.did # directed_by.msid can be joined with copyright.msid # made_by.pid can be joined with producer.pid # made_by.msid can be joined with copyright.msid # tags.msid can be joined with copyright.msid # written_by.wid can be joined with writer.wid # written_by.msid can be joined with copyright.msid # ### Question: # # Find all movies featuring " Woody Strode " and " Jason Robards " # ### SQL: # # SELECT t4.title FROM CAST AS t5 JOIN actor AS t1 ON t5.aid = t1.aid JOIN movie AS t4 ON t4.mid = t5.msid JOIN CAST AS t3 ON t4.mid = t3.msid JOIN actor AS t2 ON t3.aid = t2.aid WHERE t1.name = "Woody Strode" AND t2.name = "Jason Robards"; # ### End.
imdb
### Complete SQL query only and with no explanation ### SQL tables followed by foreign key information: # # actor ( aid, gender, name, nationality, birth_city, birth_year ) # copyright ( id, msid, cid ) # cast ( id, msid, aid, role ) # genre ( gid, genre ) # classification ( id, msid, gid ) # company ( id, name, country_code ) # director ( did, gender, name, nationality, birth_city, birth_year ) # producer ( pid, gender, name, nationality, birth_city, birth_year ) # directed_by ( id, msid, did ) # keyword ( id, keyword ) # made_by ( id, msid, pid ) # movie ( mid, title, release_year, title_aka, budget ) # tags ( id, msid, kid ) # tv_series ( sid, title, release_year, num_of_seasons, num_of_episodes, title_aka, budget ) # writer ( wid, gender, name, nationality, num_of_episodes, birth_city, birth_year ) # written_by ( id, msid, wid ) # # cast.msid can be joined with copyright.msid # cast.aid can be joined with actor.aid # classification.msid can be joined with copyright.msid # classification.gid can be joined with genre.gid # directed_by.did can be joined with director.did # directed_by.msid can be joined with copyright.msid # made_by.pid can be joined with producer.pid # made_by.msid can be joined with copyright.msid # tags.msid can be joined with copyright.msid # written_by.wid can be joined with writer.wid # written_by.msid can be joined with copyright.msid # ### Question: # # Find all movies featuring both " Woody Strode " and " Jason Robards " # ### SQL: # # SELECT t4.title FROM CAST AS t5 JOIN actor AS t1 ON t5.aid = t1.aid JOIN movie AS t4 ON t4.mid = t5.msid JOIN CAST AS t3 ON t4.mid = t3.msid JOIN actor AS t2 ON t3.aid = t2.aid WHERE t1.name = "Woody Strode" AND t2.name = "Jason Robards"; # ### End.
imdb
### Complete SQL query only and with no explanation ### SQL tables followed by foreign key information: # # actor ( aid, gender, name, nationality, birth_city, birth_year ) # copyright ( id, msid, cid ) # cast ( id, msid, aid, role ) # genre ( gid, genre ) # classification ( id, msid, gid ) # company ( id, name, country_code ) # director ( did, gender, name, nationality, birth_city, birth_year ) # producer ( pid, gender, name, nationality, birth_city, birth_year ) # directed_by ( id, msid, did ) # keyword ( id, keyword ) # made_by ( id, msid, pid ) # movie ( mid, title, release_year, title_aka, budget ) # tags ( id, msid, kid ) # tv_series ( sid, title, release_year, num_of_seasons, num_of_episodes, title_aka, budget ) # writer ( wid, gender, name, nationality, num_of_episodes, birth_city, birth_year ) # written_by ( id, msid, wid ) # # cast.msid can be joined with copyright.msid # cast.aid can be joined with actor.aid # classification.msid can be joined with copyright.msid # classification.gid can be joined with genre.gid # directed_by.did can be joined with director.did # directed_by.msid can be joined with copyright.msid # made_by.pid can be joined with producer.pid # made_by.msid can be joined with copyright.msid # tags.msid can be joined with copyright.msid # written_by.wid can be joined with writer.wid # written_by.msid can be joined with copyright.msid # ### Question: # # Find all movies featuring " Jason Robards " and " Woody Strode " # ### SQL: # # SELECT t4.title FROM CAST AS t5 JOIN actor AS t1 ON t5.aid = t1.aid JOIN movie AS t4 ON t4.mid = t5.msid JOIN CAST AS t3 ON t4.mid = t3.msid JOIN actor AS t2 ON t3.aid = t2.aid WHERE t1.name = "Woody Strode" AND t2.name = "Jason Robards"; # ### End.
imdb
### Complete SQL query only and with no explanation ### SQL tables followed by foreign key information: # # actor ( aid, gender, name, nationality, birth_city, birth_year ) # copyright ( id, msid, cid ) # cast ( id, msid, aid, role ) # genre ( gid, genre ) # classification ( id, msid, gid ) # company ( id, name, country_code ) # director ( did, gender, name, nationality, birth_city, birth_year ) # producer ( pid, gender, name, nationality, birth_city, birth_year ) # directed_by ( id, msid, did ) # keyword ( id, keyword ) # made_by ( id, msid, pid ) # movie ( mid, title, release_year, title_aka, budget ) # tags ( id, msid, kid ) # tv_series ( sid, title, release_year, num_of_seasons, num_of_episodes, title_aka, budget ) # writer ( wid, gender, name, nationality, num_of_episodes, birth_city, birth_year ) # written_by ( id, msid, wid ) # # cast.msid can be joined with copyright.msid # cast.aid can be joined with actor.aid # classification.msid can be joined with copyright.msid # classification.gid can be joined with genre.gid # directed_by.did can be joined with director.did # directed_by.msid can be joined with copyright.msid # made_by.pid can be joined with producer.pid # made_by.msid can be joined with copyright.msid # tags.msid can be joined with copyright.msid # written_by.wid can be joined with writer.wid # written_by.msid can be joined with copyright.msid # ### Question: # # Find all actors who acted in the same movie as " Tom Hanks " # ### SQL: # # SELECT t1.name FROM CAST AS t4 JOIN actor AS t1 ON t4.aid = t1.aid JOIN movie AS t5 ON t5.mid = t4.msid JOIN CAST AS t3 ON t5.mid = t3.msid JOIN actor AS t2 ON t3.aid = t2.aid WHERE t2.name = "Tom Hanks"; # ### End.
imdb
### Complete SQL query only and with no explanation ### SQL tables followed by foreign key information: # # actor ( aid, gender, name, nationality, birth_city, birth_year ) # copyright ( id, msid, cid ) # cast ( id, msid, aid, role ) # genre ( gid, genre ) # classification ( id, msid, gid ) # company ( id, name, country_code ) # director ( did, gender, name, nationality, birth_city, birth_year ) # producer ( pid, gender, name, nationality, birth_city, birth_year ) # directed_by ( id, msid, did ) # keyword ( id, keyword ) # made_by ( id, msid, pid ) # movie ( mid, title, release_year, title_aka, budget ) # tags ( id, msid, kid ) # tv_series ( sid, title, release_year, num_of_seasons, num_of_episodes, title_aka, budget ) # writer ( wid, gender, name, nationality, num_of_episodes, birth_city, birth_year ) # written_by ( id, msid, wid ) # # cast.msid can be joined with copyright.msid # cast.aid can be joined with actor.aid # classification.msid can be joined with copyright.msid # classification.gid can be joined with genre.gid # directed_by.did can be joined with director.did # directed_by.msid can be joined with copyright.msid # made_by.pid can be joined with producer.pid # made_by.msid can be joined with copyright.msid # tags.msid can be joined with copyright.msid # written_by.wid can be joined with writer.wid # written_by.msid can be joined with copyright.msid # ### Question: # # What movies have the same director as the movie " Revolutionary Road " ? # ### SQL: # # SELECT t3.title FROM director AS t5 JOIN directed_by AS t2 ON t5.did = t2.did JOIN directed_by AS t1 ON t5.did = t1.did JOIN movie AS t4 ON t4.mid = t2.msid JOIN movie AS t3 ON t3.mid = t1.msid WHERE t4.title = "Revolutionary Road"; # ### End.
imdb
### Complete SQL query only and with no explanation ### SQL tables followed by foreign key information: # # actor ( aid, gender, name, nationality, birth_city, birth_year ) # copyright ( id, msid, cid ) # cast ( id, msid, aid, role ) # genre ( gid, genre ) # classification ( id, msid, gid ) # company ( id, name, country_code ) # director ( did, gender, name, nationality, birth_city, birth_year ) # producer ( pid, gender, name, nationality, birth_city, birth_year ) # directed_by ( id, msid, did ) # keyword ( id, keyword ) # made_by ( id, msid, pid ) # movie ( mid, title, release_year, title_aka, budget ) # tags ( id, msid, kid ) # tv_series ( sid, title, release_year, num_of_seasons, num_of_episodes, title_aka, budget ) # writer ( wid, gender, name, nationality, num_of_episodes, birth_city, birth_year ) # written_by ( id, msid, wid ) # # cast.msid can be joined with copyright.msid # cast.aid can be joined with actor.aid # classification.msid can be joined with copyright.msid # classification.gid can be joined with genre.gid # directed_by.did can be joined with director.did # directed_by.msid can be joined with copyright.msid # made_by.pid can be joined with producer.pid # made_by.msid can be joined with copyright.msid # tags.msid can be joined with copyright.msid # written_by.wid can be joined with writer.wid # written_by.msid can be joined with copyright.msid # ### Question: # # Find the movie which is classified in the most number of genres # ### SQL: # # SELECT t3.title FROM genre AS t2 JOIN classification AS t1 ON t2.gid = t1.gid JOIN movie AS t3 ON t3.mid = t1.msid GROUP BY t3.title ORDER BY COUNT ( DISTINCT t2.genre ) DESC LIMIT 1; # ### End.
imdb
### Complete SQL query only and with no explanation ### SQL tables followed by foreign key information: # # actor ( aid, gender, name, nationality, birth_city, birth_year ) # copyright ( id, msid, cid ) # cast ( id, msid, aid, role ) # genre ( gid, genre ) # classification ( id, msid, gid ) # company ( id, name, country_code ) # director ( did, gender, name, nationality, birth_city, birth_year ) # producer ( pid, gender, name, nationality, birth_city, birth_year ) # directed_by ( id, msid, did ) # keyword ( id, keyword ) # made_by ( id, msid, pid ) # movie ( mid, title, release_year, title_aka, budget ) # tags ( id, msid, kid ) # tv_series ( sid, title, release_year, num_of_seasons, num_of_episodes, title_aka, budget ) # writer ( wid, gender, name, nationality, num_of_episodes, birth_city, birth_year ) # written_by ( id, msid, wid ) # # cast.msid can be joined with copyright.msid # cast.aid can be joined with actor.aid # classification.msid can be joined with copyright.msid # classification.gid can be joined with genre.gid # directed_by.did can be joined with director.did # directed_by.msid can be joined with copyright.msid # made_by.pid can be joined with producer.pid # made_by.msid can be joined with copyright.msid # tags.msid can be joined with copyright.msid # written_by.wid can be joined with writer.wid # written_by.msid can be joined with copyright.msid # ### Question: # # which movie has the most number of actors from China ? # ### SQL: # # SELECT t2.title FROM CAST AS t3 JOIN actor AS t1 ON t3.aid = t1.aid JOIN movie AS t2 ON t2.mid = t3.msid WHERE t1.nationality = "China" GROUP BY t2.title ORDER BY COUNT ( DISTINCT t1.name ) DESC LIMIT 1; # ### End.
imdb
### Complete SQL query only and with no explanation ### SQL tables followed by foreign key information: # # actor ( aid, gender, name, nationality, birth_city, birth_year ) # copyright ( id, msid, cid ) # cast ( id, msid, aid, role ) # genre ( gid, genre ) # classification ( id, msid, gid ) # company ( id, name, country_code ) # director ( did, gender, name, nationality, birth_city, birth_year ) # producer ( pid, gender, name, nationality, birth_city, birth_year ) # directed_by ( id, msid, did ) # keyword ( id, keyword ) # made_by ( id, msid, pid ) # movie ( mid, title, release_year, title_aka, budget ) # tags ( id, msid, kid ) # tv_series ( sid, title, release_year, num_of_seasons, num_of_episodes, title_aka, budget ) # writer ( wid, gender, name, nationality, num_of_episodes, birth_city, birth_year ) # written_by ( id, msid, wid ) # # cast.msid can be joined with copyright.msid # cast.aid can be joined with actor.aid # classification.msid can be joined with copyright.msid # classification.gid can be joined with genre.gid # directed_by.did can be joined with director.did # directed_by.msid can be joined with copyright.msid # made_by.pid can be joined with producer.pid # made_by.msid can be joined with copyright.msid # tags.msid can be joined with copyright.msid # written_by.wid can be joined with writer.wid # written_by.msid can be joined with copyright.msid # ### Question: # # Find the actors who played in the latest movie by " Quentin Tarantino " # ### SQL: # # SELECT t1.name FROM CAST AS t4 JOIN actor AS t1 ON t4.aid = t1.aid JOIN movie AS t5 ON t5.mid = t4.msid JOIN directed_by AS t2 ON t5.mid = t2.msid JOIN director AS t3 ON t3.did = t2.did WHERE t3.name = "Quentin Tarantino" ORDER BY t5.release_year DESC LIMIT 1; # ### End.
imdb
### Complete SQL query only and with no explanation ### SQL tables followed by foreign key information: # # actor ( aid, gender, name, nationality, birth_city, birth_year ) # copyright ( id, msid, cid ) # cast ( id, msid, aid, role ) # genre ( gid, genre ) # classification ( id, msid, gid ) # company ( id, name, country_code ) # director ( did, gender, name, nationality, birth_city, birth_year ) # producer ( pid, gender, name, nationality, birth_city, birth_year ) # directed_by ( id, msid, did ) # keyword ( id, keyword ) # made_by ( id, msid, pid ) # movie ( mid, title, release_year, title_aka, budget ) # tags ( id, msid, kid ) # tv_series ( sid, title, release_year, num_of_seasons, num_of_episodes, title_aka, budget ) # writer ( wid, gender, name, nationality, num_of_episodes, birth_city, birth_year ) # written_by ( id, msid, wid ) # # cast.msid can be joined with copyright.msid # cast.aid can be joined with actor.aid # classification.msid can be joined with copyright.msid # classification.gid can be joined with genre.gid # directed_by.did can be joined with director.did # directed_by.msid can be joined with copyright.msid # made_by.pid can be joined with producer.pid # made_by.msid can be joined with copyright.msid # tags.msid can be joined with copyright.msid # written_by.wid can be joined with writer.wid # written_by.msid can be joined with copyright.msid # ### Question: # # Find the name and budget of the latest movie by " Quentin Tarantino " # ### SQL: # # SELECT t3.budget , t3.title FROM director AS t2 JOIN directed_by AS t1 ON t2.did = t1.did JOIN movie AS t3 ON t3.mid = t1.msid WHERE t2.name = "Quentin Tarantino" ORDER BY t3.release_year DESC LIMIT 1; # ### End.
imdb
### Complete SQL query only and with no explanation ### SQL tables followed by foreign key information: # # actor ( aid, gender, name, nationality, birth_city, birth_year ) # copyright ( id, msid, cid ) # cast ( id, msid, aid, role ) # genre ( gid, genre ) # classification ( id, msid, gid ) # company ( id, name, country_code ) # director ( did, gender, name, nationality, birth_city, birth_year ) # producer ( pid, gender, name, nationality, birth_city, birth_year ) # directed_by ( id, msid, did ) # keyword ( id, keyword ) # made_by ( id, msid, pid ) # movie ( mid, title, release_year, title_aka, budget ) # tags ( id, msid, kid ) # tv_series ( sid, title, release_year, num_of_seasons, num_of_episodes, title_aka, budget ) # writer ( wid, gender, name, nationality, num_of_episodes, birth_city, birth_year ) # written_by ( id, msid, wid ) # # cast.msid can be joined with copyright.msid # cast.aid can be joined with actor.aid # classification.msid can be joined with copyright.msid # classification.gid can be joined with genre.gid # directed_by.did can be joined with director.did # directed_by.msid can be joined with copyright.msid # made_by.pid can be joined with producer.pid # made_by.msid can be joined with copyright.msid # tags.msid can be joined with copyright.msid # written_by.wid can be joined with writer.wid # written_by.msid can be joined with copyright.msid # ### Question: # # What is the latest movie by " Jim Jarmusch " # ### SQL: # # SELECT t3.title FROM director AS t2 JOIN directed_by AS t1 ON t2.did = t1.did JOIN movie AS t3 ON t3.mid = t1.msid WHERE t2.name = "Jim Jarmusch" ORDER BY t3.release_year DESC LIMIT 1; # ### End.
imdb
### Complete SQL query only and with no explanation ### SQL tables followed by foreign key information: # # actor ( aid, gender, name, nationality, birth_city, birth_year ) # copyright ( id, msid, cid ) # cast ( id, msid, aid, role ) # genre ( gid, genre ) # classification ( id, msid, gid ) # company ( id, name, country_code ) # director ( did, gender, name, nationality, birth_city, birth_year ) # producer ( pid, gender, name, nationality, birth_city, birth_year ) # directed_by ( id, msid, did ) # keyword ( id, keyword ) # made_by ( id, msid, pid ) # movie ( mid, title, release_year, title_aka, budget ) # tags ( id, msid, kid ) # tv_series ( sid, title, release_year, num_of_seasons, num_of_episodes, title_aka, budget ) # writer ( wid, gender, name, nationality, num_of_episodes, birth_city, birth_year ) # written_by ( id, msid, wid ) # # cast.msid can be joined with copyright.msid # cast.aid can be joined with actor.aid # classification.msid can be joined with copyright.msid # classification.gid can be joined with genre.gid # directed_by.did can be joined with director.did # directed_by.msid can be joined with copyright.msid # made_by.pid can be joined with producer.pid # made_by.msid can be joined with copyright.msid # tags.msid can be joined with copyright.msid # written_by.wid can be joined with writer.wid # written_by.msid can be joined with copyright.msid # ### Question: # # Which producer has worked with the most number of directors ? # ### SQL: # # SELECT t1.name FROM director AS t3 JOIN directed_by AS t2 ON t3.did = t2.did JOIN movie AS t4 ON t4.mid = t2.msid JOIN made_by AS t5 ON t4.mid = t5.msid JOIN producer AS t1 ON t1.pid = t5.pid GROUP BY t1.name ORDER BY COUNT ( DISTINCT t3.name ) DESC LIMIT 1; # ### End.
imdb
### Complete SQL query only and with no explanation ### SQL tables followed by foreign key information: # # actor ( aid, gender, name, nationality, birth_city, birth_year ) # copyright ( id, msid, cid ) # cast ( id, msid, aid, role ) # genre ( gid, genre ) # classification ( id, msid, gid ) # company ( id, name, country_code ) # director ( did, gender, name, nationality, birth_city, birth_year ) # producer ( pid, gender, name, nationality, birth_city, birth_year ) # directed_by ( id, msid, did ) # keyword ( id, keyword ) # made_by ( id, msid, pid ) # movie ( mid, title, release_year, title_aka, budget ) # tags ( id, msid, kid ) # tv_series ( sid, title, release_year, num_of_seasons, num_of_episodes, title_aka, budget ) # writer ( wid, gender, name, nationality, num_of_episodes, birth_city, birth_year ) # written_by ( id, msid, wid ) # # cast.msid can be joined with copyright.msid # cast.aid can be joined with actor.aid # classification.msid can be joined with copyright.msid # classification.gid can be joined with genre.gid # directed_by.did can be joined with director.did # directed_by.msid can be joined with copyright.msid # made_by.pid can be joined with producer.pid # made_by.msid can be joined with copyright.msid # tags.msid can be joined with copyright.msid # written_by.wid can be joined with writer.wid # written_by.msid can be joined with copyright.msid # ### Question: # # Find the latest movie which " Gabriele Ferzetti " acted in # ### SQL: # # SELECT t1.name FROM CAST AS t2 JOIN actor AS t1 ON t2.aid = t1.aid JOIN movie AS t3 ON t3.mid = t2.msid WHERE t1.name = "Gabriele Ferzetti" ORDER BY t3.release_year DESC LIMIT 1; # ### End.
restaurants
### Complete SQL query only and with no explanation ### SQL tables followed by foreign key information: # # GEOGRAPHIC ( CITY_NAME, COUNTY, REGION ) # RESTAURANT ( ID, NAME, FOOD_TYPE, CITY_NAME, RATING ) # LOCATION ( RESTAURANT_ID, HOUSE_NUMBER, STREET_NAME, CITY_NAME ) # # RESTAURANT.CITY_NAME can be joined with GEOGRAPHIC.CITY_NAME # LOCATION.CITY_NAME can be joined with GEOGRAPHIC.CITY_NAME # ### Question: # # how many buttercup kitchen are there in san francisco ? # ### SQL: # # SELECT COUNT ( * ) FROM restaurant AS t1 JOIN LOCATION AS t2 ON t1.id = t2.restaurant_id WHERE t2.city_name = "san francisco" AND t1.name = "buttercup kitchen"; # ### End.
restaurants
### Complete SQL query only and with no explanation ### SQL tables followed by foreign key information: # # GEOGRAPHIC ( CITY_NAME, COUNTY, REGION ) # RESTAURANT ( ID, NAME, FOOD_TYPE, CITY_NAME, RATING ) # LOCATION ( RESTAURANT_ID, HOUSE_NUMBER, STREET_NAME, CITY_NAME ) # # RESTAURANT.CITY_NAME can be joined with GEOGRAPHIC.CITY_NAME # LOCATION.CITY_NAME can be joined with GEOGRAPHIC.CITY_NAME # ### Question: # # how many chinese restaurants are there in the bay area ? # ### SQL: # # SELECT COUNT ( * ) FROM restaurant AS t1 JOIN geographic AS t2 ON t1.city_name = t2.city_name WHERE t2.region = "bay area" AND t1.food_type = "chinese"; # ### End.
restaurants
### Complete SQL query only and with no explanation ### SQL tables followed by foreign key information: # # GEOGRAPHIC ( CITY_NAME, COUNTY, REGION ) # RESTAURANT ( ID, NAME, FOOD_TYPE, CITY_NAME, RATING ) # LOCATION ( RESTAURANT_ID, HOUSE_NUMBER, STREET_NAME, CITY_NAME ) # # RESTAURANT.CITY_NAME can be joined with GEOGRAPHIC.CITY_NAME # LOCATION.CITY_NAME can be joined with GEOGRAPHIC.CITY_NAME # ### Question: # # how many places for chinese food are there in the bay area ? # ### SQL: # # SELECT COUNT ( * ) FROM restaurant AS t1 JOIN geographic AS t2 ON t1.city_name = t2.city_name WHERE t2.region = "bay area" AND t1.food_type = "chinese"; # ### End.
restaurants
### Complete SQL query only and with no explanation ### SQL tables followed by foreign key information: # # GEOGRAPHIC ( CITY_NAME, COUNTY, REGION ) # RESTAURANT ( ID, NAME, FOOD_TYPE, CITY_NAME, RATING ) # LOCATION ( RESTAURANT_ID, HOUSE_NUMBER, STREET_NAME, CITY_NAME ) # # RESTAURANT.CITY_NAME can be joined with GEOGRAPHIC.CITY_NAME # LOCATION.CITY_NAME can be joined with GEOGRAPHIC.CITY_NAME # ### Question: # # how many chinese places are there in the bay area ? # ### SQL: # # SELECT COUNT ( * ) FROM restaurant AS t1 JOIN geographic AS t2 ON t1.city_name = t2.city_name WHERE t2.region = "bay area" AND t1.food_type = "chinese"; # ### End.
restaurants
### Complete SQL query only and with no explanation ### SQL tables followed by foreign key information: # # GEOGRAPHIC ( CITY_NAME, COUNTY, REGION ) # RESTAURANT ( ID, NAME, FOOD_TYPE, CITY_NAME, RATING ) # LOCATION ( RESTAURANT_ID, HOUSE_NUMBER, STREET_NAME, CITY_NAME ) # # RESTAURANT.CITY_NAME can be joined with GEOGRAPHIC.CITY_NAME # LOCATION.CITY_NAME can be joined with GEOGRAPHIC.CITY_NAME # ### Question: # # how many places for chinese are there in the bay area ? # ### SQL: # # SELECT COUNT ( * ) FROM restaurant AS t1 JOIN geographic AS t2 ON t1.city_name = t2.city_name WHERE t2.region = "bay area" AND t1.food_type = "chinese"; # ### End.
restaurants
### Complete SQL query only and with no explanation ### SQL tables followed by foreign key information: # # GEOGRAPHIC ( CITY_NAME, COUNTY, REGION ) # RESTAURANT ( ID, NAME, FOOD_TYPE, CITY_NAME, RATING ) # LOCATION ( RESTAURANT_ID, HOUSE_NUMBER, STREET_NAME, CITY_NAME ) # # RESTAURANT.CITY_NAME can be joined with GEOGRAPHIC.CITY_NAME # LOCATION.CITY_NAME can be joined with GEOGRAPHIC.CITY_NAME # ### Question: # # how many jamerican cuisine are there in santa cruz county ? # ### SQL: # # SELECT COUNT ( * ) FROM restaurant AS t1 JOIN geographic AS t2 ON t1.city_name = t2.city_name WHERE t2.county = "santa cruz county" AND t1.name = "jamerican cuisine"; # ### End.
restaurants
### Complete SQL query only and with no explanation ### SQL tables followed by foreign key information: # # GEOGRAPHIC ( CITY_NAME, COUNTY, REGION ) # RESTAURANT ( ID, NAME, FOOD_TYPE, CITY_NAME, RATING ) # LOCATION ( RESTAURANT_ID, HOUSE_NUMBER, STREET_NAME, CITY_NAME ) # # RESTAURANT.CITY_NAME can be joined with GEOGRAPHIC.CITY_NAME # LOCATION.CITY_NAME can be joined with GEOGRAPHIC.CITY_NAME # ### Question: # # where is jamerican cuisine ? # ### SQL: # # SELECT t2.house_number , t1.name FROM restaurant AS t1 JOIN LOCATION AS t2 ON t1.id = t2.restaurant_id WHERE t1.name = "jamerican cuisine"; # ### End.
restaurants
### Complete SQL query only and with no explanation ### SQL tables followed by foreign key information: # # GEOGRAPHIC ( CITY_NAME, COUNTY, REGION ) # RESTAURANT ( ID, NAME, FOOD_TYPE, CITY_NAME, RATING ) # LOCATION ( RESTAURANT_ID, HOUSE_NUMBER, STREET_NAME, CITY_NAME ) # # RESTAURANT.CITY_NAME can be joined with GEOGRAPHIC.CITY_NAME # LOCATION.CITY_NAME can be joined with GEOGRAPHIC.CITY_NAME # ### Question: # # what is the best french restaurant in san francisco ? # ### SQL: # # SELECT t2.house_number , t1.name FROM restaurant AS t1 JOIN LOCATION AS t2 ON t1.id = t2.restaurant_id WHERE t2.city_name = "san francisco" AND t1.food_type = "french" AND t1.rating = ( SELECT MAX ( t1.rating ) FROM restaurant AS t1 JOIN LOCATION AS t2 ON t1.id = t2.restaurant_id WHERE t2.city_name = "san francisco" AND t1.food_type = "french" ); # ### End.
restaurants
### Complete SQL query only and with no explanation ### SQL tables followed by foreign key information: # # GEOGRAPHIC ( CITY_NAME, COUNTY, REGION ) # RESTAURANT ( ID, NAME, FOOD_TYPE, CITY_NAME, RATING ) # LOCATION ( RESTAURANT_ID, HOUSE_NUMBER, STREET_NAME, CITY_NAME ) # # RESTAURANT.CITY_NAME can be joined with GEOGRAPHIC.CITY_NAME # LOCATION.CITY_NAME can be joined with GEOGRAPHIC.CITY_NAME # ### Question: # # What is the best french in san francisco ? # ### SQL: # # SELECT t2.house_number , t1.name FROM restaurant AS t1 JOIN LOCATION AS t2 ON t1.id = t2.restaurant_id WHERE t2.city_name = "san francisco" AND t1.food_type = "french" AND t1.rating = ( SELECT MAX ( t1.rating ) FROM restaurant AS t1 JOIN LOCATION AS t2 ON t1.id = t2.restaurant_id WHERE t2.city_name = "san francisco" AND t1.food_type = "french" ); # ### End.
restaurants
### Complete SQL query only and with no explanation ### SQL tables followed by foreign key information: # # GEOGRAPHIC ( CITY_NAME, COUNTY, REGION ) # RESTAURANT ( ID, NAME, FOOD_TYPE, CITY_NAME, RATING ) # LOCATION ( RESTAURANT_ID, HOUSE_NUMBER, STREET_NAME, CITY_NAME ) # # RESTAURANT.CITY_NAME can be joined with GEOGRAPHIC.CITY_NAME # LOCATION.CITY_NAME can be joined with GEOGRAPHIC.CITY_NAME # ### Question: # # What is the best place in san francisco for french food ? # ### SQL: # # SELECT t2.house_number , t1.name FROM restaurant AS t1 JOIN LOCATION AS t2 ON t1.id = t2.restaurant_id WHERE t2.city_name = "san francisco" AND t1.food_type = "french" AND t1.rating = ( SELECT MAX ( t1.rating ) FROM restaurant AS t1 JOIN LOCATION AS t2 ON t1.id = t2.restaurant_id WHERE t2.city_name = "san francisco" AND t1.food_type = "french" ); # ### End.
restaurants
### Complete SQL query only and with no explanation ### SQL tables followed by foreign key information: # # GEOGRAPHIC ( CITY_NAME, COUNTY, REGION ) # RESTAURANT ( ID, NAME, FOOD_TYPE, CITY_NAME, RATING ) # LOCATION ( RESTAURANT_ID, HOUSE_NUMBER, STREET_NAME, CITY_NAME ) # # RESTAURANT.CITY_NAME can be joined with GEOGRAPHIC.CITY_NAME # LOCATION.CITY_NAME can be joined with GEOGRAPHIC.CITY_NAME # ### Question: # # Give me the best place in san francisco for french food ? # ### SQL: # # SELECT t2.house_number , t1.name FROM restaurant AS t1 JOIN LOCATION AS t2 ON t1.id = t2.restaurant_id WHERE t2.city_name = "san francisco" AND t1.food_type = "french" AND t1.rating = ( SELECT MAX ( t1.rating ) FROM restaurant AS t1 JOIN LOCATION AS t2 ON t1.id = t2.restaurant_id WHERE t2.city_name = "san francisco" AND t1.food_type = "french" ); # ### End.
restaurants
### Complete SQL query only and with no explanation ### SQL tables followed by foreign key information: # # GEOGRAPHIC ( CITY_NAME, COUNTY, REGION ) # RESTAURANT ( ID, NAME, FOOD_TYPE, CITY_NAME, RATING ) # LOCATION ( RESTAURANT_ID, HOUSE_NUMBER, STREET_NAME, CITY_NAME ) # # RESTAURANT.CITY_NAME can be joined with GEOGRAPHIC.CITY_NAME # LOCATION.CITY_NAME can be joined with GEOGRAPHIC.CITY_NAME # ### Question: # # Where is the best french in san francisco ? # ### SQL: # # SELECT t2.house_number , t1.name FROM restaurant AS t1 JOIN LOCATION AS t2 ON t1.id = t2.restaurant_id WHERE t2.city_name = "san francisco" AND t1.food_type = "french" AND t1.rating = ( SELECT MAX ( t1.rating ) FROM restaurant AS t1 JOIN LOCATION AS t2 ON t1.id = t2.restaurant_id WHERE t2.city_name = "san francisco" AND t1.food_type = "french" ); # ### End.
restaurants
### Complete SQL query only and with no explanation ### SQL tables followed by foreign key information: # # GEOGRAPHIC ( CITY_NAME, COUNTY, REGION ) # RESTAURANT ( ID, NAME, FOOD_TYPE, CITY_NAME, RATING ) # LOCATION ( RESTAURANT_ID, HOUSE_NUMBER, STREET_NAME, CITY_NAME ) # # RESTAURANT.CITY_NAME can be joined with GEOGRAPHIC.CITY_NAME # LOCATION.CITY_NAME can be joined with GEOGRAPHIC.CITY_NAME # ### Question: # # Give me the best french in san francisco ? # ### SQL: # # SELECT t2.house_number , t1.name FROM restaurant AS t1 JOIN LOCATION AS t2 ON t1.id = t2.restaurant_id WHERE t2.city_name = "san francisco" AND t1.food_type = "french" AND t1.rating = ( SELECT MAX ( t1.rating ) FROM restaurant AS t1 JOIN LOCATION AS t2 ON t1.id = t2.restaurant_id WHERE t2.city_name = "san francisco" AND t1.food_type = "french" ); # ### End.
restaurants
### Complete SQL query only and with no explanation ### SQL tables followed by foreign key information: # # GEOGRAPHIC ( CITY_NAME, COUNTY, REGION ) # RESTAURANT ( ID, NAME, FOOD_TYPE, CITY_NAME, RATING ) # LOCATION ( RESTAURANT_ID, HOUSE_NUMBER, STREET_NAME, CITY_NAME ) # # RESTAURANT.CITY_NAME can be joined with GEOGRAPHIC.CITY_NAME # LOCATION.CITY_NAME can be joined with GEOGRAPHIC.CITY_NAME # ### Question: # # Where is the best french restaurant in san francisco ? # ### SQL: # # SELECT t2.house_number , t1.name FROM restaurant AS t1 JOIN LOCATION AS t2 ON t1.id = t2.restaurant_id WHERE t2.city_name = "san francisco" AND t1.food_type = "french" AND t1.rating = ( SELECT MAX ( t1.rating ) FROM restaurant AS t1 JOIN LOCATION AS t2 ON t1.id = t2.restaurant_id WHERE t2.city_name = "san francisco" AND t1.food_type = "french" ); # ### End.
restaurants
### Complete SQL query only and with no explanation ### SQL tables followed by foreign key information: # # GEOGRAPHIC ( CITY_NAME, COUNTY, REGION ) # RESTAURANT ( ID, NAME, FOOD_TYPE, CITY_NAME, RATING ) # LOCATION ( RESTAURANT_ID, HOUSE_NUMBER, STREET_NAME, CITY_NAME ) # # RESTAURANT.CITY_NAME can be joined with GEOGRAPHIC.CITY_NAME # LOCATION.CITY_NAME can be joined with GEOGRAPHIC.CITY_NAME # ### Question: # # Give me the best restaurant in san francisco for french food ? # ### SQL: # # SELECT t2.house_number , t1.name FROM restaurant AS t1 JOIN LOCATION AS t2 ON t1.id = t2.restaurant_id WHERE t2.city_name = "san francisco" AND t1.food_type = "french" AND t1.rating = ( SELECT MAX ( t1.rating ) FROM restaurant AS t1 JOIN LOCATION AS t2 ON t1.id = t2.restaurant_id WHERE t2.city_name = "san francisco" AND t1.food_type = "french" ); # ### End.
restaurants
### Complete SQL query only and with no explanation ### SQL tables followed by foreign key information: # # GEOGRAPHIC ( CITY_NAME, COUNTY, REGION ) # RESTAURANT ( ID, NAME, FOOD_TYPE, CITY_NAME, RATING ) # LOCATION ( RESTAURANT_ID, HOUSE_NUMBER, STREET_NAME, CITY_NAME ) # # RESTAURANT.CITY_NAME can be joined with GEOGRAPHIC.CITY_NAME # LOCATION.CITY_NAME can be joined with GEOGRAPHIC.CITY_NAME # ### Question: # # Give me the best french restaurant in san francisco ? # ### SQL: # # SELECT t2.house_number , t1.name FROM restaurant AS t1 JOIN LOCATION AS t2 ON t1.id = t2.restaurant_id WHERE t2.city_name = "san francisco" AND t1.food_type = "french" AND t1.rating = ( SELECT MAX ( t1.rating ) FROM restaurant AS t1 JOIN LOCATION AS t2 ON t1.id = t2.restaurant_id WHERE t2.city_name = "san francisco" AND t1.food_type = "french" ); # ### End.
restaurants
### Complete SQL query only and with no explanation ### SQL tables followed by foreign key information: # # GEOGRAPHIC ( CITY_NAME, COUNTY, REGION ) # RESTAURANT ( ID, NAME, FOOD_TYPE, CITY_NAME, RATING ) # LOCATION ( RESTAURANT_ID, HOUSE_NUMBER, STREET_NAME, CITY_NAME ) # # RESTAURANT.CITY_NAME can be joined with GEOGRAPHIC.CITY_NAME # LOCATION.CITY_NAME can be joined with GEOGRAPHIC.CITY_NAME # ### Question: # # What is the best restaurant in san francisco for french food ? # ### SQL: # # SELECT t2.house_number , t1.name FROM restaurant AS t1 JOIN LOCATION AS t2 ON t1.id = t2.restaurant_id WHERE t2.city_name = "san francisco" AND t1.food_type = "french" AND t1.rating = ( SELECT MAX ( t1.rating ) FROM restaurant AS t1 JOIN LOCATION AS t2 ON t1.id = t2.restaurant_id WHERE t2.city_name = "san francisco" AND t1.food_type = "french" ); # ### End.
restaurants
### Complete SQL query only and with no explanation ### SQL tables followed by foreign key information: # # GEOGRAPHIC ( CITY_NAME, COUNTY, REGION ) # RESTAURANT ( ID, NAME, FOOD_TYPE, CITY_NAME, RATING ) # LOCATION ( RESTAURANT_ID, HOUSE_NUMBER, STREET_NAME, CITY_NAME ) # # RESTAURANT.CITY_NAME can be joined with GEOGRAPHIC.CITY_NAME # LOCATION.CITY_NAME can be joined with GEOGRAPHIC.CITY_NAME # ### Question: # # Where is the best restaurant in san francisco for french food ? # ### SQL: # # SELECT t2.house_number , t1.name FROM restaurant AS t1 JOIN LOCATION AS t2 ON t1.id = t2.restaurant_id WHERE t2.city_name = "san francisco" AND t1.food_type = "french" AND t1.rating = ( SELECT MAX ( t1.rating ) FROM restaurant AS t1 JOIN LOCATION AS t2 ON t1.id = t2.restaurant_id WHERE t2.city_name = "san francisco" AND t1.food_type = "french" ); # ### End.
restaurants
### Complete SQL query only and with no explanation ### SQL tables followed by foreign key information: # # GEOGRAPHIC ( CITY_NAME, COUNTY, REGION ) # RESTAURANT ( ID, NAME, FOOD_TYPE, CITY_NAME, RATING ) # LOCATION ( RESTAURANT_ID, HOUSE_NUMBER, STREET_NAME, CITY_NAME ) # # RESTAURANT.CITY_NAME can be joined with GEOGRAPHIC.CITY_NAME # LOCATION.CITY_NAME can be joined with GEOGRAPHIC.CITY_NAME # ### Question: # # where is denny in the bay area ? # ### SQL: # # SELECT t3.house_number , t1.name FROM restaurant AS t1 JOIN geographic AS t2 ON t1.city_name = t2.city_name JOIN LOCATION AS t3 ON t1.id = t3.restaurant_id WHERE t2.region = "bay area" AND t1.name = "denny"; # ### End.
restaurants
### Complete SQL query only and with no explanation ### SQL tables followed by foreign key information: # # GEOGRAPHIC ( CITY_NAME, COUNTY, REGION ) # RESTAURANT ( ID, NAME, FOOD_TYPE, CITY_NAME, RATING ) # LOCATION ( RESTAURANT_ID, HOUSE_NUMBER, STREET_NAME, CITY_NAME ) # # RESTAURANT.CITY_NAME can be joined with GEOGRAPHIC.CITY_NAME # LOCATION.CITY_NAME can be joined with GEOGRAPHIC.CITY_NAME # ### Question: # # what are some good restaurants on bethel island rd in bethel island ? # ### SQL: # # SELECT t2.house_number , t1.name FROM restaurant AS t1 JOIN LOCATION AS t2 ON t1.id = t2.restaurant_id WHERE t2.city_name = "bethel island" AND t2.street_name = "bethel island rd" AND t1.rating > 2.5; # ### End.
restaurants
### Complete SQL query only and with no explanation ### SQL tables followed by foreign key information: # # GEOGRAPHIC ( CITY_NAME, COUNTY, REGION ) # RESTAURANT ( ID, NAME, FOOD_TYPE, CITY_NAME, RATING ) # LOCATION ( RESTAURANT_ID, HOUSE_NUMBER, STREET_NAME, CITY_NAME ) # # RESTAURANT.CITY_NAME can be joined with GEOGRAPHIC.CITY_NAME # LOCATION.CITY_NAME can be joined with GEOGRAPHIC.CITY_NAME # ### Question: # # give me some good restaurants on bethel island rd in bethel island ? # ### SQL: # # SELECT t2.house_number , t1.name FROM restaurant AS t1 JOIN LOCATION AS t2 ON t1.id = t2.restaurant_id WHERE t2.city_name = "bethel island" AND t2.street_name = "bethel island rd" AND t1.rating > 2.5; # ### End.
restaurants
### Complete SQL query only and with no explanation ### SQL tables followed by foreign key information: # # GEOGRAPHIC ( CITY_NAME, COUNTY, REGION ) # RESTAURANT ( ID, NAME, FOOD_TYPE, CITY_NAME, RATING ) # LOCATION ( RESTAURANT_ID, HOUSE_NUMBER, STREET_NAME, CITY_NAME ) # # RESTAURANT.CITY_NAME can be joined with GEOGRAPHIC.CITY_NAME # LOCATION.CITY_NAME can be joined with GEOGRAPHIC.CITY_NAME # ### Question: # # give me a good restaurant on bethel island rd in bethel island ? # ### SQL: # # SELECT t2.house_number , t1.name FROM restaurant AS t1 JOIN LOCATION AS t2 ON t1.id = t2.restaurant_id WHERE t2.city_name = "bethel island" AND t2.street_name = "bethel island rd" AND t1.rating > 2.5; # ### End.
restaurants
### Complete SQL query only and with no explanation ### SQL tables followed by foreign key information: # # GEOGRAPHIC ( CITY_NAME, COUNTY, REGION ) # RESTAURANT ( ID, NAME, FOOD_TYPE, CITY_NAME, RATING ) # LOCATION ( RESTAURANT_ID, HOUSE_NUMBER, STREET_NAME, CITY_NAME ) # # RESTAURANT.CITY_NAME can be joined with GEOGRAPHIC.CITY_NAME # LOCATION.CITY_NAME can be joined with GEOGRAPHIC.CITY_NAME # ### Question: # # what is a good restaurant on bethel island rd in bethel island ? # ### SQL: # # SELECT t2.house_number , t1.name FROM restaurant AS t1 JOIN LOCATION AS t2 ON t1.id = t2.restaurant_id WHERE t2.city_name = "bethel island" AND t2.street_name = "bethel island rd" AND t1.rating > 2.5; # ### End.
restaurants
### Complete SQL query only and with no explanation ### SQL tables followed by foreign key information: # # GEOGRAPHIC ( CITY_NAME, COUNTY, REGION ) # RESTAURANT ( ID, NAME, FOOD_TYPE, CITY_NAME, RATING ) # LOCATION ( RESTAURANT_ID, HOUSE_NUMBER, STREET_NAME, CITY_NAME ) # # RESTAURANT.CITY_NAME can be joined with GEOGRAPHIC.CITY_NAME # LOCATION.CITY_NAME can be joined with GEOGRAPHIC.CITY_NAME # ### Question: # # where can we find a restaurant in alameda ? # ### SQL: # # SELECT t2.house_number , t1.name FROM restaurant AS t1 JOIN LOCATION AS t2 ON t1.id = t2.restaurant_id WHERE t2.city_name = "alameda"; # ### End.
restaurants
### Complete SQL query only and with no explanation ### SQL tables followed by foreign key information: # # GEOGRAPHIC ( CITY_NAME, COUNTY, REGION ) # RESTAURANT ( ID, NAME, FOOD_TYPE, CITY_NAME, RATING ) # LOCATION ( RESTAURANT_ID, HOUSE_NUMBER, STREET_NAME, CITY_NAME ) # # RESTAURANT.CITY_NAME can be joined with GEOGRAPHIC.CITY_NAME # LOCATION.CITY_NAME can be joined with GEOGRAPHIC.CITY_NAME # ### Question: # # give me a restaurant in alameda ? # ### SQL: # # SELECT t2.house_number , t1.name FROM restaurant AS t1 JOIN LOCATION AS t2 ON t1.id = t2.restaurant_id WHERE t2.city_name = "alameda"; # ### End.
restaurants
### Complete SQL query only and with no explanation ### SQL tables followed by foreign key information: # # GEOGRAPHIC ( CITY_NAME, COUNTY, REGION ) # RESTAURANT ( ID, NAME, FOOD_TYPE, CITY_NAME, RATING ) # LOCATION ( RESTAURANT_ID, HOUSE_NUMBER, STREET_NAME, CITY_NAME ) # # RESTAURANT.CITY_NAME can be joined with GEOGRAPHIC.CITY_NAME # LOCATION.CITY_NAME can be joined with GEOGRAPHIC.CITY_NAME # ### Question: # # where can we find some restaurants in alameda ? # ### SQL: # # SELECT t2.house_number , t1.name FROM restaurant AS t1 JOIN LOCATION AS t2 ON t1.id = t2.restaurant_id WHERE t2.city_name = "alameda"; # ### End.
restaurants
### Complete SQL query only and with no explanation ### SQL tables followed by foreign key information: # # GEOGRAPHIC ( CITY_NAME, COUNTY, REGION ) # RESTAURANT ( ID, NAME, FOOD_TYPE, CITY_NAME, RATING ) # LOCATION ( RESTAURANT_ID, HOUSE_NUMBER, STREET_NAME, CITY_NAME ) # # RESTAURANT.CITY_NAME can be joined with GEOGRAPHIC.CITY_NAME # LOCATION.CITY_NAME can be joined with GEOGRAPHIC.CITY_NAME # ### Question: # # where is a restaurant in alameda ? # ### SQL: # # SELECT t2.house_number , t1.name FROM restaurant AS t1 JOIN LOCATION AS t2 ON t1.id = t2.restaurant_id WHERE t2.city_name = "alameda"; # ### End.
restaurants
### Complete SQL query only and with no explanation ### SQL tables followed by foreign key information: # # GEOGRAPHIC ( CITY_NAME, COUNTY, REGION ) # RESTAURANT ( ID, NAME, FOOD_TYPE, CITY_NAME, RATING ) # LOCATION ( RESTAURANT_ID, HOUSE_NUMBER, STREET_NAME, CITY_NAME ) # # RESTAURANT.CITY_NAME can be joined with GEOGRAPHIC.CITY_NAME # LOCATION.CITY_NAME can be joined with GEOGRAPHIC.CITY_NAME # ### Question: # # give me some restaurants in alameda ? # ### SQL: # # SELECT t2.house_number , t1.name FROM restaurant AS t1 JOIN LOCATION AS t2 ON t1.id = t2.restaurant_id WHERE t2.city_name = "alameda"; # ### End.
restaurants
### Complete SQL query only and with no explanation ### SQL tables followed by foreign key information: # # GEOGRAPHIC ( CITY_NAME, COUNTY, REGION ) # RESTAURANT ( ID, NAME, FOOD_TYPE, CITY_NAME, RATING ) # LOCATION ( RESTAURANT_ID, HOUSE_NUMBER, STREET_NAME, CITY_NAME ) # # RESTAURANT.CITY_NAME can be joined with GEOGRAPHIC.CITY_NAME # LOCATION.CITY_NAME can be joined with GEOGRAPHIC.CITY_NAME # ### Question: # # give me some restaurants good for french food ? # ### SQL: # # SELECT t2.house_number , t1.name FROM restaurant AS t1 JOIN LOCATION AS t2 ON t1.id = t2.restaurant_id WHERE t1.food_type = "french" AND t1.rating > 2.5; # ### End.
restaurants
### Complete SQL query only and with no explanation ### SQL tables followed by foreign key information: # # GEOGRAPHIC ( CITY_NAME, COUNTY, REGION ) # RESTAURANT ( ID, NAME, FOOD_TYPE, CITY_NAME, RATING ) # LOCATION ( RESTAURANT_ID, HOUSE_NUMBER, STREET_NAME, CITY_NAME ) # # RESTAURANT.CITY_NAME can be joined with GEOGRAPHIC.CITY_NAME # LOCATION.CITY_NAME can be joined with GEOGRAPHIC.CITY_NAME # ### Question: # # where are some restaurants good for french food ? # ### SQL: # # SELECT t2.house_number , t1.name FROM restaurant AS t1 JOIN LOCATION AS t2 ON t1.id = t2.restaurant_id WHERE t1.food_type = "french" AND t1.rating > 2.5; # ### End.
restaurants
### Complete SQL query only and with no explanation ### SQL tables followed by foreign key information: # # GEOGRAPHIC ( CITY_NAME, COUNTY, REGION ) # RESTAURANT ( ID, NAME, FOOD_TYPE, CITY_NAME, RATING ) # LOCATION ( RESTAURANT_ID, HOUSE_NUMBER, STREET_NAME, CITY_NAME ) # # RESTAURANT.CITY_NAME can be joined with GEOGRAPHIC.CITY_NAME # LOCATION.CITY_NAME can be joined with GEOGRAPHIC.CITY_NAME # ### Question: # # how many places for french food are there in palo alto ? # ### SQL: # # SELECT COUNT ( * ) FROM restaurant AS t1 JOIN LOCATION AS t2 ON t1.id = t2.restaurant_id WHERE t2.city_name = "palo alto" AND t1.food_type = "french"; # ### End.
restaurants
### Complete SQL query only and with no explanation ### SQL tables followed by foreign key information: # # GEOGRAPHIC ( CITY_NAME, COUNTY, REGION ) # RESTAURANT ( ID, NAME, FOOD_TYPE, CITY_NAME, RATING ) # LOCATION ( RESTAURANT_ID, HOUSE_NUMBER, STREET_NAME, CITY_NAME ) # # RESTAURANT.CITY_NAME can be joined with GEOGRAPHIC.CITY_NAME # LOCATION.CITY_NAME can be joined with GEOGRAPHIC.CITY_NAME # ### Question: # # how many french restaurants are there in palo alto ? # ### SQL: # # SELECT COUNT ( * ) FROM restaurant AS t1 JOIN LOCATION AS t2 ON t1.id = t2.restaurant_id WHERE t2.city_name = "palo alto" AND t1.food_type = "french"; # ### End.
restaurants
### Complete SQL query only and with no explanation ### SQL tables followed by foreign key information: # # GEOGRAPHIC ( CITY_NAME, COUNTY, REGION ) # RESTAURANT ( ID, NAME, FOOD_TYPE, CITY_NAME, RATING ) # LOCATION ( RESTAURANT_ID, HOUSE_NUMBER, STREET_NAME, CITY_NAME ) # # RESTAURANT.CITY_NAME can be joined with GEOGRAPHIC.CITY_NAME # LOCATION.CITY_NAME can be joined with GEOGRAPHIC.CITY_NAME # ### Question: # # how many french restaurant are there in palo alto ? # ### SQL: # # SELECT COUNT ( * ) FROM restaurant AS t1 JOIN LOCATION AS t2 ON t1.id = t2.restaurant_id WHERE t2.city_name = "palo alto" AND t1.food_type = "french"; # ### End.
restaurants
### Complete SQL query only and with no explanation ### SQL tables followed by foreign key information: # # GEOGRAPHIC ( CITY_NAME, COUNTY, REGION ) # RESTAURANT ( ID, NAME, FOOD_TYPE, CITY_NAME, RATING ) # LOCATION ( RESTAURANT_ID, HOUSE_NUMBER, STREET_NAME, CITY_NAME ) # # RESTAURANT.CITY_NAME can be joined with GEOGRAPHIC.CITY_NAME # LOCATION.CITY_NAME can be joined with GEOGRAPHIC.CITY_NAME # ### Question: # # how many places for french are there in palo alto ? # ### SQL: # # SELECT COUNT ( * ) FROM restaurant AS t1 JOIN LOCATION AS t2 ON t1.id = t2.restaurant_id WHERE t2.city_name = "palo alto" AND t1.food_type = "french"; # ### End.
restaurants
### Complete SQL query only and with no explanation ### SQL tables followed by foreign key information: # # GEOGRAPHIC ( CITY_NAME, COUNTY, REGION ) # RESTAURANT ( ID, NAME, FOOD_TYPE, CITY_NAME, RATING ) # LOCATION ( RESTAURANT_ID, HOUSE_NUMBER, STREET_NAME, CITY_NAME ) # # RESTAURANT.CITY_NAME can be joined with GEOGRAPHIC.CITY_NAME # LOCATION.CITY_NAME can be joined with GEOGRAPHIC.CITY_NAME # ### Question: # # how many italian restaurants are in the yolo county ? # ### SQL: # # SELECT COUNT ( * ) FROM restaurant AS t1 JOIN geographic AS t2 ON t1.city_name = t2.city_name WHERE t2.county = "yolo county" AND t1.food_type = "italian"; # ### End.
restaurants
### Complete SQL query only and with no explanation ### SQL tables followed by foreign key information: # # GEOGRAPHIC ( CITY_NAME, COUNTY, REGION ) # RESTAURANT ( ID, NAME, FOOD_TYPE, CITY_NAME, RATING ) # LOCATION ( RESTAURANT_ID, HOUSE_NUMBER, STREET_NAME, CITY_NAME ) # # RESTAURANT.CITY_NAME can be joined with GEOGRAPHIC.CITY_NAME # LOCATION.CITY_NAME can be joined with GEOGRAPHIC.CITY_NAME # ### Question: # # where can i eat french food in mountain view ? # ### SQL: # # SELECT t2.house_number , t1.name FROM restaurant AS t1 JOIN LOCATION AS t2 ON t1.id = t2.restaurant_id WHERE t2.city_name = "mountain view" AND t1.food_type = "french"; # ### End.
restaurants
### Complete SQL query only and with no explanation ### SQL tables followed by foreign key information: # # GEOGRAPHIC ( CITY_NAME, COUNTY, REGION ) # RESTAURANT ( ID, NAME, FOOD_TYPE, CITY_NAME, RATING ) # LOCATION ( RESTAURANT_ID, HOUSE_NUMBER, STREET_NAME, CITY_NAME ) # # RESTAURANT.CITY_NAME can be joined with GEOGRAPHIC.CITY_NAME # LOCATION.CITY_NAME can be joined with GEOGRAPHIC.CITY_NAME # ### Question: # # how many denny are there in the bay area ? # ### SQL: # # SELECT COUNT ( * ) FROM restaurant AS t1 JOIN geographic AS t2 ON t1.city_name = t2.city_name WHERE t2.region = "bay area" AND t1.name = "denny"; # ### End.
restaurants
### Complete SQL query only and with no explanation ### SQL tables followed by foreign key information: # # GEOGRAPHIC ( CITY_NAME, COUNTY, REGION ) # RESTAURANT ( ID, NAME, FOOD_TYPE, CITY_NAME, RATING ) # LOCATION ( RESTAURANT_ID, HOUSE_NUMBER, STREET_NAME, CITY_NAME ) # # RESTAURANT.CITY_NAME can be joined with GEOGRAPHIC.CITY_NAME # LOCATION.CITY_NAME can be joined with GEOGRAPHIC.CITY_NAME # ### Question: # # give me a good restaurant in alameda ? # ### SQL: # # SELECT t2.house_number , t1.name FROM restaurant AS t1 JOIN LOCATION AS t2 ON t1.id = t2.restaurant_id WHERE t2.city_name = "alameda" AND t1.rating > 2.5; # ### End.
restaurants
### Complete SQL query only and with no explanation ### SQL tables followed by foreign key information: # # GEOGRAPHIC ( CITY_NAME, COUNTY, REGION ) # RESTAURANT ( ID, NAME, FOOD_TYPE, CITY_NAME, RATING ) # LOCATION ( RESTAURANT_ID, HOUSE_NUMBER, STREET_NAME, CITY_NAME ) # # RESTAURANT.CITY_NAME can be joined with GEOGRAPHIC.CITY_NAME # LOCATION.CITY_NAME can be joined with GEOGRAPHIC.CITY_NAME # ### Question: # # what are some good restaurants in alameda ? # ### SQL: # # SELECT t2.house_number , t1.name FROM restaurant AS t1 JOIN LOCATION AS t2 ON t1.id = t2.restaurant_id WHERE t2.city_name = "alameda" AND t1.rating > 2.5; # ### End.
restaurants
### Complete SQL query only and with no explanation ### SQL tables followed by foreign key information: # # GEOGRAPHIC ( CITY_NAME, COUNTY, REGION ) # RESTAURANT ( ID, NAME, FOOD_TYPE, CITY_NAME, RATING ) # LOCATION ( RESTAURANT_ID, HOUSE_NUMBER, STREET_NAME, CITY_NAME ) # # RESTAURANT.CITY_NAME can be joined with GEOGRAPHIC.CITY_NAME # LOCATION.CITY_NAME can be joined with GEOGRAPHIC.CITY_NAME # ### Question: # # what is a good restaurant in alameda ? # ### SQL: # # SELECT t2.house_number , t1.name FROM restaurant AS t1 JOIN LOCATION AS t2 ON t1.id = t2.restaurant_id WHERE t2.city_name = "alameda" AND t1.rating > 2.5; # ### End.
restaurants
### Complete SQL query only and with no explanation ### SQL tables followed by foreign key information: # # GEOGRAPHIC ( CITY_NAME, COUNTY, REGION ) # RESTAURANT ( ID, NAME, FOOD_TYPE, CITY_NAME, RATING ) # LOCATION ( RESTAURANT_ID, HOUSE_NUMBER, STREET_NAME, CITY_NAME ) # # RESTAURANT.CITY_NAME can be joined with GEOGRAPHIC.CITY_NAME # LOCATION.CITY_NAME can be joined with GEOGRAPHIC.CITY_NAME # ### Question: # # give me some good restaurants in alameda ? # ### SQL: # # SELECT t2.house_number , t1.name FROM restaurant AS t1 JOIN LOCATION AS t2 ON t1.id = t2.restaurant_id WHERE t2.city_name = "alameda" AND t1.rating > 2.5; # ### End.
restaurants
### Complete SQL query only and with no explanation ### SQL tables followed by foreign key information: # # GEOGRAPHIC ( CITY_NAME, COUNTY, REGION ) # RESTAURANT ( ID, NAME, FOOD_TYPE, CITY_NAME, RATING ) # LOCATION ( RESTAURANT_ID, HOUSE_NUMBER, STREET_NAME, CITY_NAME ) # # RESTAURANT.CITY_NAME can be joined with GEOGRAPHIC.CITY_NAME # LOCATION.CITY_NAME can be joined with GEOGRAPHIC.CITY_NAME # ### Question: # # where is a good restaurant on buchanan in san francisco for arabic food ? # ### SQL: # # SELECT t2.house_number , t1.name FROM restaurant AS t1 JOIN LOCATION AS t2 ON t1.id = t2.restaurant_id WHERE t2.city_name = "san francisco" AND t2.street_name = "buchanan" AND t1.food_type = "arabic" AND t1.rating > 2.5; # ### End.
restaurants
### Complete SQL query only and with no explanation ### SQL tables followed by foreign key information: # # GEOGRAPHIC ( CITY_NAME, COUNTY, REGION ) # RESTAURANT ( ID, NAME, FOOD_TYPE, CITY_NAME, RATING ) # LOCATION ( RESTAURANT_ID, HOUSE_NUMBER, STREET_NAME, CITY_NAME ) # # RESTAURANT.CITY_NAME can be joined with GEOGRAPHIC.CITY_NAME # LOCATION.CITY_NAME can be joined with GEOGRAPHIC.CITY_NAME # ### Question: # # where are some good arabics on buchanan in san francisco ? # ### SQL: # # SELECT t2.house_number , t1.name FROM restaurant AS t1 JOIN LOCATION AS t2 ON t1.id = t2.restaurant_id WHERE t2.city_name = "san francisco" AND t2.street_name = "buchanan" AND t1.food_type = "arabic" AND t1.rating > 2.5; # ### End.
restaurants
### Complete SQL query only and with no explanation ### SQL tables followed by foreign key information: # # GEOGRAPHIC ( CITY_NAME, COUNTY, REGION ) # RESTAURANT ( ID, NAME, FOOD_TYPE, CITY_NAME, RATING ) # LOCATION ( RESTAURANT_ID, HOUSE_NUMBER, STREET_NAME, CITY_NAME ) # # RESTAURANT.CITY_NAME can be joined with GEOGRAPHIC.CITY_NAME # LOCATION.CITY_NAME can be joined with GEOGRAPHIC.CITY_NAME # ### Question: # # where is a good arabic restaurant on buchanan in san francisco ? # ### SQL: # # SELECT t2.house_number , t1.name FROM restaurant AS t1 JOIN LOCATION AS t2 ON t1.id = t2.restaurant_id WHERE t2.city_name = "san francisco" AND t2.street_name = "buchanan" AND t1.food_type = "arabic" AND t1.rating > 2.5; # ### End.
restaurants
### Complete SQL query only and with no explanation ### SQL tables followed by foreign key information: # # GEOGRAPHIC ( CITY_NAME, COUNTY, REGION ) # RESTAURANT ( ID, NAME, FOOD_TYPE, CITY_NAME, RATING ) # LOCATION ( RESTAURANT_ID, HOUSE_NUMBER, STREET_NAME, CITY_NAME ) # # RESTAURANT.CITY_NAME can be joined with GEOGRAPHIC.CITY_NAME # LOCATION.CITY_NAME can be joined with GEOGRAPHIC.CITY_NAME # ### Question: # # what are some good places for arabic on buchanan in san francisco ? # ### SQL: # # SELECT t2.house_number , t1.name FROM restaurant AS t1 JOIN LOCATION AS t2 ON t1.id = t2.restaurant_id WHERE t2.city_name = "san francisco" AND t2.street_name = "buchanan" AND t1.food_type = "arabic" AND t1.rating > 2.5; # ### End.
restaurants
### Complete SQL query only and with no explanation ### SQL tables followed by foreign key information: # # GEOGRAPHIC ( CITY_NAME, COUNTY, REGION ) # RESTAURANT ( ID, NAME, FOOD_TYPE, CITY_NAME, RATING ) # LOCATION ( RESTAURANT_ID, HOUSE_NUMBER, STREET_NAME, CITY_NAME ) # # RESTAURANT.CITY_NAME can be joined with GEOGRAPHIC.CITY_NAME # LOCATION.CITY_NAME can be joined with GEOGRAPHIC.CITY_NAME # ### Question: # # give me a good arabic on buchanan in san francisco ? # ### SQL: # # SELECT t2.house_number , t1.name FROM restaurant AS t1 JOIN LOCATION AS t2 ON t1.id = t2.restaurant_id WHERE t2.city_name = "san francisco" AND t2.street_name = "buchanan" AND t1.food_type = "arabic" AND t1.rating > 2.5; # ### End.
restaurants
### Complete SQL query only and with no explanation ### SQL tables followed by foreign key information: # # GEOGRAPHIC ( CITY_NAME, COUNTY, REGION ) # RESTAURANT ( ID, NAME, FOOD_TYPE, CITY_NAME, RATING ) # LOCATION ( RESTAURANT_ID, HOUSE_NUMBER, STREET_NAME, CITY_NAME ) # # RESTAURANT.CITY_NAME can be joined with GEOGRAPHIC.CITY_NAME # LOCATION.CITY_NAME can be joined with GEOGRAPHIC.CITY_NAME # ### Question: # # give me some restaurants good for arabic food on buchanan in san francisco ? # ### SQL: # # SELECT t2.house_number , t1.name FROM restaurant AS t1 JOIN LOCATION AS t2 ON t1.id = t2.restaurant_id WHERE t2.city_name = "san francisco" AND t2.street_name = "buchanan" AND t1.food_type = "arabic" AND t1.rating > 2.5; # ### End.
restaurants
### Complete SQL query only and with no explanation ### SQL tables followed by foreign key information: # # GEOGRAPHIC ( CITY_NAME, COUNTY, REGION ) # RESTAURANT ( ID, NAME, FOOD_TYPE, CITY_NAME, RATING ) # LOCATION ( RESTAURANT_ID, HOUSE_NUMBER, STREET_NAME, CITY_NAME ) # # RESTAURANT.CITY_NAME can be joined with GEOGRAPHIC.CITY_NAME # LOCATION.CITY_NAME can be joined with GEOGRAPHIC.CITY_NAME # ### Question: # # give me a good place on buchanan in san francisco for arabic food ? # ### SQL: # # SELECT t2.house_number , t1.name FROM restaurant AS t1 JOIN LOCATION AS t2 ON t1.id = t2.restaurant_id WHERE t2.city_name = "san francisco" AND t2.street_name = "buchanan" AND t1.food_type = "arabic" AND t1.rating > 2.5; # ### End.
restaurants
### Complete SQL query only and with no explanation ### SQL tables followed by foreign key information: # # GEOGRAPHIC ( CITY_NAME, COUNTY, REGION ) # RESTAURANT ( ID, NAME, FOOD_TYPE, CITY_NAME, RATING ) # LOCATION ( RESTAURANT_ID, HOUSE_NUMBER, STREET_NAME, CITY_NAME ) # # RESTAURANT.CITY_NAME can be joined with GEOGRAPHIC.CITY_NAME # LOCATION.CITY_NAME can be joined with GEOGRAPHIC.CITY_NAME # ### Question: # # where is a good place on buchanan in san francisco for arabic food ? # ### SQL: # # SELECT t2.house_number , t1.name FROM restaurant AS t1 JOIN LOCATION AS t2 ON t1.id = t2.restaurant_id WHERE t2.city_name = "san francisco" AND t2.street_name = "buchanan" AND t1.food_type = "arabic" AND t1.rating > 2.5; # ### End.
restaurants
### Complete SQL query only and with no explanation ### SQL tables followed by foreign key information: # # GEOGRAPHIC ( CITY_NAME, COUNTY, REGION ) # RESTAURANT ( ID, NAME, FOOD_TYPE, CITY_NAME, RATING ) # LOCATION ( RESTAURANT_ID, HOUSE_NUMBER, STREET_NAME, CITY_NAME ) # # RESTAURANT.CITY_NAME can be joined with GEOGRAPHIC.CITY_NAME # LOCATION.CITY_NAME can be joined with GEOGRAPHIC.CITY_NAME # ### Question: # # where can i eat arabic food on buchanan in san francisco ? # ### SQL: # # SELECT t2.house_number , t1.name FROM restaurant AS t1 JOIN LOCATION AS t2 ON t1.id = t2.restaurant_id WHERE t2.city_name = "san francisco" AND t2.street_name = "buchanan" AND t1.food_type = "arabic" AND t1.rating > 2.5; # ### End.
restaurants
### Complete SQL query only and with no explanation ### SQL tables followed by foreign key information: # # GEOGRAPHIC ( CITY_NAME, COUNTY, REGION ) # RESTAURANT ( ID, NAME, FOOD_TYPE, CITY_NAME, RATING ) # LOCATION ( RESTAURANT_ID, HOUSE_NUMBER, STREET_NAME, CITY_NAME ) # # RESTAURANT.CITY_NAME can be joined with GEOGRAPHIC.CITY_NAME # LOCATION.CITY_NAME can be joined with GEOGRAPHIC.CITY_NAME # ### Question: # # give me some good places on buchanan in san francisco for arabic food ? # ### SQL: # # SELECT t2.house_number , t1.name FROM restaurant AS t1 JOIN LOCATION AS t2 ON t1.id = t2.restaurant_id WHERE t2.city_name = "san francisco" AND t2.street_name = "buchanan" AND t1.food_type = "arabic" AND t1.rating > 2.5; # ### End.
restaurants
### Complete SQL query only and with no explanation ### SQL tables followed by foreign key information: # # GEOGRAPHIC ( CITY_NAME, COUNTY, REGION ) # RESTAURANT ( ID, NAME, FOOD_TYPE, CITY_NAME, RATING ) # LOCATION ( RESTAURANT_ID, HOUSE_NUMBER, STREET_NAME, CITY_NAME ) # # RESTAURANT.CITY_NAME can be joined with GEOGRAPHIC.CITY_NAME # LOCATION.CITY_NAME can be joined with GEOGRAPHIC.CITY_NAME # ### Question: # # where is a arabic restaurant on buchanan in san francisco ? # ### SQL: # # SELECT t2.house_number , t1.name FROM restaurant AS t1 JOIN LOCATION AS t2 ON t1.id = t2.restaurant_id WHERE t2.city_name = "san francisco" AND t2.street_name = "buchanan" AND t1.food_type = "arabic" AND t1.rating > 2.5; # ### End.
restaurants
### Complete SQL query only and with no explanation ### SQL tables followed by foreign key information: # # GEOGRAPHIC ( CITY_NAME, COUNTY, REGION ) # RESTAURANT ( ID, NAME, FOOD_TYPE, CITY_NAME, RATING ) # LOCATION ( RESTAURANT_ID, HOUSE_NUMBER, STREET_NAME, CITY_NAME ) # # RESTAURANT.CITY_NAME can be joined with GEOGRAPHIC.CITY_NAME # LOCATION.CITY_NAME can be joined with GEOGRAPHIC.CITY_NAME # ### Question: # # give me a restaurant on buchanan in san francisco that serves good arabic food ? # ### SQL: # # SELECT t2.house_number , t1.name FROM restaurant AS t1 JOIN LOCATION AS t2 ON t1.id = t2.restaurant_id WHERE t2.city_name = "san francisco" AND t2.street_name = "buchanan" AND t1.food_type = "arabic" AND t1.rating > 2.5; # ### End.
restaurants
### Complete SQL query only and with no explanation ### SQL tables followed by foreign key information: # # GEOGRAPHIC ( CITY_NAME, COUNTY, REGION ) # RESTAURANT ( ID, NAME, FOOD_TYPE, CITY_NAME, RATING ) # LOCATION ( RESTAURANT_ID, HOUSE_NUMBER, STREET_NAME, CITY_NAME ) # # RESTAURANT.CITY_NAME can be joined with GEOGRAPHIC.CITY_NAME # LOCATION.CITY_NAME can be joined with GEOGRAPHIC.CITY_NAME # ### Question: # # give me a good restaurant on buchanan in san francisco for arabic food ? # ### SQL: # # SELECT t2.house_number , t1.name FROM restaurant AS t1 JOIN LOCATION AS t2 ON t1.id = t2.restaurant_id WHERE t2.city_name = "san francisco" AND t2.street_name = "buchanan" AND t1.food_type = "arabic" AND t1.rating > 2.5; # ### End.
restaurants
### Complete SQL query only and with no explanation ### SQL tables followed by foreign key information: # # GEOGRAPHIC ( CITY_NAME, COUNTY, REGION ) # RESTAURANT ( ID, NAME, FOOD_TYPE, CITY_NAME, RATING ) # LOCATION ( RESTAURANT_ID, HOUSE_NUMBER, STREET_NAME, CITY_NAME ) # # RESTAURANT.CITY_NAME can be joined with GEOGRAPHIC.CITY_NAME # LOCATION.CITY_NAME can be joined with GEOGRAPHIC.CITY_NAME # ### Question: # # where is a restaurant on buchanan in san francisco that serves good arabic food ? # ### SQL: # # SELECT t2.house_number , t1.name FROM restaurant AS t1 JOIN LOCATION AS t2 ON t1.id = t2.restaurant_id WHERE t2.city_name = "san francisco" AND t2.street_name = "buchanan" AND t1.food_type = "arabic" AND t1.rating > 2.5; # ### End.
restaurants
### Complete SQL query only and with no explanation ### SQL tables followed by foreign key information: # # GEOGRAPHIC ( CITY_NAME, COUNTY, REGION ) # RESTAURANT ( ID, NAME, FOOD_TYPE, CITY_NAME, RATING ) # LOCATION ( RESTAURANT_ID, HOUSE_NUMBER, STREET_NAME, CITY_NAME ) # # RESTAURANT.CITY_NAME can be joined with GEOGRAPHIC.CITY_NAME # LOCATION.CITY_NAME can be joined with GEOGRAPHIC.CITY_NAME # ### Question: # # give me some good restaurants on buchanan in san francisco for arabic food ? # ### SQL: # # SELECT t2.house_number , t1.name FROM restaurant AS t1 JOIN LOCATION AS t2 ON t1.id = t2.restaurant_id WHERE t2.city_name = "san francisco" AND t2.street_name = "buchanan" AND t1.food_type = "arabic" AND t1.rating > 2.5; # ### End.
restaurants
### Complete SQL query only and with no explanation ### SQL tables followed by foreign key information: # # GEOGRAPHIC ( CITY_NAME, COUNTY, REGION ) # RESTAURANT ( ID, NAME, FOOD_TYPE, CITY_NAME, RATING ) # LOCATION ( RESTAURANT_ID, HOUSE_NUMBER, STREET_NAME, CITY_NAME ) # # RESTAURANT.CITY_NAME can be joined with GEOGRAPHIC.CITY_NAME # LOCATION.CITY_NAME can be joined with GEOGRAPHIC.CITY_NAME # ### Question: # # give me some good places for arabic on buchanan in san francisco ? # ### SQL: # # SELECT t2.house_number , t1.name FROM restaurant AS t1 JOIN LOCATION AS t2 ON t1.id = t2.restaurant_id WHERE t2.city_name = "san francisco" AND t2.street_name = "buchanan" AND t1.food_type = "arabic" AND t1.rating > 2.5; # ### End.
restaurants
### Complete SQL query only and with no explanation ### SQL tables followed by foreign key information: # # GEOGRAPHIC ( CITY_NAME, COUNTY, REGION ) # RESTAURANT ( ID, NAME, FOOD_TYPE, CITY_NAME, RATING ) # LOCATION ( RESTAURANT_ID, HOUSE_NUMBER, STREET_NAME, CITY_NAME ) # # RESTAURANT.CITY_NAME can be joined with GEOGRAPHIC.CITY_NAME # LOCATION.CITY_NAME can be joined with GEOGRAPHIC.CITY_NAME # ### Question: # # where can i eat some good arabic food on buchanan in san francisco ? # ### SQL: # # SELECT t2.house_number , t1.name FROM restaurant AS t1 JOIN LOCATION AS t2 ON t1.id = t2.restaurant_id WHERE t2.city_name = "san francisco" AND t2.street_name = "buchanan" AND t1.food_type = "arabic" AND t1.rating > 2.5; # ### End.
restaurants
### Complete SQL query only and with no explanation ### SQL tables followed by foreign key information: # # GEOGRAPHIC ( CITY_NAME, COUNTY, REGION ) # RESTAURANT ( ID, NAME, FOOD_TYPE, CITY_NAME, RATING ) # LOCATION ( RESTAURANT_ID, HOUSE_NUMBER, STREET_NAME, CITY_NAME ) # # RESTAURANT.CITY_NAME can be joined with GEOGRAPHIC.CITY_NAME # LOCATION.CITY_NAME can be joined with GEOGRAPHIC.CITY_NAME # ### Question: # # where is a good arabic on buchanan in san francisco ? # ### SQL: # # SELECT t2.house_number , t1.name FROM restaurant AS t1 JOIN LOCATION AS t2 ON t1.id = t2.restaurant_id WHERE t2.city_name = "san francisco" AND t2.street_name = "buchanan" AND t1.food_type = "arabic" AND t1.rating > 2.5; # ### End.
restaurants
### Complete SQL query only and with no explanation ### SQL tables followed by foreign key information: # # GEOGRAPHIC ( CITY_NAME, COUNTY, REGION ) # RESTAURANT ( ID, NAME, FOOD_TYPE, CITY_NAME, RATING ) # LOCATION ( RESTAURANT_ID, HOUSE_NUMBER, STREET_NAME, CITY_NAME ) # # RESTAURANT.CITY_NAME can be joined with GEOGRAPHIC.CITY_NAME # LOCATION.CITY_NAME can be joined with GEOGRAPHIC.CITY_NAME # ### Question: # # where are some restaurants good for arabic food on buchanan in san francisco ? # ### SQL: # # SELECT t2.house_number , t1.name FROM restaurant AS t1 JOIN LOCATION AS t2 ON t1.id = t2.restaurant_id WHERE t2.city_name = "san francisco" AND t2.street_name = "buchanan" AND t1.food_type = "arabic" AND t1.rating > 2.5; # ### End.
restaurants
### Complete SQL query only and with no explanation ### SQL tables followed by foreign key information: # # GEOGRAPHIC ( CITY_NAME, COUNTY, REGION ) # RESTAURANT ( ID, NAME, FOOD_TYPE, CITY_NAME, RATING ) # LOCATION ( RESTAURANT_ID, HOUSE_NUMBER, STREET_NAME, CITY_NAME ) # # RESTAURANT.CITY_NAME can be joined with GEOGRAPHIC.CITY_NAME # LOCATION.CITY_NAME can be joined with GEOGRAPHIC.CITY_NAME # ### Question: # # where are some good places for arabic on buchanan in san francisco ? # ### SQL: # # SELECT t2.house_number , t1.name FROM restaurant AS t1 JOIN LOCATION AS t2 ON t1.id = t2.restaurant_id WHERE t2.city_name = "san francisco" AND t2.street_name = "buchanan" AND t1.food_type = "arabic" AND t1.rating > 2.5; # ### End.
restaurants
### Complete SQL query only and with no explanation ### SQL tables followed by foreign key information: # # GEOGRAPHIC ( CITY_NAME, COUNTY, REGION ) # RESTAURANT ( ID, NAME, FOOD_TYPE, CITY_NAME, RATING ) # LOCATION ( RESTAURANT_ID, HOUSE_NUMBER, STREET_NAME, CITY_NAME ) # # RESTAURANT.CITY_NAME can be joined with GEOGRAPHIC.CITY_NAME # LOCATION.CITY_NAME can be joined with GEOGRAPHIC.CITY_NAME # ### Question: # # give me a good arabic restaurant on buchanan in san francisco ? # ### SQL: # # SELECT t2.house_number , t1.name FROM restaurant AS t1 JOIN LOCATION AS t2 ON t1.id = t2.restaurant_id WHERE t2.city_name = "san francisco" AND t2.street_name = "buchanan" AND t1.food_type = "arabic" AND t1.rating > 2.5; # ### End.
restaurants
### Complete SQL query only and with no explanation ### SQL tables followed by foreign key information: # # GEOGRAPHIC ( CITY_NAME, COUNTY, REGION ) # RESTAURANT ( ID, NAME, FOOD_TYPE, CITY_NAME, RATING ) # LOCATION ( RESTAURANT_ID, HOUSE_NUMBER, STREET_NAME, CITY_NAME ) # # RESTAURANT.CITY_NAME can be joined with GEOGRAPHIC.CITY_NAME # LOCATION.CITY_NAME can be joined with GEOGRAPHIC.CITY_NAME # ### Question: # # give me some good arabics on buchanan in san francisco ? # ### SQL: # # SELECT t2.house_number , t1.name FROM restaurant AS t1 JOIN LOCATION AS t2 ON t1.id = t2.restaurant_id WHERE t2.city_name = "san francisco" AND t2.street_name = "buchanan" AND t1.food_type = "arabic" AND t1.rating > 2.5; # ### End.
restaurants
### Complete SQL query only and with no explanation ### SQL tables followed by foreign key information: # # GEOGRAPHIC ( CITY_NAME, COUNTY, REGION ) # RESTAURANT ( ID, NAME, FOOD_TYPE, CITY_NAME, RATING ) # LOCATION ( RESTAURANT_ID, HOUSE_NUMBER, STREET_NAME, CITY_NAME ) # # RESTAURANT.CITY_NAME can be joined with GEOGRAPHIC.CITY_NAME # LOCATION.CITY_NAME can be joined with GEOGRAPHIC.CITY_NAME # ### Question: # # where can i eat french food in the bay area ? # ### SQL: # # SELECT t3.house_number , t1.name FROM restaurant AS t1 JOIN geographic AS t2 ON t1.city_name = t2.city_name JOIN LOCATION AS t3 ON t1.id = t3.restaurant_id WHERE t2.region = "bay area" AND t1.food_type = "french"; # ### End.
restaurants
### Complete SQL query only and with no explanation ### SQL tables followed by foreign key information: # # GEOGRAPHIC ( CITY_NAME, COUNTY, REGION ) # RESTAURANT ( ID, NAME, FOOD_TYPE, CITY_NAME, RATING ) # LOCATION ( RESTAURANT_ID, HOUSE_NUMBER, STREET_NAME, CITY_NAME ) # # RESTAURANT.CITY_NAME can be joined with GEOGRAPHIC.CITY_NAME # LOCATION.CITY_NAME can be joined with GEOGRAPHIC.CITY_NAME # ### Question: # # give me some restaurants on bethel island rd in bethel island ? # ### SQL: # # SELECT t2.house_number , t1.name FROM restaurant AS t1 JOIN LOCATION AS t2 ON t1.id = t2.restaurant_id WHERE t2.city_name = "bethel island" AND t2.street_name = "bethel island rd"; # ### End.
restaurants
### Complete SQL query only and with no explanation ### SQL tables followed by foreign key information: # # GEOGRAPHIC ( CITY_NAME, COUNTY, REGION ) # RESTAURANT ( ID, NAME, FOOD_TYPE, CITY_NAME, RATING ) # LOCATION ( RESTAURANT_ID, HOUSE_NUMBER, STREET_NAME, CITY_NAME ) # # RESTAURANT.CITY_NAME can be joined with GEOGRAPHIC.CITY_NAME # LOCATION.CITY_NAME can be joined with GEOGRAPHIC.CITY_NAME # ### Question: # # give me a restaurant on bethel island rd in bethel island ? # ### SQL: # # SELECT t2.house_number , t1.name FROM restaurant AS t1 JOIN LOCATION AS t2 ON t1.id = t2.restaurant_id WHERE t2.city_name = "bethel island" AND t2.street_name = "bethel island rd"; # ### End.