context
stringlengths 11
9.12k
| question
stringlengths 0
1.06k
| SQL
stringlengths 2
4.44k
| source
stringclasses 28
values |
|---|---|---|---|
CREATE TABLE disney (movie_title text, release_date text, hero text, villian text, song text, name text, director text, movie_title text, release_date text, genre text, MPAA_rating text, total_gross text, inflation_adjusted_gross text, Year integer, Studio Entertainment[NI 1] real, Disney Consumer Products[NI 2] real, Disney Interactive[NI 3][Rev 1] integer, Walt Disney Parks and Resorts real, Disney Media Networks text, Total integer, character text, voice-actor text, movie text)
|
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
|
bird
|
CREATE TABLE disney (movie_title text, release_date text, hero text, villian text, song text, name text, director text, movie_title text, release_date text, genre text, MPAA_rating text, total_gross text, inflation_adjusted_gross text, Year integer, Studio Entertainment[NI 1] real, Disney Consumer Products[NI 2] real, Disney Interactive[NI 3][Rev 1] integer, Walt Disney Parks and Resorts real, Disney Media Networks text, Total integer, character text, voice-actor text, movie text)
|
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
|
bird
|
CREATE TABLE disney (movie_title text, release_date text, hero text, villian text, song text, name text, director text, movie_title text, release_date text, genre text, MPAA_rating text, total_gross text, inflation_adjusted_gross text, Year integer, Studio Entertainment[NI 1] real, Disney Consumer Products[NI 2] real, Disney Interactive[NI 3][Rev 1] integer, Walt Disney Parks and Resorts real, Disney Media Networks text, Total integer, character text, voice-actor text, movie text)
|
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'
|
bird
|
CREATE TABLE disney (movie_title text, release_date text, hero text, villian text, song text, name text, director text, movie_title text, release_date text, genre text, MPAA_rating text, total_gross text, inflation_adjusted_gross text, Year integer, Studio Entertainment[NI 1] real, Disney Consumer Products[NI 2] real, Disney Interactive[NI 3][Rev 1] integer, Walt Disney Parks and Resorts real, Disney Media Networks text, Total integer, character text, voice-actor text, movie text)
|
How many voice-actors were involved in the Bambi movie?
|
SELECT COUNT(DISTINCT 'voice-actor') FROM `voice-actors` WHERE movie = 'Bambi'
|
bird
|
CREATE TABLE disney (movie_title text, release_date text, hero text, villian text, song text, name text, director text, movie_title text, release_date text, genre text, MPAA_rating text, total_gross text, inflation_adjusted_gross text, Year integer, Studio Entertainment[NI 1] real, Disney Consumer Products[NI 2] real, Disney Interactive[NI 3][Rev 1] integer, Walt Disney Parks and Resorts real, Disney Media Networks text, Total integer, character text, voice-actor text, movie text)
|
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_date)) = '1995'
|
bird
|
CREATE TABLE disney (movie_title text, release_date text, hero text, villian text, song text, name text, director text, movie_title text, release_date text, genre text, MPAA_rating text, total_gross text, inflation_adjusted_gross text, Year integer, Studio Entertainment[NI 1] real, Disney Consumer Products[NI 2] real, Disney Interactive[NI 3][Rev 1] integer, Walt Disney Parks and Resorts real, Disney Media Networks text, Total integer, character text, voice-actor text, movie text)
|
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
|
bird
|
CREATE TABLE disney (movie_title text, release_date text, hero text, villian text, song text, name text, director text, movie_title text, release_date text, genre text, MPAA_rating text, total_gross text, inflation_adjusted_gross text, Year integer, Studio Entertainment[NI 1] real, Disney Consumer Products[NI 2] real, Disney Interactive[NI 3][Rev 1] integer, Walt Disney Parks and Resorts real, Disney Media Networks text, Total integer, character text, voice-actor text, movie text)
|
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'
|
bird
|
CREATE TABLE disney (movie_title text, release_date text, hero text, villian text, song text, name text, director text, movie_title text, release_date text, genre text, MPAA_rating text, total_gross text, inflation_adjusted_gross text, Year integer, Studio Entertainment[NI 1] real, Disney Consumer Products[NI 2] real, Disney Interactive[NI 3][Rev 1] integer, Walt Disney Parks and Resorts real, Disney Media Networks text, Total integer, character text, voice-actor text, movie text)
|
Name actors who voiced more than five Disney characters.
|
SELECT 'voice-actor' FROM `voice-actors` GROUP BY 'voice-actor' HAVING COUNT(movie) > 5
|
bird
|
CREATE TABLE disney (movie_title text, release_date text, hero text, villian text, song text, name text, director text, movie_title text, release_date text, genre text, MPAA_rating text, total_gross text, inflation_adjusted_gross text, Year integer, Studio Entertainment[NI 1] real, Disney Consumer Products[NI 2] real, Disney Interactive[NI 3][Rev 1] integer, Walt Disney Parks and Resorts real, Disney Media Networks text, Total integer, character text, voice-actor text, movie text)
|
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
|
bird
|
CREATE TABLE disney (movie_title text, release_date text, hero text, villian text, song text, name text, director text, movie_title text, release_date text, genre text, MPAA_rating text, total_gross text, inflation_adjusted_gross text, Year integer, Studio Entertainment[NI 1] real, Disney Consumer Products[NI 2] real, Disney Interactive[NI 3][Rev 1] integer, Walt Disney Parks and Resorts real, Disney Media Networks text, Total integer, character text, voice-actor text, movie text)
|
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'
|
bird
|
CREATE TABLE legislator (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 real, icpsr_id real, last_name text, lis_id text, maplight_id real, middle_name text, nickname_name text, official_full_name text, opensecrets_id text, religion_bio text, suffix_name text, thomas_id integer, votesmart_id real, wikidata_id text, wikipedia_id text, address text, bioguide text, caucus text, chamber text, class real, contact_form text, district real, end text, fax text, last text, name text, office text, party text, party_affiliations text, phone text, relation text, rss_url text, start text, state text, state_rank text, title text, type text, url text, ballotpedia_id text, bioguide_id text, bioguide_previous_id text, birthday_bio text, cspan_id text, fec_id text, first_name text, gender_bio text, google_entity_id_id text, govtrack_id integer, house_history_alternate_id text, house_history_id real, icpsr_id real, last_name text, lis_id text, maplight_id text, middle_name text, nickname_name text, official_full_name text, opensecrets_id text, religion_bio text, suffix_name text, thomas_id text, votesmart_id text, wikidata_id text, wikipedia_id text, address text, bioguide text, chamber text, class real, contact_form text, district real, end text, fax text, last text, middle text, name text, office text, party text, party_affiliations text, phone text, relation text, rss_url text, start text, state text, state_rank text, title text, type text, url text, bioguide text, facebook text, facebook_id real, govtrack real, instagram text, instagram_id real, thomas integer, twitter text, twitter_id real, youtube text, youtube_id text)
|
How many current legislators do not have an account on ballotpedia.org ?
|
SELECT COUNT(*) FROM current WHERE ballotpedia_id = '' OR ballotpedia_id IS NULL
|
bird
|
CREATE TABLE legislator (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 real, icpsr_id real, last_name text, lis_id text, maplight_id real, middle_name text, nickname_name text, official_full_name text, opensecrets_id text, religion_bio text, suffix_name text, thomas_id integer, votesmart_id real, wikidata_id text, wikipedia_id text, address text, bioguide text, caucus text, chamber text, class real, contact_form text, district real, end text, fax text, last text, name text, office text, party text, party_affiliations text, phone text, relation text, rss_url text, start text, state text, state_rank text, title text, type text, url text, ballotpedia_id text, bioguide_id text, bioguide_previous_id text, birthday_bio text, cspan_id text, fec_id text, first_name text, gender_bio text, google_entity_id_id text, govtrack_id integer, house_history_alternate_id text, house_history_id real, icpsr_id real, last_name text, lis_id text, maplight_id text, middle_name text, nickname_name text, official_full_name text, opensecrets_id text, religion_bio text, suffix_name text, thomas_id text, votesmart_id text, wikidata_id text, wikipedia_id text, address text, bioguide text, chamber text, class real, contact_form text, district real, end text, fax text, last text, middle text, name text, office text, party text, party_affiliations text, phone text, relation text, rss_url text, start text, state text, state_rank text, title text, type text, url text, bioguide text, facebook text, facebook_id real, govtrack real, instagram text, instagram_id real, thomas integer, twitter text, twitter_id real, youtube text, youtube_id text)
|
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 = ''
|
bird
|
CREATE TABLE legislator (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 real, icpsr_id real, last_name text, lis_id text, maplight_id real, middle_name text, nickname_name text, official_full_name text, opensecrets_id text, religion_bio text, suffix_name text, thomas_id integer, votesmart_id real, wikidata_id text, wikipedia_id text, address text, bioguide text, caucus text, chamber text, class real, contact_form text, district real, end text, fax text, last text, name text, office text, party text, party_affiliations text, phone text, relation text, rss_url text, start text, state text, state_rank text, title text, type text, url text, ballotpedia_id text, bioguide_id text, bioguide_previous_id text, birthday_bio text, cspan_id text, fec_id text, first_name text, gender_bio text, google_entity_id_id text, govtrack_id integer, house_history_alternate_id text, house_history_id real, icpsr_id real, last_name text, lis_id text, maplight_id text, middle_name text, nickname_name text, official_full_name text, opensecrets_id text, religion_bio text, suffix_name text, thomas_id text, votesmart_id text, wikidata_id text, wikipedia_id text, address text, bioguide text, chamber text, class real, contact_form text, district real, end text, fax text, last text, middle text, name text, office text, party text, party_affiliations text, phone text, relation text, rss_url text, start text, state text, state_rank text, title text, type text, url text, bioguide text, facebook text, facebook_id real, govtrack real, instagram text, instagram_id real, thomas integer, twitter text, twitter_id real, youtube text, youtube_id text)
|
How many current legislators were born after the year 1960?
|
SELECT COUNT(bioguide_id) FROM current WHERE birthday_bio >= '1961-01-01'
|
bird
|
CREATE TABLE legislator (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 real, icpsr_id real, last_name text, lis_id text, maplight_id real, middle_name text, nickname_name text, official_full_name text, opensecrets_id text, religion_bio text, suffix_name text, thomas_id integer, votesmart_id real, wikidata_id text, wikipedia_id text, address text, bioguide text, caucus text, chamber text, class real, contact_form text, district real, end text, fax text, last text, name text, office text, party text, party_affiliations text, phone text, relation text, rss_url text, start text, state text, state_rank text, title text, type text, url text, ballotpedia_id text, bioguide_id text, bioguide_previous_id text, birthday_bio text, cspan_id text, fec_id text, first_name text, gender_bio text, google_entity_id_id text, govtrack_id integer, house_history_alternate_id text, house_history_id real, icpsr_id real, last_name text, lis_id text, maplight_id text, middle_name text, nickname_name text, official_full_name text, opensecrets_id text, religion_bio text, suffix_name text, thomas_id text, votesmart_id text, wikidata_id text, wikipedia_id text, address text, bioguide text, chamber text, class real, contact_form text, district real, end text, fax text, last text, middle text, name text, office text, party text, party_affiliations text, phone text, relation text, rss_url text, start text, state text, state_rank text, title text, type text, url text, bioguide text, facebook text, facebook_id real, govtrack real, instagram text, instagram_id real, thomas integer, twitter text, twitter_id real, youtube text, youtube_id text)
|
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'
|
bird
|
CREATE TABLE legislator (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 real, icpsr_id real, last_name text, lis_id text, maplight_id real, middle_name text, nickname_name text, official_full_name text, opensecrets_id text, religion_bio text, suffix_name text, thomas_id integer, votesmart_id real, wikidata_id text, wikipedia_id text, address text, bioguide text, caucus text, chamber text, class real, contact_form text, district real, end text, fax text, last text, name text, office text, party text, party_affiliations text, phone text, relation text, rss_url text, start text, state text, state_rank text, title text, type text, url text, ballotpedia_id text, bioguide_id text, bioguide_previous_id text, birthday_bio text, cspan_id text, fec_id text, first_name text, gender_bio text, google_entity_id_id text, govtrack_id integer, house_history_alternate_id text, house_history_id real, icpsr_id real, last_name text, lis_id text, maplight_id text, middle_name text, nickname_name text, official_full_name text, opensecrets_id text, religion_bio text, suffix_name text, thomas_id text, votesmart_id text, wikidata_id text, wikipedia_id text, address text, bioguide text, chamber text, class real, contact_form text, district real, end text, fax text, last text, middle text, name text, office text, party text, party_affiliations text, phone text, relation text, rss_url text, start text, state text, state_rank text, title text, type text, url text, bioguide text, facebook text, facebook_id real, govtrack real, instagram text, instagram_id real, thomas integer, twitter text, twitter_id real, youtube text, youtube_id text)
|
What is the google entity ID of current legislator Sherrod Brown?
|
SELECT google_entity_id_id FROM current WHERE official_full_name = 'Sherrod Brown'
|
bird
|
CREATE TABLE legislator (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 real, icpsr_id real, last_name text, lis_id text, maplight_id real, middle_name text, nickname_name text, official_full_name text, opensecrets_id text, religion_bio text, suffix_name text, thomas_id integer, votesmart_id real, wikidata_id text, wikipedia_id text, address text, bioguide text, caucus text, chamber text, class real, contact_form text, district real, end text, fax text, last text, name text, office text, party text, party_affiliations text, phone text, relation text, rss_url text, start text, state text, state_rank text, title text, type text, url text, ballotpedia_id text, bioguide_id text, bioguide_previous_id text, birthday_bio text, cspan_id text, fec_id text, first_name text, gender_bio text, google_entity_id_id text, govtrack_id integer, house_history_alternate_id text, house_history_id real, icpsr_id real, last_name text, lis_id text, maplight_id text, middle_name text, nickname_name text, official_full_name text, opensecrets_id text, religion_bio text, suffix_name text, thomas_id text, votesmart_id text, wikidata_id text, wikipedia_id text, address text, bioguide text, chamber text, class real, contact_form text, district real, end text, fax text, last text, middle text, name text, office text, party text, party_affiliations text, phone text, relation text, rss_url text, start text, state text, state_rank text, title text, type text, url text, bioguide text, facebook text, facebook_id real, govtrack real, instagram text, instagram_id real, thomas integer, twitter text, twitter_id real, youtube text, youtube_id text)
|
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
|
bird
|
CREATE TABLE legislator (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 real, icpsr_id real, last_name text, lis_id text, maplight_id real, middle_name text, nickname_name text, official_full_name text, opensecrets_id text, religion_bio text, suffix_name text, thomas_id integer, votesmart_id real, wikidata_id text, wikipedia_id text, address text, bioguide text, caucus text, chamber text, class real, contact_form text, district real, end text, fax text, last text, name text, office text, party text, party_affiliations text, phone text, relation text, rss_url text, start text, state text, state_rank text, title text, type text, url text, ballotpedia_id text, bioguide_id text, bioguide_previous_id text, birthday_bio text, cspan_id text, fec_id text, first_name text, gender_bio text, google_entity_id_id text, govtrack_id integer, house_history_alternate_id text, house_history_id real, icpsr_id real, last_name text, lis_id text, maplight_id text, middle_name text, nickname_name text, official_full_name text, opensecrets_id text, religion_bio text, suffix_name text, thomas_id text, votesmart_id text, wikidata_id text, wikipedia_id text, address text, bioguide text, chamber text, class real, contact_form text, district real, end text, fax text, last text, middle text, name text, office text, party text, party_affiliations text, phone text, relation text, rss_url text, start text, state text, state_rank text, title text, type text, url text, bioguide text, facebook text, facebook_id real, govtrack real, instagram text, instagram_id real, thomas integer, twitter text, twitter_id real, youtube text, youtube_id text)
|
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'
|
bird
|
CREATE TABLE legislator (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 real, icpsr_id real, last_name text, lis_id text, maplight_id real, middle_name text, nickname_name text, official_full_name text, opensecrets_id text, religion_bio text, suffix_name text, thomas_id integer, votesmart_id real, wikidata_id text, wikipedia_id text, address text, bioguide text, caucus text, chamber text, class real, contact_form text, district real, end text, fax text, last text, name text, office text, party text, party_affiliations text, phone text, relation text, rss_url text, start text, state text, state_rank text, title text, type text, url text, ballotpedia_id text, bioguide_id text, bioguide_previous_id text, birthday_bio text, cspan_id text, fec_id text, first_name text, gender_bio text, google_entity_id_id text, govtrack_id integer, house_history_alternate_id text, house_history_id real, icpsr_id real, last_name text, lis_id text, maplight_id text, middle_name text, nickname_name text, official_full_name text, opensecrets_id text, religion_bio text, suffix_name text, thomas_id text, votesmart_id text, wikidata_id text, wikipedia_id text, address text, bioguide text, chamber text, class real, contact_form text, district real, end text, fax text, last text, middle text, name text, office text, party text, party_affiliations text, phone text, relation text, rss_url text, start text, state text, state_rank text, title text, type text, url text, bioguide text, facebook text, facebook_id real, govtrack real, instagram text, instagram_id real, thomas integer, twitter text, twitter_id real, youtube text, youtube_id text)
|
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
|
bird
|
CREATE TABLE legislator (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 real, icpsr_id real, last_name text, lis_id text, maplight_id real, middle_name text, nickname_name text, official_full_name text, opensecrets_id text, religion_bio text, suffix_name text, thomas_id integer, votesmart_id real, wikidata_id text, wikipedia_id text, address text, bioguide text, caucus text, chamber text, class real, contact_form text, district real, end text, fax text, last text, name text, office text, party text, party_affiliations text, phone text, relation text, rss_url text, start text, state text, state_rank text, title text, type text, url text, ballotpedia_id text, bioguide_id text, bioguide_previous_id text, birthday_bio text, cspan_id text, fec_id text, first_name text, gender_bio text, google_entity_id_id text, govtrack_id integer, house_history_alternate_id text, house_history_id real, icpsr_id real, last_name text, lis_id text, maplight_id text, middle_name text, nickname_name text, official_full_name text, opensecrets_id text, religion_bio text, suffix_name text, thomas_id text, votesmart_id text, wikidata_id text, wikipedia_id text, address text, bioguide text, chamber text, class real, contact_form text, district real, end text, fax text, last text, middle text, name text, office text, party text, party_affiliations text, phone text, relation text, rss_url text, start text, state text, state_rank text, title text, type text, url text, bioguide text, facebook text, facebook_id real, govtrack real, instagram text, instagram_id real, thomas integer, twitter text, twitter_id real, youtube text, youtube_id text)
|
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
|
bird
|
CREATE TABLE legislator (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 real, icpsr_id real, last_name text, lis_id text, maplight_id real, middle_name text, nickname_name text, official_full_name text, opensecrets_id text, religion_bio text, suffix_name text, thomas_id integer, votesmart_id real, wikidata_id text, wikipedia_id text, address text, bioguide text, caucus text, chamber text, class real, contact_form text, district real, end text, fax text, last text, name text, office text, party text, party_affiliations text, phone text, relation text, rss_url text, start text, state text, state_rank text, title text, type text, url text, ballotpedia_id text, bioguide_id text, bioguide_previous_id text, birthday_bio text, cspan_id text, fec_id text, first_name text, gender_bio text, google_entity_id_id text, govtrack_id integer, house_history_alternate_id text, house_history_id real, icpsr_id real, last_name text, lis_id text, maplight_id text, middle_name text, nickname_name text, official_full_name text, opensecrets_id text, religion_bio text, suffix_name text, thomas_id text, votesmart_id text, wikidata_id text, wikipedia_id text, address text, bioguide text, chamber text, class real, contact_form text, district real, end text, fax text, last text, middle text, name text, office text, party text, party_affiliations text, phone text, relation text, rss_url text, start text, state text, state_rank text, title text, type text, url text, bioguide text, facebook text, facebook_id real, govtrack real, instagram text, instagram_id real, thomas integer, twitter text, twitter_id real, youtube text, youtube_id text)
|
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'
|
bird
|
CREATE TABLE legislator (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 real, icpsr_id real, last_name text, lis_id text, maplight_id real, middle_name text, nickname_name text, official_full_name text, opensecrets_id text, religion_bio text, suffix_name text, thomas_id integer, votesmart_id real, wikidata_id text, wikipedia_id text, address text, bioguide text, caucus text, chamber text, class real, contact_form text, district real, end text, fax text, last text, name text, office text, party text, party_affiliations text, phone text, relation text, rss_url text, start text, state text, state_rank text, title text, type text, url text, ballotpedia_id text, bioguide_id text, bioguide_previous_id text, birthday_bio text, cspan_id text, fec_id text, first_name text, gender_bio text, google_entity_id_id text, govtrack_id integer, house_history_alternate_id text, house_history_id real, icpsr_id real, last_name text, lis_id text, maplight_id text, middle_name text, nickname_name text, official_full_name text, opensecrets_id text, religion_bio text, suffix_name text, thomas_id text, votesmart_id text, wikidata_id text, wikipedia_id text, address text, bioguide text, chamber text, class real, contact_form text, district real, end text, fax text, last text, middle text, name text, office text, party text, party_affiliations text, phone text, relation text, rss_url text, start text, state text, state_rank text, title text, type text, url text, bioguide text, facebook text, facebook_id real, govtrack real, instagram text, instagram_id real, thomas integer, twitter text, twitter_id real, youtube text, youtube_id text)
|
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
|
bird
|
CREATE TABLE legislator (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 real, icpsr_id real, last_name text, lis_id text, maplight_id real, middle_name text, nickname_name text, official_full_name text, opensecrets_id text, religion_bio text, suffix_name text, thomas_id integer, votesmart_id real, wikidata_id text, wikipedia_id text, address text, bioguide text, caucus text, chamber text, class real, contact_form text, district real, end text, fax text, last text, name text, office text, party text, party_affiliations text, phone text, relation text, rss_url text, start text, state text, state_rank text, title text, type text, url text, ballotpedia_id text, bioguide_id text, bioguide_previous_id text, birthday_bio text, cspan_id text, fec_id text, first_name text, gender_bio text, google_entity_id_id text, govtrack_id integer, house_history_alternate_id text, house_history_id real, icpsr_id real, last_name text, lis_id text, maplight_id text, middle_name text, nickname_name text, official_full_name text, opensecrets_id text, religion_bio text, suffix_name text, thomas_id text, votesmart_id text, wikidata_id text, wikipedia_id text, address text, bioguide text, chamber text, class real, contact_form text, district real, end text, fax text, last text, middle text, name text, office text, party text, party_affiliations text, phone text, relation text, rss_url text, start text, state text, state_rank text, title text, type text, url text, bioguide text, facebook text, facebook_id real, govtrack real, instagram text, instagram_id real, thomas integer, twitter text, twitter_id real, youtube text, youtube_id text)
|
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 = ''
|
bird
|
CREATE TABLE legislator (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 real, icpsr_id real, last_name text, lis_id text, maplight_id real, middle_name text, nickname_name text, official_full_name text, opensecrets_id text, religion_bio text, suffix_name text, thomas_id integer, votesmart_id real, wikidata_id text, wikipedia_id text, address text, bioguide text, caucus text, chamber text, class real, contact_form text, district real, end text, fax text, last text, name text, office text, party text, party_affiliations text, phone text, relation text, rss_url text, start text, state text, state_rank text, title text, type text, url text, ballotpedia_id text, bioguide_id text, bioguide_previous_id text, birthday_bio text, cspan_id text, fec_id text, first_name text, gender_bio text, google_entity_id_id text, govtrack_id integer, house_history_alternate_id text, house_history_id real, icpsr_id real, last_name text, lis_id text, maplight_id text, middle_name text, nickname_name text, official_full_name text, opensecrets_id text, religion_bio text, suffix_name text, thomas_id text, votesmart_id text, wikidata_id text, wikipedia_id text, address text, bioguide text, chamber text, class real, contact_form text, district real, end text, fax text, last text, middle text, name text, office text, party text, party_affiliations text, phone text, relation text, rss_url text, start text, state text, state_rank text, title text, type text, url text, bioguide text, facebook text, facebook_id real, govtrack real, instagram text, instagram_id real, thomas integer, twitter text, twitter_id real, youtube text, youtube_id text)
|
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 = ''
|
bird
|
CREATE TABLE legislator (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 real, icpsr_id real, last_name text, lis_id text, maplight_id real, middle_name text, nickname_name text, official_full_name text, opensecrets_id text, religion_bio text, suffix_name text, thomas_id integer, votesmart_id real, wikidata_id text, wikipedia_id text, address text, bioguide text, caucus text, chamber text, class real, contact_form text, district real, end text, fax text, last text, name text, office text, party text, party_affiliations text, phone text, relation text, rss_url text, start text, state text, state_rank text, title text, type text, url text, ballotpedia_id text, bioguide_id text, bioguide_previous_id text, birthday_bio text, cspan_id text, fec_id text, first_name text, gender_bio text, google_entity_id_id text, govtrack_id integer, house_history_alternate_id text, house_history_id real, icpsr_id real, last_name text, lis_id text, maplight_id text, middle_name text, nickname_name text, official_full_name text, opensecrets_id text, religion_bio text, suffix_name text, thomas_id text, votesmart_id text, wikidata_id text, wikipedia_id text, address text, bioguide text, chamber text, class real, contact_form text, district real, end text, fax text, last text, middle text, name text, office text, party text, party_affiliations text, phone text, relation text, rss_url text, start text, state text, state_rank text, title text, type text, url text, bioguide text, facebook text, facebook_id real, govtrack real, instagram text, instagram_id real, thomas integer, twitter text, twitter_id real, youtube text, youtube_id text)
|
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'
|
bird
|
CREATE TABLE legislator (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 real, icpsr_id real, last_name text, lis_id text, maplight_id real, middle_name text, nickname_name text, official_full_name text, opensecrets_id text, religion_bio text, suffix_name text, thomas_id integer, votesmart_id real, wikidata_id text, wikipedia_id text, address text, bioguide text, caucus text, chamber text, class real, contact_form text, district real, end text, fax text, last text, name text, office text, party text, party_affiliations text, phone text, relation text, rss_url text, start text, state text, state_rank text, title text, type text, url text, ballotpedia_id text, bioguide_id text, bioguide_previous_id text, birthday_bio text, cspan_id text, fec_id text, first_name text, gender_bio text, google_entity_id_id text, govtrack_id integer, house_history_alternate_id text, house_history_id real, icpsr_id real, last_name text, lis_id text, maplight_id text, middle_name text, nickname_name text, official_full_name text, opensecrets_id text, religion_bio text, suffix_name text, thomas_id text, votesmart_id text, wikidata_id text, wikipedia_id text, address text, bioguide text, chamber text, class real, contact_form text, district real, end text, fax text, last text, middle text, name text, office text, party text, party_affiliations text, phone text, relation text, rss_url text, start text, state text, state_rank text, title text, type text, url text, bioguide text, facebook text, facebook_id real, govtrack real, instagram text, instagram_id real, thomas integer, twitter text, twitter_id real, youtube text, youtube_id text)
|
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
|
bird
|
CREATE TABLE legislator (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 real, icpsr_id real, last_name text, lis_id text, maplight_id real, middle_name text, nickname_name text, official_full_name text, opensecrets_id text, religion_bio text, suffix_name text, thomas_id integer, votesmart_id real, wikidata_id text, wikipedia_id text, address text, bioguide text, caucus text, chamber text, class real, contact_form text, district real, end text, fax text, last text, name text, office text, party text, party_affiliations text, phone text, relation text, rss_url text, start text, state text, state_rank text, title text, type text, url text, ballotpedia_id text, bioguide_id text, bioguide_previous_id text, birthday_bio text, cspan_id text, fec_id text, first_name text, gender_bio text, google_entity_id_id text, govtrack_id integer, house_history_alternate_id text, house_history_id real, icpsr_id real, last_name text, lis_id text, maplight_id text, middle_name text, nickname_name text, official_full_name text, opensecrets_id text, religion_bio text, suffix_name text, thomas_id text, votesmart_id text, wikidata_id text, wikipedia_id text, address text, bioguide text, chamber text, class real, contact_form text, district real, end text, fax text, last text, middle text, name text, office text, party text, party_affiliations text, phone text, relation text, rss_url text, start text, state text, state_rank text, title text, type text, url text, bioguide text, facebook text, facebook_id real, govtrack real, instagram text, instagram_id real, thomas integer, twitter text, twitter_id real, youtube text, youtube_id text)
|
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'
|
bird
|
CREATE TABLE legislator (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 real, icpsr_id real, last_name text, lis_id text, maplight_id real, middle_name text, nickname_name text, official_full_name text, opensecrets_id text, religion_bio text, suffix_name text, thomas_id integer, votesmart_id real, wikidata_id text, wikipedia_id text, address text, bioguide text, caucus text, chamber text, class real, contact_form text, district real, end text, fax text, last text, name text, office text, party text, party_affiliations text, phone text, relation text, rss_url text, start text, state text, state_rank text, title text, type text, url text, ballotpedia_id text, bioguide_id text, bioguide_previous_id text, birthday_bio text, cspan_id text, fec_id text, first_name text, gender_bio text, google_entity_id_id text, govtrack_id integer, house_history_alternate_id text, house_history_id real, icpsr_id real, last_name text, lis_id text, maplight_id text, middle_name text, nickname_name text, official_full_name text, opensecrets_id text, religion_bio text, suffix_name text, thomas_id text, votesmart_id text, wikidata_id text, wikipedia_id text, address text, bioguide text, chamber text, class real, contact_form text, district real, end text, fax text, last text, middle text, name text, office text, party text, party_affiliations text, phone text, relation text, rss_url text, start text, state text, state_rank text, title text, type text, url text, bioguide text, facebook text, facebook_id real, govtrack real, instagram text, instagram_id real, thomas integer, twitter text, twitter_id real, youtube text, youtube_id text)
|
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 )
|
bird
|
CREATE TABLE legislator (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 real, icpsr_id real, last_name text, lis_id text, maplight_id real, middle_name text, nickname_name text, official_full_name text, opensecrets_id text, religion_bio text, suffix_name text, thomas_id integer, votesmart_id real, wikidata_id text, wikipedia_id text, address text, bioguide text, caucus text, chamber text, class real, contact_form text, district real, end text, fax text, last text, name text, office text, party text, party_affiliations text, phone text, relation text, rss_url text, start text, state text, state_rank text, title text, type text, url text, ballotpedia_id text, bioguide_id text, bioguide_previous_id text, birthday_bio text, cspan_id text, fec_id text, first_name text, gender_bio text, google_entity_id_id text, govtrack_id integer, house_history_alternate_id text, house_history_id real, icpsr_id real, last_name text, lis_id text, maplight_id text, middle_name text, nickname_name text, official_full_name text, opensecrets_id text, religion_bio text, suffix_name text, thomas_id text, votesmart_id text, wikidata_id text, wikipedia_id text, address text, bioguide text, chamber text, class real, contact_form text, district real, end text, fax text, last text, middle text, name text, office text, party text, party_affiliations text, phone text, relation text, rss_url text, start text, state text, state_rank text, title text, type text, url text, bioguide text, facebook text, facebook_id real, govtrack real, instagram text, instagram_id real, thomas integer, twitter text, twitter_id real, youtube text, youtube_id text)
|
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 )
|
bird
|
CREATE TABLE legislator (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 real, icpsr_id real, last_name text, lis_id text, maplight_id real, middle_name text, nickname_name text, official_full_name text, opensecrets_id text, religion_bio text, suffix_name text, thomas_id integer, votesmart_id real, wikidata_id text, wikipedia_id text, address text, bioguide text, caucus text, chamber text, class real, contact_form text, district real, end text, fax text, last text, name text, office text, party text, party_affiliations text, phone text, relation text, rss_url text, start text, state text, state_rank text, title text, type text, url text, ballotpedia_id text, bioguide_id text, bioguide_previous_id text, birthday_bio text, cspan_id text, fec_id text, first_name text, gender_bio text, google_entity_id_id text, govtrack_id integer, house_history_alternate_id text, house_history_id real, icpsr_id real, last_name text, lis_id text, maplight_id text, middle_name text, nickname_name text, official_full_name text, opensecrets_id text, religion_bio text, suffix_name text, thomas_id text, votesmart_id text, wikidata_id text, wikipedia_id text, address text, bioguide text, chamber text, class real, contact_form text, district real, end text, fax text, last text, middle text, name text, office text, party text, party_affiliations text, phone text, relation text, rss_url text, start text, state text, state_rank text, title text, type text, url text, bioguide text, facebook text, facebook_id real, govtrack real, instagram text, instagram_id real, thomas integer, twitter text, twitter_id real, youtube text, youtube_id text)
|
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'
|
bird
|
CREATE TABLE legislator (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 real, icpsr_id real, last_name text, lis_id text, maplight_id real, middle_name text, nickname_name text, official_full_name text, opensecrets_id text, religion_bio text, suffix_name text, thomas_id integer, votesmart_id real, wikidata_id text, wikipedia_id text, address text, bioguide text, caucus text, chamber text, class real, contact_form text, district real, end text, fax text, last text, name text, office text, party text, party_affiliations text, phone text, relation text, rss_url text, start text, state text, state_rank text, title text, type text, url text, ballotpedia_id text, bioguide_id text, bioguide_previous_id text, birthday_bio text, cspan_id text, fec_id text, first_name text, gender_bio text, google_entity_id_id text, govtrack_id integer, house_history_alternate_id text, house_history_id real, icpsr_id real, last_name text, lis_id text, maplight_id text, middle_name text, nickname_name text, official_full_name text, opensecrets_id text, religion_bio text, suffix_name text, thomas_id text, votesmart_id text, wikidata_id text, wikipedia_id text, address text, bioguide text, chamber text, class real, contact_form text, district real, end text, fax text, last text, middle text, name text, office text, party text, party_affiliations text, phone text, relation text, rss_url text, start text, state text, state_rank text, title text, type text, url text, bioguide text, facebook text, facebook_id real, govtrack real, instagram text, instagram_id real, thomas integer, twitter text, twitter_id real, youtube text, youtube_id text)
|
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'
|
bird
|
CREATE TABLE legislator (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 real, icpsr_id real, last_name text, lis_id text, maplight_id real, middle_name text, nickname_name text, official_full_name text, opensecrets_id text, religion_bio text, suffix_name text, thomas_id integer, votesmart_id real, wikidata_id text, wikipedia_id text, address text, bioguide text, caucus text, chamber text, class real, contact_form text, district real, end text, fax text, last text, name text, office text, party text, party_affiliations text, phone text, relation text, rss_url text, start text, state text, state_rank text, title text, type text, url text, ballotpedia_id text, bioguide_id text, bioguide_previous_id text, birthday_bio text, cspan_id text, fec_id text, first_name text, gender_bio text, google_entity_id_id text, govtrack_id integer, house_history_alternate_id text, house_history_id real, icpsr_id real, last_name text, lis_id text, maplight_id text, middle_name text, nickname_name text, official_full_name text, opensecrets_id text, religion_bio text, suffix_name text, thomas_id text, votesmart_id text, wikidata_id text, wikipedia_id text, address text, bioguide text, chamber text, class real, contact_form text, district real, end text, fax text, last text, middle text, name text, office text, party text, party_affiliations text, phone text, relation text, rss_url text, start text, state text, state_rank text, title text, type text, url text, bioguide text, facebook text, facebook_id real, govtrack real, instagram text, instagram_id real, thomas integer, twitter text, twitter_id real, youtube text, youtube_id text)
|
How many males were members of the current legislators?
|
SELECT COUNT(*) FROM current WHERE gender_bio = 'M'
|
bird
|
CREATE TABLE legislator (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 real, icpsr_id real, last_name text, lis_id text, maplight_id real, middle_name text, nickname_name text, official_full_name text, opensecrets_id text, religion_bio text, suffix_name text, thomas_id integer, votesmart_id real, wikidata_id text, wikipedia_id text, address text, bioguide text, caucus text, chamber text, class real, contact_form text, district real, end text, fax text, last text, name text, office text, party text, party_affiliations text, phone text, relation text, rss_url text, start text, state text, state_rank text, title text, type text, url text, ballotpedia_id text, bioguide_id text, bioguide_previous_id text, birthday_bio text, cspan_id text, fec_id text, first_name text, gender_bio text, google_entity_id_id text, govtrack_id integer, house_history_alternate_id text, house_history_id real, icpsr_id real, last_name text, lis_id text, maplight_id text, middle_name text, nickname_name text, official_full_name text, opensecrets_id text, religion_bio text, suffix_name text, thomas_id text, votesmart_id text, wikidata_id text, wikipedia_id text, address text, bioguide text, chamber text, class real, contact_form text, district real, end text, fax text, last text, middle text, name text, office text, party text, party_affiliations text, phone text, relation text, rss_url text, start text, state text, state_rank text, title text, type text, url text, bioguide text, facebook text, facebook_id real, govtrack real, instagram text, instagram_id real, thomas integer, twitter text, twitter_id real, youtube text, youtube_id text)
|
How many current legislators chose Republican as their political party?
|
SELECT COUNT(*) FROM `current-terms` WHERE party = 'Republican'
|
bird
|
CREATE TABLE legislator (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 real, icpsr_id real, last_name text, lis_id text, maplight_id real, middle_name text, nickname_name text, official_full_name text, opensecrets_id text, religion_bio text, suffix_name text, thomas_id integer, votesmart_id real, wikidata_id text, wikipedia_id text, address text, bioguide text, caucus text, chamber text, class real, contact_form text, district real, end text, fax text, last text, name text, office text, party text, party_affiliations text, phone text, relation text, rss_url text, start text, state text, state_rank text, title text, type text, url text, ballotpedia_id text, bioguide_id text, bioguide_previous_id text, birthday_bio text, cspan_id text, fec_id text, first_name text, gender_bio text, google_entity_id_id text, govtrack_id integer, house_history_alternate_id text, house_history_id real, icpsr_id real, last_name text, lis_id text, maplight_id text, middle_name text, nickname_name text, official_full_name text, opensecrets_id text, religion_bio text, suffix_name text, thomas_id text, votesmart_id text, wikidata_id text, wikipedia_id text, address text, bioguide text, chamber text, class real, contact_form text, district real, end text, fax text, last text, middle text, name text, office text, party text, party_affiliations text, phone text, relation text, rss_url text, start text, state text, state_rank text, title text, type text, url text, bioguide text, facebook text, facebook_id real, govtrack real, instagram text, instagram_id real, thomas integer, twitter text, twitter_id real, youtube text, youtube_id text)
|
How many legislators have an Instagram account?
|
SELECT COUNT(*) FROM `social-media` WHERE instagram IS NOT NULL AND instagram <> ''
|
bird
|
CREATE TABLE legislator (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 real, icpsr_id real, last_name text, lis_id text, maplight_id real, middle_name text, nickname_name text, official_full_name text, opensecrets_id text, religion_bio text, suffix_name text, thomas_id integer, votesmart_id real, wikidata_id text, wikipedia_id text, address text, bioguide text, caucus text, chamber text, class real, contact_form text, district real, end text, fax text, last text, name text, office text, party text, party_affiliations text, phone text, relation text, rss_url text, start text, state text, state_rank text, title text, type text, url text, ballotpedia_id text, bioguide_id text, bioguide_previous_id text, birthday_bio text, cspan_id text, fec_id text, first_name text, gender_bio text, google_entity_id_id text, govtrack_id integer, house_history_alternate_id text, house_history_id real, icpsr_id real, last_name text, lis_id text, maplight_id text, middle_name text, nickname_name text, official_full_name text, opensecrets_id text, religion_bio text, suffix_name text, thomas_id text, votesmart_id text, wikidata_id text, wikipedia_id text, address text, bioguide text, chamber text, class real, contact_form text, district real, end text, fax text, last text, middle text, name text, office text, party text, party_affiliations text, phone text, relation text, rss_url text, start text, state text, state_rank text, title text, type text, url text, bioguide text, facebook text, facebook_id real, govtrack real, instagram text, instagram_id real, thomas integer, twitter text, twitter_id real, youtube text, youtube_id text)
|
How many females were members of the past legislators?
|
SELECT COUNT(*) FROM historical WHERE gender_bio = 'F'
|
bird
|
CREATE TABLE legislator (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 real, icpsr_id real, last_name text, lis_id text, maplight_id real, middle_name text, nickname_name text, official_full_name text, opensecrets_id text, religion_bio text, suffix_name text, thomas_id integer, votesmart_id real, wikidata_id text, wikipedia_id text, address text, bioguide text, caucus text, chamber text, class real, contact_form text, district real, end text, fax text, last text, name text, office text, party text, party_affiliations text, phone text, relation text, rss_url text, start text, state text, state_rank text, title text, type text, url text, ballotpedia_id text, bioguide_id text, bioguide_previous_id text, birthday_bio text, cspan_id text, fec_id text, first_name text, gender_bio text, google_entity_id_id text, govtrack_id integer, house_history_alternate_id text, house_history_id real, icpsr_id real, last_name text, lis_id text, maplight_id text, middle_name text, nickname_name text, official_full_name text, opensecrets_id text, religion_bio text, suffix_name text, thomas_id text, votesmart_id text, wikidata_id text, wikipedia_id text, address text, bioguide text, chamber text, class real, contact_form text, district real, end text, fax text, last text, middle text, name text, office text, party text, party_affiliations text, phone text, relation text, rss_url text, start text, state text, state_rank text, title text, type text, url text, bioguide text, facebook text, facebook_id real, govtrack real, instagram text, instagram_id real, thomas integer, twitter text, twitter_id real, youtube text, youtube_id text)
|
How many male legislators are Roman Catholic?
|
SELECT COUNT(*) FROM current WHERE religion_bio = 'Roman Catholic' AND gender_bio = 'M'
|
bird
|
CREATE TABLE legislator (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 real, icpsr_id real, last_name text, lis_id text, maplight_id real, middle_name text, nickname_name text, official_full_name text, opensecrets_id text, religion_bio text, suffix_name text, thomas_id integer, votesmart_id real, wikidata_id text, wikipedia_id text, address text, bioguide text, caucus text, chamber text, class real, contact_form text, district real, end text, fax text, last text, name text, office text, party text, party_affiliations text, phone text, relation text, rss_url text, start text, state text, state_rank text, title text, type text, url text, ballotpedia_id text, bioguide_id text, bioguide_previous_id text, birthday_bio text, cspan_id text, fec_id text, first_name text, gender_bio text, google_entity_id_id text, govtrack_id integer, house_history_alternate_id text, house_history_id real, icpsr_id real, last_name text, lis_id text, maplight_id text, middle_name text, nickname_name text, official_full_name text, opensecrets_id text, religion_bio text, suffix_name text, thomas_id text, votesmart_id text, wikidata_id text, wikipedia_id text, address text, bioguide text, chamber text, class real, contact_form text, district real, end text, fax text, last text, middle text, name text, office text, party text, party_affiliations text, phone text, relation text, rss_url text, start text, state text, state_rank text, title text, type text, url text, bioguide text, facebook text, facebook_id real, govtrack real, instagram text, instagram_id real, thomas integer, twitter text, twitter_id real, youtube text, youtube_id text)
|
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%'
|
bird
|
CREATE TABLE legislator (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 real, icpsr_id real, last_name text, lis_id text, maplight_id real, middle_name text, nickname_name text, official_full_name text, opensecrets_id text, religion_bio text, suffix_name text, thomas_id integer, votesmart_id real, wikidata_id text, wikipedia_id text, address text, bioguide text, caucus text, chamber text, class real, contact_form text, district real, end text, fax text, last text, name text, office text, party text, party_affiliations text, phone text, relation text, rss_url text, start text, state text, state_rank text, title text, type text, url text, ballotpedia_id text, bioguide_id text, bioguide_previous_id text, birthday_bio text, cspan_id text, fec_id text, first_name text, gender_bio text, google_entity_id_id text, govtrack_id integer, house_history_alternate_id text, house_history_id real, icpsr_id real, last_name text, lis_id text, maplight_id text, middle_name text, nickname_name text, official_full_name text, opensecrets_id text, religion_bio text, suffix_name text, thomas_id text, votesmart_id text, wikidata_id text, wikipedia_id text, address text, bioguide text, chamber text, class real, contact_form text, district real, end text, fax text, last text, middle text, name text, office text, party text, party_affiliations text, phone text, relation text, rss_url text, start text, state text, state_rank text, title text, type text, url text, bioguide text, facebook text, facebook_id real, govtrack real, instagram text, instagram_id real, thomas integer, twitter text, twitter_id real, youtube text, youtube_id text)
|
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%'
|
bird
|
CREATE TABLE legislator (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 real, icpsr_id real, last_name text, lis_id text, maplight_id real, middle_name text, nickname_name text, official_full_name text, opensecrets_id text, religion_bio text, suffix_name text, thomas_id integer, votesmart_id real, wikidata_id text, wikipedia_id text, address text, bioguide text, caucus text, chamber text, class real, contact_form text, district real, end text, fax text, last text, name text, office text, party text, party_affiliations text, phone text, relation text, rss_url text, start text, state text, state_rank text, title text, type text, url text, ballotpedia_id text, bioguide_id text, bioguide_previous_id text, birthday_bio text, cspan_id text, fec_id text, first_name text, gender_bio text, google_entity_id_id text, govtrack_id integer, house_history_alternate_id text, house_history_id real, icpsr_id real, last_name text, lis_id text, maplight_id text, middle_name text, nickname_name text, official_full_name text, opensecrets_id text, religion_bio text, suffix_name text, thomas_id text, votesmart_id text, wikidata_id text, wikipedia_id text, address text, bioguide text, chamber text, class real, contact_form text, district real, end text, fax text, last text, middle text, name text, office text, party text, party_affiliations text, phone text, relation text, rss_url text, start text, state text, state_rank text, title text, type text, url text, bioguide text, facebook text, facebook_id real, govtrack real, instagram text, instagram_id real, thomas integer, twitter text, twitter_id real, youtube text, youtube_id text)
|
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'
|
bird
|
CREATE TABLE legislator (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 real, icpsr_id real, last_name text, lis_id text, maplight_id real, middle_name text, nickname_name text, official_full_name text, opensecrets_id text, religion_bio text, suffix_name text, thomas_id integer, votesmart_id real, wikidata_id text, wikipedia_id text, address text, bioguide text, caucus text, chamber text, class real, contact_form text, district real, end text, fax text, last text, name text, office text, party text, party_affiliations text, phone text, relation text, rss_url text, start text, state text, state_rank text, title text, type text, url text, ballotpedia_id text, bioguide_id text, bioguide_previous_id text, birthday_bio text, cspan_id text, fec_id text, first_name text, gender_bio text, google_entity_id_id text, govtrack_id integer, house_history_alternate_id text, house_history_id real, icpsr_id real, last_name text, lis_id text, maplight_id text, middle_name text, nickname_name text, official_full_name text, opensecrets_id text, religion_bio text, suffix_name text, thomas_id text, votesmart_id text, wikidata_id text, wikipedia_id text, address text, bioguide text, chamber text, class real, contact_form text, district real, end text, fax text, last text, middle text, name text, office text, party text, party_affiliations text, phone text, relation text, rss_url text, start text, state text, state_rank text, title text, type text, url text, bioguide text, facebook text, facebook_id real, govtrack real, instagram text, instagram_id real, thomas integer, twitter text, twitter_id real, youtube text, youtube_id text)
|
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' AND T2.last_name = 'Warner'
|
bird
|
CREATE TABLE legislator (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 real, icpsr_id real, last_name text, lis_id text, maplight_id real, middle_name text, nickname_name text, official_full_name text, opensecrets_id text, religion_bio text, suffix_name text, thomas_id integer, votesmart_id real, wikidata_id text, wikipedia_id text, address text, bioguide text, caucus text, chamber text, class real, contact_form text, district real, end text, fax text, last text, name text, office text, party text, party_affiliations text, phone text, relation text, rss_url text, start text, state text, state_rank text, title text, type text, url text, ballotpedia_id text, bioguide_id text, bioguide_previous_id text, birthday_bio text, cspan_id text, fec_id text, first_name text, gender_bio text, google_entity_id_id text, govtrack_id integer, house_history_alternate_id text, house_history_id real, icpsr_id real, last_name text, lis_id text, maplight_id text, middle_name text, nickname_name text, official_full_name text, opensecrets_id text, religion_bio text, suffix_name text, thomas_id text, votesmart_id text, wikidata_id text, wikipedia_id text, address text, bioguide text, chamber text, class real, contact_form text, district real, end text, fax text, last text, middle text, name text, office text, party text, party_affiliations text, phone text, relation text, rss_url text, start text, state text, state_rank text, title text, type text, url text, bioguide text, facebook text, facebook_id real, govtrack real, instagram text, instagram_id real, thomas integer, twitter text, twitter_id real, youtube text, youtube_id text)
|
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
|
bird
|
CREATE TABLE legislator (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 real, icpsr_id real, last_name text, lis_id text, maplight_id real, middle_name text, nickname_name text, official_full_name text, opensecrets_id text, religion_bio text, suffix_name text, thomas_id integer, votesmart_id real, wikidata_id text, wikipedia_id text, address text, bioguide text, caucus text, chamber text, class real, contact_form text, district real, end text, fax text, last text, name text, office text, party text, party_affiliations text, phone text, relation text, rss_url text, start text, state text, state_rank text, title text, type text, url text, ballotpedia_id text, bioguide_id text, bioguide_previous_id text, birthday_bio text, cspan_id text, fec_id text, first_name text, gender_bio text, google_entity_id_id text, govtrack_id integer, house_history_alternate_id text, house_history_id real, icpsr_id real, last_name text, lis_id text, maplight_id text, middle_name text, nickname_name text, official_full_name text, opensecrets_id text, religion_bio text, suffix_name text, thomas_id text, votesmart_id text, wikidata_id text, wikipedia_id text, address text, bioguide text, chamber text, class real, contact_form text, district real, end text, fax text, last text, middle text, name text, office text, party text, party_affiliations text, phone text, relation text, rss_url text, start text, state text, state_rank text, title text, type text, url text, bioguide text, facebook text, facebook_id real, govtrack real, instagram text, instagram_id real, thomas integer, twitter text, twitter_id real, youtube text, youtube_id text)
|
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
|
bird
|
CREATE TABLE legislator (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 real, icpsr_id real, last_name text, lis_id text, maplight_id real, middle_name text, nickname_name text, official_full_name text, opensecrets_id text, religion_bio text, suffix_name text, thomas_id integer, votesmart_id real, wikidata_id text, wikipedia_id text, address text, bioguide text, caucus text, chamber text, class real, contact_form text, district real, end text, fax text, last text, name text, office text, party text, party_affiliations text, phone text, relation text, rss_url text, start text, state text, state_rank text, title text, type text, url text, ballotpedia_id text, bioguide_id text, bioguide_previous_id text, birthday_bio text, cspan_id text, fec_id text, first_name text, gender_bio text, google_entity_id_id text, govtrack_id integer, house_history_alternate_id text, house_history_id real, icpsr_id real, last_name text, lis_id text, maplight_id text, middle_name text, nickname_name text, official_full_name text, opensecrets_id text, religion_bio text, suffix_name text, thomas_id text, votesmart_id text, wikidata_id text, wikipedia_id text, address text, bioguide text, chamber text, class real, contact_form text, district real, end text, fax text, last text, middle text, name text, office text, party text, party_affiliations text, phone text, relation text, rss_url text, start text, state text, state_rank text, title text, type text, url text, bioguide text, facebook text, facebook_id real, govtrack real, instagram text, instagram_id real, thomas integer, twitter text, twitter_id real, youtube text, youtube_id text)
|
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'
|
bird
|
CREATE TABLE legislator (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 real, icpsr_id real, last_name text, lis_id text, maplight_id real, middle_name text, nickname_name text, official_full_name text, opensecrets_id text, religion_bio text, suffix_name text, thomas_id integer, votesmart_id real, wikidata_id text, wikipedia_id text, address text, bioguide text, caucus text, chamber text, class real, contact_form text, district real, end text, fax text, last text, name text, office text, party text, party_affiliations text, phone text, relation text, rss_url text, start text, state text, state_rank text, title text, type text, url text, ballotpedia_id text, bioguide_id text, bioguide_previous_id text, birthday_bio text, cspan_id text, fec_id text, first_name text, gender_bio text, google_entity_id_id text, govtrack_id integer, house_history_alternate_id text, house_history_id real, icpsr_id real, last_name text, lis_id text, maplight_id text, middle_name text, nickname_name text, official_full_name text, opensecrets_id text, religion_bio text, suffix_name text, thomas_id text, votesmart_id text, wikidata_id text, wikipedia_id text, address text, bioguide text, chamber text, class real, contact_form text, district real, end text, fax text, last text, middle text, name text, office text, party text, party_affiliations text, phone text, relation text, rss_url text, start text, state text, state_rank text, title text, type text, url text, bioguide text, facebook text, facebook_id real, govtrack real, instagram text, instagram_id real, thomas integer, twitter text, twitter_id real, youtube text, youtube_id text)
|
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'
|
bird
|
CREATE TABLE legislator (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 real, icpsr_id real, last_name text, lis_id text, maplight_id real, middle_name text, nickname_name text, official_full_name text, opensecrets_id text, religion_bio text, suffix_name text, thomas_id integer, votesmart_id real, wikidata_id text, wikipedia_id text, address text, bioguide text, caucus text, chamber text, class real, contact_form text, district real, end text, fax text, last text, name text, office text, party text, party_affiliations text, phone text, relation text, rss_url text, start text, state text, state_rank text, title text, type text, url text, ballotpedia_id text, bioguide_id text, bioguide_previous_id text, birthday_bio text, cspan_id text, fec_id text, first_name text, gender_bio text, google_entity_id_id text, govtrack_id integer, house_history_alternate_id text, house_history_id real, icpsr_id real, last_name text, lis_id text, maplight_id text, middle_name text, nickname_name text, official_full_name text, opensecrets_id text, religion_bio text, suffix_name text, thomas_id text, votesmart_id text, wikidata_id text, wikipedia_id text, address text, bioguide text, chamber text, class real, contact_form text, district real, end text, fax text, last text, middle text, name text, office text, party text, party_affiliations text, phone text, relation text, rss_url text, start text, state text, state_rank text, title text, type text, url text, bioguide text, facebook text, facebook_id real, govtrack real, instagram text, instagram_id real, thomas integer, twitter text, twitter_id real, youtube text, youtube_id text)
|
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
|
bird
|
CREATE TABLE legislator (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 real, icpsr_id real, last_name text, lis_id text, maplight_id real, middle_name text, nickname_name text, official_full_name text, opensecrets_id text, religion_bio text, suffix_name text, thomas_id integer, votesmart_id real, wikidata_id text, wikipedia_id text, address text, bioguide text, caucus text, chamber text, class real, contact_form text, district real, end text, fax text, last text, name text, office text, party text, party_affiliations text, phone text, relation text, rss_url text, start text, state text, state_rank text, title text, type text, url text, ballotpedia_id text, bioguide_id text, bioguide_previous_id text, birthday_bio text, cspan_id text, fec_id text, first_name text, gender_bio text, google_entity_id_id text, govtrack_id integer, house_history_alternate_id text, house_history_id real, icpsr_id real, last_name text, lis_id text, maplight_id text, middle_name text, nickname_name text, official_full_name text, opensecrets_id text, religion_bio text, suffix_name text, thomas_id text, votesmart_id text, wikidata_id text, wikipedia_id text, address text, bioguide text, chamber text, class real, contact_form text, district real, end text, fax text, last text, middle text, name text, office text, party text, party_affiliations text, phone text, relation text, rss_url text, start text, state text, state_rank text, title text, type text, url text, bioguide text, facebook text, facebook_id real, govtrack real, instagram text, instagram_id real, thomas integer, twitter text, twitter_id real, youtube text, youtube_id text)
|
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
|
bird
|
CREATE TABLE legislator (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 real, icpsr_id real, last_name text, lis_id text, maplight_id real, middle_name text, nickname_name text, official_full_name text, opensecrets_id text, religion_bio text, suffix_name text, thomas_id integer, votesmart_id real, wikidata_id text, wikipedia_id text, address text, bioguide text, caucus text, chamber text, class real, contact_form text, district real, end text, fax text, last text, name text, office text, party text, party_affiliations text, phone text, relation text, rss_url text, start text, state text, state_rank text, title text, type text, url text, ballotpedia_id text, bioguide_id text, bioguide_previous_id text, birthday_bio text, cspan_id text, fec_id text, first_name text, gender_bio text, google_entity_id_id text, govtrack_id integer, house_history_alternate_id text, house_history_id real, icpsr_id real, last_name text, lis_id text, maplight_id text, middle_name text, nickname_name text, official_full_name text, opensecrets_id text, religion_bio text, suffix_name text, thomas_id text, votesmart_id text, wikidata_id text, wikipedia_id text, address text, bioguide text, chamber text, class real, contact_form text, district real, end text, fax text, last text, middle text, name text, office text, party text, party_affiliations text, phone text, relation text, rss_url text, start text, state text, state_rank text, title text, type text, url text, bioguide text, facebook text, facebook_id real, govtrack real, instagram text, instagram_id real, thomas integer, twitter text, twitter_id real, youtube text, youtube_id text)
|
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
|
bird
|
CREATE TABLE legislator (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 real, icpsr_id real, last_name text, lis_id text, maplight_id real, middle_name text, nickname_name text, official_full_name text, opensecrets_id text, religion_bio text, suffix_name text, thomas_id integer, votesmart_id real, wikidata_id text, wikipedia_id text, address text, bioguide text, caucus text, chamber text, class real, contact_form text, district real, end text, fax text, last text, name text, office text, party text, party_affiliations text, phone text, relation text, rss_url text, start text, state text, state_rank text, title text, type text, url text, ballotpedia_id text, bioguide_id text, bioguide_previous_id text, birthday_bio text, cspan_id text, fec_id text, first_name text, gender_bio text, google_entity_id_id text, govtrack_id integer, house_history_alternate_id text, house_history_id real, icpsr_id real, last_name text, lis_id text, maplight_id text, middle_name text, nickname_name text, official_full_name text, opensecrets_id text, religion_bio text, suffix_name text, thomas_id text, votesmart_id text, wikidata_id text, wikipedia_id text, address text, bioguide text, chamber text, class real, contact_form text, district real, end text, fax text, last text, middle text, name text, office text, party text, party_affiliations text, phone text, relation text, rss_url text, start text, state text, state_rank text, title text, type text, url text, bioguide text, facebook text, facebook_id real, govtrack real, instagram text, instagram_id real, thomas integer, twitter text, twitter_id real, youtube text, youtube_id text)
|
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'
|
bird
|
CREATE TABLE legislator (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 real, icpsr_id real, last_name text, lis_id text, maplight_id real, middle_name text, nickname_name text, official_full_name text, opensecrets_id text, religion_bio text, suffix_name text, thomas_id integer, votesmart_id real, wikidata_id text, wikipedia_id text, address text, bioguide text, caucus text, chamber text, class real, contact_form text, district real, end text, fax text, last text, name text, office text, party text, party_affiliations text, phone text, relation text, rss_url text, start text, state text, state_rank text, title text, type text, url text, ballotpedia_id text, bioguide_id text, bioguide_previous_id text, birthday_bio text, cspan_id text, fec_id text, first_name text, gender_bio text, google_entity_id_id text, govtrack_id integer, house_history_alternate_id text, house_history_id real, icpsr_id real, last_name text, lis_id text, maplight_id text, middle_name text, nickname_name text, official_full_name text, opensecrets_id text, religion_bio text, suffix_name text, thomas_id text, votesmart_id text, wikidata_id text, wikipedia_id text, address text, bioguide text, chamber text, class real, contact_form text, district real, end text, fax text, last text, middle text, name text, office text, party text, party_affiliations text, phone text, relation text, rss_url text, start text, state text, state_rank text, title text, type text, url text, bioguide text, facebook text, facebook_id real, govtrack real, instagram text, instagram_id real, thomas integer, twitter text, twitter_id real, youtube text, youtube_id text)
|
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'
|
bird
|
CREATE TABLE legislator (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 real, icpsr_id real, last_name text, lis_id text, maplight_id real, middle_name text, nickname_name text, official_full_name text, opensecrets_id text, religion_bio text, suffix_name text, thomas_id integer, votesmart_id real, wikidata_id text, wikipedia_id text, address text, bioguide text, caucus text, chamber text, class real, contact_form text, district real, end text, fax text, last text, name text, office text, party text, party_affiliations text, phone text, relation text, rss_url text, start text, state text, state_rank text, title text, type text, url text, ballotpedia_id text, bioguide_id text, bioguide_previous_id text, birthday_bio text, cspan_id text, fec_id text, first_name text, gender_bio text, google_entity_id_id text, govtrack_id integer, house_history_alternate_id text, house_history_id real, icpsr_id real, last_name text, lis_id text, maplight_id text, middle_name text, nickname_name text, official_full_name text, opensecrets_id text, religion_bio text, suffix_name text, thomas_id text, votesmart_id text, wikidata_id text, wikipedia_id text, address text, bioguide text, chamber text, class real, contact_form text, district real, end text, fax text, last text, middle text, name text, office text, party text, party_affiliations text, phone text, relation text, rss_url text, start text, state text, state_rank text, title text, type text, url text, bioguide text, facebook text, facebook_id real, govtrack real, instagram text, instagram_id real, thomas integer, twitter text, twitter_id real, youtube text, youtube_id text)
|
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
|
bird
|
CREATE TABLE legislator (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 real, icpsr_id real, last_name text, lis_id text, maplight_id real, middle_name text, nickname_name text, official_full_name text, opensecrets_id text, religion_bio text, suffix_name text, thomas_id integer, votesmart_id real, wikidata_id text, wikipedia_id text, address text, bioguide text, caucus text, chamber text, class real, contact_form text, district real, end text, fax text, last text, name text, office text, party text, party_affiliations text, phone text, relation text, rss_url text, start text, state text, state_rank text, title text, type text, url text, ballotpedia_id text, bioguide_id text, bioguide_previous_id text, birthday_bio text, cspan_id text, fec_id text, first_name text, gender_bio text, google_entity_id_id text, govtrack_id integer, house_history_alternate_id text, house_history_id real, icpsr_id real, last_name text, lis_id text, maplight_id text, middle_name text, nickname_name text, official_full_name text, opensecrets_id text, religion_bio text, suffix_name text, thomas_id text, votesmart_id text, wikidata_id text, wikipedia_id text, address text, bioguide text, chamber text, class real, contact_form text, district real, end text, fax text, last text, middle text, name text, office text, party text, party_affiliations text, phone text, relation text, rss_url text, start text, state text, state_rank text, title text, type text, url text, bioguide text, facebook text, facebook_id real, govtrack real, instagram text, instagram_id real, thomas integer, twitter text, twitter_id real, youtube text, youtube_id text)
|
Give the YouTube ID of the channel 'RepWassermanSchultz.'
|
SELECT youtube_id FROM `social-media` WHERE youtube = 'RepWassermanSchultz'
|
bird
|
CREATE TABLE legislator (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 real, icpsr_id real, last_name text, lis_id text, maplight_id real, middle_name text, nickname_name text, official_full_name text, opensecrets_id text, religion_bio text, suffix_name text, thomas_id integer, votesmart_id real, wikidata_id text, wikipedia_id text, address text, bioguide text, caucus text, chamber text, class real, contact_form text, district real, end text, fax text, last text, name text, office text, party text, party_affiliations text, phone text, relation text, rss_url text, start text, state text, state_rank text, title text, type text, url text, ballotpedia_id text, bioguide_id text, bioguide_previous_id text, birthday_bio text, cspan_id text, fec_id text, first_name text, gender_bio text, google_entity_id_id text, govtrack_id integer, house_history_alternate_id text, house_history_id real, icpsr_id real, last_name text, lis_id text, maplight_id text, middle_name text, nickname_name text, official_full_name text, opensecrets_id text, religion_bio text, suffix_name text, thomas_id text, votesmart_id text, wikidata_id text, wikipedia_id text, address text, bioguide text, chamber text, class real, contact_form text, district real, end text, fax text, last text, middle text, name text, office text, party text, party_affiliations text, phone text, relation text, rss_url text, start text, state text, state_rank text, title text, type text, url text, bioguide text, facebook text, facebook_id real, govtrack real, instagram text, instagram_id real, thomas integer, twitter text, twitter_id real, youtube text, youtube_id text)
|
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'
|
bird
|
CREATE TABLE legislator (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 real, icpsr_id real, last_name text, lis_id text, maplight_id real, middle_name text, nickname_name text, official_full_name text, opensecrets_id text, religion_bio text, suffix_name text, thomas_id integer, votesmart_id real, wikidata_id text, wikipedia_id text, address text, bioguide text, caucus text, chamber text, class real, contact_form text, district real, end text, fax text, last text, name text, office text, party text, party_affiliations text, phone text, relation text, rss_url text, start text, state text, state_rank text, title text, type text, url text, ballotpedia_id text, bioguide_id text, bioguide_previous_id text, birthday_bio text, cspan_id text, fec_id text, first_name text, gender_bio text, google_entity_id_id text, govtrack_id integer, house_history_alternate_id text, house_history_id real, icpsr_id real, last_name text, lis_id text, maplight_id text, middle_name text, nickname_name text, official_full_name text, opensecrets_id text, religion_bio text, suffix_name text, thomas_id text, votesmart_id text, wikidata_id text, wikipedia_id text, address text, bioguide text, chamber text, class real, contact_form text, district real, end text, fax text, last text, middle text, name text, office text, party text, party_affiliations text, phone text, relation text, rss_url text, start text, state text, state_rank text, title text, type text, url text, bioguide text, facebook text, facebook_id real, govtrack real, instagram text, instagram_id real, thomas integer, twitter text, twitter_id real, youtube text, youtube_id text)
|
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'
|
bird
|
CREATE TABLE legislator (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 real, icpsr_id real, last_name text, lis_id text, maplight_id real, middle_name text, nickname_name text, official_full_name text, opensecrets_id text, religion_bio text, suffix_name text, thomas_id integer, votesmart_id real, wikidata_id text, wikipedia_id text, address text, bioguide text, caucus text, chamber text, class real, contact_form text, district real, end text, fax text, last text, name text, office text, party text, party_affiliations text, phone text, relation text, rss_url text, start text, state text, state_rank text, title text, type text, url text, ballotpedia_id text, bioguide_id text, bioguide_previous_id text, birthday_bio text, cspan_id text, fec_id text, first_name text, gender_bio text, google_entity_id_id text, govtrack_id integer, house_history_alternate_id text, house_history_id real, icpsr_id real, last_name text, lis_id text, maplight_id text, middle_name text, nickname_name text, official_full_name text, opensecrets_id text, religion_bio text, suffix_name text, thomas_id text, votesmart_id text, wikidata_id text, wikipedia_id text, address text, bioguide text, chamber text, class real, contact_form text, district real, end text, fax text, last text, middle text, name text, office text, party text, party_affiliations text, phone text, relation text, rss_url text, start text, state text, state_rank text, title text, type text, url text, bioguide text, facebook text, facebook_id real, govtrack real, instagram text, instagram_id real, thomas integer, twitter text, twitter_id real, youtube text, youtube_id text)
|
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
|
bird
|
CREATE TABLE legislator (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 real, icpsr_id real, last_name text, lis_id text, maplight_id real, middle_name text, nickname_name text, official_full_name text, opensecrets_id text, religion_bio text, suffix_name text, thomas_id integer, votesmart_id real, wikidata_id text, wikipedia_id text, address text, bioguide text, caucus text, chamber text, class real, contact_form text, district real, end text, fax text, last text, name text, office text, party text, party_affiliations text, phone text, relation text, rss_url text, start text, state text, state_rank text, title text, type text, url text, ballotpedia_id text, bioguide_id text, bioguide_previous_id text, birthday_bio text, cspan_id text, fec_id text, first_name text, gender_bio text, google_entity_id_id text, govtrack_id integer, house_history_alternate_id text, house_history_id real, icpsr_id real, last_name text, lis_id text, maplight_id text, middle_name text, nickname_name text, official_full_name text, opensecrets_id text, religion_bio text, suffix_name text, thomas_id text, votesmart_id text, wikidata_id text, wikipedia_id text, address text, bioguide text, chamber text, class real, contact_form text, district real, end text, fax text, last text, middle text, name text, office text, party text, party_affiliations text, phone text, relation text, rss_url text, start text, state text, state_rank text, title text, type text, url text, bioguide text, facebook text, facebook_id real, govtrack real, instagram text, instagram_id real, thomas integer, twitter text, twitter_id real, youtube text, youtube_id text)
|
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
|
bird
|
CREATE TABLE legislator (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 real, icpsr_id real, last_name text, lis_id text, maplight_id real, middle_name text, nickname_name text, official_full_name text, opensecrets_id text, religion_bio text, suffix_name text, thomas_id integer, votesmart_id real, wikidata_id text, wikipedia_id text, address text, bioguide text, caucus text, chamber text, class real, contact_form text, district real, end text, fax text, last text, name text, office text, party text, party_affiliations text, phone text, relation text, rss_url text, start text, state text, state_rank text, title text, type text, url text, ballotpedia_id text, bioguide_id text, bioguide_previous_id text, birthday_bio text, cspan_id text, fec_id text, first_name text, gender_bio text, google_entity_id_id text, govtrack_id integer, house_history_alternate_id text, house_history_id real, icpsr_id real, last_name text, lis_id text, maplight_id text, middle_name text, nickname_name text, official_full_name text, opensecrets_id text, religion_bio text, suffix_name text, thomas_id text, votesmart_id text, wikidata_id text, wikipedia_id text, address text, bioguide text, chamber text, class real, contact_form text, district real, end text, fax text, last text, middle text, name text, office text, party text, party_affiliations text, phone text, relation text, rss_url text, start text, state text, state_rank text, title text, type text, url text, bioguide text, facebook text, facebook_id real, govtrack real, instagram text, instagram_id real, thomas integer, twitter text, twitter_id real, youtube text, youtube_id text)
|
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'
|
bird
|
CREATE TABLE legislator (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 real, icpsr_id real, last_name text, lis_id text, maplight_id real, middle_name text, nickname_name text, official_full_name text, opensecrets_id text, religion_bio text, suffix_name text, thomas_id integer, votesmart_id real, wikidata_id text, wikipedia_id text, address text, bioguide text, caucus text, chamber text, class real, contact_form text, district real, end text, fax text, last text, name text, office text, party text, party_affiliations text, phone text, relation text, rss_url text, start text, state text, state_rank text, title text, type text, url text, ballotpedia_id text, bioguide_id text, bioguide_previous_id text, birthday_bio text, cspan_id text, fec_id text, first_name text, gender_bio text, google_entity_id_id text, govtrack_id integer, house_history_alternate_id text, house_history_id real, icpsr_id real, last_name text, lis_id text, maplight_id text, middle_name text, nickname_name text, official_full_name text, opensecrets_id text, religion_bio text, suffix_name text, thomas_id text, votesmart_id text, wikidata_id text, wikipedia_id text, address text, bioguide text, chamber text, class real, contact_form text, district real, end text, fax text, last text, middle text, name text, office text, party text, party_affiliations text, phone text, relation text, rss_url text, start text, state text, state_rank text, title text, type text, url text, bioguide text, facebook text, facebook_id real, govtrack real, instagram text, instagram_id real, thomas integer, twitter text, twitter_id real, youtube text, youtube_id text)
|
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'
|
bird
|
CREATE TABLE legislator (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 real, icpsr_id real, last_name text, lis_id text, maplight_id real, middle_name text, nickname_name text, official_full_name text, opensecrets_id text, religion_bio text, suffix_name text, thomas_id integer, votesmart_id real, wikidata_id text, wikipedia_id text, address text, bioguide text, caucus text, chamber text, class real, contact_form text, district real, end text, fax text, last text, name text, office text, party text, party_affiliations text, phone text, relation text, rss_url text, start text, state text, state_rank text, title text, type text, url text, ballotpedia_id text, bioguide_id text, bioguide_previous_id text, birthday_bio text, cspan_id text, fec_id text, first_name text, gender_bio text, google_entity_id_id text, govtrack_id integer, house_history_alternate_id text, house_history_id real, icpsr_id real, last_name text, lis_id text, maplight_id text, middle_name text, nickname_name text, official_full_name text, opensecrets_id text, religion_bio text, suffix_name text, thomas_id text, votesmart_id text, wikidata_id text, wikipedia_id text, address text, bioguide text, chamber text, class real, contact_form text, district real, end text, fax text, last text, middle text, name text, office text, party text, party_affiliations text, phone text, relation text, rss_url text, start text, state text, state_rank text, title text, type text, url text, bioguide text, facebook text, facebook_id real, govtrack real, instagram text, instagram_id real, thomas integer, twitter text, twitter_id real, youtube text, youtube_id text)
|
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 != ''
|
bird
|
CREATE TABLE legislator (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 real, icpsr_id real, last_name text, lis_id text, maplight_id real, middle_name text, nickname_name text, official_full_name text, opensecrets_id text, religion_bio text, suffix_name text, thomas_id integer, votesmart_id real, wikidata_id text, wikipedia_id text, address text, bioguide text, caucus text, chamber text, class real, contact_form text, district real, end text, fax text, last text, name text, office text, party text, party_affiliations text, phone text, relation text, rss_url text, start text, state text, state_rank text, title text, type text, url text, ballotpedia_id text, bioguide_id text, bioguide_previous_id text, birthday_bio text, cspan_id text, fec_id text, first_name text, gender_bio text, google_entity_id_id text, govtrack_id integer, house_history_alternate_id text, house_history_id real, icpsr_id real, last_name text, lis_id text, maplight_id text, middle_name text, nickname_name text, official_full_name text, opensecrets_id text, religion_bio text, suffix_name text, thomas_id text, votesmart_id text, wikidata_id text, wikipedia_id text, address text, bioguide text, chamber text, class real, contact_form text, district real, end text, fax text, last text, middle text, name text, office text, party text, party_affiliations text, phone text, relation text, rss_url text, start text, state text, state_rank text, title text, type text, url text, bioguide text, facebook text, facebook_id real, govtrack real, instagram text, instagram_id real, thomas integer, twitter text, twitter_id real, youtube text, youtube_id text)
|
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
|
bird
|
CREATE TABLE legislator (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 real, icpsr_id real, last_name text, lis_id text, maplight_id real, middle_name text, nickname_name text, official_full_name text, opensecrets_id text, religion_bio text, suffix_name text, thomas_id integer, votesmart_id real, wikidata_id text, wikipedia_id text, address text, bioguide text, caucus text, chamber text, class real, contact_form text, district real, end text, fax text, last text, name text, office text, party text, party_affiliations text, phone text, relation text, rss_url text, start text, state text, state_rank text, title text, type text, url text, ballotpedia_id text, bioguide_id text, bioguide_previous_id text, birthday_bio text, cspan_id text, fec_id text, first_name text, gender_bio text, google_entity_id_id text, govtrack_id integer, house_history_alternate_id text, house_history_id real, icpsr_id real, last_name text, lis_id text, maplight_id text, middle_name text, nickname_name text, official_full_name text, opensecrets_id text, religion_bio text, suffix_name text, thomas_id text, votesmart_id text, wikidata_id text, wikipedia_id text, address text, bioguide text, chamber text, class real, contact_form text, district real, end text, fax text, last text, middle text, name text, office text, party text, party_affiliations text, phone text, relation text, rss_url text, start text, state text, state_rank text, title text, type text, url text, bioguide text, facebook text, facebook_id real, govtrack real, instagram text, instagram_id real, thomas integer, twitter text, twitter_id real, youtube text, youtube_id text)
|
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
|
bird
|
CREATE TABLE legislator (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 real, icpsr_id real, last_name text, lis_id text, maplight_id real, middle_name text, nickname_name text, official_full_name text, opensecrets_id text, religion_bio text, suffix_name text, thomas_id integer, votesmart_id real, wikidata_id text, wikipedia_id text, address text, bioguide text, caucus text, chamber text, class real, contact_form text, district real, end text, fax text, last text, name text, office text, party text, party_affiliations text, phone text, relation text, rss_url text, start text, state text, state_rank text, title text, type text, url text, ballotpedia_id text, bioguide_id text, bioguide_previous_id text, birthday_bio text, cspan_id text, fec_id text, first_name text, gender_bio text, google_entity_id_id text, govtrack_id integer, house_history_alternate_id text, house_history_id real, icpsr_id real, last_name text, lis_id text, maplight_id text, middle_name text, nickname_name text, official_full_name text, opensecrets_id text, religion_bio text, suffix_name text, thomas_id text, votesmart_id text, wikidata_id text, wikipedia_id text, address text, bioguide text, chamber text, class real, contact_form text, district real, end text, fax text, last text, middle text, name text, office text, party text, party_affiliations text, phone text, relation text, rss_url text, start text, state text, state_rank text, title text, type text, url text, bioguide text, facebook text, facebook_id real, govtrack real, instagram text, instagram_id real, thomas integer, twitter text, twitter_id real, youtube text, youtube_id text)
|
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'
|
bird
|
CREATE TABLE legislator (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 real, icpsr_id real, last_name text, lis_id text, maplight_id real, middle_name text, nickname_name text, official_full_name text, opensecrets_id text, religion_bio text, suffix_name text, thomas_id integer, votesmart_id real, wikidata_id text, wikipedia_id text, address text, bioguide text, caucus text, chamber text, class real, contact_form text, district real, end text, fax text, last text, name text, office text, party text, party_affiliations text, phone text, relation text, rss_url text, start text, state text, state_rank text, title text, type text, url text, ballotpedia_id text, bioguide_id text, bioguide_previous_id text, birthday_bio text, cspan_id text, fec_id text, first_name text, gender_bio text, google_entity_id_id text, govtrack_id integer, house_history_alternate_id text, house_history_id real, icpsr_id real, last_name text, lis_id text, maplight_id text, middle_name text, nickname_name text, official_full_name text, opensecrets_id text, religion_bio text, suffix_name text, thomas_id text, votesmart_id text, wikidata_id text, wikipedia_id text, address text, bioguide text, chamber text, class real, contact_form text, district real, end text, fax text, last text, middle text, name text, office text, party text, party_affiliations text, phone text, relation text, rss_url text, start text, state text, state_rank text, title text, type text, url text, bioguide text, facebook text, facebook_id real, govtrack real, instagram text, instagram_id real, thomas integer, twitter text, twitter_id real, youtube text, youtube_id text)
|
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
|
bird
|
CREATE TABLE legislator (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 real, icpsr_id real, last_name text, lis_id text, maplight_id real, middle_name text, nickname_name text, official_full_name text, opensecrets_id text, religion_bio text, suffix_name text, thomas_id integer, votesmart_id real, wikidata_id text, wikipedia_id text, address text, bioguide text, caucus text, chamber text, class real, contact_form text, district real, end text, fax text, last text, name text, office text, party text, party_affiliations text, phone text, relation text, rss_url text, start text, state text, state_rank text, title text, type text, url text, ballotpedia_id text, bioguide_id text, bioguide_previous_id text, birthday_bio text, cspan_id text, fec_id text, first_name text, gender_bio text, google_entity_id_id text, govtrack_id integer, house_history_alternate_id text, house_history_id real, icpsr_id real, last_name text, lis_id text, maplight_id text, middle_name text, nickname_name text, official_full_name text, opensecrets_id text, religion_bio text, suffix_name text, thomas_id text, votesmart_id text, wikidata_id text, wikipedia_id text, address text, bioguide text, chamber text, class real, contact_form text, district real, end text, fax text, last text, middle text, name text, office text, party text, party_affiliations text, phone text, relation text, rss_url text, start text, state text, state_rank text, title text, type text, url text, bioguide text, facebook text, facebook_id real, govtrack real, instagram text, instagram_id real, thomas integer, twitter text, twitter_id real, youtube text, youtube_id text)
|
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'
|
bird
|
CREATE TABLE legislator (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 real, icpsr_id real, last_name text, lis_id text, maplight_id real, middle_name text, nickname_name text, official_full_name text, opensecrets_id text, religion_bio text, suffix_name text, thomas_id integer, votesmart_id real, wikidata_id text, wikipedia_id text, address text, bioguide text, caucus text, chamber text, class real, contact_form text, district real, end text, fax text, last text, name text, office text, party text, party_affiliations text, phone text, relation text, rss_url text, start text, state text, state_rank text, title text, type text, url text, ballotpedia_id text, bioguide_id text, bioguide_previous_id text, birthday_bio text, cspan_id text, fec_id text, first_name text, gender_bio text, google_entity_id_id text, govtrack_id integer, house_history_alternate_id text, house_history_id real, icpsr_id real, last_name text, lis_id text, maplight_id text, middle_name text, nickname_name text, official_full_name text, opensecrets_id text, religion_bio text, suffix_name text, thomas_id text, votesmart_id text, wikidata_id text, wikipedia_id text, address text, bioguide text, chamber text, class real, contact_form text, district real, end text, fax text, last text, middle text, name text, office text, party text, party_affiliations text, phone text, relation text, rss_url text, start text, state text, state_rank text, title text, type text, url text, bioguide text, facebook text, facebook_id real, govtrack real, instagram text, instagram_id real, thomas integer, twitter text, twitter_id real, youtube text, youtube_id text)
|
How many historical legislators were born in 1973?
|
SELECT COUNT(*) FROM historical WHERE CAST(birthday_bio AS date) = 1973
|
bird
|
CREATE TABLE legislator (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 real, icpsr_id real, last_name text, lis_id text, maplight_id real, middle_name text, nickname_name text, official_full_name text, opensecrets_id text, religion_bio text, suffix_name text, thomas_id integer, votesmart_id real, wikidata_id text, wikipedia_id text, address text, bioguide text, caucus text, chamber text, class real, contact_form text, district real, end text, fax text, last text, name text, office text, party text, party_affiliations text, phone text, relation text, rss_url text, start text, state text, state_rank text, title text, type text, url text, ballotpedia_id text, bioguide_id text, bioguide_previous_id text, birthday_bio text, cspan_id text, fec_id text, first_name text, gender_bio text, google_entity_id_id text, govtrack_id integer, house_history_alternate_id text, house_history_id real, icpsr_id real, last_name text, lis_id text, maplight_id text, middle_name text, nickname_name text, official_full_name text, opensecrets_id text, religion_bio text, suffix_name text, thomas_id text, votesmart_id text, wikidata_id text, wikipedia_id text, address text, bioguide text, chamber text, class real, contact_form text, district real, end text, fax text, last text, middle text, name text, office text, party text, party_affiliations text, phone text, relation text, rss_url text, start text, state text, state_rank text, title text, type text, url text, bioguide text, facebook text, facebook_id real, govtrack real, instagram text, instagram_id real, thomas integer, twitter text, twitter_id real, youtube text, youtube_id text)
|
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
|
bird
|
CREATE TABLE legislator (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 real, icpsr_id real, last_name text, lis_id text, maplight_id real, middle_name text, nickname_name text, official_full_name text, opensecrets_id text, religion_bio text, suffix_name text, thomas_id integer, votesmart_id real, wikidata_id text, wikipedia_id text, address text, bioguide text, caucus text, chamber text, class real, contact_form text, district real, end text, fax text, last text, name text, office text, party text, party_affiliations text, phone text, relation text, rss_url text, start text, state text, state_rank text, title text, type text, url text, ballotpedia_id text, bioguide_id text, bioguide_previous_id text, birthday_bio text, cspan_id text, fec_id text, first_name text, gender_bio text, google_entity_id_id text, govtrack_id integer, house_history_alternate_id text, house_history_id real, icpsr_id real, last_name text, lis_id text, maplight_id text, middle_name text, nickname_name text, official_full_name text, opensecrets_id text, religion_bio text, suffix_name text, thomas_id text, votesmart_id text, wikidata_id text, wikipedia_id text, address text, bioguide text, chamber text, class real, contact_form text, district real, end text, fax text, last text, middle text, name text, office text, party text, party_affiliations text, phone text, relation text, rss_url text, start text, state text, state_rank text, title text, type text, url text, bioguide text, facebook text, facebook_id real, govtrack real, instagram text, instagram_id real, thomas integer, twitter text, twitter_id real, youtube text, youtube_id text)
|
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'
|
bird
|
CREATE TABLE legislator (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 real, icpsr_id real, last_name text, lis_id text, maplight_id real, middle_name text, nickname_name text, official_full_name text, opensecrets_id text, religion_bio text, suffix_name text, thomas_id integer, votesmart_id real, wikidata_id text, wikipedia_id text, address text, bioguide text, caucus text, chamber text, class real, contact_form text, district real, end text, fax text, last text, name text, office text, party text, party_affiliations text, phone text, relation text, rss_url text, start text, state text, state_rank text, title text, type text, url text, ballotpedia_id text, bioguide_id text, bioguide_previous_id text, birthday_bio text, cspan_id text, fec_id text, first_name text, gender_bio text, google_entity_id_id text, govtrack_id integer, house_history_alternate_id text, house_history_id real, icpsr_id real, last_name text, lis_id text, maplight_id text, middle_name text, nickname_name text, official_full_name text, opensecrets_id text, religion_bio text, suffix_name text, thomas_id text, votesmart_id text, wikidata_id text, wikipedia_id text, address text, bioguide text, chamber text, class real, contact_form text, district real, end text, fax text, last text, middle text, name text, office text, party text, party_affiliations text, phone text, relation text, rss_url text, start text, state text, state_rank text, title text, type text, url text, bioguide text, facebook text, facebook_id real, govtrack real, instagram text, instagram_id real, thomas integer, twitter text, twitter_id real, youtube text, youtube_id text)
|
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'
|
bird
|
CREATE TABLE legislator (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 real, icpsr_id real, last_name text, lis_id text, maplight_id real, middle_name text, nickname_name text, official_full_name text, opensecrets_id text, religion_bio text, suffix_name text, thomas_id integer, votesmart_id real, wikidata_id text, wikipedia_id text, address text, bioguide text, caucus text, chamber text, class real, contact_form text, district real, end text, fax text, last text, name text, office text, party text, party_affiliations text, phone text, relation text, rss_url text, start text, state text, state_rank text, title text, type text, url text, ballotpedia_id text, bioguide_id text, bioguide_previous_id text, birthday_bio text, cspan_id text, fec_id text, first_name text, gender_bio text, google_entity_id_id text, govtrack_id integer, house_history_alternate_id text, house_history_id real, icpsr_id real, last_name text, lis_id text, maplight_id text, middle_name text, nickname_name text, official_full_name text, opensecrets_id text, religion_bio text, suffix_name text, thomas_id text, votesmart_id text, wikidata_id text, wikipedia_id text, address text, bioguide text, chamber text, class real, contact_form text, district real, end text, fax text, last text, middle text, name text, office text, party text, party_affiliations text, phone text, relation text, rss_url text, start text, state text, state_rank text, title text, type text, url text, bioguide text, facebook text, facebook_id real, govtrack real, instagram text, instagram_id real, thomas integer, twitter text, twitter_id real, youtube text, youtube_id text)
|
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'
|
bird
|
CREATE TABLE legislator (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 real, icpsr_id real, last_name text, lis_id text, maplight_id real, middle_name text, nickname_name text, official_full_name text, opensecrets_id text, religion_bio text, suffix_name text, thomas_id integer, votesmart_id real, wikidata_id text, wikipedia_id text, address text, bioguide text, caucus text, chamber text, class real, contact_form text, district real, end text, fax text, last text, name text, office text, party text, party_affiliations text, phone text, relation text, rss_url text, start text, state text, state_rank text, title text, type text, url text, ballotpedia_id text, bioguide_id text, bioguide_previous_id text, birthday_bio text, cspan_id text, fec_id text, first_name text, gender_bio text, google_entity_id_id text, govtrack_id integer, house_history_alternate_id text, house_history_id real, icpsr_id real, last_name text, lis_id text, maplight_id text, middle_name text, nickname_name text, official_full_name text, opensecrets_id text, religion_bio text, suffix_name text, thomas_id text, votesmart_id text, wikidata_id text, wikipedia_id text, address text, bioguide text, chamber text, class real, contact_form text, district real, end text, fax text, last text, middle text, name text, office text, party text, party_affiliations text, phone text, relation text, rss_url text, start text, state text, state_rank text, title text, type text, url text, bioguide text, facebook text, facebook_id real, govtrack real, instagram text, instagram_id real, thomas integer, twitter text, twitter_id real, youtube text, youtube_id text)
|
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
|
bird
|
CREATE TABLE legislator (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 real, icpsr_id real, last_name text, lis_id text, maplight_id real, middle_name text, nickname_name text, official_full_name text, opensecrets_id text, religion_bio text, suffix_name text, thomas_id integer, votesmart_id real, wikidata_id text, wikipedia_id text, address text, bioguide text, caucus text, chamber text, class real, contact_form text, district real, end text, fax text, last text, name text, office text, party text, party_affiliations text, phone text, relation text, rss_url text, start text, state text, state_rank text, title text, type text, url text, ballotpedia_id text, bioguide_id text, bioguide_previous_id text, birthday_bio text, cspan_id text, fec_id text, first_name text, gender_bio text, google_entity_id_id text, govtrack_id integer, house_history_alternate_id text, house_history_id real, icpsr_id real, last_name text, lis_id text, maplight_id text, middle_name text, nickname_name text, official_full_name text, opensecrets_id text, religion_bio text, suffix_name text, thomas_id text, votesmart_id text, wikidata_id text, wikipedia_id text, address text, bioguide text, chamber text, class real, contact_form text, district real, end text, fax text, last text, middle text, name text, office text, party text, party_affiliations text, phone text, relation text, rss_url text, start text, state text, state_rank text, title text, type text, url text, bioguide text, facebook text, facebook_id real, govtrack real, instagram text, instagram_id real, thomas integer, twitter text, twitter_id real, youtube text, youtube_id text)
|
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.'
|
bird
|
CREATE TABLE legislator (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 real, icpsr_id real, last_name text, lis_id text, maplight_id real, middle_name text, nickname_name text, official_full_name text, opensecrets_id text, religion_bio text, suffix_name text, thomas_id integer, votesmart_id real, wikidata_id text, wikipedia_id text, address text, bioguide text, caucus text, chamber text, class real, contact_form text, district real, end text, fax text, last text, name text, office text, party text, party_affiliations text, phone text, relation text, rss_url text, start text, state text, state_rank text, title text, type text, url text, ballotpedia_id text, bioguide_id text, bioguide_previous_id text, birthday_bio text, cspan_id text, fec_id text, first_name text, gender_bio text, google_entity_id_id text, govtrack_id integer, house_history_alternate_id text, house_history_id real, icpsr_id real, last_name text, lis_id text, maplight_id text, middle_name text, nickname_name text, official_full_name text, opensecrets_id text, religion_bio text, suffix_name text, thomas_id text, votesmart_id text, wikidata_id text, wikipedia_id text, address text, bioguide text, chamber text, class real, contact_form text, district real, end text, fax text, last text, middle text, name text, office text, party text, party_affiliations text, phone text, relation text, rss_url text, start text, state text, state_rank text, title text, type text, url text, bioguide text, facebook text, facebook_id real, govtrack real, instagram text, instagram_id real, thomas integer, twitter text, twitter_id real, youtube text, youtube_id text)
|
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.'
|
bird
|
CREATE TABLE legislator (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 real, icpsr_id real, last_name text, lis_id text, maplight_id real, middle_name text, nickname_name text, official_full_name text, opensecrets_id text, religion_bio text, suffix_name text, thomas_id integer, votesmart_id real, wikidata_id text, wikipedia_id text, address text, bioguide text, caucus text, chamber text, class real, contact_form text, district real, end text, fax text, last text, name text, office text, party text, party_affiliations text, phone text, relation text, rss_url text, start text, state text, state_rank text, title text, type text, url text, ballotpedia_id text, bioguide_id text, bioguide_previous_id text, birthday_bio text, cspan_id text, fec_id text, first_name text, gender_bio text, google_entity_id_id text, govtrack_id integer, house_history_alternate_id text, house_history_id real, icpsr_id real, last_name text, lis_id text, maplight_id text, middle_name text, nickname_name text, official_full_name text, opensecrets_id text, religion_bio text, suffix_name text, thomas_id text, votesmart_id text, wikidata_id text, wikipedia_id text, address text, bioguide text, chamber text, class real, contact_form text, district real, end text, fax text, last text, middle text, name text, office text, party text, party_affiliations text, phone text, relation text, rss_url text, start text, state text, state_rank text, title text, type text, url text, bioguide text, facebook text, facebook_id real, govtrack real, instagram text, instagram_id real, thomas integer, twitter text, twitter_id real, youtube text, youtube_id text)
|
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
|
bird
|
CREATE TABLE legislator (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 real, icpsr_id real, last_name text, lis_id text, maplight_id real, middle_name text, nickname_name text, official_full_name text, opensecrets_id text, religion_bio text, suffix_name text, thomas_id integer, votesmart_id real, wikidata_id text, wikipedia_id text, address text, bioguide text, caucus text, chamber text, class real, contact_form text, district real, end text, fax text, last text, name text, office text, party text, party_affiliations text, phone text, relation text, rss_url text, start text, state text, state_rank text, title text, type text, url text, ballotpedia_id text, bioguide_id text, bioguide_previous_id text, birthday_bio text, cspan_id text, fec_id text, first_name text, gender_bio text, google_entity_id_id text, govtrack_id integer, house_history_alternate_id text, house_history_id real, icpsr_id real, last_name text, lis_id text, maplight_id text, middle_name text, nickname_name text, official_full_name text, opensecrets_id text, religion_bio text, suffix_name text, thomas_id text, votesmart_id text, wikidata_id text, wikipedia_id text, address text, bioguide text, chamber text, class real, contact_form text, district real, end text, fax text, last text, middle text, name text, office text, party text, party_affiliations text, phone text, relation text, rss_url text, start text, state text, state_rank text, title text, type text, url text, bioguide text, facebook text, facebook_id real, govtrack real, instagram text, instagram_id real, thomas integer, twitter text, twitter_id real, youtube text, youtube_id text)
|
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
|
bird
|
CREATE TABLE legislator (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 real, icpsr_id real, last_name text, lis_id text, maplight_id real, middle_name text, nickname_name text, official_full_name text, opensecrets_id text, religion_bio text, suffix_name text, thomas_id integer, votesmart_id real, wikidata_id text, wikipedia_id text, address text, bioguide text, caucus text, chamber text, class real, contact_form text, district real, end text, fax text, last text, name text, office text, party text, party_affiliations text, phone text, relation text, rss_url text, start text, state text, state_rank text, title text, type text, url text, ballotpedia_id text, bioguide_id text, bioguide_previous_id text, birthday_bio text, cspan_id text, fec_id text, first_name text, gender_bio text, google_entity_id_id text, govtrack_id integer, house_history_alternate_id text, house_history_id real, icpsr_id real, last_name text, lis_id text, maplight_id text, middle_name text, nickname_name text, official_full_name text, opensecrets_id text, religion_bio text, suffix_name text, thomas_id text, votesmart_id text, wikidata_id text, wikipedia_id text, address text, bioguide text, chamber text, class real, contact_form text, district real, end text, fax text, last text, middle text, name text, office text, party text, party_affiliations text, phone text, relation text, rss_url text, start text, state text, state_rank text, title text, type text, url text, bioguide text, facebook text, facebook_id real, govtrack real, instagram text, instagram_id real, thomas integer, twitter text, twitter_id real, youtube text, youtube_id text)
|
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'
|
bird
|
CREATE TABLE legislator (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 real, icpsr_id real, last_name text, lis_id text, maplight_id real, middle_name text, nickname_name text, official_full_name text, opensecrets_id text, religion_bio text, suffix_name text, thomas_id integer, votesmart_id real, wikidata_id text, wikipedia_id text, address text, bioguide text, caucus text, chamber text, class real, contact_form text, district real, end text, fax text, last text, name text, office text, party text, party_affiliations text, phone text, relation text, rss_url text, start text, state text, state_rank text, title text, type text, url text, ballotpedia_id text, bioguide_id text, bioguide_previous_id text, birthday_bio text, cspan_id text, fec_id text, first_name text, gender_bio text, google_entity_id_id text, govtrack_id integer, house_history_alternate_id text, house_history_id real, icpsr_id real, last_name text, lis_id text, maplight_id text, middle_name text, nickname_name text, official_full_name text, opensecrets_id text, religion_bio text, suffix_name text, thomas_id text, votesmart_id text, wikidata_id text, wikipedia_id text, address text, bioguide text, chamber text, class real, contact_form text, district real, end text, fax text, last text, middle text, name text, office text, party text, party_affiliations text, phone text, relation text, rss_url text, start text, state text, state_rank text, title text, type text, url text, bioguide text, facebook text, facebook_id real, govtrack real, instagram text, instagram_id real, thomas integer, twitter text, twitter_id real, youtube text, youtube_id text)
|
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%'
|
bird
|
CREATE TABLE legislator (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 real, icpsr_id real, last_name text, lis_id text, maplight_id real, middle_name text, nickname_name text, official_full_name text, opensecrets_id text, religion_bio text, suffix_name text, thomas_id integer, votesmart_id real, wikidata_id text, wikipedia_id text, address text, bioguide text, caucus text, chamber text, class real, contact_form text, district real, end text, fax text, last text, name text, office text, party text, party_affiliations text, phone text, relation text, rss_url text, start text, state text, state_rank text, title text, type text, url text, ballotpedia_id text, bioguide_id text, bioguide_previous_id text, birthday_bio text, cspan_id text, fec_id text, first_name text, gender_bio text, google_entity_id_id text, govtrack_id integer, house_history_alternate_id text, house_history_id real, icpsr_id real, last_name text, lis_id text, maplight_id text, middle_name text, nickname_name text, official_full_name text, opensecrets_id text, religion_bio text, suffix_name text, thomas_id text, votesmart_id text, wikidata_id text, wikipedia_id text, address text, bioguide text, chamber text, class real, contact_form text, district real, end text, fax text, last text, middle text, name text, office text, party text, party_affiliations text, phone text, relation text, rss_url text, start text, state text, state_rank text, title text, type text, url text, bioguide text, facebook text, facebook_id real, govtrack real, instagram text, instagram_id real, thomas integer, twitter text, twitter_id real, youtube text, youtube_id text)
|
List the IDs and full names of legislators from the Liberal Republican party.
|
SELECT T2.bioguide_id, 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 = 'Liberal Republican'
|
bird
|
CREATE TABLE legislator (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 real, icpsr_id real, last_name text, lis_id text, maplight_id real, middle_name text, nickname_name text, official_full_name text, opensecrets_id text, religion_bio text, suffix_name text, thomas_id integer, votesmart_id real, wikidata_id text, wikipedia_id text, address text, bioguide text, caucus text, chamber text, class real, contact_form text, district real, end text, fax text, last text, name text, office text, party text, party_affiliations text, phone text, relation text, rss_url text, start text, state text, state_rank text, title text, type text, url text, ballotpedia_id text, bioguide_id text, bioguide_previous_id text, birthday_bio text, cspan_id text, fec_id text, first_name text, gender_bio text, google_entity_id_id text, govtrack_id integer, house_history_alternate_id text, house_history_id real, icpsr_id real, last_name text, lis_id text, maplight_id text, middle_name text, nickname_name text, official_full_name text, opensecrets_id text, religion_bio text, suffix_name text, thomas_id text, votesmart_id text, wikidata_id text, wikipedia_id text, address text, bioguide text, chamber text, class real, contact_form text, district real, end text, fax text, last text, middle text, name text, office text, party text, party_affiliations text, phone text, relation text, rss_url text, start text, state text, state_rank text, title text, type text, url text, bioguide text, facebook text, facebook_id real, govtrack real, instagram text, instagram_id real, thomas integer, twitter text, twitter_id real, youtube text, youtube_id text)
|
Among the legislators who started a term on 2nd December 1793, how many of them were males?
|
SELECT COUNT(T1.bioguide_id) FROM historical AS T1 INNER JOIN `historical-terms` AS T2 ON T1.bioguide_id = T2.bioguide WHERE T1.gender_bio = 'M' AND T2.start = '1793-12-02'
|
bird
|
CREATE TABLE legislator (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 real, icpsr_id real, last_name text, lis_id text, maplight_id real, middle_name text, nickname_name text, official_full_name text, opensecrets_id text, religion_bio text, suffix_name text, thomas_id integer, votesmart_id real, wikidata_id text, wikipedia_id text, address text, bioguide text, caucus text, chamber text, class real, contact_form text, district real, end text, fax text, last text, name text, office text, party text, party_affiliations text, phone text, relation text, rss_url text, start text, state text, state_rank text, title text, type text, url text, ballotpedia_id text, bioguide_id text, bioguide_previous_id text, birthday_bio text, cspan_id text, fec_id text, first_name text, gender_bio text, google_entity_id_id text, govtrack_id integer, house_history_alternate_id text, house_history_id real, icpsr_id real, last_name text, lis_id text, maplight_id text, middle_name text, nickname_name text, official_full_name text, opensecrets_id text, religion_bio text, suffix_name text, thomas_id text, votesmart_id text, wikidata_id text, wikipedia_id text, address text, bioguide text, chamber text, class real, contact_form text, district real, end text, fax text, last text, middle text, name text, office text, party text, party_affiliations text, phone text, relation text, rss_url text, start text, state text, state_rank text, title text, type text, url text, bioguide text, facebook text, facebook_id real, govtrack real, instagram text, instagram_id real, thomas integer, twitter text, twitter_id real, youtube text, youtube_id text)
|
Compare the number of legislators who started the term in 1875 and 2005.
|
SELECT SUM(CASE WHEN `current-terms`.start LIKE '2005%' THEN 1 ELSE 0 END) - ( SELECT SUM(CASE WHEN start LIKE '1875%' THEN 1 ELSE 0 END) FROM `historical-terms` ) FROM `current-terms`
|
bird
|
CREATE TABLE legislator (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 real, icpsr_id real, last_name text, lis_id text, maplight_id real, middle_name text, nickname_name text, official_full_name text, opensecrets_id text, religion_bio text, suffix_name text, thomas_id integer, votesmart_id real, wikidata_id text, wikipedia_id text, address text, bioguide text, caucus text, chamber text, class real, contact_form text, district real, end text, fax text, last text, name text, office text, party text, party_affiliations text, phone text, relation text, rss_url text, start text, state text, state_rank text, title text, type text, url text, ballotpedia_id text, bioguide_id text, bioguide_previous_id text, birthday_bio text, cspan_id text, fec_id text, first_name text, gender_bio text, google_entity_id_id text, govtrack_id integer, house_history_alternate_id text, house_history_id real, icpsr_id real, last_name text, lis_id text, maplight_id text, middle_name text, nickname_name text, official_full_name text, opensecrets_id text, religion_bio text, suffix_name text, thomas_id text, votesmart_id text, wikidata_id text, wikipedia_id text, address text, bioguide text, chamber text, class real, contact_form text, district real, end text, fax text, last text, middle text, name text, office text, party text, party_affiliations text, phone text, relation text, rss_url text, start text, state text, state_rank text, title text, type text, url text, bioguide text, facebook text, facebook_id real, govtrack real, instagram text, instagram_id real, thomas integer, twitter text, twitter_id real, youtube text, youtube_id text)
|
List the full names, Twitter IDs, and YouTube IDs of legislators who have Richard as their first name.
|
SELECT T2.official_full_name, T1.twitter_id, T1.youtube_id FROM `social-media` AS T1 INNER JOIN current AS T2 ON T1.bioguide = T2.bioguide_id WHERE T2.first_name = 'Richard'
|
bird
|
CREATE TABLE legislator (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 real, icpsr_id real, last_name text, lis_id text, maplight_id real, middle_name text, nickname_name text, official_full_name text, opensecrets_id text, religion_bio text, suffix_name text, thomas_id integer, votesmart_id real, wikidata_id text, wikipedia_id text, address text, bioguide text, caucus text, chamber text, class real, contact_form text, district real, end text, fax text, last text, name text, office text, party text, party_affiliations text, phone text, relation text, rss_url text, start text, state text, state_rank text, title text, type text, url text, ballotpedia_id text, bioguide_id text, bioguide_previous_id text, birthday_bio text, cspan_id text, fec_id text, first_name text, gender_bio text, google_entity_id_id text, govtrack_id integer, house_history_alternate_id text, house_history_id real, icpsr_id real, last_name text, lis_id text, maplight_id text, middle_name text, nickname_name text, official_full_name text, opensecrets_id text, religion_bio text, suffix_name text, thomas_id text, votesmart_id text, wikidata_id text, wikipedia_id text, address text, bioguide text, chamber text, class real, contact_form text, district real, end text, fax text, last text, middle text, name text, office text, party text, party_affiliations text, phone text, relation text, rss_url text, start text, state text, state_rank text, title text, type text, url text, bioguide text, facebook text, facebook_id real, govtrack real, instagram text, instagram_id real, thomas integer, twitter text, twitter_id real, youtube text, youtube_id text)
|
Provide the start date, end date, and party of Pearl Peden Oldfield.
|
SELECT T2.start, T2.`end`, T2.party FROM historical AS T1 INNER JOIN `historical-terms` AS T2 ON T1.bioguide_id = T2.bioguide WHERE T1.first_name = 'Pearl' AND T1.middle_name = 'Peden' AND T1.last_name = 'Oldfield'
|
bird
|
CREATE TABLE legislator (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 real, icpsr_id real, last_name text, lis_id text, maplight_id real, middle_name text, nickname_name text, official_full_name text, opensecrets_id text, religion_bio text, suffix_name text, thomas_id integer, votesmart_id real, wikidata_id text, wikipedia_id text, address text, bioguide text, caucus text, chamber text, class real, contact_form text, district real, end text, fax text, last text, name text, office text, party text, party_affiliations text, phone text, relation text, rss_url text, start text, state text, state_rank text, title text, type text, url text, ballotpedia_id text, bioguide_id text, bioguide_previous_id text, birthday_bio text, cspan_id text, fec_id text, first_name text, gender_bio text, google_entity_id_id text, govtrack_id integer, house_history_alternate_id text, house_history_id real, icpsr_id real, last_name text, lis_id text, maplight_id text, middle_name text, nickname_name text, official_full_name text, opensecrets_id text, religion_bio text, suffix_name text, thomas_id text, votesmart_id text, wikidata_id text, wikipedia_id text, address text, bioguide text, chamber text, class real, contact_form text, district real, end text, fax text, last text, middle text, name text, office text, party text, party_affiliations text, phone text, relation text, rss_url text, start text, state text, state_rank text, title text, type text, url text, bioguide text, facebook text, facebook_id real, govtrack real, instagram text, instagram_id real, thomas integer, twitter text, twitter_id real, youtube text, youtube_id text)
|
What is the birthday of Amy Klobuchar?
|
SELECT birthday_bio FROM current WHERE first_name = 'Amy' AND last_name = 'Klobuchar'
|
bird
|
CREATE TABLE legislator (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 real, icpsr_id real, last_name text, lis_id text, maplight_id real, middle_name text, nickname_name text, official_full_name text, opensecrets_id text, religion_bio text, suffix_name text, thomas_id integer, votesmart_id real, wikidata_id text, wikipedia_id text, address text, bioguide text, caucus text, chamber text, class real, contact_form text, district real, end text, fax text, last text, name text, office text, party text, party_affiliations text, phone text, relation text, rss_url text, start text, state text, state_rank text, title text, type text, url text, ballotpedia_id text, bioguide_id text, bioguide_previous_id text, birthday_bio text, cspan_id text, fec_id text, first_name text, gender_bio text, google_entity_id_id text, govtrack_id integer, house_history_alternate_id text, house_history_id real, icpsr_id real, last_name text, lis_id text, maplight_id text, middle_name text, nickname_name text, official_full_name text, opensecrets_id text, religion_bio text, suffix_name text, thomas_id text, votesmart_id text, wikidata_id text, wikipedia_id text, address text, bioguide text, chamber text, class real, contact_form text, district real, end text, fax text, last text, middle text, name text, office text, party text, party_affiliations text, phone text, relation text, rss_url text, start text, state text, state_rank text, title text, type text, url text, bioguide text, facebook text, facebook_id real, govtrack real, instagram text, instagram_id real, thomas integer, twitter text, twitter_id real, youtube text, youtube_id text)
|
How many legislators have not been registered in Federal Election Commission data?
|
SELECT COUNT(*) FROM current WHERE fec_id IS NULL OR fec_id = ''
|
bird
|
CREATE TABLE legislator (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 real, icpsr_id real, last_name text, lis_id text, maplight_id real, middle_name text, nickname_name text, official_full_name text, opensecrets_id text, religion_bio text, suffix_name text, thomas_id integer, votesmart_id real, wikidata_id text, wikipedia_id text, address text, bioguide text, caucus text, chamber text, class real, contact_form text, district real, end text, fax text, last text, name text, office text, party text, party_affiliations text, phone text, relation text, rss_url text, start text, state text, state_rank text, title text, type text, url text, ballotpedia_id text, bioguide_id text, bioguide_previous_id text, birthday_bio text, cspan_id text, fec_id text, first_name text, gender_bio text, google_entity_id_id text, govtrack_id integer, house_history_alternate_id text, house_history_id real, icpsr_id real, last_name text, lis_id text, maplight_id text, middle_name text, nickname_name text, official_full_name text, opensecrets_id text, religion_bio text, suffix_name text, thomas_id text, votesmart_id text, wikidata_id text, wikipedia_id text, address text, bioguide text, chamber text, class real, contact_form text, district real, end text, fax text, last text, middle text, name text, office text, party text, party_affiliations text, phone text, relation text, rss_url text, start text, state text, state_rank text, title text, type text, url text, bioguide text, facebook text, facebook_id real, govtrack real, instagram text, instagram_id real, thomas integer, twitter text, twitter_id real, youtube text, youtube_id text)
|
State the number of female legislators in the list.
|
SELECT COUNT(*) FROM current WHERE gender_bio = 'F'
|
bird
|
CREATE TABLE legislator (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 real, icpsr_id real, last_name text, lis_id text, maplight_id real, middle_name text, nickname_name text, official_full_name text, opensecrets_id text, religion_bio text, suffix_name text, thomas_id integer, votesmart_id real, wikidata_id text, wikipedia_id text, address text, bioguide text, caucus text, chamber text, class real, contact_form text, district real, end text, fax text, last text, name text, office text, party text, party_affiliations text, phone text, relation text, rss_url text, start text, state text, state_rank text, title text, type text, url text, ballotpedia_id text, bioguide_id text, bioguide_previous_id text, birthday_bio text, cspan_id text, fec_id text, first_name text, gender_bio text, google_entity_id_id text, govtrack_id integer, house_history_alternate_id text, house_history_id real, icpsr_id real, last_name text, lis_id text, maplight_id text, middle_name text, nickname_name text, official_full_name text, opensecrets_id text, religion_bio text, suffix_name text, thomas_id text, votesmart_id text, wikidata_id text, wikipedia_id text, address text, bioguide text, chamber text, class real, contact_form text, district real, end text, fax text, last text, middle text, name text, office text, party text, party_affiliations text, phone text, relation text, rss_url text, start text, state text, state_rank text, title text, type text, url text, bioguide text, facebook text, facebook_id real, govtrack real, instagram text, instagram_id real, thomas integer, twitter text, twitter_id real, youtube text, youtube_id text)
|
Give the full name of legislators who have accounts on OpenSecrets.org.
|
SELECT COUNT(*) FROM current WHERE opensecrets_id IS NOT NULL AND opensecrets_id <> ''
|
bird
|
CREATE TABLE legislator (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 real, icpsr_id real, last_name text, lis_id text, maplight_id real, middle_name text, nickname_name text, official_full_name text, opensecrets_id text, religion_bio text, suffix_name text, thomas_id integer, votesmart_id real, wikidata_id text, wikipedia_id text, address text, bioguide text, caucus text, chamber text, class real, contact_form text, district real, end text, fax text, last text, name text, office text, party text, party_affiliations text, phone text, relation text, rss_url text, start text, state text, state_rank text, title text, type text, url text, ballotpedia_id text, bioguide_id text, bioguide_previous_id text, birthday_bio text, cspan_id text, fec_id text, first_name text, gender_bio text, google_entity_id_id text, govtrack_id integer, house_history_alternate_id text, house_history_id real, icpsr_id real, last_name text, lis_id text, maplight_id text, middle_name text, nickname_name text, official_full_name text, opensecrets_id text, religion_bio text, suffix_name text, thomas_id text, votesmart_id text, wikidata_id text, wikipedia_id text, address text, bioguide text, chamber text, class real, contact_form text, district real, end text, fax text, last text, middle text, name text, office text, party text, party_affiliations text, phone text, relation text, rss_url text, start text, state text, state_rank text, title text, type text, url text, bioguide text, facebook text, facebook_id real, govtrack real, instagram text, instagram_id real, thomas integer, twitter text, twitter_id real, youtube text, youtube_id text)
|
What is the middle name of the legislator whose birthday was on 8/24/1956?
|
SELECT middle_name FROM current WHERE birthday_bio = '1956-08-24'
|
bird
|
CREATE TABLE legislator (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 real, icpsr_id real, last_name text, lis_id text, maplight_id real, middle_name text, nickname_name text, official_full_name text, opensecrets_id text, religion_bio text, suffix_name text, thomas_id integer, votesmart_id real, wikidata_id text, wikipedia_id text, address text, bioguide text, caucus text, chamber text, class real, contact_form text, district real, end text, fax text, last text, name text, office text, party text, party_affiliations text, phone text, relation text, rss_url text, start text, state text, state_rank text, title text, type text, url text, ballotpedia_id text, bioguide_id text, bioguide_previous_id text, birthday_bio text, cspan_id text, fec_id text, first_name text, gender_bio text, google_entity_id_id text, govtrack_id integer, house_history_alternate_id text, house_history_id real, icpsr_id real, last_name text, lis_id text, maplight_id text, middle_name text, nickname_name text, official_full_name text, opensecrets_id text, religion_bio text, suffix_name text, thomas_id text, votesmart_id text, wikidata_id text, wikipedia_id text, address text, bioguide text, chamber text, class real, contact_form text, district real, end text, fax text, last text, middle text, name text, office text, party text, party_affiliations text, phone text, relation text, rss_url text, start text, state text, state_rank text, title text, type text, url text, bioguide text, facebook text, facebook_id real, govtrack real, instagram text, instagram_id real, thomas integer, twitter text, twitter_id real, youtube text, youtube_id text)
|
How many legislators hold the title "Majority Leader"?
|
SELECT COUNT(bioguide) FROM `current-terms` WHERE title = 'Majority Leader'
|
bird
|
CREATE TABLE legislator (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 real, icpsr_id real, last_name text, lis_id text, maplight_id real, middle_name text, nickname_name text, official_full_name text, opensecrets_id text, religion_bio text, suffix_name text, thomas_id integer, votesmart_id real, wikidata_id text, wikipedia_id text, address text, bioguide text, caucus text, chamber text, class real, contact_form text, district real, end text, fax text, last text, name text, office text, party text, party_affiliations text, phone text, relation text, rss_url text, start text, state text, state_rank text, title text, type text, url text, ballotpedia_id text, bioguide_id text, bioguide_previous_id text, birthday_bio text, cspan_id text, fec_id text, first_name text, gender_bio text, google_entity_id_id text, govtrack_id integer, house_history_alternate_id text, house_history_id real, icpsr_id real, last_name text, lis_id text, maplight_id text, middle_name text, nickname_name text, official_full_name text, opensecrets_id text, religion_bio text, suffix_name text, thomas_id text, votesmart_id text, wikidata_id text, wikipedia_id text, address text, bioguide text, chamber text, class real, contact_form text, district real, end text, fax text, last text, middle text, name text, office text, party text, party_affiliations text, phone text, relation text, rss_url text, start text, state text, state_rank text, title text, type text, url text, bioguide text, facebook text, facebook_id real, govtrack real, instagram text, instagram_id real, thomas integer, twitter text, twitter_id real, youtube text, youtube_id text)
|
What is the title of legislator whose birthday on 2/20/1942?
|
SELECT T2.title FROM current AS T1 INNER JOIN `current-terms` AS T2 ON T1.bioguide_id = T2.bioguide WHERE T1.birthday_bio = '1942-02-20' GROUP BY T2.title
|
bird
|
CREATE TABLE legislator (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 real, icpsr_id real, last_name text, lis_id text, maplight_id real, middle_name text, nickname_name text, official_full_name text, opensecrets_id text, religion_bio text, suffix_name text, thomas_id integer, votesmart_id real, wikidata_id text, wikipedia_id text, address text, bioguide text, caucus text, chamber text, class real, contact_form text, district real, end text, fax text, last text, name text, office text, party text, party_affiliations text, phone text, relation text, rss_url text, start text, state text, state_rank text, title text, type text, url text, ballotpedia_id text, bioguide_id text, bioguide_previous_id text, birthday_bio text, cspan_id text, fec_id text, first_name text, gender_bio text, google_entity_id_id text, govtrack_id integer, house_history_alternate_id text, house_history_id real, icpsr_id real, last_name text, lis_id text, maplight_id text, middle_name text, nickname_name text, official_full_name text, opensecrets_id text, religion_bio text, suffix_name text, thomas_id text, votesmart_id text, wikidata_id text, wikipedia_id text, address text, bioguide text, chamber text, class real, contact_form text, district real, end text, fax text, last text, middle text, name text, office text, party text, party_affiliations text, phone text, relation text, rss_url text, start text, state text, state_rank text, title text, type text, url text, bioguide text, facebook text, facebook_id real, govtrack real, instagram text, instagram_id real, thomas integer, twitter text, twitter_id real, youtube text, youtube_id text)
|
What is the gender of the legislator whose address at 317 Russell Senate Office Building Washington DC 20510?
|
SELECT T1.gender_bio FROM current AS T1 INNER JOIN `current-terms` AS T2 ON T1.bioguide_id = T2.bioguide WHERE T2.address = '317 Russell Senate Office Building Washington DC 20510'
|
bird
|
CREATE TABLE legislator (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 real, icpsr_id real, last_name text, lis_id text, maplight_id real, middle_name text, nickname_name text, official_full_name text, opensecrets_id text, religion_bio text, suffix_name text, thomas_id integer, votesmart_id real, wikidata_id text, wikipedia_id text, address text, bioguide text, caucus text, chamber text, class real, contact_form text, district real, end text, fax text, last text, name text, office text, party text, party_affiliations text, phone text, relation text, rss_url text, start text, state text, state_rank text, title text, type text, url text, ballotpedia_id text, bioguide_id text, bioguide_previous_id text, birthday_bio text, cspan_id text, fec_id text, first_name text, gender_bio text, google_entity_id_id text, govtrack_id integer, house_history_alternate_id text, house_history_id real, icpsr_id real, last_name text, lis_id text, maplight_id text, middle_name text, nickname_name text, official_full_name text, opensecrets_id text, religion_bio text, suffix_name text, thomas_id text, votesmart_id text, wikidata_id text, wikipedia_id text, address text, bioguide text, chamber text, class real, contact_form text, district real, end text, fax text, last text, middle text, name text, office text, party text, party_affiliations text, phone text, relation text, rss_url text, start text, state text, state_rank text, title text, type text, url text, bioguide text, facebook text, facebook_id real, govtrack real, instagram text, instagram_id real, thomas integer, twitter text, twitter_id real, youtube text, youtube_id text)
|
List out the first name of legislators who are senior Senator.
|
SELECT T1.first_name FROM current AS T1 INNER JOIN `current-terms` AS T2 ON T1.bioguide_id = T2.bioguide WHERE T2.state_rank = 'senior' GROUP BY T1.first_name
|
bird
|
CREATE TABLE legislator (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 real, icpsr_id real, last_name text, lis_id text, maplight_id real, middle_name text, nickname_name text, official_full_name text, opensecrets_id text, religion_bio text, suffix_name text, thomas_id integer, votesmart_id real, wikidata_id text, wikipedia_id text, address text, bioguide text, caucus text, chamber text, class real, contact_form text, district real, end text, fax text, last text, name text, office text, party text, party_affiliations text, phone text, relation text, rss_url text, start text, state text, state_rank text, title text, type text, url text, ballotpedia_id text, bioguide_id text, bioguide_previous_id text, birthday_bio text, cspan_id text, fec_id text, first_name text, gender_bio text, google_entity_id_id text, govtrack_id integer, house_history_alternate_id text, house_history_id real, icpsr_id real, last_name text, lis_id text, maplight_id text, middle_name text, nickname_name text, official_full_name text, opensecrets_id text, religion_bio text, suffix_name text, thomas_id text, votesmart_id text, wikidata_id text, wikipedia_id text, address text, bioguide text, chamber text, class real, contact_form text, district real, end text, fax text, last text, middle text, name text, office text, party text, party_affiliations text, phone text, relation text, rss_url text, start text, state text, state_rank text, title text, type text, url text, bioguide text, facebook text, facebook_id real, govtrack real, instagram text, instagram_id real, thomas integer, twitter text, twitter_id real, youtube text, youtube_id text)
|
Among male legislators, state number of the legislators who are not the senator.
|
SELECT COUNT(T3.state) FROM ( SELECT T2.state FROM current AS T1 INNER JOIN `current-terms` AS T2 ON T1.bioguide_id = T2.bioguide WHERE T1.gender_bio = 'M' AND (T2.class IS NULL OR T2.class = '') GROUP BY T2.state ) T3
|
bird
|
CREATE TABLE legislator (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 real, icpsr_id real, last_name text, lis_id text, maplight_id real, middle_name text, nickname_name text, official_full_name text, opensecrets_id text, religion_bio text, suffix_name text, thomas_id integer, votesmart_id real, wikidata_id text, wikipedia_id text, address text, bioguide text, caucus text, chamber text, class real, contact_form text, district real, end text, fax text, last text, name text, office text, party text, party_affiliations text, phone text, relation text, rss_url text, start text, state text, state_rank text, title text, type text, url text, ballotpedia_id text, bioguide_id text, bioguide_previous_id text, birthday_bio text, cspan_id text, fec_id text, first_name text, gender_bio text, google_entity_id_id text, govtrack_id integer, house_history_alternate_id text, house_history_id real, icpsr_id real, last_name text, lis_id text, maplight_id text, middle_name text, nickname_name text, official_full_name text, opensecrets_id text, religion_bio text, suffix_name text, thomas_id text, votesmart_id text, wikidata_id text, wikipedia_id text, address text, bioguide text, chamber text, class real, contact_form text, district real, end text, fax text, last text, middle text, name text, office text, party text, party_affiliations text, phone text, relation text, rss_url text, start text, state text, state_rank text, title text, type text, url text, bioguide text, facebook text, facebook_id real, govtrack real, instagram text, instagram_id real, thomas integer, twitter text, twitter_id real, youtube text, youtube_id text)
|
Calculate the percentage of legislators who are Senator and were born in 1964.
|
SELECT CAST(SUM(CASE WHEN T2.class IS NOT NULL THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(*) FROM current AS T1 INNER JOIN `current-terms` AS T2 ON T1.bioguide_id = T2.bioguide WHERE T1.birthday_bio LIKE '%1964%'
|
bird
|
CREATE TABLE legislator (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 real, icpsr_id real, last_name text, lis_id text, maplight_id real, middle_name text, nickname_name text, official_full_name text, opensecrets_id text, religion_bio text, suffix_name text, thomas_id integer, votesmart_id real, wikidata_id text, wikipedia_id text, address text, bioguide text, caucus text, chamber text, class real, contact_form text, district real, end text, fax text, last text, name text, office text, party text, party_affiliations text, phone text, relation text, rss_url text, start text, state text, state_rank text, title text, type text, url text, ballotpedia_id text, bioguide_id text, bioguide_previous_id text, birthday_bio text, cspan_id text, fec_id text, first_name text, gender_bio text, google_entity_id_id text, govtrack_id integer, house_history_alternate_id text, house_history_id real, icpsr_id real, last_name text, lis_id text, maplight_id text, middle_name text, nickname_name text, official_full_name text, opensecrets_id text, religion_bio text, suffix_name text, thomas_id text, votesmart_id text, wikidata_id text, wikipedia_id text, address text, bioguide text, chamber text, class real, contact_form text, district real, end text, fax text, last text, middle text, name text, office text, party text, party_affiliations text, phone text, relation text, rss_url text, start text, state text, state_rank text, title text, type text, url text, bioguide text, facebook text, facebook_id real, govtrack real, instagram text, instagram_id real, thomas integer, twitter text, twitter_id real, youtube text, youtube_id text)
|
Calculate the percentage of legislators who are not Senator and were born before 1975.
|
SELECT CAST(COUNT(CASE WHEN T2.class IS NULL THEN T1.bioguide_id ELSE NULL END) AS REAL) * 100 / COUNT(T1.bioguide_id) FROM current AS T1 INNER JOIN `current-terms` AS T2 ON T1.bioguide_id = T2.bioguide WHERE CAST(T1.birthday_bio AS DATE) <= 1975
|
bird
|
CREATE TABLE legislator (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 real, icpsr_id real, last_name text, lis_id text, maplight_id real, middle_name text, nickname_name text, official_full_name text, opensecrets_id text, religion_bio text, suffix_name text, thomas_id integer, votesmart_id real, wikidata_id text, wikipedia_id text, address text, bioguide text, caucus text, chamber text, class real, contact_form text, district real, end text, fax text, last text, name text, office text, party text, party_affiliations text, phone text, relation text, rss_url text, start text, state text, state_rank text, title text, type text, url text, ballotpedia_id text, bioguide_id text, bioguide_previous_id text, birthday_bio text, cspan_id text, fec_id text, first_name text, gender_bio text, google_entity_id_id text, govtrack_id integer, house_history_alternate_id text, house_history_id real, icpsr_id real, last_name text, lis_id text, maplight_id text, middle_name text, nickname_name text, official_full_name text, opensecrets_id text, religion_bio text, suffix_name text, thomas_id text, votesmart_id text, wikidata_id text, wikipedia_id text, address text, bioguide text, chamber text, class real, contact_form text, district real, end text, fax text, last text, middle text, name text, office text, party text, party_affiliations text, phone text, relation text, rss_url text, start text, state text, state_rank text, title text, type text, url text, bioguide text, facebook text, facebook_id real, govtrack real, instagram text, instagram_id real, thomas integer, twitter text, twitter_id real, youtube text, youtube_id text)
|
What is the twitter name of the legislator whose birthday was on 5/27/1946?
|
SELECT T2.twitter FROM current AS T1 INNER JOIN `social-media` AS T2 ON T2.bioguide = T1.bioguide_id WHERE T1.birthday_bio = '1946-05-27'
|
bird
|
CREATE TABLE legislator (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 real, icpsr_id real, last_name text, lis_id text, maplight_id real, middle_name text, nickname_name text, official_full_name text, opensecrets_id text, religion_bio text, suffix_name text, thomas_id integer, votesmart_id real, wikidata_id text, wikipedia_id text, address text, bioguide text, caucus text, chamber text, class real, contact_form text, district real, end text, fax text, last text, name text, office text, party text, party_affiliations text, phone text, relation text, rss_url text, start text, state text, state_rank text, title text, type text, url text, ballotpedia_id text, bioguide_id text, bioguide_previous_id text, birthday_bio text, cspan_id text, fec_id text, first_name text, gender_bio text, google_entity_id_id text, govtrack_id integer, house_history_alternate_id text, house_history_id real, icpsr_id real, last_name text, lis_id text, maplight_id text, middle_name text, nickname_name text, official_full_name text, opensecrets_id text, religion_bio text, suffix_name text, thomas_id text, votesmart_id text, wikidata_id text, wikipedia_id text, address text, bioguide text, chamber text, class real, contact_form text, district real, end text, fax text, last text, middle text, name text, office text, party text, party_affiliations text, phone text, relation text, rss_url text, start text, state text, state_rank text, title text, type text, url text, bioguide text, facebook text, facebook_id real, govtrack real, instagram text, instagram_id real, thomas integer, twitter text, twitter_id real, youtube text, youtube_id text)
|
State the opensecrets_id of the legislator whose YouTube name is Bluetkemeyer.
|
SELECT T1.opensecrets_id FROM current AS T1 INNER JOIN `social-media` AS T2 ON T2.bioguide = T1.bioguide_id WHERE T2.youtube = 'BLuetkemeyer'
|
bird
|
CREATE TABLE legislator (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 real, icpsr_id real, last_name text, lis_id text, maplight_id real, middle_name text, nickname_name text, official_full_name text, opensecrets_id text, religion_bio text, suffix_name text, thomas_id integer, votesmart_id real, wikidata_id text, wikipedia_id text, address text, bioguide text, caucus text, chamber text, class real, contact_form text, district real, end text, fax text, last text, name text, office text, party text, party_affiliations text, phone text, relation text, rss_url text, start text, state text, state_rank text, title text, type text, url text, ballotpedia_id text, bioguide_id text, bioguide_previous_id text, birthday_bio text, cspan_id text, fec_id text, first_name text, gender_bio text, google_entity_id_id text, govtrack_id integer, house_history_alternate_id text, house_history_id real, icpsr_id real, last_name text, lis_id text, maplight_id text, middle_name text, nickname_name text, official_full_name text, opensecrets_id text, religion_bio text, suffix_name text, thomas_id text, votesmart_id text, wikidata_id text, wikipedia_id text, address text, bioguide text, chamber text, class real, contact_form text, district real, end text, fax text, last text, middle text, name text, office text, party text, party_affiliations text, phone text, relation text, rss_url text, start text, state text, state_rank text, title text, type text, url text, bioguide text, facebook text, facebook_id real, govtrack real, instagram text, instagram_id real, thomas integer, twitter text, twitter_id real, youtube text, youtube_id text)
|
Mention the username of Facebook of Ralph Abraham.
|
SELECT T2.facebook FROM current AS T1 INNER JOIN `social-media` AS T2 ON T2.bioguide = T1.bioguide_id WHERE T1.first_name = 'Ralph' AND T1.last_name = 'Abraham'
|
bird
|
CREATE TABLE legislator (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 real, icpsr_id real, last_name text, lis_id text, maplight_id real, middle_name text, nickname_name text, official_full_name text, opensecrets_id text, religion_bio text, suffix_name text, thomas_id integer, votesmart_id real, wikidata_id text, wikipedia_id text, address text, bioguide text, caucus text, chamber text, class real, contact_form text, district real, end text, fax text, last text, name text, office text, party text, party_affiliations text, phone text, relation text, rss_url text, start text, state text, state_rank text, title text, type text, url text, ballotpedia_id text, bioguide_id text, bioguide_previous_id text, birthday_bio text, cspan_id text, fec_id text, first_name text, gender_bio text, google_entity_id_id text, govtrack_id integer, house_history_alternate_id text, house_history_id real, icpsr_id real, last_name text, lis_id text, maplight_id text, middle_name text, nickname_name text, official_full_name text, opensecrets_id text, religion_bio text, suffix_name text, thomas_id text, votesmart_id text, wikidata_id text, wikipedia_id text, address text, bioguide text, chamber text, class real, contact_form text, district real, end text, fax text, last text, middle text, name text, office text, party text, party_affiliations text, phone text, relation text, rss_url text, start text, state text, state_rank text, title text, type text, url text, bioguide text, facebook text, facebook_id real, govtrack real, instagram text, instagram_id real, thomas integer, twitter text, twitter_id real, youtube text, youtube_id text)
|
What is the first name of the legislator whose address at 1005 Longworth HOB; Washington DC 20515-1408?
|
SELECT T1.first_name FROM current AS T1 INNER JOIN `current-terms` AS T2 ON T1.bioguide_id = T2.bioguide WHERE T2.address = '1005 Longworth HOB Washington DC 20515-1408' GROUP BY T1.first_name
|
bird
|
CREATE TABLE legislator (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 real, icpsr_id real, last_name text, lis_id text, maplight_id real, middle_name text, nickname_name text, official_full_name text, opensecrets_id text, religion_bio text, suffix_name text, thomas_id integer, votesmart_id real, wikidata_id text, wikipedia_id text, address text, bioguide text, caucus text, chamber text, class real, contact_form text, district real, end text, fax text, last text, name text, office text, party text, party_affiliations text, phone text, relation text, rss_url text, start text, state text, state_rank text, title text, type text, url text, ballotpedia_id text, bioguide_id text, bioguide_previous_id text, birthday_bio text, cspan_id text, fec_id text, first_name text, gender_bio text, google_entity_id_id text, govtrack_id integer, house_history_alternate_id text, house_history_id real, icpsr_id real, last_name text, lis_id text, maplight_id text, middle_name text, nickname_name text, official_full_name text, opensecrets_id text, religion_bio text, suffix_name text, thomas_id text, votesmart_id text, wikidata_id text, wikipedia_id text, address text, bioguide text, chamber text, class real, contact_form text, district real, end text, fax text, last text, middle text, name text, office text, party text, party_affiliations text, phone text, relation text, rss_url text, start text, state text, state_rank text, title text, type text, url text, bioguide text, facebook text, facebook_id real, govtrack real, instagram text, instagram_id real, thomas integer, twitter text, twitter_id real, youtube text, youtube_id text)
|
What is the Instagram name of the legislator whose birthday was on 8/24/1952?
|
SELECT T1.instagram FROM `social-media` AS T1 INNER JOIN current AS T2 ON T1.bioguide = T2.bioguide_id WHERE T2.birthday_bio = '1952-08-24'
|
bird
|
CREATE TABLE legislator (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 real, icpsr_id real, last_name text, lis_id text, maplight_id real, middle_name text, nickname_name text, official_full_name text, opensecrets_id text, religion_bio text, suffix_name text, thomas_id integer, votesmart_id real, wikidata_id text, wikipedia_id text, address text, bioguide text, caucus text, chamber text, class real, contact_form text, district real, end text, fax text, last text, name text, office text, party text, party_affiliations text, phone text, relation text, rss_url text, start text, state text, state_rank text, title text, type text, url text, ballotpedia_id text, bioguide_id text, bioguide_previous_id text, birthday_bio text, cspan_id text, fec_id text, first_name text, gender_bio text, google_entity_id_id text, govtrack_id integer, house_history_alternate_id text, house_history_id real, icpsr_id real, last_name text, lis_id text, maplight_id text, middle_name text, nickname_name text, official_full_name text, opensecrets_id text, religion_bio text, suffix_name text, thomas_id text, votesmart_id text, wikidata_id text, wikipedia_id text, address text, bioguide text, chamber text, class real, contact_form text, district real, end text, fax text, last text, middle text, name text, office text, party text, party_affiliations text, phone text, relation text, rss_url text, start text, state text, state_rank text, title text, type text, url text, bioguide text, facebook text, facebook_id real, govtrack real, instagram text, instagram_id real, thomas integer, twitter text, twitter_id real, youtube text, youtube_id text)
|
State number of legislators who are not the senator among female legislators.
|
SELECT COUNT(*) FROM current AS T1 INNER JOIN `current-terms` AS T2 ON T1.bioguide_id = T2.bioguide WHERE T1.gender_bio = 'F' AND (T2.class IS NULL OR T2.class = '')
|
bird
|
CREATE TABLE legislator (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 real, icpsr_id real, last_name text, lis_id text, maplight_id real, middle_name text, nickname_name text, official_full_name text, opensecrets_id text, religion_bio text, suffix_name text, thomas_id integer, votesmart_id real, wikidata_id text, wikipedia_id text, address text, bioguide text, caucus text, chamber text, class real, contact_form text, district real, end text, fax text, last text, name text, office text, party text, party_affiliations text, phone text, relation text, rss_url text, start text, state text, state_rank text, title text, type text, url text, ballotpedia_id text, bioguide_id text, bioguide_previous_id text, birthday_bio text, cspan_id text, fec_id text, first_name text, gender_bio text, google_entity_id_id text, govtrack_id integer, house_history_alternate_id text, house_history_id real, icpsr_id real, last_name text, lis_id text, maplight_id text, middle_name text, nickname_name text, official_full_name text, opensecrets_id text, religion_bio text, suffix_name text, thomas_id text, votesmart_id text, wikidata_id text, wikipedia_id text, address text, bioguide text, chamber text, class real, contact_form text, district real, end text, fax text, last text, middle text, name text, office text, party text, party_affiliations text, phone text, relation text, rss_url text, start text, state text, state_rank text, title text, type text, url text, bioguide text, facebook text, facebook_id real, govtrack real, instagram text, instagram_id real, thomas integer, twitter text, twitter_id real, youtube text, youtube_id text)
|
Give the religion of the legislator whose YouTube name is MaxineWaters.
|
SELECT T2.religion_bio FROM `social-media` AS T1 INNER JOIN current AS T2 ON T1.bioguide = T2.bioguide_id WHERE T1.youtube = 'MaxineWaters'
|
bird
|
CREATE TABLE legislator (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 real, icpsr_id real, last_name text, lis_id text, maplight_id real, middle_name text, nickname_name text, official_full_name text, opensecrets_id text, religion_bio text, suffix_name text, thomas_id integer, votesmart_id real, wikidata_id text, wikipedia_id text, address text, bioguide text, caucus text, chamber text, class real, contact_form text, district real, end text, fax text, last text, name text, office text, party text, party_affiliations text, phone text, relation text, rss_url text, start text, state text, state_rank text, title text, type text, url text, ballotpedia_id text, bioguide_id text, bioguide_previous_id text, birthday_bio text, cspan_id text, fec_id text, first_name text, gender_bio text, google_entity_id_id text, govtrack_id integer, house_history_alternate_id text, house_history_id real, icpsr_id real, last_name text, lis_id text, maplight_id text, middle_name text, nickname_name text, official_full_name text, opensecrets_id text, religion_bio text, suffix_name text, thomas_id text, votesmart_id text, wikidata_id text, wikipedia_id text, address text, bioguide text, chamber text, class real, contact_form text, district real, end text, fax text, last text, middle text, name text, office text, party text, party_affiliations text, phone text, relation text, rss_url text, start text, state text, state_rank text, title text, type text, url text, bioguide text, facebook text, facebook_id real, govtrack real, instagram text, instagram_id real, thomas integer, twitter text, twitter_id real, youtube text, youtube_id text)
|
How many minority leaders have not been registered in Federal Election Commission data?
|
SELECT COUNT(*) FROM current AS T1 INNER JOIN `current-terms` AS T2 ON T1.bioguide_id = T2.bioguide WHERE T2.title = 'Minority Leader' AND (T1.fec_id IS NULL OR T1.fec_id = '')
|
bird
|
CREATE TABLE legislator (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 real, icpsr_id real, last_name text, lis_id text, maplight_id real, middle_name text, nickname_name text, official_full_name text, opensecrets_id text, religion_bio text, suffix_name text, thomas_id integer, votesmart_id real, wikidata_id text, wikipedia_id text, address text, bioguide text, caucus text, chamber text, class real, contact_form text, district real, end text, fax text, last text, name text, office text, party text, party_affiliations text, phone text, relation text, rss_url text, start text, state text, state_rank text, title text, type text, url text, ballotpedia_id text, bioguide_id text, bioguide_previous_id text, birthday_bio text, cspan_id text, fec_id text, first_name text, gender_bio text, google_entity_id_id text, govtrack_id integer, house_history_alternate_id text, house_history_id real, icpsr_id real, last_name text, lis_id text, maplight_id text, middle_name text, nickname_name text, official_full_name text, opensecrets_id text, religion_bio text, suffix_name text, thomas_id text, votesmart_id text, wikidata_id text, wikipedia_id text, address text, bioguide text, chamber text, class real, contact_form text, district real, end text, fax text, last text, middle text, name text, office text, party text, party_affiliations text, phone text, relation text, rss_url text, start text, state text, state_rank text, title text, type text, url text, bioguide text, facebook text, facebook_id real, govtrack real, instagram text, instagram_id real, thomas integer, twitter text, twitter_id real, youtube text, youtube_id text)
|
How many of the legislators are male?
|
SELECT COUNT(*) FROM current WHERE gender_bio = 'M'
|
bird
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.