id
int64
0
9.43k
db_id
stringclasses
69 values
schema
stringclasses
69 values
question
stringlengths
24
325
output
stringlengths
23
804
evidence
stringlengths
0
673
filtered_schema
listlengths
0
16
4,700
disney
CREATE TABLE characters ( movie_title TEXT primary key, release_date TEXT, hero TEXT, villian TEXT, song TEXT, foreign key (hero) references "voice-actors"(character) ); CREATE TABLE director ( name TEXT primary key, director TEXT, f...
How many voice actors for the movie Aladdin?
SELECT COUNT('voice-actor') FROM `voice-actors` WHERE movie = 'Aladdin'
Aladdin is the name of the movie which refers to movie = 'Aladdin';
[ "voice-actors.movie" ]
4,701
disney
CREATE TABLE characters ( movie_title TEXT primary key, release_date TEXT, hero TEXT, villian TEXT, song TEXT, foreign key (hero) references "voice-actors"(character) ); CREATE TABLE director ( name TEXT primary key, director TEXT, f...
List the movie titles with the voice actor Jeff Bennet
SELECT movie FROM `voice-actors` WHERE 'voice-actor' = 'Jeff Bennett'
Jeff Bennett refers to voice-actor = 'Jeff Bennett';
[ "voice-actors.movie" ]
4,702
disney
CREATE TABLE characters ( movie_title TEXT primary key, release_date TEXT, hero TEXT, villian TEXT, song TEXT, foreign key (hero) references "voice-actors"(character) ); CREATE TABLE director ( name TEXT primary key, director TEXT, f...
Provide the director's name of Wreck-It Ralph movie.
SELECT director FROM director WHERE name = 'Wreck-It Ralph'
Wreck-It Ralph is the name of the movies which refers to name = 'Wreck-It Ralph';
[ "director.director", "director.name" ]
4,703
disney
CREATE TABLE characters ( movie_title TEXT primary key, release_date TEXT, hero TEXT, villian TEXT, song TEXT, foreign key (hero) references "voice-actors"(character) ); CREATE TABLE director ( name TEXT primary key, director TEXT, f...
What movies did director Jack Kinney direct?
SELECT name FROM director WHERE director = 'Jack Kinney'
FALSE;
[ "director.director", "director.name" ]
4,704
disney
CREATE TABLE characters ( movie_title TEXT primary key, release_date TEXT, hero TEXT, villian TEXT, song TEXT, foreign key (hero) references "voice-actors"(character) ); CREATE TABLE director ( name TEXT primary key, director TEXT, f...
How many movies were released between 1937 and 1950?
SELECT COUNT(movie_title) FROM characters WHERE SUBSTR(release_date, LENGTH(release_date) - 1, LENGTH(release_date)) BETWEEN '37' AND '50'
released between 1937 and 1950 refers to substr(release_date, length(release_date) - 1,length(release_date)) between '37' and '50';
[ "characters.movie_title", "characters.release_date" ]
4,705
disney
CREATE TABLE characters ( movie_title TEXT primary key, release_date TEXT, hero TEXT, villian TEXT, song TEXT, foreign key (hero) references "voice-actors"(character) ); CREATE TABLE director ( name TEXT primary key, director TEXT, f...
Provide the name of the song from the movie directed by Ben Sharpsteen.
SELECT T1.song FROM characters AS T1 INNER JOIN director AS T2 ON T1.movie_title = T2.name WHERE T2.director = 'Ben Sharpsteen'
Ben Sharpsteen refers to director = 'Ben Sharpsteen';
[ "characters.movie_title", "characters.song", "director.director", "director.name" ]
4,706
disney
CREATE TABLE characters ( movie_title TEXT primary key, release_date TEXT, hero TEXT, villian TEXT, song TEXT, foreign key (hero) references "voice-actors"(character) ); CREATE TABLE director ( name TEXT primary key, director TEXT, f...
Indicate the release date of the film The Lion King directed by Roger Allers.
SELECT T1.release_date FROM characters AS T1 INNER JOIN director AS T2 ON T1.movie_title = T2.name WHERE T2.director = 'Roger Allers' AND T1.movie_title = 'The Lion King'
The Lion King refers to movie_title = 'The Lion King'; Roger Allers refers to director = 'Roger Allers';
[ "characters.movie_title", "characters.release_date", "director.director", "director.name" ]
4,707
disney
CREATE TABLE characters ( movie_title TEXT primary key, release_date TEXT, hero TEXT, villian TEXT, song TEXT, foreign key (hero) references "voice-actors"(character) ); CREATE TABLE director ( name TEXT primary key, director TEXT, f...
Name the villain of the movie with Scott Weinger and Brad Kane as voice actors.
SELECT T1.villian FROM characters AS T1 INNER JOIN `voice-actors` AS T2 ON T1.movie_title = T2.movie WHERE T2.`voice-actor` = 'Scott Weinger Brad Kane'
FALSE;
[ "characters.movie_title", "characters.villian", "voice-actors.movie", "voice-actors.voice-actor" ]
4,708
disney
CREATE TABLE characters ( movie_title TEXT primary key, release_date TEXT, hero TEXT, villian TEXT, song TEXT, foreign key (hero) references "voice-actors"(character) ); CREATE TABLE director ( name TEXT primary key, director TEXT, f...
Which movies of director Wolfgang Reitherman do not have villain?
SELECT T1.movie_title FROM characters AS T1 INNER JOIN director AS T2 ON T1.movie_title = T2.name WHERE T2.director = 'Wolfgang Reitherman' AND T1.villian IS NULL
which movies do not have villain refer to movie_title where villian is null;
[ "characters.movie_title", "characters.villian", "director.director", "director.name" ]
4,709
disney
CREATE TABLE characters ( movie_title TEXT primary key, release_date TEXT, hero TEXT, villian TEXT, song TEXT, foreign key (hero) references "voice-actors"(character) ); CREATE TABLE director ( name TEXT primary key, director TEXT, f...
List the titles of movies directed by Jack Kinney that were released before 1947.
SELECT T1.movie_title FROM characters AS T1 INNER JOIN director AS T2 ON T1.movie_title = T2.name WHERE T2.director = 'Jack Kinney' AND SUBSTR(T1.release_date, LENGTH(T1.release_date) - 1, LENGTH(T1.release_date)) < '47'
Jack Kinney refers to director = 'Jack Kinney'; released before 1947 refers to substr(release_date, length(release_date) - 1, length(release_date)) < '47';
[ "characters.movie_title", "characters.release_date", "director.director", "director.name" ]
4,710
disney
CREATE TABLE characters ( movie_title TEXT primary key, release_date TEXT, hero TEXT, villian TEXT, song TEXT, foreign key (hero) references "voice-actors"(character) ); CREATE TABLE director ( name TEXT primary key, director TEXT, f...
List the names of the directors whose films grossed over $100 million.
SELECT DISTINCT T2.director FROM characters AS T1 INNER JOIN director AS T2 ON T1.movie_title = T2.name INNER JOIN movies_total_gross AS T3 ON T1.movie_title = T3.movie_title WHERE CAST(REPLACE(trim(T3.total_gross, '$'), ',', '') AS REAL) > 100000000
films grossed over $100 million refer to movie_title where total_gross > 100000000;
[ "characters.movie_title", "director.director", "director.name", "movies_total_gross.movie_title", "movies_total_gross.total_gross" ]
4,711
disney
CREATE TABLE characters ( movie_title TEXT primary key, release_date TEXT, hero TEXT, villian TEXT, song TEXT, foreign key (hero) references "voice-actors"(character) ); CREATE TABLE director ( name TEXT primary key, director TEXT, f...
Which movie's song title has the highest total gross?
SELECT T2.song FROM movies_total_gross AS T1 INNER JOIN characters AS T2 ON T1.movie_title = T2.movie_title ORDER BY CAST(REPLACE(trim(T1.total_gross, '$'), ',', '') AS REAL) DESC LIMIT 1
The highest total gross refers to MAX(total_gross);
[ "characters.movie_title", "characters.song", "movies_total_gross.movie_title", "movies_total_gross.total_gross" ]
4,712
disney
CREATE TABLE characters ( movie_title TEXT primary key, release_date TEXT, hero TEXT, villian TEXT, song TEXT, foreign key (hero) references "voice-actors"(character) ); CREATE TABLE director ( name TEXT primary key, director TEXT, f...
Which director had the most popular film from 1937 to 1990?
SELECT T2.director FROM characters AS T1 INNER JOIN director AS T2 ON T1.movie_title = T2.name INNER JOIN movies_total_gross AS T3 ON T3.movie_title = T1.movie_title WHERE SUBSTR(T3.release_date, LENGTH(T3.release_date) - 3, LENGTH(T3.release_date)) BETWEEN '1937' AND '1990' ORDER BY CAST(REPLACE(trim(T3.total_gross, '...
from 1937 to 1990 refers to substr(release_date, length(release_date) - 3, length(release_date)) between '1937' and '1990'; the most popular film refers to movie_title where MAX(total_gross);
[ "characters.movie_title", "director.director", "director.name", "movies_total_gross.movie_title", "movies_total_gross.release_date", "movies_total_gross.total_gross" ]
4,713
disney
CREATE TABLE characters ( movie_title TEXT primary key, release_date TEXT, hero TEXT, villian TEXT, song TEXT, foreign key (hero) references "voice-actors"(character) ); CREATE TABLE director ( name TEXT primary key, director TEXT, f...
List all the main characters of the movie that are comedy genre.
SELECT T2.hero FROM movies_total_gross AS T1 INNER JOIN characters AS T2 ON T1.movie_title = T2.movie_title WHERE T1.genre = 'Comedy'
Comedy refers to genre = 'Comedy'; the main character of the movie refers to hero;
[ "characters.hero", "characters.movie_title", "movies_total_gross.genre", "movies_total_gross.movie_title" ]
4,714
disney
CREATE TABLE characters ( movie_title TEXT primary key, release_date TEXT, hero TEXT, villian TEXT, song TEXT, foreign key (hero) references "voice-actors"(character) ); CREATE TABLE director ( name TEXT primary key, director TEXT, f...
Provide the names of voice actors for the characters of films directed by Wolfgang Reitherman.
SELECT T2.hero, T1.`voice-actor` FROM `voice-actors` AS T1 INNER JOIN characters AS T2 ON T1.movie = T2.movie_title INNER JOIN director AS T3 ON T3.name = T2.movie_title WHERE T3.director = 'Wolfgang Reitherman'
Wolfgang Reitherman refers to director = 'Wolfgang Reitherman';
[ "characters.hero", "characters.movie_title", "director.director", "director.name", "voice-actors.movie", "voice-actors.voice-actor" ]
4,715
disney
CREATE TABLE characters ( movie_title TEXT primary key, release_date TEXT, hero TEXT, villian TEXT, song TEXT, foreign key (hero) references "voice-actors"(character) ); CREATE TABLE director ( name TEXT primary key, director TEXT, f...
What genre of movie has Taran as the main character?
SELECT T1.genre FROM movies_total_gross AS T1 INNER JOIN characters AS T2 ON T1.movie_title = T2.movie_title WHERE T2.hero = 'Taran'
Taran is the main character of the movie which refers to hero = 'Taran';
[ "characters.hero", "characters.movie_title", "movies_total_gross.genre", "movies_total_gross.movie_title" ]
4,716
disney
CREATE TABLE characters ( movie_title TEXT primary key, release_date TEXT, hero TEXT, villian TEXT, song TEXT, foreign key (hero) references "voice-actors"(character) ); CREATE TABLE director ( name TEXT primary key, director TEXT, f...
The main character Elsa is voiced by which actor and who is the director of the movie?
SELECT T1.`voice-actor`, T3.director FROM `voice-actors` AS T1 INNER JOIN characters AS T2 ON T1.movie = T2.movie_title INNER JOIN director AS T3 ON T2.movie_title = T3.name WHERE T2.hero = 'Elsa'
Elsa is the main character of the movie which refers to hero = 'Elsa'; voiced by which actor refers to voice-actor;
[ "characters.hero", "characters.movie_title", "director.director", "director.name", "voice-actors.movie", "voice-actors.voice-actor" ]
4,717
disney
CREATE TABLE characters ( movie_title TEXT primary key, release_date TEXT, hero TEXT, villian TEXT, song TEXT, foreign key (hero) references "voice-actors"(character) ); CREATE TABLE director ( name TEXT primary key, director TEXT, f...
Calculate the percentage of directors whose films grossed over $100 million.
SELECT CAST(COUNT(DISTINCT CASE WHEN CAST(REPLACE(trim(T1.total_gross, '$'), ',', '') AS REAL) > 100000000 THEN T3.director ELSE NULL END) AS REAL) * 100 / COUNT(DISTINCT T3.director) FROM movies_total_gross AS T1 INNER JOIN characters AS T2 ON T1.movie_title = T2.movie_title INNER JOIN director AS T3 ON T1.movie_title...
DIVIDE(COUNT(director where total_gross > 100000000), COUNT(director)) as percentage;
[ "characters.movie_title", "director.director", "director.name", "movies_total_gross.movie_title", "movies_total_gross.total_gross" ]
4,718
disney
CREATE TABLE characters ( movie_title TEXT primary key, release_date TEXT, hero TEXT, villian TEXT, song TEXT, foreign key (hero) references "voice-actors"(character) ); CREATE TABLE director ( name TEXT primary key, director TEXT, f...
Calculate the percentage of voice actors whose main character in the movie is in the Drama genre.
SELECT CAST(COUNT(CASE WHEN T1.genre = 'Drama' THEN T3.`voice-actor` ELSE NULL END) AS REAL) * 100 / COUNT(T3.`voice-actor`) FROM movies_total_gross AS T1 INNER JOIN characters AS T2 ON T1.movie_title = T2.movie_title INNER JOIN `voice-actors` AS T3 ON T3.movie = T1.movie_title
DIVIDE(COUNT(voice-actor where genre = 'Drama'), COUNT(voice-actor)) as percentage;
[ "characters.movie_title", "movies_total_gross.genre", "movies_total_gross.movie_title", "voice-actors.movie", "voice-actors.voice-actor" ]
4,719
disney
CREATE TABLE characters ( movie_title TEXT primary key, release_date TEXT, hero TEXT, villian TEXT, song TEXT, foreign key (hero) references "voice-actors"(character) ); CREATE TABLE director ( name TEXT primary key, director TEXT, f...
Name the first movie released by Disney.
SELECT movie_title FROM characters ORDER BY SUBSTR(release_date, LENGTH(release_date) - 1, LENGTH(release_date)) ASC LIMIT 1
The first movie released refers to movie_title where substr(release_date, length(release_date) - 1, length(release_date)) asc limit 1;
[ "characters.movie_title", "characters.release_date" ]
4,720
disney
CREATE TABLE characters ( movie_title TEXT primary key, release_date TEXT, hero TEXT, villian TEXT, song TEXT, foreign key (hero) references "voice-actors"(character) ); CREATE TABLE director ( name TEXT primary key, director TEXT, f...
How many movies were released by Disney between 2010 and 2016?
SELECT COUNT(movie_title) FROM characters WHERE SUBSTR(release_date, LENGTH(release_date) - 1, LENGTH(release_date)) BETWEEN '10' AND '16'
Movies refer to movie_title; released between 2010 and 2016 refers to substr(release_date, length(release_date) - 1, length(release_date)) between '10' and '16';
[ "characters.movie_title", "characters.release_date" ]
4,721
disney
CREATE TABLE characters ( movie_title TEXT primary key, release_date TEXT, hero TEXT, villian TEXT, song TEXT, foreign key (hero) references "voice-actors"(character) ); CREATE TABLE director ( name TEXT primary key, director TEXT, f...
Who was the first ever Disney villain?
SELECT villian FROM characters ORDER BY SUBSTR(release_date, LENGTH(release_date) - 1, LENGTH(release_date)) DESC LIMIT 1
the first ever villian is villian that was released before all others in time which refers to substr(release_date, length(release_date) - 1, length(release_date)) desc limit 1;
[ "characters.release_date", "characters.villian" ]
4,722
disney
CREATE TABLE characters ( movie_title TEXT primary key, release_date TEXT, hero TEXT, villian TEXT, song TEXT, foreign key (hero) references "voice-actors"(character) ); CREATE TABLE director ( name TEXT primary key, director TEXT, f...
What is Disney's highest grossing action movie?
SELECT movie_title FROM movies_total_gross WHERE genre = 'Action' ORDER BY CAST(REPLACE(trim(total_gross, '$'), ',', '') AS REAL) DESC LIMIT 1
action movie refers to movie_title where genre = 'Action'; highest grossing movie refers to MAX(total_gross)
[ "movies_total_gross.genre", "movies_total_gross.movie_title", "movies_total_gross.total_gross" ]
4,723
disney
CREATE TABLE characters ( movie_title TEXT primary key, release_date TEXT, hero TEXT, villian TEXT, song TEXT, foreign key (hero) references "voice-actors"(character) ); CREATE TABLE director ( name TEXT primary key, director TEXT, f...
Which actor voices Akela from The Jungle Book?
SELECT `voice-actor` FROM `voice-actors` WHERE character = 'Akela'
Akela refers character = 'Akela'; which actor voices refers to voice-actor;
[ "voice-actors.character", "voice-actors.voice-actor" ]
4,724
disney
CREATE TABLE characters ( movie_title TEXT primary key, release_date TEXT, hero TEXT, villian TEXT, song TEXT, foreign key (hero) references "voice-actors"(character) ); CREATE TABLE director ( name TEXT primary key, director TEXT, f...
Determine Disney's total box office gross between 2010 and 2016.
SELECT SUM(Total) FROM revenue WHERE `Year` BETWEEN 2010 AND 2016
between 2010 and 2016 refers to Year between 2010 and 2016;
[ "revenue.Total", "revenue.Year" ]
4,725
disney
CREATE TABLE characters ( movie_title TEXT primary key, release_date TEXT, hero TEXT, villian TEXT, song TEXT, foreign key (hero) references "voice-actors"(character) ); CREATE TABLE director ( name TEXT primary key, director TEXT, f...
Name the main character of Disney's most popular adventure movie based on its inflation-adjusted gross.
SELECT T2.hero FROM movies_total_gross AS T1 INNER JOIN characters AS T2 ON T1.movie_title = T2.movie_title WHERE T1.genre = 'Adventure' ORDER BY CAST(REPLACE(trim(T1.inflation_adjusted_gross, '$'), ',', '') AS REAL) DESC LIMIT 1
adventure movie refers to genre = 'Adventure'; the main character of the movie refers to hero; most popular movie based on its inflation-adjusted gross refers to where MAX(inflation_adjusted_gross);
[ "characters.hero", "characters.movie_title", "movies_total_gross.genre", "movies_total_gross.inflation_adjusted_gross", "movies_total_gross.movie_title" ]
4,726
disney
CREATE TABLE characters ( movie_title TEXT primary key, release_date TEXT, hero TEXT, villian TEXT, song TEXT, foreign key (hero) references "voice-actors"(character) ); CREATE TABLE director ( name TEXT primary key, director TEXT, f...
Name the director of Disney's lowest grossing movie.
SELECT T2.director FROM movies_total_gross AS T1 INNER JOIN director AS T2 ON T1.movie_title = T2.name ORDER BY CAST(REPLACE(trim(T1.total_gross, '$'), ',', '') AS REAL) ASC LIMIT 1
lowest grossing movie refers to movie_title where MIN(total_gross);
[ "director.director", "director.name", "movies_total_gross.movie_title", "movies_total_gross.total_gross" ]
4,727
disney
CREATE TABLE characters ( movie_title TEXT primary key, release_date TEXT, hero TEXT, villian TEXT, song TEXT, foreign key (hero) references "voice-actors"(character) ); CREATE TABLE director ( name TEXT primary key, director TEXT, f...
Find out what proportion of total revenue Walt Disney Parks and Resorts received in 2010.
SELECT SUM(`Walt Disney Parks and Resorts`) / SUM(Total) * 100 FROM revenue WHERE year = 2010
DIVIDE(Walt Disney Parks and Resorts where year = 2010), SUM(year = 2010) as percentage;
[ "revenue.Total", "revenue.`Walt Disney Parks and Resorts`", "revenue.year" ]
4,728
disney
CREATE TABLE characters ( movie_title TEXT primary key, release_date TEXT, hero TEXT, villian TEXT, song TEXT, foreign key (hero) references "voice-actors"(character) ); CREATE TABLE director ( name TEXT primary key, director TEXT, f...
Determine the average gross for Disney's PG-13-rated action movies.
SELECT SUM(CAST(REPLACE(trim(total_gross, '$'), ',', '') AS REAL)) / COUNT(movie_title) FROM movies_total_gross WHERE MPAA_rating = 'PG-13'
DIVIDE(SUM(total_gross where genre = 'Action' and MPAA_rating = 'PG-13'), COUNT(movie_title where genre = 'Action' and MPAA_rating = 'PG-13'));
[ "movies_total_gross.MPAA_rating", "movies_total_gross.movie_title", "movies_total_gross.total_gross" ]
4,729
disney
CREATE TABLE characters ( movie_title TEXT primary key, release_date TEXT, hero TEXT, villian TEXT, song TEXT, foreign key (hero) references "voice-actors"(character) ); CREATE TABLE director ( name TEXT primary key, director TEXT, f...
How many voice-actors were involved in the Bambi movie?
SELECT COUNT(DISTINCT 'voice-actor') FROM `voice-actors` WHERE movie = 'Bambi'
Bambi is the name of the movie which refers to movie = 'Bambi';
[ "voice-actors.movie" ]
4,730
disney
CREATE TABLE characters ( movie_title TEXT primary key, release_date TEXT, hero TEXT, villian TEXT, song TEXT, foreign key (hero) references "voice-actors"(character) ); CREATE TABLE director ( name TEXT primary key, director TEXT, f...
Find the estimated inflation rate that was used to adjust the 1995 box office revenue for Disney's films.
SELECT SUM(CAST(REPLACE(trim(inflation_adjusted_gross, '$'), ',', '') AS REAL)) / SUM(CAST(REPLACE(trim(total_gross, '$'), ',', '') AS REAL)) FROM movies_total_gross WHERE SUBSTR(release_date, LENGTH(release_date) - 3, LENGTH(release_date)) = '1995' GROUP BY SUBSTR(release_date, LENGTH(release_date) - 3, LENGTH(release...
DIVIDE(inflation_adjusted_gross, total_gross) as percentage where substr(release_date, length(release_date) - 3, length(release_date)) = '1995';
[ "movies_total_gross.inflation_adjusted_gross", "movies_total_gross.release_date", "movies_total_gross.total_gross" ]
4,731
disney
CREATE TABLE characters ( movie_title TEXT primary key, release_date TEXT, hero TEXT, villian TEXT, song TEXT, foreign key (hero) references "voice-actors"(character) ); CREATE TABLE director ( name TEXT primary key, director TEXT, f...
What is the difference in the current gross of Cars and its sequel, Cars 2? Which movie is more popular?
SELECT SUM(CASE WHEN movie_title = 'Cars' THEN CAST(REPLACE(trim(inflation_adjusted_gross, '$'), ',', '') AS REAL) ELSE 0 END), SUM(CASE WHEN movie_title = 'Cars 2' THEN CAST(REPLACE(trim(inflation_adjusted_gross, '$'), ',', '') AS REAL) ELSE 0 END) FROM movies_total_gross
SUBTRACT(inflation_adjusted_gross where movie_title = 'Cars', inflation_adjusted_gross where movie_title = 'Cars 2'); more popular movie refers to movie_title where MAX(inflation_adjusted_gross);
[ "movies_total_gross.inflation_adjusted_gross", "movies_total_gross.movie_title" ]
4,732
disney
CREATE TABLE characters ( movie_title TEXT primary key, release_date TEXT, hero TEXT, villian TEXT, song TEXT, foreign key (hero) references "voice-actors"(character) ); CREATE TABLE director ( name TEXT primary key, director TEXT, f...
Name the most recent movie directed by Chris Buck. Which of his movies was more successful in terms of grossing? Use the current gross for comparison.
SELECT T1.movie_title, MAX(T1.release_date), MAX(T1.inflation_adjusted_gross) FROM movies_total_gross AS T1 INNER JOIN director AS T2 ON T1.movie_title = T2.name WHERE T2.director = 'Chris Buck'
Chris Buck refers to director = 'Chris Buck'; the most recent movie refers to movie_title where MAX(release_date); current gross refers to inflation_adjusted_gross; more successful movie refers to MAX(inflation_adjusted_gross);
[ "director.director", "director.name", "movies_total_gross.inflation_adjusted_gross", "movies_total_gross.movie_title", "movies_total_gross.release_date" ]
4,733
disney
CREATE TABLE characters ( movie_title TEXT primary key, release_date TEXT, hero TEXT, villian TEXT, song TEXT, foreign key (hero) references "voice-actors"(character) ); CREATE TABLE director ( name TEXT primary key, director TEXT, f...
Name actors who voiced more than five Disney characters.
SELECT 'voice-actor' FROM `voice-actors` GROUP BY 'voice-actor' HAVING COUNT(movie) > 5
Actors who voiced refer to voice-actor;
[ "voice-actors.movie" ]
4,734
disney
CREATE TABLE characters ( movie_title TEXT primary key, release_date TEXT, hero TEXT, villian TEXT, song TEXT, foreign key (hero) references "voice-actors"(character) ); CREATE TABLE director ( name TEXT primary key, director TEXT, f...
Name the top 5 highest-grossing Disney movies adjusted for inflation. Identify the percentage they contributed to the total of Disney's current gross.
SELECT SUM(CASE WHEN CAST(REPLACE(trim(inflation_adjusted_gross, '$'), ',', '') AS REAL) > 1236035515 THEN CAST(REPLACE(trim(inflation_adjusted_gross, '$'), ',', '') AS REAL) ELSE 0 END) * 100 / SUM(CAST(REPLACE(trim(inflation_adjusted_gross, '$'), ',', '') AS REAL)) FROM movies_total_gross
The top 5 highest-grossing movies adjusted for inflation refer to MAX(inflation_adjusted_gross)LIMIT 5; DIVIDE(SUM(MAX(inflation_adjusted_gross LIMIT 5)), SUM(inflation_adjusted_gross)) as percentage;
[ "movies_total_gross.inflation_adjusted_gross" ]
4,735
disney
CREATE TABLE characters ( movie_title TEXT primary key, release_date TEXT, hero TEXT, villian TEXT, song TEXT, foreign key (hero) references "voice-actors"(character) ); CREATE TABLE director ( name TEXT primary key, director TEXT, f...
Among all Disney movies directed by Gary Trousdale, determine the percentage that earned over USD100m based on actual grossing.
SELECT CAST(COUNT(CASE WHEN CAST(REPLACE(trim(T1.total_gross, '$'), ',', '') AS REAL) > 100000000 THEN T1.movie_title ELSE NULL END) AS REAL) * 100 / COUNT(T1.movie_title) FROM movies_total_gross AS T1 INNER JOIN director AS T2 ON T1.movie_title = T2.name WHERE T2.director = 'Gary Trousdale'
DIVIDE(COUNT(movie_title where director = 'Gary Trousdale' and total_gross > 100000000), COUNT(movie_title where director = 'Gary Trousdale')) as percentage;
[ "director.director", "director.name", "movies_total_gross.movie_title", "movies_total_gross.total_gross" ]
4,736
legislator
CREATE TABLE current ( ballotpedia_id TEXT, bioguide_id TEXT, birthday_bio DATE, cspan_id REAL, fec_id TEXT, first_name TEXT, gender_bio TEXT, google_entity_id_id TEXT, govtrack_id INTEGER, house_history_id ...
How many current legislators do not have an account on ballotpedia.org ?
SELECT COUNT(*) FROM current WHERE ballotpedia_id = '' OR ballotpedia_id IS NULL
do not have an account on ballotpedia.org refers to ballotpedia_id IS NULL OR ballotpedia_id = ''
[ "current.ballotpedia_id" ]
4,737
legislator
CREATE TABLE current ( ballotpedia_id TEXT, bioguide_id TEXT, birthday_bio DATE, cspan_id REAL, fec_id TEXT, first_name TEXT, gender_bio TEXT, google_entity_id_id TEXT, govtrack_id INTEGER, house_history_id ...
Please list the official full names of all the current legislators who do not have an account on C-SPAN's video website.
SELECT official_full_name FROM current WHERE cspan_id IS NULL OR cspan_id = ''
legislators who do not have an account refers to cspan_id IS NULL OR cspan_id = ''
[ "current.cspan_id", "current.official_full_name" ]
4,738
legislator
CREATE TABLE current ( ballotpedia_id TEXT, bioguide_id TEXT, birthday_bio DATE, cspan_id REAL, fec_id TEXT, first_name TEXT, gender_bio TEXT, google_entity_id_id TEXT, govtrack_id INTEGER, house_history_id ...
How many current legislators were born after the year 1960?
SELECT COUNT(bioguide_id) FROM current WHERE birthday_bio >= '1961-01-01'
born after the year 1960 refers to birthday_bio > '1960-01-01'
[ "current.bioguide_id", "current.birthday_bio" ]
4,739
legislator
CREATE TABLE current ( ballotpedia_id TEXT, bioguide_id TEXT, birthday_bio DATE, cspan_id REAL, fec_id TEXT, first_name TEXT, gender_bio TEXT, google_entity_id_id TEXT, govtrack_id INTEGER, house_history_id ...
Among all the current female legislators, how many of them have not been registered in Federal Election Commission data?
SELECT COUNT(*) FROM current WHERE (fec_id IS NULL OR fec_id = '') AND gender_bio = 'F'
have not been registered refers to fec_id IS NULL; female refers to gender_bio = 'F'
[ "current.fec_id", "current.gender_bio" ]
4,740
legislator
CREATE TABLE current ( ballotpedia_id TEXT, bioguide_id TEXT, birthday_bio DATE, cspan_id REAL, fec_id TEXT, first_name TEXT, gender_bio TEXT, google_entity_id_id TEXT, govtrack_id INTEGER, house_history_id ...
What is the google entity ID of current legislator Sherrod Brown?
SELECT google_entity_id_id FROM current WHERE official_full_name = 'Sherrod Brown'
Sherrod Brown is an official_full_name
[ "current.google_entity_id_id", "current.official_full_name" ]
4,741
legislator
CREATE TABLE current ( ballotpedia_id TEXT, bioguide_id TEXT, birthday_bio DATE, cspan_id REAL, fec_id TEXT, first_name TEXT, gender_bio TEXT, google_entity_id_id TEXT, govtrack_id INTEGER, house_history_id ...
Which current legislator is older, Sherrod Brown or Maria Cantwell?
SELECT official_full_name FROM current WHERE official_full_name = 'Sherrod Brown' OR official_full_name = 'Maria Cantwell' ORDER BY birthday_bio LIMIT 1
older refers to MAX(birthday_bio); 'Sherrod Brown' and 'Maria Cantwell' are official_full_name
[ "current.birthday_bio", "current.official_full_name" ]
4,742
legislator
CREATE TABLE current ( ballotpedia_id TEXT, bioguide_id TEXT, birthday_bio DATE, cspan_id REAL, fec_id TEXT, first_name TEXT, gender_bio TEXT, google_entity_id_id TEXT, govtrack_id INTEGER, house_history_id ...
What is the username of the current official Facebook presence of current legislator Todd Young?
SELECT T1.facebook FROM `social-media` AS T1 INNER JOIN current AS T2 ON T2.bioguide_id = T1.bioguide WHERE T2.official_full_name = 'Todd Young'
Todd Young is an official_full_name; username of current official Facebook presences refers to facebook;
[ "current.bioguide_id", "current.official_full_name", "social-media.bioguide", "social-media.facebook" ]
4,743
legislator
CREATE TABLE current ( ballotpedia_id TEXT, bioguide_id TEXT, birthday_bio DATE, cspan_id REAL, fec_id TEXT, first_name TEXT, gender_bio TEXT, google_entity_id_id TEXT, govtrack_id INTEGER, house_history_id ...
How many current legislators do not have an account on instagram?
SELECT COUNT(*) FROM `social-media` AS T1 INNER JOIN current AS T2 ON T1.bioguide = T2.bioguide_id WHERE T1.instagram IS NULL
do not have an account on instagram refers to instagram is null
[ "current.bioguide_id", "social-media.bioguide", "social-media.instagram" ]
4,744
legislator
CREATE TABLE current ( ballotpedia_id TEXT, bioguide_id TEXT, birthday_bio DATE, cspan_id REAL, fec_id TEXT, first_name TEXT, gender_bio TEXT, google_entity_id_id TEXT, govtrack_id INTEGER, house_history_id ...
To which current legislator does twitter ID234128524 belong? Please give his or her full official name.
SELECT T1.official_full_name FROM current AS T1 INNER JOIN `social-media` AS T2 ON T2.bioguide = T1.bioguide_id WHERE T2.twitter_id = 234128524
full official name refers to official_full_name
[ "current.bioguide_id", "current.official_full_name", "social-media.bioguide", "social-media.twitter_id" ]
4,745
legislator
CREATE TABLE current ( ballotpedia_id TEXT, bioguide_id TEXT, birthday_bio DATE, cspan_id REAL, fec_id TEXT, first_name TEXT, gender_bio TEXT, google_entity_id_id TEXT, govtrack_id INTEGER, house_history_id ...
Please list the current official YouTube usernames of all the current female legislators.
SELECT T2.youtube FROM current AS T1 INNER JOIN `social-media` AS T2 ON T2.bioguide = T1.bioguide_id WHERE T1.gender_bio = 'F'
official YouTube usernames refers to youtube; female refers to gender_bio = 'F'
[ "current.bioguide_id", "current.gender_bio", "social-media.bioguide", "social-media.youtube" ]
4,746
legislator
CREATE TABLE current ( ballotpedia_id TEXT, bioguide_id TEXT, birthday_bio DATE, cspan_id REAL, fec_id TEXT, first_name TEXT, gender_bio TEXT, google_entity_id_id TEXT, govtrack_id INTEGER, house_history_id ...
What is the username of the current official Facebook presence of the oldest current legislator?
SELECT T2.facebook FROM current AS T1 INNER JOIN `social-media` AS T2 ON T2.bioguide = T1.bioguide_id ORDER BY T1.birthday_bio LIMIT 1
username of the official Facebook refers to facebook; the oldest refers to MAX(birthday_bio)
[ "current.bioguide_id", "current.birthday_bio", "social-media.bioguide", "social-media.facebook" ]
4,747
legislator
CREATE TABLE current ( ballotpedia_id TEXT, bioguide_id TEXT, birthday_bio DATE, cspan_id REAL, fec_id TEXT, first_name TEXT, gender_bio TEXT, google_entity_id_id TEXT, govtrack_id INTEGER, house_history_id ...
Among the current legislators who do not have accounts on OpenSecrets.org., how many of them do not have instagram accounts either?
SELECT SUM(CASE WHEN T1.instagram IS NULL THEN 1 ELSE 0 END) AS count FROM `social-media` AS T1 INNER JOIN current AS T2 ON T1.bioguide = T2.bioguide_id WHERE T2.opensecrets_id IS NULL OR T2.opensecrets_id = ''
do not have accounts on OpenSecrets.org refers to opensecrets_ID is NULL OR opensecrets_id = ''; do not have instagram accounts refers to instagram is null
[ "current.bioguide_id", "current.opensecrets_id", "social-media.bioguide", "social-media.instagram" ]
4,748
legislator
CREATE TABLE current ( ballotpedia_id TEXT, bioguide_id TEXT, birthday_bio DATE, cspan_id REAL, fec_id TEXT, first_name TEXT, gender_bio TEXT, google_entity_id_id TEXT, govtrack_id INTEGER, house_history_id ...
Current legislator Roger F. Wicker has not been a representative for how many terms?
SELECT SUM(CASE WHEN T1.official_full_name = 'Roger F. Wicker' THEN 1 ELSE 0 END) AS count FROM current AS T1 INNER JOIN `current-terms` AS T2 ON T1.bioguide_id = T2.bioguide WHERE T2.district IS NULL OR T2.district = ''
Roger F. Wicker is an official_full_name; not a representative refers to district IS NULL OR district = ''
[ "current-terms.bioguide", "current-terms.district", "current.bioguide_id", "current.official_full_name" ]
4,749
legislator
CREATE TABLE current ( ballotpedia_id TEXT, bioguide_id TEXT, birthday_bio DATE, cspan_id REAL, fec_id TEXT, first_name TEXT, gender_bio TEXT, google_entity_id_id TEXT, govtrack_id INTEGER, house_history_id ...
For how many terms has current legislator Sherrod Brown served?
SELECT COUNT(*) FROM current AS T1 INNER JOIN `current-terms` AS T2 ON T1.bioguide_id = T2.bioguide WHERE T1.official_full_name = 'Sherrod Brown'
Sherrod Brown is an official_full_name
[ "current-terms.bioguide", "current.bioguide_id", "current.official_full_name" ]
4,750
legislator
CREATE TABLE current ( ballotpedia_id TEXT, bioguide_id TEXT, birthday_bio DATE, cspan_id REAL, fec_id TEXT, first_name TEXT, gender_bio TEXT, google_entity_id_id TEXT, govtrack_id INTEGER, house_history_id ...
Please list the official full names of all the current legislators who were once a senator during his or her terms.
SELECT T2.official_full_name FROM `current-terms` AS T1 INNER JOIN current AS T2 ON T2.bioguide_id = T1.bioguide WHERE T1.state_rank IS NOT NULL
once a senator during term refers to state_rank IS NOT NULL
[ "current-terms.bioguide", "current-terms.state_rank", "current.bioguide_id", "current.official_full_name" ]
4,751
legislator
CREATE TABLE current ( ballotpedia_id TEXT, bioguide_id TEXT, birthday_bio DATE, cspan_id REAL, fec_id TEXT, first_name TEXT, gender_bio TEXT, google_entity_id_id TEXT, govtrack_id INTEGER, house_history_id ...
For which state did current legislator Sherrod Brown serve during his term that started on 1993/1/5?
SELECT T1.state FROM `current-terms` AS T1 INNER JOIN current AS T2 ON T2.bioguide_id = T1.bioguide WHERE T1.start = '1993-01-05' AND T2.official_full_name = 'Sherrod Brown'
Sherrod Brown is an full official name; started on 1993/1/5 refers to start = '1993-01-05';
[ "current-terms.bioguide", "current-terms.start", "current-terms.state", "current.bioguide_id", "current.official_full_name" ]
4,752
legislator
CREATE TABLE current ( ballotpedia_id TEXT, bioguide_id TEXT, birthday_bio DATE, cspan_id REAL, fec_id TEXT, first_name TEXT, gender_bio TEXT, google_entity_id_id TEXT, govtrack_id INTEGER, house_history_id ...
Among all the female current legislators, how many of them have served for more than 4 terms?
SELECT COUNT(CID) FROM ( SELECT T1.bioguide_id AS CID FROM current AS T1 INNER JOIN `current-terms` AS T2 ON T1.bioguide_id = T2.bioguide WHERE T1.gender_bio = 'F' GROUP BY T2.bioguide HAVING COUNT(T2.bioguide) > 4 )
female refers to gender_bio = 'F'; served for more than 4 terms refers to COUNT(bioguide > 4)
[ "current-terms.bioguide", "current.bioguide_id", "current.gender_bio" ]
4,753
legislator
CREATE TABLE current ( ballotpedia_id TEXT, bioguide_id TEXT, birthday_bio DATE, cspan_id REAL, fec_id TEXT, first_name TEXT, gender_bio TEXT, google_entity_id_id TEXT, govtrack_id INTEGER, house_history_id ...
Among the current legislators who have served for more than 6 terms, how many of them were born after 1960?
SELECT COUNT(CID) FROM ( SELECT T1.bioguide_id AS CID FROM current AS T1 INNER JOIN `current-terms` AS T2 ON T1.bioguide_id = T2.bioguide WHERE T1.birthday_bio >= '1960-01-01' GROUP BY T2.bioguide HAVING COUNT(T2.bioguide) > 6 )
served for more than 6 terms refers to COUNT(bioguide > 6); born after 1960 refers to birthday_bio > = '1960-01-01'
[ "current-terms.bioguide", "current.bioguide_id", "current.birthday_bio" ]
4,754
legislator
CREATE TABLE current ( ballotpedia_id TEXT, bioguide_id TEXT, birthday_bio DATE, cspan_id REAL, fec_id TEXT, first_name TEXT, gender_bio TEXT, google_entity_id_id TEXT, govtrack_id INTEGER, house_history_id ...
What is the average number of terms for a current female legislator?
SELECT CAST(COUNT(T2.bioguide) AS REAL) / COUNT(DISTINCT T1.bioguide_id) FROM current AS T1 INNER JOIN `current-terms` AS T2 ON T1.bioguide_id = T2.bioguide WHERE T1.gender_bio = 'F'
female refers to gender_bio = 'F'; calculation refers to DIVIDE(COUNT(bioguide WHERE gender_bio = 'F'), COUNT(bioguide_id))
[ "current-terms.bioguide", "current.bioguide_id", "current.gender_bio" ]
4,755
legislator
CREATE TABLE current ( ballotpedia_id TEXT, bioguide_id TEXT, birthday_bio DATE, cspan_id REAL, fec_id TEXT, first_name TEXT, gender_bio TEXT, google_entity_id_id TEXT, govtrack_id INTEGER, house_history_id ...
Among all the current legislators whose religion is Roman Catholic, what is the percentage of the ones without an instagram account?
SELECT CAST(SUM(CASE WHEN T1.instagram IS NULL THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(*) FROM `social-media` AS T1 INNER JOIN current AS T2 ON T1.bioguide = T2.bioguide_id WHERE T2.religion_bio = 'Roman Catholic'
religion is Roman Catholic refers to religion_bio = 'Roman Catholic'; calculation = MULTIPLY(DIVIDE(COUNT(instagram is null), COUNT(bioguide_id)), 1.0)
[ "current.bioguide_id", "current.religion_bio", "social-media.bioguide", "social-media.instagram" ]
4,756
legislator
CREATE TABLE current ( ballotpedia_id TEXT, bioguide_id TEXT, birthday_bio DATE, cspan_id REAL, fec_id TEXT, first_name TEXT, gender_bio TEXT, google_entity_id_id TEXT, govtrack_id INTEGER, house_history_id ...
How many males were members of the current legislators?
SELECT COUNT(*) FROM current WHERE gender_bio = 'M'
male refers to gender_bio = 'M'
[ "current.gender_bio" ]
4,757
legislator
CREATE TABLE current ( ballotpedia_id TEXT, bioguide_id TEXT, birthday_bio DATE, cspan_id REAL, fec_id TEXT, first_name TEXT, gender_bio TEXT, google_entity_id_id TEXT, govtrack_id INTEGER, house_history_id ...
How many current legislators chose Republican as their political party?
SELECT COUNT(*) FROM `current-terms` WHERE party = 'Republican'
chose Republican as their political party refers to party = 'Republican'
[ "current-terms.party" ]
4,758
legislator
CREATE TABLE current ( ballotpedia_id TEXT, bioguide_id TEXT, birthday_bio DATE, cspan_id REAL, fec_id TEXT, first_name TEXT, gender_bio TEXT, google_entity_id_id TEXT, govtrack_id INTEGER, house_history_id ...
How many legislators have an Instagram account?
SELECT COUNT(*) FROM `social-media` WHERE instagram IS NOT NULL AND instagram <> ''
have an Instagram account refers to instagram is NOT null and instagram <>''
[ "social-media.instagram" ]
4,759
legislator
CREATE TABLE current ( ballotpedia_id TEXT, bioguide_id TEXT, birthday_bio DATE, cspan_id REAL, fec_id TEXT, first_name TEXT, gender_bio TEXT, google_entity_id_id TEXT, govtrack_id INTEGER, house_history_id ...
How many females were members of the past legislators?
SELECT COUNT(*) FROM historical WHERE gender_bio = 'F'
female refers to gender_bio = 'F'
[ "historical.gender_bio" ]
4,760
legislator
CREATE TABLE current ( ballotpedia_id TEXT, bioguide_id TEXT, birthday_bio DATE, cspan_id REAL, fec_id TEXT, first_name TEXT, gender_bio TEXT, google_entity_id_id TEXT, govtrack_id INTEGER, house_history_id ...
How many male legislators are Roman Catholic?
SELECT COUNT(*) FROM current WHERE religion_bio = 'Roman Catholic' AND gender_bio = 'M'
male refers to gender_bio = 'M'; Roman Catholic is a religion_bio
[ "current.gender_bio", "current.religion_bio" ]
4,761
legislator
CREATE TABLE current ( ballotpedia_id TEXT, bioguide_id TEXT, birthday_bio DATE, cspan_id REAL, fec_id TEXT, first_name TEXT, gender_bio TEXT, google_entity_id_id TEXT, govtrack_id INTEGER, house_history_id ...
What type of political party Sherrod Brown has in 2005?
SELECT T1.party FROM `current-terms` AS T1 INNER JOIN current AS T2 ON T2.bioguide_id = T1.bioguide WHERE T2.first_name = 'Sherrod' AND T2.last_name = 'Brown' AND T1.start LIKE '%2005%'
political party refers to party; Sherrod Brown is an official_full_name; official_full_name refers to first_name, last_name; 2005 refers to start = 2005
[ "current-terms.bioguide", "current-terms.party", "current-terms.start", "current.bioguide_id", "current.first_name", "current.last_name" ]
4,762
legislator
CREATE TABLE current ( ballotpedia_id TEXT, bioguide_id TEXT, birthday_bio DATE, cspan_id REAL, fec_id TEXT, first_name TEXT, gender_bio TEXT, google_entity_id_id TEXT, govtrack_id INTEGER, house_history_id ...
List the full name of all the senior senators in year 2013.
SELECT T2.official_full_name FROM `current-terms` AS T1 INNER JOIN current AS T2 ON T2.bioguide_id = T1.bioguide WHERE T1.state_rank = 'senior' AND T1.type = 'sen' AND T1.start LIKE '2013%'
full name refers to official_full_name; senior refers to state_rank = 'senior'; senators refers to type = 'sen'; 2013 refers to start LIKE '2013%'
[ "current-terms.bioguide", "current-terms.start", "current-terms.state_rank", "current-terms.type", "current.bioguide_id", "current.official_full_name" ]
4,763
legislator
CREATE TABLE current ( ballotpedia_id TEXT, bioguide_id TEXT, birthday_bio DATE, cspan_id REAL, fec_id TEXT, first_name TEXT, gender_bio TEXT, google_entity_id_id TEXT, govtrack_id INTEGER, house_history_id ...
What is the current official Youtube username of Chris Van Hollen?
SELECT T2.youtube FROM current AS T1 INNER JOIN `social-media` AS T2 ON T2.bioguide = T1.bioguide_id WHERE T1.official_full_name = 'Chris Van Hollen'
Youtube username refers to youtube; Chris Van Hollen is an official_full_name
[ "current.bioguide_id", "current.official_full_name", "social-media.bioguide", "social-media.youtube" ]
4,764
legislator
CREATE TABLE current ( ballotpedia_id TEXT, bioguide_id TEXT, birthday_bio DATE, cspan_id REAL, fec_id TEXT, first_name TEXT, gender_bio TEXT, google_entity_id_id TEXT, govtrack_id INTEGER, house_history_id ...
How many official social media does Mark Warner have?
SELECT CASE WHEN T1.facebook IS NOT NULL THEN 1 END + CASE WHEN T1.instagram IS NOT NULL THEN 1 END + CASE WHEN T1.twitter IS NOT NULL THEN 1 END + CASE WHEN T1.youtube IS NOT NULL THEN 1 END AS COUNTSOCIAL FROM `social-media` AS T1 INNER JOIN current AS T2 ON T1.bioguide = T2.bioguide_id WHERE T2.first_name = 'Mark' A...
official social media refers to facebook is not null, instagram is not null, twitter is not null, youtube is not null; Mark Warner is an official_full_name; official_full_name refers to first_name, last_name
[ "current.bioguide_id", "current.first_name", "current.last_name", "social-media.bioguide", "social-media.facebook", "social-media.instagram", "social-media.twitter", "social-media.youtube" ]
4,765
legislator
CREATE TABLE current ( ballotpedia_id TEXT, bioguide_id TEXT, birthday_bio DATE, cspan_id REAL, fec_id TEXT, first_name TEXT, gender_bio TEXT, google_entity_id_id TEXT, govtrack_id INTEGER, house_history_id ...
List the last name of all current legislators who live in California.
SELECT T1.last_name FROM current AS T1 INNER JOIN `current-terms` AS T2 ON T1.bioguide_id = T2.bioguide WHERE T2.state = 'CA' GROUP BY T1.last_name
California refers to state = 'CA'
[ "current-terms.bioguide", "current-terms.state", "current.bioguide_id", "current.last_name" ]
4,766
legislator
CREATE TABLE current ( ballotpedia_id TEXT, bioguide_id TEXT, birthday_bio DATE, cspan_id REAL, fec_id TEXT, first_name TEXT, gender_bio TEXT, google_entity_id_id TEXT, govtrack_id INTEGER, house_history_id ...
List the full name of all current female senators.
SELECT T2.first_name, T2.last_name FROM `current-terms` AS T1 INNER JOIN current AS T2 ON T2.bioguide_id = T1.bioguide WHERE T1.type = 'sen' AND T2.gender_bio = 'F' GROUP BY T2.ballotpedia_id
full name refers to official_full_name; female refers to gender_bio = 'F'; senators refers to type = 'sen'
[ "current-terms.bioguide", "current-terms.type", "current.ballotpedia_id", "current.bioguide_id", "current.first_name", "current.gender_bio", "current.last_name" ]
4,767
legislator
CREATE TABLE current ( ballotpedia_id TEXT, bioguide_id TEXT, birthday_bio DATE, cspan_id REAL, fec_id TEXT, first_name TEXT, gender_bio TEXT, google_entity_id_id TEXT, govtrack_id INTEGER, house_history_id ...
What is the numeric ID of Chris Van Hollen on GovTrack.us?
SELECT T2.govtrack FROM current AS T1 INNER JOIN `social-media` AS T2 ON T2.bioguide = T1.bioguide_id WHERE T1.official_full_name = 'Chris Van Hollen'
Chris Van Hollen is an official_full_name; numeric ID on GovTrack.us refers to govtrack
[ "current.bioguide_id", "current.official_full_name", "social-media.bioguide", "social-media.govtrack" ]
4,768
legislator
CREATE TABLE current ( ballotpedia_id TEXT, bioguide_id TEXT, birthday_bio DATE, cspan_id REAL, fec_id TEXT, first_name TEXT, gender_bio TEXT, google_entity_id_id TEXT, govtrack_id INTEGER, house_history_id ...
What is the current official Twitter handle of Roger F. Wicker?
SELECT T2.twitter FROM current AS T1 INNER JOIN `social-media` AS T2 ON T2.bioguide = T1.bioguide_id WHERE T1.official_full_name = 'Roger F. Wicker'
Twitter handle refers to twitter; Roger F. Wicker is an official_full_name
[ "current.bioguide_id", "current.official_full_name", "social-media.bioguide", "social-media.twitter" ]
4,769
legislator
CREATE TABLE current ( ballotpedia_id TEXT, bioguide_id TEXT, birthday_bio DATE, cspan_id REAL, fec_id TEXT, first_name TEXT, gender_bio TEXT, google_entity_id_id TEXT, govtrack_id INTEGER, house_history_id ...
List the full name of all past legislators that chose Pro-Administration as their political party in year 1791.
SELECT T1.first_name, T1.last_name FROM historical AS T1 INNER JOIN `historical-terms` AS T2 ON T1.bioguide_id = T2.bioguide WHERE T2.party = 'Pro-Administration' AND CAST(T2.start AS DATE) <= 1791 AND CAST(T2.END AS DATE) >= 1791
full name refers to official_full_name; chose Pro-Administration as their political party refers to party = 'Pro-Administration'; 1791 refers to start < = 1791 AND END > = 1791
[ "historical-terms.END", "historical-terms.bioguide", "historical-terms.party", "historical-terms.start", "historical.bioguide_id", "historical.first_name", "historical.last_name" ]
4,770
legislator
CREATE TABLE current ( ballotpedia_id TEXT, bioguide_id TEXT, birthday_bio DATE, cspan_id REAL, fec_id TEXT, first_name TEXT, gender_bio TEXT, google_entity_id_id TEXT, govtrack_id INTEGER, house_history_id ...
Provide the full name of all current female legislators that chose Republican as their political party.
SELECT T1.first_name, T1.last_name FROM current AS T1 INNER JOIN `current-terms` AS T2 ON T1.bioguide_id = T2.bioguide WHERE T2.party = 'Republican' AND T1.gender_bio = 'F' AND T2.END > DATE() GROUP BY T1.bioguide_id
full name refers to official_full_name; official_full_name refers to first_name, last_name; female refers to gender_bio = 'F'; chose Republican as their political party refers to party = 'Republican'; current legislators refers to END > Date()
[ "current-terms.END", "current-terms.bioguide", "current-terms.party", "current.bioguide_id", "current.first_name", "current.gender_bio", "current.last_name" ]
4,771
legislator
CREATE TABLE current ( ballotpedia_id TEXT, bioguide_id TEXT, birthday_bio DATE, cspan_id REAL, fec_id TEXT, first_name TEXT, gender_bio TEXT, google_entity_id_id TEXT, govtrack_id INTEGER, house_history_id ...
What is the district number that Chris Van Hollen serving?
SELECT T2.district FROM current AS T1 INNER JOIN `current-terms` AS T2 ON T1.bioguide_id = T2.bioguide WHERE T1.official_full_name = 'Chris Van Hollen' AND T2.district IS NOT NULL GROUP BY T2.district
Chris Van Hollen is an official_full_name
[ "current-terms.bioguide", "current-terms.district", "current.bioguide_id", "current.official_full_name" ]
4,772
legislator
CREATE TABLE current ( ballotpedia_id TEXT, bioguide_id TEXT, birthday_bio DATE, cspan_id REAL, fec_id TEXT, first_name TEXT, gender_bio TEXT, google_entity_id_id TEXT, govtrack_id INTEGER, house_history_id ...
How many times did Richard Durbin become a legislator in district 20?
SELECT SUM(CASE WHEN T2.district = 20 THEN 1 ELSE 0 END) AS count FROM current AS T1 INNER JOIN `current-terms` AS T2 ON T1.bioguide_id = T2.bioguide WHERE T1.first_name = 'Richard' AND T1.last_name = 'Durbin'
Richard Durbin is an official_full_name;  official_full_name refers to first_name, last_name; district 20 refers to district = 20
[ "current-terms.bioguide", "current-terms.district", "current.bioguide_id", "current.first_name", "current.last_name" ]
4,773
legislator
CREATE TABLE current ( ballotpedia_id TEXT, bioguide_id TEXT, birthday_bio DATE, cspan_id REAL, fec_id TEXT, first_name TEXT, gender_bio TEXT, google_entity_id_id TEXT, govtrack_id INTEGER, house_history_id ...
Calculate the average number of current male legislators who chose Democrat from 2000 until 2021.
SELECT CAST(COUNT(T1.bioguide_id) AS REAL) / 22 FROM current AS T1 INNER JOIN `current-terms` AS T2 ON T1.bioguide_id = T2.bioguide WHERE T1.gender_bio = 'M' AND CAST(T2.start AS DATE) >= 2000 AND CAST(T2.END AS DATE) <= 2021 AND T2.party = 'Democrat'
male refers to gender_bio = 'M'; legislators who chose Democrat refers to party = 'Democrat'; from 2000 until 2021 refers to start > = 2000 AND END < = 2021; calculation = DIVIDE(COUNT(bioguide_id), 22)
[ "current-terms.END", "current-terms.bioguide", "current-terms.party", "current-terms.start", "current.bioguide_id", "current.gender_bio" ]
4,774
legislator
CREATE TABLE current ( ballotpedia_id TEXT, bioguide_id TEXT, birthday_bio DATE, cspan_id REAL, fec_id TEXT, first_name TEXT, gender_bio TEXT, google_entity_id_id TEXT, govtrack_id INTEGER, house_history_id ...
Calculate the percentage of the total number of current female legislators and past female legislators. State which one has the highest value.
SELECT CAST(COUNT(CASE WHEN current.gender_bio = 'F' THEN current.bioguide_id ELSE NULL END) AS REAL) * 100 / ( SELECT COUNT(CASE WHEN historical.gender_bio = 'F' THEN historical.bioguide_id ELSE NULL END) FROM historical ) FROM current
female refers to gender_bio = 'F'; calculation = MULTIPLY(DIVIDE(COUNT(current.gender_bio = 'F' THEN current.bioguide_id)), (COUNT(historical.gender_bio = 'F' then historical.bioguide_id)), 1.0); the highest value refers to MAX(calculation)
[ "current.bioguide_id", "current.gender_bio", "historical.bioguide_id", "historical.gender_bio" ]
4,775
legislator
CREATE TABLE current ( ballotpedia_id TEXT, bioguide_id TEXT, birthday_bio DATE, cspan_id REAL, fec_id TEXT, first_name TEXT, gender_bio TEXT, google_entity_id_id TEXT, govtrack_id INTEGER, house_history_id ...
Give the YouTube ID of the channel 'RepWassermanSchultz.'
SELECT youtube_id FROM `social-media` WHERE youtube = 'RepWassermanSchultz'
RepWassermanSchultz refers to youtube
[ "social-media.youtube", "social-media.youtube_id" ]
4,776
legislator
CREATE TABLE current ( ballotpedia_id TEXT, bioguide_id TEXT, birthday_bio DATE, cspan_id REAL, fec_id TEXT, first_name TEXT, gender_bio TEXT, google_entity_id_id TEXT, govtrack_id INTEGER, house_history_id ...
What are the Facebook, Twitter and YouTube usernames of Adam Kinzinger?
SELECT T2.facebook FROM current AS T1 INNER JOIN `social-media` AS T2 ON T2.bioguide = T1.bioguide_id WHERE T1.official_full_name = 'Adam Kinzinger'
Facebook, Twitter and YouTube usernames refers to facebook, twitter, youtube; Adam Kinzinger is an official_full_name
[ "current.bioguide_id", "current.official_full_name", "social-media.bioguide", "social-media.facebook" ]
4,777
legislator
CREATE TABLE current ( ballotpedia_id TEXT, bioguide_id TEXT, birthday_bio DATE, cspan_id REAL, fec_id TEXT, first_name TEXT, gender_bio TEXT, google_entity_id_id TEXT, govtrack_id INTEGER, house_history_id ...
Which party does Christopher Henderson Clark belong to?
SELECT T1.party FROM `historical-terms` AS T1 INNER JOIN historical AS T2 ON T2.bioguide_id = T1.bioguide WHERE T2.first_name OR T2.middle_name OR T2.last_name = 'ChristopherHendersonClark'
Christopher Henderson Clark is full name; full name refers to first_name, middle_name, last_name
[ "historical-terms.bioguide", "historical-terms.party", "historical.bioguide_id", "historical.first_name", "historical.last_name", "historical.middle_name" ]
4,778
legislator
CREATE TABLE current ( ballotpedia_id TEXT, bioguide_id TEXT, birthday_bio DATE, cspan_id REAL, fec_id TEXT, first_name TEXT, gender_bio TEXT, google_entity_id_id TEXT, govtrack_id INTEGER, house_history_id ...
List the official full names of 10 legislators who have a YouTube account but no Instagram account.
SELECT T2.official_full_name FROM `social-media` AS T1 INNER JOIN current AS T2 ON T1.bioguide = T2.bioguide_id WHERE T1.facebook IS NOT NULL AND (T1.instagram IS NULL OR T1.instagram = '') LIMIT 10
have a YouTube account but no Instagram account refers to facebook is not null and (instagram is null or instagram = '')
[ "current.bioguide_id", "current.official_full_name", "social-media.bioguide", "social-media.facebook", "social-media.instagram" ]
4,779
legislator
CREATE TABLE current ( ballotpedia_id TEXT, bioguide_id TEXT, birthday_bio DATE, cspan_id REAL, fec_id TEXT, first_name TEXT, gender_bio TEXT, google_entity_id_id TEXT, govtrack_id INTEGER, house_history_id ...
Give the official full names of legislators representing Virginia.
SELECT T1.official_full_name FROM current AS T1 INNER JOIN `current-terms` AS T2 ON T1.bioguide_id = T2.bioguide WHERE T2.state = 'VA' GROUP BY T1.official_full_name
Virginia refers to state = 'VA'
[ "current-terms.bioguide", "current-terms.state", "current.bioguide_id", "current.official_full_name" ]
4,780
legislator
CREATE TABLE current ( ballotpedia_id TEXT, bioguide_id TEXT, birthday_bio DATE, cspan_id REAL, fec_id TEXT, first_name TEXT, gender_bio TEXT, google_entity_id_id TEXT, govtrack_id INTEGER, house_history_id ...
Which historical legislators are members of the National Greenbacker party? Write their first and last names.
SELECT T2.first_name, T2.last_name FROM `historical-terms` AS T1 INNER JOIN historical AS T2 ON T2.bioguide_id = T1.bioguide WHERE T1.party = 'National Greenbacker'
members of the National Greenbacker party refers to party = 'National Greenbacker'; first and last names refers to first_name, last_name
[ "historical-terms.bioguide", "historical-terms.party", "historical.bioguide_id", "historical.first_name", "historical.last_name" ]
4,781
legislator
CREATE TABLE current ( ballotpedia_id TEXT, bioguide_id TEXT, birthday_bio DATE, cspan_id REAL, fec_id TEXT, first_name TEXT, gender_bio TEXT, google_entity_id_id TEXT, govtrack_id INTEGER, house_history_id ...
Which legislator has the YouTube channel 'RoskamIL06?' Write the official full name.
SELECT T1.official_full_name FROM current AS T1 INNER JOIN `social-media` AS T2 ON T2.bioguide = T1.bioguide_id WHERE T2.youtube = 'RoskamIL06'
YouTube channel 'RoskamIL06' refers to youtube = 'RoskamIL06';
[ "current.bioguide_id", "current.official_full_name", "social-media.bioguide", "social-media.youtube" ]
4,782
legislator
CREATE TABLE current ( ballotpedia_id TEXT, bioguide_id TEXT, birthday_bio DATE, cspan_id REAL, fec_id TEXT, first_name TEXT, gender_bio TEXT, google_entity_id_id TEXT, govtrack_id INTEGER, house_history_id ...
List the full names of 10 legislators who only have a Facebook account.
SELECT T2.official_full_name FROM `social-media` AS T1 INNER JOIN current AS T2 ON T1.bioguide = T2.bioguide_id WHERE (T1.youtube IS NULL OR T1.youtube = '') AND (T1.instagram IS NULL OR T1.instagram = '') AND (T1.twitter IS NULL OR T1.twitter = '') AND T1.facebook IS NOT NULL AND T1.facebook != ''
full names refers to official_full_name; only have a Facebook account refers to youtube is NULL or youtube = '', instagram is NULL or instagram = '', twitter is NULL or twitter = '', facebook is not NULL and facebook = ''
[ "current.bioguide_id", "current.official_full_name", "social-media.bioguide", "social-media.facebook", "social-media.instagram", "social-media.twitter", "social-media.youtube" ]
4,783
legislator
CREATE TABLE current ( ballotpedia_id TEXT, bioguide_id TEXT, birthday_bio DATE, cspan_id REAL, fec_id TEXT, first_name TEXT, gender_bio TEXT, google_entity_id_id TEXT, govtrack_id INTEGER, house_history_id ...
Write the full names of junior ranked Republicans.
SELECT T1.official_full_name FROM current AS T1 INNER JOIN `current-terms` AS T2 ON T1.bioguide_id = T2.bioguide WHERE T2.party = 'Republican' AND T2.state_rank = 'junior' GROUP BY T1.official_full_name
full name refers to official_full_name; junior refers to state_rank = 'junior'; Republicans refers to party = 'Republican'
[ "current-terms.bioguide", "current-terms.party", "current-terms.state_rank", "current.bioguide_id", "current.official_full_name" ]
4,784
legislator
CREATE TABLE current ( ballotpedia_id TEXT, bioguide_id TEXT, birthday_bio DATE, cspan_id REAL, fec_id TEXT, first_name TEXT, gender_bio TEXT, google_entity_id_id TEXT, govtrack_id INTEGER, house_history_id ...
What is the contact URL of Claire McCaskill?
SELECT T2.contact_form FROM current AS T1 INNER JOIN `current-terms` AS T2 ON T1.bioguide_id = T2.bioguide WHERE T1.official_full_name = 'Claire McCaskill' GROUP BY T2.contact_form
contact URL refers to contact_form; Claire McCaskill is an official_full_name
[ "current-terms.bioguide", "current-terms.contact_form", "current.bioguide_id", "current.official_full_name" ]
4,785
legislator
CREATE TABLE current ( ballotpedia_id TEXT, bioguide_id TEXT, birthday_bio DATE, cspan_id REAL, fec_id TEXT, first_name TEXT, gender_bio TEXT, google_entity_id_id TEXT, govtrack_id INTEGER, house_history_id ...
Give the Wikipedia IDs of historical legislators who are Readjuster Democrats.
SELECT T2.wikipedia_id FROM `historical-terms` AS T1 INNER JOIN historical AS T2 ON T2.bioguide_id = T1.bioguide WHERE T1.party = 'Readjuster Democrat'
Readjuster Democrats refers to party = 'Readjuster Democrat'
[ "historical-terms.bioguide", "historical-terms.party", "historical.bioguide_id", "historical.wikipedia_id" ]
4,786
legislator
CREATE TABLE current ( ballotpedia_id TEXT, bioguide_id TEXT, birthday_bio DATE, cspan_id REAL, fec_id TEXT, first_name TEXT, gender_bio TEXT, google_entity_id_id TEXT, govtrack_id INTEGER, house_history_id ...
List the full names of Republican legislators who have a nickname.
SELECT T1.official_full_name FROM current AS T1 INNER JOIN `current-terms` AS T2 ON T1.bioguide_id = T2.bioguide WHERE T2.party = 'Republican' AND T1.nickname_name IS NOT NULL GROUP BY T1.official_full_name
full names refers to official_full_name; Republican refers to party = 'Republican'; nickname refers to nickname_name
[ "current-terms.bioguide", "current-terms.party", "current.bioguide_id", "current.nickname_name", "current.official_full_name" ]
4,787
legislator
CREATE TABLE current ( ballotpedia_id TEXT, bioguide_id TEXT, birthday_bio DATE, cspan_id REAL, fec_id TEXT, first_name TEXT, gender_bio TEXT, google_entity_id_id TEXT, govtrack_id INTEGER, house_history_id ...
Which state did Veronica Grace Boland represent and which party is she affiliated?
SELECT T2.state, T2.party FROM historical AS T1 INNER JOIN `historical-terms` AS T2 ON T1.bioguide_id = T2.bioguide WHERE T1.first_name OR T1.middle_name OR T1.last_name = 'VeronicaGraceBoland'
Veronica Grace Boland is a full name; full name refers to first_name, middle_name, last_name; party affiliated refers to party
[ "historical-terms.bioguide", "historical-terms.party", "historical-terms.state", "historical.bioguide_id", "historical.first_name", "historical.last_name", "historical.middle_name" ]
4,788
legislator
CREATE TABLE current ( ballotpedia_id TEXT, bioguide_id TEXT, birthday_bio DATE, cspan_id REAL, fec_id TEXT, first_name TEXT, gender_bio TEXT, google_entity_id_id TEXT, govtrack_id INTEGER, house_history_id ...
How many historical legislators were born in 1973?
SELECT COUNT(*) FROM historical WHERE CAST(birthday_bio AS date) = 1973
born in 1973 refers to birthday_bio = 1973
[ "historical.birthday_bio" ]
4,789
legislator
CREATE TABLE current ( ballotpedia_id TEXT, bioguide_id TEXT, birthday_bio DATE, cspan_id REAL, fec_id TEXT, first_name TEXT, gender_bio TEXT, google_entity_id_id TEXT, govtrack_id INTEGER, house_history_id ...
What is the ratio of males and females among historical legislators?
SELECT CAST(SUM(CASE WHEN gender_bio = 'M' THEN 1 ELSE 0 END) AS REAL) / SUM(CASE WHEN gender_bio = 'F' THEN 1 ELSE 0 END) FROM historical
male refers to gender_bio = 'M'; female refers to gender_bio = 'F'; calculation = DIVIDE(COUNT(gender_bio = 'M' THEN bioguide_id), COUNT(gender_bio = 'F' THEN bioguide_id))
[ "historical.gender_bio" ]
4,790
legislator
CREATE TABLE current ( ballotpedia_id TEXT, bioguide_id TEXT, birthday_bio DATE, cspan_id REAL, fec_id TEXT, first_name TEXT, gender_bio TEXT, google_entity_id_id TEXT, govtrack_id INTEGER, house_history_id ...
Among the legislators who will end in 2009, how many are from the Republican party?
SELECT `END`, party FROM `current-terms` WHERE STRFTIME('%Y', `END`) = '2009' AND party = 'Republican'
the legislators who will end in 2009 refers to END 2009; from the Republican party refers to party = 'Republican'
[ "current-terms.END", "current-terms.party" ]
4,791
legislator
CREATE TABLE current ( ballotpedia_id TEXT, bioguide_id TEXT, birthday_bio DATE, cspan_id REAL, fec_id TEXT, first_name TEXT, gender_bio TEXT, google_entity_id_id TEXT, govtrack_id INTEGER, house_history_id ...
List the official full names and genders of legislators who have Collins as their last name.
SELECT official_full_name, gender_bio FROM current WHERE last_name = 'Collins'
genders refers to gender_bio; Collins is a last_name
[ "current.gender_bio", "current.last_name", "current.official_full_name" ]
4,792
legislator
CREATE TABLE current ( ballotpedia_id TEXT, bioguide_id TEXT, birthday_bio DATE, cspan_id REAL, fec_id TEXT, first_name TEXT, gender_bio TEXT, google_entity_id_id TEXT, govtrack_id INTEGER, house_history_id ...
How many percent of senators were from class 1?
SELECT CAST(SUM(CASE WHEN class = 1 THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(*) FROM `historical-terms` WHERE type = 'sen'
senator refers to type = 'sen'; class 1 refers to class = 1; calculation = MULTIPLY(DIVIDE(COUNT(class = 1 then bioguide), COUNT(bioguide)), 1.0)
[ "historical-terms.class", "historical-terms.type" ]
4,793
legislator
CREATE TABLE current ( ballotpedia_id TEXT, bioguide_id TEXT, birthday_bio DATE, cspan_id REAL, fec_id TEXT, first_name TEXT, gender_bio TEXT, google_entity_id_id TEXT, govtrack_id INTEGER, house_history_id ...
Provide the current legislators' official full names who are from the Independent party.
SELECT T1.official_full_name FROM current AS T1 INNER JOIN `current-terms` AS T2 ON T1.bioguide_id = T2.bioguide WHERE T2.party = 'Independent' GROUP BY T1.official_full_name
Independent party refers to party = 'Independent'
[ "current-terms.bioguide", "current-terms.party", "current.bioguide_id", "current.official_full_name" ]
4,794
legislator
CREATE TABLE current ( ballotpedia_id TEXT, bioguide_id TEXT, birthday_bio DATE, cspan_id REAL, fec_id TEXT, first_name TEXT, gender_bio TEXT, google_entity_id_id TEXT, govtrack_id INTEGER, house_history_id ...
How many years had Jr. John Conyers served in total?
SELECT SUM(CAST(T2.END - T2.start AS DATE)) AS sum FROM current AS T1 INNER JOIN `current-terms` AS T2 ON T1.bioguide_id = T2.bioguide WHERE T1.official_full_name = 'John Conyers, Jr.'
Jr. John Conyers is an official_full_name; years served refers to SUM(SUBTRACT(END, start))
[ "current-terms.END", "current-terms.bioguide", "current-terms.start", "current.bioguide_id", "current.official_full_name" ]
4,795
legislator
CREATE TABLE current ( ballotpedia_id TEXT, bioguide_id TEXT, birthday_bio DATE, cspan_id REAL, fec_id TEXT, first_name TEXT, gender_bio TEXT, google_entity_id_id TEXT, govtrack_id INTEGER, house_history_id ...
How old was Jr. F. James Sensenbrenner when he first started as a legislator?
SELECT CAST(MIN(T2.start) - T1.birthday_bio AS DATE) AS AGE FROM current AS T1 INNER JOIN `current-terms` AS T2 ON T1.bioguide_id = T2.bioguide WHERE T1.official_full_name = 'F. James Sensenbrenner, Jr.'
Jr. F. James Sensenbrenner is an official_full_name; How old refers to SUBTRACT(MIN(start), birthday_bio)
[ "current-terms.bioguide", "current-terms.start", "current.bioguide_id", "current.birthday_bio", "current.official_full_name" ]
4,796
legislator
CREATE TABLE current ( ballotpedia_id TEXT, bioguide_id TEXT, birthday_bio DATE, cspan_id REAL, fec_id TEXT, first_name TEXT, gender_bio TEXT, google_entity_id_id TEXT, govtrack_id INTEGER, house_history_id ...
List the full names, religions, and parties of legislators who have served in Maine.
SELECT T1.official_full_name, T2.relation, T2.party FROM current AS T1 INNER JOIN `current-terms` AS T2 ON T1.bioguide_id = T2.bioguide WHERE T2.state = 'ME' GROUP BY T1.official_full_name, T2.relation, T2.party
full names refers to official_full_name; religion refers to religion_bio; Maine refers to state = "ME"
[ "current-terms.bioguide", "current-terms.party", "current-terms.relation", "current-terms.state", "current.bioguide_id", "current.official_full_name" ]
4,797
legislator
CREATE TABLE current ( ballotpedia_id TEXT, bioguide_id TEXT, birthday_bio DATE, cspan_id REAL, fec_id TEXT, first_name TEXT, gender_bio TEXT, google_entity_id_id TEXT, govtrack_id INTEGER, house_history_id ...
Among legislators who have an Instagram account, list down their full names and nicknames who have a Thomas ID of less than 1000.
SELECT T1.official_full_name, T1.nickname_name FROM current AS T1 INNER JOIN `social-media` AS T2 ON T2.bioguide = T1.bioguide_id WHERE T2.instagram IS NOT NULL AND T1.thomas_id < 1000
have an Instagram account refers to instagram is not null; full names refers to official_full_name; nicknames refers to nickname_name; Thomas ID of less than 1000 refers to thomas_id < 1000;
[ "current.bioguide_id", "current.nickname_name", "current.official_full_name", "current.thomas_id", "social-media.bioguide", "social-media.instagram" ]
4,798
legislator
CREATE TABLE current ( ballotpedia_id TEXT, bioguide_id TEXT, birthday_bio DATE, cspan_id REAL, fec_id TEXT, first_name TEXT, gender_bio TEXT, google_entity_id_id TEXT, govtrack_id INTEGER, house_history_id ...
When was the last serving date of Matt Salmon?
SELECT T1.END FROM `historical-terms` AS T1 INNER JOIN historical AS T2 ON T2.bioguide_id = T1.bioguide WHERE T2.official_full_name = 'Matt Salmon'
Matt Salmon is an official_full_name
[ "historical-terms.END", "historical-terms.bioguide", "historical.bioguide_id", "historical.official_full_name" ]
4,799
legislator
CREATE TABLE current ( ballotpedia_id TEXT, bioguide_id TEXT, birthday_bio DATE, cspan_id REAL, fec_id TEXT, first_name TEXT, gender_bio TEXT, google_entity_id_id TEXT, govtrack_id INTEGER, house_history_id ...
Among the legislators who have served in the U.S. House, provide the party and the state of the legislators who were born in 1738.
SELECT T1.party, T1.state FROM `historical-terms` AS T1 INNER JOIN historical AS T2 ON T2.bioguide_id = T1.bioguide WHERE T2.house_history_id IS NOT NULL AND T2.birthday_bio LIKE '%1738%'
have served in the U.S. House refers to house_history_id IS NOT NULL; born in 1738 refers to birthday_bio = 1738
[ "historical-terms.bioguide", "historical-terms.party", "historical-terms.state", "historical.bioguide_id", "historical.birthday_bio", "historical.house_history_id" ]