Chinastark/bird_dataset huggingface dataset:
Database: legislator
Question: Which legislator has the YouTube channel 'RoskamIL06?' Write the official full name.
Evidence: YouTube channel 'RoskamIL06' refers to youtube = 'RoskamIL06';
SQL: SELECT T1.official_full_name FROM current AS T1 INNER JOIN `social-media` AS T2 ON T2.bioguide = T1.bioguide_id WHERE T2.youtube = 'RoskamIL06'
Database: legislator
Question: List the full names of 10 legislators who only have a Facebook account.
Evidence: full names refers to official_full_name; only have a Facebook account refers to youtube is NULL or youtube = '', instagram is NULL or instagram = '', twitter is NULL or twitter = '', facebook is not NULL and facebook = ''
SQL: SELECT T2.official_full_name FROM `social-media` AS T1 INNER JOIN current AS T2 ON T1.bioguide = T2.bioguide_id WHERE (T1.youtube IS NULL OR T1.youtube = '') AND (T1.instagram IS NULL OR T1.instagram = '') AND (T1.twitter IS NULL OR T1.twitter = '') AND T1.facebook IS NOT NULL AND T1.facebook != ''
Database: legislator
Question: Write the full names of junior ranked Republicans.
Evidence: full name refers to official_full_name; junior refers to state_rank = 'junior'; Republicans refers to party = 'Republican'
SQL: SELECT T1.official_full_name FROM current AS T1 INNER JOIN `current-terms` AS T2 ON T1.bioguide_id = T2.bioguide WHERE T2.party = 'Republican' AND T2.state_rank = 'junior' GROUP BY T1.official_full_name
Database: legislator
Question: What is the contact URL of Claire McCaskill?
Evidence: contact URL refers to contact_form; Claire McCaskill is an official_full_name
SQL: SELECT T2.contact_form FROM current AS T1 INNER JOIN `current-terms` AS T2 ON T1.bioguide_id = T2.bioguide WHERE T1.official_full_name = 'Claire McCaskill' GROUP BY T2.contact_form
Database: legislator
Question: Give the Wikipedia IDs of historical legislators who are Readjuster Democrats.
Evidence: Readjuster Democrats refers to party = 'Readjuster Democrat'
SQL: SELECT T2.wikipedia_id FROM `historical-terms` AS T1 INNER JOIN historical AS T2 ON T2.bioguide_id = T1.bioguide WHERE T1.party = 'Readjuster Democrat'
Database: legislator
Question: List the full names of Republican legislators who have a nickname.
Evidence: full names refers to official_full_name; Republican refers to party = 'Republican'; nickname refers to nickname_name
SQL: SELECT T1.official_full_name FROM current AS T1 INNER JOIN `current-terms` AS T2 ON T1.bioguide_id = T2.bioguide WHERE T2.party = 'Republican' AND T1.nickname_name IS NOT NULL GROUP BY T1.official_full_name
Database: legislator
Question: Which state did Veronica Grace Boland represent and which party is she affiliated?
Evidence: Veronica Grace Boland is a full name; full name refers to first_name, middle_name, last_name; party affiliated refers to party
SQL: SELECT T2.state, T2.party FROM historical AS T1 INNER JOIN `historical-terms` AS T2 ON T1.bioguide_id = T2.bioguide WHERE T1.first_name OR T1.middle_name OR T1.last_name = 'VeronicaGraceBoland'
Database: legislator
Question: How many historical legislators were born in 1973?
Evidence: born in 1973 refers to birthday_bio = 1973
SQL: SELECT COUNT(*) FROM historical WHERE CAST(birthday_bio AS date) = 1973
Database: legislator
Question: What is the ratio of males and females among historical legislators?
Evidence: male refers to gender_bio = 'M'; female refers to gender_bio = 'F'; calculation = DIVIDE(COUNT(gender_bio = 'M' THEN bioguide_id), COUNT(gender_bio = 'F' THEN bioguide_id))
SQL: 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
Database: legislator
Question: Among the legislators who will end in 2009, how many are from the Republican party?
Evidence: the legislators who will end in 2009 refers to END 2009; from the Republican party refers to party = 'Republican'
SQL: SELECT `END`, party FROM `current-terms` WHERE STRFTIME('%Y', `END`) = '2009' AND party = 'Republican'
Database: legislator
Question: List the official full names and genders of legislators who have Collins as their last name.
Evidence: genders refers to gender_bio; Collins is a last_name
SQL: SELECT official_full_name, gender_bio FROM current WHERE last_name = 'Collins'
Database: legislator
Question: How many percent of senators were from class 1?
Evidence: senator refers to type = 'sen'; class 1 refers to class = 1; calculation = MULTIPLY(DIVIDE(COUNT(class = 1 then bioguide), COUNT(bioguide)), 1.0)
SQL: SELECT CAST(SUM(CASE WHEN class = 1 THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(*) FROM `historical-terms` WHERE type = 'sen'
Database: legislator
Question: Provide the current legislators' official full names who are from the Independent party.
Evidence: Independent party refers to party = 'Independent'
SQL: 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
Database: legislator
Question: How many years had Jr. John Conyers served in total?
Evidence: Jr. John Conyers is an official_full_name; years served refers to SUM(SUBTRACT(END, start))
SQL: SELECT SUM(CAST(T2.END - T2.start AS DATE)) AS sum FROM current AS T1 INNER JOIN `current-terms` AS T2 ON T1.bioguide_id = T2.bioguide WHERE T1.official_full_name = 'John Conyers, Jr.'
Database: legislator
Question: How old was Jr. F. James Sensenbrenner when he first started as a legislator?
Evidence: Jr. F. James Sensenbrenner is an official_full_name; How old refers to SUBTRACT(MIN(start), birthday_bio)
SQL: SELECT CAST(MIN(T2.start) - T1.birthday_bio AS DATE) AS AGE FROM current AS T1 INNER JOIN `current-terms` AS T2 ON T1.bioguide_id = T2.bioguide WHERE T1.official_full_name = 'F. James Sensenbrenner, Jr.'
Database: legislator
Question: List the full names, religions, and parties of legislators who have served in Maine.
Evidence: full names refers to official_full_name; religion refers to religion_bio; Maine refers to state = "ME"
SQL: SELECT T1.official_full_name, T2.relation, T2.party FROM current AS T1 INNER JOIN `current-terms` AS T2 ON T1.bioguide_id = T2.bioguide WHERE T2.state = 'ME' GROUP BY T1.official_full_name, T2.relation, T2.party
Database: legislator
Question: Among legislators who have an Instagram account, list down their full names and nicknames who have a Thomas ID of less than 1000.
Evidence: have an Instagram account refers to instagram is not null; full names refers to official_full_name; nicknames refers to nickname_name; Thomas ID of less than 1000 refers to thomas_id < 1000;
SQL: SELECT T1.official_full_name, T1.nickname_name FROM current AS T1 INNER JOIN `social-media` AS T2 ON T2.bioguide = T1.bioguide_id WHERE T2.instagram IS NOT NULL AND T1.thomas_id < 1000
Database: legislator
Question: When was the last serving date of Matt Salmon?
Evidence: Matt Salmon is an official_full_name
SQL: SELECT T1.END FROM `historical-terms` AS T1 INNER JOIN historical AS T2 ON T2.bioguide_id = T1.bioguide WHERE T2.official_full_name = 'Matt Salmon'
Database: legislator
Question: Among the legislators who have served in the U.S. House, provide the party and the state of the legislators who were born in 1738.
Evidence: have served in the U.S. House refers to house_history_id IS NOT NULL; born in 1738 refers to birthday_bio = 1738
SQL: SELECT T1.party, T1.state FROM `historical-terms` AS T1 INNER JOIN historical AS T2 ON T2.bioguide_id = T1.bioguide WHERE T2.house_history_id IS NOT NULL AND T2.birthday_bio LIKE '%1738%'
Database: legislator
Question: List the IDs and full names of legislators from the Liberal Republican party.
Evidence: full_name refers to first_name, last_name; from the Liberal Republican party refers to party = 'Liberal Republican'
SQL: 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'
Database: legislator
Question: Among the legislators who started a term on 2nd December 1793, how many of them were males?
Evidence: started a term on 2nd December 1793 refers to start = '1793-12-02'; male refers to gender_bio = 'M'
SQL: 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'
Database: legislator
Question: Compare the number of legislators who started the term in 1875 and 2005.
Evidence: started the term in 1875 refers to start LIKE '1875%'; started the term in 2005 refers to start LIKE '2005%'
SQL: 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`
Database: legislator
Question: List the full names, Twitter IDs, and YouTube IDs of legislators who have Richard as their first name.
Evidence: full names refers to official_full_name; Richard as their first name refers to first_name = 'Richard'
SQL: 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'
Database: legislator
Question: Provide the start date, end date, and party of Pearl Peden Oldfield.
Evidence: start date refers to start; end date refers to end date; Pearl Peden Oldfield refers to official_full_name; official_full_name refers to first_name, middle_name, last_name
SQL: 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'
Database: legislator
Question: What is the birthday of Amy Klobuchar?
Evidence: birthday refers to birthday_bio; Amy Klobuchar refers to full name; full name refers to first_name, last_name
SQL: SELECT birthday_bio FROM current WHERE first_name = 'Amy' AND last_name = 'Klobuchar'
Database: legislator
Question: How many legislators have not been registered in Federal Election Commission data?
Evidence: have not been registered in Federal Election Commission data refers to fec_id is null OR fec_id = ''
SQL: SELECT COUNT(*) FROM current WHERE fec_id IS NULL OR fec_id = ''
Database: legislator
Question: State the number of female legislators in the list.
Evidence: female refers to gender_bio = 'F'
SQL: SELECT COUNT(*) FROM current WHERE gender_bio = 'F'
Database: legislator
Question: Give the full name of legislators who have accounts on OpenSecrets.org.
Evidence: full name refers to first_name, last_name; have accounts on OpenSecrets.org refers to opensecrets_id IS NOT NULL AND opensecrets_id <> ''
SQL: SELECT COUNT(*) FROM current WHERE opensecrets_id IS NOT NULL AND opensecrets_id <> ''
Database: legislator
Question: What is the middle name of the legislator whose birthday was on 8/24/1956?
Evidence: birthday was on 8/24/1956 refers to birthday_bio = '1956-08-24'
SQL: SELECT middle_name FROM current WHERE birthday_bio = '1956-08-24'
Database: legislator
Question: How many legislators hold the title "Majority Leader"?
SQL: SELECT COUNT(bioguide) FROM `current-terms` WHERE title = 'Majority Leader'
Database: legislator
Question: What is the title of legislator whose birthday on 2/20/1942?
Evidence: birthday on 2/20/1942 refers to birthday_bio = '1942-02-20'
SQL: 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
Database: legislator
Question: What is the gender of the legislator whose address at 317 Russell Senate Office Building Washington DC 20510?
Evidence: gender refers to gender_bio
SQL: 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'
Database: legislator
Question: List out the first name of legislators who are senior Senator.
Evidence: senior refers to state_rank = 'senior'; only senator has this value 'senior'
SQL: 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
Database: legislator
Question: Among male legislators, state number of the legislators who are not the senator.
Evidence: male refers to gender_bio = M; not the senator refers to class IS NULL OR class = ''
SQL: 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
Database: legislator
Question: Calculate the percentage of legislators who are Senator and were born in 1964.
Evidence: are senator refers to class IS NOT NULL; born in 1964 refers to birthday_bio = 1964; calculation = MULTIPLY(DIVIDE(COUNT(class IS NOT NULL THEN bioguide_id), COUNT(bioguide_id)), 1.0)
SQL: 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%'
Database: legislator
Question: Calculate the percentage of legislators who are not Senator and were born before 1975.
Evidence: not Senator refers to class is NULL; born before 1975 refers to birthday_bio < = 1975; calculation = MULTIPLY(DIVIDE(COUNT(class IS NULL THEN bioguide_id), COUNT(bioguide_id)), 1.0)
SQL: 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
Database: legislator
Question: What is the twitter name of the legislator whose birthday was on 5/27/1946?
Evidence: birthday on 5/27/1946 refers to birthday_bio = '1946-05-27'
SQL: 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'
Database: legislator
Question: State the opensecrets_id of the legislator whose YouTube name is Bluetkemeyer.
Evidence: Bluetkemeyer refers to youtube
SQL: SELECT T1.opensecrets_id FROM current AS T1 INNER JOIN `social-media` AS T2 ON T2.bioguide = T1.bioguide_id WHERE T2.youtube = 'BLuetkemeyer'
Database: legislator
Question: Mention the username of Facebook of Ralph Abraham.
Evidence: username of Facebook refers to facebook; Ralph Abraham is an official_full_name; official_full_name refers to first_name, last_name
SQL: 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'
Database: legislator
Question: What is the first name of the legislator whose address at 1005 Longworth HOB; Washington DC 20515-1408?
SQL: 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
Database: legislator
Question: What is the Instagram name of the legislator whose birthday was on 8/24/1952?
Evidence: Instagram name refers to instagram; birthday on 8/24/1952 refers to birthday_bio = '1952-08-24'
SQL: 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'
Database: legislator
Question: State number of legislators who are not the senator among female legislators.
Evidence: not the senator refers to class IS NULL OR class = ''; female refers to gender_bio = 'F';
SQL: 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 = '')
Database: legislator
Question: Give the religion of the legislator whose YouTube name is MaxineWaters.
Evidence: MaxineWaters relates to youtube
SQL: SELECT T2.religion_bio FROM `social-media` AS T1 INNER JOIN current AS T2 ON T1.bioguide = T2.bioguide_id WHERE T1.youtube = 'MaxineWaters'
Database: legislator
Question: How many minority leaders have not been registered in Federal Election Commission data?
Evidence: minority leaders is a title; have not been registered in Federal Election Commission data refers to fec_id IS NULL OR fec_id = ''
SQL: 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 = '')
Database: legislator
Question: How many of the legislators are male?
Evidence: male refers to gender_bio = 'M';
SQL: SELECT COUNT(*) FROM current WHERE gender_bio = 'M'
Database: legislator
Question: What is the total number of legislators with "John" as their first name?
SQL: SELECT COUNT(*) FROM current WHERE first_name = 'John'
Database: legislator
Question: List the full name of legislators whose born in 1960.
Evidence: full name refers to official_full_name; born in 1960 refers to birthday_bio like '1960%';
SQL: SELECT official_full_name FROM current WHERE birthday_bio LIKE '1960%'
Database: legislator
Question: Who is the Pro-Administration senator that runs from March 4, 1789 to December 31, 1791?
Evidence: Pro-Administration refers to party = 'Pro-Administration'; senator refers to type = 'sen'; runs from March 4, 1789 refers to start = '1789-03-04'; runs to refers to end = '1791-12-31';
SQL: 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'
Database: legislator
Question: What are the first and last name of the representatives of the house in district 9?
Evidence: representatives refers to type = 'rep';
SQL: 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
Database: legislator
Question: Give the full name of the legislators with an independent party.
Evidence: full name refers to official_full_name;
SQL: 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
Database: legislator
Question: List down the open secrets and thomas ID of the democrat senators of New Jersey.
Evidence: open secrets refers to opensecrets_id; democrat refers to party = democrat; senators refers to type = 'sen'; New Jersey refers to state = 'NJ';
SQL: 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
Database: legislator
Question: Provide the google entity ID of the senators in New York.
Evidence: google entity ID refers to google_entity_id_id; senators refers to type = 'sen'; New York refers to state = 'NY';
SQL: 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'
Database: legislator
Question: Give the religion of the legislator with RSS url of http://www.corker.senate.gov/public/index.cfm/rss/feed.
Evidence: religion refers to religion_bio;
SQL: 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
Database: legislator
Question: What is the party of the legislator named Susan M. Collins?
Evidence: legislator's name refers to offical_full_name;
SQL: 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
Database: legislator
Question: List down the district number of the representative of the house named Jonathan Grout.
Evidence: district number refers to district; representative of the house refers to type = 'rep';
SQL: 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'
Database: legislator
Question: What is the party and state of the legislator that has an open secrets ID of N00003689 and thomas ID of 186?
SQL: 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
Database: legislator
Question: Provide the full name and birth date of the legislator with a contact form of http://www.brown.senate.gov/contact/.
Evidence: full name refers to official_full_name; birth date refers to birthday_bio;
SQL: 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/'
Database: legislator
Question: Give the state and type of term of the legislator with the google entity ID of kg:/m/02pyzk.
Evidence: type of term refers to type; google entity ID refers to google_entity_id_id; google_entity_id_id = 'kg:/m/02pyzk';
SQL: 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'
Database: legislator
Question: Provide the type and end date of the term of the legislator named John Vining.
Evidence: end date of the term refers to end;
SQL: 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'
Database: legislator
Question: Find the difference between the number of female senators and representatives born between 1930 to 1970.
Evidence: difference = SUBTRACT(SUM(type = 'sen' WHERE gender_bio = 'F' AND strftime('%Y', birthday_bio) between '1930' and '1970'), SUM(type = 'rep' WHERE gender_bio = 'F' AND strftime('%Y', birthday_bio) between '1930' and '1970')); female refers to gender_bio = 'F'; senators refers to type = 'sen'; representatives refers to type = 'rep'; born between 1930 to 1970 strftime('%Y', birthday_bio) between '1930' and '1970';
SQL: 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'
Database: legislator
Question: Among the male legislators born between 1955 to 1965, what is the percentage of the legislators with an independent party?
Evidence: male refers to gender_bio = 'M'; born between 1955 to 1965 refers to strftime('%Y', birthday_bio) between '1955' and '1965'; percentage = MULTIPLY(DIVIDE(SUM(party = 'Independent' WHERE gender_bio = 'M' AND strftime('%Y', birthday_bio) between '1955' and '1965'), COUNT(party WHERE gender_bio = 'M' AND strftime('%Y', birthday_bio) between '1955' and '1965')), 100.0);
SQL: 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'
Database: legislator
Question: What is the name of the legislator with the ID of W000059?
Evidence: name of the legislator = first_name, last_name; ID of W000059 refers to bioguide_id = 'W000059';
SQL: SELECT first_name, last_name FROM historical WHERE bioguide_id = 'W000059'
Database: legislator
Question: Does Thomas Carnes have an account on ballotpedia.org?
Evidence: if first_name = 'Thomas' and last_name = 'Carnes' AND ballotpedia_id is null then Thomas Carnes doesn't have an account on ballotpedia.org; if first_name = 'Thomas' and last_name = 'Carnes' AND ballotpedia_id is NOT null then Thomas Carnes have an account on ballotpedia.org;
SQL: 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'