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