Chinastark/bird_dataset huggingface dataset:
Database: disney
Note: directed by Wolfgang Reitherman refers to director = 'Wolfgang Reitherman'; comedies refers to genre = 'Comedy'; movies refer to movie_title;
Question: Among the movies directed by Wolfgang Reitherman, how many of them are Comedies?
SQL: SELECT count(t3.name) FROM ( SELECT director.name FROM `movies_total_gross` INNER JOIN director ON movies_total_gross.movie_title = director.name WHERE director.director = 'Wolfgang Reitherman' AND movies_total_gross.genre = 'Comedy' GROUP BY director.name ) t3
Database: disney
Note: directed by Wolfgang Reitherman refers to director = 'Wolfgang Reitherman'; the most popular movie refers to MAX(total_gross);
Question: Among the movies directed by Wolfgang Reitherman, which one of them was the most popular?
SQL: SELECT movies_total_gross.movie_title FROM director INNER JOIN movies_total_gross ON director.name = movies_total_gross.movie_title WHERE director.director = 'Wolfgang Reitherman' ORDER BY movies_total_gross.total_gross DESC LIMIT 1
Database: disney
Note: directed by Wolfgang Reitherman refers to director = 'Wolfgang Reitherman'; movies refer to movie_title; general audience refers to mpaa_rating = 'G';
Question: Please list the movies directed by Wolfgang Reitherman that can be watched by the general audience.
SQL: SELECT movies_total_gross.movie_title FROM `movies_total_gross` INNER JOIN director ON movies_total_gross.movie_title = director.name WHERE movies_total_gross.mpaa_rating = 'G' AND director.director = 'Wolfgang Reitherman'
Database: disney
Note: the most popular movie refers to movie_title where MAX(total_gross);
Question: Which character is the villain of the most popular movie?
SQL: SELECT characters.villian FROM `movies_total_gross` INNER JOIN characters ON movies_total_gross.movie_title = characters.movie_title ORDER BY movies_total_gross.total_gross DESC LIMIT 1
Database: disney
Note: FALSE;
Question: What is the genre of the movie whose villain is Commander Rourke?
SQL: SELECT movies_total_gross.genre FROM characters INNER JOIN movies_total_gross ON movies_total_gross.movie_title = characters.movie_title WHERE characters.villian = 'Commander Rourke'
Database: disney
Note: Beauty and the Beast refers to movie_title = 'Beauty and the Beast';
Question: Who is the villain of the movie "Beauty and the Beast"?
SQL: SELECT villian FROM characters WHERE movie_title = 'Beauty and the Beast'
Database: disney
Note: Robin Hood is the main character of the movie which refers to hero = 'Robin Hood'; movie refers to movie_title;
Question: Which movie is the character Robin Hood in?
SQL: SELECT movie_title FROM characters WHERE hero = 'Robin Hood'
Database: disney
Note: name of the movie refers to movie_title;
Question: Give the name of the movie which the song "I Thought I Lost You" is associated with.
SQL: SELECT movie_title FROM characters WHERE song = 'I Thought I Lost You'
Database: disney
Note: FALSE;
Question: Who is the voice actor of the character "Binkie Muddlefoot"?
SQL: SELECT `voice-actor` FROM `voice-actors` WHERE CHARACTER = 'Binkie Muddlefoot'
Database: disney
Note: FALSE;
Question: Who is the hero character of the movie whose total gross was $222,527,828?
SQL: SELECT characters.hero FROM characters INNER JOIN movies_total_gross ON movies_total_gross.movie_title = characters.movie_title WHERE movies_total_gross.total_gross = '$222,527,828'
Database: disney
Note: the most popular movie refers to movie_title where MAX(total_gross); in 1970s refers to (cast(SUBSTR(release_date, instr(release_date, ', ') + 1) as int) between 1970 and 1979);
Question: Which song is associated with the most popular Disney movie in 1970s?
SQL: SELECT characters.song FROM movies_total_gross INNER JOIN characters ON movies_total_gross.movie_title = characters.movie_title WHERE cast(substr(movies_total_gross.release_date, instr(movies_total_gross.release_date, ', ') + 1) AS int) BETWEEN 1970 AND 1979 ORDER BY cast(replace(substr(movies_total_gross.total_gross, 2), ',', '') AS float) DESC LIMIT 1
Database: disney
Note: Will Finn refers to director = 'Will Finn';
Question: Who is the hero character of the Disney movie directed by Will Finn?
SQL: SELECT characters.hero FROM characters INNER JOIN director ON director.name = characters.movie_title WHERE director.director = 'Will Finn'
Database: disney
Note: The Little Mermaid refers to movie_title = 'The Little Mermaid';
Question: Who is the voice actor of the hero character from the movie The Little Mermaid?
SQL: SELECT voice-actors.`voice-actor` FROM characters INNER JOIN `voice-actors` ON voice-actors.movie = characters.movie_title WHERE characters.movie_title = 'The Little Mermaid' AND voice-actors.character = characters.hero
Database: disney
Note: FALSE;
Question: Give the name of the director of the movie in which Verna Felton was the voice actor for its character "Aunt Sarah".
SQL: SELECT director.director FROM director INNER JOIN `voice-actors` ON voice-actors.movie = director.name WHERE voice-actors.character = 'Aunt Sarah' AND voice-actors.`voice-actor` = 'Verna Felton'
Database: disney
Note: FALSE;
Question: For the movie in which Tress MacNeille was the voice actor for its character "Hyacinth Hippo", what was the release date of that movie?
SQL: SELECT characters.release_date FROM characters INNER JOIN `voice-actors` ON voice-actors.movie = characters.movie_title WHERE voice-actors.character = 'Hyacinth Hippo' AND voice-actors.`voice-actor` = 'Tress MacNeille'
Database: disney
Note: released on 2007/3/30 refers to release_date = 'Mar 30, 2007'; adventure movie refers to genre = 'Adventure' ;
Question: Who is the director of the adventure movie which was released on 2007/3/30?
SQL: SELECT director.director FROM director INNER JOIN movies_total_gross ON movies_total_gross.movie_title = director.name WHERE movies_total_gross.genre = 'Adventure' AND movies_total_gross.release_date = 'Mar 30, 2007'
Database: disney
Note: Wolfgang Reitherman refers to director = 'Wolfgang Reitherman'; the highest grossing after accounting for inflation refers to MAX(inflation_adjusted_gross);
Question: Wolfgang Reitherman has directed several Disney movies, which one has the highest grossing after accounting for inflation?
SQL: SELECT movies_total_gross.movie_title FROM movies_total_gross INNER JOIN director ON movies_total_gross.movie_title = director.name WHERE director.director = 'Wolfgang Reitherman' ORDER BY cast(replace(substr(inflation_adjusted_gross, 2), ',', '') AS REAL) DESC LIMIT 1
Database: disney
Note: released on 2016/3/4 refers to release_date = '4-Mar-16'; adventure movie refers to genre = 'Adventure' ;
Question: Who is the hero character of the adventure movie which was released on 2016/3/4?
SQL: SELECT characters.hero FROM characters INNER JOIN movies_total_gross ON movies_total_gross.movie_title = characters.movie_title WHERE movies_total_gross.genre = 'Adventure' AND characters.release_date = '4-Mar-16'
Database: disney
Note: Donald Duck is the main character of the movie which refers to hero = 'Donald Duck'; which one has more grossing refers to movie_title where MAX(total_gross);
Question: The character Donald Duck has appeared in two Disney movies, which one has more grossing?
SQL: SELECT movies_total_gross.movie_title FROM movies_total_gross INNER JOIN characters ON movies_total_gross.movie_title = characters.movie_title WHERE characters.hero = 'Donald Duck' ORDER BY cast(replace(substr(total_gross, 2), ',', '') AS REAL) DESC LIMIT 1
Database: disney
Note: Wolfgang Reitherman refers director = 'Wolfgang Reitherman';
Question: How many movies did Wolfgang Reitherman direct?
SQL: SELECT count(name) FROM director WHERE director = 'Wolfgang Reitherman'
Database: disney
Note: Most productive director refers to director where MAX(COUNT(name));
Question: Who is the most productive director?
SQL: SELECT director FROM director GROUP BY director ORDER BY count(name) DESC LIMIT 1
Database: disney
Note: Restricted refers to mpaa_rating = 'R'; horror refers to genre = 'Horror'; released between 1/1/1990 to 12/31/2015 refers to (cast(SUBSTR(release_date, instr(release_date, ', ') + 1) as int) between 1990 and 2015);
Question: How many restricted horror movies were released between 1/1/1990 to 12/31/2015?
SQL: SELECT count(movie_title) FROM movies_total_gross WHERE mpaa_rating = 'R' AND genre = 'Horror' AND cast(substr(release_date, instr(release_date, ', ') + 1) AS int) BETWEEN 1990 AND 2015
Database: disney
Note: Frank Welker refers to voice-actor = 'Frank Welker';
Question: What are the names of the characters voiced by Frank Welker?
SQL: SELECT CHARACTER FROM `voice-actors` WHERE 'voice-actor' = 'Frank Welker'
Database: disney
Note: song = 'Little Wonders';
Question: How much is the total gross of the movie with a song titled "Little Wonders"?
SQL: SELECT movies_total_gross.total_gross FROM movies_total_gross INNER JOIN characters ON characters.movie_title = movies_total_gross.movie_title WHERE characters.song = 'Little Wonders'
Database: disney
Note: The Motion Picture Association of America rating refers to mpaa_rating; villian = 'Turbo';
Question: What is the Motion Picture Association of America rating for the movie featuring a villain named Turbo?
SQL: SELECT movies_total_gross.mpaa_rating FROM movies_total_gross INNER JOIN characters ON characters.movie_title = movies_total_gross.movie_title WHERE characters.villian = 'Turbo'
Database: disney
Note: movies for mature audiences or parental guidance refer to movie_title where mpaa_rating = 'PG';
Question: How many movies for mature audiences or parental guidance suggested did Bill Thompson work as a voice actor?
SQL: SELECT count(t.movie) FROM ( SELECT voice-actors.movie FROM `voice-actors` INNER JOIN movies_total_gross ON voice-actors.movie = movies_total_gross.movie_title WHERE mpaa_rating = 'PG' AND `voice-actor` = 'Bill Thompson' GROUP BY voice-actors.movie ) AS t
Database: disney
Note: Gary Trousdale refers director = 'Gary Trousdale'; the adventure movie refers to genre = 'Adventure';
Question: How many of Gary Trousdale's movies are adventure movies?
SQL: SELECT count(t.name) FROM ( SELECT director.name FROM director INNER JOIN movies_total_gross ON director.name = movies_total_gross.movie_title WHERE director.director = 'Gary Trousdale' AND movies_total_gross.genre = 'Adventure' GROUP BY director.name ) t
Database: disney
Note: Bill Thompson refers to voice-actor = 'Bill Thompson'; worked the most refers to MAX(COUNT(name));
Question: Which director did Bill Thompson work the most with?
SQL: SELECT director FROM director INNER JOIN `voice-actors` ON director.name = voice-actors.movie WHERE voice-actors.`voice-actor` = 'Bill Thompson' GROUP BY director ORDER BY count(director) DESC LIMIT 1
Database: disney
Note: Ron Clements refers to director = 'Ron Clements'; the most popular movie refers to movie_title where MAX(total_gross);
Question: What is the most popular movie directed by Ron Clements?
SQL: SELECT director.name FROM movies_total_gross INNER JOIN director ON director.name = movies_total_gross.movie_title WHERE director.director = 'Ron Clements' ORDER BY cast(replace(substr(total_gross, 2), ',', '') AS int) DESC LIMIT 1
Database: disney
Note: Ben Sharpsteen refers to director = 'Ben Sharpsteen'; released on February 9, 1940 refers to release_date = 'Feb 9, 1940';
Question: List all the voice actors in the movie directed by Ben Sharpsteen which was released on February 9, 1940.
SQL: SELECT voice-actors.`voice-actor` FROM director INNER JOIN `voice-actors` INNER JOIN movies_total_gross ON director.name = voice-actors.movie AND voice-actors.movie = movies_total_gross.movie_title WHERE director.director = 'Ben Sharpsteen' AND movies_total_gross.release_date = 'Feb 9, 1940' AND voice-actors.`voice-actor` != 'None' GROUP BY voice-actors.`voice-actor`
Database: disney
Note: Ron Clements refers to director = 'Ron Clements'; PG is an abbreviation for parental guidance and refers to mpaa_rating = 'PG'; adventure movie refers to genre = 'Adventure';
Question: How many PG adventure movies did Ron Clements direct?
SQL: SELECT count(*) FROM director INNER JOIN movies_total_gross ON director.name = movies_total_gross.movie_title WHERE director.director = 'Ron Clements' AND movies_total_gross.mpaa_rating = 'PG' AND movies_total_gross.genre = 'Adventure'
Database: disney
Note: Horror refers to genre = 'Horror';
Question: How many horror movies are there?
SQL: SELECT count(movie_title) FROM `movies_total_gross` WHERE genre = 'Horror'
Database: disney
Note: The Great Mouse Detective refers to movie_title = 'The Great Mouse Detective';
Question: Who is the villain in the movie "The Great Mouse Detective"?
SQL: SELECT villian FROM characters WHERE movie_title = 'The Great Mouse Detective'
Database: disney
Note: Meet the Robinsons refers to movie_title = 'Meet the Robinsons';
Question: List the voice actors from the movie "Meet the Robinsons".
SQL: SELECT 'voice-actor' FROM `voice-actors` WHERE movie = 'Meet the Robinsons'
Database: disney
Note: the most movies refers to MAX(COUNT(name));
Question: Which director has made the most movies?
SQL: SELECT director, count(name) FROM director GROUP BY director ORDER BY count(name) DESC LIMIT 1
Database: disney
Note: From 2000 to 2010 refers to year between 2000 and 2010; the most revenue refers to MAX("studio entertainment[ni 1]");
Question: From 2000 to 2010, in which year did the studio entertainment segment make the most revenue?
SQL: SELECT `year` FROM revenue WHERE `year` BETWEEN 2000 AND 2010 ORDER BY `studio entertainment[ni 1]` DESC LIMIT 1
Database: disney
Note: drama refers to genre = 'Drama';
Question: List all the songs associated with drama movies.
SQL: SELECT song FROM movies_total_gross INNER JOIN characters ON movies_total_gross.movie_title = characters.movie_title WHERE movies_total_gross.genre = 'Drama' GROUP BY song
Database: disney
Note: FALSE;
Question: Who are the voice actors for all the heroes?
SQL: SELECT voice-actors.`voice-actor` FROM characters INNER JOIN `voice-actors` ON voice-actors.character = characters.hero WHERE voice-actors.movie = characters.movie_title
Database: disney
Note: the 1990s refers to (cast(SUBSTR(release_date, instr(release_date, ', ') + 1) as int) between 1990 and 2000);
Question: Provide a list of directors from the 1990s.
SQL: SELECT director.director FROM movies_total_gross INNER JOIN director ON movies_total_gross.movie_title = director.name AND cast(substr(release_date, instr(release_date, ', ') + 1) AS int) BETWEEN 1990 AND 2000 GROUP BY director.director
Database: disney
Note: The Rescuers refers to movie_title = 'The Rescuers'; who voiced refers to voice-actor;
Question: Who voiced the villain in "The Rescuers"?
SQL: SELECT voice-actors.`voice-actor` FROM `voice-actors` INNER JOIN characters ON characters.movie_title = voice-actors.movie WHERE characters.movie_title = 'The Rescuers' AND voice-actors.character = characters.villian
Database: disney
Note: Wolfgang Reitherman refers to director = 'Wolfgang Reitherman';
Question: List all of Wolfgang Reitherman's movies and their voice actors.
SQL: SELECT director.name, voice-actors.`voice-actor` FROM director INNER JOIN `voice-actors` ON director.name = voice-actors.movie WHERE director.director = 'Wolfgang Reitherman'
Database: disney
Note: PG is an abbreviation for parental guidance and refers to mpaa_rating = 'PG';
Question: What are the characters in the PG movies?
SQL: SELECT DISTINCT voice-actors.character FROM movies_total_gross INNER JOIN `voice-actors` ON movies_total_gross.movie_title = voice-actors.movie WHERE movies_total_gross.mpaa_rating = 'PG'
Database: disney
Note: the highest grossing movie without song refers to movie_title where MAX(total_gross) and song = 'null';
Question: What is the highest grossing movie without a song?
SQL: SELECT movies_total_gross.movie_title FROM movies_total_gross INNER JOIN characters ON characters.movie_title = movies_total_gross.movie_title WHERE characters.song IS NULL ORDER BY cast(replace(trim(movies_total_gross.total_gross, '$'), ',', '') AS REAL) DESC LIMIT 1
Database: disney
Note: who directed refers director;
Question: Who directed the movie with the most voice actors?
SQL: SELECT director.director, count(DISTINCT voice-actors.`voice-actor`) FROM `voice-actors` INNER JOIN director ON voice-actors.movie = director.name GROUP BY director.director ORDER BY count(DISTINCT voice-actors.`voice-actor`) DESC LIMIT 1
Database: disney
Note: Came out on 11/24/2010 refers to release_date = 'Nov 24, 2010';
Question: Who are the voice actors in the movie that came out on 11/24/2010?
SQL: SELECT voice-actors.`voice-actor` FROM movies_total_gross INNER JOIN `voice-actors` ON movies_total_gross.movie_title = voice-actors.movie WHERE movies_total_gross.release_date = 'Nov 24, 2010'
Database: disney
Note: movies that feature a song refer to movie_title where song is not NULL;
Question: List the directors of movies that feature a song.
SQL: SELECT director.director FROM characters INNER JOIN director ON characters.movie_title = director.name WHERE characters.song IS NOT NULL GROUP BY director.director
Database: disney
Note: FALSE;
Question: What are the total grosses for the movies with Jim Cummings as the voice actor?
SQL: SELECT movies_total_gross.movie_title FROM `voice-actors` INNER JOIN movies_total_gross ON movies_total_gross.movie_title = voice-actors.movie WHERE voice-actors.`voice-actor` = 'Jim Cummings' ORDER BY cast(replace(trim(movies_total_gross.total_gross, '$'), ',', '') AS REAL) DESC LIMIT 1
Database: disney
Note: Ron Clements refer to director = 'Ron Clements'; the highest total gross refers to MAX(total_gross);
Question: Which of the movies directed by Ron Clements has the highest total gross?
SQL: SELECT movies_total_gross.movie_title FROM director INNER JOIN movies_total_gross ON director.name = movies_total_gross.movie_title WHERE director.director = 'Ron Clements' ORDER BY cast(replace(trim(movies_total_gross.total_gross, '$'), ',', '') AS REAL) DESC LIMIT 1
Database: disney
Note: DIVIDE(SUM(total_gross where voice-actor = 'Sterling Holloway'); COUNT(movie_title where voice-actor = 'Sterling Holloway'));
Question: What is the average total gross for the movies featuring Sterling Holloway?
SQL: SELECT sum(cast(replace(trim(movies_total_gross.total_gross, '$'), ',', '') AS REAL)) / count(movies_total_gross.movie_title) FROM `voice-actors` INNER JOIN movies_total_gross ON voice-actors.movie = movies_total_gross.movie_title WHERE voice-actors.`voice-actor` = 'Sterling Holloway'
Database: disney
Note: movies with songs refer song = 'not null'; DIVIDE(SUM(total_gross where song = 'not null'), sum(total_gross)) as percentage;
Question: What proportion of the total gross of all movies is from movies with songs?
SQL: SELECT cast(count(CASE WHEN characters.song IS NOT NULL THEN movies_total_gross.movie_title ELSE NULL END) AS REAL) * 100 / count(movies_total_gross.movie_title) FROM characters INNER JOIN movies_total_gross ON characters.movie_title = movies_total_gross.movie_title
Database: disney
Note: released in 2016 refers to substr(release_date, length(release_date) - 3, length(release_date)) = '2016'; movies refer to the movie_title;
Question: List the movies and genres released in 2016.
SQL: SELECT movie_title, genre FROM movies_total_gross WHERE substr(release_date, length(release_date) - 3, length(release_date)) = '2016'
Database: disney
Note: Little Mermaid refers to movie_title = 'Little Mermaid';
Question: Who is the villain in Little Mermaid?
SQL: SELECT villian FROM characters WHERE movie_title = 'Little Mermaid'
Database: disney
Note: Jack Kinney refers to director = 'Jack Kinney';
Question: List the movie titles directed by Jack Kinney.
SQL: SELECT name FROM director WHERE director = 'Jack Kinney'
Database: disney
Note: The highest grossed movie refers to MAX(total_gross); DIVIDE(inflation_adjusted_gross, total_gross) as percentage;
Question: Provide the movie titles and the estimated inflation rate of the highest total grossed movie.
SQL: SELECT movie_title, cast(replace(trim(inflation_adjusted_gross, '$'), ',', '') AS REAL) / cast(replace(trim(total_gross, '$'), ',', '') AS REAL) FROM movies_total_gross ORDER BY cast(replace(trim(total_gross, '$'), ',', '') AS REAL) DESC LIMIT 1
Database: disney
Note: PG-13 refers to mpaa_rating = 'PG-13'; romantic comedy refers to genre = 'Romantic Comedy';
Question: List the PG-13 romantic comedy movie titles and their release dates.
SQL: SELECT movie_title, release_date FROM movies_total_gross WHERE mpaa_rating = 'PG-13' AND genre = 'Romantic Comedy'
Database: disney
Note: Bill Thompson refers to voice-actor = 'Bill Thompson';
Question: List the movie titles and character names by Bill Thompson.
SQL: SELECT movie, CHARACTER FROM `voice-actors` WHERE 'voice-actor' = 'Bill Thompson'
Database: disney
Note: Ron Clements refers director = 'Ron Clements';
Question: List the movie titles and associated songs directed by Ron Clements.
SQL: SELECT characters.movie_title, characters.song FROM characters INNER JOIN director ON characters.movie_title = director.name WHERE director.director = 'Ron Clements'
Database: disney
Note: Wolfgang Reitherman refers to director = 'Wolfgang Reitherman'; 1997 refers to substr(release_date, length(release_date) - 3, length(release_date)) = '1977'; the titles refer to movie_title; main characters refer to hero;
Question: Provide the titles, main characters, and associated songs of the movies directed by Wolfgang Reitherman in 1977.
SQL: SELECT movies_total_gross.movie_title, characters.hero, characters.song FROM movies_total_gross INNER JOIN characters ON movies_total_gross.movie_title = characters.movie_title INNER JOIN director ON movies_total_gross.movie_title = director.name WHERE director.director = 'Wolfgang Reitherman' AND substr(movies_total_gross.release_date, length(movies_total_gross.release_date) - 3, length(movies_total_gross.release_date)) = '1977'
Database: disney
Note: Donald Duck is the main character of the movie which refers to hero = 'Donald Duck'; movies refer to movie_title; who directed refers director;
Question: Which movies had the main character named Donald Duck and who directed them?
SQL: SELECT characters.movie_title, director.director FROM characters INNER JOIN director ON characters.movie_title = director.name WHERE characters.hero = 'Donald Duck'
Database: disney
Note: Mulan refers to movie_title = 'Mulan';
Question: Describe the hero, director, and the release date of Mulan.
SQL: SELECT characters.hero, director.director, characters.release_date FROM characters INNER JOIN director ON characters.movie_title = director.name WHERE characters.movie_title = 'Mulan'
Database: disney
Note: Elsa is the main character of the movie which refers to hero = 'Elsa'; title refers to movie_title;
Question: Provide the title, total gross, and MPAA rating of the movie which has a hero named Elsa.
SQL: SELECT movies_total_gross.movie_title, movies_total_gross.total_gross, movies_total_gross.mpaa_rating FROM movies_total_gross INNER JOIN characters ON movies_total_gross.movie_title = characters.movie_title INNER JOIN director ON director.name = movies_total_gross.movie_title WHERE characters.hero = 'Elsa'
Database: disney
Note: Freddie Jones refers to voice-actor = 'Freddie Jones'; title refers to movie_title;
Question: Provide the title, director, and release date of the movie voice-acted by Freddie Jones.
SQL: SELECT voice-actors.movie, director.director, characters.release_date FROM `voice-actors` INNER JOIN characters ON voice-actors.movie = characters.movie_title INNER JOIN director ON director.name = characters.movie_title WHERE voice-actors.`voice-actor` = 'Freddie Jones'