db_id
stringclasses 69
values | question
stringlengths 24
325
| evidence
stringlengths 1
673
⌀ | SQL
stringlengths 23
804
| schema
stringclasses 69
values |
|---|---|---|---|---|
legislator
|
List the IDs and full names of legislators from the Liberal Republican party.
|
full_name refers to first_name, last_name; from the Liberal Republican party refers to party = 'Liberal Republican'
|
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 name:db_id legislator
current table current Cols: ballotpedia id dtype text, bioguide id dtype text, birthday bio dtype date, cspan id dtype real, fec id dtype text, first name dtype text, gender bio dtype text, google entity id dtype text, govtrack id dtype integer, house history id dtype real, interuniversity consortium for political and social research id dtype real, last name dtype text, legislator id dtype text, maplight id dtype real, middle name dtype text, nickname dtype text, official full name dtype text, opensecrets id dtype text, religion bio dtype text, suffix name dtype text, thomas id dtype integer, votesmart id dtype real, wikidata id dtype text, wikipedia id dtype text,
current-terms table current-terms Cols: address dtype text, bioguide id dtype text, caucus dtype text, chamber dtype text, class dtype real, contact_form dtype text, district dtype real, end dtype text, fax dtype text, last dtype text, name dtype text, office dtype text, party dtype text, party affiliations dtype text, phone dtype text, relation dtype text, Really Simple Syndication URL dtype text, start dtype text, state dtype text, state_rank dtype text, title dtype text, type dtype text, url dtype text,
historical table historical Cols: ballotpedia id dtype text, bioguide id dtype text, bioguide previous id dtype text, birthday bio dtype text, cspan id dtype text, fec id dtype text, first name dtype text, gender bio dtype text, google entity id dtype text, govtrack id dtype integer, house history alternate id dtype text, house history id dtype real, interuniversity consortium for political and social research id dtype real, last name dtype text, legislator id dtype text, maplight id dtype text, middle name dtype text, nickname dtype text, official full name dtype text, opensecrets id dtype text, religion bio dtype text, suffix name dtype text, thomas id dtype text, votesmart id dtype text, wikidata id dtype text, wikipedia id dtype text,
historical-terms table historical-terms Cols: address dtype text, bioguide id dtype text, chamber dtype text, class dtype real, contact_form dtype text, district dtype real, end dtype text, fax dtype text, last dtype text, middle dtype text, name dtype text, office dtype text, party dtype text, party affiliations dtype text, phone dtype text, relation dtype text, Really Simple Syndication URL dtype text, start dtype text, state dtype text, state_rank dtype text, title dtype text, type dtype text, url dtype text,
social-media table social-media Cols: bioguide dtype text, facebook dtype text, facebook_id dtype real, govtrack dtype real, instagram dtype text, instagram_id dtype real, thomas dtype integer, twitter dtype text, twitter_id dtype real, youtube dtype text, youtube_id dtype text,
|
legislator
|
Among the legislators who started a term on 2nd December 1793, how many of them were males?
|
started a term on 2nd December 1793 refers to start = '1793-12-02'; male refers to gender_bio = 'M'
|
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 name:db_id legislator
current table current Cols: ballotpedia id dtype text, bioguide id dtype text, birthday bio dtype date, cspan id dtype real, fec id dtype text, first name dtype text, gender bio dtype text, google entity id dtype text, govtrack id dtype integer, house history id dtype real, interuniversity consortium for political and social research id dtype real, last name dtype text, legislator id dtype text, maplight id dtype real, middle name dtype text, nickname dtype text, official full name dtype text, opensecrets id dtype text, religion bio dtype text, suffix name dtype text, thomas id dtype integer, votesmart id dtype real, wikidata id dtype text, wikipedia id dtype text,
current-terms table current-terms Cols: address dtype text, bioguide id dtype text, caucus dtype text, chamber dtype text, class dtype real, contact_form dtype text, district dtype real, end dtype text, fax dtype text, last dtype text, name dtype text, office dtype text, party dtype text, party affiliations dtype text, phone dtype text, relation dtype text, Really Simple Syndication URL dtype text, start dtype text, state dtype text, state_rank dtype text, title dtype text, type dtype text, url dtype text,
historical table historical Cols: ballotpedia id dtype text, bioguide id dtype text, bioguide previous id dtype text, birthday bio dtype text, cspan id dtype text, fec id dtype text, first name dtype text, gender bio dtype text, google entity id dtype text, govtrack id dtype integer, house history alternate id dtype text, house history id dtype real, interuniversity consortium for political and social research id dtype real, last name dtype text, legislator id dtype text, maplight id dtype text, middle name dtype text, nickname dtype text, official full name dtype text, opensecrets id dtype text, religion bio dtype text, suffix name dtype text, thomas id dtype text, votesmart id dtype text, wikidata id dtype text, wikipedia id dtype text,
historical-terms table historical-terms Cols: address dtype text, bioguide id dtype text, chamber dtype text, class dtype real, contact_form dtype text, district dtype real, end dtype text, fax dtype text, last dtype text, middle dtype text, name dtype text, office dtype text, party dtype text, party affiliations dtype text, phone dtype text, relation dtype text, Really Simple Syndication URL dtype text, start dtype text, state dtype text, state_rank dtype text, title dtype text, type dtype text, url dtype text,
social-media table social-media Cols: bioguide dtype text, facebook dtype text, facebook_id dtype real, govtrack dtype real, instagram dtype text, instagram_id dtype real, thomas dtype integer, twitter dtype text, twitter_id dtype real, youtube dtype text, youtube_id dtype text,
|
legislator
|
Compare the number of legislators who started the term in 1875 and 2005.
|
started the term in 1875 refers to start LIKE '1875%'; started the term in 2005 refers to start LIKE '2005%'
|
SELECT SUM(CASE WHEN `current-terms`.start LIKE '2005%' THEN 1 ELSE 0 END) - ( SELECT SUM(CASE WHEN start LIKE '1875%' THEN 1 ELSE 0 END) FROM `historical-terms` ) FROM `current-terms`
|
database name:db_id legislator
current table current Cols: ballotpedia id dtype text, bioguide id dtype text, birthday bio dtype date, cspan id dtype real, fec id dtype text, first name dtype text, gender bio dtype text, google entity id dtype text, govtrack id dtype integer, house history id dtype real, interuniversity consortium for political and social research id dtype real, last name dtype text, legislator id dtype text, maplight id dtype real, middle name dtype text, nickname dtype text, official full name dtype text, opensecrets id dtype text, religion bio dtype text, suffix name dtype text, thomas id dtype integer, votesmart id dtype real, wikidata id dtype text, wikipedia id dtype text,
current-terms table current-terms Cols: address dtype text, bioguide id dtype text, caucus dtype text, chamber dtype text, class dtype real, contact_form dtype text, district dtype real, end dtype text, fax dtype text, last dtype text, name dtype text, office dtype text, party dtype text, party affiliations dtype text, phone dtype text, relation dtype text, Really Simple Syndication URL dtype text, start dtype text, state dtype text, state_rank dtype text, title dtype text, type dtype text, url dtype text,
historical table historical Cols: ballotpedia id dtype text, bioguide id dtype text, bioguide previous id dtype text, birthday bio dtype text, cspan id dtype text, fec id dtype text, first name dtype text, gender bio dtype text, google entity id dtype text, govtrack id dtype integer, house history alternate id dtype text, house history id dtype real, interuniversity consortium for political and social research id dtype real, last name dtype text, legislator id dtype text, maplight id dtype text, middle name dtype text, nickname dtype text, official full name dtype text, opensecrets id dtype text, religion bio dtype text, suffix name dtype text, thomas id dtype text, votesmart id dtype text, wikidata id dtype text, wikipedia id dtype text,
historical-terms table historical-terms Cols: address dtype text, bioguide id dtype text, chamber dtype text, class dtype real, contact_form dtype text, district dtype real, end dtype text, fax dtype text, last dtype text, middle dtype text, name dtype text, office dtype text, party dtype text, party affiliations dtype text, phone dtype text, relation dtype text, Really Simple Syndication URL dtype text, start dtype text, state dtype text, state_rank dtype text, title dtype text, type dtype text, url dtype text,
social-media table social-media Cols: bioguide dtype text, facebook dtype text, facebook_id dtype real, govtrack dtype real, instagram dtype text, instagram_id dtype real, thomas dtype integer, twitter dtype text, twitter_id dtype real, youtube dtype text, youtube_id dtype text,
|
legislator
|
List the full names, Twitter IDs, and YouTube IDs of legislators who have Richard as their first name.
|
full names refers to official_full_name; Richard as their first name refers to first_name = 'Richard'
|
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 name:db_id legislator
current table current Cols: ballotpedia id dtype text, bioguide id dtype text, birthday bio dtype date, cspan id dtype real, fec id dtype text, first name dtype text, gender bio dtype text, google entity id dtype text, govtrack id dtype integer, house history id dtype real, interuniversity consortium for political and social research id dtype real, last name dtype text, legislator id dtype text, maplight id dtype real, middle name dtype text, nickname dtype text, official full name dtype text, opensecrets id dtype text, religion bio dtype text, suffix name dtype text, thomas id dtype integer, votesmart id dtype real, wikidata id dtype text, wikipedia id dtype text,
current-terms table current-terms Cols: address dtype text, bioguide id dtype text, caucus dtype text, chamber dtype text, class dtype real, contact_form dtype text, district dtype real, end dtype text, fax dtype text, last dtype text, name dtype text, office dtype text, party dtype text, party affiliations dtype text, phone dtype text, relation dtype text, Really Simple Syndication URL dtype text, start dtype text, state dtype text, state_rank dtype text, title dtype text, type dtype text, url dtype text,
historical table historical Cols: ballotpedia id dtype text, bioguide id dtype text, bioguide previous id dtype text, birthday bio dtype text, cspan id dtype text, fec id dtype text, first name dtype text, gender bio dtype text, google entity id dtype text, govtrack id dtype integer, house history alternate id dtype text, house history id dtype real, interuniversity consortium for political and social research id dtype real, last name dtype text, legislator id dtype text, maplight id dtype text, middle name dtype text, nickname dtype text, official full name dtype text, opensecrets id dtype text, religion bio dtype text, suffix name dtype text, thomas id dtype text, votesmart id dtype text, wikidata id dtype text, wikipedia id dtype text,
historical-terms table historical-terms Cols: address dtype text, bioguide id dtype text, chamber dtype text, class dtype real, contact_form dtype text, district dtype real, end dtype text, fax dtype text, last dtype text, middle dtype text, name dtype text, office dtype text, party dtype text, party affiliations dtype text, phone dtype text, relation dtype text, Really Simple Syndication URL dtype text, start dtype text, state dtype text, state_rank dtype text, title dtype text, type dtype text, url dtype text,
social-media table social-media Cols: bioguide dtype text, facebook dtype text, facebook_id dtype real, govtrack dtype real, instagram dtype text, instagram_id dtype real, thomas dtype integer, twitter dtype text, twitter_id dtype real, youtube dtype text, youtube_id dtype text,
|
legislator
|
Provide the start date, end date, and party of Pearl Peden Oldfield.
|
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
|
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 name:db_id legislator
current table current Cols: ballotpedia id dtype text, bioguide id dtype text, birthday bio dtype date, cspan id dtype real, fec id dtype text, first name dtype text, gender bio dtype text, google entity id dtype text, govtrack id dtype integer, house history id dtype real, interuniversity consortium for political and social research id dtype real, last name dtype text, legislator id dtype text, maplight id dtype real, middle name dtype text, nickname dtype text, official full name dtype text, opensecrets id dtype text, religion bio dtype text, suffix name dtype text, thomas id dtype integer, votesmart id dtype real, wikidata id dtype text, wikipedia id dtype text,
current-terms table current-terms Cols: address dtype text, bioguide id dtype text, caucus dtype text, chamber dtype text, class dtype real, contact_form dtype text, district dtype real, end dtype text, fax dtype text, last dtype text, name dtype text, office dtype text, party dtype text, party affiliations dtype text, phone dtype text, relation dtype text, Really Simple Syndication URL dtype text, start dtype text, state dtype text, state_rank dtype text, title dtype text, type dtype text, url dtype text,
historical table historical Cols: ballotpedia id dtype text, bioguide id dtype text, bioguide previous id dtype text, birthday bio dtype text, cspan id dtype text, fec id dtype text, first name dtype text, gender bio dtype text, google entity id dtype text, govtrack id dtype integer, house history alternate id dtype text, house history id dtype real, interuniversity consortium for political and social research id dtype real, last name dtype text, legislator id dtype text, maplight id dtype text, middle name dtype text, nickname dtype text, official full name dtype text, opensecrets id dtype text, religion bio dtype text, suffix name dtype text, thomas id dtype text, votesmart id dtype text, wikidata id dtype text, wikipedia id dtype text,
historical-terms table historical-terms Cols: address dtype text, bioguide id dtype text, chamber dtype text, class dtype real, contact_form dtype text, district dtype real, end dtype text, fax dtype text, last dtype text, middle dtype text, name dtype text, office dtype text, party dtype text, party affiliations dtype text, phone dtype text, relation dtype text, Really Simple Syndication URL dtype text, start dtype text, state dtype text, state_rank dtype text, title dtype text, type dtype text, url dtype text,
social-media table social-media Cols: bioguide dtype text, facebook dtype text, facebook_id dtype real, govtrack dtype real, instagram dtype text, instagram_id dtype real, thomas dtype integer, twitter dtype text, twitter_id dtype real, youtube dtype text, youtube_id dtype text,
|
legislator
|
What is the birthday of Amy Klobuchar?
|
birthday refers to birthday_bio; Amy Klobuchar refers to full name; full name refers to first_name, last_name
|
SELECT birthday_bio FROM current WHERE first_name = 'Amy' AND last_name = 'Klobuchar'
|
database name:db_id legislator
current table current Cols: ballotpedia id dtype text, bioguide id dtype text, birthday bio dtype date, cspan id dtype real, fec id dtype text, first name dtype text, gender bio dtype text, google entity id dtype text, govtrack id dtype integer, house history id dtype real, interuniversity consortium for political and social research id dtype real, last name dtype text, legislator id dtype text, maplight id dtype real, middle name dtype text, nickname dtype text, official full name dtype text, opensecrets id dtype text, religion bio dtype text, suffix name dtype text, thomas id dtype integer, votesmart id dtype real, wikidata id dtype text, wikipedia id dtype text,
current-terms table current-terms Cols: address dtype text, bioguide id dtype text, caucus dtype text, chamber dtype text, class dtype real, contact_form dtype text, district dtype real, end dtype text, fax dtype text, last dtype text, name dtype text, office dtype text, party dtype text, party affiliations dtype text, phone dtype text, relation dtype text, Really Simple Syndication URL dtype text, start dtype text, state dtype text, state_rank dtype text, title dtype text, type dtype text, url dtype text,
historical table historical Cols: ballotpedia id dtype text, bioguide id dtype text, bioguide previous id dtype text, birthday bio dtype text, cspan id dtype text, fec id dtype text, first name dtype text, gender bio dtype text, google entity id dtype text, govtrack id dtype integer, house history alternate id dtype text, house history id dtype real, interuniversity consortium for political and social research id dtype real, last name dtype text, legislator id dtype text, maplight id dtype text, middle name dtype text, nickname dtype text, official full name dtype text, opensecrets id dtype text, religion bio dtype text, suffix name dtype text, thomas id dtype text, votesmart id dtype text, wikidata id dtype text, wikipedia id dtype text,
historical-terms table historical-terms Cols: address dtype text, bioguide id dtype text, chamber dtype text, class dtype real, contact_form dtype text, district dtype real, end dtype text, fax dtype text, last dtype text, middle dtype text, name dtype text, office dtype text, party dtype text, party affiliations dtype text, phone dtype text, relation dtype text, Really Simple Syndication URL dtype text, start dtype text, state dtype text, state_rank dtype text, title dtype text, type dtype text, url dtype text,
social-media table social-media Cols: bioguide dtype text, facebook dtype text, facebook_id dtype real, govtrack dtype real, instagram dtype text, instagram_id dtype real, thomas dtype integer, twitter dtype text, twitter_id dtype real, youtube dtype text, youtube_id dtype text,
|
legislator
|
How many legislators have not been registered in Federal Election Commission data?
|
have not been registered in Federal Election Commission data refers to fec_id is null OR fec_id = ''
|
SELECT COUNT(*) FROM current WHERE fec_id IS NULL OR fec_id = ''
|
database name:db_id legislator
current table current Cols: ballotpedia id dtype text, bioguide id dtype text, birthday bio dtype date, cspan id dtype real, fec id dtype text, first name dtype text, gender bio dtype text, google entity id dtype text, govtrack id dtype integer, house history id dtype real, interuniversity consortium for political and social research id dtype real, last name dtype text, legislator id dtype text, maplight id dtype real, middle name dtype text, nickname dtype text, official full name dtype text, opensecrets id dtype text, religion bio dtype text, suffix name dtype text, thomas id dtype integer, votesmart id dtype real, wikidata id dtype text, wikipedia id dtype text,
current-terms table current-terms Cols: address dtype text, bioguide id dtype text, caucus dtype text, chamber dtype text, class dtype real, contact_form dtype text, district dtype real, end dtype text, fax dtype text, last dtype text, name dtype text, office dtype text, party dtype text, party affiliations dtype text, phone dtype text, relation dtype text, Really Simple Syndication URL dtype text, start dtype text, state dtype text, state_rank dtype text, title dtype text, type dtype text, url dtype text,
historical table historical Cols: ballotpedia id dtype text, bioguide id dtype text, bioguide previous id dtype text, birthday bio dtype text, cspan id dtype text, fec id dtype text, first name dtype text, gender bio dtype text, google entity id dtype text, govtrack id dtype integer, house history alternate id dtype text, house history id dtype real, interuniversity consortium for political and social research id dtype real, last name dtype text, legislator id dtype text, maplight id dtype text, middle name dtype text, nickname dtype text, official full name dtype text, opensecrets id dtype text, religion bio dtype text, suffix name dtype text, thomas id dtype text, votesmart id dtype text, wikidata id dtype text, wikipedia id dtype text,
historical-terms table historical-terms Cols: address dtype text, bioguide id dtype text, chamber dtype text, class dtype real, contact_form dtype text, district dtype real, end dtype text, fax dtype text, last dtype text, middle dtype text, name dtype text, office dtype text, party dtype text, party affiliations dtype text, phone dtype text, relation dtype text, Really Simple Syndication URL dtype text, start dtype text, state dtype text, state_rank dtype text, title dtype text, type dtype text, url dtype text,
social-media table social-media Cols: bioguide dtype text, facebook dtype text, facebook_id dtype real, govtrack dtype real, instagram dtype text, instagram_id dtype real, thomas dtype integer, twitter dtype text, twitter_id dtype real, youtube dtype text, youtube_id dtype text,
|
legislator
|
State the number of female legislators in the list.
|
female refers to gender_bio = 'F'
|
SELECT COUNT(*) FROM current WHERE gender_bio = 'F'
|
database name:db_id legislator
current table current Cols: ballotpedia id dtype text, bioguide id dtype text, birthday bio dtype date, cspan id dtype real, fec id dtype text, first name dtype text, gender bio dtype text, google entity id dtype text, govtrack id dtype integer, house history id dtype real, interuniversity consortium for political and social research id dtype real, last name dtype text, legislator id dtype text, maplight id dtype real, middle name dtype text, nickname dtype text, official full name dtype text, opensecrets id dtype text, religion bio dtype text, suffix name dtype text, thomas id dtype integer, votesmart id dtype real, wikidata id dtype text, wikipedia id dtype text,
current-terms table current-terms Cols: address dtype text, bioguide id dtype text, caucus dtype text, chamber dtype text, class dtype real, contact_form dtype text, district dtype real, end dtype text, fax dtype text, last dtype text, name dtype text, office dtype text, party dtype text, party affiliations dtype text, phone dtype text, relation dtype text, Really Simple Syndication URL dtype text, start dtype text, state dtype text, state_rank dtype text, title dtype text, type dtype text, url dtype text,
historical table historical Cols: ballotpedia id dtype text, bioguide id dtype text, bioguide previous id dtype text, birthday bio dtype text, cspan id dtype text, fec id dtype text, first name dtype text, gender bio dtype text, google entity id dtype text, govtrack id dtype integer, house history alternate id dtype text, house history id dtype real, interuniversity consortium for political and social research id dtype real, last name dtype text, legislator id dtype text, maplight id dtype text, middle name dtype text, nickname dtype text, official full name dtype text, opensecrets id dtype text, religion bio dtype text, suffix name dtype text, thomas id dtype text, votesmart id dtype text, wikidata id dtype text, wikipedia id dtype text,
historical-terms table historical-terms Cols: address dtype text, bioguide id dtype text, chamber dtype text, class dtype real, contact_form dtype text, district dtype real, end dtype text, fax dtype text, last dtype text, middle dtype text, name dtype text, office dtype text, party dtype text, party affiliations dtype text, phone dtype text, relation dtype text, Really Simple Syndication URL dtype text, start dtype text, state dtype text, state_rank dtype text, title dtype text, type dtype text, url dtype text,
social-media table social-media Cols: bioguide dtype text, facebook dtype text, facebook_id dtype real, govtrack dtype real, instagram dtype text, instagram_id dtype real, thomas dtype integer, twitter dtype text, twitter_id dtype real, youtube dtype text, youtube_id dtype text,
|
legislator
|
Give the full name of legislators who have accounts on OpenSecrets.org.
|
full name refers to first_name, last_name; have accounts on OpenSecrets.org refers to opensecrets_id IS NOT NULL AND opensecrets_id <> ''
|
SELECT COUNT(*) FROM current WHERE opensecrets_id IS NOT NULL AND opensecrets_id <> ''
|
database name:db_id legislator
current table current Cols: ballotpedia id dtype text, bioguide id dtype text, birthday bio dtype date, cspan id dtype real, fec id dtype text, first name dtype text, gender bio dtype text, google entity id dtype text, govtrack id dtype integer, house history id dtype real, interuniversity consortium for political and social research id dtype real, last name dtype text, legislator id dtype text, maplight id dtype real, middle name dtype text, nickname dtype text, official full name dtype text, opensecrets id dtype text, religion bio dtype text, suffix name dtype text, thomas id dtype integer, votesmart id dtype real, wikidata id dtype text, wikipedia id dtype text,
current-terms table current-terms Cols: address dtype text, bioguide id dtype text, caucus dtype text, chamber dtype text, class dtype real, contact_form dtype text, district dtype real, end dtype text, fax dtype text, last dtype text, name dtype text, office dtype text, party dtype text, party affiliations dtype text, phone dtype text, relation dtype text, Really Simple Syndication URL dtype text, start dtype text, state dtype text, state_rank dtype text, title dtype text, type dtype text, url dtype text,
historical table historical Cols: ballotpedia id dtype text, bioguide id dtype text, bioguide previous id dtype text, birthday bio dtype text, cspan id dtype text, fec id dtype text, first name dtype text, gender bio dtype text, google entity id dtype text, govtrack id dtype integer, house history alternate id dtype text, house history id dtype real, interuniversity consortium for political and social research id dtype real, last name dtype text, legislator id dtype text, maplight id dtype text, middle name dtype text, nickname dtype text, official full name dtype text, opensecrets id dtype text, religion bio dtype text, suffix name dtype text, thomas id dtype text, votesmart id dtype text, wikidata id dtype text, wikipedia id dtype text,
historical-terms table historical-terms Cols: address dtype text, bioguide id dtype text, chamber dtype text, class dtype real, contact_form dtype text, district dtype real, end dtype text, fax dtype text, last dtype text, middle dtype text, name dtype text, office dtype text, party dtype text, party affiliations dtype text, phone dtype text, relation dtype text, Really Simple Syndication URL dtype text, start dtype text, state dtype text, state_rank dtype text, title dtype text, type dtype text, url dtype text,
social-media table social-media Cols: bioguide dtype text, facebook dtype text, facebook_id dtype real, govtrack dtype real, instagram dtype text, instagram_id dtype real, thomas dtype integer, twitter dtype text, twitter_id dtype real, youtube dtype text, youtube_id dtype text,
|
legislator
|
What is the middle name of the legislator whose birthday was on 8/24/1956?
|
birthday was on 8/24/1956 refers to birthday_bio = '1956-08-24'
|
SELECT middle_name FROM current WHERE birthday_bio = '1956-08-24'
|
database name:db_id legislator
current table current Cols: ballotpedia id dtype text, bioguide id dtype text, birthday bio dtype date, cspan id dtype real, fec id dtype text, first name dtype text, gender bio dtype text, google entity id dtype text, govtrack id dtype integer, house history id dtype real, interuniversity consortium for political and social research id dtype real, last name dtype text, legislator id dtype text, maplight id dtype real, middle name dtype text, nickname dtype text, official full name dtype text, opensecrets id dtype text, religion bio dtype text, suffix name dtype text, thomas id dtype integer, votesmart id dtype real, wikidata id dtype text, wikipedia id dtype text,
current-terms table current-terms Cols: address dtype text, bioguide id dtype text, caucus dtype text, chamber dtype text, class dtype real, contact_form dtype text, district dtype real, end dtype text, fax dtype text, last dtype text, name dtype text, office dtype text, party dtype text, party affiliations dtype text, phone dtype text, relation dtype text, Really Simple Syndication URL dtype text, start dtype text, state dtype text, state_rank dtype text, title dtype text, type dtype text, url dtype text,
historical table historical Cols: ballotpedia id dtype text, bioguide id dtype text, bioguide previous id dtype text, birthday bio dtype text, cspan id dtype text, fec id dtype text, first name dtype text, gender bio dtype text, google entity id dtype text, govtrack id dtype integer, house history alternate id dtype text, house history id dtype real, interuniversity consortium for political and social research id dtype real, last name dtype text, legislator id dtype text, maplight id dtype text, middle name dtype text, nickname dtype text, official full name dtype text, opensecrets id dtype text, religion bio dtype text, suffix name dtype text, thomas id dtype text, votesmart id dtype text, wikidata id dtype text, wikipedia id dtype text,
historical-terms table historical-terms Cols: address dtype text, bioguide id dtype text, chamber dtype text, class dtype real, contact_form dtype text, district dtype real, end dtype text, fax dtype text, last dtype text, middle dtype text, name dtype text, office dtype text, party dtype text, party affiliations dtype text, phone dtype text, relation dtype text, Really Simple Syndication URL dtype text, start dtype text, state dtype text, state_rank dtype text, title dtype text, type dtype text, url dtype text,
social-media table social-media Cols: bioguide dtype text, facebook dtype text, facebook_id dtype real, govtrack dtype real, instagram dtype text, instagram_id dtype real, thomas dtype integer, twitter dtype text, twitter_id dtype real, youtube dtype text, youtube_id dtype text,
|
legislator
|
How many legislators hold the title "Majority Leader"?
| null |
SELECT COUNT(bioguide) FROM `current-terms` WHERE title = 'Majority Leader'
|
database name:db_id legislator
current table current Cols: ballotpedia id dtype text, bioguide id dtype text, birthday bio dtype date, cspan id dtype real, fec id dtype text, first name dtype text, gender bio dtype text, google entity id dtype text, govtrack id dtype integer, house history id dtype real, interuniversity consortium for political and social research id dtype real, last name dtype text, legislator id dtype text, maplight id dtype real, middle name dtype text, nickname dtype text, official full name dtype text, opensecrets id dtype text, religion bio dtype text, suffix name dtype text, thomas id dtype integer, votesmart id dtype real, wikidata id dtype text, wikipedia id dtype text,
current-terms table current-terms Cols: address dtype text, bioguide id dtype text, caucus dtype text, chamber dtype text, class dtype real, contact_form dtype text, district dtype real, end dtype text, fax dtype text, last dtype text, name dtype text, office dtype text, party dtype text, party affiliations dtype text, phone dtype text, relation dtype text, Really Simple Syndication URL dtype text, start dtype text, state dtype text, state_rank dtype text, title dtype text, type dtype text, url dtype text,
historical table historical Cols: ballotpedia id dtype text, bioguide id dtype text, bioguide previous id dtype text, birthday bio dtype text, cspan id dtype text, fec id dtype text, first name dtype text, gender bio dtype text, google entity id dtype text, govtrack id dtype integer, house history alternate id dtype text, house history id dtype real, interuniversity consortium for political and social research id dtype real, last name dtype text, legislator id dtype text, maplight id dtype text, middle name dtype text, nickname dtype text, official full name dtype text, opensecrets id dtype text, religion bio dtype text, suffix name dtype text, thomas id dtype text, votesmart id dtype text, wikidata id dtype text, wikipedia id dtype text,
historical-terms table historical-terms Cols: address dtype text, bioguide id dtype text, chamber dtype text, class dtype real, contact_form dtype text, district dtype real, end dtype text, fax dtype text, last dtype text, middle dtype text, name dtype text, office dtype text, party dtype text, party affiliations dtype text, phone dtype text, relation dtype text, Really Simple Syndication URL dtype text, start dtype text, state dtype text, state_rank dtype text, title dtype text, type dtype text, url dtype text,
social-media table social-media Cols: bioguide dtype text, facebook dtype text, facebook_id dtype real, govtrack dtype real, instagram dtype text, instagram_id dtype real, thomas dtype integer, twitter dtype text, twitter_id dtype real, youtube dtype text, youtube_id dtype text,
|
legislator
|
What is the title of legislator whose birthday on 2/20/1942?
|
birthday on 2/20/1942 refers to birthday_bio = '1942-02-20'
|
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 name:db_id legislator
current table current Cols: ballotpedia id dtype text, bioguide id dtype text, birthday bio dtype date, cspan id dtype real, fec id dtype text, first name dtype text, gender bio dtype text, google entity id dtype text, govtrack id dtype integer, house history id dtype real, interuniversity consortium for political and social research id dtype real, last name dtype text, legislator id dtype text, maplight id dtype real, middle name dtype text, nickname dtype text, official full name dtype text, opensecrets id dtype text, religion bio dtype text, suffix name dtype text, thomas id dtype integer, votesmart id dtype real, wikidata id dtype text, wikipedia id dtype text,
current-terms table current-terms Cols: address dtype text, bioguide id dtype text, caucus dtype text, chamber dtype text, class dtype real, contact_form dtype text, district dtype real, end dtype text, fax dtype text, last dtype text, name dtype text, office dtype text, party dtype text, party affiliations dtype text, phone dtype text, relation dtype text, Really Simple Syndication URL dtype text, start dtype text, state dtype text, state_rank dtype text, title dtype text, type dtype text, url dtype text,
historical table historical Cols: ballotpedia id dtype text, bioguide id dtype text, bioguide previous id dtype text, birthday bio dtype text, cspan id dtype text, fec id dtype text, first name dtype text, gender bio dtype text, google entity id dtype text, govtrack id dtype integer, house history alternate id dtype text, house history id dtype real, interuniversity consortium for political and social research id dtype real, last name dtype text, legislator id dtype text, maplight id dtype text, middle name dtype text, nickname dtype text, official full name dtype text, opensecrets id dtype text, religion bio dtype text, suffix name dtype text, thomas id dtype text, votesmart id dtype text, wikidata id dtype text, wikipedia id dtype text,
historical-terms table historical-terms Cols: address dtype text, bioguide id dtype text, chamber dtype text, class dtype real, contact_form dtype text, district dtype real, end dtype text, fax dtype text, last dtype text, middle dtype text, name dtype text, office dtype text, party dtype text, party affiliations dtype text, phone dtype text, relation dtype text, Really Simple Syndication URL dtype text, start dtype text, state dtype text, state_rank dtype text, title dtype text, type dtype text, url dtype text,
social-media table social-media Cols: bioguide dtype text, facebook dtype text, facebook_id dtype real, govtrack dtype real, instagram dtype text, instagram_id dtype real, thomas dtype integer, twitter dtype text, twitter_id dtype real, youtube dtype text, youtube_id dtype text,
|
legislator
|
What is the gender of the legislator whose address at 317 Russell Senate Office Building Washington DC 20510?
|
gender refers to gender_bio
|
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 name:db_id legislator
current table current Cols: ballotpedia id dtype text, bioguide id dtype text, birthday bio dtype date, cspan id dtype real, fec id dtype text, first name dtype text, gender bio dtype text, google entity id dtype text, govtrack id dtype integer, house history id dtype real, interuniversity consortium for political and social research id dtype real, last name dtype text, legislator id dtype text, maplight id dtype real, middle name dtype text, nickname dtype text, official full name dtype text, opensecrets id dtype text, religion bio dtype text, suffix name dtype text, thomas id dtype integer, votesmart id dtype real, wikidata id dtype text, wikipedia id dtype text,
current-terms table current-terms Cols: address dtype text, bioguide id dtype text, caucus dtype text, chamber dtype text, class dtype real, contact_form dtype text, district dtype real, end dtype text, fax dtype text, last dtype text, name dtype text, office dtype text, party dtype text, party affiliations dtype text, phone dtype text, relation dtype text, Really Simple Syndication URL dtype text, start dtype text, state dtype text, state_rank dtype text, title dtype text, type dtype text, url dtype text,
historical table historical Cols: ballotpedia id dtype text, bioguide id dtype text, bioguide previous id dtype text, birthday bio dtype text, cspan id dtype text, fec id dtype text, first name dtype text, gender bio dtype text, google entity id dtype text, govtrack id dtype integer, house history alternate id dtype text, house history id dtype real, interuniversity consortium for political and social research id dtype real, last name dtype text, legislator id dtype text, maplight id dtype text, middle name dtype text, nickname dtype text, official full name dtype text, opensecrets id dtype text, religion bio dtype text, suffix name dtype text, thomas id dtype text, votesmart id dtype text, wikidata id dtype text, wikipedia id dtype text,
historical-terms table historical-terms Cols: address dtype text, bioguide id dtype text, chamber dtype text, class dtype real, contact_form dtype text, district dtype real, end dtype text, fax dtype text, last dtype text, middle dtype text, name dtype text, office dtype text, party dtype text, party affiliations dtype text, phone dtype text, relation dtype text, Really Simple Syndication URL dtype text, start dtype text, state dtype text, state_rank dtype text, title dtype text, type dtype text, url dtype text,
social-media table social-media Cols: bioguide dtype text, facebook dtype text, facebook_id dtype real, govtrack dtype real, instagram dtype text, instagram_id dtype real, thomas dtype integer, twitter dtype text, twitter_id dtype real, youtube dtype text, youtube_id dtype text,
|
legislator
|
List out the first name of legislators who are senior Senator.
|
senior refers to state_rank = 'senior'; only senator has this value 'senior'
|
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 name:db_id legislator
current table current Cols: ballotpedia id dtype text, bioguide id dtype text, birthday bio dtype date, cspan id dtype real, fec id dtype text, first name dtype text, gender bio dtype text, google entity id dtype text, govtrack id dtype integer, house history id dtype real, interuniversity consortium for political and social research id dtype real, last name dtype text, legislator id dtype text, maplight id dtype real, middle name dtype text, nickname dtype text, official full name dtype text, opensecrets id dtype text, religion bio dtype text, suffix name dtype text, thomas id dtype integer, votesmart id dtype real, wikidata id dtype text, wikipedia id dtype text,
current-terms table current-terms Cols: address dtype text, bioguide id dtype text, caucus dtype text, chamber dtype text, class dtype real, contact_form dtype text, district dtype real, end dtype text, fax dtype text, last dtype text, name dtype text, office dtype text, party dtype text, party affiliations dtype text, phone dtype text, relation dtype text, Really Simple Syndication URL dtype text, start dtype text, state dtype text, state_rank dtype text, title dtype text, type dtype text, url dtype text,
historical table historical Cols: ballotpedia id dtype text, bioguide id dtype text, bioguide previous id dtype text, birthday bio dtype text, cspan id dtype text, fec id dtype text, first name dtype text, gender bio dtype text, google entity id dtype text, govtrack id dtype integer, house history alternate id dtype text, house history id dtype real, interuniversity consortium for political and social research id dtype real, last name dtype text, legislator id dtype text, maplight id dtype text, middle name dtype text, nickname dtype text, official full name dtype text, opensecrets id dtype text, religion bio dtype text, suffix name dtype text, thomas id dtype text, votesmart id dtype text, wikidata id dtype text, wikipedia id dtype text,
historical-terms table historical-terms Cols: address dtype text, bioguide id dtype text, chamber dtype text, class dtype real, contact_form dtype text, district dtype real, end dtype text, fax dtype text, last dtype text, middle dtype text, name dtype text, office dtype text, party dtype text, party affiliations dtype text, phone dtype text, relation dtype text, Really Simple Syndication URL dtype text, start dtype text, state dtype text, state_rank dtype text, title dtype text, type dtype text, url dtype text,
social-media table social-media Cols: bioguide dtype text, facebook dtype text, facebook_id dtype real, govtrack dtype real, instagram dtype text, instagram_id dtype real, thomas dtype integer, twitter dtype text, twitter_id dtype real, youtube dtype text, youtube_id dtype text,
|
legislator
|
Among male legislators, state number of the legislators who are not the senator.
|
male refers to gender_bio = M; not the senator refers to class IS NULL OR class = ''
|
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 name:db_id legislator
current table current Cols: ballotpedia id dtype text, bioguide id dtype text, birthday bio dtype date, cspan id dtype real, fec id dtype text, first name dtype text, gender bio dtype text, google entity id dtype text, govtrack id dtype integer, house history id dtype real, interuniversity consortium for political and social research id dtype real, last name dtype text, legislator id dtype text, maplight id dtype real, middle name dtype text, nickname dtype text, official full name dtype text, opensecrets id dtype text, religion bio dtype text, suffix name dtype text, thomas id dtype integer, votesmart id dtype real, wikidata id dtype text, wikipedia id dtype text,
current-terms table current-terms Cols: address dtype text, bioguide id dtype text, caucus dtype text, chamber dtype text, class dtype real, contact_form dtype text, district dtype real, end dtype text, fax dtype text, last dtype text, name dtype text, office dtype text, party dtype text, party affiliations dtype text, phone dtype text, relation dtype text, Really Simple Syndication URL dtype text, start dtype text, state dtype text, state_rank dtype text, title dtype text, type dtype text, url dtype text,
historical table historical Cols: ballotpedia id dtype text, bioguide id dtype text, bioguide previous id dtype text, birthday bio dtype text, cspan id dtype text, fec id dtype text, first name dtype text, gender bio dtype text, google entity id dtype text, govtrack id dtype integer, house history alternate id dtype text, house history id dtype real, interuniversity consortium for political and social research id dtype real, last name dtype text, legislator id dtype text, maplight id dtype text, middle name dtype text, nickname dtype text, official full name dtype text, opensecrets id dtype text, religion bio dtype text, suffix name dtype text, thomas id dtype text, votesmart id dtype text, wikidata id dtype text, wikipedia id dtype text,
historical-terms table historical-terms Cols: address dtype text, bioguide id dtype text, chamber dtype text, class dtype real, contact_form dtype text, district dtype real, end dtype text, fax dtype text, last dtype text, middle dtype text, name dtype text, office dtype text, party dtype text, party affiliations dtype text, phone dtype text, relation dtype text, Really Simple Syndication URL dtype text, start dtype text, state dtype text, state_rank dtype text, title dtype text, type dtype text, url dtype text,
social-media table social-media Cols: bioguide dtype text, facebook dtype text, facebook_id dtype real, govtrack dtype real, instagram dtype text, instagram_id dtype real, thomas dtype integer, twitter dtype text, twitter_id dtype real, youtube dtype text, youtube_id dtype text,
|
legislator
|
Calculate the percentage of legislators who are Senator and were born in 1964.
|
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)
|
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 name:db_id legislator
current table current Cols: ballotpedia id dtype text, bioguide id dtype text, birthday bio dtype date, cspan id dtype real, fec id dtype text, first name dtype text, gender bio dtype text, google entity id dtype text, govtrack id dtype integer, house history id dtype real, interuniversity consortium for political and social research id dtype real, last name dtype text, legislator id dtype text, maplight id dtype real, middle name dtype text, nickname dtype text, official full name dtype text, opensecrets id dtype text, religion bio dtype text, suffix name dtype text, thomas id dtype integer, votesmart id dtype real, wikidata id dtype text, wikipedia id dtype text,
current-terms table current-terms Cols: address dtype text, bioguide id dtype text, caucus dtype text, chamber dtype text, class dtype real, contact_form dtype text, district dtype real, end dtype text, fax dtype text, last dtype text, name dtype text, office dtype text, party dtype text, party affiliations dtype text, phone dtype text, relation dtype text, Really Simple Syndication URL dtype text, start dtype text, state dtype text, state_rank dtype text, title dtype text, type dtype text, url dtype text,
historical table historical Cols: ballotpedia id dtype text, bioguide id dtype text, bioguide previous id dtype text, birthday bio dtype text, cspan id dtype text, fec id dtype text, first name dtype text, gender bio dtype text, google entity id dtype text, govtrack id dtype integer, house history alternate id dtype text, house history id dtype real, interuniversity consortium for political and social research id dtype real, last name dtype text, legislator id dtype text, maplight id dtype text, middle name dtype text, nickname dtype text, official full name dtype text, opensecrets id dtype text, religion bio dtype text, suffix name dtype text, thomas id dtype text, votesmart id dtype text, wikidata id dtype text, wikipedia id dtype text,
historical-terms table historical-terms Cols: address dtype text, bioguide id dtype text, chamber dtype text, class dtype real, contact_form dtype text, district dtype real, end dtype text, fax dtype text, last dtype text, middle dtype text, name dtype text, office dtype text, party dtype text, party affiliations dtype text, phone dtype text, relation dtype text, Really Simple Syndication URL dtype text, start dtype text, state dtype text, state_rank dtype text, title dtype text, type dtype text, url dtype text,
social-media table social-media Cols: bioguide dtype text, facebook dtype text, facebook_id dtype real, govtrack dtype real, instagram dtype text, instagram_id dtype real, thomas dtype integer, twitter dtype text, twitter_id dtype real, youtube dtype text, youtube_id dtype text,
|
legislator
|
Calculate the percentage of legislators who are not Senator and were born before 1975.
|
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)
|
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 name:db_id legislator
current table current Cols: ballotpedia id dtype text, bioguide id dtype text, birthday bio dtype date, cspan id dtype real, fec id dtype text, first name dtype text, gender bio dtype text, google entity id dtype text, govtrack id dtype integer, house history id dtype real, interuniversity consortium for political and social research id dtype real, last name dtype text, legislator id dtype text, maplight id dtype real, middle name dtype text, nickname dtype text, official full name dtype text, opensecrets id dtype text, religion bio dtype text, suffix name dtype text, thomas id dtype integer, votesmart id dtype real, wikidata id dtype text, wikipedia id dtype text,
current-terms table current-terms Cols: address dtype text, bioguide id dtype text, caucus dtype text, chamber dtype text, class dtype real, contact_form dtype text, district dtype real, end dtype text, fax dtype text, last dtype text, name dtype text, office dtype text, party dtype text, party affiliations dtype text, phone dtype text, relation dtype text, Really Simple Syndication URL dtype text, start dtype text, state dtype text, state_rank dtype text, title dtype text, type dtype text, url dtype text,
historical table historical Cols: ballotpedia id dtype text, bioguide id dtype text, bioguide previous id dtype text, birthday bio dtype text, cspan id dtype text, fec id dtype text, first name dtype text, gender bio dtype text, google entity id dtype text, govtrack id dtype integer, house history alternate id dtype text, house history id dtype real, interuniversity consortium for political and social research id dtype real, last name dtype text, legislator id dtype text, maplight id dtype text, middle name dtype text, nickname dtype text, official full name dtype text, opensecrets id dtype text, religion bio dtype text, suffix name dtype text, thomas id dtype text, votesmart id dtype text, wikidata id dtype text, wikipedia id dtype text,
historical-terms table historical-terms Cols: address dtype text, bioguide id dtype text, chamber dtype text, class dtype real, contact_form dtype text, district dtype real, end dtype text, fax dtype text, last dtype text, middle dtype text, name dtype text, office dtype text, party dtype text, party affiliations dtype text, phone dtype text, relation dtype text, Really Simple Syndication URL dtype text, start dtype text, state dtype text, state_rank dtype text, title dtype text, type dtype text, url dtype text,
social-media table social-media Cols: bioguide dtype text, facebook dtype text, facebook_id dtype real, govtrack dtype real, instagram dtype text, instagram_id dtype real, thomas dtype integer, twitter dtype text, twitter_id dtype real, youtube dtype text, youtube_id dtype text,
|
legislator
|
What is the twitter name of the legislator whose birthday was on 5/27/1946?
|
birthday on 5/27/1946 refers to birthday_bio = '1946-05-27'
|
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 name:db_id legislator
current table current Cols: ballotpedia id dtype text, bioguide id dtype text, birthday bio dtype date, cspan id dtype real, fec id dtype text, first name dtype text, gender bio dtype text, google entity id dtype text, govtrack id dtype integer, house history id dtype real, interuniversity consortium for political and social research id dtype real, last name dtype text, legislator id dtype text, maplight id dtype real, middle name dtype text, nickname dtype text, official full name dtype text, opensecrets id dtype text, religion bio dtype text, suffix name dtype text, thomas id dtype integer, votesmart id dtype real, wikidata id dtype text, wikipedia id dtype text,
current-terms table current-terms Cols: address dtype text, bioguide id dtype text, caucus dtype text, chamber dtype text, class dtype real, contact_form dtype text, district dtype real, end dtype text, fax dtype text, last dtype text, name dtype text, office dtype text, party dtype text, party affiliations dtype text, phone dtype text, relation dtype text, Really Simple Syndication URL dtype text, start dtype text, state dtype text, state_rank dtype text, title dtype text, type dtype text, url dtype text,
historical table historical Cols: ballotpedia id dtype text, bioguide id dtype text, bioguide previous id dtype text, birthday bio dtype text, cspan id dtype text, fec id dtype text, first name dtype text, gender bio dtype text, google entity id dtype text, govtrack id dtype integer, house history alternate id dtype text, house history id dtype real, interuniversity consortium for political and social research id dtype real, last name dtype text, legislator id dtype text, maplight id dtype text, middle name dtype text, nickname dtype text, official full name dtype text, opensecrets id dtype text, religion bio dtype text, suffix name dtype text, thomas id dtype text, votesmart id dtype text, wikidata id dtype text, wikipedia id dtype text,
historical-terms table historical-terms Cols: address dtype text, bioguide id dtype text, chamber dtype text, class dtype real, contact_form dtype text, district dtype real, end dtype text, fax dtype text, last dtype text, middle dtype text, name dtype text, office dtype text, party dtype text, party affiliations dtype text, phone dtype text, relation dtype text, Really Simple Syndication URL dtype text, start dtype text, state dtype text, state_rank dtype text, title dtype text, type dtype text, url dtype text,
social-media table social-media Cols: bioguide dtype text, facebook dtype text, facebook_id dtype real, govtrack dtype real, instagram dtype text, instagram_id dtype real, thomas dtype integer, twitter dtype text, twitter_id dtype real, youtube dtype text, youtube_id dtype text,
|
legislator
|
State the opensecrets_id of the legislator whose YouTube name is Bluetkemeyer.
|
Bluetkemeyer refers to youtube
|
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 name:db_id legislator
current table current Cols: ballotpedia id dtype text, bioguide id dtype text, birthday bio dtype date, cspan id dtype real, fec id dtype text, first name dtype text, gender bio dtype text, google entity id dtype text, govtrack id dtype integer, house history id dtype real, interuniversity consortium for political and social research id dtype real, last name dtype text, legislator id dtype text, maplight id dtype real, middle name dtype text, nickname dtype text, official full name dtype text, opensecrets id dtype text, religion bio dtype text, suffix name dtype text, thomas id dtype integer, votesmart id dtype real, wikidata id dtype text, wikipedia id dtype text,
current-terms table current-terms Cols: address dtype text, bioguide id dtype text, caucus dtype text, chamber dtype text, class dtype real, contact_form dtype text, district dtype real, end dtype text, fax dtype text, last dtype text, name dtype text, office dtype text, party dtype text, party affiliations dtype text, phone dtype text, relation dtype text, Really Simple Syndication URL dtype text, start dtype text, state dtype text, state_rank dtype text, title dtype text, type dtype text, url dtype text,
historical table historical Cols: ballotpedia id dtype text, bioguide id dtype text, bioguide previous id dtype text, birthday bio dtype text, cspan id dtype text, fec id dtype text, first name dtype text, gender bio dtype text, google entity id dtype text, govtrack id dtype integer, house history alternate id dtype text, house history id dtype real, interuniversity consortium for political and social research id dtype real, last name dtype text, legislator id dtype text, maplight id dtype text, middle name dtype text, nickname dtype text, official full name dtype text, opensecrets id dtype text, religion bio dtype text, suffix name dtype text, thomas id dtype text, votesmart id dtype text, wikidata id dtype text, wikipedia id dtype text,
historical-terms table historical-terms Cols: address dtype text, bioguide id dtype text, chamber dtype text, class dtype real, contact_form dtype text, district dtype real, end dtype text, fax dtype text, last dtype text, middle dtype text, name dtype text, office dtype text, party dtype text, party affiliations dtype text, phone dtype text, relation dtype text, Really Simple Syndication URL dtype text, start dtype text, state dtype text, state_rank dtype text, title dtype text, type dtype text, url dtype text,
social-media table social-media Cols: bioguide dtype text, facebook dtype text, facebook_id dtype real, govtrack dtype real, instagram dtype text, instagram_id dtype real, thomas dtype integer, twitter dtype text, twitter_id dtype real, youtube dtype text, youtube_id dtype text,
|
legislator
|
Mention the username of Facebook of Ralph Abraham.
|
username of Facebook refers to facebook; Ralph Abraham is an official_full_name; official_full_name refers to first_name, last_name
|
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 name:db_id legislator
current table current Cols: ballotpedia id dtype text, bioguide id dtype text, birthday bio dtype date, cspan id dtype real, fec id dtype text, first name dtype text, gender bio dtype text, google entity id dtype text, govtrack id dtype integer, house history id dtype real, interuniversity consortium for political and social research id dtype real, last name dtype text, legislator id dtype text, maplight id dtype real, middle name dtype text, nickname dtype text, official full name dtype text, opensecrets id dtype text, religion bio dtype text, suffix name dtype text, thomas id dtype integer, votesmart id dtype real, wikidata id dtype text, wikipedia id dtype text,
current-terms table current-terms Cols: address dtype text, bioguide id dtype text, caucus dtype text, chamber dtype text, class dtype real, contact_form dtype text, district dtype real, end dtype text, fax dtype text, last dtype text, name dtype text, office dtype text, party dtype text, party affiliations dtype text, phone dtype text, relation dtype text, Really Simple Syndication URL dtype text, start dtype text, state dtype text, state_rank dtype text, title dtype text, type dtype text, url dtype text,
historical table historical Cols: ballotpedia id dtype text, bioguide id dtype text, bioguide previous id dtype text, birthday bio dtype text, cspan id dtype text, fec id dtype text, first name dtype text, gender bio dtype text, google entity id dtype text, govtrack id dtype integer, house history alternate id dtype text, house history id dtype real, interuniversity consortium for political and social research id dtype real, last name dtype text, legislator id dtype text, maplight id dtype text, middle name dtype text, nickname dtype text, official full name dtype text, opensecrets id dtype text, religion bio dtype text, suffix name dtype text, thomas id dtype text, votesmart id dtype text, wikidata id dtype text, wikipedia id dtype text,
historical-terms table historical-terms Cols: address dtype text, bioguide id dtype text, chamber dtype text, class dtype real, contact_form dtype text, district dtype real, end dtype text, fax dtype text, last dtype text, middle dtype text, name dtype text, office dtype text, party dtype text, party affiliations dtype text, phone dtype text, relation dtype text, Really Simple Syndication URL dtype text, start dtype text, state dtype text, state_rank dtype text, title dtype text, type dtype text, url dtype text,
social-media table social-media Cols: bioguide dtype text, facebook dtype text, facebook_id dtype real, govtrack dtype real, instagram dtype text, instagram_id dtype real, thomas dtype integer, twitter dtype text, twitter_id dtype real, youtube dtype text, youtube_id dtype text,
|
legislator
|
What is the first name of the legislator whose address at 1005 Longworth HOB; Washington DC 20515-1408?
| null |
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 name:db_id legislator
current table current Cols: ballotpedia id dtype text, bioguide id dtype text, birthday bio dtype date, cspan id dtype real, fec id dtype text, first name dtype text, gender bio dtype text, google entity id dtype text, govtrack id dtype integer, house history id dtype real, interuniversity consortium for political and social research id dtype real, last name dtype text, legislator id dtype text, maplight id dtype real, middle name dtype text, nickname dtype text, official full name dtype text, opensecrets id dtype text, religion bio dtype text, suffix name dtype text, thomas id dtype integer, votesmart id dtype real, wikidata id dtype text, wikipedia id dtype text,
current-terms table current-terms Cols: address dtype text, bioguide id dtype text, caucus dtype text, chamber dtype text, class dtype real, contact_form dtype text, district dtype real, end dtype text, fax dtype text, last dtype text, name dtype text, office dtype text, party dtype text, party affiliations dtype text, phone dtype text, relation dtype text, Really Simple Syndication URL dtype text, start dtype text, state dtype text, state_rank dtype text, title dtype text, type dtype text, url dtype text,
historical table historical Cols: ballotpedia id dtype text, bioguide id dtype text, bioguide previous id dtype text, birthday bio dtype text, cspan id dtype text, fec id dtype text, first name dtype text, gender bio dtype text, google entity id dtype text, govtrack id dtype integer, house history alternate id dtype text, house history id dtype real, interuniversity consortium for political and social research id dtype real, last name dtype text, legislator id dtype text, maplight id dtype text, middle name dtype text, nickname dtype text, official full name dtype text, opensecrets id dtype text, religion bio dtype text, suffix name dtype text, thomas id dtype text, votesmart id dtype text, wikidata id dtype text, wikipedia id dtype text,
historical-terms table historical-terms Cols: address dtype text, bioguide id dtype text, chamber dtype text, class dtype real, contact_form dtype text, district dtype real, end dtype text, fax dtype text, last dtype text, middle dtype text, name dtype text, office dtype text, party dtype text, party affiliations dtype text, phone dtype text, relation dtype text, Really Simple Syndication URL dtype text, start dtype text, state dtype text, state_rank dtype text, title dtype text, type dtype text, url dtype text,
social-media table social-media Cols: bioguide dtype text, facebook dtype text, facebook_id dtype real, govtrack dtype real, instagram dtype text, instagram_id dtype real, thomas dtype integer, twitter dtype text, twitter_id dtype real, youtube dtype text, youtube_id dtype text,
|
legislator
|
What is the Instagram name of the legislator whose birthday was on 8/24/1952?
|
Instagram name refers to instagram; birthday on 8/24/1952 refers to birthday_bio = '1952-08-24'
|
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 name:db_id legislator
current table current Cols: ballotpedia id dtype text, bioguide id dtype text, birthday bio dtype date, cspan id dtype real, fec id dtype text, first name dtype text, gender bio dtype text, google entity id dtype text, govtrack id dtype integer, house history id dtype real, interuniversity consortium for political and social research id dtype real, last name dtype text, legislator id dtype text, maplight id dtype real, middle name dtype text, nickname dtype text, official full name dtype text, opensecrets id dtype text, religion bio dtype text, suffix name dtype text, thomas id dtype integer, votesmart id dtype real, wikidata id dtype text, wikipedia id dtype text,
current-terms table current-terms Cols: address dtype text, bioguide id dtype text, caucus dtype text, chamber dtype text, class dtype real, contact_form dtype text, district dtype real, end dtype text, fax dtype text, last dtype text, name dtype text, office dtype text, party dtype text, party affiliations dtype text, phone dtype text, relation dtype text, Really Simple Syndication URL dtype text, start dtype text, state dtype text, state_rank dtype text, title dtype text, type dtype text, url dtype text,
historical table historical Cols: ballotpedia id dtype text, bioguide id dtype text, bioguide previous id dtype text, birthday bio dtype text, cspan id dtype text, fec id dtype text, first name dtype text, gender bio dtype text, google entity id dtype text, govtrack id dtype integer, house history alternate id dtype text, house history id dtype real, interuniversity consortium for political and social research id dtype real, last name dtype text, legislator id dtype text, maplight id dtype text, middle name dtype text, nickname dtype text, official full name dtype text, opensecrets id dtype text, religion bio dtype text, suffix name dtype text, thomas id dtype text, votesmart id dtype text, wikidata id dtype text, wikipedia id dtype text,
historical-terms table historical-terms Cols: address dtype text, bioguide id dtype text, chamber dtype text, class dtype real, contact_form dtype text, district dtype real, end dtype text, fax dtype text, last dtype text, middle dtype text, name dtype text, office dtype text, party dtype text, party affiliations dtype text, phone dtype text, relation dtype text, Really Simple Syndication URL dtype text, start dtype text, state dtype text, state_rank dtype text, title dtype text, type dtype text, url dtype text,
social-media table social-media Cols: bioguide dtype text, facebook dtype text, facebook_id dtype real, govtrack dtype real, instagram dtype text, instagram_id dtype real, thomas dtype integer, twitter dtype text, twitter_id dtype real, youtube dtype text, youtube_id dtype text,
|
legislator
|
State number of legislators who are not the senator among female legislators.
|
not the senator refers to class IS NULL OR class = ''; female refers to gender_bio = 'F';
|
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 name:db_id legislator
current table current Cols: ballotpedia id dtype text, bioguide id dtype text, birthday bio dtype date, cspan id dtype real, fec id dtype text, first name dtype text, gender bio dtype text, google entity id dtype text, govtrack id dtype integer, house history id dtype real, interuniversity consortium for political and social research id dtype real, last name dtype text, legislator id dtype text, maplight id dtype real, middle name dtype text, nickname dtype text, official full name dtype text, opensecrets id dtype text, religion bio dtype text, suffix name dtype text, thomas id dtype integer, votesmart id dtype real, wikidata id dtype text, wikipedia id dtype text,
current-terms table current-terms Cols: address dtype text, bioguide id dtype text, caucus dtype text, chamber dtype text, class dtype real, contact_form dtype text, district dtype real, end dtype text, fax dtype text, last dtype text, name dtype text, office dtype text, party dtype text, party affiliations dtype text, phone dtype text, relation dtype text, Really Simple Syndication URL dtype text, start dtype text, state dtype text, state_rank dtype text, title dtype text, type dtype text, url dtype text,
historical table historical Cols: ballotpedia id dtype text, bioguide id dtype text, bioguide previous id dtype text, birthday bio dtype text, cspan id dtype text, fec id dtype text, first name dtype text, gender bio dtype text, google entity id dtype text, govtrack id dtype integer, house history alternate id dtype text, house history id dtype real, interuniversity consortium for political and social research id dtype real, last name dtype text, legislator id dtype text, maplight id dtype text, middle name dtype text, nickname dtype text, official full name dtype text, opensecrets id dtype text, religion bio dtype text, suffix name dtype text, thomas id dtype text, votesmart id dtype text, wikidata id dtype text, wikipedia id dtype text,
historical-terms table historical-terms Cols: address dtype text, bioguide id dtype text, chamber dtype text, class dtype real, contact_form dtype text, district dtype real, end dtype text, fax dtype text, last dtype text, middle dtype text, name dtype text, office dtype text, party dtype text, party affiliations dtype text, phone dtype text, relation dtype text, Really Simple Syndication URL dtype text, start dtype text, state dtype text, state_rank dtype text, title dtype text, type dtype text, url dtype text,
social-media table social-media Cols: bioguide dtype text, facebook dtype text, facebook_id dtype real, govtrack dtype real, instagram dtype text, instagram_id dtype real, thomas dtype integer, twitter dtype text, twitter_id dtype real, youtube dtype text, youtube_id dtype text,
|
legislator
|
Give the religion of the legislator whose YouTube name is MaxineWaters.
|
MaxineWaters relates to youtube
|
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 name:db_id legislator
current table current Cols: ballotpedia id dtype text, bioguide id dtype text, birthday bio dtype date, cspan id dtype real, fec id dtype text, first name dtype text, gender bio dtype text, google entity id dtype text, govtrack id dtype integer, house history id dtype real, interuniversity consortium for political and social research id dtype real, last name dtype text, legislator id dtype text, maplight id dtype real, middle name dtype text, nickname dtype text, official full name dtype text, opensecrets id dtype text, religion bio dtype text, suffix name dtype text, thomas id dtype integer, votesmart id dtype real, wikidata id dtype text, wikipedia id dtype text,
current-terms table current-terms Cols: address dtype text, bioguide id dtype text, caucus dtype text, chamber dtype text, class dtype real, contact_form dtype text, district dtype real, end dtype text, fax dtype text, last dtype text, name dtype text, office dtype text, party dtype text, party affiliations dtype text, phone dtype text, relation dtype text, Really Simple Syndication URL dtype text, start dtype text, state dtype text, state_rank dtype text, title dtype text, type dtype text, url dtype text,
historical table historical Cols: ballotpedia id dtype text, bioguide id dtype text, bioguide previous id dtype text, birthday bio dtype text, cspan id dtype text, fec id dtype text, first name dtype text, gender bio dtype text, google entity id dtype text, govtrack id dtype integer, house history alternate id dtype text, house history id dtype real, interuniversity consortium for political and social research id dtype real, last name dtype text, legislator id dtype text, maplight id dtype text, middle name dtype text, nickname dtype text, official full name dtype text, opensecrets id dtype text, religion bio dtype text, suffix name dtype text, thomas id dtype text, votesmart id dtype text, wikidata id dtype text, wikipedia id dtype text,
historical-terms table historical-terms Cols: address dtype text, bioguide id dtype text, chamber dtype text, class dtype real, contact_form dtype text, district dtype real, end dtype text, fax dtype text, last dtype text, middle dtype text, name dtype text, office dtype text, party dtype text, party affiliations dtype text, phone dtype text, relation dtype text, Really Simple Syndication URL dtype text, start dtype text, state dtype text, state_rank dtype text, title dtype text, type dtype text, url dtype text,
social-media table social-media Cols: bioguide dtype text, facebook dtype text, facebook_id dtype real, govtrack dtype real, instagram dtype text, instagram_id dtype real, thomas dtype integer, twitter dtype text, twitter_id dtype real, youtube dtype text, youtube_id dtype text,
|
legislator
|
How many minority leaders have not been registered in Federal Election Commission data?
|
minority leaders is a title; have not been registered in Federal Election Commission data refers to fec_id IS NULL OR fec_id = ''
|
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 name:db_id legislator
current table current Cols: ballotpedia id dtype text, bioguide id dtype text, birthday bio dtype date, cspan id dtype real, fec id dtype text, first name dtype text, gender bio dtype text, google entity id dtype text, govtrack id dtype integer, house history id dtype real, interuniversity consortium for political and social research id dtype real, last name dtype text, legislator id dtype text, maplight id dtype real, middle name dtype text, nickname dtype text, official full name dtype text, opensecrets id dtype text, religion bio dtype text, suffix name dtype text, thomas id dtype integer, votesmart id dtype real, wikidata id dtype text, wikipedia id dtype text,
current-terms table current-terms Cols: address dtype text, bioguide id dtype text, caucus dtype text, chamber dtype text, class dtype real, contact_form dtype text, district dtype real, end dtype text, fax dtype text, last dtype text, name dtype text, office dtype text, party dtype text, party affiliations dtype text, phone dtype text, relation dtype text, Really Simple Syndication URL dtype text, start dtype text, state dtype text, state_rank dtype text, title dtype text, type dtype text, url dtype text,
historical table historical Cols: ballotpedia id dtype text, bioguide id dtype text, bioguide previous id dtype text, birthday bio dtype text, cspan id dtype text, fec id dtype text, first name dtype text, gender bio dtype text, google entity id dtype text, govtrack id dtype integer, house history alternate id dtype text, house history id dtype real, interuniversity consortium for political and social research id dtype real, last name dtype text, legislator id dtype text, maplight id dtype text, middle name dtype text, nickname dtype text, official full name dtype text, opensecrets id dtype text, religion bio dtype text, suffix name dtype text, thomas id dtype text, votesmart id dtype text, wikidata id dtype text, wikipedia id dtype text,
historical-terms table historical-terms Cols: address dtype text, bioguide id dtype text, chamber dtype text, class dtype real, contact_form dtype text, district dtype real, end dtype text, fax dtype text, last dtype text, middle dtype text, name dtype text, office dtype text, party dtype text, party affiliations dtype text, phone dtype text, relation dtype text, Really Simple Syndication URL dtype text, start dtype text, state dtype text, state_rank dtype text, title dtype text, type dtype text, url dtype text,
social-media table social-media Cols: bioguide dtype text, facebook dtype text, facebook_id dtype real, govtrack dtype real, instagram dtype text, instagram_id dtype real, thomas dtype integer, twitter dtype text, twitter_id dtype real, youtube dtype text, youtube_id dtype text,
|
legislator
|
How many of the legislators are male?
|
male refers to gender_bio = 'M';
|
SELECT COUNT(*) FROM current WHERE gender_bio = 'M'
|
database name:db_id legislator
current table current Cols: ballotpedia id dtype text, bioguide id dtype text, birthday bio dtype date, cspan id dtype real, fec id dtype text, first name dtype text, gender bio dtype text, google entity id dtype text, govtrack id dtype integer, house history id dtype real, interuniversity consortium for political and social research id dtype real, last name dtype text, legislator id dtype text, maplight id dtype real, middle name dtype text, nickname dtype text, official full name dtype text, opensecrets id dtype text, religion bio dtype text, suffix name dtype text, thomas id dtype integer, votesmart id dtype real, wikidata id dtype text, wikipedia id dtype text,
current-terms table current-terms Cols: address dtype text, bioguide id dtype text, caucus dtype text, chamber dtype text, class dtype real, contact_form dtype text, district dtype real, end dtype text, fax dtype text, last dtype text, name dtype text, office dtype text, party dtype text, party affiliations dtype text, phone dtype text, relation dtype text, Really Simple Syndication URL dtype text, start dtype text, state dtype text, state_rank dtype text, title dtype text, type dtype text, url dtype text,
historical table historical Cols: ballotpedia id dtype text, bioguide id dtype text, bioguide previous id dtype text, birthday bio dtype text, cspan id dtype text, fec id dtype text, first name dtype text, gender bio dtype text, google entity id dtype text, govtrack id dtype integer, house history alternate id dtype text, house history id dtype real, interuniversity consortium for political and social research id dtype real, last name dtype text, legislator id dtype text, maplight id dtype text, middle name dtype text, nickname dtype text, official full name dtype text, opensecrets id dtype text, religion bio dtype text, suffix name dtype text, thomas id dtype text, votesmart id dtype text, wikidata id dtype text, wikipedia id dtype text,
historical-terms table historical-terms Cols: address dtype text, bioguide id dtype text, chamber dtype text, class dtype real, contact_form dtype text, district dtype real, end dtype text, fax dtype text, last dtype text, middle dtype text, name dtype text, office dtype text, party dtype text, party affiliations dtype text, phone dtype text, relation dtype text, Really Simple Syndication URL dtype text, start dtype text, state dtype text, state_rank dtype text, title dtype text, type dtype text, url dtype text,
social-media table social-media Cols: bioguide dtype text, facebook dtype text, facebook_id dtype real, govtrack dtype real, instagram dtype text, instagram_id dtype real, thomas dtype integer, twitter dtype text, twitter_id dtype real, youtube dtype text, youtube_id dtype text,
|
legislator
|
Provide the facebook ID of the facebook account named "RepWilson".
| null |
SELECT facebook_id FROM `social-media` WHERE facebook = 'RepWilson'
|
database name:db_id legislator
current table current Cols: ballotpedia id dtype text, bioguide id dtype text, birthday bio dtype date, cspan id dtype real, fec id dtype text, first name dtype text, gender bio dtype text, google entity id dtype text, govtrack id dtype integer, house history id dtype real, interuniversity consortium for political and social research id dtype real, last name dtype text, legislator id dtype text, maplight id dtype real, middle name dtype text, nickname dtype text, official full name dtype text, opensecrets id dtype text, religion bio dtype text, suffix name dtype text, thomas id dtype integer, votesmart id dtype real, wikidata id dtype text, wikipedia id dtype text,
current-terms table current-terms Cols: address dtype text, bioguide id dtype text, caucus dtype text, chamber dtype text, class dtype real, contact_form dtype text, district dtype real, end dtype text, fax dtype text, last dtype text, name dtype text, office dtype text, party dtype text, party affiliations dtype text, phone dtype text, relation dtype text, Really Simple Syndication URL dtype text, start dtype text, state dtype text, state_rank dtype text, title dtype text, type dtype text, url dtype text,
historical table historical Cols: ballotpedia id dtype text, bioguide id dtype text, bioguide previous id dtype text, birthday bio dtype text, cspan id dtype text, fec id dtype text, first name dtype text, gender bio dtype text, google entity id dtype text, govtrack id dtype integer, house history alternate id dtype text, house history id dtype real, interuniversity consortium for political and social research id dtype real, last name dtype text, legislator id dtype text, maplight id dtype text, middle name dtype text, nickname dtype text, official full name dtype text, opensecrets id dtype text, religion bio dtype text, suffix name dtype text, thomas id dtype text, votesmart id dtype text, wikidata id dtype text, wikipedia id dtype text,
historical-terms table historical-terms Cols: address dtype text, bioguide id dtype text, chamber dtype text, class dtype real, contact_form dtype text, district dtype real, end dtype text, fax dtype text, last dtype text, middle dtype text, name dtype text, office dtype text, party dtype text, party affiliations dtype text, phone dtype text, relation dtype text, Really Simple Syndication URL dtype text, start dtype text, state dtype text, state_rank dtype text, title dtype text, type dtype text, url dtype text,
social-media table social-media Cols: bioguide dtype text, facebook dtype text, facebook_id dtype real, govtrack dtype real, instagram dtype text, instagram_id dtype real, thomas dtype integer, twitter dtype text, twitter_id dtype real, youtube dtype text, youtube_id dtype text,
|
legislator
|
What is the total number of legislators with "John" as their first name?
| null |
SELECT COUNT(*) FROM current WHERE first_name = 'John'
|
database name:db_id legislator
current table current Cols: ballotpedia id dtype text, bioguide id dtype text, birthday bio dtype date, cspan id dtype real, fec id dtype text, first name dtype text, gender bio dtype text, google entity id dtype text, govtrack id dtype integer, house history id dtype real, interuniversity consortium for political and social research id dtype real, last name dtype text, legislator id dtype text, maplight id dtype real, middle name dtype text, nickname dtype text, official full name dtype text, opensecrets id dtype text, religion bio dtype text, suffix name dtype text, thomas id dtype integer, votesmart id dtype real, wikidata id dtype text, wikipedia id dtype text,
current-terms table current-terms Cols: address dtype text, bioguide id dtype text, caucus dtype text, chamber dtype text, class dtype real, contact_form dtype text, district dtype real, end dtype text, fax dtype text, last dtype text, name dtype text, office dtype text, party dtype text, party affiliations dtype text, phone dtype text, relation dtype text, Really Simple Syndication URL dtype text, start dtype text, state dtype text, state_rank dtype text, title dtype text, type dtype text, url dtype text,
historical table historical Cols: ballotpedia id dtype text, bioguide id dtype text, bioguide previous id dtype text, birthday bio dtype text, cspan id dtype text, fec id dtype text, first name dtype text, gender bio dtype text, google entity id dtype text, govtrack id dtype integer, house history alternate id dtype text, house history id dtype real, interuniversity consortium for political and social research id dtype real, last name dtype text, legislator id dtype text, maplight id dtype text, middle name dtype text, nickname dtype text, official full name dtype text, opensecrets id dtype text, religion bio dtype text, suffix name dtype text, thomas id dtype text, votesmart id dtype text, wikidata id dtype text, wikipedia id dtype text,
historical-terms table historical-terms Cols: address dtype text, bioguide id dtype text, chamber dtype text, class dtype real, contact_form dtype text, district dtype real, end dtype text, fax dtype text, last dtype text, middle dtype text, name dtype text, office dtype text, party dtype text, party affiliations dtype text, phone dtype text, relation dtype text, Really Simple Syndication URL dtype text, start dtype text, state dtype text, state_rank dtype text, title dtype text, type dtype text, url dtype text,
social-media table social-media Cols: bioguide dtype text, facebook dtype text, facebook_id dtype real, govtrack dtype real, instagram dtype text, instagram_id dtype real, thomas dtype integer, twitter dtype text, twitter_id dtype real, youtube dtype text, youtube_id dtype text,
|
legislator
|
Give the district numbers with an Anti-Administration party.
| null |
SELECT district FROM `historical-terms` WHERE party = 'Anti-Administration' GROUP BY district
|
database name:db_id legislator
current table current Cols: ballotpedia id dtype text, bioguide id dtype text, birthday bio dtype date, cspan id dtype real, fec id dtype text, first name dtype text, gender bio dtype text, google entity id dtype text, govtrack id dtype integer, house history id dtype real, interuniversity consortium for political and social research id dtype real, last name dtype text, legislator id dtype text, maplight id dtype real, middle name dtype text, nickname dtype text, official full name dtype text, opensecrets id dtype text, religion bio dtype text, suffix name dtype text, thomas id dtype integer, votesmart id dtype real, wikidata id dtype text, wikipedia id dtype text,
current-terms table current-terms Cols: address dtype text, bioguide id dtype text, caucus dtype text, chamber dtype text, class dtype real, contact_form dtype text, district dtype real, end dtype text, fax dtype text, last dtype text, name dtype text, office dtype text, party dtype text, party affiliations dtype text, phone dtype text, relation dtype text, Really Simple Syndication URL dtype text, start dtype text, state dtype text, state_rank dtype text, title dtype text, type dtype text, url dtype text,
historical table historical Cols: ballotpedia id dtype text, bioguide id dtype text, bioguide previous id dtype text, birthday bio dtype text, cspan id dtype text, fec id dtype text, first name dtype text, gender bio dtype text, google entity id dtype text, govtrack id dtype integer, house history alternate id dtype text, house history id dtype real, interuniversity consortium for political and social research id dtype real, last name dtype text, legislator id dtype text, maplight id dtype text, middle name dtype text, nickname dtype text, official full name dtype text, opensecrets id dtype text, religion bio dtype text, suffix name dtype text, thomas id dtype text, votesmart id dtype text, wikidata id dtype text, wikipedia id dtype text,
historical-terms table historical-terms Cols: address dtype text, bioguide id dtype text, chamber dtype text, class dtype real, contact_form dtype text, district dtype real, end dtype text, fax dtype text, last dtype text, middle dtype text, name dtype text, office dtype text, party dtype text, party affiliations dtype text, phone dtype text, relation dtype text, Really Simple Syndication URL dtype text, start dtype text, state dtype text, state_rank dtype text, title dtype text, type dtype text, url dtype text,
social-media table social-media Cols: bioguide dtype text, facebook dtype text, facebook_id dtype real, govtrack dtype real, instagram dtype text, instagram_id dtype real, thomas dtype integer, twitter dtype text, twitter_id dtype real, youtube dtype text, youtube_id dtype text,
|
legislator
|
List the full name of legislators whose born in 1960.
|
full name refers to official_full_name; born in 1960 refers to birthday_bio like '1960%';
|
SELECT official_full_name FROM current WHERE birthday_bio LIKE '1960%'
|
database name:db_id legislator
current table current Cols: ballotpedia id dtype text, bioguide id dtype text, birthday bio dtype date, cspan id dtype real, fec id dtype text, first name dtype text, gender bio dtype text, google entity id dtype text, govtrack id dtype integer, house history id dtype real, interuniversity consortium for political and social research id dtype real, last name dtype text, legislator id dtype text, maplight id dtype real, middle name dtype text, nickname dtype text, official full name dtype text, opensecrets id dtype text, religion bio dtype text, suffix name dtype text, thomas id dtype integer, votesmart id dtype real, wikidata id dtype text, wikipedia id dtype text,
current-terms table current-terms Cols: address dtype text, bioguide id dtype text, caucus dtype text, chamber dtype text, class dtype real, contact_form dtype text, district dtype real, end dtype text, fax dtype text, last dtype text, name dtype text, office dtype text, party dtype text, party affiliations dtype text, phone dtype text, relation dtype text, Really Simple Syndication URL dtype text, start dtype text, state dtype text, state_rank dtype text, title dtype text, type dtype text, url dtype text,
historical table historical Cols: ballotpedia id dtype text, bioguide id dtype text, bioguide previous id dtype text, birthday bio dtype text, cspan id dtype text, fec id dtype text, first name dtype text, gender bio dtype text, google entity id dtype text, govtrack id dtype integer, house history alternate id dtype text, house history id dtype real, interuniversity consortium for political and social research id dtype real, last name dtype text, legislator id dtype text, maplight id dtype text, middle name dtype text, nickname dtype text, official full name dtype text, opensecrets id dtype text, religion bio dtype text, suffix name dtype text, thomas id dtype text, votesmart id dtype text, wikidata id dtype text, wikipedia id dtype text,
historical-terms table historical-terms Cols: address dtype text, bioguide id dtype text, chamber dtype text, class dtype real, contact_form dtype text, district dtype real, end dtype text, fax dtype text, last dtype text, middle dtype text, name dtype text, office dtype text, party dtype text, party affiliations dtype text, phone dtype text, relation dtype text, Really Simple Syndication URL dtype text, start dtype text, state dtype text, state_rank dtype text, title dtype text, type dtype text, url dtype text,
social-media table social-media Cols: bioguide dtype text, facebook dtype text, facebook_id dtype real, govtrack dtype real, instagram dtype text, instagram_id dtype real, thomas dtype integer, twitter dtype text, twitter_id dtype real, youtube dtype text, youtube_id dtype text,
|
legislator
|
What is the google entity ID of Benjamin Hawkins?
| null |
SELECT google_entity_id_id FROM historical WHERE first_name = 'Benjamin' AND last_name = 'Hawkins'
|
database name:db_id legislator
current table current Cols: ballotpedia id dtype text, bioguide id dtype text, birthday bio dtype date, cspan id dtype real, fec id dtype text, first name dtype text, gender bio dtype text, google entity id dtype text, govtrack id dtype integer, house history id dtype real, interuniversity consortium for political and social research id dtype real, last name dtype text, legislator id dtype text, maplight id dtype real, middle name dtype text, nickname dtype text, official full name dtype text, opensecrets id dtype text, religion bio dtype text, suffix name dtype text, thomas id dtype integer, votesmart id dtype real, wikidata id dtype text, wikipedia id dtype text,
current-terms table current-terms Cols: address dtype text, bioguide id dtype text, caucus dtype text, chamber dtype text, class dtype real, contact_form dtype text, district dtype real, end dtype text, fax dtype text, last dtype text, name dtype text, office dtype text, party dtype text, party affiliations dtype text, phone dtype text, relation dtype text, Really Simple Syndication URL dtype text, start dtype text, state dtype text, state_rank dtype text, title dtype text, type dtype text, url dtype text,
historical table historical Cols: ballotpedia id dtype text, bioguide id dtype text, bioguide previous id dtype text, birthday bio dtype text, cspan id dtype text, fec id dtype text, first name dtype text, gender bio dtype text, google entity id dtype text, govtrack id dtype integer, house history alternate id dtype text, house history id dtype real, interuniversity consortium for political and social research id dtype real, last name dtype text, legislator id dtype text, maplight id dtype text, middle name dtype text, nickname dtype text, official full name dtype text, opensecrets id dtype text, religion bio dtype text, suffix name dtype text, thomas id dtype text, votesmart id dtype text, wikidata id dtype text, wikipedia id dtype text,
historical-terms table historical-terms Cols: address dtype text, bioguide id dtype text, chamber dtype text, class dtype real, contact_form dtype text, district dtype real, end dtype text, fax dtype text, last dtype text, middle dtype text, name dtype text, office dtype text, party dtype text, party affiliations dtype text, phone dtype text, relation dtype text, Really Simple Syndication URL dtype text, start dtype text, state dtype text, state_rank dtype text, title dtype text, type dtype text, url dtype text,
social-media table social-media Cols: bioguide dtype text, facebook dtype text, facebook_id dtype real, govtrack dtype real, instagram dtype text, instagram_id dtype real, thomas dtype integer, twitter dtype text, twitter_id dtype real, youtube dtype text, youtube_id dtype text,
|
legislator
|
Who is the Pro-Administration senator that runs from March 4, 1789 to December 31, 1791?
|
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';
|
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 name:db_id legislator
current table current Cols: ballotpedia id dtype text, bioguide id dtype text, birthday bio dtype date, cspan id dtype real, fec id dtype text, first name dtype text, gender bio dtype text, google entity id dtype text, govtrack id dtype integer, house history id dtype real, interuniversity consortium for political and social research id dtype real, last name dtype text, legislator id dtype text, maplight id dtype real, middle name dtype text, nickname dtype text, official full name dtype text, opensecrets id dtype text, religion bio dtype text, suffix name dtype text, thomas id dtype integer, votesmart id dtype real, wikidata id dtype text, wikipedia id dtype text,
current-terms table current-terms Cols: address dtype text, bioguide id dtype text, caucus dtype text, chamber dtype text, class dtype real, contact_form dtype text, district dtype real, end dtype text, fax dtype text, last dtype text, name dtype text, office dtype text, party dtype text, party affiliations dtype text, phone dtype text, relation dtype text, Really Simple Syndication URL dtype text, start dtype text, state dtype text, state_rank dtype text, title dtype text, type dtype text, url dtype text,
historical table historical Cols: ballotpedia id dtype text, bioguide id dtype text, bioguide previous id dtype text, birthday bio dtype text, cspan id dtype text, fec id dtype text, first name dtype text, gender bio dtype text, google entity id dtype text, govtrack id dtype integer, house history alternate id dtype text, house history id dtype real, interuniversity consortium for political and social research id dtype real, last name dtype text, legislator id dtype text, maplight id dtype text, middle name dtype text, nickname dtype text, official full name dtype text, opensecrets id dtype text, religion bio dtype text, suffix name dtype text, thomas id dtype text, votesmart id dtype text, wikidata id dtype text, wikipedia id dtype text,
historical-terms table historical-terms Cols: address dtype text, bioguide id dtype text, chamber dtype text, class dtype real, contact_form dtype text, district dtype real, end dtype text, fax dtype text, last dtype text, middle dtype text, name dtype text, office dtype text, party dtype text, party affiliations dtype text, phone dtype text, relation dtype text, Really Simple Syndication URL dtype text, start dtype text, state dtype text, state_rank dtype text, title dtype text, type dtype text, url dtype text,
social-media table social-media Cols: bioguide dtype text, facebook dtype text, facebook_id dtype real, govtrack dtype real, instagram dtype text, instagram_id dtype real, thomas dtype integer, twitter dtype text, twitter_id dtype real, youtube dtype text, youtube_id dtype text,
|
legislator
|
What are the first and last name of the representatives of the house in district 9?
|
representatives refers to type = 'rep';
|
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 name:db_id legislator
current table current Cols: ballotpedia id dtype text, bioguide id dtype text, birthday bio dtype date, cspan id dtype real, fec id dtype text, first name dtype text, gender bio dtype text, google entity id dtype text, govtrack id dtype integer, house history id dtype real, interuniversity consortium for political and social research id dtype real, last name dtype text, legislator id dtype text, maplight id dtype real, middle name dtype text, nickname dtype text, official full name dtype text, opensecrets id dtype text, religion bio dtype text, suffix name dtype text, thomas id dtype integer, votesmart id dtype real, wikidata id dtype text, wikipedia id dtype text,
current-terms table current-terms Cols: address dtype text, bioguide id dtype text, caucus dtype text, chamber dtype text, class dtype real, contact_form dtype text, district dtype real, end dtype text, fax dtype text, last dtype text, name dtype text, office dtype text, party dtype text, party affiliations dtype text, phone dtype text, relation dtype text, Really Simple Syndication URL dtype text, start dtype text, state dtype text, state_rank dtype text, title dtype text, type dtype text, url dtype text,
historical table historical Cols: ballotpedia id dtype text, bioguide id dtype text, bioguide previous id dtype text, birthday bio dtype text, cspan id dtype text, fec id dtype text, first name dtype text, gender bio dtype text, google entity id dtype text, govtrack id dtype integer, house history alternate id dtype text, house history id dtype real, interuniversity consortium for political and social research id dtype real, last name dtype text, legislator id dtype text, maplight id dtype text, middle name dtype text, nickname dtype text, official full name dtype text, opensecrets id dtype text, religion bio dtype text, suffix name dtype text, thomas id dtype text, votesmart id dtype text, wikidata id dtype text, wikipedia id dtype text,
historical-terms table historical-terms Cols: address dtype text, bioguide id dtype text, chamber dtype text, class dtype real, contact_form dtype text, district dtype real, end dtype text, fax dtype text, last dtype text, middle dtype text, name dtype text, office dtype text, party dtype text, party affiliations dtype text, phone dtype text, relation dtype text, Really Simple Syndication URL dtype text, start dtype text, state dtype text, state_rank dtype text, title dtype text, type dtype text, url dtype text,
social-media table social-media Cols: bioguide dtype text, facebook dtype text, facebook_id dtype real, govtrack dtype real, instagram dtype text, instagram_id dtype real, thomas dtype integer, twitter dtype text, twitter_id dtype real, youtube dtype text, youtube_id dtype text,
|
legislator
|
Give the full name of the legislators with an independent party.
|
full name refers to official_full_name;
|
SELECT T1.official_full_name FROM current AS T1 INNER JOIN `current-terms` AS T2 ON T1.bioguide_id = T2.bioguide WHERE T2.party = 'Independent' GROUP BY T1.official_full_name
|
database name:db_id legislator
current table current Cols: ballotpedia id dtype text, bioguide id dtype text, birthday bio dtype date, cspan id dtype real, fec id dtype text, first name dtype text, gender bio dtype text, google entity id dtype text, govtrack id dtype integer, house history id dtype real, interuniversity consortium for political and social research id dtype real, last name dtype text, legislator id dtype text, maplight id dtype real, middle name dtype text, nickname dtype text, official full name dtype text, opensecrets id dtype text, religion bio dtype text, suffix name dtype text, thomas id dtype integer, votesmart id dtype real, wikidata id dtype text, wikipedia id dtype text,
current-terms table current-terms Cols: address dtype text, bioguide id dtype text, caucus dtype text, chamber dtype text, class dtype real, contact_form dtype text, district dtype real, end dtype text, fax dtype text, last dtype text, name dtype text, office dtype text, party dtype text, party affiliations dtype text, phone dtype text, relation dtype text, Really Simple Syndication URL dtype text, start dtype text, state dtype text, state_rank dtype text, title dtype text, type dtype text, url dtype text,
historical table historical Cols: ballotpedia id dtype text, bioguide id dtype text, bioguide previous id dtype text, birthday bio dtype text, cspan id dtype text, fec id dtype text, first name dtype text, gender bio dtype text, google entity id dtype text, govtrack id dtype integer, house history alternate id dtype text, house history id dtype real, interuniversity consortium for political and social research id dtype real, last name dtype text, legislator id dtype text, maplight id dtype text, middle name dtype text, nickname dtype text, official full name dtype text, opensecrets id dtype text, religion bio dtype text, suffix name dtype text, thomas id dtype text, votesmart id dtype text, wikidata id dtype text, wikipedia id dtype text,
historical-terms table historical-terms Cols: address dtype text, bioguide id dtype text, chamber dtype text, class dtype real, contact_form dtype text, district dtype real, end dtype text, fax dtype text, last dtype text, middle dtype text, name dtype text, office dtype text, party dtype text, party affiliations dtype text, phone dtype text, relation dtype text, Really Simple Syndication URL dtype text, start dtype text, state dtype text, state_rank dtype text, title dtype text, type dtype text, url dtype text,
social-media table social-media Cols: bioguide dtype text, facebook dtype text, facebook_id dtype real, govtrack dtype real, instagram dtype text, instagram_id dtype real, thomas dtype integer, twitter dtype text, twitter_id dtype real, youtube dtype text, youtube_id dtype text,
|
legislator
|
List down the open secrets and thomas ID of the democrat senators of New Jersey.
|
open secrets refers to opensecrets_id; democrat refers to party = democrat; senators refers to type = 'sen'; New Jersey refers to state = 'NJ';
|
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 name:db_id legislator
current table current Cols: ballotpedia id dtype text, bioguide id dtype text, birthday bio dtype date, cspan id dtype real, fec id dtype text, first name dtype text, gender bio dtype text, google entity id dtype text, govtrack id dtype integer, house history id dtype real, interuniversity consortium for political and social research id dtype real, last name dtype text, legislator id dtype text, maplight id dtype real, middle name dtype text, nickname dtype text, official full name dtype text, opensecrets id dtype text, religion bio dtype text, suffix name dtype text, thomas id dtype integer, votesmart id dtype real, wikidata id dtype text, wikipedia id dtype text,
current-terms table current-terms Cols: address dtype text, bioguide id dtype text, caucus dtype text, chamber dtype text, class dtype real, contact_form dtype text, district dtype real, end dtype text, fax dtype text, last dtype text, name dtype text, office dtype text, party dtype text, party affiliations dtype text, phone dtype text, relation dtype text, Really Simple Syndication URL dtype text, start dtype text, state dtype text, state_rank dtype text, title dtype text, type dtype text, url dtype text,
historical table historical Cols: ballotpedia id dtype text, bioguide id dtype text, bioguide previous id dtype text, birthday bio dtype text, cspan id dtype text, fec id dtype text, first name dtype text, gender bio dtype text, google entity id dtype text, govtrack id dtype integer, house history alternate id dtype text, house history id dtype real, interuniversity consortium for political and social research id dtype real, last name dtype text, legislator id dtype text, maplight id dtype text, middle name dtype text, nickname dtype text, official full name dtype text, opensecrets id dtype text, religion bio dtype text, suffix name dtype text, thomas id dtype text, votesmart id dtype text, wikidata id dtype text, wikipedia id dtype text,
historical-terms table historical-terms Cols: address dtype text, bioguide id dtype text, chamber dtype text, class dtype real, contact_form dtype text, district dtype real, end dtype text, fax dtype text, last dtype text, middle dtype text, name dtype text, office dtype text, party dtype text, party affiliations dtype text, phone dtype text, relation dtype text, Really Simple Syndication URL dtype text, start dtype text, state dtype text, state_rank dtype text, title dtype text, type dtype text, url dtype text,
social-media table social-media Cols: bioguide dtype text, facebook dtype text, facebook_id dtype real, govtrack dtype real, instagram dtype text, instagram_id dtype real, thomas dtype integer, twitter dtype text, twitter_id dtype real, youtube dtype text, youtube_id dtype text,
|
legislator
|
Provide the google entity ID of the senators in New York.
|
google entity ID refers to google_entity_id_id; senators refers to type = 'sen'; New York refers to state = 'NY';
|
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 name:db_id legislator
current table current Cols: ballotpedia id dtype text, bioguide id dtype text, birthday bio dtype date, cspan id dtype real, fec id dtype text, first name dtype text, gender bio dtype text, google entity id dtype text, govtrack id dtype integer, house history id dtype real, interuniversity consortium for political and social research id dtype real, last name dtype text, legislator id dtype text, maplight id dtype real, middle name dtype text, nickname dtype text, official full name dtype text, opensecrets id dtype text, religion bio dtype text, suffix name dtype text, thomas id dtype integer, votesmart id dtype real, wikidata id dtype text, wikipedia id dtype text,
current-terms table current-terms Cols: address dtype text, bioguide id dtype text, caucus dtype text, chamber dtype text, class dtype real, contact_form dtype text, district dtype real, end dtype text, fax dtype text, last dtype text, name dtype text, office dtype text, party dtype text, party affiliations dtype text, phone dtype text, relation dtype text, Really Simple Syndication URL dtype text, start dtype text, state dtype text, state_rank dtype text, title dtype text, type dtype text, url dtype text,
historical table historical Cols: ballotpedia id dtype text, bioguide id dtype text, bioguide previous id dtype text, birthday bio dtype text, cspan id dtype text, fec id dtype text, first name dtype text, gender bio dtype text, google entity id dtype text, govtrack id dtype integer, house history alternate id dtype text, house history id dtype real, interuniversity consortium for political and social research id dtype real, last name dtype text, legislator id dtype text, maplight id dtype text, middle name dtype text, nickname dtype text, official full name dtype text, opensecrets id dtype text, religion bio dtype text, suffix name dtype text, thomas id dtype text, votesmart id dtype text, wikidata id dtype text, wikipedia id dtype text,
historical-terms table historical-terms Cols: address dtype text, bioguide id dtype text, chamber dtype text, class dtype real, contact_form dtype text, district dtype real, end dtype text, fax dtype text, last dtype text, middle dtype text, name dtype text, office dtype text, party dtype text, party affiliations dtype text, phone dtype text, relation dtype text, Really Simple Syndication URL dtype text, start dtype text, state dtype text, state_rank dtype text, title dtype text, type dtype text, url dtype text,
social-media table social-media Cols: bioguide dtype text, facebook dtype text, facebook_id dtype real, govtrack dtype real, instagram dtype text, instagram_id dtype real, thomas dtype integer, twitter dtype text, twitter_id dtype real, youtube dtype text, youtube_id dtype text,
|
legislator
|
Give the religion of the legislator with RSS url of http://www.corker.senate.gov/public/index.cfm/rss/feed.
|
religion refers to religion_bio;
|
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 name:db_id legislator
current table current Cols: ballotpedia id dtype text, bioguide id dtype text, birthday bio dtype date, cspan id dtype real, fec id dtype text, first name dtype text, gender bio dtype text, google entity id dtype text, govtrack id dtype integer, house history id dtype real, interuniversity consortium for political and social research id dtype real, last name dtype text, legislator id dtype text, maplight id dtype real, middle name dtype text, nickname dtype text, official full name dtype text, opensecrets id dtype text, religion bio dtype text, suffix name dtype text, thomas id dtype integer, votesmart id dtype real, wikidata id dtype text, wikipedia id dtype text,
current-terms table current-terms Cols: address dtype text, bioguide id dtype text, caucus dtype text, chamber dtype text, class dtype real, contact_form dtype text, district dtype real, end dtype text, fax dtype text, last dtype text, name dtype text, office dtype text, party dtype text, party affiliations dtype text, phone dtype text, relation dtype text, Really Simple Syndication URL dtype text, start dtype text, state dtype text, state_rank dtype text, title dtype text, type dtype text, url dtype text,
historical table historical Cols: ballotpedia id dtype text, bioguide id dtype text, bioguide previous id dtype text, birthday bio dtype text, cspan id dtype text, fec id dtype text, first name dtype text, gender bio dtype text, google entity id dtype text, govtrack id dtype integer, house history alternate id dtype text, house history id dtype real, interuniversity consortium for political and social research id dtype real, last name dtype text, legislator id dtype text, maplight id dtype text, middle name dtype text, nickname dtype text, official full name dtype text, opensecrets id dtype text, religion bio dtype text, suffix name dtype text, thomas id dtype text, votesmart id dtype text, wikidata id dtype text, wikipedia id dtype text,
historical-terms table historical-terms Cols: address dtype text, bioguide id dtype text, chamber dtype text, class dtype real, contact_form dtype text, district dtype real, end dtype text, fax dtype text, last dtype text, middle dtype text, name dtype text, office dtype text, party dtype text, party affiliations dtype text, phone dtype text, relation dtype text, Really Simple Syndication URL dtype text, start dtype text, state dtype text, state_rank dtype text, title dtype text, type dtype text, url dtype text,
social-media table social-media Cols: bioguide dtype text, facebook dtype text, facebook_id dtype real, govtrack dtype real, instagram dtype text, instagram_id dtype real, thomas dtype integer, twitter dtype text, twitter_id dtype real, youtube dtype text, youtube_id dtype text,
|
legislator
|
What is the party of the legislator named Susan M. Collins?
|
legislator's name refers to offical_full_name;
|
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 name:db_id legislator
current table current Cols: ballotpedia id dtype text, bioguide id dtype text, birthday bio dtype date, cspan id dtype real, fec id dtype text, first name dtype text, gender bio dtype text, google entity id dtype text, govtrack id dtype integer, house history id dtype real, interuniversity consortium for political and social research id dtype real, last name dtype text, legislator id dtype text, maplight id dtype real, middle name dtype text, nickname dtype text, official full name dtype text, opensecrets id dtype text, religion bio dtype text, suffix name dtype text, thomas id dtype integer, votesmart id dtype real, wikidata id dtype text, wikipedia id dtype text,
current-terms table current-terms Cols: address dtype text, bioguide id dtype text, caucus dtype text, chamber dtype text, class dtype real, contact_form dtype text, district dtype real, end dtype text, fax dtype text, last dtype text, name dtype text, office dtype text, party dtype text, party affiliations dtype text, phone dtype text, relation dtype text, Really Simple Syndication URL dtype text, start dtype text, state dtype text, state_rank dtype text, title dtype text, type dtype text, url dtype text,
historical table historical Cols: ballotpedia id dtype text, bioguide id dtype text, bioguide previous id dtype text, birthday bio dtype text, cspan id dtype text, fec id dtype text, first name dtype text, gender bio dtype text, google entity id dtype text, govtrack id dtype integer, house history alternate id dtype text, house history id dtype real, interuniversity consortium for political and social research id dtype real, last name dtype text, legislator id dtype text, maplight id dtype text, middle name dtype text, nickname dtype text, official full name dtype text, opensecrets id dtype text, religion bio dtype text, suffix name dtype text, thomas id dtype text, votesmart id dtype text, wikidata id dtype text, wikipedia id dtype text,
historical-terms table historical-terms Cols: address dtype text, bioguide id dtype text, chamber dtype text, class dtype real, contact_form dtype text, district dtype real, end dtype text, fax dtype text, last dtype text, middle dtype text, name dtype text, office dtype text, party dtype text, party affiliations dtype text, phone dtype text, relation dtype text, Really Simple Syndication URL dtype text, start dtype text, state dtype text, state_rank dtype text, title dtype text, type dtype text, url dtype text,
social-media table social-media Cols: bioguide dtype text, facebook dtype text, facebook_id dtype real, govtrack dtype real, instagram dtype text, instagram_id dtype real, thomas dtype integer, twitter dtype text, twitter_id dtype real, youtube dtype text, youtube_id dtype text,
|
legislator
|
List down the district number of the representative of the house named Jonathan Grout.
|
district number refers to district; representative of the house refers to type = 'rep';
|
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 name:db_id legislator
current table current Cols: ballotpedia id dtype text, bioguide id dtype text, birthday bio dtype date, cspan id dtype real, fec id dtype text, first name dtype text, gender bio dtype text, google entity id dtype text, govtrack id dtype integer, house history id dtype real, interuniversity consortium for political and social research id dtype real, last name dtype text, legislator id dtype text, maplight id dtype real, middle name dtype text, nickname dtype text, official full name dtype text, opensecrets id dtype text, religion bio dtype text, suffix name dtype text, thomas id dtype integer, votesmart id dtype real, wikidata id dtype text, wikipedia id dtype text,
current-terms table current-terms Cols: address dtype text, bioguide id dtype text, caucus dtype text, chamber dtype text, class dtype real, contact_form dtype text, district dtype real, end dtype text, fax dtype text, last dtype text, name dtype text, office dtype text, party dtype text, party affiliations dtype text, phone dtype text, relation dtype text, Really Simple Syndication URL dtype text, start dtype text, state dtype text, state_rank dtype text, title dtype text, type dtype text, url dtype text,
historical table historical Cols: ballotpedia id dtype text, bioguide id dtype text, bioguide previous id dtype text, birthday bio dtype text, cspan id dtype text, fec id dtype text, first name dtype text, gender bio dtype text, google entity id dtype text, govtrack id dtype integer, house history alternate id dtype text, house history id dtype real, interuniversity consortium for political and social research id dtype real, last name dtype text, legislator id dtype text, maplight id dtype text, middle name dtype text, nickname dtype text, official full name dtype text, opensecrets id dtype text, religion bio dtype text, suffix name dtype text, thomas id dtype text, votesmart id dtype text, wikidata id dtype text, wikipedia id dtype text,
historical-terms table historical-terms Cols: address dtype text, bioguide id dtype text, chamber dtype text, class dtype real, contact_form dtype text, district dtype real, end dtype text, fax dtype text, last dtype text, middle dtype text, name dtype text, office dtype text, party dtype text, party affiliations dtype text, phone dtype text, relation dtype text, Really Simple Syndication URL dtype text, start dtype text, state dtype text, state_rank dtype text, title dtype text, type dtype text, url dtype text,
social-media table social-media Cols: bioguide dtype text, facebook dtype text, facebook_id dtype real, govtrack dtype real, instagram dtype text, instagram_id dtype real, thomas dtype integer, twitter dtype text, twitter_id dtype real, youtube dtype text, youtube_id dtype text,
|
legislator
|
What is the party and state of the legislator that has an open secrets ID of N00003689 and thomas ID of 186?
| null |
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 name:db_id legislator
current table current Cols: ballotpedia id dtype text, bioguide id dtype text, birthday bio dtype date, cspan id dtype real, fec id dtype text, first name dtype text, gender bio dtype text, google entity id dtype text, govtrack id dtype integer, house history id dtype real, interuniversity consortium for political and social research id dtype real, last name dtype text, legislator id dtype text, maplight id dtype real, middle name dtype text, nickname dtype text, official full name dtype text, opensecrets id dtype text, religion bio dtype text, suffix name dtype text, thomas id dtype integer, votesmart id dtype real, wikidata id dtype text, wikipedia id dtype text,
current-terms table current-terms Cols: address dtype text, bioguide id dtype text, caucus dtype text, chamber dtype text, class dtype real, contact_form dtype text, district dtype real, end dtype text, fax dtype text, last dtype text, name dtype text, office dtype text, party dtype text, party affiliations dtype text, phone dtype text, relation dtype text, Really Simple Syndication URL dtype text, start dtype text, state dtype text, state_rank dtype text, title dtype text, type dtype text, url dtype text,
historical table historical Cols: ballotpedia id dtype text, bioguide id dtype text, bioguide previous id dtype text, birthday bio dtype text, cspan id dtype text, fec id dtype text, first name dtype text, gender bio dtype text, google entity id dtype text, govtrack id dtype integer, house history alternate id dtype text, house history id dtype real, interuniversity consortium for political and social research id dtype real, last name dtype text, legislator id dtype text, maplight id dtype text, middle name dtype text, nickname dtype text, official full name dtype text, opensecrets id dtype text, religion bio dtype text, suffix name dtype text, thomas id dtype text, votesmart id dtype text, wikidata id dtype text, wikipedia id dtype text,
historical-terms table historical-terms Cols: address dtype text, bioguide id dtype text, chamber dtype text, class dtype real, contact_form dtype text, district dtype real, end dtype text, fax dtype text, last dtype text, middle dtype text, name dtype text, office dtype text, party dtype text, party affiliations dtype text, phone dtype text, relation dtype text, Really Simple Syndication URL dtype text, start dtype text, state dtype text, state_rank dtype text, title dtype text, type dtype text, url dtype text,
social-media table social-media Cols: bioguide dtype text, facebook dtype text, facebook_id dtype real, govtrack dtype real, instagram dtype text, instagram_id dtype real, thomas dtype integer, twitter dtype text, twitter_id dtype real, youtube dtype text, youtube_id dtype text,
|
legislator
|
Provide the full name and birth date of the legislator with a contact form of http://www.brown.senate.gov/contact/.
|
full name refers to official_full_name; birth date refers to birthday_bio;
|
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 name:db_id legislator
current table current Cols: ballotpedia id dtype text, bioguide id dtype text, birthday bio dtype date, cspan id dtype real, fec id dtype text, first name dtype text, gender bio dtype text, google entity id dtype text, govtrack id dtype integer, house history id dtype real, interuniversity consortium for political and social research id dtype real, last name dtype text, legislator id dtype text, maplight id dtype real, middle name dtype text, nickname dtype text, official full name dtype text, opensecrets id dtype text, religion bio dtype text, suffix name dtype text, thomas id dtype integer, votesmart id dtype real, wikidata id dtype text, wikipedia id dtype text,
current-terms table current-terms Cols: address dtype text, bioguide id dtype text, caucus dtype text, chamber dtype text, class dtype real, contact_form dtype text, district dtype real, end dtype text, fax dtype text, last dtype text, name dtype text, office dtype text, party dtype text, party affiliations dtype text, phone dtype text, relation dtype text, Really Simple Syndication URL dtype text, start dtype text, state dtype text, state_rank dtype text, title dtype text, type dtype text, url dtype text,
historical table historical Cols: ballotpedia id dtype text, bioguide id dtype text, bioguide previous id dtype text, birthday bio dtype text, cspan id dtype text, fec id dtype text, first name dtype text, gender bio dtype text, google entity id dtype text, govtrack id dtype integer, house history alternate id dtype text, house history id dtype real, interuniversity consortium for political and social research id dtype real, last name dtype text, legislator id dtype text, maplight id dtype text, middle name dtype text, nickname dtype text, official full name dtype text, opensecrets id dtype text, religion bio dtype text, suffix name dtype text, thomas id dtype text, votesmart id dtype text, wikidata id dtype text, wikipedia id dtype text,
historical-terms table historical-terms Cols: address dtype text, bioguide id dtype text, chamber dtype text, class dtype real, contact_form dtype text, district dtype real, end dtype text, fax dtype text, last dtype text, middle dtype text, name dtype text, office dtype text, party dtype text, party affiliations dtype text, phone dtype text, relation dtype text, Really Simple Syndication URL dtype text, start dtype text, state dtype text, state_rank dtype text, title dtype text, type dtype text, url dtype text,
social-media table social-media Cols: bioguide dtype text, facebook dtype text, facebook_id dtype real, govtrack dtype real, instagram dtype text, instagram_id dtype real, thomas dtype integer, twitter dtype text, twitter_id dtype real, youtube dtype text, youtube_id dtype text,
|
legislator
|
Give the state and type of term of the legislator with the google entity ID of kg:/m/02pyzk.
|
type of term refers to type; google entity ID refers to google_entity_id_id; google_entity_id_id = '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'
|
database name:db_id legislator
current table current Cols: ballotpedia id dtype text, bioguide id dtype text, birthday bio dtype date, cspan id dtype real, fec id dtype text, first name dtype text, gender bio dtype text, google entity id dtype text, govtrack id dtype integer, house history id dtype real, interuniversity consortium for political and social research id dtype real, last name dtype text, legislator id dtype text, maplight id dtype real, middle name dtype text, nickname dtype text, official full name dtype text, opensecrets id dtype text, religion bio dtype text, suffix name dtype text, thomas id dtype integer, votesmart id dtype real, wikidata id dtype text, wikipedia id dtype text,
current-terms table current-terms Cols: address dtype text, bioguide id dtype text, caucus dtype text, chamber dtype text, class dtype real, contact_form dtype text, district dtype real, end dtype text, fax dtype text, last dtype text, name dtype text, office dtype text, party dtype text, party affiliations dtype text, phone dtype text, relation dtype text, Really Simple Syndication URL dtype text, start dtype text, state dtype text, state_rank dtype text, title dtype text, type dtype text, url dtype text,
historical table historical Cols: ballotpedia id dtype text, bioguide id dtype text, bioguide previous id dtype text, birthday bio dtype text, cspan id dtype text, fec id dtype text, first name dtype text, gender bio dtype text, google entity id dtype text, govtrack id dtype integer, house history alternate id dtype text, house history id dtype real, interuniversity consortium for political and social research id dtype real, last name dtype text, legislator id dtype text, maplight id dtype text, middle name dtype text, nickname dtype text, official full name dtype text, opensecrets id dtype text, religion bio dtype text, suffix name dtype text, thomas id dtype text, votesmart id dtype text, wikidata id dtype text, wikipedia id dtype text,
historical-terms table historical-terms Cols: address dtype text, bioguide id dtype text, chamber dtype text, class dtype real, contact_form dtype text, district dtype real, end dtype text, fax dtype text, last dtype text, middle dtype text, name dtype text, office dtype text, party dtype text, party affiliations dtype text, phone dtype text, relation dtype text, Really Simple Syndication URL dtype text, start dtype text, state dtype text, state_rank dtype text, title dtype text, type dtype text, url dtype text,
social-media table social-media Cols: bioguide dtype text, facebook dtype text, facebook_id dtype real, govtrack dtype real, instagram dtype text, instagram_id dtype real, thomas dtype integer, twitter dtype text, twitter_id dtype real, youtube dtype text, youtube_id dtype text,
|
legislator
|
Provide the type and end date of the term of the legislator named John Vining.
|
end date of the term refers to end;
|
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 name:db_id legislator
current table current Cols: ballotpedia id dtype text, bioguide id dtype text, birthday bio dtype date, cspan id dtype real, fec id dtype text, first name dtype text, gender bio dtype text, google entity id dtype text, govtrack id dtype integer, house history id dtype real, interuniversity consortium for political and social research id dtype real, last name dtype text, legislator id dtype text, maplight id dtype real, middle name dtype text, nickname dtype text, official full name dtype text, opensecrets id dtype text, religion bio dtype text, suffix name dtype text, thomas id dtype integer, votesmart id dtype real, wikidata id dtype text, wikipedia id dtype text,
current-terms table current-terms Cols: address dtype text, bioguide id dtype text, caucus dtype text, chamber dtype text, class dtype real, contact_form dtype text, district dtype real, end dtype text, fax dtype text, last dtype text, name dtype text, office dtype text, party dtype text, party affiliations dtype text, phone dtype text, relation dtype text, Really Simple Syndication URL dtype text, start dtype text, state dtype text, state_rank dtype text, title dtype text, type dtype text, url dtype text,
historical table historical Cols: ballotpedia id dtype text, bioguide id dtype text, bioguide previous id dtype text, birthday bio dtype text, cspan id dtype text, fec id dtype text, first name dtype text, gender bio dtype text, google entity id dtype text, govtrack id dtype integer, house history alternate id dtype text, house history id dtype real, interuniversity consortium for political and social research id dtype real, last name dtype text, legislator id dtype text, maplight id dtype text, middle name dtype text, nickname dtype text, official full name dtype text, opensecrets id dtype text, religion bio dtype text, suffix name dtype text, thomas id dtype text, votesmart id dtype text, wikidata id dtype text, wikipedia id dtype text,
historical-terms table historical-terms Cols: address dtype text, bioguide id dtype text, chamber dtype text, class dtype real, contact_form dtype text, district dtype real, end dtype text, fax dtype text, last dtype text, middle dtype text, name dtype text, office dtype text, party dtype text, party affiliations dtype text, phone dtype text, relation dtype text, Really Simple Syndication URL dtype text, start dtype text, state dtype text, state_rank dtype text, title dtype text, type dtype text, url dtype text,
social-media table social-media Cols: bioguide dtype text, facebook dtype text, facebook_id dtype real, govtrack dtype real, instagram dtype text, instagram_id dtype real, thomas dtype integer, twitter dtype text, twitter_id dtype real, youtube dtype text, youtube_id dtype text,
|
legislator
|
Find the difference between the number of female senators and representatives born between 1930 to 1970.
|
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';
|
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 name:db_id legislator
current table current Cols: ballotpedia id dtype text, bioguide id dtype text, birthday bio dtype date, cspan id dtype real, fec id dtype text, first name dtype text, gender bio dtype text, google entity id dtype text, govtrack id dtype integer, house history id dtype real, interuniversity consortium for political and social research id dtype real, last name dtype text, legislator id dtype text, maplight id dtype real, middle name dtype text, nickname dtype text, official full name dtype text, opensecrets id dtype text, religion bio dtype text, suffix name dtype text, thomas id dtype integer, votesmart id dtype real, wikidata id dtype text, wikipedia id dtype text,
current-terms table current-terms Cols: address dtype text, bioguide id dtype text, caucus dtype text, chamber dtype text, class dtype real, contact_form dtype text, district dtype real, end dtype text, fax dtype text, last dtype text, name dtype text, office dtype text, party dtype text, party affiliations dtype text, phone dtype text, relation dtype text, Really Simple Syndication URL dtype text, start dtype text, state dtype text, state_rank dtype text, title dtype text, type dtype text, url dtype text,
historical table historical Cols: ballotpedia id dtype text, bioguide id dtype text, bioguide previous id dtype text, birthday bio dtype text, cspan id dtype text, fec id dtype text, first name dtype text, gender bio dtype text, google entity id dtype text, govtrack id dtype integer, house history alternate id dtype text, house history id dtype real, interuniversity consortium for political and social research id dtype real, last name dtype text, legislator id dtype text, maplight id dtype text, middle name dtype text, nickname dtype text, official full name dtype text, opensecrets id dtype text, religion bio dtype text, suffix name dtype text, thomas id dtype text, votesmart id dtype text, wikidata id dtype text, wikipedia id dtype text,
historical-terms table historical-terms Cols: address dtype text, bioguide id dtype text, chamber dtype text, class dtype real, contact_form dtype text, district dtype real, end dtype text, fax dtype text, last dtype text, middle dtype text, name dtype text, office dtype text, party dtype text, party affiliations dtype text, phone dtype text, relation dtype text, Really Simple Syndication URL dtype text, start dtype text, state dtype text, state_rank dtype text, title dtype text, type dtype text, url dtype text,
social-media table social-media Cols: bioguide dtype text, facebook dtype text, facebook_id dtype real, govtrack dtype real, instagram dtype text, instagram_id dtype real, thomas dtype integer, twitter dtype text, twitter_id dtype real, youtube dtype text, youtube_id dtype text,
|
legislator
|
Among the male legislators born between 1955 to 1965, what is the percentage of the legislators with an independent party?
|
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);
|
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 name:db_id legislator
current table current Cols: ballotpedia id dtype text, bioguide id dtype text, birthday bio dtype date, cspan id dtype real, fec id dtype text, first name dtype text, gender bio dtype text, google entity id dtype text, govtrack id dtype integer, house history id dtype real, interuniversity consortium for political and social research id dtype real, last name dtype text, legislator id dtype text, maplight id dtype real, middle name dtype text, nickname dtype text, official full name dtype text, opensecrets id dtype text, religion bio dtype text, suffix name dtype text, thomas id dtype integer, votesmart id dtype real, wikidata id dtype text, wikipedia id dtype text,
current-terms table current-terms Cols: address dtype text, bioguide id dtype text, caucus dtype text, chamber dtype text, class dtype real, contact_form dtype text, district dtype real, end dtype text, fax dtype text, last dtype text, name dtype text, office dtype text, party dtype text, party affiliations dtype text, phone dtype text, relation dtype text, Really Simple Syndication URL dtype text, start dtype text, state dtype text, state_rank dtype text, title dtype text, type dtype text, url dtype text,
historical table historical Cols: ballotpedia id dtype text, bioguide id dtype text, bioguide previous id dtype text, birthday bio dtype text, cspan id dtype text, fec id dtype text, first name dtype text, gender bio dtype text, google entity id dtype text, govtrack id dtype integer, house history alternate id dtype text, house history id dtype real, interuniversity consortium for political and social research id dtype real, last name dtype text, legislator id dtype text, maplight id dtype text, middle name dtype text, nickname dtype text, official full name dtype text, opensecrets id dtype text, religion bio dtype text, suffix name dtype text, thomas id dtype text, votesmart id dtype text, wikidata id dtype text, wikipedia id dtype text,
historical-terms table historical-terms Cols: address dtype text, bioguide id dtype text, chamber dtype text, class dtype real, contact_form dtype text, district dtype real, end dtype text, fax dtype text, last dtype text, middle dtype text, name dtype text, office dtype text, party dtype text, party affiliations dtype text, phone dtype text, relation dtype text, Really Simple Syndication URL dtype text, start dtype text, state dtype text, state_rank dtype text, title dtype text, type dtype text, url dtype text,
social-media table social-media Cols: bioguide dtype text, facebook dtype text, facebook_id dtype real, govtrack dtype real, instagram dtype text, instagram_id dtype real, thomas dtype integer, twitter dtype text, twitter_id dtype real, youtube dtype text, youtube_id dtype text,
|
legislator
|
What is the name of the legislator with the ID of W000059?
|
name of the legislator = first_name, last_name; ID of W000059 refers to bioguide_id = 'W000059';
|
SELECT first_name, last_name FROM historical WHERE bioguide_id = 'W000059'
|
database name:db_id legislator
current table current Cols: ballotpedia id dtype text, bioguide id dtype text, birthday bio dtype date, cspan id dtype real, fec id dtype text, first name dtype text, gender bio dtype text, google entity id dtype text, govtrack id dtype integer, house history id dtype real, interuniversity consortium for political and social research id dtype real, last name dtype text, legislator id dtype text, maplight id dtype real, middle name dtype text, nickname dtype text, official full name dtype text, opensecrets id dtype text, religion bio dtype text, suffix name dtype text, thomas id dtype integer, votesmart id dtype real, wikidata id dtype text, wikipedia id dtype text,
current-terms table current-terms Cols: address dtype text, bioguide id dtype text, caucus dtype text, chamber dtype text, class dtype real, contact_form dtype text, district dtype real, end dtype text, fax dtype text, last dtype text, name dtype text, office dtype text, party dtype text, party affiliations dtype text, phone dtype text, relation dtype text, Really Simple Syndication URL dtype text, start dtype text, state dtype text, state_rank dtype text, title dtype text, type dtype text, url dtype text,
historical table historical Cols: ballotpedia id dtype text, bioguide id dtype text, bioguide previous id dtype text, birthday bio dtype text, cspan id dtype text, fec id dtype text, first name dtype text, gender bio dtype text, google entity id dtype text, govtrack id dtype integer, house history alternate id dtype text, house history id dtype real, interuniversity consortium for political and social research id dtype real, last name dtype text, legislator id dtype text, maplight id dtype text, middle name dtype text, nickname dtype text, official full name dtype text, opensecrets id dtype text, religion bio dtype text, suffix name dtype text, thomas id dtype text, votesmart id dtype text, wikidata id dtype text, wikipedia id dtype text,
historical-terms table historical-terms Cols: address dtype text, bioguide id dtype text, chamber dtype text, class dtype real, contact_form dtype text, district dtype real, end dtype text, fax dtype text, last dtype text, middle dtype text, name dtype text, office dtype text, party dtype text, party affiliations dtype text, phone dtype text, relation dtype text, Really Simple Syndication URL dtype text, start dtype text, state dtype text, state_rank dtype text, title dtype text, type dtype text, url dtype text,
social-media table social-media Cols: bioguide dtype text, facebook dtype text, facebook_id dtype real, govtrack dtype real, instagram dtype text, instagram_id dtype real, thomas dtype integer, twitter dtype text, twitter_id dtype real, youtube dtype text, youtube_id dtype text,
|
legislator
|
Does Thomas Carnes have an account on ballotpedia.org?
|
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;
|
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'
|
database name:db_id legislator
current table current Cols: ballotpedia id dtype text, bioguide id dtype text, birthday bio dtype date, cspan id dtype real, fec id dtype text, first name dtype text, gender bio dtype text, google entity id dtype text, govtrack id dtype integer, house history id dtype real, interuniversity consortium for political and social research id dtype real, last name dtype text, legislator id dtype text, maplight id dtype real, middle name dtype text, nickname dtype text, official full name dtype text, opensecrets id dtype text, religion bio dtype text, suffix name dtype text, thomas id dtype integer, votesmart id dtype real, wikidata id dtype text, wikipedia id dtype text,
current-terms table current-terms Cols: address dtype text, bioguide id dtype text, caucus dtype text, chamber dtype text, class dtype real, contact_form dtype text, district dtype real, end dtype text, fax dtype text, last dtype text, name dtype text, office dtype text, party dtype text, party affiliations dtype text, phone dtype text, relation dtype text, Really Simple Syndication URL dtype text, start dtype text, state dtype text, state_rank dtype text, title dtype text, type dtype text, url dtype text,
historical table historical Cols: ballotpedia id dtype text, bioguide id dtype text, bioguide previous id dtype text, birthday bio dtype text, cspan id dtype text, fec id dtype text, first name dtype text, gender bio dtype text, google entity id dtype text, govtrack id dtype integer, house history alternate id dtype text, house history id dtype real, interuniversity consortium for political and social research id dtype real, last name dtype text, legislator id dtype text, maplight id dtype text, middle name dtype text, nickname dtype text, official full name dtype text, opensecrets id dtype text, religion bio dtype text, suffix name dtype text, thomas id dtype text, votesmart id dtype text, wikidata id dtype text, wikipedia id dtype text,
historical-terms table historical-terms Cols: address dtype text, bioguide id dtype text, chamber dtype text, class dtype real, contact_form dtype text, district dtype real, end dtype text, fax dtype text, last dtype text, middle dtype text, name dtype text, office dtype text, party dtype text, party affiliations dtype text, phone dtype text, relation dtype text, Really Simple Syndication URL dtype text, start dtype text, state dtype text, state_rank dtype text, title dtype text, type dtype text, url dtype text,
social-media table social-media Cols: bioguide dtype text, facebook dtype text, facebook_id dtype real, govtrack dtype real, instagram dtype text, instagram_id dtype real, thomas dtype integer, twitter dtype text, twitter_id dtype real, youtube dtype text, youtube_id dtype text,
|
legislator
|
How many legislators were born in 1736?
|
born in 1736 refers to birthday_bio like '1736%';
|
SELECT COUNT(bioguide_id) FROM historical WHERE birthday_bio LIKE '1736%'
|
database name:db_id legislator
current table current Cols: ballotpedia id dtype text, bioguide id dtype text, birthday bio dtype date, cspan id dtype real, fec id dtype text, first name dtype text, gender bio dtype text, google entity id dtype text, govtrack id dtype integer, house history id dtype real, interuniversity consortium for political and social research id dtype real, last name dtype text, legislator id dtype text, maplight id dtype real, middle name dtype text, nickname dtype text, official full name dtype text, opensecrets id dtype text, religion bio dtype text, suffix name dtype text, thomas id dtype integer, votesmart id dtype real, wikidata id dtype text, wikipedia id dtype text,
current-terms table current-terms Cols: address dtype text, bioguide id dtype text, caucus dtype text, chamber dtype text, class dtype real, contact_form dtype text, district dtype real, end dtype text, fax dtype text, last dtype text, name dtype text, office dtype text, party dtype text, party affiliations dtype text, phone dtype text, relation dtype text, Really Simple Syndication URL dtype text, start dtype text, state dtype text, state_rank dtype text, title dtype text, type dtype text, url dtype text,
historical table historical Cols: ballotpedia id dtype text, bioguide id dtype text, bioguide previous id dtype text, birthday bio dtype text, cspan id dtype text, fec id dtype text, first name dtype text, gender bio dtype text, google entity id dtype text, govtrack id dtype integer, house history alternate id dtype text, house history id dtype real, interuniversity consortium for political and social research id dtype real, last name dtype text, legislator id dtype text, maplight id dtype text, middle name dtype text, nickname dtype text, official full name dtype text, opensecrets id dtype text, religion bio dtype text, suffix name dtype text, thomas id dtype text, votesmart id dtype text, wikidata id dtype text, wikipedia id dtype text,
historical-terms table historical-terms Cols: address dtype text, bioguide id dtype text, chamber dtype text, class dtype real, contact_form dtype text, district dtype real, end dtype text, fax dtype text, last dtype text, middle dtype text, name dtype text, office dtype text, party dtype text, party affiliations dtype text, phone dtype text, relation dtype text, Really Simple Syndication URL dtype text, start dtype text, state dtype text, state_rank dtype text, title dtype text, type dtype text, url dtype text,
social-media table social-media Cols: bioguide dtype text, facebook dtype text, facebook_id dtype real, govtrack dtype real, instagram dtype text, instagram_id dtype real, thomas dtype integer, twitter dtype text, twitter_id dtype real, youtube dtype text, youtube_id dtype text,
|
legislator
|
Which legislators are woman?
|
woman refers to gender_bio = 'F';
|
SELECT first_name, last_name FROM historical WHERE gender_bio = 'F'
|
database name:db_id legislator
current table current Cols: ballotpedia id dtype text, bioguide id dtype text, birthday bio dtype date, cspan id dtype real, fec id dtype text, first name dtype text, gender bio dtype text, google entity id dtype text, govtrack id dtype integer, house history id dtype real, interuniversity consortium for political and social research id dtype real, last name dtype text, legislator id dtype text, maplight id dtype real, middle name dtype text, nickname dtype text, official full name dtype text, opensecrets id dtype text, religion bio dtype text, suffix name dtype text, thomas id dtype integer, votesmart id dtype real, wikidata id dtype text, wikipedia id dtype text,
current-terms table current-terms Cols: address dtype text, bioguide id dtype text, caucus dtype text, chamber dtype text, class dtype real, contact_form dtype text, district dtype real, end dtype text, fax dtype text, last dtype text, name dtype text, office dtype text, party dtype text, party affiliations dtype text, phone dtype text, relation dtype text, Really Simple Syndication URL dtype text, start dtype text, state dtype text, state_rank dtype text, title dtype text, type dtype text, url dtype text,
historical table historical Cols: ballotpedia id dtype text, bioguide id dtype text, bioguide previous id dtype text, birthday bio dtype text, cspan id dtype text, fec id dtype text, first name dtype text, gender bio dtype text, google entity id dtype text, govtrack id dtype integer, house history alternate id dtype text, house history id dtype real, interuniversity consortium for political and social research id dtype real, last name dtype text, legislator id dtype text, maplight id dtype text, middle name dtype text, nickname dtype text, official full name dtype text, opensecrets id dtype text, religion bio dtype text, suffix name dtype text, thomas id dtype text, votesmart id dtype text, wikidata id dtype text, wikipedia id dtype text,
historical-terms table historical-terms Cols: address dtype text, bioguide id dtype text, chamber dtype text, class dtype real, contact_form dtype text, district dtype real, end dtype text, fax dtype text, last dtype text, middle dtype text, name dtype text, office dtype text, party dtype text, party affiliations dtype text, phone dtype text, relation dtype text, Really Simple Syndication URL dtype text, start dtype text, state dtype text, state_rank dtype text, title dtype text, type dtype text, url dtype text,
social-media table social-media Cols: bioguide dtype text, facebook dtype text, facebook_id dtype real, govtrack dtype real, instagram dtype text, instagram_id dtype real, thomas dtype integer, twitter dtype text, twitter_id dtype real, youtube dtype text, youtube_id dtype text,
|
legislator
|
How many districts are in Idaho?
|
Idaho refers to state = 'ID';
|
SELECT COUNT(district) FROM `current-terms` WHERE state = 'ID'
|
database name:db_id legislator
current table current Cols: ballotpedia id dtype text, bioguide id dtype text, birthday bio dtype date, cspan id dtype real, fec id dtype text, first name dtype text, gender bio dtype text, google entity id dtype text, govtrack id dtype integer, house history id dtype real, interuniversity consortium for political and social research id dtype real, last name dtype text, legislator id dtype text, maplight id dtype real, middle name dtype text, nickname dtype text, official full name dtype text, opensecrets id dtype text, religion bio dtype text, suffix name dtype text, thomas id dtype integer, votesmart id dtype real, wikidata id dtype text, wikipedia id dtype text,
current-terms table current-terms Cols: address dtype text, bioguide id dtype text, caucus dtype text, chamber dtype text, class dtype real, contact_form dtype text, district dtype real, end dtype text, fax dtype text, last dtype text, name dtype text, office dtype text, party dtype text, party affiliations dtype text, phone dtype text, relation dtype text, Really Simple Syndication URL dtype text, start dtype text, state dtype text, state_rank dtype text, title dtype text, type dtype text, url dtype text,
historical table historical Cols: ballotpedia id dtype text, bioguide id dtype text, bioguide previous id dtype text, birthday bio dtype text, cspan id dtype text, fec id dtype text, first name dtype text, gender bio dtype text, google entity id dtype text, govtrack id dtype integer, house history alternate id dtype text, house history id dtype real, interuniversity consortium for political and social research id dtype real, last name dtype text, legislator id dtype text, maplight id dtype text, middle name dtype text, nickname dtype text, official full name dtype text, opensecrets id dtype text, religion bio dtype text, suffix name dtype text, thomas id dtype text, votesmart id dtype text, wikidata id dtype text, wikipedia id dtype text,
historical-terms table historical-terms Cols: address dtype text, bioguide id dtype text, chamber dtype text, class dtype real, contact_form dtype text, district dtype real, end dtype text, fax dtype text, last dtype text, middle dtype text, name dtype text, office dtype text, party dtype text, party affiliations dtype text, phone dtype text, relation dtype text, Really Simple Syndication URL dtype text, start dtype text, state dtype text, state_rank dtype text, title dtype text, type dtype text, url dtype text,
social-media table social-media Cols: bioguide dtype text, facebook dtype text, facebook_id dtype real, govtrack dtype real, instagram dtype text, instagram_id dtype real, thomas dtype integer, twitter dtype text, twitter_id dtype real, youtube dtype text, youtube_id dtype text,
|
legislator
|
How many legislators are not senator?
|
not senator refers to class is null;
|
SELECT COUNT(bioguide) FROM `current-terms` WHERE class IS NULL
|
database name:db_id legislator
current table current Cols: ballotpedia id dtype text, bioguide id dtype text, birthday bio dtype date, cspan id dtype real, fec id dtype text, first name dtype text, gender bio dtype text, google entity id dtype text, govtrack id dtype integer, house history id dtype real, interuniversity consortium for political and social research id dtype real, last name dtype text, legislator id dtype text, maplight id dtype real, middle name dtype text, nickname dtype text, official full name dtype text, opensecrets id dtype text, religion bio dtype text, suffix name dtype text, thomas id dtype integer, votesmart id dtype real, wikidata id dtype text, wikipedia id dtype text,
current-terms table current-terms Cols: address dtype text, bioguide id dtype text, caucus dtype text, chamber dtype text, class dtype real, contact_form dtype text, district dtype real, end dtype text, fax dtype text, last dtype text, name dtype text, office dtype text, party dtype text, party affiliations dtype text, phone dtype text, relation dtype text, Really Simple Syndication URL dtype text, start dtype text, state dtype text, state_rank dtype text, title dtype text, type dtype text, url dtype text,
historical table historical Cols: ballotpedia id dtype text, bioguide id dtype text, bioguide previous id dtype text, birthday bio dtype text, cspan id dtype text, fec id dtype text, first name dtype text, gender bio dtype text, google entity id dtype text, govtrack id dtype integer, house history alternate id dtype text, house history id dtype real, interuniversity consortium for political and social research id dtype real, last name dtype text, legislator id dtype text, maplight id dtype text, middle name dtype text, nickname dtype text, official full name dtype text, opensecrets id dtype text, religion bio dtype text, suffix name dtype text, thomas id dtype text, votesmart id dtype text, wikidata id dtype text, wikipedia id dtype text,
historical-terms table historical-terms Cols: address dtype text, bioguide id dtype text, chamber dtype text, class dtype real, contact_form dtype text, district dtype real, end dtype text, fax dtype text, last dtype text, middle dtype text, name dtype text, office dtype text, party dtype text, party affiliations dtype text, phone dtype text, relation dtype text, Really Simple Syndication URL dtype text, start dtype text, state dtype text, state_rank dtype text, title dtype text, type dtype text, url dtype text,
social-media table social-media Cols: bioguide dtype text, facebook dtype text, facebook_id dtype real, govtrack dtype real, instagram dtype text, instagram_id dtype real, thomas dtype integer, twitter dtype text, twitter_id dtype real, youtube dtype text, youtube_id dtype text,
|
legislator
|
What is the ratio between male and female legislators?
|
ratio = DIVIDE(SUM(gender_bio = 'M'), SUM(gender_bio = 'F')); male refers to gender_bio = 'M'; female refers to gender_bio = 'F'
|
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 name:db_id legislator
current table current Cols: ballotpedia id dtype text, bioguide id dtype text, birthday bio dtype date, cspan id dtype real, fec id dtype text, first name dtype text, gender bio dtype text, google entity id dtype text, govtrack id dtype integer, house history id dtype real, interuniversity consortium for political and social research id dtype real, last name dtype text, legislator id dtype text, maplight id dtype real, middle name dtype text, nickname dtype text, official full name dtype text, opensecrets id dtype text, religion bio dtype text, suffix name dtype text, thomas id dtype integer, votesmart id dtype real, wikidata id dtype text, wikipedia id dtype text,
current-terms table current-terms Cols: address dtype text, bioguide id dtype text, caucus dtype text, chamber dtype text, class dtype real, contact_form dtype text, district dtype real, end dtype text, fax dtype text, last dtype text, name dtype text, office dtype text, party dtype text, party affiliations dtype text, phone dtype text, relation dtype text, Really Simple Syndication URL dtype text, start dtype text, state dtype text, state_rank dtype text, title dtype text, type dtype text, url dtype text,
historical table historical Cols: ballotpedia id dtype text, bioguide id dtype text, bioguide previous id dtype text, birthday bio dtype text, cspan id dtype text, fec id dtype text, first name dtype text, gender bio dtype text, google entity id dtype text, govtrack id dtype integer, house history alternate id dtype text, house history id dtype real, interuniversity consortium for political and social research id dtype real, last name dtype text, legislator id dtype text, maplight id dtype text, middle name dtype text, nickname dtype text, official full name dtype text, opensecrets id dtype text, religion bio dtype text, suffix name dtype text, thomas id dtype text, votesmart id dtype text, wikidata id dtype text, wikipedia id dtype text,
historical-terms table historical-terms Cols: address dtype text, bioguide id dtype text, chamber dtype text, class dtype real, contact_form dtype text, district dtype real, end dtype text, fax dtype text, last dtype text, middle dtype text, name dtype text, office dtype text, party dtype text, party affiliations dtype text, phone dtype text, relation dtype text, Really Simple Syndication URL dtype text, start dtype text, state dtype text, state_rank dtype text, title dtype text, type dtype text, url dtype text,
social-media table social-media Cols: bioguide dtype text, facebook dtype text, facebook_id dtype real, govtrack dtype real, instagram dtype text, instagram_id dtype real, thomas dtype integer, twitter dtype text, twitter_id dtype real, youtube dtype text, youtube_id dtype text,
|
legislator
|
Calculate the percentage of famous_legislatorss.
|
percentage = MULTIPLY(DIVIDE(SUM(wikipedia_id is not null), (bioguide_id)), 100.0); famous legislators refers to wikipedia_id is not null;
|
SELECT CAST(SUM(CASE WHEN wikipedia_id IS NOT NULL THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(bioguide_id) FROM historical
|
database name:db_id legislator
current table current Cols: ballotpedia id dtype text, bioguide id dtype text, birthday bio dtype date, cspan id dtype real, fec id dtype text, first name dtype text, gender bio dtype text, google entity id dtype text, govtrack id dtype integer, house history id dtype real, interuniversity consortium for political and social research id dtype real, last name dtype text, legislator id dtype text, maplight id dtype real, middle name dtype text, nickname dtype text, official full name dtype text, opensecrets id dtype text, religion bio dtype text, suffix name dtype text, thomas id dtype integer, votesmart id dtype real, wikidata id dtype text, wikipedia id dtype text,
current-terms table current-terms Cols: address dtype text, bioguide id dtype text, caucus dtype text, chamber dtype text, class dtype real, contact_form dtype text, district dtype real, end dtype text, fax dtype text, last dtype text, name dtype text, office dtype text, party dtype text, party affiliations dtype text, phone dtype text, relation dtype text, Really Simple Syndication URL dtype text, start dtype text, state dtype text, state_rank dtype text, title dtype text, type dtype text, url dtype text,
historical table historical Cols: ballotpedia id dtype text, bioguide id dtype text, bioguide previous id dtype text, birthday bio dtype text, cspan id dtype text, fec id dtype text, first name dtype text, gender bio dtype text, google entity id dtype text, govtrack id dtype integer, house history alternate id dtype text, house history id dtype real, interuniversity consortium for political and social research id dtype real, last name dtype text, legislator id dtype text, maplight id dtype text, middle name dtype text, nickname dtype text, official full name dtype text, opensecrets id dtype text, religion bio dtype text, suffix name dtype text, thomas id dtype text, votesmart id dtype text, wikidata id dtype text, wikipedia id dtype text,
historical-terms table historical-terms Cols: address dtype text, bioguide id dtype text, chamber dtype text, class dtype real, contact_form dtype text, district dtype real, end dtype text, fax dtype text, last dtype text, middle dtype text, name dtype text, office dtype text, party dtype text, party affiliations dtype text, phone dtype text, relation dtype text, Really Simple Syndication URL dtype text, start dtype text, state dtype text, state_rank dtype text, title dtype text, type dtype text, url dtype text,
social-media table social-media Cols: bioguide dtype text, facebook dtype text, facebook_id dtype real, govtrack dtype real, instagram dtype text, instagram_id dtype real, thomas dtype integer, twitter dtype text, twitter_id dtype real, youtube dtype text, youtube_id dtype text,
|
legislator
|
Which legislators do not have instagram account?
|
do not have instagram account refers to instagram is null;
|
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
|
database name:db_id legislator
current table current Cols: ballotpedia id dtype text, bioguide id dtype text, birthday bio dtype date, cspan id dtype real, fec id dtype text, first name dtype text, gender bio dtype text, google entity id dtype text, govtrack id dtype integer, house history id dtype real, interuniversity consortium for political and social research id dtype real, last name dtype text, legislator id dtype text, maplight id dtype real, middle name dtype text, nickname dtype text, official full name dtype text, opensecrets id dtype text, religion bio dtype text, suffix name dtype text, thomas id dtype integer, votesmart id dtype real, wikidata id dtype text, wikipedia id dtype text,
current-terms table current-terms Cols: address dtype text, bioguide id dtype text, caucus dtype text, chamber dtype text, class dtype real, contact_form dtype text, district dtype real, end dtype text, fax dtype text, last dtype text, name dtype text, office dtype text, party dtype text, party affiliations dtype text, phone dtype text, relation dtype text, Really Simple Syndication URL dtype text, start dtype text, state dtype text, state_rank dtype text, title dtype text, type dtype text, url dtype text,
historical table historical Cols: ballotpedia id dtype text, bioguide id dtype text, bioguide previous id dtype text, birthday bio dtype text, cspan id dtype text, fec id dtype text, first name dtype text, gender bio dtype text, google entity id dtype text, govtrack id dtype integer, house history alternate id dtype text, house history id dtype real, interuniversity consortium for political and social research id dtype real, last name dtype text, legislator id dtype text, maplight id dtype text, middle name dtype text, nickname dtype text, official full name dtype text, opensecrets id dtype text, religion bio dtype text, suffix name dtype text, thomas id dtype text, votesmart id dtype text, wikidata id dtype text, wikipedia id dtype text,
historical-terms table historical-terms Cols: address dtype text, bioguide id dtype text, chamber dtype text, class dtype real, contact_form dtype text, district dtype real, end dtype text, fax dtype text, last dtype text, middle dtype text, name dtype text, office dtype text, party dtype text, party affiliations dtype text, phone dtype text, relation dtype text, Really Simple Syndication URL dtype text, start dtype text, state dtype text, state_rank dtype text, title dtype text, type dtype text, url dtype text,
social-media table social-media Cols: bioguide dtype text, facebook dtype text, facebook_id dtype real, govtrack dtype real, instagram dtype text, instagram_id dtype real, thomas dtype integer, twitter dtype text, twitter_id dtype real, youtube dtype text, youtube_id dtype text,
|
legislator
|
List all the representatives in 1789 along with the districts and state.
|
representatives refers to type = 'rep'; in 1789 refers to start like '1789%';
|
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%'
|
database name:db_id legislator
current table current Cols: ballotpedia id dtype text, bioguide id dtype text, birthday bio dtype date, cspan id dtype real, fec id dtype text, first name dtype text, gender bio dtype text, google entity id dtype text, govtrack id dtype integer, house history id dtype real, interuniversity consortium for political and social research id dtype real, last name dtype text, legislator id dtype text, maplight id dtype real, middle name dtype text, nickname dtype text, official full name dtype text, opensecrets id dtype text, religion bio dtype text, suffix name dtype text, thomas id dtype integer, votesmart id dtype real, wikidata id dtype text, wikipedia id dtype text,
current-terms table current-terms Cols: address dtype text, bioguide id dtype text, caucus dtype text, chamber dtype text, class dtype real, contact_form dtype text, district dtype real, end dtype text, fax dtype text, last dtype text, name dtype text, office dtype text, party dtype text, party affiliations dtype text, phone dtype text, relation dtype text, Really Simple Syndication URL dtype text, start dtype text, state dtype text, state_rank dtype text, title dtype text, type dtype text, url dtype text,
historical table historical Cols: ballotpedia id dtype text, bioguide id dtype text, bioguide previous id dtype text, birthday bio dtype text, cspan id dtype text, fec id dtype text, first name dtype text, gender bio dtype text, google entity id dtype text, govtrack id dtype integer, house history alternate id dtype text, house history id dtype real, interuniversity consortium for political and social research id dtype real, last name dtype text, legislator id dtype text, maplight id dtype text, middle name dtype text, nickname dtype text, official full name dtype text, opensecrets id dtype text, religion bio dtype text, suffix name dtype text, thomas id dtype text, votesmart id dtype text, wikidata id dtype text, wikipedia id dtype text,
historical-terms table historical-terms Cols: address dtype text, bioguide id dtype text, chamber dtype text, class dtype real, contact_form dtype text, district dtype real, end dtype text, fax dtype text, last dtype text, middle dtype text, name dtype text, office dtype text, party dtype text, party affiliations dtype text, phone dtype text, relation dtype text, Really Simple Syndication URL dtype text, start dtype text, state dtype text, state_rank dtype text, title dtype text, type dtype text, url dtype text,
social-media table social-media Cols: bioguide dtype text, facebook dtype text, facebook_id dtype real, govtrack dtype real, instagram dtype text, instagram_id dtype real, thomas dtype integer, twitter dtype text, twitter_id dtype real, youtube dtype text, youtube_id dtype text,
|
legislator
|
State all the district that Benjamin Contee has served before.
| null |
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'
|
database name:db_id legislator
current table current Cols: ballotpedia id dtype text, bioguide id dtype text, birthday bio dtype date, cspan id dtype real, fec id dtype text, first name dtype text, gender bio dtype text, google entity id dtype text, govtrack id dtype integer, house history id dtype real, interuniversity consortium for political and social research id dtype real, last name dtype text, legislator id dtype text, maplight id dtype real, middle name dtype text, nickname dtype text, official full name dtype text, opensecrets id dtype text, religion bio dtype text, suffix name dtype text, thomas id dtype integer, votesmart id dtype real, wikidata id dtype text, wikipedia id dtype text,
current-terms table current-terms Cols: address dtype text, bioguide id dtype text, caucus dtype text, chamber dtype text, class dtype real, contact_form dtype text, district dtype real, end dtype text, fax dtype text, last dtype text, name dtype text, office dtype text, party dtype text, party affiliations dtype text, phone dtype text, relation dtype text, Really Simple Syndication URL dtype text, start dtype text, state dtype text, state_rank dtype text, title dtype text, type dtype text, url dtype text,
historical table historical Cols: ballotpedia id dtype text, bioguide id dtype text, bioguide previous id dtype text, birthday bio dtype text, cspan id dtype text, fec id dtype text, first name dtype text, gender bio dtype text, google entity id dtype text, govtrack id dtype integer, house history alternate id dtype text, house history id dtype real, interuniversity consortium for political and social research id dtype real, last name dtype text, legislator id dtype text, maplight id dtype text, middle name dtype text, nickname dtype text, official full name dtype text, opensecrets id dtype text, religion bio dtype text, suffix name dtype text, thomas id dtype text, votesmart id dtype text, wikidata id dtype text, wikipedia id dtype text,
historical-terms table historical-terms Cols: address dtype text, bioguide id dtype text, chamber dtype text, class dtype real, contact_form dtype text, district dtype real, end dtype text, fax dtype text, last dtype text, middle dtype text, name dtype text, office dtype text, party dtype text, party affiliations dtype text, phone dtype text, relation dtype text, Really Simple Syndication URL dtype text, start dtype text, state dtype text, state_rank dtype text, title dtype text, type dtype text, url dtype text,
social-media table social-media Cols: bioguide dtype text, facebook dtype text, facebook_id dtype real, govtrack dtype real, instagram dtype text, instagram_id dtype real, thomas dtype integer, twitter dtype text, twitter_id dtype real, youtube dtype text, youtube_id dtype text,
|
legislator
|
State the address of Amy Klobuchar at the term of 4th of January 2001.
|
at the term of 4th of January 2001 refers to start = '2001-04-01';
|
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'
|
database name:db_id legislator
current table current Cols: ballotpedia id dtype text, bioguide id dtype text, birthday bio dtype date, cspan id dtype real, fec id dtype text, first name dtype text, gender bio dtype text, google entity id dtype text, govtrack id dtype integer, house history id dtype real, interuniversity consortium for political and social research id dtype real, last name dtype text, legislator id dtype text, maplight id dtype real, middle name dtype text, nickname dtype text, official full name dtype text, opensecrets id dtype text, religion bio dtype text, suffix name dtype text, thomas id dtype integer, votesmart id dtype real, wikidata id dtype text, wikipedia id dtype text,
current-terms table current-terms Cols: address dtype text, bioguide id dtype text, caucus dtype text, chamber dtype text, class dtype real, contact_form dtype text, district dtype real, end dtype text, fax dtype text, last dtype text, name dtype text, office dtype text, party dtype text, party affiliations dtype text, phone dtype text, relation dtype text, Really Simple Syndication URL dtype text, start dtype text, state dtype text, state_rank dtype text, title dtype text, type dtype text, url dtype text,
historical table historical Cols: ballotpedia id dtype text, bioguide id dtype text, bioguide previous id dtype text, birthday bio dtype text, cspan id dtype text, fec id dtype text, first name dtype text, gender bio dtype text, google entity id dtype text, govtrack id dtype integer, house history alternate id dtype text, house history id dtype real, interuniversity consortium for political and social research id dtype real, last name dtype text, legislator id dtype text, maplight id dtype text, middle name dtype text, nickname dtype text, official full name dtype text, opensecrets id dtype text, religion bio dtype text, suffix name dtype text, thomas id dtype text, votesmart id dtype text, wikidata id dtype text, wikipedia id dtype text,
historical-terms table historical-terms Cols: address dtype text, bioguide id dtype text, chamber dtype text, class dtype real, contact_form dtype text, district dtype real, end dtype text, fax dtype text, last dtype text, middle dtype text, name dtype text, office dtype text, party dtype text, party affiliations dtype text, phone dtype text, relation dtype text, Really Simple Syndication URL dtype text, start dtype text, state dtype text, state_rank dtype text, title dtype text, type dtype text, url dtype text,
social-media table social-media Cols: bioguide dtype text, facebook dtype text, facebook_id dtype real, govtrack dtype real, instagram dtype text, instagram_id dtype real, thomas dtype integer, twitter dtype text, twitter_id dtype real, youtube dtype text, youtube_id dtype text,
|
legislator
|
List all the junior senators in 1997.
|
junior senators refers to state_rank = 'junior'; in 1997 refers to start like '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'
|
database name:db_id legislator
current table current Cols: ballotpedia id dtype text, bioguide id dtype text, birthday bio dtype date, cspan id dtype real, fec id dtype text, first name dtype text, gender bio dtype text, google entity id dtype text, govtrack id dtype integer, house history id dtype real, interuniversity consortium for political and social research id dtype real, last name dtype text, legislator id dtype text, maplight id dtype real, middle name dtype text, nickname dtype text, official full name dtype text, opensecrets id dtype text, religion bio dtype text, suffix name dtype text, thomas id dtype integer, votesmart id dtype real, wikidata id dtype text, wikipedia id dtype text,
current-terms table current-terms Cols: address dtype text, bioguide id dtype text, caucus dtype text, chamber dtype text, class dtype real, contact_form dtype text, district dtype real, end dtype text, fax dtype text, last dtype text, name dtype text, office dtype text, party dtype text, party affiliations dtype text, phone dtype text, relation dtype text, Really Simple Syndication URL dtype text, start dtype text, state dtype text, state_rank dtype text, title dtype text, type dtype text, url dtype text,
historical table historical Cols: ballotpedia id dtype text, bioguide id dtype text, bioguide previous id dtype text, birthday bio dtype text, cspan id dtype text, fec id dtype text, first name dtype text, gender bio dtype text, google entity id dtype text, govtrack id dtype integer, house history alternate id dtype text, house history id dtype real, interuniversity consortium for political and social research id dtype real, last name dtype text, legislator id dtype text, maplight id dtype text, middle name dtype text, nickname dtype text, official full name dtype text, opensecrets id dtype text, religion bio dtype text, suffix name dtype text, thomas id dtype text, votesmart id dtype text, wikidata id dtype text, wikipedia id dtype text,
historical-terms table historical-terms Cols: address dtype text, bioguide id dtype text, chamber dtype text, class dtype real, contact_form dtype text, district dtype real, end dtype text, fax dtype text, last dtype text, middle dtype text, name dtype text, office dtype text, party dtype text, party affiliations dtype text, phone dtype text, relation dtype text, Really Simple Syndication URL dtype text, start dtype text, state dtype text, state_rank dtype text, title dtype text, type dtype text, url dtype text,
social-media table social-media Cols: bioguide dtype text, facebook dtype text, facebook_id dtype real, govtrack dtype real, instagram dtype text, instagram_id dtype real, thomas dtype integer, twitter dtype text, twitter_id dtype real, youtube dtype text, youtube_id dtype text,
|
legislator
|
How many female legislators become representatives for California in 2015?
|
female legislators refers to gender_bio = 'F'; representatives refers to type = 'rep'; for California refers to state = 'CA'; in 2015 refers to the year of start date is '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'
|
database name:db_id legislator
current table current Cols: ballotpedia id dtype text, bioguide id dtype text, birthday bio dtype date, cspan id dtype real, fec id dtype text, first name dtype text, gender bio dtype text, google entity id dtype text, govtrack id dtype integer, house history id dtype real, interuniversity consortium for political and social research id dtype real, last name dtype text, legislator id dtype text, maplight id dtype real, middle name dtype text, nickname dtype text, official full name dtype text, opensecrets id dtype text, religion bio dtype text, suffix name dtype text, thomas id dtype integer, votesmart id dtype real, wikidata id dtype text, wikipedia id dtype text,
current-terms table current-terms Cols: address dtype text, bioguide id dtype text, caucus dtype text, chamber dtype text, class dtype real, contact_form dtype text, district dtype real, end dtype text, fax dtype text, last dtype text, name dtype text, office dtype text, party dtype text, party affiliations dtype text, phone dtype text, relation dtype text, Really Simple Syndication URL dtype text, start dtype text, state dtype text, state_rank dtype text, title dtype text, type dtype text, url dtype text,
historical table historical Cols: ballotpedia id dtype text, bioguide id dtype text, bioguide previous id dtype text, birthday bio dtype text, cspan id dtype text, fec id dtype text, first name dtype text, gender bio dtype text, google entity id dtype text, govtrack id dtype integer, house history alternate id dtype text, house history id dtype real, interuniversity consortium for political and social research id dtype real, last name dtype text, legislator id dtype text, maplight id dtype text, middle name dtype text, nickname dtype text, official full name dtype text, opensecrets id dtype text, religion bio dtype text, suffix name dtype text, thomas id dtype text, votesmart id dtype text, wikidata id dtype text, wikipedia id dtype text,
historical-terms table historical-terms Cols: address dtype text, bioguide id dtype text, chamber dtype text, class dtype real, contact_form dtype text, district dtype real, end dtype text, fax dtype text, last dtype text, middle dtype text, name dtype text, office dtype text, party dtype text, party affiliations dtype text, phone dtype text, relation dtype text, Really Simple Syndication URL dtype text, start dtype text, state dtype text, state_rank dtype text, title dtype text, type dtype text, url dtype text,
social-media table social-media Cols: bioguide dtype text, facebook dtype text, facebook_id dtype real, govtrack dtype real, instagram dtype text, instagram_id dtype real, thomas dtype integer, twitter dtype text, twitter_id dtype real, youtube dtype text, youtube_id dtype text,
|
legislator
|
What is the Twitter ID of Emanuel Cleaver?
| null |
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'
|
database name:db_id legislator
current table current Cols: ballotpedia id dtype text, bioguide id dtype text, birthday bio dtype date, cspan id dtype real, fec id dtype text, first name dtype text, gender bio dtype text, google entity id dtype text, govtrack id dtype integer, house history id dtype real, interuniversity consortium for political and social research id dtype real, last name dtype text, legislator id dtype text, maplight id dtype real, middle name dtype text, nickname dtype text, official full name dtype text, opensecrets id dtype text, religion bio dtype text, suffix name dtype text, thomas id dtype integer, votesmart id dtype real, wikidata id dtype text, wikipedia id dtype text,
current-terms table current-terms Cols: address dtype text, bioguide id dtype text, caucus dtype text, chamber dtype text, class dtype real, contact_form dtype text, district dtype real, end dtype text, fax dtype text, last dtype text, name dtype text, office dtype text, party dtype text, party affiliations dtype text, phone dtype text, relation dtype text, Really Simple Syndication URL dtype text, start dtype text, state dtype text, state_rank dtype text, title dtype text, type dtype text, url dtype text,
historical table historical Cols: ballotpedia id dtype text, bioguide id dtype text, bioguide previous id dtype text, birthday bio dtype text, cspan id dtype text, fec id dtype text, first name dtype text, gender bio dtype text, google entity id dtype text, govtrack id dtype integer, house history alternate id dtype text, house history id dtype real, interuniversity consortium for political and social research id dtype real, last name dtype text, legislator id dtype text, maplight id dtype text, middle name dtype text, nickname dtype text, official full name dtype text, opensecrets id dtype text, religion bio dtype text, suffix name dtype text, thomas id dtype text, votesmart id dtype text, wikidata id dtype text, wikipedia id dtype text,
historical-terms table historical-terms Cols: address dtype text, bioguide id dtype text, chamber dtype text, class dtype real, contact_form dtype text, district dtype real, end dtype text, fax dtype text, last dtype text, middle dtype text, name dtype text, office dtype text, party dtype text, party affiliations dtype text, phone dtype text, relation dtype text, Really Simple Syndication URL dtype text, start dtype text, state dtype text, state_rank dtype text, title dtype text, type dtype text, url dtype text,
social-media table social-media Cols: bioguide dtype text, facebook dtype text, facebook_id dtype real, govtrack dtype real, instagram dtype text, instagram_id dtype real, thomas dtype integer, twitter dtype text, twitter_id dtype real, youtube dtype text, youtube_id dtype text,
|
legislator
|
State all the Facebook ID for current legislators under the democrat party.
| null |
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
|
database name:db_id legislator
current table current Cols: ballotpedia id dtype text, bioguide id dtype text, birthday bio dtype date, cspan id dtype real, fec id dtype text, first name dtype text, gender bio dtype text, google entity id dtype text, govtrack id dtype integer, house history id dtype real, interuniversity consortium for political and social research id dtype real, last name dtype text, legislator id dtype text, maplight id dtype real, middle name dtype text, nickname dtype text, official full name dtype text, opensecrets id dtype text, religion bio dtype text, suffix name dtype text, thomas id dtype integer, votesmart id dtype real, wikidata id dtype text, wikipedia id dtype text,
current-terms table current-terms Cols: address dtype text, bioguide id dtype text, caucus dtype text, chamber dtype text, class dtype real, contact_form dtype text, district dtype real, end dtype text, fax dtype text, last dtype text, name dtype text, office dtype text, party dtype text, party affiliations dtype text, phone dtype text, relation dtype text, Really Simple Syndication URL dtype text, start dtype text, state dtype text, state_rank dtype text, title dtype text, type dtype text, url dtype text,
historical table historical Cols: ballotpedia id dtype text, bioguide id dtype text, bioguide previous id dtype text, birthday bio dtype text, cspan id dtype text, fec id dtype text, first name dtype text, gender bio dtype text, google entity id dtype text, govtrack id dtype integer, house history alternate id dtype text, house history id dtype real, interuniversity consortium for political and social research id dtype real, last name dtype text, legislator id dtype text, maplight id dtype text, middle name dtype text, nickname dtype text, official full name dtype text, opensecrets id dtype text, religion bio dtype text, suffix name dtype text, thomas id dtype text, votesmart id dtype text, wikidata id dtype text, wikipedia id dtype text,
historical-terms table historical-terms Cols: address dtype text, bioguide id dtype text, chamber dtype text, class dtype real, contact_form dtype text, district dtype real, end dtype text, fax dtype text, last dtype text, middle dtype text, name dtype text, office dtype text, party dtype text, party affiliations dtype text, phone dtype text, relation dtype text, Really Simple Syndication URL dtype text, start dtype text, state dtype text, state_rank dtype text, title dtype text, type dtype text, url dtype text,
social-media table social-media Cols: bioguide dtype text, facebook dtype text, facebook_id dtype real, govtrack dtype real, instagram dtype text, instagram_id dtype real, thomas dtype integer, twitter dtype text, twitter_id dtype real, youtube dtype text, youtube_id dtype text,
|
legislator
|
Which historical female legislator that have their term ended on the 3rd of March 1791?
|
female legislator refers to gender_bio = 'F'; term ended on the 3rd of March 1791 refers to end = '1791-03-03';
|
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'
|
database name:db_id legislator
current table current Cols: ballotpedia id dtype text, bioguide id dtype text, birthday bio dtype date, cspan id dtype real, fec id dtype text, first name dtype text, gender bio dtype text, google entity id dtype text, govtrack id dtype integer, house history id dtype real, interuniversity consortium for political and social research id dtype real, last name dtype text, legislator id dtype text, maplight id dtype real, middle name dtype text, nickname dtype text, official full name dtype text, opensecrets id dtype text, religion bio dtype text, suffix name dtype text, thomas id dtype integer, votesmart id dtype real, wikidata id dtype text, wikipedia id dtype text,
current-terms table current-terms Cols: address dtype text, bioguide id dtype text, caucus dtype text, chamber dtype text, class dtype real, contact_form dtype text, district dtype real, end dtype text, fax dtype text, last dtype text, name dtype text, office dtype text, party dtype text, party affiliations dtype text, phone dtype text, relation dtype text, Really Simple Syndication URL dtype text, start dtype text, state dtype text, state_rank dtype text, title dtype text, type dtype text, url dtype text,
historical table historical Cols: ballotpedia id dtype text, bioguide id dtype text, bioguide previous id dtype text, birthday bio dtype text, cspan id dtype text, fec id dtype text, first name dtype text, gender bio dtype text, google entity id dtype text, govtrack id dtype integer, house history alternate id dtype text, house history id dtype real, interuniversity consortium for political and social research id dtype real, last name dtype text, legislator id dtype text, maplight id dtype text, middle name dtype text, nickname dtype text, official full name dtype text, opensecrets id dtype text, religion bio dtype text, suffix name dtype text, thomas id dtype text, votesmart id dtype text, wikidata id dtype text, wikipedia id dtype text,
historical-terms table historical-terms Cols: address dtype text, bioguide id dtype text, chamber dtype text, class dtype real, contact_form dtype text, district dtype real, end dtype text, fax dtype text, last dtype text, middle dtype text, name dtype text, office dtype text, party dtype text, party affiliations dtype text, phone dtype text, relation dtype text, Really Simple Syndication URL dtype text, start dtype text, state dtype text, state_rank dtype text, title dtype text, type dtype text, url dtype text,
social-media table social-media Cols: bioguide dtype text, facebook dtype text, facebook_id dtype real, govtrack dtype real, instagram dtype text, instagram_id dtype real, thomas dtype integer, twitter dtype text, twitter_id dtype real, youtube dtype text, youtube_id dtype text,
|
legislator
|
List all the Jewish current legislators that had served in Florida.
|
Jewish refers to religion_bio = 'Jewish'; in Florida refers to state = 'FL';
|
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
|
database name:db_id legislator
current table current Cols: ballotpedia id dtype text, bioguide id dtype text, birthday bio dtype date, cspan id dtype real, fec id dtype text, first name dtype text, gender bio dtype text, google entity id dtype text, govtrack id dtype integer, house history id dtype real, interuniversity consortium for political and social research id dtype real, last name dtype text, legislator id dtype text, maplight id dtype real, middle name dtype text, nickname dtype text, official full name dtype text, opensecrets id dtype text, religion bio dtype text, suffix name dtype text, thomas id dtype integer, votesmart id dtype real, wikidata id dtype text, wikipedia id dtype text,
current-terms table current-terms Cols: address dtype text, bioguide id dtype text, caucus dtype text, chamber dtype text, class dtype real, contact_form dtype text, district dtype real, end dtype text, fax dtype text, last dtype text, name dtype text, office dtype text, party dtype text, party affiliations dtype text, phone dtype text, relation dtype text, Really Simple Syndication URL dtype text, start dtype text, state dtype text, state_rank dtype text, title dtype text, type dtype text, url dtype text,
historical table historical Cols: ballotpedia id dtype text, bioguide id dtype text, bioguide previous id dtype text, birthday bio dtype text, cspan id dtype text, fec id dtype text, first name dtype text, gender bio dtype text, google entity id dtype text, govtrack id dtype integer, house history alternate id dtype text, house history id dtype real, interuniversity consortium for political and social research id dtype real, last name dtype text, legislator id dtype text, maplight id dtype text, middle name dtype text, nickname dtype text, official full name dtype text, opensecrets id dtype text, religion bio dtype text, suffix name dtype text, thomas id dtype text, votesmart id dtype text, wikidata id dtype text, wikipedia id dtype text,
historical-terms table historical-terms Cols: address dtype text, bioguide id dtype text, chamber dtype text, class dtype real, contact_form dtype text, district dtype real, end dtype text, fax dtype text, last dtype text, middle dtype text, name dtype text, office dtype text, party dtype text, party affiliations dtype text, phone dtype text, relation dtype text, Really Simple Syndication URL dtype text, start dtype text, state dtype text, state_rank dtype text, title dtype text, type dtype text, url dtype text,
social-media table social-media Cols: bioguide dtype text, facebook dtype text, facebook_id dtype real, govtrack dtype real, instagram dtype text, instagram_id dtype real, thomas dtype integer, twitter dtype text, twitter_id dtype real, youtube dtype text, youtube_id dtype text,
|
legislator
|
What is the ratio between famous current legislators and famous historical legislators?
|
ratio = DIVIDE(COUNT(current.bioguide_id WHERE current.wikipedia_id is not null), COUNT(historical.bioguide_id WHERE historical.wikipedia_id is not null)); famous current legislators refers to current.wikipedia_id is not null; famous historical legislators refers to historical.wikipedia_id is not null;
|
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
|
database name:db_id legislator
current table current Cols: ballotpedia id dtype text, bioguide id dtype text, birthday bio dtype date, cspan id dtype real, fec id dtype text, first name dtype text, gender bio dtype text, google entity id dtype text, govtrack id dtype integer, house history id dtype real, interuniversity consortium for political and social research id dtype real, last name dtype text, legislator id dtype text, maplight id dtype real, middle name dtype text, nickname dtype text, official full name dtype text, opensecrets id dtype text, religion bio dtype text, suffix name dtype text, thomas id dtype integer, votesmart id dtype real, wikidata id dtype text, wikipedia id dtype text,
current-terms table current-terms Cols: address dtype text, bioguide id dtype text, caucus dtype text, chamber dtype text, class dtype real, contact_form dtype text, district dtype real, end dtype text, fax dtype text, last dtype text, name dtype text, office dtype text, party dtype text, party affiliations dtype text, phone dtype text, relation dtype text, Really Simple Syndication URL dtype text, start dtype text, state dtype text, state_rank dtype text, title dtype text, type dtype text, url dtype text,
historical table historical Cols: ballotpedia id dtype text, bioguide id dtype text, bioguide previous id dtype text, birthday bio dtype text, cspan id dtype text, fec id dtype text, first name dtype text, gender bio dtype text, google entity id dtype text, govtrack id dtype integer, house history alternate id dtype text, house history id dtype real, interuniversity consortium for political and social research id dtype real, last name dtype text, legislator id dtype text, maplight id dtype text, middle name dtype text, nickname dtype text, official full name dtype text, opensecrets id dtype text, religion bio dtype text, suffix name dtype text, thomas id dtype text, votesmart id dtype text, wikidata id dtype text, wikipedia id dtype text,
historical-terms table historical-terms Cols: address dtype text, bioguide id dtype text, chamber dtype text, class dtype real, contact_form dtype text, district dtype real, end dtype text, fax dtype text, last dtype text, middle dtype text, name dtype text, office dtype text, party dtype text, party affiliations dtype text, phone dtype text, relation dtype text, Really Simple Syndication URL dtype text, start dtype text, state dtype text, state_rank dtype text, title dtype text, type dtype text, url dtype text,
social-media table social-media Cols: bioguide dtype text, facebook dtype text, facebook_id dtype real, govtrack dtype real, instagram dtype text, instagram_id dtype real, thomas dtype integer, twitter dtype text, twitter_id dtype real, youtube dtype text, youtube_id dtype text,
|
legislator
|
Based on the number of current legislators, calculate the percentage of legislators that served in 21st-Century.
|
percentage = MULTIPLY(DIVIDE(SUM(strftime('%Y', start) between '2000' and '2017'), COUNT(bioguide_id)), 100.0); 1st-Century refers to strftime('%Y', T2.start) between '2000' and '2017';
|
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
|
database name:db_id legislator
current table current Cols: ballotpedia id dtype text, bioguide id dtype text, birthday bio dtype date, cspan id dtype real, fec id dtype text, first name dtype text, gender bio dtype text, google entity id dtype text, govtrack id dtype integer, house history id dtype real, interuniversity consortium for political and social research id dtype real, last name dtype text, legislator id dtype text, maplight id dtype real, middle name dtype text, nickname dtype text, official full name dtype text, opensecrets id dtype text, religion bio dtype text, suffix name dtype text, thomas id dtype integer, votesmart id dtype real, wikidata id dtype text, wikipedia id dtype text,
current-terms table current-terms Cols: address dtype text, bioguide id dtype text, caucus dtype text, chamber dtype text, class dtype real, contact_form dtype text, district dtype real, end dtype text, fax dtype text, last dtype text, name dtype text, office dtype text, party dtype text, party affiliations dtype text, phone dtype text, relation dtype text, Really Simple Syndication URL dtype text, start dtype text, state dtype text, state_rank dtype text, title dtype text, type dtype text, url dtype text,
historical table historical Cols: ballotpedia id dtype text, bioguide id dtype text, bioguide previous id dtype text, birthday bio dtype text, cspan id dtype text, fec id dtype text, first name dtype text, gender bio dtype text, google entity id dtype text, govtrack id dtype integer, house history alternate id dtype text, house history id dtype real, interuniversity consortium for political and social research id dtype real, last name dtype text, legislator id dtype text, maplight id dtype text, middle name dtype text, nickname dtype text, official full name dtype text, opensecrets id dtype text, religion bio dtype text, suffix name dtype text, thomas id dtype text, votesmart id dtype text, wikidata id dtype text, wikipedia id dtype text,
historical-terms table historical-terms Cols: address dtype text, bioguide id dtype text, chamber dtype text, class dtype real, contact_form dtype text, district dtype real, end dtype text, fax dtype text, last dtype text, middle dtype text, name dtype text, office dtype text, party dtype text, party affiliations dtype text, phone dtype text, relation dtype text, Really Simple Syndication URL dtype text, start dtype text, state dtype text, state_rank dtype text, title dtype text, type dtype text, url dtype text,
social-media table social-media Cols: bioguide dtype text, facebook dtype text, facebook_id dtype real, govtrack dtype real, instagram dtype text, instagram_id dtype real, thomas dtype integer, twitter dtype text, twitter_id dtype real, youtube dtype text, youtube_id dtype text,
|
legislator
|
How many Catholic legislators do not have an account on ballotpedia.org?
|
Catholic refers to religion_bio = 'Catholic'; do not have an account on ballotpedia.org refers to ballotpedia_id is null;
|
SELECT COUNT(bioguide_id) FROM historical WHERE religion_bio = 'Catholic' AND ballotpedia_id IS NULL
|
database name:db_id legislator
current table current Cols: ballotpedia id dtype text, bioguide id dtype text, birthday bio dtype date, cspan id dtype real, fec id dtype text, first name dtype text, gender bio dtype text, google entity id dtype text, govtrack id dtype integer, house history id dtype real, interuniversity consortium for political and social research id dtype real, last name dtype text, legislator id dtype text, maplight id dtype real, middle name dtype text, nickname dtype text, official full name dtype text, opensecrets id dtype text, religion bio dtype text, suffix name dtype text, thomas id dtype integer, votesmart id dtype real, wikidata id dtype text, wikipedia id dtype text,
current-terms table current-terms Cols: address dtype text, bioguide id dtype text, caucus dtype text, chamber dtype text, class dtype real, contact_form dtype text, district dtype real, end dtype text, fax dtype text, last dtype text, name dtype text, office dtype text, party dtype text, party affiliations dtype text, phone dtype text, relation dtype text, Really Simple Syndication URL dtype text, start dtype text, state dtype text, state_rank dtype text, title dtype text, type dtype text, url dtype text,
historical table historical Cols: ballotpedia id dtype text, bioguide id dtype text, bioguide previous id dtype text, birthday bio dtype text, cspan id dtype text, fec id dtype text, first name dtype text, gender bio dtype text, google entity id dtype text, govtrack id dtype integer, house history alternate id dtype text, house history id dtype real, interuniversity consortium for political and social research id dtype real, last name dtype text, legislator id dtype text, maplight id dtype text, middle name dtype text, nickname dtype text, official full name dtype text, opensecrets id dtype text, religion bio dtype text, suffix name dtype text, thomas id dtype text, votesmart id dtype text, wikidata id dtype text, wikipedia id dtype text,
historical-terms table historical-terms Cols: address dtype text, bioguide id dtype text, chamber dtype text, class dtype real, contact_form dtype text, district dtype real, end dtype text, fax dtype text, last dtype text, middle dtype text, name dtype text, office dtype text, party dtype text, party affiliations dtype text, phone dtype text, relation dtype text, Really Simple Syndication URL dtype text, start dtype text, state dtype text, state_rank dtype text, title dtype text, type dtype text, url dtype text,
social-media table social-media Cols: bioguide dtype text, facebook dtype text, facebook_id dtype real, govtrack dtype real, instagram dtype text, instagram_id dtype real, thomas dtype integer, twitter dtype text, twitter_id dtype real, youtube dtype text, youtube_id dtype text,
|
legislator
|
How many class 1 senators belong to the Republican party?
|
senators refers to type = 'sen';
|
SELECT COUNT(bioguide) FROM `current-terms` WHERE class = 1 AND party = 'Republican'
|
database name:db_id legislator
current table current Cols: ballotpedia id dtype text, bioguide id dtype text, birthday bio dtype date, cspan id dtype real, fec id dtype text, first name dtype text, gender bio dtype text, google entity id dtype text, govtrack id dtype integer, house history id dtype real, interuniversity consortium for political and social research id dtype real, last name dtype text, legislator id dtype text, maplight id dtype real, middle name dtype text, nickname dtype text, official full name dtype text, opensecrets id dtype text, religion bio dtype text, suffix name dtype text, thomas id dtype integer, votesmart id dtype real, wikidata id dtype text, wikipedia id dtype text,
current-terms table current-terms Cols: address dtype text, bioguide id dtype text, caucus dtype text, chamber dtype text, class dtype real, contact_form dtype text, district dtype real, end dtype text, fax dtype text, last dtype text, name dtype text, office dtype text, party dtype text, party affiliations dtype text, phone dtype text, relation dtype text, Really Simple Syndication URL dtype text, start dtype text, state dtype text, state_rank dtype text, title dtype text, type dtype text, url dtype text,
historical table historical Cols: ballotpedia id dtype text, bioguide id dtype text, bioguide previous id dtype text, birthday bio dtype text, cspan id dtype text, fec id dtype text, first name dtype text, gender bio dtype text, google entity id dtype text, govtrack id dtype integer, house history alternate id dtype text, house history id dtype real, interuniversity consortium for political and social research id dtype real, last name dtype text, legislator id dtype text, maplight id dtype text, middle name dtype text, nickname dtype text, official full name dtype text, opensecrets id dtype text, religion bio dtype text, suffix name dtype text, thomas id dtype text, votesmart id dtype text, wikidata id dtype text, wikipedia id dtype text,
historical-terms table historical-terms Cols: address dtype text, bioguide id dtype text, chamber dtype text, class dtype real, contact_form dtype text, district dtype real, end dtype text, fax dtype text, last dtype text, middle dtype text, name dtype text, office dtype text, party dtype text, party affiliations dtype text, phone dtype text, relation dtype text, Really Simple Syndication URL dtype text, start dtype text, state dtype text, state_rank dtype text, title dtype text, type dtype text, url dtype text,
social-media table social-media Cols: bioguide dtype text, facebook dtype text, facebook_id dtype real, govtrack dtype real, instagram dtype text, instagram_id dtype real, thomas dtype integer, twitter dtype text, twitter_id dtype real, youtube dtype text, youtube_id dtype text,
|
legislator
|
What are the full names of the non-google female entity legislators that have not been registered in Federal Election Commission data?
|
full names = first_name, last_name; non-google entity refers to google_entity_id_id is null; female refers to gender_bio = 'F'; have not been registered in Federal Election Commission data refers to fec_id is null;
|
SELECT first_name, last_name FROM historical WHERE gender_bio = 'F' AND google_entity_id_id IS NULL AND fec_id IS NULL
|
database name:db_id legislator
current table current Cols: ballotpedia id dtype text, bioguide id dtype text, birthday bio dtype date, cspan id dtype real, fec id dtype text, first name dtype text, gender bio dtype text, google entity id dtype text, govtrack id dtype integer, house history id dtype real, interuniversity consortium for political and social research id dtype real, last name dtype text, legislator id dtype text, maplight id dtype real, middle name dtype text, nickname dtype text, official full name dtype text, opensecrets id dtype text, religion bio dtype text, suffix name dtype text, thomas id dtype integer, votesmart id dtype real, wikidata id dtype text, wikipedia id dtype text,
current-terms table current-terms Cols: address dtype text, bioguide id dtype text, caucus dtype text, chamber dtype text, class dtype real, contact_form dtype text, district dtype real, end dtype text, fax dtype text, last dtype text, name dtype text, office dtype text, party dtype text, party affiliations dtype text, phone dtype text, relation dtype text, Really Simple Syndication URL dtype text, start dtype text, state dtype text, state_rank dtype text, title dtype text, type dtype text, url dtype text,
historical table historical Cols: ballotpedia id dtype text, bioguide id dtype text, bioguide previous id dtype text, birthday bio dtype text, cspan id dtype text, fec id dtype text, first name dtype text, gender bio dtype text, google entity id dtype text, govtrack id dtype integer, house history alternate id dtype text, house history id dtype real, interuniversity consortium for political and social research id dtype real, last name dtype text, legislator id dtype text, maplight id dtype text, middle name dtype text, nickname dtype text, official full name dtype text, opensecrets id dtype text, religion bio dtype text, suffix name dtype text, thomas id dtype text, votesmart id dtype text, wikidata id dtype text, wikipedia id dtype text,
historical-terms table historical-terms Cols: address dtype text, bioguide id dtype text, chamber dtype text, class dtype real, contact_form dtype text, district dtype real, end dtype text, fax dtype text, last dtype text, middle dtype text, name dtype text, office dtype text, party dtype text, party affiliations dtype text, phone dtype text, relation dtype text, Really Simple Syndication URL dtype text, start dtype text, state dtype text, state_rank dtype text, title dtype text, type dtype text, url dtype text,
social-media table social-media Cols: bioguide dtype text, facebook dtype text, facebook_id dtype real, govtrack dtype real, instagram dtype text, instagram_id dtype real, thomas dtype integer, twitter dtype text, twitter_id dtype real, youtube dtype text, youtube_id dtype text,
|
legislator
|
In California, how many representatives ended their term in 1995?
|
California refers to state = 'CA'; representatives refers to type = 'rep'; ended the term in 1995 refers to end like '1995%';
|
SELECT COUNT(*) FROM `current-terms` WHERE state = 'CA' AND type = 'rep' AND end LIKE '1995%'
|
database name:db_id legislator
current table current Cols: ballotpedia id dtype text, bioguide id dtype text, birthday bio dtype date, cspan id dtype real, fec id dtype text, first name dtype text, gender bio dtype text, google entity id dtype text, govtrack id dtype integer, house history id dtype real, interuniversity consortium for political and social research id dtype real, last name dtype text, legislator id dtype text, maplight id dtype real, middle name dtype text, nickname dtype text, official full name dtype text, opensecrets id dtype text, religion bio dtype text, suffix name dtype text, thomas id dtype integer, votesmart id dtype real, wikidata id dtype text, wikipedia id dtype text,
current-terms table current-terms Cols: address dtype text, bioguide id dtype text, caucus dtype text, chamber dtype text, class dtype real, contact_form dtype text, district dtype real, end dtype text, fax dtype text, last dtype text, name dtype text, office dtype text, party dtype text, party affiliations dtype text, phone dtype text, relation dtype text, Really Simple Syndication URL dtype text, start dtype text, state dtype text, state_rank dtype text, title dtype text, type dtype text, url dtype text,
historical table historical Cols: ballotpedia id dtype text, bioguide id dtype text, bioguide previous id dtype text, birthday bio dtype text, cspan id dtype text, fec id dtype text, first name dtype text, gender bio dtype text, google entity id dtype text, govtrack id dtype integer, house history alternate id dtype text, house history id dtype real, interuniversity consortium for political and social research id dtype real, last name dtype text, legislator id dtype text, maplight id dtype text, middle name dtype text, nickname dtype text, official full name dtype text, opensecrets id dtype text, religion bio dtype text, suffix name dtype text, thomas id dtype text, votesmart id dtype text, wikidata id dtype text, wikipedia id dtype text,
historical-terms table historical-terms Cols: address dtype text, bioguide id dtype text, chamber dtype text, class dtype real, contact_form dtype text, district dtype real, end dtype text, fax dtype text, last dtype text, middle dtype text, name dtype text, office dtype text, party dtype text, party affiliations dtype text, phone dtype text, relation dtype text, Really Simple Syndication URL dtype text, start dtype text, state dtype text, state_rank dtype text, title dtype text, type dtype text, url dtype text,
social-media table social-media Cols: bioguide dtype text, facebook dtype text, facebook_id dtype real, govtrack dtype real, instagram dtype text, instagram_id dtype real, thomas dtype integer, twitter dtype text, twitter_id dtype real, youtube dtype text, youtube_id dtype text,
|
legislator
|
What is the full name of the oldest legislator?
|
full name = first_name, last_name; oldest legislator refers to MIN(birthday_bio);
|
SELECT first_name, last_name FROM historical ORDER BY birthday_bio LIMIT 1
|
database name:db_id legislator
current table current Cols: ballotpedia id dtype text, bioguide id dtype text, birthday bio dtype date, cspan id dtype real, fec id dtype text, first name dtype text, gender bio dtype text, google entity id dtype text, govtrack id dtype integer, house history id dtype real, interuniversity consortium for political and social research id dtype real, last name dtype text, legislator id dtype text, maplight id dtype real, middle name dtype text, nickname dtype text, official full name dtype text, opensecrets id dtype text, religion bio dtype text, suffix name dtype text, thomas id dtype integer, votesmart id dtype real, wikidata id dtype text, wikipedia id dtype text,
current-terms table current-terms Cols: address dtype text, bioguide id dtype text, caucus dtype text, chamber dtype text, class dtype real, contact_form dtype text, district dtype real, end dtype text, fax dtype text, last dtype text, name dtype text, office dtype text, party dtype text, party affiliations dtype text, phone dtype text, relation dtype text, Really Simple Syndication URL dtype text, start dtype text, state dtype text, state_rank dtype text, title dtype text, type dtype text, url dtype text,
historical table historical Cols: ballotpedia id dtype text, bioguide id dtype text, bioguide previous id dtype text, birthday bio dtype text, cspan id dtype text, fec id dtype text, first name dtype text, gender bio dtype text, google entity id dtype text, govtrack id dtype integer, house history alternate id dtype text, house history id dtype real, interuniversity consortium for political and social research id dtype real, last name dtype text, legislator id dtype text, maplight id dtype text, middle name dtype text, nickname dtype text, official full name dtype text, opensecrets id dtype text, religion bio dtype text, suffix name dtype text, thomas id dtype text, votesmart id dtype text, wikidata id dtype text, wikipedia id dtype text,
historical-terms table historical-terms Cols: address dtype text, bioguide id dtype text, chamber dtype text, class dtype real, contact_form dtype text, district dtype real, end dtype text, fax dtype text, last dtype text, middle dtype text, name dtype text, office dtype text, party dtype text, party affiliations dtype text, phone dtype text, relation dtype text, Really Simple Syndication URL dtype text, start dtype text, state dtype text, state_rank dtype text, title dtype text, type dtype text, url dtype text,
social-media table social-media Cols: bioguide dtype text, facebook dtype text, facebook_id dtype real, govtrack dtype real, instagram dtype text, instagram_id dtype real, thomas dtype integer, twitter dtype text, twitter_id dtype real, youtube dtype text, youtube_id dtype text,
|
legislator
|
List all of the ids of the representatives belonging to the Democrat party in district 13 that ended their term on 1/3/2019?
|
ids refers to bioguide; representatives refers to type = 'rep'; ended the term on 1/3/2019 refers to end = '2019-01-03';
|
SELECT bioguide FROM `current-terms` WHERE type = 'rep' AND party = 'Democrat' AND end = '2019-01-03' AND district = 13
|
database name:db_id legislator
current table current Cols: ballotpedia id dtype text, bioguide id dtype text, birthday bio dtype date, cspan id dtype real, fec id dtype text, first name dtype text, gender bio dtype text, google entity id dtype text, govtrack id dtype integer, house history id dtype real, interuniversity consortium for political and social research id dtype real, last name dtype text, legislator id dtype text, maplight id dtype real, middle name dtype text, nickname dtype text, official full name dtype text, opensecrets id dtype text, religion bio dtype text, suffix name dtype text, thomas id dtype integer, votesmart id dtype real, wikidata id dtype text, wikipedia id dtype text,
current-terms table current-terms Cols: address dtype text, bioguide id dtype text, caucus dtype text, chamber dtype text, class dtype real, contact_form dtype text, district dtype real, end dtype text, fax dtype text, last dtype text, name dtype text, office dtype text, party dtype text, party affiliations dtype text, phone dtype text, relation dtype text, Really Simple Syndication URL dtype text, start dtype text, state dtype text, state_rank dtype text, title dtype text, type dtype text, url dtype text,
historical table historical Cols: ballotpedia id dtype text, bioguide id dtype text, bioguide previous id dtype text, birthday bio dtype text, cspan id dtype text, fec id dtype text, first name dtype text, gender bio dtype text, google entity id dtype text, govtrack id dtype integer, house history alternate id dtype text, house history id dtype real, interuniversity consortium for political and social research id dtype real, last name dtype text, legislator id dtype text, maplight id dtype text, middle name dtype text, nickname dtype text, official full name dtype text, opensecrets id dtype text, religion bio dtype text, suffix name dtype text, thomas id dtype text, votesmart id dtype text, wikidata id dtype text, wikipedia id dtype text,
historical-terms table historical-terms Cols: address dtype text, bioguide id dtype text, chamber dtype text, class dtype real, contact_form dtype text, district dtype real, end dtype text, fax dtype text, last dtype text, middle dtype text, name dtype text, office dtype text, party dtype text, party affiliations dtype text, phone dtype text, relation dtype text, Really Simple Syndication URL dtype text, start dtype text, state dtype text, state_rank dtype text, title dtype text, type dtype text, url dtype text,
social-media table social-media Cols: bioguide dtype text, facebook dtype text, facebook_id dtype real, govtrack dtype real, instagram dtype text, instagram_id dtype real, thomas dtype integer, twitter dtype text, twitter_id dtype real, youtube dtype text, youtube_id dtype text,
|
legislator
|
What is the official Twitter handle of Jason Lewis?
|
official Twitter handle refers to twitter;
|
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'
|
database name:db_id legislator
current table current Cols: ballotpedia id dtype text, bioguide id dtype text, birthday bio dtype date, cspan id dtype real, fec id dtype text, first name dtype text, gender bio dtype text, google entity id dtype text, govtrack id dtype integer, house history id dtype real, interuniversity consortium for political and social research id dtype real, last name dtype text, legislator id dtype text, maplight id dtype real, middle name dtype text, nickname dtype text, official full name dtype text, opensecrets id dtype text, religion bio dtype text, suffix name dtype text, thomas id dtype integer, votesmart id dtype real, wikidata id dtype text, wikipedia id dtype text,
current-terms table current-terms Cols: address dtype text, bioguide id dtype text, caucus dtype text, chamber dtype text, class dtype real, contact_form dtype text, district dtype real, end dtype text, fax dtype text, last dtype text, name dtype text, office dtype text, party dtype text, party affiliations dtype text, phone dtype text, relation dtype text, Really Simple Syndication URL dtype text, start dtype text, state dtype text, state_rank dtype text, title dtype text, type dtype text, url dtype text,
historical table historical Cols: ballotpedia id dtype text, bioguide id dtype text, bioguide previous id dtype text, birthday bio dtype text, cspan id dtype text, fec id dtype text, first name dtype text, gender bio dtype text, google entity id dtype text, govtrack id dtype integer, house history alternate id dtype text, house history id dtype real, interuniversity consortium for political and social research id dtype real, last name dtype text, legislator id dtype text, maplight id dtype text, middle name dtype text, nickname dtype text, official full name dtype text, opensecrets id dtype text, religion bio dtype text, suffix name dtype text, thomas id dtype text, votesmart id dtype text, wikidata id dtype text, wikipedia id dtype text,
historical-terms table historical-terms Cols: address dtype text, bioguide id dtype text, chamber dtype text, class dtype real, contact_form dtype text, district dtype real, end dtype text, fax dtype text, last dtype text, middle dtype text, name dtype text, office dtype text, party dtype text, party affiliations dtype text, phone dtype text, relation dtype text, Really Simple Syndication URL dtype text, start dtype text, state dtype text, state_rank dtype text, title dtype text, type dtype text, url dtype text,
social-media table social-media Cols: bioguide dtype text, facebook dtype text, facebook_id dtype real, govtrack dtype real, instagram dtype text, instagram_id dtype real, thomas dtype integer, twitter dtype text, twitter_id dtype real, youtube dtype text, youtube_id dtype text,
|
legislator
|
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?
|
Independent refers to party = 'Independent'; senators refers to type = 'sen'; started the term in 2011 and onwards refers to strftime('%Y', start) > = '2011'; caucused with the Democrat refers to caucus = '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'
|
database name:db_id legislator
current table current Cols: ballotpedia id dtype text, bioguide id dtype text, birthday bio dtype date, cspan id dtype real, fec id dtype text, first name dtype text, gender bio dtype text, google entity id dtype text, govtrack id dtype integer, house history id dtype real, interuniversity consortium for political and social research id dtype real, last name dtype text, legislator id dtype text, maplight id dtype real, middle name dtype text, nickname dtype text, official full name dtype text, opensecrets id dtype text, religion bio dtype text, suffix name dtype text, thomas id dtype integer, votesmart id dtype real, wikidata id dtype text, wikipedia id dtype text,
current-terms table current-terms Cols: address dtype text, bioguide id dtype text, caucus dtype text, chamber dtype text, class dtype real, contact_form dtype text, district dtype real, end dtype text, fax dtype text, last dtype text, name dtype text, office dtype text, party dtype text, party affiliations dtype text, phone dtype text, relation dtype text, Really Simple Syndication URL dtype text, start dtype text, state dtype text, state_rank dtype text, title dtype text, type dtype text, url dtype text,
historical table historical Cols: ballotpedia id dtype text, bioguide id dtype text, bioguide previous id dtype text, birthday bio dtype text, cspan id dtype text, fec id dtype text, first name dtype text, gender bio dtype text, google entity id dtype text, govtrack id dtype integer, house history alternate id dtype text, house history id dtype real, interuniversity consortium for political and social research id dtype real, last name dtype text, legislator id dtype text, maplight id dtype text, middle name dtype text, nickname dtype text, official full name dtype text, opensecrets id dtype text, religion bio dtype text, suffix name dtype text, thomas id dtype text, votesmart id dtype text, wikidata id dtype text, wikipedia id dtype text,
historical-terms table historical-terms Cols: address dtype text, bioguide id dtype text, chamber dtype text, class dtype real, contact_form dtype text, district dtype real, end dtype text, fax dtype text, last dtype text, middle dtype text, name dtype text, office dtype text, party dtype text, party affiliations dtype text, phone dtype text, relation dtype text, Really Simple Syndication URL dtype text, start dtype text, state dtype text, state_rank dtype text, title dtype text, type dtype text, url dtype text,
social-media table social-media Cols: bioguide dtype text, facebook dtype text, facebook_id dtype real, govtrack dtype real, instagram dtype text, instagram_id dtype real, thomas dtype integer, twitter dtype text, twitter_id dtype real, youtube dtype text, youtube_id dtype text,
|
legislator
|
How many Jewish legislators do not have facebook?
|
Jewish legislators refers to religion_bio = 'Jewish'; do not have facebook refers to facebook is null;
|
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
|
database name:db_id legislator
current table current Cols: ballotpedia id dtype text, bioguide id dtype text, birthday bio dtype date, cspan id dtype real, fec id dtype text, first name dtype text, gender bio dtype text, google entity id dtype text, govtrack id dtype integer, house history id dtype real, interuniversity consortium for political and social research id dtype real, last name dtype text, legislator id dtype text, maplight id dtype real, middle name dtype text, nickname dtype text, official full name dtype text, opensecrets id dtype text, religion bio dtype text, suffix name dtype text, thomas id dtype integer, votesmart id dtype real, wikidata id dtype text, wikipedia id dtype text,
current-terms table current-terms Cols: address dtype text, bioguide id dtype text, caucus dtype text, chamber dtype text, class dtype real, contact_form dtype text, district dtype real, end dtype text, fax dtype text, last dtype text, name dtype text, office dtype text, party dtype text, party affiliations dtype text, phone dtype text, relation dtype text, Really Simple Syndication URL dtype text, start dtype text, state dtype text, state_rank dtype text, title dtype text, type dtype text, url dtype text,
historical table historical Cols: ballotpedia id dtype text, bioguide id dtype text, bioguide previous id dtype text, birthday bio dtype text, cspan id dtype text, fec id dtype text, first name dtype text, gender bio dtype text, google entity id dtype text, govtrack id dtype integer, house history alternate id dtype text, house history id dtype real, interuniversity consortium for political and social research id dtype real, last name dtype text, legislator id dtype text, maplight id dtype text, middle name dtype text, nickname dtype text, official full name dtype text, opensecrets id dtype text, religion bio dtype text, suffix name dtype text, thomas id dtype text, votesmart id dtype text, wikidata id dtype text, wikipedia id dtype text,
historical-terms table historical-terms Cols: address dtype text, bioguide id dtype text, chamber dtype text, class dtype real, contact_form dtype text, district dtype real, end dtype text, fax dtype text, last dtype text, middle dtype text, name dtype text, office dtype text, party dtype text, party affiliations dtype text, phone dtype text, relation dtype text, Really Simple Syndication URL dtype text, start dtype text, state dtype text, state_rank dtype text, title dtype text, type dtype text, url dtype text,
social-media table social-media Cols: bioguide dtype text, facebook dtype text, facebook_id dtype real, govtrack dtype real, instagram dtype text, instagram_id dtype real, thomas dtype integer, twitter dtype text, twitter_id dtype real, youtube dtype text, youtube_id dtype text,
|
legislator
|
Which party has the highest number of legislators who are Baptist?
|
party that has the highest number of legislators refers to MAX(COUNT(party)); Baptist refers to religion_bio = '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
|
database name:db_id legislator
current table current Cols: ballotpedia id dtype text, bioguide id dtype text, birthday bio dtype date, cspan id dtype real, fec id dtype text, first name dtype text, gender bio dtype text, google entity id dtype text, govtrack id dtype integer, house history id dtype real, interuniversity consortium for political and social research id dtype real, last name dtype text, legislator id dtype text, maplight id dtype real, middle name dtype text, nickname dtype text, official full name dtype text, opensecrets id dtype text, religion bio dtype text, suffix name dtype text, thomas id dtype integer, votesmart id dtype real, wikidata id dtype text, wikipedia id dtype text,
current-terms table current-terms Cols: address dtype text, bioguide id dtype text, caucus dtype text, chamber dtype text, class dtype real, contact_form dtype text, district dtype real, end dtype text, fax dtype text, last dtype text, name dtype text, office dtype text, party dtype text, party affiliations dtype text, phone dtype text, relation dtype text, Really Simple Syndication URL dtype text, start dtype text, state dtype text, state_rank dtype text, title dtype text, type dtype text, url dtype text,
historical table historical Cols: ballotpedia id dtype text, bioguide id dtype text, bioguide previous id dtype text, birthday bio dtype text, cspan id dtype text, fec id dtype text, first name dtype text, gender bio dtype text, google entity id dtype text, govtrack id dtype integer, house history alternate id dtype text, house history id dtype real, interuniversity consortium for political and social research id dtype real, last name dtype text, legislator id dtype text, maplight id dtype text, middle name dtype text, nickname dtype text, official full name dtype text, opensecrets id dtype text, religion bio dtype text, suffix name dtype text, thomas id dtype text, votesmart id dtype text, wikidata id dtype text, wikipedia id dtype text,
historical-terms table historical-terms Cols: address dtype text, bioguide id dtype text, chamber dtype text, class dtype real, contact_form dtype text, district dtype real, end dtype text, fax dtype text, last dtype text, middle dtype text, name dtype text, office dtype text, party dtype text, party affiliations dtype text, phone dtype text, relation dtype text, Really Simple Syndication URL dtype text, start dtype text, state dtype text, state_rank dtype text, title dtype text, type dtype text, url dtype text,
social-media table social-media Cols: bioguide dtype text, facebook dtype text, facebook_id dtype real, govtrack dtype real, instagram dtype text, instagram_id dtype real, thomas dtype integer, twitter dtype text, twitter_id dtype real, youtube dtype text, youtube_id dtype text,
|
legislator
|
List the official full names of all the legislators who have facebook, instagram, twitter and youtube accounts.
|
have facebook, instagram, twitter and youtube accounts refers to 'facebook' is not null AND 'instagram' is not null AND 'twitter' is not null AND 'youtube' is not null;
|
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
|
database name:db_id legislator
current table current Cols: ballotpedia id dtype text, bioguide id dtype text, birthday bio dtype date, cspan id dtype real, fec id dtype text, first name dtype text, gender bio dtype text, google entity id dtype text, govtrack id dtype integer, house history id dtype real, interuniversity consortium for political and social research id dtype real, last name dtype text, legislator id dtype text, maplight id dtype real, middle name dtype text, nickname dtype text, official full name dtype text, opensecrets id dtype text, religion bio dtype text, suffix name dtype text, thomas id dtype integer, votesmart id dtype real, wikidata id dtype text, wikipedia id dtype text,
current-terms table current-terms Cols: address dtype text, bioguide id dtype text, caucus dtype text, chamber dtype text, class dtype real, contact_form dtype text, district dtype real, end dtype text, fax dtype text, last dtype text, name dtype text, office dtype text, party dtype text, party affiliations dtype text, phone dtype text, relation dtype text, Really Simple Syndication URL dtype text, start dtype text, state dtype text, state_rank dtype text, title dtype text, type dtype text, url dtype text,
historical table historical Cols: ballotpedia id dtype text, bioguide id dtype text, bioguide previous id dtype text, birthday bio dtype text, cspan id dtype text, fec id dtype text, first name dtype text, gender bio dtype text, google entity id dtype text, govtrack id dtype integer, house history alternate id dtype text, house history id dtype real, interuniversity consortium for political and social research id dtype real, last name dtype text, legislator id dtype text, maplight id dtype text, middle name dtype text, nickname dtype text, official full name dtype text, opensecrets id dtype text, religion bio dtype text, suffix name dtype text, thomas id dtype text, votesmart id dtype text, wikidata id dtype text, wikipedia id dtype text,
historical-terms table historical-terms Cols: address dtype text, bioguide id dtype text, chamber dtype text, class dtype real, contact_form dtype text, district dtype real, end dtype text, fax dtype text, last dtype text, middle dtype text, name dtype text, office dtype text, party dtype text, party affiliations dtype text, phone dtype text, relation dtype text, Really Simple Syndication URL dtype text, start dtype text, state dtype text, state_rank dtype text, title dtype text, type dtype text, url dtype text,
social-media table social-media Cols: bioguide dtype text, facebook dtype text, facebook_id dtype real, govtrack dtype real, instagram dtype text, instagram_id dtype real, thomas dtype integer, twitter dtype text, twitter_id dtype real, youtube dtype text, youtube_id dtype text,
|
legislator
|
How many districts did John Conyers, Jr. serve in total?
| null |
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
|
database name:db_id legislator
current table current Cols: ballotpedia id dtype text, bioguide id dtype text, birthday bio dtype date, cspan id dtype real, fec id dtype text, first name dtype text, gender bio dtype text, google entity id dtype text, govtrack id dtype integer, house history id dtype real, interuniversity consortium for political and social research id dtype real, last name dtype text, legislator id dtype text, maplight id dtype real, middle name dtype text, nickname dtype text, official full name dtype text, opensecrets id dtype text, religion bio dtype text, suffix name dtype text, thomas id dtype integer, votesmart id dtype real, wikidata id dtype text, wikipedia id dtype text,
current-terms table current-terms Cols: address dtype text, bioguide id dtype text, caucus dtype text, chamber dtype text, class dtype real, contact_form dtype text, district dtype real, end dtype text, fax dtype text, last dtype text, name dtype text, office dtype text, party dtype text, party affiliations dtype text, phone dtype text, relation dtype text, Really Simple Syndication URL dtype text, start dtype text, state dtype text, state_rank dtype text, title dtype text, type dtype text, url dtype text,
historical table historical Cols: ballotpedia id dtype text, bioguide id dtype text, bioguide previous id dtype text, birthday bio dtype text, cspan id dtype text, fec id dtype text, first name dtype text, gender bio dtype text, google entity id dtype text, govtrack id dtype integer, house history alternate id dtype text, house history id dtype real, interuniversity consortium for political and social research id dtype real, last name dtype text, legislator id dtype text, maplight id dtype text, middle name dtype text, nickname dtype text, official full name dtype text, opensecrets id dtype text, religion bio dtype text, suffix name dtype text, thomas id dtype text, votesmart id dtype text, wikidata id dtype text, wikipedia id dtype text,
historical-terms table historical-terms Cols: address dtype text, bioguide id dtype text, chamber dtype text, class dtype real, contact_form dtype text, district dtype real, end dtype text, fax dtype text, last dtype text, middle dtype text, name dtype text, office dtype text, party dtype text, party affiliations dtype text, phone dtype text, relation dtype text, Really Simple Syndication URL dtype text, start dtype text, state dtype text, state_rank dtype text, title dtype text, type dtype text, url dtype text,
social-media table social-media Cols: bioguide dtype text, facebook dtype text, facebook_id dtype real, govtrack dtype real, instagram dtype text, instagram_id dtype real, thomas dtype integer, twitter dtype text, twitter_id dtype real, youtube dtype text, youtube_id dtype text,
|
legislator
|
What are the Wikipedia page names of all the anti-administration senators?
|
Wikipedia page names refers to wikipedia_id; anti-administration refers to party = 'Anti-Administration'; senators refers to type = 'sen';
|
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'
|
database name:db_id legislator
current table current Cols: ballotpedia id dtype text, bioguide id dtype text, birthday bio dtype date, cspan id dtype real, fec id dtype text, first name dtype text, gender bio dtype text, google entity id dtype text, govtrack id dtype integer, house history id dtype real, interuniversity consortium for political and social research id dtype real, last name dtype text, legislator id dtype text, maplight id dtype real, middle name dtype text, nickname dtype text, official full name dtype text, opensecrets id dtype text, religion bio dtype text, suffix name dtype text, thomas id dtype integer, votesmart id dtype real, wikidata id dtype text, wikipedia id dtype text,
current-terms table current-terms Cols: address dtype text, bioguide id dtype text, caucus dtype text, chamber dtype text, class dtype real, contact_form dtype text, district dtype real, end dtype text, fax dtype text, last dtype text, name dtype text, office dtype text, party dtype text, party affiliations dtype text, phone dtype text, relation dtype text, Really Simple Syndication URL dtype text, start dtype text, state dtype text, state_rank dtype text, title dtype text, type dtype text, url dtype text,
historical table historical Cols: ballotpedia id dtype text, bioguide id dtype text, bioguide previous id dtype text, birthday bio dtype text, cspan id dtype text, fec id dtype text, first name dtype text, gender bio dtype text, google entity id dtype text, govtrack id dtype integer, house history alternate id dtype text, house history id dtype real, interuniversity consortium for political and social research id dtype real, last name dtype text, legislator id dtype text, maplight id dtype text, middle name dtype text, nickname dtype text, official full name dtype text, opensecrets id dtype text, religion bio dtype text, suffix name dtype text, thomas id dtype text, votesmart id dtype text, wikidata id dtype text, wikipedia id dtype text,
historical-terms table historical-terms Cols: address dtype text, bioguide id dtype text, chamber dtype text, class dtype real, contact_form dtype text, district dtype real, end dtype text, fax dtype text, last dtype text, middle dtype text, name dtype text, office dtype text, party dtype text, party affiliations dtype text, phone dtype text, relation dtype text, Really Simple Syndication URL dtype text, start dtype text, state dtype text, state_rank dtype text, title dtype text, type dtype text, url dtype text,
social-media table social-media Cols: bioguide dtype text, facebook dtype text, facebook_id dtype real, govtrack dtype real, instagram dtype text, instagram_id dtype real, thomas dtype integer, twitter dtype text, twitter_id dtype real, youtube dtype text, youtube_id dtype text,
|
legislator
|
List the official full names of all the legislators that served 13 district for 26 consecutive years.
|
served only one district for 26 consecutive years refers to SUBTRACT(SUM(cast(strftime('%Y', end)), CAST(strftime('%Y', start)))) = 26
|
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
|
database name:db_id legislator
current table current Cols: ballotpedia id dtype text, bioguide id dtype text, birthday bio dtype date, cspan id dtype real, fec id dtype text, first name dtype text, gender bio dtype text, google entity id dtype text, govtrack id dtype integer, house history id dtype real, interuniversity consortium for political and social research id dtype real, last name dtype text, legislator id dtype text, maplight id dtype real, middle name dtype text, nickname dtype text, official full name dtype text, opensecrets id dtype text, religion bio dtype text, suffix name dtype text, thomas id dtype integer, votesmart id dtype real, wikidata id dtype text, wikipedia id dtype text,
current-terms table current-terms Cols: address dtype text, bioguide id dtype text, caucus dtype text, chamber dtype text, class dtype real, contact_form dtype text, district dtype real, end dtype text, fax dtype text, last dtype text, name dtype text, office dtype text, party dtype text, party affiliations dtype text, phone dtype text, relation dtype text, Really Simple Syndication URL dtype text, start dtype text, state dtype text, state_rank dtype text, title dtype text, type dtype text, url dtype text,
historical table historical Cols: ballotpedia id dtype text, bioguide id dtype text, bioguide previous id dtype text, birthday bio dtype text, cspan id dtype text, fec id dtype text, first name dtype text, gender bio dtype text, google entity id dtype text, govtrack id dtype integer, house history alternate id dtype text, house history id dtype real, interuniversity consortium for political and social research id dtype real, last name dtype text, legislator id dtype text, maplight id dtype text, middle name dtype text, nickname dtype text, official full name dtype text, opensecrets id dtype text, religion bio dtype text, suffix name dtype text, thomas id dtype text, votesmart id dtype text, wikidata id dtype text, wikipedia id dtype text,
historical-terms table historical-terms Cols: address dtype text, bioguide id dtype text, chamber dtype text, class dtype real, contact_form dtype text, district dtype real, end dtype text, fax dtype text, last dtype text, middle dtype text, name dtype text, office dtype text, party dtype text, party affiliations dtype text, phone dtype text, relation dtype text, Really Simple Syndication URL dtype text, start dtype text, state dtype text, state_rank dtype text, title dtype text, type dtype text, url dtype text,
social-media table social-media Cols: bioguide dtype text, facebook dtype text, facebook_id dtype real, govtrack dtype real, instagram dtype text, instagram_id dtype real, thomas dtype integer, twitter dtype text, twitter_id dtype real, youtube dtype text, youtube_id dtype text,
|
legislator
|
How many Federalist representatives are there whose first names are Benjamin?
|
Federalist refers to party = 'Federalist'; representatives refers to type = 'rep';
|
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
|
database name:db_id legislator
current table current Cols: ballotpedia id dtype text, bioguide id dtype text, birthday bio dtype date, cspan id dtype real, fec id dtype text, first name dtype text, gender bio dtype text, google entity id dtype text, govtrack id dtype integer, house history id dtype real, interuniversity consortium for political and social research id dtype real, last name dtype text, legislator id dtype text, maplight id dtype real, middle name dtype text, nickname dtype text, official full name dtype text, opensecrets id dtype text, religion bio dtype text, suffix name dtype text, thomas id dtype integer, votesmart id dtype real, wikidata id dtype text, wikipedia id dtype text,
current-terms table current-terms Cols: address dtype text, bioguide id dtype text, caucus dtype text, chamber dtype text, class dtype real, contact_form dtype text, district dtype real, end dtype text, fax dtype text, last dtype text, name dtype text, office dtype text, party dtype text, party affiliations dtype text, phone dtype text, relation dtype text, Really Simple Syndication URL dtype text, start dtype text, state dtype text, state_rank dtype text, title dtype text, type dtype text, url dtype text,
historical table historical Cols: ballotpedia id dtype text, bioguide id dtype text, bioguide previous id dtype text, birthday bio dtype text, cspan id dtype text, fec id dtype text, first name dtype text, gender bio dtype text, google entity id dtype text, govtrack id dtype integer, house history alternate id dtype text, house history id dtype real, interuniversity consortium for political and social research id dtype real, last name dtype text, legislator id dtype text, maplight id dtype text, middle name dtype text, nickname dtype text, official full name dtype text, opensecrets id dtype text, religion bio dtype text, suffix name dtype text, thomas id dtype text, votesmart id dtype text, wikidata id dtype text, wikipedia id dtype text,
historical-terms table historical-terms Cols: address dtype text, bioguide id dtype text, chamber dtype text, class dtype real, contact_form dtype text, district dtype real, end dtype text, fax dtype text, last dtype text, middle dtype text, name dtype text, office dtype text, party dtype text, party affiliations dtype text, phone dtype text, relation dtype text, Really Simple Syndication URL dtype text, start dtype text, state dtype text, state_rank dtype text, title dtype text, type dtype text, url dtype text,
social-media table social-media Cols: bioguide dtype text, facebook dtype text, facebook_id dtype real, govtrack dtype real, instagram dtype text, instagram_id dtype real, thomas dtype integer, twitter dtype text, twitter_id dtype real, youtube dtype text, youtube_id dtype text,
|
legislator
|
How many female representatives served in the state of California for at least 10 years?
|
female refers to gender_bio = 'F'; representatives refers to type = 'rep'; served for at least 10 years refers to SUBTRACT(SUM(CAST(strftime('%Y', end)), CAST(strftime('%Y', start)))) > 10;
|
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
|
database name:db_id legislator
current table current Cols: ballotpedia id dtype text, bioguide id dtype text, birthday bio dtype date, cspan id dtype real, fec id dtype text, first name dtype text, gender bio dtype text, google entity id dtype text, govtrack id dtype integer, house history id dtype real, interuniversity consortium for political and social research id dtype real, last name dtype text, legislator id dtype text, maplight id dtype real, middle name dtype text, nickname dtype text, official full name dtype text, opensecrets id dtype text, religion bio dtype text, suffix name dtype text, thomas id dtype integer, votesmart id dtype real, wikidata id dtype text, wikipedia id dtype text,
current-terms table current-terms Cols: address dtype text, bioguide id dtype text, caucus dtype text, chamber dtype text, class dtype real, contact_form dtype text, district dtype real, end dtype text, fax dtype text, last dtype text, name dtype text, office dtype text, party dtype text, party affiliations dtype text, phone dtype text, relation dtype text, Really Simple Syndication URL dtype text, start dtype text, state dtype text, state_rank dtype text, title dtype text, type dtype text, url dtype text,
historical table historical Cols: ballotpedia id dtype text, bioguide id dtype text, bioguide previous id dtype text, birthday bio dtype text, cspan id dtype text, fec id dtype text, first name dtype text, gender bio dtype text, google entity id dtype text, govtrack id dtype integer, house history alternate id dtype text, house history id dtype real, interuniversity consortium for political and social research id dtype real, last name dtype text, legislator id dtype text, maplight id dtype text, middle name dtype text, nickname dtype text, official full name dtype text, opensecrets id dtype text, religion bio dtype text, suffix name dtype text, thomas id dtype text, votesmart id dtype text, wikidata id dtype text, wikipedia id dtype text,
historical-terms table historical-terms Cols: address dtype text, bioguide id dtype text, chamber dtype text, class dtype real, contact_form dtype text, district dtype real, end dtype text, fax dtype text, last dtype text, middle dtype text, name dtype text, office dtype text, party dtype text, party affiliations dtype text, phone dtype text, relation dtype text, Really Simple Syndication URL dtype text, start dtype text, state dtype text, state_rank dtype text, title dtype text, type dtype text, url dtype text,
social-media table social-media Cols: bioguide dtype text, facebook dtype text, facebook_id dtype real, govtrack dtype real, instagram dtype text, instagram_id dtype real, thomas dtype integer, twitter dtype text, twitter_id dtype real, youtube dtype text, youtube_id dtype text,
|
legislator
|
What is the party of the oldest legislator?
|
oldest legislator refers to MIN(birthday_bio);
|
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
|
database name:db_id legislator
current table current Cols: ballotpedia id dtype text, bioguide id dtype text, birthday bio dtype date, cspan id dtype real, fec id dtype text, first name dtype text, gender bio dtype text, google entity id dtype text, govtrack id dtype integer, house history id dtype real, interuniversity consortium for political and social research id dtype real, last name dtype text, legislator id dtype text, maplight id dtype real, middle name dtype text, nickname dtype text, official full name dtype text, opensecrets id dtype text, religion bio dtype text, suffix name dtype text, thomas id dtype integer, votesmart id dtype real, wikidata id dtype text, wikipedia id dtype text,
current-terms table current-terms Cols: address dtype text, bioguide id dtype text, caucus dtype text, chamber dtype text, class dtype real, contact_form dtype text, district dtype real, end dtype text, fax dtype text, last dtype text, name dtype text, office dtype text, party dtype text, party affiliations dtype text, phone dtype text, relation dtype text, Really Simple Syndication URL dtype text, start dtype text, state dtype text, state_rank dtype text, title dtype text, type dtype text, url dtype text,
historical table historical Cols: ballotpedia id dtype text, bioguide id dtype text, bioguide previous id dtype text, birthday bio dtype text, cspan id dtype text, fec id dtype text, first name dtype text, gender bio dtype text, google entity id dtype text, govtrack id dtype integer, house history alternate id dtype text, house history id dtype real, interuniversity consortium for political and social research id dtype real, last name dtype text, legislator id dtype text, maplight id dtype text, middle name dtype text, nickname dtype text, official full name dtype text, opensecrets id dtype text, religion bio dtype text, suffix name dtype text, thomas id dtype text, votesmart id dtype text, wikidata id dtype text, wikipedia id dtype text,
historical-terms table historical-terms Cols: address dtype text, bioguide id dtype text, chamber dtype text, class dtype real, contact_form dtype text, district dtype real, end dtype text, fax dtype text, last dtype text, middle dtype text, name dtype text, office dtype text, party dtype text, party affiliations dtype text, phone dtype text, relation dtype text, Really Simple Syndication URL dtype text, start dtype text, state dtype text, state_rank dtype text, title dtype text, type dtype text, url dtype text,
social-media table social-media Cols: bioguide dtype text, facebook dtype text, facebook_id dtype real, govtrack dtype real, instagram dtype text, instagram_id dtype real, thomas dtype integer, twitter dtype text, twitter_id dtype real, youtube dtype text, youtube_id dtype text,
|
legislator
|
Who is the Lutheran representative that served in the state of Ohio for 14 years before becoming a senator?
|
Lutheran refers to religion_bio = 'Lutheran'; representative refers to type = 'rep'; served for 14 years refers to SUBTRACT(SUM(CAST(strftime('%Y', end)), CAST(strftime('%Y', start)))) = 14;
|
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'
|
database name:db_id legislator
current table current Cols: ballotpedia id dtype text, bioguide id dtype text, birthday bio dtype date, cspan id dtype real, fec id dtype text, first name dtype text, gender bio dtype text, google entity id dtype text, govtrack id dtype integer, house history id dtype real, interuniversity consortium for political and social research id dtype real, last name dtype text, legislator id dtype text, maplight id dtype real, middle name dtype text, nickname dtype text, official full name dtype text, opensecrets id dtype text, religion bio dtype text, suffix name dtype text, thomas id dtype integer, votesmart id dtype real, wikidata id dtype text, wikipedia id dtype text,
current-terms table current-terms Cols: address dtype text, bioguide id dtype text, caucus dtype text, chamber dtype text, class dtype real, contact_form dtype text, district dtype real, end dtype text, fax dtype text, last dtype text, name dtype text, office dtype text, party dtype text, party affiliations dtype text, phone dtype text, relation dtype text, Really Simple Syndication URL dtype text, start dtype text, state dtype text, state_rank dtype text, title dtype text, type dtype text, url dtype text,
historical table historical Cols: ballotpedia id dtype text, bioguide id dtype text, bioguide previous id dtype text, birthday bio dtype text, cspan id dtype text, fec id dtype text, first name dtype text, gender bio dtype text, google entity id dtype text, govtrack id dtype integer, house history alternate id dtype text, house history id dtype real, interuniversity consortium for political and social research id dtype real, last name dtype text, legislator id dtype text, maplight id dtype text, middle name dtype text, nickname dtype text, official full name dtype text, opensecrets id dtype text, religion bio dtype text, suffix name dtype text, thomas id dtype text, votesmart id dtype text, wikidata id dtype text, wikipedia id dtype text,
historical-terms table historical-terms Cols: address dtype text, bioguide id dtype text, chamber dtype text, class dtype real, contact_form dtype text, district dtype real, end dtype text, fax dtype text, last dtype text, middle dtype text, name dtype text, office dtype text, party dtype text, party affiliations dtype text, phone dtype text, relation dtype text, Really Simple Syndication URL dtype text, start dtype text, state dtype text, state_rank dtype text, title dtype text, type dtype text, url dtype text,
social-media table social-media Cols: bioguide dtype text, facebook dtype text, facebook_id dtype real, govtrack dtype real, instagram dtype text, instagram_id dtype real, thomas dtype integer, twitter dtype text, twitter_id dtype real, youtube dtype text, youtube_id dtype text,
|
legislator
|
Among all the current legislators born after the year 1960, how many of them are not google entities?
|
born after the year 1960 refers to strftime('%Y', birthday_bio) > '1960'; not google entities refers to google_entity_id_id is null;
|
SELECT COUNT(*) FROM current WHERE strftime('%Y', birthday_bio) > '1960' AND google_entity_id_id IS NULL
|
database name:db_id legislator
current table current Cols: ballotpedia id dtype text, bioguide id dtype text, birthday bio dtype date, cspan id dtype real, fec id dtype text, first name dtype text, gender bio dtype text, google entity id dtype text, govtrack id dtype integer, house history id dtype real, interuniversity consortium for political and social research id dtype real, last name dtype text, legislator id dtype text, maplight id dtype real, middle name dtype text, nickname dtype text, official full name dtype text, opensecrets id dtype text, religion bio dtype text, suffix name dtype text, thomas id dtype integer, votesmart id dtype real, wikidata id dtype text, wikipedia id dtype text,
current-terms table current-terms Cols: address dtype text, bioguide id dtype text, caucus dtype text, chamber dtype text, class dtype real, contact_form dtype text, district dtype real, end dtype text, fax dtype text, last dtype text, name dtype text, office dtype text, party dtype text, party affiliations dtype text, phone dtype text, relation dtype text, Really Simple Syndication URL dtype text, start dtype text, state dtype text, state_rank dtype text, title dtype text, type dtype text, url dtype text,
historical table historical Cols: ballotpedia id dtype text, bioguide id dtype text, bioguide previous id dtype text, birthday bio dtype text, cspan id dtype text, fec id dtype text, first name dtype text, gender bio dtype text, google entity id dtype text, govtrack id dtype integer, house history alternate id dtype text, house history id dtype real, interuniversity consortium for political and social research id dtype real, last name dtype text, legislator id dtype text, maplight id dtype text, middle name dtype text, nickname dtype text, official full name dtype text, opensecrets id dtype text, religion bio dtype text, suffix name dtype text, thomas id dtype text, votesmart id dtype text, wikidata id dtype text, wikipedia id dtype text,
historical-terms table historical-terms Cols: address dtype text, bioguide id dtype text, chamber dtype text, class dtype real, contact_form dtype text, district dtype real, end dtype text, fax dtype text, last dtype text, middle dtype text, name dtype text, office dtype text, party dtype text, party affiliations dtype text, phone dtype text, relation dtype text, Really Simple Syndication URL dtype text, start dtype text, state dtype text, state_rank dtype text, title dtype text, type dtype text, url dtype text,
social-media table social-media Cols: bioguide dtype text, facebook dtype text, facebook_id dtype real, govtrack dtype real, instagram dtype text, instagram_id dtype real, thomas dtype integer, twitter dtype text, twitter_id dtype real, youtube dtype text, youtube_id dtype text,
|
legislator
|
Please list the official full names of all the current legislators who have served in the U.S. House.
|
have served in the U.S. House refers to house_history_id is not null;
|
SELECT official_full_name FROM current WHERE house_history_id IS NOT NULL
|
database name:db_id legislator
current table current Cols: ballotpedia id dtype text, bioguide id dtype text, birthday bio dtype date, cspan id dtype real, fec id dtype text, first name dtype text, gender bio dtype text, google entity id dtype text, govtrack id dtype integer, house history id dtype real, interuniversity consortium for political and social research id dtype real, last name dtype text, legislator id dtype text, maplight id dtype real, middle name dtype text, nickname dtype text, official full name dtype text, opensecrets id dtype text, religion bio dtype text, suffix name dtype text, thomas id dtype integer, votesmart id dtype real, wikidata id dtype text, wikipedia id dtype text,
current-terms table current-terms Cols: address dtype text, bioguide id dtype text, caucus dtype text, chamber dtype text, class dtype real, contact_form dtype text, district dtype real, end dtype text, fax dtype text, last dtype text, name dtype text, office dtype text, party dtype text, party affiliations dtype text, phone dtype text, relation dtype text, Really Simple Syndication URL dtype text, start dtype text, state dtype text, state_rank dtype text, title dtype text, type dtype text, url dtype text,
historical table historical Cols: ballotpedia id dtype text, bioguide id dtype text, bioguide previous id dtype text, birthday bio dtype text, cspan id dtype text, fec id dtype text, first name dtype text, gender bio dtype text, google entity id dtype text, govtrack id dtype integer, house history alternate id dtype text, house history id dtype real, interuniversity consortium for political and social research id dtype real, last name dtype text, legislator id dtype text, maplight id dtype text, middle name dtype text, nickname dtype text, official full name dtype text, opensecrets id dtype text, religion bio dtype text, suffix name dtype text, thomas id dtype text, votesmart id dtype text, wikidata id dtype text, wikipedia id dtype text,
historical-terms table historical-terms Cols: address dtype text, bioguide id dtype text, chamber dtype text, class dtype real, contact_form dtype text, district dtype real, end dtype text, fax dtype text, last dtype text, middle dtype text, name dtype text, office dtype text, party dtype text, party affiliations dtype text, phone dtype text, relation dtype text, Really Simple Syndication URL dtype text, start dtype text, state dtype text, state_rank dtype text, title dtype text, type dtype text, url dtype text,
social-media table social-media Cols: bioguide dtype text, facebook dtype text, facebook_id dtype real, govtrack dtype real, instagram dtype text, instagram_id dtype real, thomas dtype integer, twitter dtype text, twitter_id dtype real, youtube dtype text, youtube_id dtype text,
|
legislator
|
How many current legislators have both accounts on both VoteView.com and maplight.org?
|
have both accounts on both VoteView.com and maplight.org refers to icpsr_id is not null AND maplight_id is not null;
|
SELECT COUNT(*) FROM current WHERE icpsr_id IS NOT NULL AND maplight_id IS NOT NULL
|
database name:db_id legislator
current table current Cols: ballotpedia id dtype text, bioguide id dtype text, birthday bio dtype date, cspan id dtype real, fec id dtype text, first name dtype text, gender bio dtype text, google entity id dtype text, govtrack id dtype integer, house history id dtype real, interuniversity consortium for political and social research id dtype real, last name dtype text, legislator id dtype text, maplight id dtype real, middle name dtype text, nickname dtype text, official full name dtype text, opensecrets id dtype text, religion bio dtype text, suffix name dtype text, thomas id dtype integer, votesmart id dtype real, wikidata id dtype text, wikipedia id dtype text,
current-terms table current-terms Cols: address dtype text, bioguide id dtype text, caucus dtype text, chamber dtype text, class dtype real, contact_form dtype text, district dtype real, end dtype text, fax dtype text, last dtype text, name dtype text, office dtype text, party dtype text, party affiliations dtype text, phone dtype text, relation dtype text, Really Simple Syndication URL dtype text, start dtype text, state dtype text, state_rank dtype text, title dtype text, type dtype text, url dtype text,
historical table historical Cols: ballotpedia id dtype text, bioguide id dtype text, bioguide previous id dtype text, birthday bio dtype text, cspan id dtype text, fec id dtype text, first name dtype text, gender bio dtype text, google entity id dtype text, govtrack id dtype integer, house history alternate id dtype text, house history id dtype real, interuniversity consortium for political and social research id dtype real, last name dtype text, legislator id dtype text, maplight id dtype text, middle name dtype text, nickname dtype text, official full name dtype text, opensecrets id dtype text, religion bio dtype text, suffix name dtype text, thomas id dtype text, votesmart id dtype text, wikidata id dtype text, wikipedia id dtype text,
historical-terms table historical-terms Cols: address dtype text, bioguide id dtype text, chamber dtype text, class dtype real, contact_form dtype text, district dtype real, end dtype text, fax dtype text, last dtype text, middle dtype text, name dtype text, office dtype text, party dtype text, party affiliations dtype text, phone dtype text, relation dtype text, Really Simple Syndication URL dtype text, start dtype text, state dtype text, state_rank dtype text, title dtype text, type dtype text, url dtype text,
social-media table social-media Cols: bioguide dtype text, facebook dtype text, facebook_id dtype real, govtrack dtype real, instagram dtype text, instagram_id dtype real, thomas dtype integer, twitter dtype text, twitter_id dtype real, youtube dtype text, youtube_id dtype text,
|
legislator
|
Among all the current female legislators, how many of them have attended in Senate roll call votes?
|
female refers to gender_bio = 'F'; have attended in Senate roll call votes refers to lis_id is not null;
|
SELECT COUNT(lis_id) FROM current WHERE gender_bio = 'F' AND lis_id IS NOT NULL
|
database name:db_id legislator
current table current Cols: ballotpedia id dtype text, bioguide id dtype text, birthday bio dtype date, cspan id dtype real, fec id dtype text, first name dtype text, gender bio dtype text, google entity id dtype text, govtrack id dtype integer, house history id dtype real, interuniversity consortium for political and social research id dtype real, last name dtype text, legislator id dtype text, maplight id dtype real, middle name dtype text, nickname dtype text, official full name dtype text, opensecrets id dtype text, religion bio dtype text, suffix name dtype text, thomas id dtype integer, votesmart id dtype real, wikidata id dtype text, wikipedia id dtype text,
current-terms table current-terms Cols: address dtype text, bioguide id dtype text, caucus dtype text, chamber dtype text, class dtype real, contact_form dtype text, district dtype real, end dtype text, fax dtype text, last dtype text, name dtype text, office dtype text, party dtype text, party affiliations dtype text, phone dtype text, relation dtype text, Really Simple Syndication URL dtype text, start dtype text, state dtype text, state_rank dtype text, title dtype text, type dtype text, url dtype text,
historical table historical Cols: ballotpedia id dtype text, bioguide id dtype text, bioguide previous id dtype text, birthday bio dtype text, cspan id dtype text, fec id dtype text, first name dtype text, gender bio dtype text, google entity id dtype text, govtrack id dtype integer, house history alternate id dtype text, house history id dtype real, interuniversity consortium for political and social research id dtype real, last name dtype text, legislator id dtype text, maplight id dtype text, middle name dtype text, nickname dtype text, official full name dtype text, opensecrets id dtype text, religion bio dtype text, suffix name dtype text, thomas id dtype text, votesmart id dtype text, wikidata id dtype text, wikipedia id dtype text,
historical-terms table historical-terms Cols: address dtype text, bioguide id dtype text, chamber dtype text, class dtype real, contact_form dtype text, district dtype real, end dtype text, fax dtype text, last dtype text, middle dtype text, name dtype text, office dtype text, party dtype text, party affiliations dtype text, phone dtype text, relation dtype text, Really Simple Syndication URL dtype text, start dtype text, state dtype text, state_rank dtype text, title dtype text, type dtype text, url dtype text,
social-media table social-media Cols: bioguide dtype text, facebook dtype text, facebook_id dtype real, govtrack dtype real, instagram dtype text, instagram_id dtype real, thomas dtype integer, twitter dtype text, twitter_id dtype real, youtube dtype text, youtube_id dtype text,
|
legislator
|
What is the religion of current legislator Sherrod Brown?
|
religion refers to religion_bio;
|
SELECT religion_bio FROM current WHERE official_full_name = 'Sherrod Brown'
|
database name:db_id legislator
current table current Cols: ballotpedia id dtype text, bioguide id dtype text, birthday bio dtype date, cspan id dtype real, fec id dtype text, first name dtype text, gender bio dtype text, google entity id dtype text, govtrack id dtype integer, house history id dtype real, interuniversity consortium for political and social research id dtype real, last name dtype text, legislator id dtype text, maplight id dtype real, middle name dtype text, nickname dtype text, official full name dtype text, opensecrets id dtype text, religion bio dtype text, suffix name dtype text, thomas id dtype integer, votesmart id dtype real, wikidata id dtype text, wikipedia id dtype text,
current-terms table current-terms Cols: address dtype text, bioguide id dtype text, caucus dtype text, chamber dtype text, class dtype real, contact_form dtype text, district dtype real, end dtype text, fax dtype text, last dtype text, name dtype text, office dtype text, party dtype text, party affiliations dtype text, phone dtype text, relation dtype text, Really Simple Syndication URL dtype text, start dtype text, state dtype text, state_rank dtype text, title dtype text, type dtype text, url dtype text,
historical table historical Cols: ballotpedia id dtype text, bioguide id dtype text, bioguide previous id dtype text, birthday bio dtype text, cspan id dtype text, fec id dtype text, first name dtype text, gender bio dtype text, google entity id dtype text, govtrack id dtype integer, house history alternate id dtype text, house history id dtype real, interuniversity consortium for political and social research id dtype real, last name dtype text, legislator id dtype text, maplight id dtype text, middle name dtype text, nickname dtype text, official full name dtype text, opensecrets id dtype text, religion bio dtype text, suffix name dtype text, thomas id dtype text, votesmart id dtype text, wikidata id dtype text, wikipedia id dtype text,
historical-terms table historical-terms Cols: address dtype text, bioguide id dtype text, chamber dtype text, class dtype real, contact_form dtype text, district dtype real, end dtype text, fax dtype text, last dtype text, middle dtype text, name dtype text, office dtype text, party dtype text, party affiliations dtype text, phone dtype text, relation dtype text, Really Simple Syndication URL dtype text, start dtype text, state dtype text, state_rank dtype text, title dtype text, type dtype text, url dtype text,
social-media table social-media Cols: bioguide dtype text, facebook dtype text, facebook_id dtype real, govtrack dtype real, instagram dtype text, instagram_id dtype real, thomas dtype integer, twitter dtype text, twitter_id dtype real, youtube dtype text, youtube_id dtype text,
|
legislator
|
What is the religion with the most occurrrence of the current legislators?
|
religion with the most occurrrence of the current legislators refers to MAX(count(religion_bio));
|
SELECT religion_bio FROM current GROUP BY religion_bio ORDER BY COUNT(religion_bio) DESC LIMIT 1
|
database name:db_id legislator
current table current Cols: ballotpedia id dtype text, bioguide id dtype text, birthday bio dtype date, cspan id dtype real, fec id dtype text, first name dtype text, gender bio dtype text, google entity id dtype text, govtrack id dtype integer, house history id dtype real, interuniversity consortium for political and social research id dtype real, last name dtype text, legislator id dtype text, maplight id dtype real, middle name dtype text, nickname dtype text, official full name dtype text, opensecrets id dtype text, religion bio dtype text, suffix name dtype text, thomas id dtype integer, votesmart id dtype real, wikidata id dtype text, wikipedia id dtype text,
current-terms table current-terms Cols: address dtype text, bioguide id dtype text, caucus dtype text, chamber dtype text, class dtype real, contact_form dtype text, district dtype real, end dtype text, fax dtype text, last dtype text, name dtype text, office dtype text, party dtype text, party affiliations dtype text, phone dtype text, relation dtype text, Really Simple Syndication URL dtype text, start dtype text, state dtype text, state_rank dtype text, title dtype text, type dtype text, url dtype text,
historical table historical Cols: ballotpedia id dtype text, bioguide id dtype text, bioguide previous id dtype text, birthday bio dtype text, cspan id dtype text, fec id dtype text, first name dtype text, gender bio dtype text, google entity id dtype text, govtrack id dtype integer, house history alternate id dtype text, house history id dtype real, interuniversity consortium for political and social research id dtype real, last name dtype text, legislator id dtype text, maplight id dtype text, middle name dtype text, nickname dtype text, official full name dtype text, opensecrets id dtype text, religion bio dtype text, suffix name dtype text, thomas id dtype text, votesmart id dtype text, wikidata id dtype text, wikipedia id dtype text,
historical-terms table historical-terms Cols: address dtype text, bioguide id dtype text, chamber dtype text, class dtype real, contact_form dtype text, district dtype real, end dtype text, fax dtype text, last dtype text, middle dtype text, name dtype text, office dtype text, party dtype text, party affiliations dtype text, phone dtype text, relation dtype text, Really Simple Syndication URL dtype text, start dtype text, state dtype text, state_rank dtype text, title dtype text, type dtype text, url dtype text,
social-media table social-media Cols: bioguide dtype text, facebook dtype text, facebook_id dtype real, govtrack dtype real, instagram dtype text, instagram_id dtype real, thomas dtype integer, twitter dtype text, twitter_id dtype real, youtube dtype text, youtube_id dtype text,
|
legislator
|
What is the current official Instagram handle of current legislator Bob Corker?
|
official Instagram handle refers to instagram;
|
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'
|
database name:db_id legislator
current table current Cols: ballotpedia id dtype text, bioguide id dtype text, birthday bio dtype date, cspan id dtype real, fec id dtype text, first name dtype text, gender bio dtype text, google entity id dtype text, govtrack id dtype integer, house history id dtype real, interuniversity consortium for political and social research id dtype real, last name dtype text, legislator id dtype text, maplight id dtype real, middle name dtype text, nickname dtype text, official full name dtype text, opensecrets id dtype text, religion bio dtype text, suffix name dtype text, thomas id dtype integer, votesmart id dtype real, wikidata id dtype text, wikipedia id dtype text,
current-terms table current-terms Cols: address dtype text, bioguide id dtype text, caucus dtype text, chamber dtype text, class dtype real, contact_form dtype text, district dtype real, end dtype text, fax dtype text, last dtype text, name dtype text, office dtype text, party dtype text, party affiliations dtype text, phone dtype text, relation dtype text, Really Simple Syndication URL dtype text, start dtype text, state dtype text, state_rank dtype text, title dtype text, type dtype text, url dtype text,
historical table historical Cols: ballotpedia id dtype text, bioguide id dtype text, bioguide previous id dtype text, birthday bio dtype text, cspan id dtype text, fec id dtype text, first name dtype text, gender bio dtype text, google entity id dtype text, govtrack id dtype integer, house history alternate id dtype text, house history id dtype real, interuniversity consortium for political and social research id dtype real, last name dtype text, legislator id dtype text, maplight id dtype text, middle name dtype text, nickname dtype text, official full name dtype text, opensecrets id dtype text, religion bio dtype text, suffix name dtype text, thomas id dtype text, votesmart id dtype text, wikidata id dtype text, wikipedia id dtype text,
historical-terms table historical-terms Cols: address dtype text, bioguide id dtype text, chamber dtype text, class dtype real, contact_form dtype text, district dtype real, end dtype text, fax dtype text, last dtype text, middle dtype text, name dtype text, office dtype text, party dtype text, party affiliations dtype text, phone dtype text, relation dtype text, Really Simple Syndication URL dtype text, start dtype text, state dtype text, state_rank dtype text, title dtype text, type dtype text, url dtype text,
social-media table social-media Cols: bioguide dtype text, facebook dtype text, facebook_id dtype real, govtrack dtype real, instagram dtype text, instagram_id dtype real, thomas dtype integer, twitter dtype text, twitter_id dtype real, youtube dtype text, youtube_id dtype text,
|
legislator
|
Among the current legislators who have accounts on both http://thomas.gov, how many of them have accounts on instagram?
|
have accounts on both http://thomas.gov refers to thomas_id is NOT null; have accounts on instagram refers to instagram is not null;
|
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
|
database name:db_id legislator
current table current Cols: ballotpedia id dtype text, bioguide id dtype text, birthday bio dtype date, cspan id dtype real, fec id dtype text, first name dtype text, gender bio dtype text, google entity id dtype text, govtrack id dtype integer, house history id dtype real, interuniversity consortium for political and social research id dtype real, last name dtype text, legislator id dtype text, maplight id dtype real, middle name dtype text, nickname dtype text, official full name dtype text, opensecrets id dtype text, religion bio dtype text, suffix name dtype text, thomas id dtype integer, votesmart id dtype real, wikidata id dtype text, wikipedia id dtype text,
current-terms table current-terms Cols: address dtype text, bioguide id dtype text, caucus dtype text, chamber dtype text, class dtype real, contact_form dtype text, district dtype real, end dtype text, fax dtype text, last dtype text, name dtype text, office dtype text, party dtype text, party affiliations dtype text, phone dtype text, relation dtype text, Really Simple Syndication URL dtype text, start dtype text, state dtype text, state_rank dtype text, title dtype text, type dtype text, url dtype text,
historical table historical Cols: ballotpedia id dtype text, bioguide id dtype text, bioguide previous id dtype text, birthday bio dtype text, cspan id dtype text, fec id dtype text, first name dtype text, gender bio dtype text, google entity id dtype text, govtrack id dtype integer, house history alternate id dtype text, house history id dtype real, interuniversity consortium for political and social research id dtype real, last name dtype text, legislator id dtype text, maplight id dtype text, middle name dtype text, nickname dtype text, official full name dtype text, opensecrets id dtype text, religion bio dtype text, suffix name dtype text, thomas id dtype text, votesmart id dtype text, wikidata id dtype text, wikipedia id dtype text,
historical-terms table historical-terms Cols: address dtype text, bioguide id dtype text, chamber dtype text, class dtype real, contact_form dtype text, district dtype real, end dtype text, fax dtype text, last dtype text, middle dtype text, name dtype text, office dtype text, party dtype text, party affiliations dtype text, phone dtype text, relation dtype text, Really Simple Syndication URL dtype text, start dtype text, state dtype text, state_rank dtype text, title dtype text, type dtype text, url dtype text,
social-media table social-media Cols: bioguide dtype text, facebook dtype text, facebook_id dtype real, govtrack dtype real, instagram dtype text, instagram_id dtype real, thomas dtype integer, twitter dtype text, twitter_id dtype real, youtube dtype text, youtube_id dtype text,
|
legislator
|
Please list the username of the current official Facebook presence of all the current legislators that are famous or impact.
|
username of the current official Facebook presence of the legislators refers to facebook; legislators that are famous or impact refers to wikipedia_id is not null;
|
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
|
database name:db_id legislator
current table current Cols: ballotpedia id dtype text, bioguide id dtype text, birthday bio dtype date, cspan id dtype real, fec id dtype text, first name dtype text, gender bio dtype text, google entity id dtype text, govtrack id dtype integer, house history id dtype real, interuniversity consortium for political and social research id dtype real, last name dtype text, legislator id dtype text, maplight id dtype real, middle name dtype text, nickname dtype text, official full name dtype text, opensecrets id dtype text, religion bio dtype text, suffix name dtype text, thomas id dtype integer, votesmart id dtype real, wikidata id dtype text, wikipedia id dtype text,
current-terms table current-terms Cols: address dtype text, bioguide id dtype text, caucus dtype text, chamber dtype text, class dtype real, contact_form dtype text, district dtype real, end dtype text, fax dtype text, last dtype text, name dtype text, office dtype text, party dtype text, party affiliations dtype text, phone dtype text, relation dtype text, Really Simple Syndication URL dtype text, start dtype text, state dtype text, state_rank dtype text, title dtype text, type dtype text, url dtype text,
historical table historical Cols: ballotpedia id dtype text, bioguide id dtype text, bioguide previous id dtype text, birthday bio dtype text, cspan id dtype text, fec id dtype text, first name dtype text, gender bio dtype text, google entity id dtype text, govtrack id dtype integer, house history alternate id dtype text, house history id dtype real, interuniversity consortium for political and social research id dtype real, last name dtype text, legislator id dtype text, maplight id dtype text, middle name dtype text, nickname dtype text, official full name dtype text, opensecrets id dtype text, religion bio dtype text, suffix name dtype text, thomas id dtype text, votesmart id dtype text, wikidata id dtype text, wikipedia id dtype text,
historical-terms table historical-terms Cols: address dtype text, bioguide id dtype text, chamber dtype text, class dtype real, contact_form dtype text, district dtype real, end dtype text, fax dtype text, last dtype text, middle dtype text, name dtype text, office dtype text, party dtype text, party affiliations dtype text, phone dtype text, relation dtype text, Really Simple Syndication URL dtype text, start dtype text, state dtype text, state_rank dtype text, title dtype text, type dtype text, url dtype text,
social-media table social-media Cols: bioguide dtype text, facebook dtype text, facebook_id dtype real, govtrack dtype real, instagram dtype text, instagram_id dtype real, thomas dtype integer, twitter dtype text, twitter_id dtype real, youtube dtype text, youtube_id dtype text,
|
legislator
|
For how many terms have the oldest current legislator served?
|
oldest legislator refers to MIN(birthday_bio);
|
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 )
|
database name:db_id legislator
current table current Cols: ballotpedia id dtype text, bioguide id dtype text, birthday bio dtype date, cspan id dtype real, fec id dtype text, first name dtype text, gender bio dtype text, google entity id dtype text, govtrack id dtype integer, house history id dtype real, interuniversity consortium for political and social research id dtype real, last name dtype text, legislator id dtype text, maplight id dtype real, middle name dtype text, nickname dtype text, official full name dtype text, opensecrets id dtype text, religion bio dtype text, suffix name dtype text, thomas id dtype integer, votesmart id dtype real, wikidata id dtype text, wikipedia id dtype text,
current-terms table current-terms Cols: address dtype text, bioguide id dtype text, caucus dtype text, chamber dtype text, class dtype real, contact_form dtype text, district dtype real, end dtype text, fax dtype text, last dtype text, name dtype text, office dtype text, party dtype text, party affiliations dtype text, phone dtype text, relation dtype text, Really Simple Syndication URL dtype text, start dtype text, state dtype text, state_rank dtype text, title dtype text, type dtype text, url dtype text,
historical table historical Cols: ballotpedia id dtype text, bioguide id dtype text, bioguide previous id dtype text, birthday bio dtype text, cspan id dtype text, fec id dtype text, first name dtype text, gender bio dtype text, google entity id dtype text, govtrack id dtype integer, house history alternate id dtype text, house history id dtype real, interuniversity consortium for political and social research id dtype real, last name dtype text, legislator id dtype text, maplight id dtype text, middle name dtype text, nickname dtype text, official full name dtype text, opensecrets id dtype text, religion bio dtype text, suffix name dtype text, thomas id dtype text, votesmart id dtype text, wikidata id dtype text, wikipedia id dtype text,
historical-terms table historical-terms Cols: address dtype text, bioguide id dtype text, chamber dtype text, class dtype real, contact_form dtype text, district dtype real, end dtype text, fax dtype text, last dtype text, middle dtype text, name dtype text, office dtype text, party dtype text, party affiliations dtype text, phone dtype text, relation dtype text, Really Simple Syndication URL dtype text, start dtype text, state dtype text, state_rank dtype text, title dtype text, type dtype text, url dtype text,
social-media table social-media Cols: bioguide dtype text, facebook dtype text, facebook_id dtype real, govtrack dtype real, instagram dtype text, instagram_id dtype real, thomas dtype integer, twitter dtype text, twitter_id dtype real, youtube dtype text, youtube_id dtype text,
|
legislator
|
What was current legislator Sherrod Brown's Washington, D.C. office phone number during his term starting on 2013/1/3?
|
Washington, DC office phone number refers to phone; terms starting on 2013/1/3 refers to start = '2013-01-03';
|
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'
|
database name:db_id legislator
current table current Cols: ballotpedia id dtype text, bioguide id dtype text, birthday bio dtype date, cspan id dtype real, fec id dtype text, first name dtype text, gender bio dtype text, google entity id dtype text, govtrack id dtype integer, house history id dtype real, interuniversity consortium for political and social research id dtype real, last name dtype text, legislator id dtype text, maplight id dtype real, middle name dtype text, nickname dtype text, official full name dtype text, opensecrets id dtype text, religion bio dtype text, suffix name dtype text, thomas id dtype integer, votesmart id dtype real, wikidata id dtype text, wikipedia id dtype text,
current-terms table current-terms Cols: address dtype text, bioguide id dtype text, caucus dtype text, chamber dtype text, class dtype real, contact_form dtype text, district dtype real, end dtype text, fax dtype text, last dtype text, name dtype text, office dtype text, party dtype text, party affiliations dtype text, phone dtype text, relation dtype text, Really Simple Syndication URL dtype text, start dtype text, state dtype text, state_rank dtype text, title dtype text, type dtype text, url dtype text,
historical table historical Cols: ballotpedia id dtype text, bioguide id dtype text, bioguide previous id dtype text, birthday bio dtype text, cspan id dtype text, fec id dtype text, first name dtype text, gender bio dtype text, google entity id dtype text, govtrack id dtype integer, house history alternate id dtype text, house history id dtype real, interuniversity consortium for political and social research id dtype real, last name dtype text, legislator id dtype text, maplight id dtype text, middle name dtype text, nickname dtype text, official full name dtype text, opensecrets id dtype text, religion bio dtype text, suffix name dtype text, thomas id dtype text, votesmart id dtype text, wikidata id dtype text, wikipedia id dtype text,
historical-terms table historical-terms Cols: address dtype text, bioguide id dtype text, chamber dtype text, class dtype real, contact_form dtype text, district dtype real, end dtype text, fax dtype text, last dtype text, middle dtype text, name dtype text, office dtype text, party dtype text, party affiliations dtype text, phone dtype text, relation dtype text, Really Simple Syndication URL dtype text, start dtype text, state dtype text, state_rank dtype text, title dtype text, type dtype text, url dtype text,
social-media table social-media Cols: bioguide dtype text, facebook dtype text, facebook_id dtype real, govtrack dtype real, instagram dtype text, instagram_id dtype real, thomas dtype integer, twitter dtype text, twitter_id dtype real, youtube dtype text, youtube_id dtype text,
|
legislator
|
Current legislator Sherrod Brown has been in the Democrat party during how many terms that he has served?
| null |
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'
|
database name:db_id legislator
current table current Cols: ballotpedia id dtype text, bioguide id dtype text, birthday bio dtype date, cspan id dtype real, fec id dtype text, first name dtype text, gender bio dtype text, google entity id dtype text, govtrack id dtype integer, house history id dtype real, interuniversity consortium for political and social research id dtype real, last name dtype text, legislator id dtype text, maplight id dtype real, middle name dtype text, nickname dtype text, official full name dtype text, opensecrets id dtype text, religion bio dtype text, suffix name dtype text, thomas id dtype integer, votesmart id dtype real, wikidata id dtype text, wikipedia id dtype text,
current-terms table current-terms Cols: address dtype text, bioguide id dtype text, caucus dtype text, chamber dtype text, class dtype real, contact_form dtype text, district dtype real, end dtype text, fax dtype text, last dtype text, name dtype text, office dtype text, party dtype text, party affiliations dtype text, phone dtype text, relation dtype text, Really Simple Syndication URL dtype text, start dtype text, state dtype text, state_rank dtype text, title dtype text, type dtype text, url dtype text,
historical table historical Cols: ballotpedia id dtype text, bioguide id dtype text, bioguide previous id dtype text, birthday bio dtype text, cspan id dtype text, fec id dtype text, first name dtype text, gender bio dtype text, google entity id dtype text, govtrack id dtype integer, house history alternate id dtype text, house history id dtype real, interuniversity consortium for political and social research id dtype real, last name dtype text, legislator id dtype text, maplight id dtype text, middle name dtype text, nickname dtype text, official full name dtype text, opensecrets id dtype text, religion bio dtype text, suffix name dtype text, thomas id dtype text, votesmart id dtype text, wikidata id dtype text, wikipedia id dtype text,
historical-terms table historical-terms Cols: address dtype text, bioguide id dtype text, chamber dtype text, class dtype real, contact_form dtype text, district dtype real, end dtype text, fax dtype text, last dtype text, middle dtype text, name dtype text, office dtype text, party dtype text, party affiliations dtype text, phone dtype text, relation dtype text, Really Simple Syndication URL dtype text, start dtype text, state dtype text, state_rank dtype text, title dtype text, type dtype text, url dtype text,
social-media table social-media Cols: bioguide dtype text, facebook dtype text, facebook_id dtype real, govtrack dtype real, instagram dtype text, instagram_id dtype real, thomas dtype integer, twitter dtype text, twitter_id dtype real, youtube dtype text, youtube_id dtype text,
|
legislator
|
Please list the full official names of all the current legislators who served the term that started on 2013/1/3.
|
term that started on 2013/1/3 refers to start = '2013-01-03';
|
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'
|
database name:db_id legislator
current table current Cols: ballotpedia id dtype text, bioguide id dtype text, birthday bio dtype date, cspan id dtype real, fec id dtype text, first name dtype text, gender bio dtype text, google entity id dtype text, govtrack id dtype integer, house history id dtype real, interuniversity consortium for political and social research id dtype real, last name dtype text, legislator id dtype text, maplight id dtype real, middle name dtype text, nickname dtype text, official full name dtype text, opensecrets id dtype text, religion bio dtype text, suffix name dtype text, thomas id dtype integer, votesmart id dtype real, wikidata id dtype text, wikipedia id dtype text,
current-terms table current-terms Cols: address dtype text, bioguide id dtype text, caucus dtype text, chamber dtype text, class dtype real, contact_form dtype text, district dtype real, end dtype text, fax dtype text, last dtype text, name dtype text, office dtype text, party dtype text, party affiliations dtype text, phone dtype text, relation dtype text, Really Simple Syndication URL dtype text, start dtype text, state dtype text, state_rank dtype text, title dtype text, type dtype text, url dtype text,
historical table historical Cols: ballotpedia id dtype text, bioguide id dtype text, bioguide previous id dtype text, birthday bio dtype text, cspan id dtype text, fec id dtype text, first name dtype text, gender bio dtype text, google entity id dtype text, govtrack id dtype integer, house history alternate id dtype text, house history id dtype real, interuniversity consortium for political and social research id dtype real, last name dtype text, legislator id dtype text, maplight id dtype text, middle name dtype text, nickname dtype text, official full name dtype text, opensecrets id dtype text, religion bio dtype text, suffix name dtype text, thomas id dtype text, votesmart id dtype text, wikidata id dtype text, wikipedia id dtype text,
historical-terms table historical-terms Cols: address dtype text, bioguide id dtype text, chamber dtype text, class dtype real, contact_form dtype text, district dtype real, end dtype text, fax dtype text, last dtype text, middle dtype text, name dtype text, office dtype text, party dtype text, party affiliations dtype text, phone dtype text, relation dtype text, Really Simple Syndication URL dtype text, start dtype text, state dtype text, state_rank dtype text, title dtype text, type dtype text, url dtype text,
social-media table social-media Cols: bioguide dtype text, facebook dtype text, facebook_id dtype real, govtrack dtype real, instagram dtype text, instagram_id dtype real, thomas dtype integer, twitter dtype text, twitter_id dtype real, youtube dtype text, youtube_id dtype text,
|
legislator
|
Among the current legislators who served the term starting on 2013/1/3, how many of them are female?
|
term starting on 2013/1/3 refers to start = '2013-01-03; female refers to gender_bio = 'F';
|
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'
|
database name:db_id legislator
current table current Cols: ballotpedia id dtype text, bioguide id dtype text, birthday bio dtype date, cspan id dtype real, fec id dtype text, first name dtype text, gender bio dtype text, google entity id dtype text, govtrack id dtype integer, house history id dtype real, interuniversity consortium for political and social research id dtype real, last name dtype text, legislator id dtype text, maplight id dtype real, middle name dtype text, nickname dtype text, official full name dtype text, opensecrets id dtype text, religion bio dtype text, suffix name dtype text, thomas id dtype integer, votesmart id dtype real, wikidata id dtype text, wikipedia id dtype text,
current-terms table current-terms Cols: address dtype text, bioguide id dtype text, caucus dtype text, chamber dtype text, class dtype real, contact_form dtype text, district dtype real, end dtype text, fax dtype text, last dtype text, name dtype text, office dtype text, party dtype text, party affiliations dtype text, phone dtype text, relation dtype text, Really Simple Syndication URL dtype text, start dtype text, state dtype text, state_rank dtype text, title dtype text, type dtype text, url dtype text,
historical table historical Cols: ballotpedia id dtype text, bioguide id dtype text, bioguide previous id dtype text, birthday bio dtype text, cspan id dtype text, fec id dtype text, first name dtype text, gender bio dtype text, google entity id dtype text, govtrack id dtype integer, house history alternate id dtype text, house history id dtype real, interuniversity consortium for political and social research id dtype real, last name dtype text, legislator id dtype text, maplight id dtype text, middle name dtype text, nickname dtype text, official full name dtype text, opensecrets id dtype text, religion bio dtype text, suffix name dtype text, thomas id dtype text, votesmart id dtype text, wikidata id dtype text, wikipedia id dtype text,
historical-terms table historical-terms Cols: address dtype text, bioguide id dtype text, chamber dtype text, class dtype real, contact_form dtype text, district dtype real, end dtype text, fax dtype text, last dtype text, middle dtype text, name dtype text, office dtype text, party dtype text, party affiliations dtype text, phone dtype text, relation dtype text, Really Simple Syndication URL dtype text, start dtype text, state dtype text, state_rank dtype text, title dtype text, type dtype text, url dtype text,
social-media table social-media Cols: bioguide dtype text, facebook dtype text, facebook_id dtype real, govtrack dtype real, instagram dtype text, instagram_id dtype real, thomas dtype integer, twitter dtype text, twitter_id dtype real, youtube dtype text, youtube_id dtype text,
|
legislator
|
What is the full official name of the current legislator that has served for the most number of terms?
|
served for the most number of terms refers to MAX(COUNT(bioguide));
|
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
|
database name:db_id legislator
current table current Cols: ballotpedia id dtype text, bioguide id dtype text, birthday bio dtype date, cspan id dtype real, fec id dtype text, first name dtype text, gender bio dtype text, google entity id dtype text, govtrack id dtype integer, house history id dtype real, interuniversity consortium for political and social research id dtype real, last name dtype text, legislator id dtype text, maplight id dtype real, middle name dtype text, nickname dtype text, official full name dtype text, opensecrets id dtype text, religion bio dtype text, suffix name dtype text, thomas id dtype integer, votesmart id dtype real, wikidata id dtype text, wikipedia id dtype text,
current-terms table current-terms Cols: address dtype text, bioguide id dtype text, caucus dtype text, chamber dtype text, class dtype real, contact_form dtype text, district dtype real, end dtype text, fax dtype text, last dtype text, name dtype text, office dtype text, party dtype text, party affiliations dtype text, phone dtype text, relation dtype text, Really Simple Syndication URL dtype text, start dtype text, state dtype text, state_rank dtype text, title dtype text, type dtype text, url dtype text,
historical table historical Cols: ballotpedia id dtype text, bioguide id dtype text, bioguide previous id dtype text, birthday bio dtype text, cspan id dtype text, fec id dtype text, first name dtype text, gender bio dtype text, google entity id dtype text, govtrack id dtype integer, house history alternate id dtype text, house history id dtype real, interuniversity consortium for political and social research id dtype real, last name dtype text, legislator id dtype text, maplight id dtype text, middle name dtype text, nickname dtype text, official full name dtype text, opensecrets id dtype text, religion bio dtype text, suffix name dtype text, thomas id dtype text, votesmart id dtype text, wikidata id dtype text, wikipedia id dtype text,
historical-terms table historical-terms Cols: address dtype text, bioguide id dtype text, chamber dtype text, class dtype real, contact_form dtype text, district dtype real, end dtype text, fax dtype text, last dtype text, middle dtype text, name dtype text, office dtype text, party dtype text, party affiliations dtype text, phone dtype text, relation dtype text, Really Simple Syndication URL dtype text, start dtype text, state dtype text, state_rank dtype text, title dtype text, type dtype text, url dtype text,
social-media table social-media Cols: bioguide dtype text, facebook dtype text, facebook_id dtype real, govtrack dtype real, instagram dtype text, instagram_id dtype real, thomas dtype integer, twitter dtype text, twitter_id dtype real, youtube dtype text, youtube_id dtype text,
|
legislator
|
For how many terms has current legislator Sherrod Brown served as a representative for district no.13?
|
district no. 13 refers to district = 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
|
database name:db_id legislator
current table current Cols: ballotpedia id dtype text, bioguide id dtype text, birthday bio dtype date, cspan id dtype real, fec id dtype text, first name dtype text, gender bio dtype text, google entity id dtype text, govtrack id dtype integer, house history id dtype real, interuniversity consortium for political and social research id dtype real, last name dtype text, legislator id dtype text, maplight id dtype real, middle name dtype text, nickname dtype text, official full name dtype text, opensecrets id dtype text, religion bio dtype text, suffix name dtype text, thomas id dtype integer, votesmart id dtype real, wikidata id dtype text, wikipedia id dtype text,
current-terms table current-terms Cols: address dtype text, bioguide id dtype text, caucus dtype text, chamber dtype text, class dtype real, contact_form dtype text, district dtype real, end dtype text, fax dtype text, last dtype text, name dtype text, office dtype text, party dtype text, party affiliations dtype text, phone dtype text, relation dtype text, Really Simple Syndication URL dtype text, start dtype text, state dtype text, state_rank dtype text, title dtype text, type dtype text, url dtype text,
historical table historical Cols: ballotpedia id dtype text, bioguide id dtype text, bioguide previous id dtype text, birthday bio dtype text, cspan id dtype text, fec id dtype text, first name dtype text, gender bio dtype text, google entity id dtype text, govtrack id dtype integer, house history alternate id dtype text, house history id dtype real, interuniversity consortium for political and social research id dtype real, last name dtype text, legislator id dtype text, maplight id dtype text, middle name dtype text, nickname dtype text, official full name dtype text, opensecrets id dtype text, religion bio dtype text, suffix name dtype text, thomas id dtype text, votesmart id dtype text, wikidata id dtype text, wikipedia id dtype text,
historical-terms table historical-terms Cols: address dtype text, bioguide id dtype text, chamber dtype text, class dtype real, contact_form dtype text, district dtype real, end dtype text, fax dtype text, last dtype text, middle dtype text, name dtype text, office dtype text, party dtype text, party affiliations dtype text, phone dtype text, relation dtype text, Really Simple Syndication URL dtype text, start dtype text, state dtype text, state_rank dtype text, title dtype text, type dtype text, url dtype text,
social-media table social-media Cols: bioguide dtype text, facebook dtype text, facebook_id dtype real, govtrack dtype real, instagram dtype text, instagram_id dtype real, thomas dtype integer, twitter dtype text, twitter_id dtype real, youtube dtype text, youtube_id dtype text,
|
legislator
|
What is the official full name of the current legislator whose current official Facebook presence is "senjoniernst"?
|
current official Facebook presence is "senjoniernst" refers to facebook = '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'
|
database name:db_id legislator
current table current Cols: ballotpedia id dtype text, bioguide id dtype text, birthday bio dtype date, cspan id dtype real, fec id dtype text, first name dtype text, gender bio dtype text, google entity id dtype text, govtrack id dtype integer, house history id dtype real, interuniversity consortium for political and social research id dtype real, last name dtype text, legislator id dtype text, maplight id dtype real, middle name dtype text, nickname dtype text, official full name dtype text, opensecrets id dtype text, religion bio dtype text, suffix name dtype text, thomas id dtype integer, votesmart id dtype real, wikidata id dtype text, wikipedia id dtype text,
current-terms table current-terms Cols: address dtype text, bioguide id dtype text, caucus dtype text, chamber dtype text, class dtype real, contact_form dtype text, district dtype real, end dtype text, fax dtype text, last dtype text, name dtype text, office dtype text, party dtype text, party affiliations dtype text, phone dtype text, relation dtype text, Really Simple Syndication URL dtype text, start dtype text, state dtype text, state_rank dtype text, title dtype text, type dtype text, url dtype text,
historical table historical Cols: ballotpedia id dtype text, bioguide id dtype text, bioguide previous id dtype text, birthday bio dtype text, cspan id dtype text, fec id dtype text, first name dtype text, gender bio dtype text, google entity id dtype text, govtrack id dtype integer, house history alternate id dtype text, house history id dtype real, interuniversity consortium for political and social research id dtype real, last name dtype text, legislator id dtype text, maplight id dtype text, middle name dtype text, nickname dtype text, official full name dtype text, opensecrets id dtype text, religion bio dtype text, suffix name dtype text, thomas id dtype text, votesmart id dtype text, wikidata id dtype text, wikipedia id dtype text,
historical-terms table historical-terms Cols: address dtype text, bioguide id dtype text, chamber dtype text, class dtype real, contact_form dtype text, district dtype real, end dtype text, fax dtype text, last dtype text, middle dtype text, name dtype text, office dtype text, party dtype text, party affiliations dtype text, phone dtype text, relation dtype text, Really Simple Syndication URL dtype text, start dtype text, state dtype text, state_rank dtype text, title dtype text, type dtype text, url dtype text,
social-media table social-media Cols: bioguide dtype text, facebook dtype text, facebook_id dtype real, govtrack dtype real, instagram dtype text, instagram_id dtype real, thomas dtype integer, twitter dtype text, twitter_id dtype real, youtube dtype text, youtube_id dtype text,
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.