context
stringlengths
11
9.12k
question
stringlengths
0
1.06k
SQL
stringlengths
2
4.44k
source
stringclasses
28 values
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 facebook ID of the facebook account named "RepWilson".
SELECT facebook_id FROM `social-media` WHERE facebook = 'RepWilson'
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 total number of legislators with "John" as their first name?
SELECT COUNT(*) FROM current WHERE first_name = 'John'
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 district numbers with an Anti-Administration party.
SELECT district FROM `historical-terms` WHERE party = 'Anti-Administration' GROUP BY 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)
List the full name of legislators whose born in 1960.
SELECT official_full_name FROM current WHERE birthday_bio LIKE '1960%'
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 Benjamin Hawkins?
SELECT google_entity_id_id FROM historical WHERE first_name = 'Benjamin' AND last_name = 'Hawkins'
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)
Who is the Pro-Administration senator that runs from March 4, 1789 to December 31, 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 T2.start = '1789-03-04' AND T2.end = '1791-12-31'
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 first and last name of the representatives of the house in district 9?
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.district = 9
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 the legislators with an 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)
List down the open secrets and thomas ID of the democrat senators of New Jersey.
SELECT T1.opensecrets_id, T1.thomas_id FROM current AS T1 INNER JOIN `current-terms` AS T2 ON T1.bioguide_id = T2.bioguide WHERE T2.type = 'sen' AND T2.state = 'NJ' GROUP BY T1.opensecrets_id, T1.thomas_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)
Provide the google entity ID of the senators in New York.
SELECT T1.google_entity_id_id FROM historical AS T1 INNER JOIN `historical-terms` AS T2 ON T1.bioguide_id = T2.bioguide WHERE T2.type = 'sen' AND T2.state = 'NY'
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 with RSS url of http://www.corker.senate.gov/public/index.cfm/rss/feed.
SELECT T1.religion_bio FROM current AS T1 INNER JOIN `current-terms` AS T2 ON T1.bioguide_id = T2.bioguide WHERE T2.rss_url = 'http://www.corker.senate.gov/public/index.cfm/rss/feed' GROUP BY T1.religion_bio
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 party of the legislator named Susan M. Collins?
SELECT T2.party FROM current AS T1 INNER JOIN `current-terms` AS T2 ON T1.bioguide_id = T2.bioguide WHERE T1.official_full_name = 'Susan M. Collins' GROUP BY 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)
List down the district number of the representative of the house named Jonathan Grout.
SELECT T2.district FROM historical AS T1 INNER JOIN `historical-terms` AS T2 ON T1.bioguide_id = T2.bioguide WHERE T1.last_name = 'Grout' AND T1.first_name = 'Jonathan' AND T2.type = 'rep'
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 party and state of the legislator that has an open secrets ID of N00003689 and thomas ID of 186?
SELECT T2.party, T2.state FROM current AS T1 INNER JOIN `current-terms` AS T2 ON T1.bioguide_id = T2.bioguide WHERE T1.opensecrets_id = 'N00003689' AND T1.thomas_id = 186 GROUP BY T2.party, T2.state
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 and birth date of the legislator with a contact form of http://www.brown.senate.gov/contact/.
SELECT T1.official_full_name, T1.birthday_bio FROM current AS T1 INNER JOIN `current-terms` AS T2 ON T1.bioguide_id = T2.bioguide WHERE T2.contact_form = 'http://www.brown.senate.gov/contact/'
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 state and type of term of the legislator with the google entity ID of kg:/m/02pyzk.
SELECT T2.state, T2.type FROM historical AS T1 INNER JOIN `historical-terms` AS T2 ON T1.bioguide_id = T2.bioguide WHERE T1.google_entity_id_id = 'kg:/m/02pyzk'
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 type and end date of the term of the legislator named John Vining.
SELECT T2.type, T2.end FROM historical AS T1 INNER JOIN `historical-terms` AS T2 ON T1.bioguide_id = T2.bioguide WHERE T1.first_name = 'John' AND T1.last_name = 'Vining'
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)
Find the difference between the number of female senators and representatives born between 1930 to 1970.
SELECT SUM(CASE WHEN T2.type = 'sen' THEN 1 ELSE 0 END) - SUM(CASE WHEN T2.type = 'rep' THEN 1 ELSE 0 END) FROM historical AS T1 INNER JOIN `historical-terms` AS T2 ON T1.bioguide_id = T2.bioguide WHERE T1.gender_bio = 'F' AND strftime('%Y', T1.birthday_bio) BETWEEN '1930' AND '1970'
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 male legislators born between 1955 to 1965, what is the percentage of the legislators with an independent party?
SELECT CAST(SUM(CASE WHEN T2.party = 'Independent' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(T2.party) FROM current AS T1 INNER JOIN `current-terms` AS T2 ON T1.bioguide_id = T2.bioguide WHERE T1.gender_bio = 'M' AND strftime('%Y', T1.birthday_bio) BETWEEN '1955' AND '1965'
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 name of the legislator with the ID of W000059?
SELECT first_name, last_name FROM historical WHERE bioguide_id = 'W000059'
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)
Does Thomas Carnes have an account on ballotpedia.org?
SELECT CASE WHEN ballotpedia_id IS NULL THEN 'doesn''t have' ELSE 'have' END AS HaveorNot FROM historical WHERE first_name = 'Thomas' AND last_name = 'Carnes'
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 were born in 1736?
SELECT COUNT(bioguide_id) FROM historical WHERE birthday_bio LIKE '1736%'
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 legislators are woman?
SELECT first_name, last_name 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 districts are in Idaho?
SELECT COUNT(district) FROM `current-terms` WHERE state = '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 legislators are not senator?
SELECT COUNT(bioguide) FROM `current-terms` WHERE class 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)
What is the ratio between male and female 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)
Calculate the percentage of famous_legislatorss.
SELECT CAST(SUM(CASE WHEN wikipedia_id IS NOT NULL THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(bioguide_id) 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)
Which legislators do not have instagram account?
SELECT T1.first_name, T1.last_name FROM current AS T1 INNER JOIN `social-media` AS T2 ON T1.bioguide_id = T2.bioguide WHERE T2.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)
List all the representatives in 1789 along with the districts and state.
SELECT T2.district, T2.state FROM historical AS T1 INNER JOIN `historical-terms` AS T2 ON T1.bioguide_id = T2.bioguide WHERE T2.start LIKE '1789%'
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 all the district that Benjamin Contee has served before.
SELECT T2.district FROM historical AS T1 INNER JOIN `historical-terms` AS T2 ON T1.bioguide_id = T2.bioguide WHERE T1.first_name = 'Benjamin' AND T1.last_name = 'Contee'
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 address of Amy Klobuchar at the term of 4th of January 2001.
SELECT T2.address FROM current AS T1 INNER JOIN `current-terms` AS T2 ON T1.bioguide_id = T2.bioguide WHERE T1.first_name = 'Amy' AND T1.last_name = 'Klobuchar' AND T2.start = '2001-04-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)
List all the junior senators in 1997.
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.start LIKE '1997%' AND T2.state_rank = 'junior'
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 female legislators become representatives for California in 2015?
SELECT COUNT(*) FROM current AS T1 INNER JOIN `current-terms` AS T2 ON T1.bioguide_id = T2.bioguide WHERE STRFTIME('%Y', T2.start) = '2015' AND T2.state = 'CA' AND 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 Twitter ID of Emanuel Cleaver?
SELECT T1.twitter_id FROM `social-media` AS T1 INNER JOIN current AS T2 ON T2.bioguide_id = T1.bioguide WHERE T2.first_name = 'Emanuel' AND T2.last_name = 'Cleaver'
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 all the Facebook ID for current legislators under the democrat party.
SELECT T2.facebook_id FROM `current-terms` AS T1 INNER JOIN `social-media` AS T2 ON T1.bioguide = T2.bioguide WHERE T1.party = 'Democrat' GROUP BY T2.facebook_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)
Which historical female legislator that have their term ended on the 3rd of March 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.end = '1791-03-03' AND 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)
List all the Jewish current legislators that had served in Florida.
SELECT T1.first_name, T1.last_name FROM current AS T1 INNER JOIN `current-terms` AS T2 ON T1.bioguide_id = T2.bioguide WHERE T1.religion_bio = 'Jewish' AND T2.state = 'FL' GROUP BY T1.first_name, 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)
What is the ratio between famous current legislators and famous historical legislators?
SELECT CAST(COUNT(CASE WHEN wikipedia_id IS NOT NULL THEN bioguide_id ELSE 0 END) AS REAL) * 100 / ( SELECT COUNT(CASE WHEN wikipedia_id IS NOT NULL THEN bioguide_id ELSE 0 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)
Based on the number of current legislators, calculate the percentage of legislators that served in 21st-Century.
SELECT CAST(SUM(CASE WHEN strftime('%Y', T2.start) BETWEEN '2000' AND '2017' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(T1.bioguide_id) FROM current AS T1 INNER JOIN `current-terms` AS T2 ON T1.bioguide_id = T2.bioguide
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 Catholic legislators do not have an account on ballotpedia.org?
SELECT COUNT(bioguide_id) FROM historical WHERE religion_bio = 'Catholic' AND 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)
How many class 1 senators belong to the Republican party?
SELECT COUNT(bioguide) FROM `current-terms` WHERE class = 1 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)
What are the full names of the non-google female entity legislators that have not been registered in Federal Election Commission data?
SELECT first_name, last_name FROM historical WHERE gender_bio = 'F' AND google_entity_id_id IS NULL AND fec_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)
In California, how many representatives ended their term in 1995?
SELECT COUNT(*) FROM `current-terms` WHERE state = 'CA' AND type = 'rep' AND end LIKE '1995%'
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 full name of the oldest legislator?
SELECT first_name, last_name FROM historical 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)
List all of the ids of the representatives belonging to the Democrat party in district 13 that ended their term on 1/3/2019?
SELECT bioguide FROM `current-terms` WHERE type = 'rep' AND party = 'Democrat' AND end = '2019-01-03' AND district = 13
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 official Twitter handle of Jason Lewis?
SELECT T2.twitter FROM current AS T1 INNER JOIN `social-media` AS T2 ON T1.bioguide_id = T2.bioguide WHERE T1.official_full_name = 'Jason Lewis'
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 Independent senators that started their term in 2011 and onwards, what are the official full names of the senators that caucused with the Democrat?
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' AND strftime('%Y', T2.start) >= '2011' AND T2.type = 'sen' AND T2.caucus = '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)
How many Jewish legislators do not have facebook?
SELECT COUNT(T3.bioguide_id) FROM ( SELECT T1.bioguide_id FROM current AS T1 INNER JOIN `social-media` AS T2 ON T1.bioguide_id = T2.bioguide WHERE T2.facebook IS NULL GROUP BY T1.bioguide_id ) 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)
Which party has the highest number of legislators who are Baptist?
SELECT T2.party FROM current AS T1 INNER JOIN `current-terms` AS T2 ON T1.bioguide_id = T2.bioguide WHERE T1.religion_bio = 'Baptist' GROUP BY T2.party ORDER BY COUNT(T2.party) DESC 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)
List the official full names of all the legislators who have facebook, instagram, twitter and youtube accounts.
SELECT T1.official_full_name FROM current AS T1 INNER JOIN `social-media` AS T2 ON T1.bioguide_id = T2.bioguide WHERE T2.facebook IS NOT NULL AND T2.instagram IS NOT NULL AND T2.twitter IS NOT NULL AND T2.youtube 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)
How many districts did John Conyers, Jr. serve in total?
SELECT COUNT(T3.district) FROM ( SELECT T2.district FROM current AS T1 INNER JOIN `current-terms` AS T2 ON T1.bioguide_id = T2.bioguide WHERE T1.official_full_name = 'John Conyers, Jr.' GROUP BY T2.district ) 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)
What are the Wikipedia page names of all the anti-administration senators?
SELECT T1.wikipedia_id FROM historical AS T1 INNER JOIN `historical-terms` AS T2 ON T1.bioguide_id = T2.bioguide WHERE T2.type = 'sen' AND T2.party = 'Anti-Administration'
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 all the legislators that served 13 district for 26 consecutive years.
SELECT DISTINCT CASE WHEN SUM(CAST(strftime('%Y', T2.end) AS int) - CAST(strftime('%Y', T2.start) AS int)) = 26 THEN T1.official_full_name END FROM current AS T1 INNER JOIN `current-terms` AS T2 ON T1.bioguide_id = T2.bioguide GROUP BY T1.official_full_name, T2.district HAVING COUNT(T1.official_full_name) = 13
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 Federalist representatives are there whose first names are Benjamin?
SELECT COUNT(T.bioguide_id) FROM ( SELECT T1.bioguide_id FROM historical AS T1 INNER JOIN `historical-terms` AS T2 ON T1.bioguide_id = T2.bioguide WHERE T1.first_name = 'Benjamin' AND T2.party = 'Federalist' AND T2.type = 'rep' GROUP BY T1.bioguide_id ) AS T
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 female representatives served in the state of California for at least 10 years?
SELECT SUM(T3.result) FROM ( SELECT CASE WHEN SUM(CAST(strftime('%Y', T2.`end`) AS int) - CAST(strftime('%Y', T2.start) AS int)) > 10 THEN 1 ELSE 0 END AS result FROM current AS T1 INNER JOIN "current-terms" AS T2 ON T1.bioguide_id = T2.bioguide WHERE T1.gender_bio = 'F' AND T2.state = 'CA' AND T2.type = 'rep' ) AS 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)
What is the party of the oldest legislator?
SELECT T1.party FROM `historical-terms` AS T1 INNER JOIN historical AS T2 ON T2.bioguide_id = T1.bioguide ORDER BY T2.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)
Who is the Lutheran representative that served in the state of Ohio for 14 years before becoming a senator?
SELECT CASE WHEN SUM(CAST(strftime('%Y', T2.end) AS int) - CAST(strftime('%Y', T2.start) AS int)) = 14 THEN official_full_name END FROM current AS T1 INNER JOIN `current-terms` AS T2 ON T1.bioguide_id = T2.bioguide WHERE T1.religion_bio = 'Lutheran' AND T2.state = 'OH' AND T2.type = 'rep'
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 born after the year 1960, how many of them are not google entities?
SELECT COUNT(*) FROM current WHERE strftime('%Y', birthday_bio) > '1960' AND google_entity_id_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 have served in the U.S. House.
SELECT official_full_name FROM current WHERE house_history_id 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)
How many current legislators have both accounts on both VoteView.com and maplight.org?
SELECT COUNT(*) FROM current WHERE icpsr_id IS NOT NULL AND maplight_id 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)
Among all the current female legislators, how many of them have attended in Senate roll call votes?
SELECT COUNT(lis_id) FROM current WHERE gender_bio = 'F' AND lis_id 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)
What is the religion of current legislator Sherrod Brown?
SELECT religion_bio 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)
What is the religion with the most occurrrence of the current legislators?
SELECT religion_bio FROM current GROUP BY religion_bio ORDER BY COUNT(religion_bio) DESC 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 current official Instagram handle of current legislator Bob Corker?
SELECT T2.instagram FROM current AS T1 INNER JOIN `social-media` AS T2 ON T1.bioguide_id = T2.bioguide WHERE T1.official_full_name = 'Bob Corker'
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 accounts on both http://thomas.gov, how many of them have accounts on instagram?
SELECT COUNT(DISTINCT T1.bioguide_id) FROM current AS T1 INNER JOIN `social-media` AS T2 ON T1.bioguide_id = T2.bioguide WHERE T1.thomas_id IS NOT NULL AND T2.instagram 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)
Please list the username of the current official Facebook presence of all the current legislators that are famous or impact.
SELECT T2.facebook FROM current AS T1 INNER JOIN `social-media` AS T2 ON T1.bioguide_id = T2.bioguide WHERE T1.wikipedia_id IS NOT NULL GROUP BY T2.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)
For how many terms have the oldest current legislator served?
SELECT COUNT(T2.bioguide) FROM current AS T1 INNER JOIN `current-terms` AS T2 ON T1.bioguide_id = T2.bioguide WHERE T1.birthday_bio = ( SELECT MIN(birthday_bio) 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)
What was current legislator Sherrod Brown's Washington, D.C. office phone number during his term starting on 2013/1/3?
SELECT T1.phone FROM `current-terms` AS T1 INNER JOIN current AS T2 ON T2.bioguide_id = T1.bioguide WHERE T2.official_full_name = 'Sherrod Brown' AND T1.start = '2013-01-03'
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 Sherrod Brown has been in the Democrat party during how many terms that he has 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' 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)
Please list the full official names of all the current legislators who served the term that started on 2013/1/3.
SELECT T1.official_full_name FROM current AS T1 INNER JOIN `current-terms` AS T2 ON T1.bioguide_id = T2.bioguide WHERE T2.start = '2013-01-03'
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 served the term starting on 2013/1/3, how many of them are female?
SELECT COUNT(*) FROM current AS T1 INNER JOIN `current-terms` AS T2 ON T1.bioguide_id = T2.bioguide WHERE T2.start = '2013-01-03' AND 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 full official name of the current legislator that has served for the most number of terms?
SELECT T1.official_full_name FROM current AS T1 INNER JOIN `current-terms` AS T2 ON T1.bioguide_id = T2.bioguide GROUP BY T1.official_full_name, T2.bioguide ORDER BY COUNT(T2.bioguide) DESC 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)
For how many terms has current legislator Sherrod Brown served as a representative for district no.13?
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' AND T2.district = 13
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 official full name of the current legislator whose current official Facebook presence is "senjoniernst"?
SELECT T1.official_full_name FROM current AS T1 INNER JOIN `social-media` AS T2 ON T1.bioguide_id = T2.bioguide WHERE T2.facebook = 'senjoniernst'
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 has served for more terms, Sherrod Brown or Maria Cantwell?
SELECT CASE WHEN SUM(CASE WHEN T1.official_full_name = 'Maria Cantwell' THEN 1 ELSE 0 END) > SUM(CASE WHEN T1.official_full_name = 'Sherrod Brown' THEN 1 ELSE 0 END) THEN 'Maria Cantwell' ELSE 'Sherrod Brown' END FROM current AS T1 INNER JOIN `current-terms` AS T2 ON T1.bioguide_id = T2.bioguide
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 who have served for more than 4 terms, what is the percentage of them being female?
SELECT CAST(SUM(CASE WHEN gender_bio = 'F' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(T3.bioguide) FROM ( SELECT T2.bioguide, T1.gender_bio FROM current AS T1 INNER JOIN `current-terms` AS T2 ON T1.bioguide_id = T2.bioguide GROUP BY T2.bioguide HAVING COUNT(T2.bioguide) > 4 ) 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)
What is the average number of terms served for a current legislator that's famous or impact?
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.wikipedia_id 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)
How many of the legislators are female?
SELECT COUNT(gender_bio) 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)
What is the total number of senators New Jersey have?
SELECT COUNT(type) FROM `historical-terms` WHERE state = 'NJ' AND type = 'rep'
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 address of the legislator with the contact form of http://www.carper.senate.gov/contact/.
SELECT address FROM `current-terms` WHERE contact_form = 'http://www.carper.senate.gov/contact/'
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 Instagram username of the legislator named Benjamin Hawkins.
SELECT T1.instagram FROM `social-media` AS T1 INNER JOIN current AS T2 ON T2.bioguide_id = T1.bioguide WHERE T2.first_name = 'Benjamin' AND T2.last_name = 'Hawkins'
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 alphanumeric ID of the Catholic legislators in Nebraska.
SELECT T1.bioguide FROM `current-terms` AS T1 INNER JOIN current AS T2 ON T2.bioguide_id = T1.bioguide WHERE T2.religion_bio = 'Catholic' AND T1.state = 'NE'
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 down the MapLight ID of the representatives in Maine.
SELECT T1.maplight_id FROM historical AS T1 INNER JOIN `historical-terms` AS T2 ON T1.bioguide_id = T2.bioguide WHERE T2.type = 'rep' AND T2.state = 'ME' GROUP BY T1.maplight_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)
Give the type and start date of the term of the legislator born on November 26, 1727.
SELECT T2.type, T2.start FROM historical AS T1 INNER JOIN `historical-terms` AS T2 ON T1.bioguide_id = T2.bioguide WHERE T1.birthday_bio = '1727-11-26'
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 form of the legislator named Rick Crawford?
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 = 'Rick Crawford'
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 female representatives are there in Michigan?
SELECT COUNT(T.bioguide_id) FROM ( SELECT T1.bioguide_id FROM current AS T1 INNER JOIN `current-terms` AS T2 ON T1.bioguide_id = T2.bioguide WHERE T2.type = 'rep' AND T2.state = 'MI' AND T1.gender_bio = 'F' GROUP BY T1.bioguide_id ) T
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 female legislators, what is the percentage of the senators in Maine?
SELECT CAST(SUM(CASE WHEN T2.type = 'sen' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(T2.type) FROM current AS T1 INNER JOIN `current-terms` AS T2 ON T1.bioguide_id = T2.bioguide WHERE T2.state = 'ME' AND T1.gender_bio = 'F'
bird
CREATE TABLE olympics (id integer, city_name text, id integer, games_year integer, games_name text, season text, games_id integer, city_id integer, id integer, medal_name text, id integer, noc text, region_name text, id integer, full_name text, gender text, height integer, weight integer, id integer, games_id integer, person_id integer, age integer, person_id integer, region_id integer, id integer, sport_name text, id integer, sport_id integer, event_name text, event_id integer, competitor_id integer, medal_id integer)
Please list the names of all the Olympic games that John Aalberg has taken part in.
SELECT T1.games_name FROM games AS T1 INNER JOIN games_competitor AS T2 ON T1.id = T2.games_id INNER JOIN person AS T3 ON T2.person_id = T3.id WHERE T3.full_name = 'John Aalberg'
bird
CREATE TABLE olympics (id integer, city_name text, id integer, games_year integer, games_name text, season text, games_id integer, city_id integer, id integer, medal_name text, id integer, noc text, region_name text, id integer, full_name text, gender text, height integer, weight integer, id integer, games_id integer, person_id integer, age integer, person_id integer, region_id integer, id integer, sport_name text, id integer, sport_id integer, event_name text, event_id integer, competitor_id integer, medal_id integer)
What was the name of the Olympic game that John Aalberg took part in when he was 31?
SELECT T1.games_name FROM games AS T1 INNER JOIN games_competitor AS T2 ON T1.id = T2.games_id INNER JOIN person AS T3 ON T2.person_id = T3.id WHERE T3.full_name = 'John Aalberg' AND T2.age = 31
bird
CREATE TABLE olympics (id integer, city_name text, id integer, games_year integer, games_name text, season text, games_id integer, city_id integer, id integer, medal_name text, id integer, noc text, region_name text, id integer, full_name text, gender text, height integer, weight integer, id integer, games_id integer, person_id integer, age integer, person_id integer, region_id integer, id integer, sport_name text, id integer, sport_id integer, event_name text, event_id integer, competitor_id integer, medal_id integer)
When John Aalberg took part in the 1994 Winter Olympic Game, how old was he?
SELECT T2.age FROM games AS T1 INNER JOIN games_competitor AS T2 ON T1.id = T2.games_id INNER JOIN person AS T3 ON T2.person_id = T3.id WHERE T3.full_name = 'John Aalberg' AND T1.games_name = '1994 Winter'
bird
CREATE TABLE olympics (id integer, city_name text, id integer, games_year integer, games_name text, season text, games_id integer, city_id integer, id integer, medal_name text, id integer, noc text, region_name text, id integer, full_name text, gender text, height integer, weight integer, id integer, games_id integer, person_id integer, age integer, person_id integer, region_id integer, id integer, sport_name text, id integer, sport_id integer, event_name text, event_id integer, competitor_id integer, medal_id integer)
How many Olympic competitors are from Finland?
SELECT COUNT(T1.person_id) FROM person_region AS T1 INNER JOIN noc_region AS T2 ON T1.region_id = T2.id WHERE T2.region_name = 'Finland'
bird
CREATE TABLE olympics (id integer, city_name text, id integer, games_year integer, games_name text, season text, games_id integer, city_id integer, id integer, medal_name text, id integer, noc text, region_name text, id integer, full_name text, gender text, height integer, weight integer, id integer, games_id integer, person_id integer, age integer, person_id integer, region_id integer, id integer, sport_name text, id integer, sport_id integer, event_name text, event_id integer, competitor_id integer, medal_id integer)
Please list the names of all the Olympic competitors from Finland.
SELECT T3.full_name FROM noc_region AS T1 INNER JOIN person_region AS T2 ON T1.id = T2.region_id INNER JOIN person AS T3 ON T2.person_id = T3.id WHERE T1.region_name = 'Finland'
bird
CREATE TABLE olympics (id integer, city_name text, id integer, games_year integer, games_name text, season text, games_id integer, city_id integer, id integer, medal_name text, id integer, noc text, region_name text, id integer, full_name text, gender text, height integer, weight integer, id integer, games_id integer, person_id integer, age integer, person_id integer, region_id integer, id integer, sport_name text, id integer, sport_id integer, event_name text, event_id integer, competitor_id integer, medal_id integer)
The Olympic competitor John Aalberg is from which region?
SELECT T1.region_name FROM noc_region AS T1 INNER JOIN person_region AS T2 ON T1.id = T2.region_id INNER JOIN person AS T3 ON T2.person_id = T3.id WHERE T3.full_name = 'John Aalberg'
bird
CREATE TABLE olympics (id integer, city_name text, id integer, games_year integer, games_name text, season text, games_id integer, city_id integer, id integer, medal_name text, id integer, noc text, region_name text, id integer, full_name text, gender text, height integer, weight integer, id integer, games_id integer, person_id integer, age integer, person_id integer, region_id integer, id integer, sport_name text, id integer, sport_id integer, event_name text, event_id integer, competitor_id integer, medal_id integer)
What is the NOC code of the region where the tallest male Olympic competitor is from?
SELECT T1.noc FROM noc_region AS T1 INNER JOIN person_region AS T2 ON T1.id = T2.region_id INNER JOIN person AS T3 ON T2.person_id = T3.id WHERE T3.gender = 'M' ORDER BY T3.height DESC LIMIT 1
bird
CREATE TABLE olympics (id integer, city_name text, id integer, games_year integer, games_name text, season text, games_id integer, city_id integer, id integer, medal_name text, id integer, noc text, region_name text, id integer, full_name text, gender text, height integer, weight integer, id integer, games_id integer, person_id integer, age integer, person_id integer, region_id integer, id integer, sport_name text, id integer, sport_id integer, event_name text, event_id integer, competitor_id integer, medal_id integer)
Among all the Olympic competitors from Finland, how many of them are female?
SELECT COUNT(T3.id) FROM noc_region AS T1 INNER JOIN person_region AS T2 ON T1.id = T2.region_id INNER JOIN person AS T3 ON T2.person_id = T3.id WHERE T1.region_name = 'Finland' AND T3.gender = 'F'
bird
CREATE TABLE olympics (id integer, city_name text, id integer, games_year integer, games_name text, season text, games_id integer, city_id integer, id integer, medal_name text, id integer, noc text, region_name text, id integer, full_name text, gender text, height integer, weight integer, id integer, games_id integer, person_id integer, age integer, person_id integer, region_id integer, id integer, sport_name text, id integer, sport_id integer, event_name text, event_id integer, competitor_id integer, medal_id integer)
In which city was the 1992 Summer Olympic Games held?
SELECT T2.city_name FROM games_city AS T1 INNER JOIN city AS T2 ON T1.city_id = T2.id INNER JOIN games AS T3 ON T1.games_id = T3.id WHERE T3.games_name = '1992 Summer'
bird
CREATE TABLE olympics (id integer, city_name text, id integer, games_year integer, games_name text, season text, games_id integer, city_id integer, id integer, medal_name text, id integer, noc text, region_name text, id integer, full_name text, gender text, height integer, weight integer, id integer, games_id integer, person_id integer, age integer, person_id integer, region_id integer, id integer, sport_name text, id integer, sport_id integer, event_name text, event_id integer, competitor_id integer, medal_id integer)
Please list the names of the Olympic games that were held in London.
SELECT T3.games_name FROM games_city AS T1 INNER JOIN city AS T2 ON T1.city_id = T2.id INNER JOIN games AS T3 ON T1.games_id = T3.id WHERE T2.city_name = 'London'
bird
CREATE TABLE olympics (id integer, city_name text, id integer, games_year integer, games_name text, season text, games_id integer, city_id integer, id integer, medal_name text, id integer, noc text, region_name text, id integer, full_name text, gender text, height integer, weight integer, id integer, games_id integer, person_id integer, age integer, person_id integer, region_id integer, id integer, sport_name text, id integer, sport_id integer, event_name text, event_id integer, competitor_id integer, medal_id integer)
In which year did London hold its earliest Olympic game?
SELECT T3.games_year FROM games_city AS T1 INNER JOIN city AS T2 ON T1.city_id = T2.id INNER JOIN games AS T3 ON T1.games_id = T3.id WHERE T2.city_name = 'London' ORDER BY T3.games_year LIMIT 1
bird
CREATE TABLE olympics (id integer, city_name text, id integer, games_year integer, games_name text, season text, games_id integer, city_id integer, id integer, medal_name text, id integer, noc text, region_name text, id integer, full_name text, gender text, height integer, weight integer, id integer, games_id integer, person_id integer, age integer, person_id integer, region_id integer, id integer, sport_name text, id integer, sport_id integer, event_name text, event_id integer, competitor_id integer, medal_id integer)
For how many times has London held the Olympic games?
SELECT COUNT(T1.games_id) FROM games_city AS T1 INNER JOIN city AS T2 ON T1.city_id = T2.id WHERE T2.city_name = 'London'
bird
CREATE TABLE olympics (id integer, city_name text, id integer, games_year integer, games_name text, season text, games_id integer, city_id integer, id integer, medal_name text, id integer, noc text, region_name text, id integer, full_name text, gender text, height integer, weight integer, id integer, games_id integer, person_id integer, age integer, person_id integer, region_id integer, id integer, sport_name text, id integer, sport_id integer, event_name text, event_id integer, competitor_id integer, medal_id integer)
What is the average height of the male Olympic competitors from Finland?
SELECT AVG(T3.height) FROM noc_region AS T1 INNER JOIN person_region AS T2 ON T1.id = T2.region_id INNER JOIN person AS T3 ON T2.person_id = T3.id WHERE T1.region_name = 'Finland' AND T3.gender = 'M'
bird