db_id
stringlengths
4
31
SQL
stringlengths
18
1.45k
input_sequence
stringlengths
148
11k
question
stringlengths
16
325
legislator
select t2.bioguide_id, t2.first_name, t2.last_name from `historical-terms` as t1 inner join historical as t2 on t2.bioguide_id = t1.bioguide where t1.party = 'liberal republican'
Question: list the ids and full names of legislators from the liberal republican party. | Tables: current -> ballotpedia_id, bioguide_id, birthday_bio, cspan_id, fec_id, first_name, gender_bio, google_entity_id_id, govtrack_id, house_history_id, icpsr_id, last_name, lis_id, maplight_id, middle_name, nickname_name, offi...
list the ids and full names of legislators from the liberal republican party.
legislator
select count(t1.bioguide_id) from historical as t1 inner join `historical-terms` as t2 on t1.bioguide_id = t2.bioguide where t1.gender_bio = 'm' and t2.start = '1793-12-02'
Question: among the legislators who started a term on 2nd december 1793, how many of them were males? | Tables: current -> ballotpedia_id, bioguide_id, birthday_bio, cspan_id, fec_id, first_name, gender_bio, google_entity_id_id, govtrack_id, house_history_id, icpsr_id, last_name, lis_id, maplight_id, middle_name, nickn...
among the legislators who started a term on 2nd december 1793, how many of them were males?
legislator
select sum(case when `current-terms`.start like '2005%' then 1 else 0 end) - ( select sum(case when start like '1875%' then 1 else 0 end) from `historical-terms` ) from `current-terms`
Question: compare the number of legislators who started the term in 1875 and 2005. | Tables: current -> ballotpedia_id, bioguide_id, birthday_bio, cspan_id, fec_id, first_name, gender_bio, google_entity_id_id, govtrack_id, house_history_id, icpsr_id, last_name, lis_id, maplight_id, middle_name, nickname_name, official_...
compare the number of legislators who started the term in 1875 and 2005.
legislator
select t2.official_full_name, t1.twitter_id, t1.youtube_id from `social-media` as t1 inner join current as t2 on t1.bioguide = t2.bioguide_id where t2.first_name = 'richard'
Question: list the full names, twitter ids, and youtube ids of legislators who have richard as their first name. | Tables: current -> ballotpedia_id, bioguide_id, birthday_bio, cspan_id, fec_id, first_name, gender_bio, google_entity_id_id, govtrack_id, house_history_id, icpsr_id, last_name, lis_id, maplight_id, middle_...
list the full names, twitter ids, and youtube ids of legislators who have richard as their first name.
legislator
select t2.start, t2.`end`, t2.party from historical as t1 inner join `historical-terms` as t2 on t1.bioguide_id = t2.bioguide where t1.first_name = 'pearl' and t1.middle_name = 'peden' and t1.last_name = 'oldfield'
Question: provide the start date, end date, and party of pearl peden oldfield. | Tables: current -> ballotpedia_id, bioguide_id, birthday_bio, cspan_id, fec_id, first_name, gender_bio, google_entity_id_id, govtrack_id, house_history_id, icpsr_id, last_name, lis_id, maplight_id, middle_name, nickname_name, official_full...
provide the start date, end date, and party of pearl peden oldfield.
legislator
select birthday_bio from current where first_name = 'amy' and last_name = 'klobuchar'
Question: what is the birthday of amy klobuchar? | Tables: current -> ballotpedia_id, bioguide_id, birthday_bio, cspan_id, fec_id, first_name, gender_bio, google_entity_id_id, govtrack_id, house_history_id, icpsr_id, last_name, lis_id, maplight_id, middle_name, nickname_name, official_full_name, opensecrets_id, religio...
what is the birthday of amy klobuchar?
legislator
select count(*) from current where fec_id is null or fec_id = ''
Question: how many legislators have not been registered in federal election commission data? | Tables: current -> ballotpedia_id, bioguide_id, birthday_bio, cspan_id, fec_id, first_name, gender_bio, google_entity_id_id, govtrack_id, house_history_id, icpsr_id, last_name, lis_id, maplight_id, middle_name, nickname_name,...
how many legislators have not been registered in federal election commission data?
legislator
select count(*) from current where gender_bio = 'f'
Question: state the number of female legislators in the list. | Tables: current -> ballotpedia_id, bioguide_id, birthday_bio, cspan_id, fec_id, first_name, gender_bio, google_entity_id_id, govtrack_id, house_history_id, icpsr_id, last_name, lis_id, maplight_id, middle_name, nickname_name, official_full_name, opensecret...
state the number of female legislators in the list.
legislator
select count(*) from current where opensecrets_id is not null and opensecrets_id <> ''
Question: give the full name of legislators who have accounts on opensecrets.org. | Tables: current -> ballotpedia_id, bioguide_id, birthday_bio, cspan_id, fec_id, first_name, gender_bio, google_entity_id_id, govtrack_id, house_history_id, icpsr_id, last_name, lis_id, maplight_id, middle_name, nickname_name, official_f...
give the full name of legislators who have accounts on opensecrets.org.
legislator
select middle_name from current where birthday_bio = '1956-08-24'
Question: what is the middle name of the legislator whose birthday was on 8/24/1956? | Tables: current -> ballotpedia_id, bioguide_id, birthday_bio, cspan_id, fec_id, first_name, gender_bio, google_entity_id_id, govtrack_id, house_history_id, icpsr_id, last_name, lis_id, maplight_id, middle_name, nickname_name, officia...
what is the middle name of the legislator whose birthday was on 8/24/1956?
legislator
select count(bioguide) from `current-terms` where title = 'majority leader'
Question: how many legislators hold the title 'majority leader'? | Tables: current -> ballotpedia_id, bioguide_id, birthday_bio, cspan_id, fec_id, first_name, gender_bio, google_entity_id_id, govtrack_id, house_history_id, icpsr_id, last_name, lis_id, maplight_id, middle_name, nickname_name, official_full_name, opensec...
how many legislators hold the title 'majority leader'?
legislator
select t2.title from current as t1 inner join `current-terms` as t2 on t1.bioguide_id = t2.bioguide where t1.birthday_bio = '1942-02-20' group by t2.title
Question: what is the title of legislator whose birthday on 2/20/1942? | Tables: current -> ballotpedia_id, bioguide_id, birthday_bio, cspan_id, fec_id, first_name, gender_bio, google_entity_id_id, govtrack_id, house_history_id, icpsr_id, last_name, lis_id, maplight_id, middle_name, nickname_name, official_full_name, o...
what is the title of legislator whose birthday on 2/20/1942?
legislator
select t1.gender_bio from current as t1 inner join `current-terms` as t2 on t1.bioguide_id = t2.bioguide where t2.address = '317 russell senate office building washington dc 20510'
Question: what is the gender of the legislator whose address at 317 russell senate office building washington dc 20510? | Tables: current -> ballotpedia_id, bioguide_id, birthday_bio, cspan_id, fec_id, first_name, gender_bio, google_entity_id_id, govtrack_id, house_history_id, icpsr_id, last_name, lis_id, maplight_id, ...
what is the gender of the legislator whose address at 317 russell senate office building washington dc 20510?
legislator
select t1.first_name from current as t1 inner join `current-terms` as t2 on t1.bioguide_id = t2.bioguide where t2.state_rank = 'senior' group by t1.first_name
Question: list out the first name of legislators who are senior senator. | Tables: current -> ballotpedia_id, bioguide_id, birthday_bio, cspan_id, fec_id, first_name, gender_bio, google_entity_id_id, govtrack_id, house_history_id, icpsr_id, last_name, lis_id, maplight_id, middle_name, nickname_name, official_full_name,...
list out the first name of legislators who are senior senator.
legislator
select count(t3.state) from ( select t2.state from current as t1 inner join `current-terms` as t2 on t1.bioguide_id = t2.bioguide where t1.gender_bio = 'm' and (t2.class is null or t2.class = '') group by t2.state ) t3
Question: among male legislators, state number of the legislators who are not the senator. | Tables: current -> ballotpedia_id, bioguide_id, birthday_bio, cspan_id, fec_id, first_name, gender_bio, google_entity_id_id, govtrack_id, house_history_id, icpsr_id, last_name, lis_id, maplight_id, middle_name, nickname_name, o...
among male legislators, state number of the legislators who are not the senator.
legislator
select cast(sum(case when t2.class is not null then 1 else 0 end) as real) * 100 / count(*) from current as t1 inner join `current-terms` as t2 on t1.bioguide_id = t2.bioguide where t1.birthday_bio like '%1964%'
Question: calculate the percentage of legislators who are senator and were born in 1964. | Tables: current -> ballotpedia_id, bioguide_id, birthday_bio, cspan_id, fec_id, first_name, gender_bio, google_entity_id_id, govtrack_id, house_history_id, icpsr_id, last_name, lis_id, maplight_id, middle_name, nickname_name, off...
calculate the percentage of legislators who are senator and were born in 1964.
legislator
select cast(count(case when t2.class is null then t1.bioguide_id else null end) as real) * 100 / count(t1.bioguide_id) from current as t1 inner join `current-terms` as t2 on t1.bioguide_id = t2.bioguide where cast(t1.birthday_bio as date) <= 1975
Question: calculate the percentage of legislators who are not senator and were born before 1975. | Tables: current -> ballotpedia_id, bioguide_id, birthday_bio, cspan_id, fec_id, first_name, gender_bio, google_entity_id_id, govtrack_id, house_history_id, icpsr_id, last_name, lis_id, maplight_id, middle_name, nickname_n...
calculate the percentage of legislators who are not senator and were born before 1975.
legislator
select t2.twitter from current as t1 inner join `social-media` as t2 on t2.bioguide = t1.bioguide_id where t1.birthday_bio = '1946-05-27'
Question: what is the twitter name of the legislator whose birthday was on 5/27/1946? | Tables: current -> ballotpedia_id, bioguide_id, birthday_bio, cspan_id, fec_id, first_name, gender_bio, google_entity_id_id, govtrack_id, house_history_id, icpsr_id, last_name, lis_id, maplight_id, middle_name, nickname_name, offici...
what is the twitter name of the legislator whose birthday was on 5/27/1946?
legislator
select t1.opensecrets_id from current as t1 inner join `social-media` as t2 on t2.bioguide = t1.bioguide_id where t2.youtube = 'bluetkemeyer'
Question: state the opensecrets_id of the legislator whose youtube name is bluetkemeyer. | Tables: current -> ballotpedia_id, bioguide_id, birthday_bio, cspan_id, fec_id, first_name, gender_bio, google_entity_id_id, govtrack_id, house_history_id, icpsr_id, last_name, lis_id, maplight_id, middle_name, nickname_name, off...
state the opensecrets_id of the legislator whose youtube name is bluetkemeyer.
legislator
select t2.facebook from current as t1 inner join `social-media` as t2 on t2.bioguide = t1.bioguide_id where t1.first_name = 'ralph' and t1.last_name = 'abraham'
Question: mention the username of facebook of ralph abraham. | Tables: current -> ballotpedia_id, bioguide_id, birthday_bio, cspan_id, fec_id, first_name, gender_bio, google_entity_id_id, govtrack_id, house_history_id, icpsr_id, last_name, lis_id, maplight_id, middle_name, nickname_name, official_full_name, opensecrets...
mention the username of facebook of ralph abraham.
legislator
select t1.first_name from current as t1 inner join `current-terms` as t2 on t1.bioguide_id = t2.bioguide where t2.address = '1005 longworth hob washington dc 20515-1408' group by t1.first_name
Question: what is the first name of the legislator whose address at 1005 longworth hob; washington dc 20515-1408? | Tables: current -> ballotpedia_id, bioguide_id, birthday_bio, cspan_id, fec_id, first_name, gender_bio, google_entity_id_id, govtrack_id, house_history_id, icpsr_id, last_name, lis_id, maplight_id, middle...
what is the first name of the legislator whose address at 1005 longworth hob; washington dc 20515-1408?
legislator
select t1.instagram from `social-media` as t1 inner join current as t2 on t1.bioguide = t2.bioguide_id where t2.birthday_bio = '1952-08-24'
Question: what is the instagram name of the legislator whose birthday was on 8/24/1952? | Tables: current -> ballotpedia_id, bioguide_id, birthday_bio, cspan_id, fec_id, first_name, gender_bio, google_entity_id_id, govtrack_id, house_history_id, icpsr_id, last_name, lis_id, maplight_id, middle_name, nickname_name, offi...
what is the instagram name of the legislator whose birthday was on 8/24/1952?
legislator
select count(*) from current as t1 inner join `current-terms` as t2 on t1.bioguide_id = t2.bioguide where t1.gender_bio = 'f' and (t2.class is null or t2.class = '')
Question: state number of legislators who are not the senator among female legislators. | Tables: current -> ballotpedia_id, bioguide_id, birthday_bio, cspan_id, fec_id, first_name, gender_bio, google_entity_id_id, govtrack_id, house_history_id, icpsr_id, last_name, lis_id, maplight_id, middle_name, nickname_name, offi...
state number of legislators who are not the senator among female legislators.
legislator
select t2.religion_bio from `social-media` as t1 inner join current as t2 on t1.bioguide = t2.bioguide_id where t1.youtube = 'maxinewaters'
Question: give the religion of the legislator whose youtube name is maxinewaters. | Tables: current -> ballotpedia_id, bioguide_id, birthday_bio, cspan_id, fec_id, first_name, gender_bio, google_entity_id_id, govtrack_id, house_history_id, icpsr_id, last_name, lis_id, maplight_id, middle_name, nickname_name, official_f...
give the religion of the legislator whose youtube name is maxinewaters.
legislator
select count(*) from current as t1 inner join `current-terms` as t2 on t1.bioguide_id = t2.bioguide where t2.title = 'minority leader' and (t1.fec_id is null or t1.fec_id = '')
Question: how many minority leaders have not been registered in federal election commission data? | Tables: current -> ballotpedia_id, bioguide_id, birthday_bio, cspan_id, fec_id, first_name, gender_bio, google_entity_id_id, govtrack_id, house_history_id, icpsr_id, last_name, lis_id, maplight_id, middle_name, nickname_...
how many minority leaders have not been registered in federal election commission data?
legislator
select count(*) from current where gender_bio = 'm'
Question: how many of the legislators are male? | Tables: current -> ballotpedia_id, bioguide_id, birthday_bio, cspan_id, fec_id, first_name, gender_bio, google_entity_id_id, govtrack_id, house_history_id, icpsr_id, last_name, lis_id, maplight_id, middle_name, nickname_name, official_full_name, opensecrets_id, religion...
how many of the legislators are male?
legislator
select facebook_id from `social-media` where facebook = 'repwilson'
Question: provide the facebook id of the facebook account named 'repwilson'. | Tables: current -> ballotpedia_id, bioguide_id, birthday_bio, cspan_id, fec_id, first_name, gender_bio, google_entity_id_id, govtrack_id, house_history_id, icpsr_id, last_name, lis_id, maplight_id, middle_name, nickname_name, official_full_n...
provide the facebook id of the facebook account named 'repwilson'.
legislator
select count(*) from current where first_name = 'john'
Question: what is the total number of legislators with 'john' as their first name? | Tables: current -> ballotpedia_id, bioguide_id, birthday_bio, cspan_id, fec_id, first_name, gender_bio, google_entity_id_id, govtrack_id, house_history_id, icpsr_id, last_name, lis_id, maplight_id, middle_name, nickname_name, official_...
what is the total number of legislators with 'john' as their first name?
legislator
select district from `historical-terms` where party = 'anti-administration' group by district
Question: give the district numbers with an anti-administration party. | Tables: current -> ballotpedia_id, bioguide_id, birthday_bio, cspan_id, fec_id, first_name, gender_bio, google_entity_id_id, govtrack_id, house_history_id, icpsr_id, last_name, lis_id, maplight_id, middle_name, nickname_name, official_full_name, o...
give the district numbers with an anti-administration party.
legislator
select official_full_name from current where birthday_bio like '1960%'
Question: list the full name of legislators whose born in 1960. | Tables: current -> ballotpedia_id, bioguide_id, birthday_bio, cspan_id, fec_id, first_name, gender_bio, google_entity_id_id, govtrack_id, house_history_id, icpsr_id, last_name, lis_id, maplight_id, middle_name, nickname_name, official_full_name, opensecr...
list the full name of legislators whose born in 1960.
legislator
select google_entity_id_id from historical where first_name = 'benjamin' and last_name = 'hawkins'
Question: what is the google entity id of benjamin hawkins? | Tables: current -> ballotpedia_id, bioguide_id, birthday_bio, cspan_id, fec_id, first_name, gender_bio, google_entity_id_id, govtrack_id, house_history_id, icpsr_id, last_name, lis_id, maplight_id, middle_name, nickname_name, official_full_name, opensecrets_...
what is the google entity id of benjamin hawkins?
legislator
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'
Question: who is the pro-administration senator that runs from march 4, 1789 to december 31, 1791? | Tables: current -> ballotpedia_id, bioguide_id, birthday_bio, cspan_id, fec_id, first_name, gender_bio, google_entity_id_id, govtrack_id, house_history_id, icpsr_id, last_name, lis_id, maplight_id, middle_name, nickname...
who is the pro-administration senator that runs from march 4, 1789 to december 31, 1791?
legislator
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
Question: what are the first and last name of the representatives of the house in district 9? | Tables: current -> ballotpedia_id, bioguide_id, birthday_bio, cspan_id, fec_id, first_name, gender_bio, google_entity_id_id, govtrack_id, house_history_id, icpsr_id, last_name, lis_id, maplight_id, middle_name, nickname_name...
what are the first and last name of the representatives of the house in district 9?
legislator
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
Question: give the full name of the legislators with an independent party. | Tables: current -> ballotpedia_id, bioguide_id, birthday_bio, cspan_id, fec_id, first_name, gender_bio, google_entity_id_id, govtrack_id, house_history_id, icpsr_id, last_name, lis_id, maplight_id, middle_name, nickname_name, official_full_nam...
give the full name of the legislators with an independent party.
legislator
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
Question: list down the open secrets and thomas id of the democrat senators of new jersey. | Tables: current -> ballotpedia_id, bioguide_id, birthday_bio, cspan_id, fec_id, first_name, gender_bio, google_entity_id_id, govtrack_id, house_history_id, icpsr_id, last_name, lis_id, maplight_id, middle_name, nickname_name, o...
list down the open secrets and thomas id of the democrat senators of new jersey.
legislator
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'
Question: provide the google entity id of the senators in new york. | Tables: current -> ballotpedia_id, bioguide_id, birthday_bio, cspan_id, fec_id, first_name, gender_bio, google_entity_id_id, govtrack_id, house_history_id, icpsr_id, last_name, lis_id, maplight_id, middle_name, nickname_name, official_full_name, open...
provide the google entity id of the senators in new york.
legislator
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
Question: give the religion of the legislator with rss url of http://www.corker.senate.gov/public/index.cfm/rss/feed. | Tables: current -> ballotpedia_id, bioguide_id, birthday_bio, cspan_id, fec_id, first_name, gender_bio, google_entity_id_id, govtrack_id, house_history_id, icpsr_id, last_name, lis_id, maplight_id, mi...
give the religion of the legislator with rss url of http://www.corker.senate.gov/public/index.cfm/rss/feed.
legislator
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
Question: what is the party of the legislator named susan m. collins? | Tables: current -> ballotpedia_id, bioguide_id, birthday_bio, cspan_id, fec_id, first_name, gender_bio, google_entity_id_id, govtrack_id, house_history_id, icpsr_id, last_name, lis_id, maplight_id, middle_name, nickname_name, official_full_name, op...
what is the party of the legislator named susan m. collins?
legislator
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'
Question: list down the district number of the representative of the house named jonathan grout. | Tables: current -> ballotpedia_id, bioguide_id, birthday_bio, cspan_id, fec_id, first_name, gender_bio, google_entity_id_id, govtrack_id, house_history_id, icpsr_id, last_name, lis_id, maplight_id, middle_name, nickname_n...
list down the district number of the representative of the house named jonathan grout.
legislator
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
Question: what is the party and state of the legislator that has an open secrets id of n00003689 and thomas id of 186? | Tables: current -> ballotpedia_id, bioguide_id, birthday_bio, cspan_id, fec_id, first_name, gender_bio, google_entity_id_id, govtrack_id, house_history_id, icpsr_id, last_name, lis_id, maplight_id, m...
what is the party and state of the legislator that has an open secrets id of n00003689 and thomas id of 186?
legislator
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/'
Question: provide the full name and birth date of the legislator with a contact form of http://www.brown.senate.gov/contact/. | Tables: current -> ballotpedia_id, bioguide_id, birthday_bio, cspan_id, fec_id, first_name, gender_bio, google_entity_id_id, govtrack_id, house_history_id, icpsr_id, last_name, lis_id, mapligh...
provide the full name and birth date of the legislator with a contact form of http://www.brown.senate.gov/contact/.
legislator
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'
Question: give the state and type of term of the legislator with the google entity id of kg:/m/02pyzk. | Tables: current -> ballotpedia_id, bioguide_id, birthday_bio, cspan_id, fec_id, first_name, gender_bio, google_entity_id_id, govtrack_id, house_history_id, icpsr_id, last_name, lis_id, maplight_id, middle_name, nick...
give the state and type of term of the legislator with the google entity id of kg:/m/02pyzk.
legislator
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'
Question: provide the type and end date of the term of the legislator named john vining. | Tables: current -> ballotpedia_id, bioguide_id, birthday_bio, cspan_id, fec_id, first_name, gender_bio, google_entity_id_id, govtrack_id, house_history_id, icpsr_id, last_name, lis_id, maplight_id, middle_name, nickname_name, off...
provide the type and end date of the term of the legislator named john vining.
legislator
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'
Question: find the difference between the number of female senators and representatives born between 1930 to 1970. | Tables: current -> ballotpedia_id, bioguide_id, birthday_bio, cspan_id, fec_id, first_name, gender_bio, google_entity_id_id, govtrack_id, house_history_id, icpsr_id, last_name, lis_id, maplight_id, middl...
find the difference between the number of female senators and representatives born between 1930 to 1970.
legislator
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'
Question: among the male legislators born between 1955 to 1965, what is the percentage of the legislators with an independent party? | Tables: current -> ballotpedia_id, bioguide_id, birthday_bio, cspan_id, fec_id, first_name, gender_bio, google_entity_id_id, govtrack_id, house_history_id, icpsr_id, last_name, lis_id, ...
among the male legislators born between 1955 to 1965, what is the percentage of the legislators with an independent party?
legislator
select first_name, last_name from historical where bioguide_id = 'w000059'
Question: what is the name of the legislator with the id of w000059? | Tables: current -> ballotpedia_id, bioguide_id, birthday_bio, cspan_id, fec_id, first_name, gender_bio, google_entity_id_id, govtrack_id, house_history_id, icpsr_id, last_name, lis_id, maplight_id, middle_name, nickname_name, official_full_name, ope...
what is the name of the legislator with the id of w000059?
legislator
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'
Question: does thomas carnes have an account on ballotpedia.org? | Tables: current -> ballotpedia_id, bioguide_id, birthday_bio, cspan_id, fec_id, first_name, gender_bio, google_entity_id_id, govtrack_id, house_history_id, icpsr_id, last_name, lis_id, maplight_id, middle_name, nickname_name, official_full_name, opensec...
does thomas carnes have an account on ballotpedia.org?
legislator
select count(bioguide_id) from historical where birthday_bio like '1736%'
Question: how many legislators were born in 1736? | Tables: current -> ballotpedia_id, bioguide_id, birthday_bio, cspan_id, fec_id, first_name, gender_bio, google_entity_id_id, govtrack_id, house_history_id, icpsr_id, last_name, lis_id, maplight_id, middle_name, nickname_name, official_full_name, opensecrets_id, religi...
how many legislators were born in 1736?
legislator
select first_name, last_name from historical where gender_bio = 'f'
Question: which legislators are woman? | Tables: current -> ballotpedia_id, bioguide_id, birthday_bio, cspan_id, fec_id, first_name, gender_bio, google_entity_id_id, govtrack_id, house_history_id, icpsr_id, last_name, lis_id, maplight_id, middle_name, nickname_name, official_full_name, opensecrets_id, religion_bio, suf...
which legislators are woman?
legislator
select count(district) from `current-terms` where state = 'id'
Question: how many districts are in idaho? | Tables: current -> ballotpedia_id, bioguide_id, birthday_bio, cspan_id, fec_id, first_name, gender_bio, google_entity_id_id, govtrack_id, house_history_id, icpsr_id, last_name, lis_id, maplight_id, middle_name, nickname_name, official_full_name, opensecrets_id, religion_bio,...
how many districts are in idaho?
legislator
select count(bioguide) from `current-terms` where class is null
Question: how many legislators are not senator? | Tables: current -> ballotpedia_id, bioguide_id, birthday_bio, cspan_id, fec_id, first_name, gender_bio, google_entity_id_id, govtrack_id, house_history_id, icpsr_id, last_name, lis_id, maplight_id, middle_name, nickname_name, official_full_name, opensecrets_id, religion...
how many legislators are not senator?
legislator
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
Question: what is the ratio between male and female legislators? | Tables: current -> ballotpedia_id, bioguide_id, birthday_bio, cspan_id, fec_id, first_name, gender_bio, google_entity_id_id, govtrack_id, house_history_id, icpsr_id, last_name, lis_id, maplight_id, middle_name, nickname_name, official_full_name, opensec...
what is the ratio between male and female legislators?
legislator
select cast(sum(case when wikipedia_id is not null then 1 else 0 end) as real) * 100 / count(bioguide_id) from historical
Question: calculate the percentage of famous_legislatorss. | Tables: current -> ballotpedia_id, bioguide_id, birthday_bio, cspan_id, fec_id, first_name, gender_bio, google_entity_id_id, govtrack_id, house_history_id, icpsr_id, last_name, lis_id, maplight_id, middle_name, nickname_name, official_full_name, opensecrets_i...
calculate the percentage of famous_legislatorss.
legislator
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
Question: which legislators do not have instagram account? | Tables: current -> ballotpedia_id, bioguide_id, birthday_bio, cspan_id, fec_id, first_name, gender_bio, google_entity_id_id, govtrack_id, house_history_id, icpsr_id, last_name, lis_id, maplight_id, middle_name, nickname_name, official_full_name, opensecrets_i...
which legislators do not have instagram account?
legislator
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%'
Question: list all the representatives in 1789 along with the districts and state. | Tables: current -> ballotpedia_id, bioguide_id, birthday_bio, cspan_id, fec_id, first_name, gender_bio, google_entity_id_id, govtrack_id, house_history_id, icpsr_id, last_name, lis_id, maplight_id, middle_name, nickname_name, official_...
list all the representatives in 1789 along with the districts and state.
legislator
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'
Question: state all the district that benjamin contee has served before. | Tables: current -> ballotpedia_id, bioguide_id, birthday_bio, cspan_id, fec_id, first_name, gender_bio, google_entity_id_id, govtrack_id, house_history_id, icpsr_id, last_name, lis_id, maplight_id, middle_name, nickname_name, official_full_name,...
state all the district that benjamin contee has served before.
legislator
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'
Question: state the address of amy klobuchar at the term of 4th of january 2001. | Tables: current -> ballotpedia_id, bioguide_id, birthday_bio, cspan_id, fec_id, first_name, gender_bio, google_entity_id_id, govtrack_id, house_history_id, icpsr_id, last_name, lis_id, maplight_id, middle_name, nickname_name, official_fu...
state the address of amy klobuchar at the term of 4th of january 2001.
legislator
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'
Question: list all the junior senators in 1997. | Tables: current -> ballotpedia_id, bioguide_id, birthday_bio, cspan_id, fec_id, first_name, gender_bio, google_entity_id_id, govtrack_id, house_history_id, icpsr_id, last_name, lis_id, maplight_id, middle_name, nickname_name, official_full_name, opensecrets_id, religion...
list all the junior senators in 1997.
legislator
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'
Question: how many female legislators become representatives for california in 2015? | Tables: current -> ballotpedia_id, bioguide_id, birthday_bio, cspan_id, fec_id, first_name, gender_bio, google_entity_id_id, govtrack_id, house_history_id, icpsr_id, last_name, lis_id, maplight_id, middle_name, nickname_name, officia...
how many female legislators become representatives for california in 2015?
legislator
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'
Question: what is the twitter id of emanuel cleaver? | Tables: current -> ballotpedia_id, bioguide_id, birthday_bio, cspan_id, fec_id, first_name, gender_bio, google_entity_id_id, govtrack_id, house_history_id, icpsr_id, last_name, lis_id, maplight_id, middle_name, nickname_name, official_full_name, opensecrets_id, rel...
what is the twitter id of emanuel cleaver?
legislator
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
Question: state all the facebook id for current legislators under the democrat party. | Tables: current -> ballotpedia_id, bioguide_id, birthday_bio, cspan_id, fec_id, first_name, gender_bio, google_entity_id_id, govtrack_id, house_history_id, icpsr_id, last_name, lis_id, maplight_id, middle_name, nickname_name, offici...
state all the facebook id for current legislators under the democrat party.
legislator
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'
Question: which historical female legislator that have their term ended on the 3rd of march 1791? | Tables: current -> ballotpedia_id, bioguide_id, birthday_bio, cspan_id, fec_id, first_name, gender_bio, google_entity_id_id, govtrack_id, house_history_id, icpsr_id, last_name, lis_id, maplight_id, middle_name, nickname_...
which historical female legislator that have their term ended on the 3rd of march 1791?
legislator
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
Question: list all the jewish current legislators that had served in florida. | Tables: current -> ballotpedia_id, bioguide_id, birthday_bio, cspan_id, fec_id, first_name, gender_bio, google_entity_id_id, govtrack_id, house_history_id, icpsr_id, last_name, lis_id, maplight_id, middle_name, nickname_name, official_full_...
list all the jewish current legislators that had served in florida.
legislator
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
Question: what is the ratio between famous current legislators and famous historical legislators? | Tables: current -> ballotpedia_id, bioguide_id, birthday_bio, cspan_id, fec_id, first_name, gender_bio, google_entity_id_id, govtrack_id, house_history_id, icpsr_id, last_name, lis_id, maplight_id, middle_name, nickname_...
what is the ratio between famous current legislators and famous historical legislators?
legislator
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
Question: based on the number of current legislators, calculate the percentage of legislators that served in 21st-century. | Tables: current -> ballotpedia_id, bioguide_id, birthday_bio, cspan_id, fec_id, first_name, gender_bio, google_entity_id_id, govtrack_id, house_history_id, icpsr_id, last_name, lis_id, maplight_i...
based on the number of current legislators, calculate the percentage of legislators that served in 21st-century.
legislator
select count(bioguide_id) from historical where religion_bio = 'catholic' and ballotpedia_id is null
Question: how many catholic legislators do not have an account on ballotpedia.org? | Tables: current -> ballotpedia_id, bioguide_id, birthday_bio, cspan_id, fec_id, first_name, gender_bio, google_entity_id_id, govtrack_id, house_history_id, icpsr_id, last_name, lis_id, maplight_id, middle_name, nickname_name, official_...
how many catholic legislators do not have an account on ballotpedia.org?
legislator
select count(bioguide) from `current-terms` where class = 1 and party = 'republican'
Question: how many class 1 senators belong to the republican party? | Tables: current -> ballotpedia_id, bioguide_id, birthday_bio, cspan_id, fec_id, first_name, gender_bio, google_entity_id_id, govtrack_id, house_history_id, icpsr_id, last_name, lis_id, maplight_id, middle_name, nickname_name, official_full_name, open...
how many class 1 senators belong to the republican party?
legislator
select first_name, last_name from historical where gender_bio = 'f' and google_entity_id_id is null and fec_id is null
Question: what are the full names of the non-google female entity legislators that have not been registered in federal election commission data? | Tables: current -> ballotpedia_id, bioguide_id, birthday_bio, cspan_id, fec_id, first_name, gender_bio, google_entity_id_id, govtrack_id, house_history_id, icpsr_id, last_na...
what are the full names of the non-google female entity legislators that have not been registered in federal election commission data?
legislator
select count(*) from `current-terms` where state = 'ca' and type = 'rep' and end like '1995%'
Question: in california, how many representatives ended their term in 1995? | Tables: current -> ballotpedia_id, bioguide_id, birthday_bio, cspan_id, fec_id, first_name, gender_bio, google_entity_id_id, govtrack_id, house_history_id, icpsr_id, last_name, lis_id, maplight_id, middle_name, nickname_name, official_full_na...
in california, how many representatives ended their term in 1995?
legislator
select first_name, last_name from historical order by birthday_bio limit 1
Question: what is the full name of the oldest legislator? | Tables: current -> ballotpedia_id, bioguide_id, birthday_bio, cspan_id, fec_id, first_name, gender_bio, google_entity_id_id, govtrack_id, house_history_id, icpsr_id, last_name, lis_id, maplight_id, middle_name, nickname_name, official_full_name, opensecrets_id...
what is the full name of the oldest legislator?
legislator
select bioguide from `current-terms` where type = 'rep' and party = 'democrat' and end = '2019-01-03' and district = 13
Question: list all of the ids of the representatives belonging to the democrat party in district 13 that ended their term on 1/3/2019? | Tables: current -> ballotpedia_id, bioguide_id, birthday_bio, cspan_id, fec_id, first_name, gender_bio, google_entity_id_id, govtrack_id, house_history_id, icpsr_id, last_name, lis_id...
list all of the ids of the representatives belonging to the democrat party in district 13 that ended their term on 1/3/2019?
legislator
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'
Question: what is the official twitter handle of jason lewis? | Tables: current -> ballotpedia_id, bioguide_id, birthday_bio, cspan_id, fec_id, first_name, gender_bio, google_entity_id_id, govtrack_id, house_history_id, icpsr_id, last_name, lis_id, maplight_id, middle_name, nickname_name, official_full_name, opensecret...
what is the official twitter handle of jason lewis?
legislator
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'
Question: 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? | Tables: current -> ballotpedia_id, bioguide_id, birthday_bio, cspan_id, fec_id, first_name, gender_bio, google_entity_id_id, govtrack_id, house_histor...
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?
legislator
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
Question: how many jewish legislators do not have facebook? | Tables: current -> ballotpedia_id, bioguide_id, birthday_bio, cspan_id, fec_id, first_name, gender_bio, google_entity_id_id, govtrack_id, house_history_id, icpsr_id, last_name, lis_id, maplight_id, middle_name, nickname_name, official_full_name, opensecrets_...
how many jewish legislators do not have facebook?
legislator
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
Question: which party has the highest number of legislators who are baptist? | Tables: current -> ballotpedia_id, bioguide_id, birthday_bio, cspan_id, fec_id, first_name, gender_bio, google_entity_id_id, govtrack_id, house_history_id, icpsr_id, last_name, lis_id, maplight_id, middle_name, nickname_name, official_full_n...
which party has the highest number of legislators who are baptist?
legislator
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
Question: list the official full names of all the legislators who have facebook, instagram, twitter and youtube accounts. | Tables: current -> ballotpedia_id, bioguide_id, birthday_bio, cspan_id, fec_id, first_name, gender_bio, google_entity_id_id, govtrack_id, house_history_id, icpsr_id, last_name, lis_id, maplight_id...
list the official full names of all the legislators who have facebook, instagram, twitter and youtube accounts.
legislator
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
Question: how many districts did john conyers, jr. serve in total? | Tables: current -> ballotpedia_id, bioguide_id, birthday_bio, cspan_id, fec_id, first_name, gender_bio, google_entity_id_id, govtrack_id, house_history_id, icpsr_id, last_name, lis_id, maplight_id, middle_name, nickname_name, official_full_name, opens...
how many districts did john conyers, jr. serve in total?
legislator
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'
Question: what are the wikipedia page names of all the anti-administration senators? | Tables: current -> ballotpedia_id, bioguide_id, birthday_bio, cspan_id, fec_id, first_name, gender_bio, google_entity_id_id, govtrack_id, house_history_id, icpsr_id, last_name, lis_id, maplight_id, middle_name, nickname_name, officia...
what are the wikipedia page names of all the anti-administration senators?
legislator
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
Question: list the official full names of all the legislators that served 13 district for 26 consecutive years. | Tables: current -> ballotpedia_id, bioguide_id, birthday_bio, cspan_id, fec_id, first_name, gender_bio, google_entity_id_id, govtrack_id, house_history_id, icpsr_id, last_name, lis_id, maplight_id, middle_n...
list the official full names of all the legislators that served 13 district for 26 consecutive years.
legislator
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
Question: how many federalist representatives are there whose first names are benjamin? | Tables: current -> ballotpedia_id, bioguide_id, birthday_bio, cspan_id, fec_id, first_name, gender_bio, google_entity_id_id, govtrack_id, house_history_id, icpsr_id, last_name, lis_id, maplight_id, middle_name, nickname_name, offi...
how many federalist representatives are there whose first names are benjamin?
legislator
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
Question: how many female representatives served in the state of california for at least 10 years? | Tables: current -> ballotpedia_id, bioguide_id, birthday_bio, cspan_id, fec_id, first_name, gender_bio, google_entity_id_id, govtrack_id, house_history_id, icpsr_id, last_name, lis_id, maplight_id, middle_name, nickname...
how many female representatives served in the state of california for at least 10 years?
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
Question: what is the party of the oldest legislator? | Tables: current -> ballotpedia_id, bioguide_id, birthday_bio, cspan_id, fec_id, first_name, gender_bio, google_entity_id_id, govtrack_id, house_history_id, icpsr_id, last_name, lis_id, maplight_id, middle_name, nickname_name, official_full_name, opensecrets_id, re...
what is the party of the oldest legislator?
legislator
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'
Question: who is the lutheran representative that served in the state of ohio for 14 years before becoming a senator? | Tables: current -> ballotpedia_id, bioguide_id, birthday_bio, cspan_id, fec_id, first_name, gender_bio, google_entity_id_id, govtrack_id, house_history_id, icpsr_id, last_name, lis_id, maplight_id, mi...
who is the lutheran representative that served in the state of ohio for 14 years before becoming a senator?
legislator
select count(*) from current where strftime('%y', birthday_bio) > '1960' and google_entity_id_id is null
Question: among all the current legislators born after the year 1960, how many of them are not google entities? | Tables: current -> ballotpedia_id, bioguide_id, birthday_bio, cspan_id, fec_id, first_name, gender_bio, google_entity_id_id, govtrack_id, house_history_id, icpsr_id, last_name, lis_id, maplight_id, middle_n...
among all the current legislators born after the year 1960, how many of them are not google entities?
legislator
select official_full_name from current where house_history_id is not null
Question: please list the official full names of all the current legislators who have served in the u.s. house. | Tables: current -> ballotpedia_id, bioguide_id, birthday_bio, cspan_id, fec_id, first_name, gender_bio, google_entity_id_id, govtrack_id, house_history_id, icpsr_id, last_name, lis_id, maplight_id, middle_n...
please list the official full names of all the current legislators who have served in the u.s. house.
legislator
select count(*) from current where icpsr_id is not null and maplight_id is not null
Question: how many current legislators have both accounts on both voteview.com and maplight.org? | Tables: current -> ballotpedia_id, bioguide_id, birthday_bio, cspan_id, fec_id, first_name, gender_bio, google_entity_id_id, govtrack_id, house_history_id, icpsr_id, last_name, lis_id, maplight_id, middle_name, nickname_n...
how many current legislators have both accounts on both voteview.com and maplight.org?
legislator
select count(lis_id) from current where gender_bio = 'f' and lis_id is not null
Question: among all the current female legislators, how many of them have attended in senate roll call votes? | Tables: current -> ballotpedia_id, bioguide_id, birthday_bio, cspan_id, fec_id, first_name, gender_bio, google_entity_id_id, govtrack_id, house_history_id, icpsr_id, last_name, lis_id, maplight_id, middle_nam...
among all the current female legislators, how many of them have attended in senate roll call votes?
legislator
select religion_bio from current where official_full_name = 'sherrod brown'
Question: what is the religion of current legislator sherrod brown? | Tables: current -> ballotpedia_id, bioguide_id, birthday_bio, cspan_id, fec_id, first_name, gender_bio, google_entity_id_id, govtrack_id, house_history_id, icpsr_id, last_name, lis_id, maplight_id, middle_name, nickname_name, official_full_name, open...
what is the religion of current legislator sherrod brown?
legislator
select religion_bio from current group by religion_bio order by count(religion_bio) desc limit 1
Question: what is the religion with the most occurrrence of the current legislators? | Tables: current -> ballotpedia_id, bioguide_id, birthday_bio, cspan_id, fec_id, first_name, gender_bio, google_entity_id_id, govtrack_id, house_history_id, icpsr_id, last_name, lis_id, maplight_id, middle_name, nickname_name, officia...
what is the religion with the most occurrrence of the current legislators?
legislator
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'
Question: what is the current official instagram handle of current legislator bob corker? | Tables: current -> ballotpedia_id, bioguide_id, birthday_bio, cspan_id, fec_id, first_name, gender_bio, google_entity_id_id, govtrack_id, house_history_id, icpsr_id, last_name, lis_id, maplight_id, middle_name, nickname_name, of...
what is the current official instagram handle of current legislator bob corker?
legislator
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
Question: among the current legislators who have accounts on both http://thomas.gov, how many of them have accounts on instagram? | Tables: current -> ballotpedia_id, bioguide_id, birthday_bio, cspan_id, fec_id, first_name, gender_bio, google_entity_id_id, govtrack_id, house_history_id, icpsr_id, last_name, lis_id, map...
among the current legislators who have accounts on both http://thomas.gov, how many of them have accounts on instagram?
legislator
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
Question: please list the username of the current official facebook presence of all the current legislators that are famous or impact. | Tables: current -> ballotpedia_id, bioguide_id, birthday_bio, cspan_id, fec_id, first_name, gender_bio, google_entity_id_id, govtrack_id, house_history_id, icpsr_id, last_name, lis_id...
please list the username of the current official facebook presence of all the current legislators that are famous or impact.
legislator
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 )
Question: for how many terms have the oldest current legislator served? | Tables: current -> ballotpedia_id, bioguide_id, birthday_bio, cspan_id, fec_id, first_name, gender_bio, google_entity_id_id, govtrack_id, house_history_id, icpsr_id, last_name, lis_id, maplight_id, middle_name, nickname_name, official_full_name, ...
for how many terms have the oldest current legislator served?
legislator
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'
Question: what was current legislator sherrod brown's washington, d.c. office phone number during his term starting on 2013/1/3? | Tables: current -> ballotpedia_id, bioguide_id, birthday_bio, cspan_id, fec_id, first_name, gender_bio, google_entity_id_id, govtrack_id, house_history_id, icpsr_id, last_name, lis_id, mapl...
what was current legislator sherrod brown's washington, d.c. office phone number during his term starting on 2013/1/3?
legislator
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'
Question: current legislator sherrod brown has been in the democrat party during how many terms that he has served? | Tables: current -> ballotpedia_id, bioguide_id, birthday_bio, cspan_id, fec_id, first_name, gender_bio, google_entity_id_id, govtrack_id, house_history_id, icpsr_id, last_name, lis_id, maplight_id, midd...
current legislator sherrod brown has been in the democrat party during how many terms that he has served?
legislator
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'
Question: please list the full official names of all the current legislators who served the term that started on 2013/1/3. | Tables: current -> ballotpedia_id, bioguide_id, birthday_bio, cspan_id, fec_id, first_name, gender_bio, google_entity_id_id, govtrack_id, house_history_id, icpsr_id, last_name, lis_id, maplight_i...
please list the full official names of all the current legislators who served the term that started on 2013/1/3.
legislator
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'
Question: among the current legislators who served the term starting on 2013/1/3, how many of them are female? | Tables: current -> ballotpedia_id, bioguide_id, birthday_bio, cspan_id, fec_id, first_name, gender_bio, google_entity_id_id, govtrack_id, house_history_id, icpsr_id, last_name, lis_id, maplight_id, middle_na...
among the current legislators who served the term starting on 2013/1/3, how many of them are female?
legislator
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
Question: what is the full official name of the current legislator that has served for the most number of terms? | Tables: current -> ballotpedia_id, bioguide_id, birthday_bio, cspan_id, fec_id, first_name, gender_bio, google_entity_id_id, govtrack_id, house_history_id, icpsr_id, last_name, lis_id, maplight_id, middle_...
what is the full official name of the current legislator that has served for the most number of terms?
legislator
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
Question: for how many terms has current legislator sherrod brown served as a representative for district no.13? | Tables: current -> ballotpedia_id, bioguide_id, birthday_bio, cspan_id, fec_id, first_name, gender_bio, google_entity_id_id, govtrack_id, house_history_id, icpsr_id, last_name, lis_id, maplight_id, middle_...
for how many terms has current legislator sherrod brown served as a representative for district no.13?
legislator
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'
Question: what is the official full name of the current legislator whose current official facebook presence is 'senjoniernst'? | Tables: current -> ballotpedia_id, bioguide_id, birthday_bio, cspan_id, fec_id, first_name, gender_bio, google_entity_id_id, govtrack_id, house_history_id, icpsr_id, last_name, lis_id, maplig...
what is the official full name of the current legislator whose current official facebook presence is 'senjoniernst'?