db_id stringclasses 66 values | question stringlengths 24 325 | evidence stringlengths 1 673 ⌀ | gold_query stringlengths 23 804 | db_schema stringclasses 66 values |
|---|---|---|---|---|
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 | CREATE TABLE current
(
gender_bio TEXT, -- Example Values: `M`, `F` | Value Statics: Total count 541 - Distinct count 2 - Null count 0
suffix_name TEXT, -- Example Values: `Jr.`, `III`, `II` | Value Statics: Total count 20 - Distinct count 3 - Null count 521
house_history_id REAL, --
birthday_bio DATE, --
nickname_name TEXT, --
religion_bio TEXT, --
google_entity_id_id TEXT, --
govtrack_id INTEGER, --
cspan_id REAL, --
primary key (bioguide_id, cspan_id),
wikipedia_id TEXT, --
maplight_id REAL, --
last_name TEXT, --
icpsr_id REAL, --
fec_id TEXT, --
votesmart_id REAL, --
first_name TEXT, --
lis_id TEXT, --
bioguide_id TEXT, --
wikidata_id TEXT, --
middle_name TEXT, --
ballotpedia_id TEXT, --
opensecrets_id TEXT, --
official_full_name TEXT, --
thomas_id INTEGER, --
);
CREATE TABLE historical
(
fec_id TEXT, --
suffix_name TEXT, -- Example Values: `Jr.`, `Sr.`, `II`, `III`, `IV` | Value Statics: Total count 418 - Distinct count 5 - Null count 11446
govtrack_id INTEGER, --
house_history_id REAL, --
opensecrets_id TEXT, --
votesmart_id TEXT, --
bioguide_id TEXT primary key,
nickname_name TEXT, --
official_full_name TEXT, --
house_history_alternate_id TEXT, -- Example Values: `13283.0` | Value Statics: Total count 1 - Distinct count 1 - Null count 11863
gender_bio TEXT, -- Example Values: `M`, `F` | Value Statics: Total count 11864 - Distinct count 2 - Null count 0
bioguide_previous_id TEXT, -- Example Values: `['F000246']`, `['L000266']`, `['W000790']` | Value Statics: Total count 3 - Distinct count 3 - Null count 11861
icpsr_id REAL, --
wikipedia_id TEXT, --
birthday_bio TEXT, --
religion_bio TEXT, --
lis_id TEXT, --
middle_name TEXT, --
cspan_id TEXT, --
last_name TEXT, --
first_name TEXT, --
wikidata_id TEXT, --
thomas_id TEXT, --
ballotpedia_id TEXT, --
maplight_id TEXT, --
google_entity_id_id TEXT, --
);
CREATE TABLE historical-terms
(
bioguide TEXT primary key,
middle TEXT, --
title TEXT, -- Example Values: `Majority Leader`, `Speaker` | Value Statics: Total count 3 - Distinct count 2 - Null count 11861
party TEXT, --
type TEXT, -- Example Values: `sen`, `rep` | Value Statics: Total count 11858 - Distinct count 2 - Null count 6
phone TEXT, --
rss_url TEXT, -- Example Values: `http://radel.house.gov/news/rss.aspx`, `http://www.begich.senate.gov/public/?a=rss.feed`, `http://www.hagan.senate.gov/rss`, `http://negretemcleod.house.gov/rss.xml`, `http://garcia.house.gov/rss.xml` | Value Statics: Total count 12 - Distinct count 12 - Null count 11852
name TEXT, --
start TEXT, --
address TEXT, --
party_affiliations TEXT, -- Example Values: `{'start': '2009-01-06', 'end': '2009-12-22', 'party': 'Democrat'}`, `{'start': '2003-01-07', 'end': '2004-08-09', 'party': 'Democrat'}` | Value Statics: Total count 2 - Distinct count 2 - Null count 11862
relation TEXT, --
state_rank TEXT, -- Example Values: `junior`, `senior` | Value Statics: Total count 7 - Distinct count 2 - Null count 11857
last TEXT, -- Example Values: `Levy`, `Lambert`, `Bono` | Value Statics: Total count 3 - Distinct count 3 - Null count 11861
url TEXT, --
fax TEXT, --
contact_form TEXT, --
office TEXT, --
state TEXT, --
foreign key (bioguide) references historical(bioguide_id),
class REAL, -- Example Values: `2.0`, `1.0`, `3.0` | Value Statics: Total count 1256 - Distinct count 3 - Null count 10608
end TEXT, --
district REAL, --
chamber TEXT, -- Example Values: `house`, `senate` | Value Statics: Total count 3 - Distinct count 2 - Null count 11861
);
CREATE TABLE current-terms
(
foreign key (bioguide) references current(bioguide_id),
phone TEXT, --
party_affiliations TEXT, -- Example Values: `{'start': '2009-01-06', 'end': '2009-02-23', 'party': 'Independent'}`, `{'start': '1993-01-05', 'end': '1994-11-09', 'party': 'Democrat'}` | Value Statics: Total count 2 - Distinct count 2 - Null count 3076
title TEXT, -- Example Values: `Minority Whip`, `Majority Whip`, `Minority Leader`, `Majority Leader`, `Speaker` | Value Statics: Total count 28 - Distinct count 5 - Null count 3050
district REAL, --
bioguide TEXT, --
office TEXT, --
class REAL, -- Example Values: `1.0`, `2.0`, `3.0` | Value Statics: Total count 244 - Distinct count 3 - Null count 2834
type TEXT, -- Example Values: `rep`, `sen` | Value Statics: Total count 3014 - Distinct count 2 - Null count 64
start TEXT, --
address TEXT, --
rss_url TEXT, --
url TEXT, --
primary key (bioguide, end),
fax TEXT, --
chamber TEXT, -- Example Values: `senate`, `house` | Value Statics: Total count 28 - Distinct count 2 - Null count 3050
end TEXT, --
caucus TEXT, -- Example Values: `Democrat` | Value Statics: Total count 3 - Distinct count 1 - Null count 3075
state TEXT, --
last TEXT, -- Example Values: `Menendez` | Value Statics: Total count 1 - Distinct count 1 - Null count 3077
relation TEXT, -- Example Values: `son`, `nephew`, `cousin`, `daughter`, `grandson` | Value Statics: Total count 35 - Distinct count 13 - Null count 3043
state_rank TEXT, -- Example Values: `senior`, `junior` | Value Statics: Total count 147 - Distinct count 2 - Null count 2931
name TEXT, --
contact_form TEXT, --
party TEXT, -- Example Values: `Democrat`, `Republican`, `Independent` | Value Statics: Total count 3014 - Distinct count 3 - Null count 64
);
CREATE TABLE social-media
(
foreign key (bioguide) references current(bioguide_id),
instagram TEXT, --
thomas INTEGER, --
youtube TEXT, --
twitter TEXT, --
facebook TEXT, --
youtube_id TEXT, --
twitter_id REAL, --
facebook_id REAL, --
govtrack REAL, --
bioguide TEXT primary key,
instagram_id REAL, --
); |
shakespeare | What is the description of Act 1, Scene 2 in Twelfth Night? | Twelfth Night refers to Title = 'Twelfth Night' | SELECT T2.Description FROM works AS T1 INNER JOIN chapters AS T2 ON T1.id = T2.work_id WHERE T1.Title = 'Twelfth Night' AND T2.Act = 1 AND T2.Scene = 2 | CREATE TABLE characters
(
CharName TEXT not null, --
Abbrev TEXT not null, --
Description TEXT not null, --
id INTEGER primary key autoincrement,
);
CREATE TABLE paragraphs
(
chapter_id INTEGER default 0 not null references chapters, --
character_id INTEGER not null references characters, --
ParagraphNum INTEGER not null, --
PlainText TEXT not null, --
id INTEGER primary key autoincrement,
);
CREATE TABLE works
(
GenreType TEXT not null, -- Example Values: `Comedy`, `Tragedy`, `History`, `Poem`, `Sonnet` | Value Statics: Total count 43 - Distinct count 5 - Null count 0
Title TEXT not null, --
Date INTEGER not null, --
id INTEGER primary key autoincrement,
LongTitle TEXT not null, --
);
CREATE TABLE chapters
(
work_id INTEGER not null references works, --
Act INTEGER not null, -- Example Values: `1`, `2`, `3`, `4`, `5` | Value Statics: Total count 945 - Distinct count 6 - Null count 0
Description TEXT not null, --
id INTEGER primary key autoincrement,
Scene INTEGER not null, --
); |
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 | CREATE TABLE current
(
gender_bio TEXT, -- Example Values: `M`, `F` | Value Statics: Total count 541 - Distinct count 2 - Null count 0
suffix_name TEXT, -- Example Values: `Jr.`, `III`, `II` | Value Statics: Total count 20 - Distinct count 3 - Null count 521
house_history_id REAL, --
birthday_bio DATE, --
nickname_name TEXT, --
religion_bio TEXT, --
google_entity_id_id TEXT, --
govtrack_id INTEGER, --
cspan_id REAL, --
primary key (bioguide_id, cspan_id),
wikipedia_id TEXT, --
maplight_id REAL, --
last_name TEXT, --
icpsr_id REAL, --
fec_id TEXT, --
votesmart_id REAL, --
first_name TEXT, --
lis_id TEXT, --
bioguide_id TEXT, --
wikidata_id TEXT, --
middle_name TEXT, --
ballotpedia_id TEXT, --
opensecrets_id TEXT, --
official_full_name TEXT, --
thomas_id INTEGER, --
);
CREATE TABLE historical
(
fec_id TEXT, --
suffix_name TEXT, -- Example Values: `Jr.`, `Sr.`, `II`, `III`, `IV` | Value Statics: Total count 418 - Distinct count 5 - Null count 11446
govtrack_id INTEGER, --
house_history_id REAL, --
opensecrets_id TEXT, --
votesmart_id TEXT, --
bioguide_id TEXT primary key,
nickname_name TEXT, --
official_full_name TEXT, --
house_history_alternate_id TEXT, -- Example Values: `13283.0` | Value Statics: Total count 1 - Distinct count 1 - Null count 11863
gender_bio TEXT, -- Example Values: `M`, `F` | Value Statics: Total count 11864 - Distinct count 2 - Null count 0
bioguide_previous_id TEXT, -- Example Values: `['F000246']`, `['L000266']`, `['W000790']` | Value Statics: Total count 3 - Distinct count 3 - Null count 11861
icpsr_id REAL, --
wikipedia_id TEXT, --
birthday_bio TEXT, --
religion_bio TEXT, --
lis_id TEXT, --
middle_name TEXT, --
cspan_id TEXT, --
last_name TEXT, --
first_name TEXT, --
wikidata_id TEXT, --
thomas_id TEXT, --
ballotpedia_id TEXT, --
maplight_id TEXT, --
google_entity_id_id TEXT, --
);
CREATE TABLE historical-terms
(
bioguide TEXT primary key,
middle TEXT, --
title TEXT, -- Example Values: `Majority Leader`, `Speaker` | Value Statics: Total count 3 - Distinct count 2 - Null count 11861
party TEXT, --
type TEXT, -- Example Values: `sen`, `rep` | Value Statics: Total count 11858 - Distinct count 2 - Null count 6
phone TEXT, --
rss_url TEXT, -- Example Values: `http://radel.house.gov/news/rss.aspx`, `http://www.begich.senate.gov/public/?a=rss.feed`, `http://www.hagan.senate.gov/rss`, `http://negretemcleod.house.gov/rss.xml`, `http://garcia.house.gov/rss.xml` | Value Statics: Total count 12 - Distinct count 12 - Null count 11852
name TEXT, --
start TEXT, --
address TEXT, --
party_affiliations TEXT, -- Example Values: `{'start': '2009-01-06', 'end': '2009-12-22', 'party': 'Democrat'}`, `{'start': '2003-01-07', 'end': '2004-08-09', 'party': 'Democrat'}` | Value Statics: Total count 2 - Distinct count 2 - Null count 11862
relation TEXT, --
state_rank TEXT, -- Example Values: `junior`, `senior` | Value Statics: Total count 7 - Distinct count 2 - Null count 11857
last TEXT, -- Example Values: `Levy`, `Lambert`, `Bono` | Value Statics: Total count 3 - Distinct count 3 - Null count 11861
url TEXT, --
fax TEXT, --
contact_form TEXT, --
office TEXT, --
state TEXT, --
foreign key (bioguide) references historical(bioguide_id),
class REAL, -- Example Values: `2.0`, `1.0`, `3.0` | Value Statics: Total count 1256 - Distinct count 3 - Null count 10608
end TEXT, --
district REAL, --
chamber TEXT, -- Example Values: `house`, `senate` | Value Statics: Total count 3 - Distinct count 2 - Null count 11861
);
CREATE TABLE current-terms
(
foreign key (bioguide) references current(bioguide_id),
phone TEXT, --
party_affiliations TEXT, -- Example Values: `{'start': '2009-01-06', 'end': '2009-02-23', 'party': 'Independent'}`, `{'start': '1993-01-05', 'end': '1994-11-09', 'party': 'Democrat'}` | Value Statics: Total count 2 - Distinct count 2 - Null count 3076
title TEXT, -- Example Values: `Minority Whip`, `Majority Whip`, `Minority Leader`, `Majority Leader`, `Speaker` | Value Statics: Total count 28 - Distinct count 5 - Null count 3050
district REAL, --
bioguide TEXT, --
office TEXT, --
class REAL, -- Example Values: `1.0`, `2.0`, `3.0` | Value Statics: Total count 244 - Distinct count 3 - Null count 2834
type TEXT, -- Example Values: `rep`, `sen` | Value Statics: Total count 3014 - Distinct count 2 - Null count 64
start TEXT, --
address TEXT, --
rss_url TEXT, --
url TEXT, --
primary key (bioguide, end),
fax TEXT, --
chamber TEXT, -- Example Values: `senate`, `house` | Value Statics: Total count 28 - Distinct count 2 - Null count 3050
end TEXT, --
caucus TEXT, -- Example Values: `Democrat` | Value Statics: Total count 3 - Distinct count 1 - Null count 3075
state TEXT, --
last TEXT, -- Example Values: `Menendez` | Value Statics: Total count 1 - Distinct count 1 - Null count 3077
relation TEXT, -- Example Values: `son`, `nephew`, `cousin`, `daughter`, `grandson` | Value Statics: Total count 35 - Distinct count 13 - Null count 3043
state_rank TEXT, -- Example Values: `senior`, `junior` | Value Statics: Total count 147 - Distinct count 2 - Null count 2931
name TEXT, --
contact_form TEXT, --
party TEXT, -- Example Values: `Democrat`, `Republican`, `Independent` | Value Statics: Total count 3014 - Distinct count 3 - Null count 64
);
CREATE TABLE social-media
(
foreign key (bioguide) references current(bioguide_id),
instagram TEXT, --
thomas INTEGER, --
youtube TEXT, --
twitter TEXT, --
facebook TEXT, --
youtube_id TEXT, --
twitter_id REAL, --
facebook_id REAL, --
govtrack REAL, --
bioguide TEXT primary key,
instagram_id REAL, --
); |
professional_basketball | In the year 1998, how many home wins did the team which had the 1st round, 12th pick have that year? | in 1998 refers to year = 1998; 1st round refers to draftRound = 1; 12th pick refers to draftSelection = 12; home win refers to homeWon | SELECT T2.homeWon FROM draft AS T1 INNER JOIN teams AS T2 ON T1.tmID = T2.tmID AND T1.draftYear = T2.year WHERE T1.draftRound = 1 AND T1.draftSelection = 12 AND T1.draftYear = 1998 | CREATE TABLE players_teams
(
PostGS INTEGER, --
PostdRebounds INTEGER, --
PostPF INTEGER, --
tmID TEXT, --
threeAttempted INTEGER, --
PostRebounds INTEGER, --
assists INTEGER, --
threeMade INTEGER, --
PostBlocks INTEGER, --
PostTurnovers INTEGER, --
GP INTEGER, --
lgID TEXT, -- Example Values: `NBA`, `NBL`, `ABA`, `ABL1`, `NPBL` | Value Statics: Total count 23751 - Distinct count 6 - Null count 0
foreign key (tmID, year) references teams (tmID, year) on update cascade on delete cascade,
PostfgMade INTEGER, --
steals INTEGER, --
oRebounds INTEGER, --
PostftAttempted INTEGER, --
ftAttempted INTEGER, --
ftMade INTEGER, --
points INTEGER, --
PostfgAttempted INTEGER, --
PostftMade INTEGER, --
note TEXT, -- Example Values: `C` | Value Statics: Total count 43 - Distinct count 1 - Null count 23708
dRebounds INTEGER, --
PostSteals INTEGER, --
blocks INTEGER, --
PostAssists INTEGER, --
minutes INTEGER, --
fgAttempted INTEGER, --
playerID TEXT not null references players on update cascade on delete cascade, --
PostthreeMade INTEGER, --
PostPoints INTEGER, --
year INTEGER, --
PF INTEGER, --
fgMade INTEGER, --
PostthreeAttempted INTEGER, --
rebounds INTEGER, --
id INTEGER primary key autoincrement,
stint INTEGER, -- Example Values: `1`, `2`, `0`, `3`, `4` | Value Statics: Total count 23751 - Distinct count 6 - Null count 0
PostMinutes INTEGER, --
PostGP INTEGER, --
turnovers INTEGER, --
PostoRebounds INTEGER, --
GS INTEGER, --
);
CREATE TABLE awards_coaches
(
award TEXT, -- Example Values: `NBA Coach of the Year`, `ABA Coach of the Year` | Value Statics: Total count 61 - Distinct count 2 - Null count 0
id INTEGER primary key autoincrement,
note TEXT, -- Example Values: `tie` | Value Statics: Total count 4 - Distinct count 1 - Null count 57
coachID TEXT, --
lgID TEXT, -- Example Values: `NBA`, `ABA` | Value Statics: Total count 61 - Distinct count 2 - Null count 0
foreign key (coachID, year) references coaches (coachID, year) on update cascade on delete cascade,
year INTEGER, --
);
CREATE TABLE draft
(
draftOverall INTEGER null, --
lgID TEXT null, -- Example Values: `ABA`, `NBA` | Value Statics: Total count 8621 - Distinct count 2 - Null count 0
suffixName TEXT null, -- Example Values: `Jr.` | Value Statics: Total count 2 - Distinct count 1 - Null count 8619
draftYear INTEGER null, --
draftSelection INTEGER null, --
tmID TEXT null, --
draftRound INTEGER null, --
lastName TEXT null, --
playerID TEXT null, --
draftFrom TEXT null, --
id INTEGER default 0 not null primary key,
firstName TEXT null, --
foreign key (tmID, draftYear) references teams (tmID, year) on update cascade on delete cascade,
foreign key (tmID, draftYear) references teams (tmID, year) on update cascade on delete cascade,
);
CREATE TABLE player_allstar
(
rebounds INTEGER null, --
playerID TEXT not null, --
season_id INTEGER not null, --
assists INTEGER null, --
conference TEXT null, -- Example Values: `East`, `West`, `Weset`, `Allstars`, `Denver` | Value Statics: Total count 1608 - Distinct count 5 - Null count 0
points INTEGER null, --
personal_fouls INTEGER null, -- Example Values: `3`, `2`, `0`, `1`, `5` | Value Statics: Total count 540 - Distinct count 8 - Null count 1068
ft_attempted INTEGER null, -- Example Values: `2`, `4`, `0`, `6`, `3` | Value Statics: Total count 1561 - Distinct count 17 - Null count 47
fg_attempted INTEGER null, --
league_id TEXT null, -- Example Values: `NBA`, `ABA` | Value Statics: Total count 1608 - Distinct count 2 - Null count 0
foreign key (playerID) references players (playerID) on update cascade on delete cascade,
fg_made INTEGER null, -- Example Values: `4`, `8`, `5`, `7`, `3` | Value Statics: Total count 1561 - Distinct count 18 - Null count 47
ft_made INTEGER null, -- Example Values: `2`, `3`, `0`, `1`, `4` | Value Statics: Total count 1561 - Distinct count 13 - Null count 47
steals INTEGER null, -- Example Values: `3`, `0`, `1`, `2`, `5` | Value Statics: Total count 398 - Distinct count 7 - Null count 1210
games_played INTEGER null, -- Example Values: `1` | Value Statics: Total count 1608 - Distinct count 1 - Null count 0
first_name TEXT null, --
d_rebounds INTEGER null, -- Example Values: `2`, `5`, `0`, `1`, `4` | Value Statics: Total count 493 - Distinct count 14 - Null count 1115
last_name TEXT null, --
primary key (playerID, season_id),
turnovers INTEGER null, -- Example Values: `1`, `0`, `3`, `2`, `4` | Value Statics: Total count 493 - Distinct count 9 - Null count 1115
three_made INTEGER null, -- Example Values: `0`, `1`, `3`, `5`, `4` | Value Statics: Total count 566 - Distinct count 7 - Null count 1042
minutes INTEGER null, --
blocks INTEGER null, -- Example Values: `2`, `0`, `1`, `3`, `5` | Value Statics: Total count 398 - Distinct count 6 - Null count 1210
three_attempted INTEGER null, -- Example Values: `0`, `1`, `6`, `7`, `10` | Value Statics: Total count 540 - Distinct count 12 - Null count 1068
o_rebounds INTEGER null, -- Example Values: `1`, `2`, `0`, `3`, `4` | Value Statics: Total count 493 - Distinct count 10 - Null count 1115
);
CREATE TABLE awards_players
(
foreign key (playerID) references players (playerID) on update cascade on delete cascade,
year INTEGER not null, --
pos TEXT null, -- Example Values: `C`, `F`, `G`, `F/G`, `F/C` | Value Statics: Total count 833 - Distinct count 5 - Null count 886
primary key (playerID, year, award),
lgID TEXT null, -- Example Values: `NBA`, `ABA`, `NBL`, `ABL1` | Value Statics: Total count 1719 - Distinct count 4 - Null count 0
award TEXT not null, --
playerID TEXT not null, --
note TEXT null, -- Example Values: `tie` | Value Statics: Total count 37 - Distinct count 1 - Null count 1682
);
CREATE TABLE series_post
(
tmIDLoser TEXT, --
id INTEGER primary key autoincrement,
series TEXT, -- Example Values: `O`, `M`, `N`, `A`, `K` | Value Statics: Total count 775 - Distinct count 11 - Null count 0
tmIDWinner TEXT, --
round TEXT, -- Example Values: `F`, `QF`, `SF`, `DT`, `DF` | Value Statics: Total count 775 - Distinct count 11 - Null count 0
year INTEGER, --
foreign key (tmIDLoser, year) references teams (tmID, year) on update cascade on delete cascade,
foreign key (tmIDWinner, year) references teams (tmID, year) on update cascade on delete cascade,
W INTEGER, -- Example Values: `4`, `2`, `1`, `3`, `0` | Value Statics: Total count 775 - Distinct count 5 - Null count 0
lgIDLoser TEXT, -- Example Values: `NBA`, `ABA` | Value Statics: Total count 775 - Distinct count 2 - Null count 0
lgIDWinner TEXT, -- Example Values: `NBA`, `ABA` | Value Statics: Total count 775 - Distinct count 2 - Null count 0
L INTEGER, -- Example Values: `1`, `0`, `2`, `3`, `4` | Value Statics: Total count 775 - Distinct count 5 - Null count 0
);
CREATE TABLE players
(
nameGiven TEXT null, -- Example Values: `nameGiven`, `Mort`, `Robert`, `Jim`, `Mike` | Value Statics: Total count 10 - Distinct count 9 - Null count 5052
lastseason INTEGER null, -- Example Values: `0`, `1951` | Value Statics: Total count 5047 - Distinct count 2 - Null count 15
hsCountry TEXT null, --
firstName TEXT null, --
hsCity TEXT null, --
firstseason INTEGER null, -- Example Values: `0`, `1951` | Value Statics: Total count 5047 - Distinct count 2 - Null count 15
weight INTEGER null, --
birthCountry TEXT null, --
race TEXT null, -- Example Values: `B`, `W`, `O`, `1`, `r` | Value Statics: Total count 4903 - Distinct count 5 - Null count 159
lastName TEXT null, --
birthDate DATE null, --
collegeOther TEXT null, --
birthState TEXT null, --
useFirst TEXT null, --
pos TEXT null, -- Example Values: `F-C`, `C`, `G`, `G-F`, `C-F` | Value Statics: Total count 4880 - Distinct count 14 - Null count 182
playerID TEXT not null primary key,
college TEXT null, --
highSchool TEXT null, --
hsState TEXT null, --
height REAL null, --
deathDate DATE null, --
nameSuffix TEXT null, -- Example Values: `Jr.`, `III`, `nameSuffix`, `II`, `IV` | Value Statics: Total count 324 - Distinct count 6 - Null count 4738
nameNick TEXT null, --
fullGivenName TEXT null, --
birthCity TEXT null, --
middleName TEXT null, --
);
CREATE TABLE teams
(
d_pts INTEGER null, --
name TEXT null, --
homeLost INTEGER null, --
o_ftm INTEGER null, --
franchID TEXT null, --
tmID TEXT not null, --
awayWon INTEGER null, --
primary key (year, tmID),
o_fgm INTEGER null, --
year INTEGER not null, --
awayLost INTEGER null, --
arena TEXT null, --
confID TEXT null, -- Example Values: `EC`, `WC` | Value Statics: Total count 1064 - Distinct count 2 - Null count 472
games INTEGER null, --
lost INTEGER null, --
divID TEXT null, -- Example Values: `EA`, `WE`, `ED`, `WD`, `SO` | Value Statics: Total count 1498 - Distinct count 13 - Null count 38
lgID TEXT null, -- Example Values: `NBL`, `NBA`, `PBLA`, `NPBL`, `ABL1` | Value Statics: Total count 1536 - Distinct count 6 - Null count 0
homeWon INTEGER null, --
confRank INTEGER null, -- Example Values: `0`, `4`, `3`, `5`, `7` | Value Statics: Total count 1536 - Distinct count 16 - Null count 0
o_pts INTEGER null, --
`rank` INTEGER null, -- Example Values: `1`, `2`, `4`, `5`, `6` | Value Statics: Total count 1536 - Distinct count 10 - Null count 0
playoff TEXT null, -- Example Values: `CF`, `WC`, `LC`, `CS`, `F` | Value Statics: Total count 901 - Distinct count 15 - Null count 635
won INTEGER null, --
);
CREATE TABLE coaches
(
primary key (coachID, year, tmID, stint),
lgID TEXT null, -- Example Values: `NBA`, `ABA`, `ABL1`, `PBLA`, `NPBL` | Value Statics: Total count 1689 - Distinct count 5 - Null count 0
post_losses INTEGER null, -- Example Values: `3`, `9`, `7`, `8`, `0` | Value Statics: Total count 1649 - Distinct count 12 - Null count 40
year INTEGER not null, --
won INTEGER null, --
foreign key (tmID, year) references teams (tmID, year) on update cascade on delete cascade,
post_wins INTEGER null, -- Example Values: `0`, `12`, `9`, `13`, `1` | Value Statics: Total count 1649 - Distinct count 17 - Null count 40
coachID TEXT not null, --
tmID TEXT not null, --
lost INTEGER null, --
stint INTEGER not null, -- Example Values: `2`, `1`, `4`, `5`, `3` | Value Statics: Total count 1689 - Distinct count 5 - Null count 0
); |
olympics | What was the name of the Olympic game that John Aalberg took part in when he was 31? | when he was 31 refers to age = 31; name of the Olympic games refers to games_name; | SELECT T1.games_name FROM games AS T1 INNER JOIN games_competitor AS T2 ON T1.id = T2.games_id INNER JOIN person AS T3 ON T2.person_id = T3.id WHERE T3.full_name = 'John Aalberg' AND T2.age = 31 | CREATE TABLE event
(
event_name TEXT default NULL, --
sport_id INTEGER default NULL, --
foreign key (sport_id) references sport(id),
id INTEGER not null primary key,
);
CREATE TABLE sport
(
id INTEGER not null primary key,
sport_name TEXT default NULL, --
);
CREATE TABLE city
(
city_name TEXT default NULL, --
id INTEGER not null primary key,
);
CREATE TABLE games_city
(
city_id INTEGER default NULL, --
foreign key (games_id) references games(id),
games_id INTEGER default NULL, --
foreign key (city_id) references city(id),
);
CREATE TABLE competitor_event
(
foreign key (event_id) references event(id),
foreign key (competitor_id) references games_competitor(id),
foreign key (competitor_id) references games_competitor(id),
foreign key (medal_id) references medal(id),
medal_id INTEGER default NULL, -- Example Values: `4`, `1`, `3`, `2` | Value Statics: Total count 100000 - Distinct count 4 - Null count 0
event_id INTEGER default NULL, --
competitor_id INTEGER default NULL, --
);
CREATE TABLE person
(
weight INTEGER default NULL, --
height INTEGER default NULL, --
id INTEGER not null primary key,
full_name TEXT default NULL, --
gender TEXT default NULL, -- Example Values: `M`, `F` | Value Statics: Total count 100000 - Distinct count 2 - Null count 0
);
CREATE TABLE noc_region
(
region_name TEXT default NULL, --
id INTEGER not null primary key,
noc TEXT default NULL, --
);
CREATE TABLE medal
(
id INTEGER not null primary key,
medal_name TEXT default NULL, -- Example Values: `Gold`, `Silver`, `Bronze`, `NA` | Value Statics: Total count 4 - Distinct count 4 - Null count 0
);
CREATE TABLE person_region
(
foreign key (region_id) references noc_region(id),
region_id INTEGER default NULL, --
foreign key (person_id) references person(id),
person_id INTEGER default NULL, --
);
CREATE TABLE games
(
season TEXT default NULL, -- Example Values: `Summer`, `Winter` | Value Statics: Total count 51 - Distinct count 2 - Null count 0
id INTEGER not null primary key,
games_name TEXT default NULL, --
games_year INTEGER default NULL, --
);
CREATE TABLE games_competitor
(
id INTEGER not null primary key,
foreign key (games_id) references games(id),
games_id INTEGER default NULL, --
age INTEGER default NULL, --
foreign key (person_id) references person(id),
person_id INTEGER default NULL, --
); |
professional_basketball | What is the name of the university that was drafted from the player who won the NBA Finals MVP in 1990? | name of the university refers to highSchool; NBA refers to lgID = 'NBA'; Finals MVP refers to award = 'Finals MVP'; in 1990 refers to year = 1990 | SELECT T1.college FROM players AS T1 INNER JOIN awards_players AS T2 ON T1.playerID = T2.playerID WHERE T2.year = 1990 AND T2.award = 'Finals MVP' | CREATE TABLE players_teams
(
PostGS INTEGER, --
PostdRebounds INTEGER, --
PostPF INTEGER, --
tmID TEXT, --
threeAttempted INTEGER, --
PostRebounds INTEGER, --
assists INTEGER, --
threeMade INTEGER, --
PostBlocks INTEGER, --
PostTurnovers INTEGER, --
GP INTEGER, --
lgID TEXT, -- Example Values: `NBA`, `NBL`, `ABA`, `ABL1`, `NPBL` | Value Statics: Total count 23751 - Distinct count 6 - Null count 0
foreign key (tmID, year) references teams (tmID, year) on update cascade on delete cascade,
PostfgMade INTEGER, --
steals INTEGER, --
oRebounds INTEGER, --
PostftAttempted INTEGER, --
ftAttempted INTEGER, --
ftMade INTEGER, --
points INTEGER, --
PostfgAttempted INTEGER, --
PostftMade INTEGER, --
note TEXT, -- Example Values: `C` | Value Statics: Total count 43 - Distinct count 1 - Null count 23708
dRebounds INTEGER, --
PostSteals INTEGER, --
blocks INTEGER, --
PostAssists INTEGER, --
minutes INTEGER, --
fgAttempted INTEGER, --
playerID TEXT not null references players on update cascade on delete cascade, --
PostthreeMade INTEGER, --
PostPoints INTEGER, --
year INTEGER, --
PF INTEGER, --
fgMade INTEGER, --
PostthreeAttempted INTEGER, --
rebounds INTEGER, --
id INTEGER primary key autoincrement,
stint INTEGER, -- Example Values: `1`, `2`, `0`, `3`, `4` | Value Statics: Total count 23751 - Distinct count 6 - Null count 0
PostMinutes INTEGER, --
PostGP INTEGER, --
turnovers INTEGER, --
PostoRebounds INTEGER, --
GS INTEGER, --
);
CREATE TABLE awards_coaches
(
award TEXT, -- Example Values: `NBA Coach of the Year`, `ABA Coach of the Year` | Value Statics: Total count 61 - Distinct count 2 - Null count 0
id INTEGER primary key autoincrement,
note TEXT, -- Example Values: `tie` | Value Statics: Total count 4 - Distinct count 1 - Null count 57
coachID TEXT, --
lgID TEXT, -- Example Values: `NBA`, `ABA` | Value Statics: Total count 61 - Distinct count 2 - Null count 0
foreign key (coachID, year) references coaches (coachID, year) on update cascade on delete cascade,
year INTEGER, --
);
CREATE TABLE draft
(
draftOverall INTEGER null, --
lgID TEXT null, -- Example Values: `ABA`, `NBA` | Value Statics: Total count 8621 - Distinct count 2 - Null count 0
suffixName TEXT null, -- Example Values: `Jr.` | Value Statics: Total count 2 - Distinct count 1 - Null count 8619
draftYear INTEGER null, --
draftSelection INTEGER null, --
tmID TEXT null, --
draftRound INTEGER null, --
lastName TEXT null, --
playerID TEXT null, --
draftFrom TEXT null, --
id INTEGER default 0 not null primary key,
firstName TEXT null, --
foreign key (tmID, draftYear) references teams (tmID, year) on update cascade on delete cascade,
foreign key (tmID, draftYear) references teams (tmID, year) on update cascade on delete cascade,
);
CREATE TABLE player_allstar
(
rebounds INTEGER null, --
playerID TEXT not null, --
season_id INTEGER not null, --
assists INTEGER null, --
conference TEXT null, -- Example Values: `East`, `West`, `Weset`, `Allstars`, `Denver` | Value Statics: Total count 1608 - Distinct count 5 - Null count 0
points INTEGER null, --
personal_fouls INTEGER null, -- Example Values: `3`, `2`, `0`, `1`, `5` | Value Statics: Total count 540 - Distinct count 8 - Null count 1068
ft_attempted INTEGER null, -- Example Values: `2`, `4`, `0`, `6`, `3` | Value Statics: Total count 1561 - Distinct count 17 - Null count 47
fg_attempted INTEGER null, --
league_id TEXT null, -- Example Values: `NBA`, `ABA` | Value Statics: Total count 1608 - Distinct count 2 - Null count 0
foreign key (playerID) references players (playerID) on update cascade on delete cascade,
fg_made INTEGER null, -- Example Values: `4`, `8`, `5`, `7`, `3` | Value Statics: Total count 1561 - Distinct count 18 - Null count 47
ft_made INTEGER null, -- Example Values: `2`, `3`, `0`, `1`, `4` | Value Statics: Total count 1561 - Distinct count 13 - Null count 47
steals INTEGER null, -- Example Values: `3`, `0`, `1`, `2`, `5` | Value Statics: Total count 398 - Distinct count 7 - Null count 1210
games_played INTEGER null, -- Example Values: `1` | Value Statics: Total count 1608 - Distinct count 1 - Null count 0
first_name TEXT null, --
d_rebounds INTEGER null, -- Example Values: `2`, `5`, `0`, `1`, `4` | Value Statics: Total count 493 - Distinct count 14 - Null count 1115
last_name TEXT null, --
primary key (playerID, season_id),
turnovers INTEGER null, -- Example Values: `1`, `0`, `3`, `2`, `4` | Value Statics: Total count 493 - Distinct count 9 - Null count 1115
three_made INTEGER null, -- Example Values: `0`, `1`, `3`, `5`, `4` | Value Statics: Total count 566 - Distinct count 7 - Null count 1042
minutes INTEGER null, --
blocks INTEGER null, -- Example Values: `2`, `0`, `1`, `3`, `5` | Value Statics: Total count 398 - Distinct count 6 - Null count 1210
three_attempted INTEGER null, -- Example Values: `0`, `1`, `6`, `7`, `10` | Value Statics: Total count 540 - Distinct count 12 - Null count 1068
o_rebounds INTEGER null, -- Example Values: `1`, `2`, `0`, `3`, `4` | Value Statics: Total count 493 - Distinct count 10 - Null count 1115
);
CREATE TABLE awards_players
(
foreign key (playerID) references players (playerID) on update cascade on delete cascade,
year INTEGER not null, --
pos TEXT null, -- Example Values: `C`, `F`, `G`, `F/G`, `F/C` | Value Statics: Total count 833 - Distinct count 5 - Null count 886
primary key (playerID, year, award),
lgID TEXT null, -- Example Values: `NBA`, `ABA`, `NBL`, `ABL1` | Value Statics: Total count 1719 - Distinct count 4 - Null count 0
award TEXT not null, --
playerID TEXT not null, --
note TEXT null, -- Example Values: `tie` | Value Statics: Total count 37 - Distinct count 1 - Null count 1682
);
CREATE TABLE series_post
(
tmIDLoser TEXT, --
id INTEGER primary key autoincrement,
series TEXT, -- Example Values: `O`, `M`, `N`, `A`, `K` | Value Statics: Total count 775 - Distinct count 11 - Null count 0
tmIDWinner TEXT, --
round TEXT, -- Example Values: `F`, `QF`, `SF`, `DT`, `DF` | Value Statics: Total count 775 - Distinct count 11 - Null count 0
year INTEGER, --
foreign key (tmIDLoser, year) references teams (tmID, year) on update cascade on delete cascade,
foreign key (tmIDWinner, year) references teams (tmID, year) on update cascade on delete cascade,
W INTEGER, -- Example Values: `4`, `2`, `1`, `3`, `0` | Value Statics: Total count 775 - Distinct count 5 - Null count 0
lgIDLoser TEXT, -- Example Values: `NBA`, `ABA` | Value Statics: Total count 775 - Distinct count 2 - Null count 0
lgIDWinner TEXT, -- Example Values: `NBA`, `ABA` | Value Statics: Total count 775 - Distinct count 2 - Null count 0
L INTEGER, -- Example Values: `1`, `0`, `2`, `3`, `4` | Value Statics: Total count 775 - Distinct count 5 - Null count 0
);
CREATE TABLE players
(
nameGiven TEXT null, -- Example Values: `nameGiven`, `Mort`, `Robert`, `Jim`, `Mike` | Value Statics: Total count 10 - Distinct count 9 - Null count 5052
lastseason INTEGER null, -- Example Values: `0`, `1951` | Value Statics: Total count 5047 - Distinct count 2 - Null count 15
hsCountry TEXT null, --
firstName TEXT null, --
hsCity TEXT null, --
firstseason INTEGER null, -- Example Values: `0`, `1951` | Value Statics: Total count 5047 - Distinct count 2 - Null count 15
weight INTEGER null, --
birthCountry TEXT null, --
race TEXT null, -- Example Values: `B`, `W`, `O`, `1`, `r` | Value Statics: Total count 4903 - Distinct count 5 - Null count 159
lastName TEXT null, --
birthDate DATE null, --
collegeOther TEXT null, --
birthState TEXT null, --
useFirst TEXT null, --
pos TEXT null, -- Example Values: `F-C`, `C`, `G`, `G-F`, `C-F` | Value Statics: Total count 4880 - Distinct count 14 - Null count 182
playerID TEXT not null primary key,
college TEXT null, --
highSchool TEXT null, --
hsState TEXT null, --
height REAL null, --
deathDate DATE null, --
nameSuffix TEXT null, -- Example Values: `Jr.`, `III`, `nameSuffix`, `II`, `IV` | Value Statics: Total count 324 - Distinct count 6 - Null count 4738
nameNick TEXT null, --
fullGivenName TEXT null, --
birthCity TEXT null, --
middleName TEXT null, --
);
CREATE TABLE teams
(
d_pts INTEGER null, --
name TEXT null, --
homeLost INTEGER null, --
o_ftm INTEGER null, --
franchID TEXT null, --
tmID TEXT not null, --
awayWon INTEGER null, --
primary key (year, tmID),
o_fgm INTEGER null, --
year INTEGER not null, --
awayLost INTEGER null, --
arena TEXT null, --
confID TEXT null, -- Example Values: `EC`, `WC` | Value Statics: Total count 1064 - Distinct count 2 - Null count 472
games INTEGER null, --
lost INTEGER null, --
divID TEXT null, -- Example Values: `EA`, `WE`, `ED`, `WD`, `SO` | Value Statics: Total count 1498 - Distinct count 13 - Null count 38
lgID TEXT null, -- Example Values: `NBL`, `NBA`, `PBLA`, `NPBL`, `ABL1` | Value Statics: Total count 1536 - Distinct count 6 - Null count 0
homeWon INTEGER null, --
confRank INTEGER null, -- Example Values: `0`, `4`, `3`, `5`, `7` | Value Statics: Total count 1536 - Distinct count 16 - Null count 0
o_pts INTEGER null, --
`rank` INTEGER null, -- Example Values: `1`, `2`, `4`, `5`, `6` | Value Statics: Total count 1536 - Distinct count 10 - Null count 0
playoff TEXT null, -- Example Values: `CF`, `WC`, `LC`, `CS`, `F` | Value Statics: Total count 901 - Distinct count 15 - Null count 635
won INTEGER null, --
);
CREATE TABLE coaches
(
primary key (coachID, year, tmID, stint),
lgID TEXT null, -- Example Values: `NBA`, `ABA`, `ABL1`, `PBLA`, `NPBL` | Value Statics: Total count 1689 - Distinct count 5 - Null count 0
post_losses INTEGER null, -- Example Values: `3`, `9`, `7`, `8`, `0` | Value Statics: Total count 1649 - Distinct count 12 - Null count 40
year INTEGER not null, --
won INTEGER null, --
foreign key (tmID, year) references teams (tmID, year) on update cascade on delete cascade,
post_wins INTEGER null, -- Example Values: `0`, `12`, `9`, `13`, `1` | Value Statics: Total count 1649 - Distinct count 17 - Null count 40
coachID TEXT not null, --
tmID TEXT not null, --
lost INTEGER null, --
stint INTEGER not null, -- Example Values: `2`, `1`, `4`, `5`, `3` | Value Statics: Total count 1689 - Distinct count 5 - Null count 0
); |
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' | CREATE TABLE current
(
gender_bio TEXT, -- Example Values: `M`, `F` | Value Statics: Total count 541 - Distinct count 2 - Null count 0
suffix_name TEXT, -- Example Values: `Jr.`, `III`, `II` | Value Statics: Total count 20 - Distinct count 3 - Null count 521
house_history_id REAL, --
birthday_bio DATE, --
nickname_name TEXT, --
religion_bio TEXT, --
google_entity_id_id TEXT, --
govtrack_id INTEGER, --
cspan_id REAL, --
primary key (bioguide_id, cspan_id),
wikipedia_id TEXT, --
maplight_id REAL, --
last_name TEXT, --
icpsr_id REAL, --
fec_id TEXT, --
votesmart_id REAL, --
first_name TEXT, --
lis_id TEXT, --
bioguide_id TEXT, --
wikidata_id TEXT, --
middle_name TEXT, --
ballotpedia_id TEXT, --
opensecrets_id TEXT, --
official_full_name TEXT, --
thomas_id INTEGER, --
);
CREATE TABLE historical
(
fec_id TEXT, --
suffix_name TEXT, -- Example Values: `Jr.`, `Sr.`, `II`, `III`, `IV` | Value Statics: Total count 418 - Distinct count 5 - Null count 11446
govtrack_id INTEGER, --
house_history_id REAL, --
opensecrets_id TEXT, --
votesmart_id TEXT, --
bioguide_id TEXT primary key,
nickname_name TEXT, --
official_full_name TEXT, --
house_history_alternate_id TEXT, -- Example Values: `13283.0` | Value Statics: Total count 1 - Distinct count 1 - Null count 11863
gender_bio TEXT, -- Example Values: `M`, `F` | Value Statics: Total count 11864 - Distinct count 2 - Null count 0
bioguide_previous_id TEXT, -- Example Values: `['F000246']`, `['L000266']`, `['W000790']` | Value Statics: Total count 3 - Distinct count 3 - Null count 11861
icpsr_id REAL, --
wikipedia_id TEXT, --
birthday_bio TEXT, --
religion_bio TEXT, --
lis_id TEXT, --
middle_name TEXT, --
cspan_id TEXT, --
last_name TEXT, --
first_name TEXT, --
wikidata_id TEXT, --
thomas_id TEXT, --
ballotpedia_id TEXT, --
maplight_id TEXT, --
google_entity_id_id TEXT, --
);
CREATE TABLE historical-terms
(
bioguide TEXT primary key,
middle TEXT, --
title TEXT, -- Example Values: `Majority Leader`, `Speaker` | Value Statics: Total count 3 - Distinct count 2 - Null count 11861
party TEXT, --
type TEXT, -- Example Values: `sen`, `rep` | Value Statics: Total count 11858 - Distinct count 2 - Null count 6
phone TEXT, --
rss_url TEXT, -- Example Values: `http://radel.house.gov/news/rss.aspx`, `http://www.begich.senate.gov/public/?a=rss.feed`, `http://www.hagan.senate.gov/rss`, `http://negretemcleod.house.gov/rss.xml`, `http://garcia.house.gov/rss.xml` | Value Statics: Total count 12 - Distinct count 12 - Null count 11852
name TEXT, --
start TEXT, --
address TEXT, --
party_affiliations TEXT, -- Example Values: `{'start': '2009-01-06', 'end': '2009-12-22', 'party': 'Democrat'}`, `{'start': '2003-01-07', 'end': '2004-08-09', 'party': 'Democrat'}` | Value Statics: Total count 2 - Distinct count 2 - Null count 11862
relation TEXT, --
state_rank TEXT, -- Example Values: `junior`, `senior` | Value Statics: Total count 7 - Distinct count 2 - Null count 11857
last TEXT, -- Example Values: `Levy`, `Lambert`, `Bono` | Value Statics: Total count 3 - Distinct count 3 - Null count 11861
url TEXT, --
fax TEXT, --
contact_form TEXT, --
office TEXT, --
state TEXT, --
foreign key (bioguide) references historical(bioguide_id),
class REAL, -- Example Values: `2.0`, `1.0`, `3.0` | Value Statics: Total count 1256 - Distinct count 3 - Null count 10608
end TEXT, --
district REAL, --
chamber TEXT, -- Example Values: `house`, `senate` | Value Statics: Total count 3 - Distinct count 2 - Null count 11861
);
CREATE TABLE current-terms
(
foreign key (bioguide) references current(bioguide_id),
phone TEXT, --
party_affiliations TEXT, -- Example Values: `{'start': '2009-01-06', 'end': '2009-02-23', 'party': 'Independent'}`, `{'start': '1993-01-05', 'end': '1994-11-09', 'party': 'Democrat'}` | Value Statics: Total count 2 - Distinct count 2 - Null count 3076
title TEXT, -- Example Values: `Minority Whip`, `Majority Whip`, `Minority Leader`, `Majority Leader`, `Speaker` | Value Statics: Total count 28 - Distinct count 5 - Null count 3050
district REAL, --
bioguide TEXT, --
office TEXT, --
class REAL, -- Example Values: `1.0`, `2.0`, `3.0` | Value Statics: Total count 244 - Distinct count 3 - Null count 2834
type TEXT, -- Example Values: `rep`, `sen` | Value Statics: Total count 3014 - Distinct count 2 - Null count 64
start TEXT, --
address TEXT, --
rss_url TEXT, --
url TEXT, --
primary key (bioguide, end),
fax TEXT, --
chamber TEXT, -- Example Values: `senate`, `house` | Value Statics: Total count 28 - Distinct count 2 - Null count 3050
end TEXT, --
caucus TEXT, -- Example Values: `Democrat` | Value Statics: Total count 3 - Distinct count 1 - Null count 3075
state TEXT, --
last TEXT, -- Example Values: `Menendez` | Value Statics: Total count 1 - Distinct count 1 - Null count 3077
relation TEXT, -- Example Values: `son`, `nephew`, `cousin`, `daughter`, `grandson` | Value Statics: Total count 35 - Distinct count 13 - Null count 3043
state_rank TEXT, -- Example Values: `senior`, `junior` | Value Statics: Total count 147 - Distinct count 2 - Null count 2931
name TEXT, --
contact_form TEXT, --
party TEXT, -- Example Values: `Democrat`, `Republican`, `Independent` | Value Statics: Total count 3014 - Distinct count 3 - Null count 64
);
CREATE TABLE social-media
(
foreign key (bioguide) references current(bioguide_id),
instagram TEXT, --
thomas INTEGER, --
youtube TEXT, --
twitter TEXT, --
facebook TEXT, --
youtube_id TEXT, --
twitter_id REAL, --
facebook_id REAL, --
govtrack REAL, --
bioguide TEXT primary key,
instagram_id REAL, --
); |
professional_basketball | Among the coaches who won the 'NBA coach of the year' award from 1971 - 1975, how many of them were in 'POR' team? | the 'NBA coach of the year' award refers to award = 'NBA coach of the year'; from 1971 - 1975 refers to year between 1971 and 1975; 'POR' team refers to tmID = 'POR' | SELECT COUNT(T1.id) FROM awards_coaches AS T1 INNER JOIN teams AS T2 ON T1.year = T2.year WHERE T1.year BETWEEN 1971 AND 1975 AND T1.award = 'NBA Coach of the Year' AND T2.tmID = 'POR' | CREATE TABLE players_teams
(
PostGS INTEGER, --
PostdRebounds INTEGER, --
PostPF INTEGER, --
tmID TEXT, --
threeAttempted INTEGER, --
PostRebounds INTEGER, --
assists INTEGER, --
threeMade INTEGER, --
PostBlocks INTEGER, --
PostTurnovers INTEGER, --
GP INTEGER, --
lgID TEXT, -- Example Values: `NBA`, `NBL`, `ABA`, `ABL1`, `NPBL` | Value Statics: Total count 23751 - Distinct count 6 - Null count 0
foreign key (tmID, year) references teams (tmID, year) on update cascade on delete cascade,
PostfgMade INTEGER, --
steals INTEGER, --
oRebounds INTEGER, --
PostftAttempted INTEGER, --
ftAttempted INTEGER, --
ftMade INTEGER, --
points INTEGER, --
PostfgAttempted INTEGER, --
PostftMade INTEGER, --
note TEXT, -- Example Values: `C` | Value Statics: Total count 43 - Distinct count 1 - Null count 23708
dRebounds INTEGER, --
PostSteals INTEGER, --
blocks INTEGER, --
PostAssists INTEGER, --
minutes INTEGER, --
fgAttempted INTEGER, --
playerID TEXT not null references players on update cascade on delete cascade, --
PostthreeMade INTEGER, --
PostPoints INTEGER, --
year INTEGER, --
PF INTEGER, --
fgMade INTEGER, --
PostthreeAttempted INTEGER, --
rebounds INTEGER, --
id INTEGER primary key autoincrement,
stint INTEGER, -- Example Values: `1`, `2`, `0`, `3`, `4` | Value Statics: Total count 23751 - Distinct count 6 - Null count 0
PostMinutes INTEGER, --
PostGP INTEGER, --
turnovers INTEGER, --
PostoRebounds INTEGER, --
GS INTEGER, --
);
CREATE TABLE awards_coaches
(
award TEXT, -- Example Values: `NBA Coach of the Year`, `ABA Coach of the Year` | Value Statics: Total count 61 - Distinct count 2 - Null count 0
id INTEGER primary key autoincrement,
note TEXT, -- Example Values: `tie` | Value Statics: Total count 4 - Distinct count 1 - Null count 57
coachID TEXT, --
lgID TEXT, -- Example Values: `NBA`, `ABA` | Value Statics: Total count 61 - Distinct count 2 - Null count 0
foreign key (coachID, year) references coaches (coachID, year) on update cascade on delete cascade,
year INTEGER, --
);
CREATE TABLE draft
(
draftOverall INTEGER null, --
lgID TEXT null, -- Example Values: `ABA`, `NBA` | Value Statics: Total count 8621 - Distinct count 2 - Null count 0
suffixName TEXT null, -- Example Values: `Jr.` | Value Statics: Total count 2 - Distinct count 1 - Null count 8619
draftYear INTEGER null, --
draftSelection INTEGER null, --
tmID TEXT null, --
draftRound INTEGER null, --
lastName TEXT null, --
playerID TEXT null, --
draftFrom TEXT null, --
id INTEGER default 0 not null primary key,
firstName TEXT null, --
foreign key (tmID, draftYear) references teams (tmID, year) on update cascade on delete cascade,
foreign key (tmID, draftYear) references teams (tmID, year) on update cascade on delete cascade,
);
CREATE TABLE player_allstar
(
rebounds INTEGER null, --
playerID TEXT not null, --
season_id INTEGER not null, --
assists INTEGER null, --
conference TEXT null, -- Example Values: `East`, `West`, `Weset`, `Allstars`, `Denver` | Value Statics: Total count 1608 - Distinct count 5 - Null count 0
points INTEGER null, --
personal_fouls INTEGER null, -- Example Values: `3`, `2`, `0`, `1`, `5` | Value Statics: Total count 540 - Distinct count 8 - Null count 1068
ft_attempted INTEGER null, -- Example Values: `2`, `4`, `0`, `6`, `3` | Value Statics: Total count 1561 - Distinct count 17 - Null count 47
fg_attempted INTEGER null, --
league_id TEXT null, -- Example Values: `NBA`, `ABA` | Value Statics: Total count 1608 - Distinct count 2 - Null count 0
foreign key (playerID) references players (playerID) on update cascade on delete cascade,
fg_made INTEGER null, -- Example Values: `4`, `8`, `5`, `7`, `3` | Value Statics: Total count 1561 - Distinct count 18 - Null count 47
ft_made INTEGER null, -- Example Values: `2`, `3`, `0`, `1`, `4` | Value Statics: Total count 1561 - Distinct count 13 - Null count 47
steals INTEGER null, -- Example Values: `3`, `0`, `1`, `2`, `5` | Value Statics: Total count 398 - Distinct count 7 - Null count 1210
games_played INTEGER null, -- Example Values: `1` | Value Statics: Total count 1608 - Distinct count 1 - Null count 0
first_name TEXT null, --
d_rebounds INTEGER null, -- Example Values: `2`, `5`, `0`, `1`, `4` | Value Statics: Total count 493 - Distinct count 14 - Null count 1115
last_name TEXT null, --
primary key (playerID, season_id),
turnovers INTEGER null, -- Example Values: `1`, `0`, `3`, `2`, `4` | Value Statics: Total count 493 - Distinct count 9 - Null count 1115
three_made INTEGER null, -- Example Values: `0`, `1`, `3`, `5`, `4` | Value Statics: Total count 566 - Distinct count 7 - Null count 1042
minutes INTEGER null, --
blocks INTEGER null, -- Example Values: `2`, `0`, `1`, `3`, `5` | Value Statics: Total count 398 - Distinct count 6 - Null count 1210
three_attempted INTEGER null, -- Example Values: `0`, `1`, `6`, `7`, `10` | Value Statics: Total count 540 - Distinct count 12 - Null count 1068
o_rebounds INTEGER null, -- Example Values: `1`, `2`, `0`, `3`, `4` | Value Statics: Total count 493 - Distinct count 10 - Null count 1115
);
CREATE TABLE awards_players
(
foreign key (playerID) references players (playerID) on update cascade on delete cascade,
year INTEGER not null, --
pos TEXT null, -- Example Values: `C`, `F`, `G`, `F/G`, `F/C` | Value Statics: Total count 833 - Distinct count 5 - Null count 886
primary key (playerID, year, award),
lgID TEXT null, -- Example Values: `NBA`, `ABA`, `NBL`, `ABL1` | Value Statics: Total count 1719 - Distinct count 4 - Null count 0
award TEXT not null, --
playerID TEXT not null, --
note TEXT null, -- Example Values: `tie` | Value Statics: Total count 37 - Distinct count 1 - Null count 1682
);
CREATE TABLE series_post
(
tmIDLoser TEXT, --
id INTEGER primary key autoincrement,
series TEXT, -- Example Values: `O`, `M`, `N`, `A`, `K` | Value Statics: Total count 775 - Distinct count 11 - Null count 0
tmIDWinner TEXT, --
round TEXT, -- Example Values: `F`, `QF`, `SF`, `DT`, `DF` | Value Statics: Total count 775 - Distinct count 11 - Null count 0
year INTEGER, --
foreign key (tmIDLoser, year) references teams (tmID, year) on update cascade on delete cascade,
foreign key (tmIDWinner, year) references teams (tmID, year) on update cascade on delete cascade,
W INTEGER, -- Example Values: `4`, `2`, `1`, `3`, `0` | Value Statics: Total count 775 - Distinct count 5 - Null count 0
lgIDLoser TEXT, -- Example Values: `NBA`, `ABA` | Value Statics: Total count 775 - Distinct count 2 - Null count 0
lgIDWinner TEXT, -- Example Values: `NBA`, `ABA` | Value Statics: Total count 775 - Distinct count 2 - Null count 0
L INTEGER, -- Example Values: `1`, `0`, `2`, `3`, `4` | Value Statics: Total count 775 - Distinct count 5 - Null count 0
);
CREATE TABLE players
(
nameGiven TEXT null, -- Example Values: `nameGiven`, `Mort`, `Robert`, `Jim`, `Mike` | Value Statics: Total count 10 - Distinct count 9 - Null count 5052
lastseason INTEGER null, -- Example Values: `0`, `1951` | Value Statics: Total count 5047 - Distinct count 2 - Null count 15
hsCountry TEXT null, --
firstName TEXT null, --
hsCity TEXT null, --
firstseason INTEGER null, -- Example Values: `0`, `1951` | Value Statics: Total count 5047 - Distinct count 2 - Null count 15
weight INTEGER null, --
birthCountry TEXT null, --
race TEXT null, -- Example Values: `B`, `W`, `O`, `1`, `r` | Value Statics: Total count 4903 - Distinct count 5 - Null count 159
lastName TEXT null, --
birthDate DATE null, --
collegeOther TEXT null, --
birthState TEXT null, --
useFirst TEXT null, --
pos TEXT null, -- Example Values: `F-C`, `C`, `G`, `G-F`, `C-F` | Value Statics: Total count 4880 - Distinct count 14 - Null count 182
playerID TEXT not null primary key,
college TEXT null, --
highSchool TEXT null, --
hsState TEXT null, --
height REAL null, --
deathDate DATE null, --
nameSuffix TEXT null, -- Example Values: `Jr.`, `III`, `nameSuffix`, `II`, `IV` | Value Statics: Total count 324 - Distinct count 6 - Null count 4738
nameNick TEXT null, --
fullGivenName TEXT null, --
birthCity TEXT null, --
middleName TEXT null, --
);
CREATE TABLE teams
(
d_pts INTEGER null, --
name TEXT null, --
homeLost INTEGER null, --
o_ftm INTEGER null, --
franchID TEXT null, --
tmID TEXT not null, --
awayWon INTEGER null, --
primary key (year, tmID),
o_fgm INTEGER null, --
year INTEGER not null, --
awayLost INTEGER null, --
arena TEXT null, --
confID TEXT null, -- Example Values: `EC`, `WC` | Value Statics: Total count 1064 - Distinct count 2 - Null count 472
games INTEGER null, --
lost INTEGER null, --
divID TEXT null, -- Example Values: `EA`, `WE`, `ED`, `WD`, `SO` | Value Statics: Total count 1498 - Distinct count 13 - Null count 38
lgID TEXT null, -- Example Values: `NBL`, `NBA`, `PBLA`, `NPBL`, `ABL1` | Value Statics: Total count 1536 - Distinct count 6 - Null count 0
homeWon INTEGER null, --
confRank INTEGER null, -- Example Values: `0`, `4`, `3`, `5`, `7` | Value Statics: Total count 1536 - Distinct count 16 - Null count 0
o_pts INTEGER null, --
`rank` INTEGER null, -- Example Values: `1`, `2`, `4`, `5`, `6` | Value Statics: Total count 1536 - Distinct count 10 - Null count 0
playoff TEXT null, -- Example Values: `CF`, `WC`, `LC`, `CS`, `F` | Value Statics: Total count 901 - Distinct count 15 - Null count 635
won INTEGER null, --
);
CREATE TABLE coaches
(
primary key (coachID, year, tmID, stint),
lgID TEXT null, -- Example Values: `NBA`, `ABA`, `ABL1`, `PBLA`, `NPBL` | Value Statics: Total count 1689 - Distinct count 5 - Null count 0
post_losses INTEGER null, -- Example Values: `3`, `9`, `7`, `8`, `0` | Value Statics: Total count 1649 - Distinct count 12 - Null count 40
year INTEGER not null, --
won INTEGER null, --
foreign key (tmID, year) references teams (tmID, year) on update cascade on delete cascade,
post_wins INTEGER null, -- Example Values: `0`, `12`, `9`, `13`, `1` | Value Statics: Total count 1649 - Distinct count 17 - Null count 40
coachID TEXT not null, --
tmID TEXT not null, --
lost INTEGER null, --
stint INTEGER not null, -- Example Values: `2`, `1`, `4`, `5`, `3` | Value Statics: Total count 1689 - Distinct count 5 - Null count 0
); |
legislator | Give the type and start date of the term of the legislator born on November 26, 1727. | start date of the term refers to start; born on November 26, 1727 refers to birthday_bio = '1727-11-26'; | SELECT T2.type, T2.start FROM historical AS T1 INNER JOIN `historical-terms` AS T2 ON T1.bioguide_id = T2.bioguide WHERE T1.birthday_bio = '1727-11-26' | CREATE TABLE current
(
gender_bio TEXT, -- Example Values: `M`, `F` | Value Statics: Total count 541 - Distinct count 2 - Null count 0
suffix_name TEXT, -- Example Values: `Jr.`, `III`, `II` | Value Statics: Total count 20 - Distinct count 3 - Null count 521
house_history_id REAL, --
birthday_bio DATE, --
nickname_name TEXT, --
religion_bio TEXT, --
google_entity_id_id TEXT, --
govtrack_id INTEGER, --
cspan_id REAL, --
primary key (bioguide_id, cspan_id),
wikipedia_id TEXT, --
maplight_id REAL, --
last_name TEXT, --
icpsr_id REAL, --
fec_id TEXT, --
votesmart_id REAL, --
first_name TEXT, --
lis_id TEXT, --
bioguide_id TEXT, --
wikidata_id TEXT, --
middle_name TEXT, --
ballotpedia_id TEXT, --
opensecrets_id TEXT, --
official_full_name TEXT, --
thomas_id INTEGER, --
);
CREATE TABLE historical
(
fec_id TEXT, --
suffix_name TEXT, -- Example Values: `Jr.`, `Sr.`, `II`, `III`, `IV` | Value Statics: Total count 418 - Distinct count 5 - Null count 11446
govtrack_id INTEGER, --
house_history_id REAL, --
opensecrets_id TEXT, --
votesmart_id TEXT, --
bioguide_id TEXT primary key,
nickname_name TEXT, --
official_full_name TEXT, --
house_history_alternate_id TEXT, -- Example Values: `13283.0` | Value Statics: Total count 1 - Distinct count 1 - Null count 11863
gender_bio TEXT, -- Example Values: `M`, `F` | Value Statics: Total count 11864 - Distinct count 2 - Null count 0
bioguide_previous_id TEXT, -- Example Values: `['F000246']`, `['L000266']`, `['W000790']` | Value Statics: Total count 3 - Distinct count 3 - Null count 11861
icpsr_id REAL, --
wikipedia_id TEXT, --
birthday_bio TEXT, --
religion_bio TEXT, --
lis_id TEXT, --
middle_name TEXT, --
cspan_id TEXT, --
last_name TEXT, --
first_name TEXT, --
wikidata_id TEXT, --
thomas_id TEXT, --
ballotpedia_id TEXT, --
maplight_id TEXT, --
google_entity_id_id TEXT, --
);
CREATE TABLE historical-terms
(
bioguide TEXT primary key,
middle TEXT, --
title TEXT, -- Example Values: `Majority Leader`, `Speaker` | Value Statics: Total count 3 - Distinct count 2 - Null count 11861
party TEXT, --
type TEXT, -- Example Values: `sen`, `rep` | Value Statics: Total count 11858 - Distinct count 2 - Null count 6
phone TEXT, --
rss_url TEXT, -- Example Values: `http://radel.house.gov/news/rss.aspx`, `http://www.begich.senate.gov/public/?a=rss.feed`, `http://www.hagan.senate.gov/rss`, `http://negretemcleod.house.gov/rss.xml`, `http://garcia.house.gov/rss.xml` | Value Statics: Total count 12 - Distinct count 12 - Null count 11852
name TEXT, --
start TEXT, --
address TEXT, --
party_affiliations TEXT, -- Example Values: `{'start': '2009-01-06', 'end': '2009-12-22', 'party': 'Democrat'}`, `{'start': '2003-01-07', 'end': '2004-08-09', 'party': 'Democrat'}` | Value Statics: Total count 2 - Distinct count 2 - Null count 11862
relation TEXT, --
state_rank TEXT, -- Example Values: `junior`, `senior` | Value Statics: Total count 7 - Distinct count 2 - Null count 11857
last TEXT, -- Example Values: `Levy`, `Lambert`, `Bono` | Value Statics: Total count 3 - Distinct count 3 - Null count 11861
url TEXT, --
fax TEXT, --
contact_form TEXT, --
office TEXT, --
state TEXT, --
foreign key (bioguide) references historical(bioguide_id),
class REAL, -- Example Values: `2.0`, `1.0`, `3.0` | Value Statics: Total count 1256 - Distinct count 3 - Null count 10608
end TEXT, --
district REAL, --
chamber TEXT, -- Example Values: `house`, `senate` | Value Statics: Total count 3 - Distinct count 2 - Null count 11861
);
CREATE TABLE current-terms
(
foreign key (bioguide) references current(bioguide_id),
phone TEXT, --
party_affiliations TEXT, -- Example Values: `{'start': '2009-01-06', 'end': '2009-02-23', 'party': 'Independent'}`, `{'start': '1993-01-05', 'end': '1994-11-09', 'party': 'Democrat'}` | Value Statics: Total count 2 - Distinct count 2 - Null count 3076
title TEXT, -- Example Values: `Minority Whip`, `Majority Whip`, `Minority Leader`, `Majority Leader`, `Speaker` | Value Statics: Total count 28 - Distinct count 5 - Null count 3050
district REAL, --
bioguide TEXT, --
office TEXT, --
class REAL, -- Example Values: `1.0`, `2.0`, `3.0` | Value Statics: Total count 244 - Distinct count 3 - Null count 2834
type TEXT, -- Example Values: `rep`, `sen` | Value Statics: Total count 3014 - Distinct count 2 - Null count 64
start TEXT, --
address TEXT, --
rss_url TEXT, --
url TEXT, --
primary key (bioguide, end),
fax TEXT, --
chamber TEXT, -- Example Values: `senate`, `house` | Value Statics: Total count 28 - Distinct count 2 - Null count 3050
end TEXT, --
caucus TEXT, -- Example Values: `Democrat` | Value Statics: Total count 3 - Distinct count 1 - Null count 3075
state TEXT, --
last TEXT, -- Example Values: `Menendez` | Value Statics: Total count 1 - Distinct count 1 - Null count 3077
relation TEXT, -- Example Values: `son`, `nephew`, `cousin`, `daughter`, `grandson` | Value Statics: Total count 35 - Distinct count 13 - Null count 3043
state_rank TEXT, -- Example Values: `senior`, `junior` | Value Statics: Total count 147 - Distinct count 2 - Null count 2931
name TEXT, --
contact_form TEXT, --
party TEXT, -- Example Values: `Democrat`, `Republican`, `Independent` | Value Statics: Total count 3014 - Distinct count 3 - Null count 64
);
CREATE TABLE social-media
(
foreign key (bioguide) references current(bioguide_id),
instagram TEXT, --
thomas INTEGER, --
youtube TEXT, --
twitter TEXT, --
facebook TEXT, --
youtube_id TEXT, --
twitter_id REAL, --
facebook_id REAL, --
govtrack REAL, --
bioguide TEXT primary key,
instagram_id REAL, --
); |
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' | CREATE TABLE current
(
gender_bio TEXT, -- Example Values: `M`, `F` | Value Statics: Total count 541 - Distinct count 2 - Null count 0
suffix_name TEXT, -- Example Values: `Jr.`, `III`, `II` | Value Statics: Total count 20 - Distinct count 3 - Null count 521
house_history_id REAL, --
birthday_bio DATE, --
nickname_name TEXT, --
religion_bio TEXT, --
google_entity_id_id TEXT, --
govtrack_id INTEGER, --
cspan_id REAL, --
primary key (bioguide_id, cspan_id),
wikipedia_id TEXT, --
maplight_id REAL, --
last_name TEXT, --
icpsr_id REAL, --
fec_id TEXT, --
votesmart_id REAL, --
first_name TEXT, --
lis_id TEXT, --
bioguide_id TEXT, --
wikidata_id TEXT, --
middle_name TEXT, --
ballotpedia_id TEXT, --
opensecrets_id TEXT, --
official_full_name TEXT, --
thomas_id INTEGER, --
);
CREATE TABLE historical
(
fec_id TEXT, --
suffix_name TEXT, -- Example Values: `Jr.`, `Sr.`, `II`, `III`, `IV` | Value Statics: Total count 418 - Distinct count 5 - Null count 11446
govtrack_id INTEGER, --
house_history_id REAL, --
opensecrets_id TEXT, --
votesmart_id TEXT, --
bioguide_id TEXT primary key,
nickname_name TEXT, --
official_full_name TEXT, --
house_history_alternate_id TEXT, -- Example Values: `13283.0` | Value Statics: Total count 1 - Distinct count 1 - Null count 11863
gender_bio TEXT, -- Example Values: `M`, `F` | Value Statics: Total count 11864 - Distinct count 2 - Null count 0
bioguide_previous_id TEXT, -- Example Values: `['F000246']`, `['L000266']`, `['W000790']` | Value Statics: Total count 3 - Distinct count 3 - Null count 11861
icpsr_id REAL, --
wikipedia_id TEXT, --
birthday_bio TEXT, --
religion_bio TEXT, --
lis_id TEXT, --
middle_name TEXT, --
cspan_id TEXT, --
last_name TEXT, --
first_name TEXT, --
wikidata_id TEXT, --
thomas_id TEXT, --
ballotpedia_id TEXT, --
maplight_id TEXT, --
google_entity_id_id TEXT, --
);
CREATE TABLE historical-terms
(
bioguide TEXT primary key,
middle TEXT, --
title TEXT, -- Example Values: `Majority Leader`, `Speaker` | Value Statics: Total count 3 - Distinct count 2 - Null count 11861
party TEXT, --
type TEXT, -- Example Values: `sen`, `rep` | Value Statics: Total count 11858 - Distinct count 2 - Null count 6
phone TEXT, --
rss_url TEXT, -- Example Values: `http://radel.house.gov/news/rss.aspx`, `http://www.begich.senate.gov/public/?a=rss.feed`, `http://www.hagan.senate.gov/rss`, `http://negretemcleod.house.gov/rss.xml`, `http://garcia.house.gov/rss.xml` | Value Statics: Total count 12 - Distinct count 12 - Null count 11852
name TEXT, --
start TEXT, --
address TEXT, --
party_affiliations TEXT, -- Example Values: `{'start': '2009-01-06', 'end': '2009-12-22', 'party': 'Democrat'}`, `{'start': '2003-01-07', 'end': '2004-08-09', 'party': 'Democrat'}` | Value Statics: Total count 2 - Distinct count 2 - Null count 11862
relation TEXT, --
state_rank TEXT, -- Example Values: `junior`, `senior` | Value Statics: Total count 7 - Distinct count 2 - Null count 11857
last TEXT, -- Example Values: `Levy`, `Lambert`, `Bono` | Value Statics: Total count 3 - Distinct count 3 - Null count 11861
url TEXT, --
fax TEXT, --
contact_form TEXT, --
office TEXT, --
state TEXT, --
foreign key (bioguide) references historical(bioguide_id),
class REAL, -- Example Values: `2.0`, `1.0`, `3.0` | Value Statics: Total count 1256 - Distinct count 3 - Null count 10608
end TEXT, --
district REAL, --
chamber TEXT, -- Example Values: `house`, `senate` | Value Statics: Total count 3 - Distinct count 2 - Null count 11861
);
CREATE TABLE current-terms
(
foreign key (bioguide) references current(bioguide_id),
phone TEXT, --
party_affiliations TEXT, -- Example Values: `{'start': '2009-01-06', 'end': '2009-02-23', 'party': 'Independent'}`, `{'start': '1993-01-05', 'end': '1994-11-09', 'party': 'Democrat'}` | Value Statics: Total count 2 - Distinct count 2 - Null count 3076
title TEXT, -- Example Values: `Minority Whip`, `Majority Whip`, `Minority Leader`, `Majority Leader`, `Speaker` | Value Statics: Total count 28 - Distinct count 5 - Null count 3050
district REAL, --
bioguide TEXT, --
office TEXT, --
class REAL, -- Example Values: `1.0`, `2.0`, `3.0` | Value Statics: Total count 244 - Distinct count 3 - Null count 2834
type TEXT, -- Example Values: `rep`, `sen` | Value Statics: Total count 3014 - Distinct count 2 - Null count 64
start TEXT, --
address TEXT, --
rss_url TEXT, --
url TEXT, --
primary key (bioguide, end),
fax TEXT, --
chamber TEXT, -- Example Values: `senate`, `house` | Value Statics: Total count 28 - Distinct count 2 - Null count 3050
end TEXT, --
caucus TEXT, -- Example Values: `Democrat` | Value Statics: Total count 3 - Distinct count 1 - Null count 3075
state TEXT, --
last TEXT, -- Example Values: `Menendez` | Value Statics: Total count 1 - Distinct count 1 - Null count 3077
relation TEXT, -- Example Values: `son`, `nephew`, `cousin`, `daughter`, `grandson` | Value Statics: Total count 35 - Distinct count 13 - Null count 3043
state_rank TEXT, -- Example Values: `senior`, `junior` | Value Statics: Total count 147 - Distinct count 2 - Null count 2931
name TEXT, --
contact_form TEXT, --
party TEXT, -- Example Values: `Democrat`, `Republican`, `Independent` | Value Statics: Total count 3014 - Distinct count 3 - Null count 64
);
CREATE TABLE social-media
(
foreign key (bioguide) references current(bioguide_id),
instagram TEXT, --
thomas INTEGER, --
youtube TEXT, --
twitter TEXT, --
facebook TEXT, --
youtube_id TEXT, --
twitter_id REAL, --
facebook_id REAL, --
govtrack REAL, --
bioguide TEXT primary key,
instagram_id REAL, --
); |
professional_basketball | How many players did not get more than 10 steals between the years 2000 and 2005? | did not get more than 10 steals refers to count(steals) < = 10; between the years 2000 and 2005 refers to season_id between 2000 and 2005 | SELECT COUNT(DISTINCT playerID) FROM player_allstar WHERE season_id BETWEEN 2000 AND 2005 AND steals <= 10 | CREATE TABLE players_teams
(
PostGS INTEGER, --
PostdRebounds INTEGER, --
PostPF INTEGER, --
tmID TEXT, --
threeAttempted INTEGER, --
PostRebounds INTEGER, --
assists INTEGER, --
threeMade INTEGER, --
PostBlocks INTEGER, --
PostTurnovers INTEGER, --
GP INTEGER, --
lgID TEXT, -- Example Values: `NBA`, `NBL`, `ABA`, `ABL1`, `NPBL` | Value Statics: Total count 23751 - Distinct count 6 - Null count 0
foreign key (tmID, year) references teams (tmID, year) on update cascade on delete cascade,
PostfgMade INTEGER, --
steals INTEGER, --
oRebounds INTEGER, --
PostftAttempted INTEGER, --
ftAttempted INTEGER, --
ftMade INTEGER, --
points INTEGER, --
PostfgAttempted INTEGER, --
PostftMade INTEGER, --
note TEXT, -- Example Values: `C` | Value Statics: Total count 43 - Distinct count 1 - Null count 23708
dRebounds INTEGER, --
PostSteals INTEGER, --
blocks INTEGER, --
PostAssists INTEGER, --
minutes INTEGER, --
fgAttempted INTEGER, --
playerID TEXT not null references players on update cascade on delete cascade, --
PostthreeMade INTEGER, --
PostPoints INTEGER, --
year INTEGER, --
PF INTEGER, --
fgMade INTEGER, --
PostthreeAttempted INTEGER, --
rebounds INTEGER, --
id INTEGER primary key autoincrement,
stint INTEGER, -- Example Values: `1`, `2`, `0`, `3`, `4` | Value Statics: Total count 23751 - Distinct count 6 - Null count 0
PostMinutes INTEGER, --
PostGP INTEGER, --
turnovers INTEGER, --
PostoRebounds INTEGER, --
GS INTEGER, --
);
CREATE TABLE awards_coaches
(
award TEXT, -- Example Values: `NBA Coach of the Year`, `ABA Coach of the Year` | Value Statics: Total count 61 - Distinct count 2 - Null count 0
id INTEGER primary key autoincrement,
note TEXT, -- Example Values: `tie` | Value Statics: Total count 4 - Distinct count 1 - Null count 57
coachID TEXT, --
lgID TEXT, -- Example Values: `NBA`, `ABA` | Value Statics: Total count 61 - Distinct count 2 - Null count 0
foreign key (coachID, year) references coaches (coachID, year) on update cascade on delete cascade,
year INTEGER, --
);
CREATE TABLE draft
(
draftOverall INTEGER null, --
lgID TEXT null, -- Example Values: `ABA`, `NBA` | Value Statics: Total count 8621 - Distinct count 2 - Null count 0
suffixName TEXT null, -- Example Values: `Jr.` | Value Statics: Total count 2 - Distinct count 1 - Null count 8619
draftYear INTEGER null, --
draftSelection INTEGER null, --
tmID TEXT null, --
draftRound INTEGER null, --
lastName TEXT null, --
playerID TEXT null, --
draftFrom TEXT null, --
id INTEGER default 0 not null primary key,
firstName TEXT null, --
foreign key (tmID, draftYear) references teams (tmID, year) on update cascade on delete cascade,
foreign key (tmID, draftYear) references teams (tmID, year) on update cascade on delete cascade,
);
CREATE TABLE player_allstar
(
rebounds INTEGER null, --
playerID TEXT not null, --
season_id INTEGER not null, --
assists INTEGER null, --
conference TEXT null, -- Example Values: `East`, `West`, `Weset`, `Allstars`, `Denver` | Value Statics: Total count 1608 - Distinct count 5 - Null count 0
points INTEGER null, --
personal_fouls INTEGER null, -- Example Values: `3`, `2`, `0`, `1`, `5` | Value Statics: Total count 540 - Distinct count 8 - Null count 1068
ft_attempted INTEGER null, -- Example Values: `2`, `4`, `0`, `6`, `3` | Value Statics: Total count 1561 - Distinct count 17 - Null count 47
fg_attempted INTEGER null, --
league_id TEXT null, -- Example Values: `NBA`, `ABA` | Value Statics: Total count 1608 - Distinct count 2 - Null count 0
foreign key (playerID) references players (playerID) on update cascade on delete cascade,
fg_made INTEGER null, -- Example Values: `4`, `8`, `5`, `7`, `3` | Value Statics: Total count 1561 - Distinct count 18 - Null count 47
ft_made INTEGER null, -- Example Values: `2`, `3`, `0`, `1`, `4` | Value Statics: Total count 1561 - Distinct count 13 - Null count 47
steals INTEGER null, -- Example Values: `3`, `0`, `1`, `2`, `5` | Value Statics: Total count 398 - Distinct count 7 - Null count 1210
games_played INTEGER null, -- Example Values: `1` | Value Statics: Total count 1608 - Distinct count 1 - Null count 0
first_name TEXT null, --
d_rebounds INTEGER null, -- Example Values: `2`, `5`, `0`, `1`, `4` | Value Statics: Total count 493 - Distinct count 14 - Null count 1115
last_name TEXT null, --
primary key (playerID, season_id),
turnovers INTEGER null, -- Example Values: `1`, `0`, `3`, `2`, `4` | Value Statics: Total count 493 - Distinct count 9 - Null count 1115
three_made INTEGER null, -- Example Values: `0`, `1`, `3`, `5`, `4` | Value Statics: Total count 566 - Distinct count 7 - Null count 1042
minutes INTEGER null, --
blocks INTEGER null, -- Example Values: `2`, `0`, `1`, `3`, `5` | Value Statics: Total count 398 - Distinct count 6 - Null count 1210
three_attempted INTEGER null, -- Example Values: `0`, `1`, `6`, `7`, `10` | Value Statics: Total count 540 - Distinct count 12 - Null count 1068
o_rebounds INTEGER null, -- Example Values: `1`, `2`, `0`, `3`, `4` | Value Statics: Total count 493 - Distinct count 10 - Null count 1115
);
CREATE TABLE awards_players
(
foreign key (playerID) references players (playerID) on update cascade on delete cascade,
year INTEGER not null, --
pos TEXT null, -- Example Values: `C`, `F`, `G`, `F/G`, `F/C` | Value Statics: Total count 833 - Distinct count 5 - Null count 886
primary key (playerID, year, award),
lgID TEXT null, -- Example Values: `NBA`, `ABA`, `NBL`, `ABL1` | Value Statics: Total count 1719 - Distinct count 4 - Null count 0
award TEXT not null, --
playerID TEXT not null, --
note TEXT null, -- Example Values: `tie` | Value Statics: Total count 37 - Distinct count 1 - Null count 1682
);
CREATE TABLE series_post
(
tmIDLoser TEXT, --
id INTEGER primary key autoincrement,
series TEXT, -- Example Values: `O`, `M`, `N`, `A`, `K` | Value Statics: Total count 775 - Distinct count 11 - Null count 0
tmIDWinner TEXT, --
round TEXT, -- Example Values: `F`, `QF`, `SF`, `DT`, `DF` | Value Statics: Total count 775 - Distinct count 11 - Null count 0
year INTEGER, --
foreign key (tmIDLoser, year) references teams (tmID, year) on update cascade on delete cascade,
foreign key (tmIDWinner, year) references teams (tmID, year) on update cascade on delete cascade,
W INTEGER, -- Example Values: `4`, `2`, `1`, `3`, `0` | Value Statics: Total count 775 - Distinct count 5 - Null count 0
lgIDLoser TEXT, -- Example Values: `NBA`, `ABA` | Value Statics: Total count 775 - Distinct count 2 - Null count 0
lgIDWinner TEXT, -- Example Values: `NBA`, `ABA` | Value Statics: Total count 775 - Distinct count 2 - Null count 0
L INTEGER, -- Example Values: `1`, `0`, `2`, `3`, `4` | Value Statics: Total count 775 - Distinct count 5 - Null count 0
);
CREATE TABLE players
(
nameGiven TEXT null, -- Example Values: `nameGiven`, `Mort`, `Robert`, `Jim`, `Mike` | Value Statics: Total count 10 - Distinct count 9 - Null count 5052
lastseason INTEGER null, -- Example Values: `0`, `1951` | Value Statics: Total count 5047 - Distinct count 2 - Null count 15
hsCountry TEXT null, --
firstName TEXT null, --
hsCity TEXT null, --
firstseason INTEGER null, -- Example Values: `0`, `1951` | Value Statics: Total count 5047 - Distinct count 2 - Null count 15
weight INTEGER null, --
birthCountry TEXT null, --
race TEXT null, -- Example Values: `B`, `W`, `O`, `1`, `r` | Value Statics: Total count 4903 - Distinct count 5 - Null count 159
lastName TEXT null, --
birthDate DATE null, --
collegeOther TEXT null, --
birthState TEXT null, --
useFirst TEXT null, --
pos TEXT null, -- Example Values: `F-C`, `C`, `G`, `G-F`, `C-F` | Value Statics: Total count 4880 - Distinct count 14 - Null count 182
playerID TEXT not null primary key,
college TEXT null, --
highSchool TEXT null, --
hsState TEXT null, --
height REAL null, --
deathDate DATE null, --
nameSuffix TEXT null, -- Example Values: `Jr.`, `III`, `nameSuffix`, `II`, `IV` | Value Statics: Total count 324 - Distinct count 6 - Null count 4738
nameNick TEXT null, --
fullGivenName TEXT null, --
birthCity TEXT null, --
middleName TEXT null, --
);
CREATE TABLE teams
(
d_pts INTEGER null, --
name TEXT null, --
homeLost INTEGER null, --
o_ftm INTEGER null, --
franchID TEXT null, --
tmID TEXT not null, --
awayWon INTEGER null, --
primary key (year, tmID),
o_fgm INTEGER null, --
year INTEGER not null, --
awayLost INTEGER null, --
arena TEXT null, --
confID TEXT null, -- Example Values: `EC`, `WC` | Value Statics: Total count 1064 - Distinct count 2 - Null count 472
games INTEGER null, --
lost INTEGER null, --
divID TEXT null, -- Example Values: `EA`, `WE`, `ED`, `WD`, `SO` | Value Statics: Total count 1498 - Distinct count 13 - Null count 38
lgID TEXT null, -- Example Values: `NBL`, `NBA`, `PBLA`, `NPBL`, `ABL1` | Value Statics: Total count 1536 - Distinct count 6 - Null count 0
homeWon INTEGER null, --
confRank INTEGER null, -- Example Values: `0`, `4`, `3`, `5`, `7` | Value Statics: Total count 1536 - Distinct count 16 - Null count 0
o_pts INTEGER null, --
`rank` INTEGER null, -- Example Values: `1`, `2`, `4`, `5`, `6` | Value Statics: Total count 1536 - Distinct count 10 - Null count 0
playoff TEXT null, -- Example Values: `CF`, `WC`, `LC`, `CS`, `F` | Value Statics: Total count 901 - Distinct count 15 - Null count 635
won INTEGER null, --
);
CREATE TABLE coaches
(
primary key (coachID, year, tmID, stint),
lgID TEXT null, -- Example Values: `NBA`, `ABA`, `ABL1`, `PBLA`, `NPBL` | Value Statics: Total count 1689 - Distinct count 5 - Null count 0
post_losses INTEGER null, -- Example Values: `3`, `9`, `7`, `8`, `0` | Value Statics: Total count 1649 - Distinct count 12 - Null count 40
year INTEGER not null, --
won INTEGER null, --
foreign key (tmID, year) references teams (tmID, year) on update cascade on delete cascade,
post_wins INTEGER null, -- Example Values: `0`, `12`, `9`, `13`, `1` | Value Statics: Total count 1649 - Distinct count 17 - Null count 40
coachID TEXT not null, --
tmID TEXT not null, --
lost INTEGER null, --
stint INTEGER not null, -- Example Values: `2`, `1`, `4`, `5`, `3` | Value Statics: Total count 1689 - Distinct count 5 - Null count 0
); |
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' | CREATE TABLE current
(
gender_bio TEXT, -- Example Values: `M`, `F` | Value Statics: Total count 541 - Distinct count 2 - Null count 0
suffix_name TEXT, -- Example Values: `Jr.`, `III`, `II` | Value Statics: Total count 20 - Distinct count 3 - Null count 521
house_history_id REAL, --
birthday_bio DATE, --
nickname_name TEXT, --
religion_bio TEXT, --
google_entity_id_id TEXT, --
govtrack_id INTEGER, --
cspan_id REAL, --
primary key (bioguide_id, cspan_id),
wikipedia_id TEXT, --
maplight_id REAL, --
last_name TEXT, --
icpsr_id REAL, --
fec_id TEXT, --
votesmart_id REAL, --
first_name TEXT, --
lis_id TEXT, --
bioguide_id TEXT, --
wikidata_id TEXT, --
middle_name TEXT, --
ballotpedia_id TEXT, --
opensecrets_id TEXT, --
official_full_name TEXT, --
thomas_id INTEGER, --
);
CREATE TABLE historical
(
fec_id TEXT, --
suffix_name TEXT, -- Example Values: `Jr.`, `Sr.`, `II`, `III`, `IV` | Value Statics: Total count 418 - Distinct count 5 - Null count 11446
govtrack_id INTEGER, --
house_history_id REAL, --
opensecrets_id TEXT, --
votesmart_id TEXT, --
bioguide_id TEXT primary key,
nickname_name TEXT, --
official_full_name TEXT, --
house_history_alternate_id TEXT, -- Example Values: `13283.0` | Value Statics: Total count 1 - Distinct count 1 - Null count 11863
gender_bio TEXT, -- Example Values: `M`, `F` | Value Statics: Total count 11864 - Distinct count 2 - Null count 0
bioguide_previous_id TEXT, -- Example Values: `['F000246']`, `['L000266']`, `['W000790']` | Value Statics: Total count 3 - Distinct count 3 - Null count 11861
icpsr_id REAL, --
wikipedia_id TEXT, --
birthday_bio TEXT, --
religion_bio TEXT, --
lis_id TEXT, --
middle_name TEXT, --
cspan_id TEXT, --
last_name TEXT, --
first_name TEXT, --
wikidata_id TEXT, --
thomas_id TEXT, --
ballotpedia_id TEXT, --
maplight_id TEXT, --
google_entity_id_id TEXT, --
);
CREATE TABLE historical-terms
(
bioguide TEXT primary key,
middle TEXT, --
title TEXT, -- Example Values: `Majority Leader`, `Speaker` | Value Statics: Total count 3 - Distinct count 2 - Null count 11861
party TEXT, --
type TEXT, -- Example Values: `sen`, `rep` | Value Statics: Total count 11858 - Distinct count 2 - Null count 6
phone TEXT, --
rss_url TEXT, -- Example Values: `http://radel.house.gov/news/rss.aspx`, `http://www.begich.senate.gov/public/?a=rss.feed`, `http://www.hagan.senate.gov/rss`, `http://negretemcleod.house.gov/rss.xml`, `http://garcia.house.gov/rss.xml` | Value Statics: Total count 12 - Distinct count 12 - Null count 11852
name TEXT, --
start TEXT, --
address TEXT, --
party_affiliations TEXT, -- Example Values: `{'start': '2009-01-06', 'end': '2009-12-22', 'party': 'Democrat'}`, `{'start': '2003-01-07', 'end': '2004-08-09', 'party': 'Democrat'}` | Value Statics: Total count 2 - Distinct count 2 - Null count 11862
relation TEXT, --
state_rank TEXT, -- Example Values: `junior`, `senior` | Value Statics: Total count 7 - Distinct count 2 - Null count 11857
last TEXT, -- Example Values: `Levy`, `Lambert`, `Bono` | Value Statics: Total count 3 - Distinct count 3 - Null count 11861
url TEXT, --
fax TEXT, --
contact_form TEXT, --
office TEXT, --
state TEXT, --
foreign key (bioguide) references historical(bioguide_id),
class REAL, -- Example Values: `2.0`, `1.0`, `3.0` | Value Statics: Total count 1256 - Distinct count 3 - Null count 10608
end TEXT, --
district REAL, --
chamber TEXT, -- Example Values: `house`, `senate` | Value Statics: Total count 3 - Distinct count 2 - Null count 11861
);
CREATE TABLE current-terms
(
foreign key (bioguide) references current(bioguide_id),
phone TEXT, --
party_affiliations TEXT, -- Example Values: `{'start': '2009-01-06', 'end': '2009-02-23', 'party': 'Independent'}`, `{'start': '1993-01-05', 'end': '1994-11-09', 'party': 'Democrat'}` | Value Statics: Total count 2 - Distinct count 2 - Null count 3076
title TEXT, -- Example Values: `Minority Whip`, `Majority Whip`, `Minority Leader`, `Majority Leader`, `Speaker` | Value Statics: Total count 28 - Distinct count 5 - Null count 3050
district REAL, --
bioguide TEXT, --
office TEXT, --
class REAL, -- Example Values: `1.0`, `2.0`, `3.0` | Value Statics: Total count 244 - Distinct count 3 - Null count 2834
type TEXT, -- Example Values: `rep`, `sen` | Value Statics: Total count 3014 - Distinct count 2 - Null count 64
start TEXT, --
address TEXT, --
rss_url TEXT, --
url TEXT, --
primary key (bioguide, end),
fax TEXT, --
chamber TEXT, -- Example Values: `senate`, `house` | Value Statics: Total count 28 - Distinct count 2 - Null count 3050
end TEXT, --
caucus TEXT, -- Example Values: `Democrat` | Value Statics: Total count 3 - Distinct count 1 - Null count 3075
state TEXT, --
last TEXT, -- Example Values: `Menendez` | Value Statics: Total count 1 - Distinct count 1 - Null count 3077
relation TEXT, -- Example Values: `son`, `nephew`, `cousin`, `daughter`, `grandson` | Value Statics: Total count 35 - Distinct count 13 - Null count 3043
state_rank TEXT, -- Example Values: `senior`, `junior` | Value Statics: Total count 147 - Distinct count 2 - Null count 2931
name TEXT, --
contact_form TEXT, --
party TEXT, -- Example Values: `Democrat`, `Republican`, `Independent` | Value Statics: Total count 3014 - Distinct count 3 - Null count 64
);
CREATE TABLE social-media
(
foreign key (bioguide) references current(bioguide_id),
instagram TEXT, --
thomas INTEGER, --
youtube TEXT, --
twitter TEXT, --
facebook TEXT, --
youtube_id TEXT, --
twitter_id REAL, --
facebook_id REAL, --
govtrack REAL, --
bioguide TEXT primary key,
instagram_id REAL, --
); |
professional_basketball | Which player selected by Portland in 2nd draftRound won Rookie of the Year in 1971? | 2nd draftRound refers to draftRound = 2; won Rookie of the Year refers to award = 'Rookie of the Year'; in 1971 refers to draftYear = 1971 | SELECT T1.playerID FROM draft AS T1 INNER JOIN awards_players AS T2 ON T1.playerID = T2.playerID WHERE T2.award = 'Rookie of the Year' AND T1.draftYear = 1971 AND T1.draftRound = 2 | CREATE TABLE players_teams
(
PostGS INTEGER, --
PostdRebounds INTEGER, --
PostPF INTEGER, --
tmID TEXT, --
threeAttempted INTEGER, --
PostRebounds INTEGER, --
assists INTEGER, --
threeMade INTEGER, --
PostBlocks INTEGER, --
PostTurnovers INTEGER, --
GP INTEGER, --
lgID TEXT, -- Example Values: `NBA`, `NBL`, `ABA`, `ABL1`, `NPBL` | Value Statics: Total count 23751 - Distinct count 6 - Null count 0
foreign key (tmID, year) references teams (tmID, year) on update cascade on delete cascade,
PostfgMade INTEGER, --
steals INTEGER, --
oRebounds INTEGER, --
PostftAttempted INTEGER, --
ftAttempted INTEGER, --
ftMade INTEGER, --
points INTEGER, --
PostfgAttempted INTEGER, --
PostftMade INTEGER, --
note TEXT, -- Example Values: `C` | Value Statics: Total count 43 - Distinct count 1 - Null count 23708
dRebounds INTEGER, --
PostSteals INTEGER, --
blocks INTEGER, --
PostAssists INTEGER, --
minutes INTEGER, --
fgAttempted INTEGER, --
playerID TEXT not null references players on update cascade on delete cascade, --
PostthreeMade INTEGER, --
PostPoints INTEGER, --
year INTEGER, --
PF INTEGER, --
fgMade INTEGER, --
PostthreeAttempted INTEGER, --
rebounds INTEGER, --
id INTEGER primary key autoincrement,
stint INTEGER, -- Example Values: `1`, `2`, `0`, `3`, `4` | Value Statics: Total count 23751 - Distinct count 6 - Null count 0
PostMinutes INTEGER, --
PostGP INTEGER, --
turnovers INTEGER, --
PostoRebounds INTEGER, --
GS INTEGER, --
);
CREATE TABLE awards_coaches
(
award TEXT, -- Example Values: `NBA Coach of the Year`, `ABA Coach of the Year` | Value Statics: Total count 61 - Distinct count 2 - Null count 0
id INTEGER primary key autoincrement,
note TEXT, -- Example Values: `tie` | Value Statics: Total count 4 - Distinct count 1 - Null count 57
coachID TEXT, --
lgID TEXT, -- Example Values: `NBA`, `ABA` | Value Statics: Total count 61 - Distinct count 2 - Null count 0
foreign key (coachID, year) references coaches (coachID, year) on update cascade on delete cascade,
year INTEGER, --
);
CREATE TABLE draft
(
draftOverall INTEGER null, --
lgID TEXT null, -- Example Values: `ABA`, `NBA` | Value Statics: Total count 8621 - Distinct count 2 - Null count 0
suffixName TEXT null, -- Example Values: `Jr.` | Value Statics: Total count 2 - Distinct count 1 - Null count 8619
draftYear INTEGER null, --
draftSelection INTEGER null, --
tmID TEXT null, --
draftRound INTEGER null, --
lastName TEXT null, --
playerID TEXT null, --
draftFrom TEXT null, --
id INTEGER default 0 not null primary key,
firstName TEXT null, --
foreign key (tmID, draftYear) references teams (tmID, year) on update cascade on delete cascade,
foreign key (tmID, draftYear) references teams (tmID, year) on update cascade on delete cascade,
);
CREATE TABLE player_allstar
(
rebounds INTEGER null, --
playerID TEXT not null, --
season_id INTEGER not null, --
assists INTEGER null, --
conference TEXT null, -- Example Values: `East`, `West`, `Weset`, `Allstars`, `Denver` | Value Statics: Total count 1608 - Distinct count 5 - Null count 0
points INTEGER null, --
personal_fouls INTEGER null, -- Example Values: `3`, `2`, `0`, `1`, `5` | Value Statics: Total count 540 - Distinct count 8 - Null count 1068
ft_attempted INTEGER null, -- Example Values: `2`, `4`, `0`, `6`, `3` | Value Statics: Total count 1561 - Distinct count 17 - Null count 47
fg_attempted INTEGER null, --
league_id TEXT null, -- Example Values: `NBA`, `ABA` | Value Statics: Total count 1608 - Distinct count 2 - Null count 0
foreign key (playerID) references players (playerID) on update cascade on delete cascade,
fg_made INTEGER null, -- Example Values: `4`, `8`, `5`, `7`, `3` | Value Statics: Total count 1561 - Distinct count 18 - Null count 47
ft_made INTEGER null, -- Example Values: `2`, `3`, `0`, `1`, `4` | Value Statics: Total count 1561 - Distinct count 13 - Null count 47
steals INTEGER null, -- Example Values: `3`, `0`, `1`, `2`, `5` | Value Statics: Total count 398 - Distinct count 7 - Null count 1210
games_played INTEGER null, -- Example Values: `1` | Value Statics: Total count 1608 - Distinct count 1 - Null count 0
first_name TEXT null, --
d_rebounds INTEGER null, -- Example Values: `2`, `5`, `0`, `1`, `4` | Value Statics: Total count 493 - Distinct count 14 - Null count 1115
last_name TEXT null, --
primary key (playerID, season_id),
turnovers INTEGER null, -- Example Values: `1`, `0`, `3`, `2`, `4` | Value Statics: Total count 493 - Distinct count 9 - Null count 1115
three_made INTEGER null, -- Example Values: `0`, `1`, `3`, `5`, `4` | Value Statics: Total count 566 - Distinct count 7 - Null count 1042
minutes INTEGER null, --
blocks INTEGER null, -- Example Values: `2`, `0`, `1`, `3`, `5` | Value Statics: Total count 398 - Distinct count 6 - Null count 1210
three_attempted INTEGER null, -- Example Values: `0`, `1`, `6`, `7`, `10` | Value Statics: Total count 540 - Distinct count 12 - Null count 1068
o_rebounds INTEGER null, -- Example Values: `1`, `2`, `0`, `3`, `4` | Value Statics: Total count 493 - Distinct count 10 - Null count 1115
);
CREATE TABLE awards_players
(
foreign key (playerID) references players (playerID) on update cascade on delete cascade,
year INTEGER not null, --
pos TEXT null, -- Example Values: `C`, `F`, `G`, `F/G`, `F/C` | Value Statics: Total count 833 - Distinct count 5 - Null count 886
primary key (playerID, year, award),
lgID TEXT null, -- Example Values: `NBA`, `ABA`, `NBL`, `ABL1` | Value Statics: Total count 1719 - Distinct count 4 - Null count 0
award TEXT not null, --
playerID TEXT not null, --
note TEXT null, -- Example Values: `tie` | Value Statics: Total count 37 - Distinct count 1 - Null count 1682
);
CREATE TABLE series_post
(
tmIDLoser TEXT, --
id INTEGER primary key autoincrement,
series TEXT, -- Example Values: `O`, `M`, `N`, `A`, `K` | Value Statics: Total count 775 - Distinct count 11 - Null count 0
tmIDWinner TEXT, --
round TEXT, -- Example Values: `F`, `QF`, `SF`, `DT`, `DF` | Value Statics: Total count 775 - Distinct count 11 - Null count 0
year INTEGER, --
foreign key (tmIDLoser, year) references teams (tmID, year) on update cascade on delete cascade,
foreign key (tmIDWinner, year) references teams (tmID, year) on update cascade on delete cascade,
W INTEGER, -- Example Values: `4`, `2`, `1`, `3`, `0` | Value Statics: Total count 775 - Distinct count 5 - Null count 0
lgIDLoser TEXT, -- Example Values: `NBA`, `ABA` | Value Statics: Total count 775 - Distinct count 2 - Null count 0
lgIDWinner TEXT, -- Example Values: `NBA`, `ABA` | Value Statics: Total count 775 - Distinct count 2 - Null count 0
L INTEGER, -- Example Values: `1`, `0`, `2`, `3`, `4` | Value Statics: Total count 775 - Distinct count 5 - Null count 0
);
CREATE TABLE players
(
nameGiven TEXT null, -- Example Values: `nameGiven`, `Mort`, `Robert`, `Jim`, `Mike` | Value Statics: Total count 10 - Distinct count 9 - Null count 5052
lastseason INTEGER null, -- Example Values: `0`, `1951` | Value Statics: Total count 5047 - Distinct count 2 - Null count 15
hsCountry TEXT null, --
firstName TEXT null, --
hsCity TEXT null, --
firstseason INTEGER null, -- Example Values: `0`, `1951` | Value Statics: Total count 5047 - Distinct count 2 - Null count 15
weight INTEGER null, --
birthCountry TEXT null, --
race TEXT null, -- Example Values: `B`, `W`, `O`, `1`, `r` | Value Statics: Total count 4903 - Distinct count 5 - Null count 159
lastName TEXT null, --
birthDate DATE null, --
collegeOther TEXT null, --
birthState TEXT null, --
useFirst TEXT null, --
pos TEXT null, -- Example Values: `F-C`, `C`, `G`, `G-F`, `C-F` | Value Statics: Total count 4880 - Distinct count 14 - Null count 182
playerID TEXT not null primary key,
college TEXT null, --
highSchool TEXT null, --
hsState TEXT null, --
height REAL null, --
deathDate DATE null, --
nameSuffix TEXT null, -- Example Values: `Jr.`, `III`, `nameSuffix`, `II`, `IV` | Value Statics: Total count 324 - Distinct count 6 - Null count 4738
nameNick TEXT null, --
fullGivenName TEXT null, --
birthCity TEXT null, --
middleName TEXT null, --
);
CREATE TABLE teams
(
d_pts INTEGER null, --
name TEXT null, --
homeLost INTEGER null, --
o_ftm INTEGER null, --
franchID TEXT null, --
tmID TEXT not null, --
awayWon INTEGER null, --
primary key (year, tmID),
o_fgm INTEGER null, --
year INTEGER not null, --
awayLost INTEGER null, --
arena TEXT null, --
confID TEXT null, -- Example Values: `EC`, `WC` | Value Statics: Total count 1064 - Distinct count 2 - Null count 472
games INTEGER null, --
lost INTEGER null, --
divID TEXT null, -- Example Values: `EA`, `WE`, `ED`, `WD`, `SO` | Value Statics: Total count 1498 - Distinct count 13 - Null count 38
lgID TEXT null, -- Example Values: `NBL`, `NBA`, `PBLA`, `NPBL`, `ABL1` | Value Statics: Total count 1536 - Distinct count 6 - Null count 0
homeWon INTEGER null, --
confRank INTEGER null, -- Example Values: `0`, `4`, `3`, `5`, `7` | Value Statics: Total count 1536 - Distinct count 16 - Null count 0
o_pts INTEGER null, --
`rank` INTEGER null, -- Example Values: `1`, `2`, `4`, `5`, `6` | Value Statics: Total count 1536 - Distinct count 10 - Null count 0
playoff TEXT null, -- Example Values: `CF`, `WC`, `LC`, `CS`, `F` | Value Statics: Total count 901 - Distinct count 15 - Null count 635
won INTEGER null, --
);
CREATE TABLE coaches
(
primary key (coachID, year, tmID, stint),
lgID TEXT null, -- Example Values: `NBA`, `ABA`, `ABL1`, `PBLA`, `NPBL` | Value Statics: Total count 1689 - Distinct count 5 - Null count 0
post_losses INTEGER null, -- Example Values: `3`, `9`, `7`, `8`, `0` | Value Statics: Total count 1649 - Distinct count 12 - Null count 40
year INTEGER not null, --
won INTEGER null, --
foreign key (tmID, year) references teams (tmID, year) on update cascade on delete cascade,
post_wins INTEGER null, -- Example Values: `0`, `12`, `9`, `13`, `1` | Value Statics: Total count 1649 - Distinct count 17 - Null count 40
coachID TEXT not null, --
tmID TEXT not null, --
lost INTEGER null, --
stint INTEGER not null, -- Example Values: `2`, `1`, `4`, `5`, `3` | Value Statics: Total count 1689 - Distinct count 5 - Null count 0
); |
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 | CREATE TABLE current
(
gender_bio TEXT, -- Example Values: `M`, `F` | Value Statics: Total count 541 - Distinct count 2 - Null count 0
suffix_name TEXT, -- Example Values: `Jr.`, `III`, `II` | Value Statics: Total count 20 - Distinct count 3 - Null count 521
house_history_id REAL, --
birthday_bio DATE, --
nickname_name TEXT, --
religion_bio TEXT, --
google_entity_id_id TEXT, --
govtrack_id INTEGER, --
cspan_id REAL, --
primary key (bioguide_id, cspan_id),
wikipedia_id TEXT, --
maplight_id REAL, --
last_name TEXT, --
icpsr_id REAL, --
fec_id TEXT, --
votesmart_id REAL, --
first_name TEXT, --
lis_id TEXT, --
bioguide_id TEXT, --
wikidata_id TEXT, --
middle_name TEXT, --
ballotpedia_id TEXT, --
opensecrets_id TEXT, --
official_full_name TEXT, --
thomas_id INTEGER, --
);
CREATE TABLE historical
(
fec_id TEXT, --
suffix_name TEXT, -- Example Values: `Jr.`, `Sr.`, `II`, `III`, `IV` | Value Statics: Total count 418 - Distinct count 5 - Null count 11446
govtrack_id INTEGER, --
house_history_id REAL, --
opensecrets_id TEXT, --
votesmart_id TEXT, --
bioguide_id TEXT primary key,
nickname_name TEXT, --
official_full_name TEXT, --
house_history_alternate_id TEXT, -- Example Values: `13283.0` | Value Statics: Total count 1 - Distinct count 1 - Null count 11863
gender_bio TEXT, -- Example Values: `M`, `F` | Value Statics: Total count 11864 - Distinct count 2 - Null count 0
bioguide_previous_id TEXT, -- Example Values: `['F000246']`, `['L000266']`, `['W000790']` | Value Statics: Total count 3 - Distinct count 3 - Null count 11861
icpsr_id REAL, --
wikipedia_id TEXT, --
birthday_bio TEXT, --
religion_bio TEXT, --
lis_id TEXT, --
middle_name TEXT, --
cspan_id TEXT, --
last_name TEXT, --
first_name TEXT, --
wikidata_id TEXT, --
thomas_id TEXT, --
ballotpedia_id TEXT, --
maplight_id TEXT, --
google_entity_id_id TEXT, --
);
CREATE TABLE historical-terms
(
bioguide TEXT primary key,
middle TEXT, --
title TEXT, -- Example Values: `Majority Leader`, `Speaker` | Value Statics: Total count 3 - Distinct count 2 - Null count 11861
party TEXT, --
type TEXT, -- Example Values: `sen`, `rep` | Value Statics: Total count 11858 - Distinct count 2 - Null count 6
phone TEXT, --
rss_url TEXT, -- Example Values: `http://radel.house.gov/news/rss.aspx`, `http://www.begich.senate.gov/public/?a=rss.feed`, `http://www.hagan.senate.gov/rss`, `http://negretemcleod.house.gov/rss.xml`, `http://garcia.house.gov/rss.xml` | Value Statics: Total count 12 - Distinct count 12 - Null count 11852
name TEXT, --
start TEXT, --
address TEXT, --
party_affiliations TEXT, -- Example Values: `{'start': '2009-01-06', 'end': '2009-12-22', 'party': 'Democrat'}`, `{'start': '2003-01-07', 'end': '2004-08-09', 'party': 'Democrat'}` | Value Statics: Total count 2 - Distinct count 2 - Null count 11862
relation TEXT, --
state_rank TEXT, -- Example Values: `junior`, `senior` | Value Statics: Total count 7 - Distinct count 2 - Null count 11857
last TEXT, -- Example Values: `Levy`, `Lambert`, `Bono` | Value Statics: Total count 3 - Distinct count 3 - Null count 11861
url TEXT, --
fax TEXT, --
contact_form TEXT, --
office TEXT, --
state TEXT, --
foreign key (bioguide) references historical(bioguide_id),
class REAL, -- Example Values: `2.0`, `1.0`, `3.0` | Value Statics: Total count 1256 - Distinct count 3 - Null count 10608
end TEXT, --
district REAL, --
chamber TEXT, -- Example Values: `house`, `senate` | Value Statics: Total count 3 - Distinct count 2 - Null count 11861
);
CREATE TABLE current-terms
(
foreign key (bioguide) references current(bioguide_id),
phone TEXT, --
party_affiliations TEXT, -- Example Values: `{'start': '2009-01-06', 'end': '2009-02-23', 'party': 'Independent'}`, `{'start': '1993-01-05', 'end': '1994-11-09', 'party': 'Democrat'}` | Value Statics: Total count 2 - Distinct count 2 - Null count 3076
title TEXT, -- Example Values: `Minority Whip`, `Majority Whip`, `Minority Leader`, `Majority Leader`, `Speaker` | Value Statics: Total count 28 - Distinct count 5 - Null count 3050
district REAL, --
bioguide TEXT, --
office TEXT, --
class REAL, -- Example Values: `1.0`, `2.0`, `3.0` | Value Statics: Total count 244 - Distinct count 3 - Null count 2834
type TEXT, -- Example Values: `rep`, `sen` | Value Statics: Total count 3014 - Distinct count 2 - Null count 64
start TEXT, --
address TEXT, --
rss_url TEXT, --
url TEXT, --
primary key (bioguide, end),
fax TEXT, --
chamber TEXT, -- Example Values: `senate`, `house` | Value Statics: Total count 28 - Distinct count 2 - Null count 3050
end TEXT, --
caucus TEXT, -- Example Values: `Democrat` | Value Statics: Total count 3 - Distinct count 1 - Null count 3075
state TEXT, --
last TEXT, -- Example Values: `Menendez` | Value Statics: Total count 1 - Distinct count 1 - Null count 3077
relation TEXT, -- Example Values: `son`, `nephew`, `cousin`, `daughter`, `grandson` | Value Statics: Total count 35 - Distinct count 13 - Null count 3043
state_rank TEXT, -- Example Values: `senior`, `junior` | Value Statics: Total count 147 - Distinct count 2 - Null count 2931
name TEXT, --
contact_form TEXT, --
party TEXT, -- Example Values: `Democrat`, `Republican`, `Independent` | Value Statics: Total count 3014 - Distinct count 3 - Null count 64
);
CREATE TABLE social-media
(
foreign key (bioguide) references current(bioguide_id),
instagram TEXT, --
thomas INTEGER, --
youtube TEXT, --
twitter TEXT, --
facebook TEXT, --
youtube_id TEXT, --
twitter_id REAL, --
facebook_id REAL, --
govtrack REAL, --
bioguide TEXT primary key,
instagram_id REAL, --
); |
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' | CREATE TABLE current
(
gender_bio TEXT, -- Example Values: `M`, `F` | Value Statics: Total count 541 - Distinct count 2 - Null count 0
suffix_name TEXT, -- Example Values: `Jr.`, `III`, `II` | Value Statics: Total count 20 - Distinct count 3 - Null count 521
house_history_id REAL, --
birthday_bio DATE, --
nickname_name TEXT, --
religion_bio TEXT, --
google_entity_id_id TEXT, --
govtrack_id INTEGER, --
cspan_id REAL, --
primary key (bioguide_id, cspan_id),
wikipedia_id TEXT, --
maplight_id REAL, --
last_name TEXT, --
icpsr_id REAL, --
fec_id TEXT, --
votesmart_id REAL, --
first_name TEXT, --
lis_id TEXT, --
bioguide_id TEXT, --
wikidata_id TEXT, --
middle_name TEXT, --
ballotpedia_id TEXT, --
opensecrets_id TEXT, --
official_full_name TEXT, --
thomas_id INTEGER, --
);
CREATE TABLE historical
(
fec_id TEXT, --
suffix_name TEXT, -- Example Values: `Jr.`, `Sr.`, `II`, `III`, `IV` | Value Statics: Total count 418 - Distinct count 5 - Null count 11446
govtrack_id INTEGER, --
house_history_id REAL, --
opensecrets_id TEXT, --
votesmart_id TEXT, --
bioguide_id TEXT primary key,
nickname_name TEXT, --
official_full_name TEXT, --
house_history_alternate_id TEXT, -- Example Values: `13283.0` | Value Statics: Total count 1 - Distinct count 1 - Null count 11863
gender_bio TEXT, -- Example Values: `M`, `F` | Value Statics: Total count 11864 - Distinct count 2 - Null count 0
bioguide_previous_id TEXT, -- Example Values: `['F000246']`, `['L000266']`, `['W000790']` | Value Statics: Total count 3 - Distinct count 3 - Null count 11861
icpsr_id REAL, --
wikipedia_id TEXT, --
birthday_bio TEXT, --
religion_bio TEXT, --
lis_id TEXT, --
middle_name TEXT, --
cspan_id TEXT, --
last_name TEXT, --
first_name TEXT, --
wikidata_id TEXT, --
thomas_id TEXT, --
ballotpedia_id TEXT, --
maplight_id TEXT, --
google_entity_id_id TEXT, --
);
CREATE TABLE historical-terms
(
bioguide TEXT primary key,
middle TEXT, --
title TEXT, -- Example Values: `Majority Leader`, `Speaker` | Value Statics: Total count 3 - Distinct count 2 - Null count 11861
party TEXT, --
type TEXT, -- Example Values: `sen`, `rep` | Value Statics: Total count 11858 - Distinct count 2 - Null count 6
phone TEXT, --
rss_url TEXT, -- Example Values: `http://radel.house.gov/news/rss.aspx`, `http://www.begich.senate.gov/public/?a=rss.feed`, `http://www.hagan.senate.gov/rss`, `http://negretemcleod.house.gov/rss.xml`, `http://garcia.house.gov/rss.xml` | Value Statics: Total count 12 - Distinct count 12 - Null count 11852
name TEXT, --
start TEXT, --
address TEXT, --
party_affiliations TEXT, -- Example Values: `{'start': '2009-01-06', 'end': '2009-12-22', 'party': 'Democrat'}`, `{'start': '2003-01-07', 'end': '2004-08-09', 'party': 'Democrat'}` | Value Statics: Total count 2 - Distinct count 2 - Null count 11862
relation TEXT, --
state_rank TEXT, -- Example Values: `junior`, `senior` | Value Statics: Total count 7 - Distinct count 2 - Null count 11857
last TEXT, -- Example Values: `Levy`, `Lambert`, `Bono` | Value Statics: Total count 3 - Distinct count 3 - Null count 11861
url TEXT, --
fax TEXT, --
contact_form TEXT, --
office TEXT, --
state TEXT, --
foreign key (bioguide) references historical(bioguide_id),
class REAL, -- Example Values: `2.0`, `1.0`, `3.0` | Value Statics: Total count 1256 - Distinct count 3 - Null count 10608
end TEXT, --
district REAL, --
chamber TEXT, -- Example Values: `house`, `senate` | Value Statics: Total count 3 - Distinct count 2 - Null count 11861
);
CREATE TABLE current-terms
(
foreign key (bioguide) references current(bioguide_id),
phone TEXT, --
party_affiliations TEXT, -- Example Values: `{'start': '2009-01-06', 'end': '2009-02-23', 'party': 'Independent'}`, `{'start': '1993-01-05', 'end': '1994-11-09', 'party': 'Democrat'}` | Value Statics: Total count 2 - Distinct count 2 - Null count 3076
title TEXT, -- Example Values: `Minority Whip`, `Majority Whip`, `Minority Leader`, `Majority Leader`, `Speaker` | Value Statics: Total count 28 - Distinct count 5 - Null count 3050
district REAL, --
bioguide TEXT, --
office TEXT, --
class REAL, -- Example Values: `1.0`, `2.0`, `3.0` | Value Statics: Total count 244 - Distinct count 3 - Null count 2834
type TEXT, -- Example Values: `rep`, `sen` | Value Statics: Total count 3014 - Distinct count 2 - Null count 64
start TEXT, --
address TEXT, --
rss_url TEXT, --
url TEXT, --
primary key (bioguide, end),
fax TEXT, --
chamber TEXT, -- Example Values: `senate`, `house` | Value Statics: Total count 28 - Distinct count 2 - Null count 3050
end TEXT, --
caucus TEXT, -- Example Values: `Democrat` | Value Statics: Total count 3 - Distinct count 1 - Null count 3075
state TEXT, --
last TEXT, -- Example Values: `Menendez` | Value Statics: Total count 1 - Distinct count 1 - Null count 3077
relation TEXT, -- Example Values: `son`, `nephew`, `cousin`, `daughter`, `grandson` | Value Statics: Total count 35 - Distinct count 13 - Null count 3043
state_rank TEXT, -- Example Values: `senior`, `junior` | Value Statics: Total count 147 - Distinct count 2 - Null count 2931
name TEXT, --
contact_form TEXT, --
party TEXT, -- Example Values: `Democrat`, `Republican`, `Independent` | Value Statics: Total count 3014 - Distinct count 3 - Null count 64
);
CREATE TABLE social-media
(
foreign key (bioguide) references current(bioguide_id),
instagram TEXT, --
thomas INTEGER, --
youtube TEXT, --
twitter TEXT, --
facebook TEXT, --
youtube_id TEXT, --
twitter_id REAL, --
facebook_id REAL, --
govtrack REAL, --
bioguide TEXT primary key,
instagram_id REAL, --
); |
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 | CREATE TABLE current
(
gender_bio TEXT, -- Example Values: `M`, `F` | Value Statics: Total count 541 - Distinct count 2 - Null count 0
suffix_name TEXT, -- Example Values: `Jr.`, `III`, `II` | Value Statics: Total count 20 - Distinct count 3 - Null count 521
house_history_id REAL, --
birthday_bio DATE, --
nickname_name TEXT, --
religion_bio TEXT, --
google_entity_id_id TEXT, --
govtrack_id INTEGER, --
cspan_id REAL, --
primary key (bioguide_id, cspan_id),
wikipedia_id TEXT, --
maplight_id REAL, --
last_name TEXT, --
icpsr_id REAL, --
fec_id TEXT, --
votesmart_id REAL, --
first_name TEXT, --
lis_id TEXT, --
bioguide_id TEXT, --
wikidata_id TEXT, --
middle_name TEXT, --
ballotpedia_id TEXT, --
opensecrets_id TEXT, --
official_full_name TEXT, --
thomas_id INTEGER, --
);
CREATE TABLE historical
(
fec_id TEXT, --
suffix_name TEXT, -- Example Values: `Jr.`, `Sr.`, `II`, `III`, `IV` | Value Statics: Total count 418 - Distinct count 5 - Null count 11446
govtrack_id INTEGER, --
house_history_id REAL, --
opensecrets_id TEXT, --
votesmart_id TEXT, --
bioguide_id TEXT primary key,
nickname_name TEXT, --
official_full_name TEXT, --
house_history_alternate_id TEXT, -- Example Values: `13283.0` | Value Statics: Total count 1 - Distinct count 1 - Null count 11863
gender_bio TEXT, -- Example Values: `M`, `F` | Value Statics: Total count 11864 - Distinct count 2 - Null count 0
bioguide_previous_id TEXT, -- Example Values: `['F000246']`, `['L000266']`, `['W000790']` | Value Statics: Total count 3 - Distinct count 3 - Null count 11861
icpsr_id REAL, --
wikipedia_id TEXT, --
birthday_bio TEXT, --
religion_bio TEXT, --
lis_id TEXT, --
middle_name TEXT, --
cspan_id TEXT, --
last_name TEXT, --
first_name TEXT, --
wikidata_id TEXT, --
thomas_id TEXT, --
ballotpedia_id TEXT, --
maplight_id TEXT, --
google_entity_id_id TEXT, --
);
CREATE TABLE historical-terms
(
bioguide TEXT primary key,
middle TEXT, --
title TEXT, -- Example Values: `Majority Leader`, `Speaker` | Value Statics: Total count 3 - Distinct count 2 - Null count 11861
party TEXT, --
type TEXT, -- Example Values: `sen`, `rep` | Value Statics: Total count 11858 - Distinct count 2 - Null count 6
phone TEXT, --
rss_url TEXT, -- Example Values: `http://radel.house.gov/news/rss.aspx`, `http://www.begich.senate.gov/public/?a=rss.feed`, `http://www.hagan.senate.gov/rss`, `http://negretemcleod.house.gov/rss.xml`, `http://garcia.house.gov/rss.xml` | Value Statics: Total count 12 - Distinct count 12 - Null count 11852
name TEXT, --
start TEXT, --
address TEXT, --
party_affiliations TEXT, -- Example Values: `{'start': '2009-01-06', 'end': '2009-12-22', 'party': 'Democrat'}`, `{'start': '2003-01-07', 'end': '2004-08-09', 'party': 'Democrat'}` | Value Statics: Total count 2 - Distinct count 2 - Null count 11862
relation TEXT, --
state_rank TEXT, -- Example Values: `junior`, `senior` | Value Statics: Total count 7 - Distinct count 2 - Null count 11857
last TEXT, -- Example Values: `Levy`, `Lambert`, `Bono` | Value Statics: Total count 3 - Distinct count 3 - Null count 11861
url TEXT, --
fax TEXT, --
contact_form TEXT, --
office TEXT, --
state TEXT, --
foreign key (bioguide) references historical(bioguide_id),
class REAL, -- Example Values: `2.0`, `1.0`, `3.0` | Value Statics: Total count 1256 - Distinct count 3 - Null count 10608
end TEXT, --
district REAL, --
chamber TEXT, -- Example Values: `house`, `senate` | Value Statics: Total count 3 - Distinct count 2 - Null count 11861
);
CREATE TABLE current-terms
(
foreign key (bioguide) references current(bioguide_id),
phone TEXT, --
party_affiliations TEXT, -- Example Values: `{'start': '2009-01-06', 'end': '2009-02-23', 'party': 'Independent'}`, `{'start': '1993-01-05', 'end': '1994-11-09', 'party': 'Democrat'}` | Value Statics: Total count 2 - Distinct count 2 - Null count 3076
title TEXT, -- Example Values: `Minority Whip`, `Majority Whip`, `Minority Leader`, `Majority Leader`, `Speaker` | Value Statics: Total count 28 - Distinct count 5 - Null count 3050
district REAL, --
bioguide TEXT, --
office TEXT, --
class REAL, -- Example Values: `1.0`, `2.0`, `3.0` | Value Statics: Total count 244 - Distinct count 3 - Null count 2834
type TEXT, -- Example Values: `rep`, `sen` | Value Statics: Total count 3014 - Distinct count 2 - Null count 64
start TEXT, --
address TEXT, --
rss_url TEXT, --
url TEXT, --
primary key (bioguide, end),
fax TEXT, --
chamber TEXT, -- Example Values: `senate`, `house` | Value Statics: Total count 28 - Distinct count 2 - Null count 3050
end TEXT, --
caucus TEXT, -- Example Values: `Democrat` | Value Statics: Total count 3 - Distinct count 1 - Null count 3075
state TEXT, --
last TEXT, -- Example Values: `Menendez` | Value Statics: Total count 1 - Distinct count 1 - Null count 3077
relation TEXT, -- Example Values: `son`, `nephew`, `cousin`, `daughter`, `grandson` | Value Statics: Total count 35 - Distinct count 13 - Null count 3043
state_rank TEXT, -- Example Values: `senior`, `junior` | Value Statics: Total count 147 - Distinct count 2 - Null count 2931
name TEXT, --
contact_form TEXT, --
party TEXT, -- Example Values: `Democrat`, `Republican`, `Independent` | Value Statics: Total count 3014 - Distinct count 3 - Null count 64
);
CREATE TABLE social-media
(
foreign key (bioguide) references current(bioguide_id),
instagram TEXT, --
thomas INTEGER, --
youtube TEXT, --
twitter TEXT, --
facebook TEXT, --
youtube_id TEXT, --
twitter_id REAL, --
facebook_id REAL, --
govtrack REAL, --
bioguide TEXT primary key,
instagram_id REAL, --
); |
professional_basketball | Which winning team in the 1947 playoff quarterfinals managed to score 3,513 defensive points that same year? | team refers to tmID; quarterfinal refers to round = 'QF'; score 3,513 defensive points refers to d_pts > = 3513 | SELECT T2.tmID FROM series_post AS T1 INNER JOIN teams AS T2 ON T1.tmIDWinner = T2.tmID WHERE T1.year = 1947 AND T1.round = 'QF' AND T2.d_pts = 3513 | CREATE TABLE players_teams
(
PostGS INTEGER, --
PostdRebounds INTEGER, --
PostPF INTEGER, --
tmID TEXT, --
threeAttempted INTEGER, --
PostRebounds INTEGER, --
assists INTEGER, --
threeMade INTEGER, --
PostBlocks INTEGER, --
PostTurnovers INTEGER, --
GP INTEGER, --
lgID TEXT, -- Example Values: `NBA`, `NBL`, `ABA`, `ABL1`, `NPBL` | Value Statics: Total count 23751 - Distinct count 6 - Null count 0
foreign key (tmID, year) references teams (tmID, year) on update cascade on delete cascade,
PostfgMade INTEGER, --
steals INTEGER, --
oRebounds INTEGER, --
PostftAttempted INTEGER, --
ftAttempted INTEGER, --
ftMade INTEGER, --
points INTEGER, --
PostfgAttempted INTEGER, --
PostftMade INTEGER, --
note TEXT, -- Example Values: `C` | Value Statics: Total count 43 - Distinct count 1 - Null count 23708
dRebounds INTEGER, --
PostSteals INTEGER, --
blocks INTEGER, --
PostAssists INTEGER, --
minutes INTEGER, --
fgAttempted INTEGER, --
playerID TEXT not null references players on update cascade on delete cascade, --
PostthreeMade INTEGER, --
PostPoints INTEGER, --
year INTEGER, --
PF INTEGER, --
fgMade INTEGER, --
PostthreeAttempted INTEGER, --
rebounds INTEGER, --
id INTEGER primary key autoincrement,
stint INTEGER, -- Example Values: `1`, `2`, `0`, `3`, `4` | Value Statics: Total count 23751 - Distinct count 6 - Null count 0
PostMinutes INTEGER, --
PostGP INTEGER, --
turnovers INTEGER, --
PostoRebounds INTEGER, --
GS INTEGER, --
);
CREATE TABLE awards_coaches
(
award TEXT, -- Example Values: `NBA Coach of the Year`, `ABA Coach of the Year` | Value Statics: Total count 61 - Distinct count 2 - Null count 0
id INTEGER primary key autoincrement,
note TEXT, -- Example Values: `tie` | Value Statics: Total count 4 - Distinct count 1 - Null count 57
coachID TEXT, --
lgID TEXT, -- Example Values: `NBA`, `ABA` | Value Statics: Total count 61 - Distinct count 2 - Null count 0
foreign key (coachID, year) references coaches (coachID, year) on update cascade on delete cascade,
year INTEGER, --
);
CREATE TABLE draft
(
draftOverall INTEGER null, --
lgID TEXT null, -- Example Values: `ABA`, `NBA` | Value Statics: Total count 8621 - Distinct count 2 - Null count 0
suffixName TEXT null, -- Example Values: `Jr.` | Value Statics: Total count 2 - Distinct count 1 - Null count 8619
draftYear INTEGER null, --
draftSelection INTEGER null, --
tmID TEXT null, --
draftRound INTEGER null, --
lastName TEXT null, --
playerID TEXT null, --
draftFrom TEXT null, --
id INTEGER default 0 not null primary key,
firstName TEXT null, --
foreign key (tmID, draftYear) references teams (tmID, year) on update cascade on delete cascade,
foreign key (tmID, draftYear) references teams (tmID, year) on update cascade on delete cascade,
);
CREATE TABLE player_allstar
(
rebounds INTEGER null, --
playerID TEXT not null, --
season_id INTEGER not null, --
assists INTEGER null, --
conference TEXT null, -- Example Values: `East`, `West`, `Weset`, `Allstars`, `Denver` | Value Statics: Total count 1608 - Distinct count 5 - Null count 0
points INTEGER null, --
personal_fouls INTEGER null, -- Example Values: `3`, `2`, `0`, `1`, `5` | Value Statics: Total count 540 - Distinct count 8 - Null count 1068
ft_attempted INTEGER null, -- Example Values: `2`, `4`, `0`, `6`, `3` | Value Statics: Total count 1561 - Distinct count 17 - Null count 47
fg_attempted INTEGER null, --
league_id TEXT null, -- Example Values: `NBA`, `ABA` | Value Statics: Total count 1608 - Distinct count 2 - Null count 0
foreign key (playerID) references players (playerID) on update cascade on delete cascade,
fg_made INTEGER null, -- Example Values: `4`, `8`, `5`, `7`, `3` | Value Statics: Total count 1561 - Distinct count 18 - Null count 47
ft_made INTEGER null, -- Example Values: `2`, `3`, `0`, `1`, `4` | Value Statics: Total count 1561 - Distinct count 13 - Null count 47
steals INTEGER null, -- Example Values: `3`, `0`, `1`, `2`, `5` | Value Statics: Total count 398 - Distinct count 7 - Null count 1210
games_played INTEGER null, -- Example Values: `1` | Value Statics: Total count 1608 - Distinct count 1 - Null count 0
first_name TEXT null, --
d_rebounds INTEGER null, -- Example Values: `2`, `5`, `0`, `1`, `4` | Value Statics: Total count 493 - Distinct count 14 - Null count 1115
last_name TEXT null, --
primary key (playerID, season_id),
turnovers INTEGER null, -- Example Values: `1`, `0`, `3`, `2`, `4` | Value Statics: Total count 493 - Distinct count 9 - Null count 1115
three_made INTEGER null, -- Example Values: `0`, `1`, `3`, `5`, `4` | Value Statics: Total count 566 - Distinct count 7 - Null count 1042
minutes INTEGER null, --
blocks INTEGER null, -- Example Values: `2`, `0`, `1`, `3`, `5` | Value Statics: Total count 398 - Distinct count 6 - Null count 1210
three_attempted INTEGER null, -- Example Values: `0`, `1`, `6`, `7`, `10` | Value Statics: Total count 540 - Distinct count 12 - Null count 1068
o_rebounds INTEGER null, -- Example Values: `1`, `2`, `0`, `3`, `4` | Value Statics: Total count 493 - Distinct count 10 - Null count 1115
);
CREATE TABLE awards_players
(
foreign key (playerID) references players (playerID) on update cascade on delete cascade,
year INTEGER not null, --
pos TEXT null, -- Example Values: `C`, `F`, `G`, `F/G`, `F/C` | Value Statics: Total count 833 - Distinct count 5 - Null count 886
primary key (playerID, year, award),
lgID TEXT null, -- Example Values: `NBA`, `ABA`, `NBL`, `ABL1` | Value Statics: Total count 1719 - Distinct count 4 - Null count 0
award TEXT not null, --
playerID TEXT not null, --
note TEXT null, -- Example Values: `tie` | Value Statics: Total count 37 - Distinct count 1 - Null count 1682
);
CREATE TABLE series_post
(
tmIDLoser TEXT, --
id INTEGER primary key autoincrement,
series TEXT, -- Example Values: `O`, `M`, `N`, `A`, `K` | Value Statics: Total count 775 - Distinct count 11 - Null count 0
tmIDWinner TEXT, --
round TEXT, -- Example Values: `F`, `QF`, `SF`, `DT`, `DF` | Value Statics: Total count 775 - Distinct count 11 - Null count 0
year INTEGER, --
foreign key (tmIDLoser, year) references teams (tmID, year) on update cascade on delete cascade,
foreign key (tmIDWinner, year) references teams (tmID, year) on update cascade on delete cascade,
W INTEGER, -- Example Values: `4`, `2`, `1`, `3`, `0` | Value Statics: Total count 775 - Distinct count 5 - Null count 0
lgIDLoser TEXT, -- Example Values: `NBA`, `ABA` | Value Statics: Total count 775 - Distinct count 2 - Null count 0
lgIDWinner TEXT, -- Example Values: `NBA`, `ABA` | Value Statics: Total count 775 - Distinct count 2 - Null count 0
L INTEGER, -- Example Values: `1`, `0`, `2`, `3`, `4` | Value Statics: Total count 775 - Distinct count 5 - Null count 0
);
CREATE TABLE players
(
nameGiven TEXT null, -- Example Values: `nameGiven`, `Mort`, `Robert`, `Jim`, `Mike` | Value Statics: Total count 10 - Distinct count 9 - Null count 5052
lastseason INTEGER null, -- Example Values: `0`, `1951` | Value Statics: Total count 5047 - Distinct count 2 - Null count 15
hsCountry TEXT null, --
firstName TEXT null, --
hsCity TEXT null, --
firstseason INTEGER null, -- Example Values: `0`, `1951` | Value Statics: Total count 5047 - Distinct count 2 - Null count 15
weight INTEGER null, --
birthCountry TEXT null, --
race TEXT null, -- Example Values: `B`, `W`, `O`, `1`, `r` | Value Statics: Total count 4903 - Distinct count 5 - Null count 159
lastName TEXT null, --
birthDate DATE null, --
collegeOther TEXT null, --
birthState TEXT null, --
useFirst TEXT null, --
pos TEXT null, -- Example Values: `F-C`, `C`, `G`, `G-F`, `C-F` | Value Statics: Total count 4880 - Distinct count 14 - Null count 182
playerID TEXT not null primary key,
college TEXT null, --
highSchool TEXT null, --
hsState TEXT null, --
height REAL null, --
deathDate DATE null, --
nameSuffix TEXT null, -- Example Values: `Jr.`, `III`, `nameSuffix`, `II`, `IV` | Value Statics: Total count 324 - Distinct count 6 - Null count 4738
nameNick TEXT null, --
fullGivenName TEXT null, --
birthCity TEXT null, --
middleName TEXT null, --
);
CREATE TABLE teams
(
d_pts INTEGER null, --
name TEXT null, --
homeLost INTEGER null, --
o_ftm INTEGER null, --
franchID TEXT null, --
tmID TEXT not null, --
awayWon INTEGER null, --
primary key (year, tmID),
o_fgm INTEGER null, --
year INTEGER not null, --
awayLost INTEGER null, --
arena TEXT null, --
confID TEXT null, -- Example Values: `EC`, `WC` | Value Statics: Total count 1064 - Distinct count 2 - Null count 472
games INTEGER null, --
lost INTEGER null, --
divID TEXT null, -- Example Values: `EA`, `WE`, `ED`, `WD`, `SO` | Value Statics: Total count 1498 - Distinct count 13 - Null count 38
lgID TEXT null, -- Example Values: `NBL`, `NBA`, `PBLA`, `NPBL`, `ABL1` | Value Statics: Total count 1536 - Distinct count 6 - Null count 0
homeWon INTEGER null, --
confRank INTEGER null, -- Example Values: `0`, `4`, `3`, `5`, `7` | Value Statics: Total count 1536 - Distinct count 16 - Null count 0
o_pts INTEGER null, --
`rank` INTEGER null, -- Example Values: `1`, `2`, `4`, `5`, `6` | Value Statics: Total count 1536 - Distinct count 10 - Null count 0
playoff TEXT null, -- Example Values: `CF`, `WC`, `LC`, `CS`, `F` | Value Statics: Total count 901 - Distinct count 15 - Null count 635
won INTEGER null, --
);
CREATE TABLE coaches
(
primary key (coachID, year, tmID, stint),
lgID TEXT null, -- Example Values: `NBA`, `ABA`, `ABL1`, `PBLA`, `NPBL` | Value Statics: Total count 1689 - Distinct count 5 - Null count 0
post_losses INTEGER null, -- Example Values: `3`, `9`, `7`, `8`, `0` | Value Statics: Total count 1649 - Distinct count 12 - Null count 40
year INTEGER not null, --
won INTEGER null, --
foreign key (tmID, year) references teams (tmID, year) on update cascade on delete cascade,
post_wins INTEGER null, -- Example Values: `0`, `12`, `9`, `13`, `1` | Value Statics: Total count 1649 - Distinct count 17 - Null count 40
coachID TEXT not null, --
tmID TEXT not null, --
lost INTEGER null, --
stint INTEGER not null, -- Example Values: `2`, `1`, `4`, `5`, `3` | Value Statics: Total count 1689 - Distinct count 5 - Null count 0
); |
legislator | List down the MapLight ID of the representatives in Maine. | representatives refers to type = 'rep'; Maine refers to state = 'ME'; | SELECT T1.maplight_id FROM historical AS T1 INNER JOIN `historical-terms` AS T2 ON T1.bioguide_id = T2.bioguide WHERE T2.type = 'rep' AND T2.state = 'ME' GROUP BY T1.maplight_id | CREATE TABLE current
(
gender_bio TEXT, -- Example Values: `M`, `F` | Value Statics: Total count 541 - Distinct count 2 - Null count 0
suffix_name TEXT, -- Example Values: `Jr.`, `III`, `II` | Value Statics: Total count 20 - Distinct count 3 - Null count 521
house_history_id REAL, --
birthday_bio DATE, --
nickname_name TEXT, --
religion_bio TEXT, --
google_entity_id_id TEXT, --
govtrack_id INTEGER, --
cspan_id REAL, --
primary key (bioguide_id, cspan_id),
wikipedia_id TEXT, --
maplight_id REAL, --
last_name TEXT, --
icpsr_id REAL, --
fec_id TEXT, --
votesmart_id REAL, --
first_name TEXT, --
lis_id TEXT, --
bioguide_id TEXT, --
wikidata_id TEXT, --
middle_name TEXT, --
ballotpedia_id TEXT, --
opensecrets_id TEXT, --
official_full_name TEXT, --
thomas_id INTEGER, --
);
CREATE TABLE historical
(
fec_id TEXT, --
suffix_name TEXT, -- Example Values: `Jr.`, `Sr.`, `II`, `III`, `IV` | Value Statics: Total count 418 - Distinct count 5 - Null count 11446
govtrack_id INTEGER, --
house_history_id REAL, --
opensecrets_id TEXT, --
votesmart_id TEXT, --
bioguide_id TEXT primary key,
nickname_name TEXT, --
official_full_name TEXT, --
house_history_alternate_id TEXT, -- Example Values: `13283.0` | Value Statics: Total count 1 - Distinct count 1 - Null count 11863
gender_bio TEXT, -- Example Values: `M`, `F` | Value Statics: Total count 11864 - Distinct count 2 - Null count 0
bioguide_previous_id TEXT, -- Example Values: `['F000246']`, `['L000266']`, `['W000790']` | Value Statics: Total count 3 - Distinct count 3 - Null count 11861
icpsr_id REAL, --
wikipedia_id TEXT, --
birthday_bio TEXT, --
religion_bio TEXT, --
lis_id TEXT, --
middle_name TEXT, --
cspan_id TEXT, --
last_name TEXT, --
first_name TEXT, --
wikidata_id TEXT, --
thomas_id TEXT, --
ballotpedia_id TEXT, --
maplight_id TEXT, --
google_entity_id_id TEXT, --
);
CREATE TABLE historical-terms
(
bioguide TEXT primary key,
middle TEXT, --
title TEXT, -- Example Values: `Majority Leader`, `Speaker` | Value Statics: Total count 3 - Distinct count 2 - Null count 11861
party TEXT, --
type TEXT, -- Example Values: `sen`, `rep` | Value Statics: Total count 11858 - Distinct count 2 - Null count 6
phone TEXT, --
rss_url TEXT, -- Example Values: `http://radel.house.gov/news/rss.aspx`, `http://www.begich.senate.gov/public/?a=rss.feed`, `http://www.hagan.senate.gov/rss`, `http://negretemcleod.house.gov/rss.xml`, `http://garcia.house.gov/rss.xml` | Value Statics: Total count 12 - Distinct count 12 - Null count 11852
name TEXT, --
start TEXT, --
address TEXT, --
party_affiliations TEXT, -- Example Values: `{'start': '2009-01-06', 'end': '2009-12-22', 'party': 'Democrat'}`, `{'start': '2003-01-07', 'end': '2004-08-09', 'party': 'Democrat'}` | Value Statics: Total count 2 - Distinct count 2 - Null count 11862
relation TEXT, --
state_rank TEXT, -- Example Values: `junior`, `senior` | Value Statics: Total count 7 - Distinct count 2 - Null count 11857
last TEXT, -- Example Values: `Levy`, `Lambert`, `Bono` | Value Statics: Total count 3 - Distinct count 3 - Null count 11861
url TEXT, --
fax TEXT, --
contact_form TEXT, --
office TEXT, --
state TEXT, --
foreign key (bioguide) references historical(bioguide_id),
class REAL, -- Example Values: `2.0`, `1.0`, `3.0` | Value Statics: Total count 1256 - Distinct count 3 - Null count 10608
end TEXT, --
district REAL, --
chamber TEXT, -- Example Values: `house`, `senate` | Value Statics: Total count 3 - Distinct count 2 - Null count 11861
);
CREATE TABLE current-terms
(
foreign key (bioguide) references current(bioguide_id),
phone TEXT, --
party_affiliations TEXT, -- Example Values: `{'start': '2009-01-06', 'end': '2009-02-23', 'party': 'Independent'}`, `{'start': '1993-01-05', 'end': '1994-11-09', 'party': 'Democrat'}` | Value Statics: Total count 2 - Distinct count 2 - Null count 3076
title TEXT, -- Example Values: `Minority Whip`, `Majority Whip`, `Minority Leader`, `Majority Leader`, `Speaker` | Value Statics: Total count 28 - Distinct count 5 - Null count 3050
district REAL, --
bioguide TEXT, --
office TEXT, --
class REAL, -- Example Values: `1.0`, `2.0`, `3.0` | Value Statics: Total count 244 - Distinct count 3 - Null count 2834
type TEXT, -- Example Values: `rep`, `sen` | Value Statics: Total count 3014 - Distinct count 2 - Null count 64
start TEXT, --
address TEXT, --
rss_url TEXT, --
url TEXT, --
primary key (bioguide, end),
fax TEXT, --
chamber TEXT, -- Example Values: `senate`, `house` | Value Statics: Total count 28 - Distinct count 2 - Null count 3050
end TEXT, --
caucus TEXT, -- Example Values: `Democrat` | Value Statics: Total count 3 - Distinct count 1 - Null count 3075
state TEXT, --
last TEXT, -- Example Values: `Menendez` | Value Statics: Total count 1 - Distinct count 1 - Null count 3077
relation TEXT, -- Example Values: `son`, `nephew`, `cousin`, `daughter`, `grandson` | Value Statics: Total count 35 - Distinct count 13 - Null count 3043
state_rank TEXT, -- Example Values: `senior`, `junior` | Value Statics: Total count 147 - Distinct count 2 - Null count 2931
name TEXT, --
contact_form TEXT, --
party TEXT, -- Example Values: `Democrat`, `Republican`, `Independent` | Value Statics: Total count 3014 - Distinct count 3 - Null count 64
);
CREATE TABLE social-media
(
foreign key (bioguide) references current(bioguide_id),
instagram TEXT, --
thomas INTEGER, --
youtube TEXT, --
twitter TEXT, --
facebook TEXT, --
youtube_id TEXT, --
twitter_id REAL, --
facebook_id REAL, --
govtrack REAL, --
bioguide TEXT primary key,
instagram_id REAL, --
); |
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' | CREATE TABLE current
(
gender_bio TEXT, -- Example Values: `M`, `F` | Value Statics: Total count 541 - Distinct count 2 - Null count 0
suffix_name TEXT, -- Example Values: `Jr.`, `III`, `II` | Value Statics: Total count 20 - Distinct count 3 - Null count 521
house_history_id REAL, --
birthday_bio DATE, --
nickname_name TEXT, --
religion_bio TEXT, --
google_entity_id_id TEXT, --
govtrack_id INTEGER, --
cspan_id REAL, --
primary key (bioguide_id, cspan_id),
wikipedia_id TEXT, --
maplight_id REAL, --
last_name TEXT, --
icpsr_id REAL, --
fec_id TEXT, --
votesmart_id REAL, --
first_name TEXT, --
lis_id TEXT, --
bioguide_id TEXT, --
wikidata_id TEXT, --
middle_name TEXT, --
ballotpedia_id TEXT, --
opensecrets_id TEXT, --
official_full_name TEXT, --
thomas_id INTEGER, --
);
CREATE TABLE historical
(
fec_id TEXT, --
suffix_name TEXT, -- Example Values: `Jr.`, `Sr.`, `II`, `III`, `IV` | Value Statics: Total count 418 - Distinct count 5 - Null count 11446
govtrack_id INTEGER, --
house_history_id REAL, --
opensecrets_id TEXT, --
votesmart_id TEXT, --
bioguide_id TEXT primary key,
nickname_name TEXT, --
official_full_name TEXT, --
house_history_alternate_id TEXT, -- Example Values: `13283.0` | Value Statics: Total count 1 - Distinct count 1 - Null count 11863
gender_bio TEXT, -- Example Values: `M`, `F` | Value Statics: Total count 11864 - Distinct count 2 - Null count 0
bioguide_previous_id TEXT, -- Example Values: `['F000246']`, `['L000266']`, `['W000790']` | Value Statics: Total count 3 - Distinct count 3 - Null count 11861
icpsr_id REAL, --
wikipedia_id TEXT, --
birthday_bio TEXT, --
religion_bio TEXT, --
lis_id TEXT, --
middle_name TEXT, --
cspan_id TEXT, --
last_name TEXT, --
first_name TEXT, --
wikidata_id TEXT, --
thomas_id TEXT, --
ballotpedia_id TEXT, --
maplight_id TEXT, --
google_entity_id_id TEXT, --
);
CREATE TABLE historical-terms
(
bioguide TEXT primary key,
middle TEXT, --
title TEXT, -- Example Values: `Majority Leader`, `Speaker` | Value Statics: Total count 3 - Distinct count 2 - Null count 11861
party TEXT, --
type TEXT, -- Example Values: `sen`, `rep` | Value Statics: Total count 11858 - Distinct count 2 - Null count 6
phone TEXT, --
rss_url TEXT, -- Example Values: `http://radel.house.gov/news/rss.aspx`, `http://www.begich.senate.gov/public/?a=rss.feed`, `http://www.hagan.senate.gov/rss`, `http://negretemcleod.house.gov/rss.xml`, `http://garcia.house.gov/rss.xml` | Value Statics: Total count 12 - Distinct count 12 - Null count 11852
name TEXT, --
start TEXT, --
address TEXT, --
party_affiliations TEXT, -- Example Values: `{'start': '2009-01-06', 'end': '2009-12-22', 'party': 'Democrat'}`, `{'start': '2003-01-07', 'end': '2004-08-09', 'party': 'Democrat'}` | Value Statics: Total count 2 - Distinct count 2 - Null count 11862
relation TEXT, --
state_rank TEXT, -- Example Values: `junior`, `senior` | Value Statics: Total count 7 - Distinct count 2 - Null count 11857
last TEXT, -- Example Values: `Levy`, `Lambert`, `Bono` | Value Statics: Total count 3 - Distinct count 3 - Null count 11861
url TEXT, --
fax TEXT, --
contact_form TEXT, --
office TEXT, --
state TEXT, --
foreign key (bioguide) references historical(bioguide_id),
class REAL, -- Example Values: `2.0`, `1.0`, `3.0` | Value Statics: Total count 1256 - Distinct count 3 - Null count 10608
end TEXT, --
district REAL, --
chamber TEXT, -- Example Values: `house`, `senate` | Value Statics: Total count 3 - Distinct count 2 - Null count 11861
);
CREATE TABLE current-terms
(
foreign key (bioguide) references current(bioguide_id),
phone TEXT, --
party_affiliations TEXT, -- Example Values: `{'start': '2009-01-06', 'end': '2009-02-23', 'party': 'Independent'}`, `{'start': '1993-01-05', 'end': '1994-11-09', 'party': 'Democrat'}` | Value Statics: Total count 2 - Distinct count 2 - Null count 3076
title TEXT, -- Example Values: `Minority Whip`, `Majority Whip`, `Minority Leader`, `Majority Leader`, `Speaker` | Value Statics: Total count 28 - Distinct count 5 - Null count 3050
district REAL, --
bioguide TEXT, --
office TEXT, --
class REAL, -- Example Values: `1.0`, `2.0`, `3.0` | Value Statics: Total count 244 - Distinct count 3 - Null count 2834
type TEXT, -- Example Values: `rep`, `sen` | Value Statics: Total count 3014 - Distinct count 2 - Null count 64
start TEXT, --
address TEXT, --
rss_url TEXT, --
url TEXT, --
primary key (bioguide, end),
fax TEXT, --
chamber TEXT, -- Example Values: `senate`, `house` | Value Statics: Total count 28 - Distinct count 2 - Null count 3050
end TEXT, --
caucus TEXT, -- Example Values: `Democrat` | Value Statics: Total count 3 - Distinct count 1 - Null count 3075
state TEXT, --
last TEXT, -- Example Values: `Menendez` | Value Statics: Total count 1 - Distinct count 1 - Null count 3077
relation TEXT, -- Example Values: `son`, `nephew`, `cousin`, `daughter`, `grandson` | Value Statics: Total count 35 - Distinct count 13 - Null count 3043
state_rank TEXT, -- Example Values: `senior`, `junior` | Value Statics: Total count 147 - Distinct count 2 - Null count 2931
name TEXT, --
contact_form TEXT, --
party TEXT, -- Example Values: `Democrat`, `Republican`, `Independent` | Value Statics: Total count 3014 - Distinct count 3 - Null count 64
);
CREATE TABLE social-media
(
foreign key (bioguide) references current(bioguide_id),
instagram TEXT, --
thomas INTEGER, --
youtube TEXT, --
twitter TEXT, --
facebook TEXT, --
youtube_id TEXT, --
twitter_id REAL, --
facebook_id REAL, --
govtrack REAL, --
bioguide TEXT primary key,
instagram_id REAL, --
); |
shakespeare | Which work is the character Lord Abergavenny from? Please give its short or abbreviated title. | Lord Abergavenny refers to CharName = 'Lord Abergavenny'; short or abbreviated title refers to Title | SELECT DISTINCT T1.Title FROM works AS T1 INNER JOIN chapters AS T2 ON T1.id = T2.work_id INNER JOIN paragraphs AS T3 ON T2.id = T3.chapter_id INNER JOIN characters AS T4 ON T3.character_id = T4.id WHERE T4.CharName = 'Lord Abergavenny' | CREATE TABLE characters
(
CharName TEXT not null, --
Abbrev TEXT not null, --
Description TEXT not null, --
id INTEGER primary key autoincrement,
);
CREATE TABLE paragraphs
(
chapter_id INTEGER default 0 not null references chapters, --
character_id INTEGER not null references characters, --
ParagraphNum INTEGER not null, --
PlainText TEXT not null, --
id INTEGER primary key autoincrement,
);
CREATE TABLE works
(
GenreType TEXT not null, -- Example Values: `Comedy`, `Tragedy`, `History`, `Poem`, `Sonnet` | Value Statics: Total count 43 - Distinct count 5 - Null count 0
Title TEXT not null, --
Date INTEGER not null, --
id INTEGER primary key autoincrement,
LongTitle TEXT not null, --
);
CREATE TABLE chapters
(
work_id INTEGER not null references works, --
Act INTEGER not null, -- Example Values: `1`, `2`, `3`, `4`, `5` | Value Statics: Total count 945 - Distinct count 6 - Null count 0
Description TEXT not null, --
id INTEGER primary key autoincrement,
Scene INTEGER not null, --
); |
professional_basketball | How many awards were given out in 2010 to players who attended high school in Chicago? | in 2010 refers to year = 2010; attended high school in Chicago refers to college = 'Chicago' | SELECT COUNT(T1.award) FROM awards_players AS T1 INNER JOIN players AS T2 ON T1.playerID = T2.playerID WHERE T1.year = 2010 AND T2.hsCity = 'Chicago' | CREATE TABLE players_teams
(
PostGS INTEGER, --
PostdRebounds INTEGER, --
PostPF INTEGER, --
tmID TEXT, --
threeAttempted INTEGER, --
PostRebounds INTEGER, --
assists INTEGER, --
threeMade INTEGER, --
PostBlocks INTEGER, --
PostTurnovers INTEGER, --
GP INTEGER, --
lgID TEXT, -- Example Values: `NBA`, `NBL`, `ABA`, `ABL1`, `NPBL` | Value Statics: Total count 23751 - Distinct count 6 - Null count 0
foreign key (tmID, year) references teams (tmID, year) on update cascade on delete cascade,
PostfgMade INTEGER, --
steals INTEGER, --
oRebounds INTEGER, --
PostftAttempted INTEGER, --
ftAttempted INTEGER, --
ftMade INTEGER, --
points INTEGER, --
PostfgAttempted INTEGER, --
PostftMade INTEGER, --
note TEXT, -- Example Values: `C` | Value Statics: Total count 43 - Distinct count 1 - Null count 23708
dRebounds INTEGER, --
PostSteals INTEGER, --
blocks INTEGER, --
PostAssists INTEGER, --
minutes INTEGER, --
fgAttempted INTEGER, --
playerID TEXT not null references players on update cascade on delete cascade, --
PostthreeMade INTEGER, --
PostPoints INTEGER, --
year INTEGER, --
PF INTEGER, --
fgMade INTEGER, --
PostthreeAttempted INTEGER, --
rebounds INTEGER, --
id INTEGER primary key autoincrement,
stint INTEGER, -- Example Values: `1`, `2`, `0`, `3`, `4` | Value Statics: Total count 23751 - Distinct count 6 - Null count 0
PostMinutes INTEGER, --
PostGP INTEGER, --
turnovers INTEGER, --
PostoRebounds INTEGER, --
GS INTEGER, --
);
CREATE TABLE awards_coaches
(
award TEXT, -- Example Values: `NBA Coach of the Year`, `ABA Coach of the Year` | Value Statics: Total count 61 - Distinct count 2 - Null count 0
id INTEGER primary key autoincrement,
note TEXT, -- Example Values: `tie` | Value Statics: Total count 4 - Distinct count 1 - Null count 57
coachID TEXT, --
lgID TEXT, -- Example Values: `NBA`, `ABA` | Value Statics: Total count 61 - Distinct count 2 - Null count 0
foreign key (coachID, year) references coaches (coachID, year) on update cascade on delete cascade,
year INTEGER, --
);
CREATE TABLE draft
(
draftOverall INTEGER null, --
lgID TEXT null, -- Example Values: `ABA`, `NBA` | Value Statics: Total count 8621 - Distinct count 2 - Null count 0
suffixName TEXT null, -- Example Values: `Jr.` | Value Statics: Total count 2 - Distinct count 1 - Null count 8619
draftYear INTEGER null, --
draftSelection INTEGER null, --
tmID TEXT null, --
draftRound INTEGER null, --
lastName TEXT null, --
playerID TEXT null, --
draftFrom TEXT null, --
id INTEGER default 0 not null primary key,
firstName TEXT null, --
foreign key (tmID, draftYear) references teams (tmID, year) on update cascade on delete cascade,
foreign key (tmID, draftYear) references teams (tmID, year) on update cascade on delete cascade,
);
CREATE TABLE player_allstar
(
rebounds INTEGER null, --
playerID TEXT not null, --
season_id INTEGER not null, --
assists INTEGER null, --
conference TEXT null, -- Example Values: `East`, `West`, `Weset`, `Allstars`, `Denver` | Value Statics: Total count 1608 - Distinct count 5 - Null count 0
points INTEGER null, --
personal_fouls INTEGER null, -- Example Values: `3`, `2`, `0`, `1`, `5` | Value Statics: Total count 540 - Distinct count 8 - Null count 1068
ft_attempted INTEGER null, -- Example Values: `2`, `4`, `0`, `6`, `3` | Value Statics: Total count 1561 - Distinct count 17 - Null count 47
fg_attempted INTEGER null, --
league_id TEXT null, -- Example Values: `NBA`, `ABA` | Value Statics: Total count 1608 - Distinct count 2 - Null count 0
foreign key (playerID) references players (playerID) on update cascade on delete cascade,
fg_made INTEGER null, -- Example Values: `4`, `8`, `5`, `7`, `3` | Value Statics: Total count 1561 - Distinct count 18 - Null count 47
ft_made INTEGER null, -- Example Values: `2`, `3`, `0`, `1`, `4` | Value Statics: Total count 1561 - Distinct count 13 - Null count 47
steals INTEGER null, -- Example Values: `3`, `0`, `1`, `2`, `5` | Value Statics: Total count 398 - Distinct count 7 - Null count 1210
games_played INTEGER null, -- Example Values: `1` | Value Statics: Total count 1608 - Distinct count 1 - Null count 0
first_name TEXT null, --
d_rebounds INTEGER null, -- Example Values: `2`, `5`, `0`, `1`, `4` | Value Statics: Total count 493 - Distinct count 14 - Null count 1115
last_name TEXT null, --
primary key (playerID, season_id),
turnovers INTEGER null, -- Example Values: `1`, `0`, `3`, `2`, `4` | Value Statics: Total count 493 - Distinct count 9 - Null count 1115
three_made INTEGER null, -- Example Values: `0`, `1`, `3`, `5`, `4` | Value Statics: Total count 566 - Distinct count 7 - Null count 1042
minutes INTEGER null, --
blocks INTEGER null, -- Example Values: `2`, `0`, `1`, `3`, `5` | Value Statics: Total count 398 - Distinct count 6 - Null count 1210
three_attempted INTEGER null, -- Example Values: `0`, `1`, `6`, `7`, `10` | Value Statics: Total count 540 - Distinct count 12 - Null count 1068
o_rebounds INTEGER null, -- Example Values: `1`, `2`, `0`, `3`, `4` | Value Statics: Total count 493 - Distinct count 10 - Null count 1115
);
CREATE TABLE awards_players
(
foreign key (playerID) references players (playerID) on update cascade on delete cascade,
year INTEGER not null, --
pos TEXT null, -- Example Values: `C`, `F`, `G`, `F/G`, `F/C` | Value Statics: Total count 833 - Distinct count 5 - Null count 886
primary key (playerID, year, award),
lgID TEXT null, -- Example Values: `NBA`, `ABA`, `NBL`, `ABL1` | Value Statics: Total count 1719 - Distinct count 4 - Null count 0
award TEXT not null, --
playerID TEXT not null, --
note TEXT null, -- Example Values: `tie` | Value Statics: Total count 37 - Distinct count 1 - Null count 1682
);
CREATE TABLE series_post
(
tmIDLoser TEXT, --
id INTEGER primary key autoincrement,
series TEXT, -- Example Values: `O`, `M`, `N`, `A`, `K` | Value Statics: Total count 775 - Distinct count 11 - Null count 0
tmIDWinner TEXT, --
round TEXT, -- Example Values: `F`, `QF`, `SF`, `DT`, `DF` | Value Statics: Total count 775 - Distinct count 11 - Null count 0
year INTEGER, --
foreign key (tmIDLoser, year) references teams (tmID, year) on update cascade on delete cascade,
foreign key (tmIDWinner, year) references teams (tmID, year) on update cascade on delete cascade,
W INTEGER, -- Example Values: `4`, `2`, `1`, `3`, `0` | Value Statics: Total count 775 - Distinct count 5 - Null count 0
lgIDLoser TEXT, -- Example Values: `NBA`, `ABA` | Value Statics: Total count 775 - Distinct count 2 - Null count 0
lgIDWinner TEXT, -- Example Values: `NBA`, `ABA` | Value Statics: Total count 775 - Distinct count 2 - Null count 0
L INTEGER, -- Example Values: `1`, `0`, `2`, `3`, `4` | Value Statics: Total count 775 - Distinct count 5 - Null count 0
);
CREATE TABLE players
(
nameGiven TEXT null, -- Example Values: `nameGiven`, `Mort`, `Robert`, `Jim`, `Mike` | Value Statics: Total count 10 - Distinct count 9 - Null count 5052
lastseason INTEGER null, -- Example Values: `0`, `1951` | Value Statics: Total count 5047 - Distinct count 2 - Null count 15
hsCountry TEXT null, --
firstName TEXT null, --
hsCity TEXT null, --
firstseason INTEGER null, -- Example Values: `0`, `1951` | Value Statics: Total count 5047 - Distinct count 2 - Null count 15
weight INTEGER null, --
birthCountry TEXT null, --
race TEXT null, -- Example Values: `B`, `W`, `O`, `1`, `r` | Value Statics: Total count 4903 - Distinct count 5 - Null count 159
lastName TEXT null, --
birthDate DATE null, --
collegeOther TEXT null, --
birthState TEXT null, --
useFirst TEXT null, --
pos TEXT null, -- Example Values: `F-C`, `C`, `G`, `G-F`, `C-F` | Value Statics: Total count 4880 - Distinct count 14 - Null count 182
playerID TEXT not null primary key,
college TEXT null, --
highSchool TEXT null, --
hsState TEXT null, --
height REAL null, --
deathDate DATE null, --
nameSuffix TEXT null, -- Example Values: `Jr.`, `III`, `nameSuffix`, `II`, `IV` | Value Statics: Total count 324 - Distinct count 6 - Null count 4738
nameNick TEXT null, --
fullGivenName TEXT null, --
birthCity TEXT null, --
middleName TEXT null, --
);
CREATE TABLE teams
(
d_pts INTEGER null, --
name TEXT null, --
homeLost INTEGER null, --
o_ftm INTEGER null, --
franchID TEXT null, --
tmID TEXT not null, --
awayWon INTEGER null, --
primary key (year, tmID),
o_fgm INTEGER null, --
year INTEGER not null, --
awayLost INTEGER null, --
arena TEXT null, --
confID TEXT null, -- Example Values: `EC`, `WC` | Value Statics: Total count 1064 - Distinct count 2 - Null count 472
games INTEGER null, --
lost INTEGER null, --
divID TEXT null, -- Example Values: `EA`, `WE`, `ED`, `WD`, `SO` | Value Statics: Total count 1498 - Distinct count 13 - Null count 38
lgID TEXT null, -- Example Values: `NBL`, `NBA`, `PBLA`, `NPBL`, `ABL1` | Value Statics: Total count 1536 - Distinct count 6 - Null count 0
homeWon INTEGER null, --
confRank INTEGER null, -- Example Values: `0`, `4`, `3`, `5`, `7` | Value Statics: Total count 1536 - Distinct count 16 - Null count 0
o_pts INTEGER null, --
`rank` INTEGER null, -- Example Values: `1`, `2`, `4`, `5`, `6` | Value Statics: Total count 1536 - Distinct count 10 - Null count 0
playoff TEXT null, -- Example Values: `CF`, `WC`, `LC`, `CS`, `F` | Value Statics: Total count 901 - Distinct count 15 - Null count 635
won INTEGER null, --
);
CREATE TABLE coaches
(
primary key (coachID, year, tmID, stint),
lgID TEXT null, -- Example Values: `NBA`, `ABA`, `ABL1`, `PBLA`, `NPBL` | Value Statics: Total count 1689 - Distinct count 5 - Null count 0
post_losses INTEGER null, -- Example Values: `3`, `9`, `7`, `8`, `0` | Value Statics: Total count 1649 - Distinct count 12 - Null count 40
year INTEGER not null, --
won INTEGER null, --
foreign key (tmID, year) references teams (tmID, year) on update cascade on delete cascade,
post_wins INTEGER null, -- Example Values: `0`, `12`, `9`, `13`, `1` | Value Statics: Total count 1649 - Distinct count 17 - Null count 40
coachID TEXT not null, --
tmID TEXT not null, --
lost INTEGER null, --
stint INTEGER not null, -- Example Values: `2`, `1`, `4`, `5`, `3` | Value Statics: Total count 1689 - Distinct count 5 - Null count 0
); |
legislator | Which current legislator has served for more terms, Sherrod Brown or Maria Cantwell? | if sum(official_full_name = 'Maria Cantwell') > sum(official_full_name = 'Sherrod Brown') then Maria Cantwell has served for more term than Sherrod Brown; if sum(official_full_name = 'Sherrod Brown') > sum(official_full_name = 'Maria Cantwell'), then Sherrod Brown has served for more terms than Maria Cantwell; | SELECT CASE WHEN SUM(CASE WHEN T1.official_full_name = 'Maria Cantwell' THEN 1 ELSE 0 END) > SUM(CASE WHEN T1.official_full_name = 'Sherrod Brown' THEN 1 ELSE 0 END) THEN 'Maria Cantwell' ELSE 'Sherrod Brown' END FROM current AS T1 INNER JOIN `current-terms` AS T2 ON T1.bioguide_id = T2.bioguide | CREATE TABLE current
(
gender_bio TEXT, -- Example Values: `M`, `F` | Value Statics: Total count 541 - Distinct count 2 - Null count 0
suffix_name TEXT, -- Example Values: `Jr.`, `III`, `II` | Value Statics: Total count 20 - Distinct count 3 - Null count 521
house_history_id REAL, --
birthday_bio DATE, --
nickname_name TEXT, --
religion_bio TEXT, --
google_entity_id_id TEXT, --
govtrack_id INTEGER, --
cspan_id REAL, --
primary key (bioguide_id, cspan_id),
wikipedia_id TEXT, --
maplight_id REAL, --
last_name TEXT, --
icpsr_id REAL, --
fec_id TEXT, --
votesmart_id REAL, --
first_name TEXT, --
lis_id TEXT, --
bioguide_id TEXT, --
wikidata_id TEXT, --
middle_name TEXT, --
ballotpedia_id TEXT, --
opensecrets_id TEXT, --
official_full_name TEXT, --
thomas_id INTEGER, --
);
CREATE TABLE historical
(
fec_id TEXT, --
suffix_name TEXT, -- Example Values: `Jr.`, `Sr.`, `II`, `III`, `IV` | Value Statics: Total count 418 - Distinct count 5 - Null count 11446
govtrack_id INTEGER, --
house_history_id REAL, --
opensecrets_id TEXT, --
votesmart_id TEXT, --
bioguide_id TEXT primary key,
nickname_name TEXT, --
official_full_name TEXT, --
house_history_alternate_id TEXT, -- Example Values: `13283.0` | Value Statics: Total count 1 - Distinct count 1 - Null count 11863
gender_bio TEXT, -- Example Values: `M`, `F` | Value Statics: Total count 11864 - Distinct count 2 - Null count 0
bioguide_previous_id TEXT, -- Example Values: `['F000246']`, `['L000266']`, `['W000790']` | Value Statics: Total count 3 - Distinct count 3 - Null count 11861
icpsr_id REAL, --
wikipedia_id TEXT, --
birthday_bio TEXT, --
religion_bio TEXT, --
lis_id TEXT, --
middle_name TEXT, --
cspan_id TEXT, --
last_name TEXT, --
first_name TEXT, --
wikidata_id TEXT, --
thomas_id TEXT, --
ballotpedia_id TEXT, --
maplight_id TEXT, --
google_entity_id_id TEXT, --
);
CREATE TABLE historical-terms
(
bioguide TEXT primary key,
middle TEXT, --
title TEXT, -- Example Values: `Majority Leader`, `Speaker` | Value Statics: Total count 3 - Distinct count 2 - Null count 11861
party TEXT, --
type TEXT, -- Example Values: `sen`, `rep` | Value Statics: Total count 11858 - Distinct count 2 - Null count 6
phone TEXT, --
rss_url TEXT, -- Example Values: `http://radel.house.gov/news/rss.aspx`, `http://www.begich.senate.gov/public/?a=rss.feed`, `http://www.hagan.senate.gov/rss`, `http://negretemcleod.house.gov/rss.xml`, `http://garcia.house.gov/rss.xml` | Value Statics: Total count 12 - Distinct count 12 - Null count 11852
name TEXT, --
start TEXT, --
address TEXT, --
party_affiliations TEXT, -- Example Values: `{'start': '2009-01-06', 'end': '2009-12-22', 'party': 'Democrat'}`, `{'start': '2003-01-07', 'end': '2004-08-09', 'party': 'Democrat'}` | Value Statics: Total count 2 - Distinct count 2 - Null count 11862
relation TEXT, --
state_rank TEXT, -- Example Values: `junior`, `senior` | Value Statics: Total count 7 - Distinct count 2 - Null count 11857
last TEXT, -- Example Values: `Levy`, `Lambert`, `Bono` | Value Statics: Total count 3 - Distinct count 3 - Null count 11861
url TEXT, --
fax TEXT, --
contact_form TEXT, --
office TEXT, --
state TEXT, --
foreign key (bioguide) references historical(bioguide_id),
class REAL, -- Example Values: `2.0`, `1.0`, `3.0` | Value Statics: Total count 1256 - Distinct count 3 - Null count 10608
end TEXT, --
district REAL, --
chamber TEXT, -- Example Values: `house`, `senate` | Value Statics: Total count 3 - Distinct count 2 - Null count 11861
);
CREATE TABLE current-terms
(
foreign key (bioguide) references current(bioguide_id),
phone TEXT, --
party_affiliations TEXT, -- Example Values: `{'start': '2009-01-06', 'end': '2009-02-23', 'party': 'Independent'}`, `{'start': '1993-01-05', 'end': '1994-11-09', 'party': 'Democrat'}` | Value Statics: Total count 2 - Distinct count 2 - Null count 3076
title TEXT, -- Example Values: `Minority Whip`, `Majority Whip`, `Minority Leader`, `Majority Leader`, `Speaker` | Value Statics: Total count 28 - Distinct count 5 - Null count 3050
district REAL, --
bioguide TEXT, --
office TEXT, --
class REAL, -- Example Values: `1.0`, `2.0`, `3.0` | Value Statics: Total count 244 - Distinct count 3 - Null count 2834
type TEXT, -- Example Values: `rep`, `sen` | Value Statics: Total count 3014 - Distinct count 2 - Null count 64
start TEXT, --
address TEXT, --
rss_url TEXT, --
url TEXT, --
primary key (bioguide, end),
fax TEXT, --
chamber TEXT, -- Example Values: `senate`, `house` | Value Statics: Total count 28 - Distinct count 2 - Null count 3050
end TEXT, --
caucus TEXT, -- Example Values: `Democrat` | Value Statics: Total count 3 - Distinct count 1 - Null count 3075
state TEXT, --
last TEXT, -- Example Values: `Menendez` | Value Statics: Total count 1 - Distinct count 1 - Null count 3077
relation TEXT, -- Example Values: `son`, `nephew`, `cousin`, `daughter`, `grandson` | Value Statics: Total count 35 - Distinct count 13 - Null count 3043
state_rank TEXT, -- Example Values: `senior`, `junior` | Value Statics: Total count 147 - Distinct count 2 - Null count 2931
name TEXT, --
contact_form TEXT, --
party TEXT, -- Example Values: `Democrat`, `Republican`, `Independent` | Value Statics: Total count 3014 - Distinct count 3 - Null count 64
);
CREATE TABLE social-media
(
foreign key (bioguide) references current(bioguide_id),
instagram TEXT, --
thomas INTEGER, --
youtube TEXT, --
twitter TEXT, --
facebook TEXT, --
youtube_id TEXT, --
twitter_id REAL, --
facebook_id REAL, --
govtrack REAL, --
bioguide TEXT primary key,
instagram_id REAL, --
); |
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' | CREATE TABLE current
(
gender_bio TEXT, -- Example Values: `M`, `F` | Value Statics: Total count 541 - Distinct count 2 - Null count 0
suffix_name TEXT, -- Example Values: `Jr.`, `III`, `II` | Value Statics: Total count 20 - Distinct count 3 - Null count 521
house_history_id REAL, --
birthday_bio DATE, --
nickname_name TEXT, --
religion_bio TEXT, --
google_entity_id_id TEXT, --
govtrack_id INTEGER, --
cspan_id REAL, --
primary key (bioguide_id, cspan_id),
wikipedia_id TEXT, --
maplight_id REAL, --
last_name TEXT, --
icpsr_id REAL, --
fec_id TEXT, --
votesmart_id REAL, --
first_name TEXT, --
lis_id TEXT, --
bioguide_id TEXT, --
wikidata_id TEXT, --
middle_name TEXT, --
ballotpedia_id TEXT, --
opensecrets_id TEXT, --
official_full_name TEXT, --
thomas_id INTEGER, --
);
CREATE TABLE historical
(
fec_id TEXT, --
suffix_name TEXT, -- Example Values: `Jr.`, `Sr.`, `II`, `III`, `IV` | Value Statics: Total count 418 - Distinct count 5 - Null count 11446
govtrack_id INTEGER, --
house_history_id REAL, --
opensecrets_id TEXT, --
votesmart_id TEXT, --
bioguide_id TEXT primary key,
nickname_name TEXT, --
official_full_name TEXT, --
house_history_alternate_id TEXT, -- Example Values: `13283.0` | Value Statics: Total count 1 - Distinct count 1 - Null count 11863
gender_bio TEXT, -- Example Values: `M`, `F` | Value Statics: Total count 11864 - Distinct count 2 - Null count 0
bioguide_previous_id TEXT, -- Example Values: `['F000246']`, `['L000266']`, `['W000790']` | Value Statics: Total count 3 - Distinct count 3 - Null count 11861
icpsr_id REAL, --
wikipedia_id TEXT, --
birthday_bio TEXT, --
religion_bio TEXT, --
lis_id TEXT, --
middle_name TEXT, --
cspan_id TEXT, --
last_name TEXT, --
first_name TEXT, --
wikidata_id TEXT, --
thomas_id TEXT, --
ballotpedia_id TEXT, --
maplight_id TEXT, --
google_entity_id_id TEXT, --
);
CREATE TABLE historical-terms
(
bioguide TEXT primary key,
middle TEXT, --
title TEXT, -- Example Values: `Majority Leader`, `Speaker` | Value Statics: Total count 3 - Distinct count 2 - Null count 11861
party TEXT, --
type TEXT, -- Example Values: `sen`, `rep` | Value Statics: Total count 11858 - Distinct count 2 - Null count 6
phone TEXT, --
rss_url TEXT, -- Example Values: `http://radel.house.gov/news/rss.aspx`, `http://www.begich.senate.gov/public/?a=rss.feed`, `http://www.hagan.senate.gov/rss`, `http://negretemcleod.house.gov/rss.xml`, `http://garcia.house.gov/rss.xml` | Value Statics: Total count 12 - Distinct count 12 - Null count 11852
name TEXT, --
start TEXT, --
address TEXT, --
party_affiliations TEXT, -- Example Values: `{'start': '2009-01-06', 'end': '2009-12-22', 'party': 'Democrat'}`, `{'start': '2003-01-07', 'end': '2004-08-09', 'party': 'Democrat'}` | Value Statics: Total count 2 - Distinct count 2 - Null count 11862
relation TEXT, --
state_rank TEXT, -- Example Values: `junior`, `senior` | Value Statics: Total count 7 - Distinct count 2 - Null count 11857
last TEXT, -- Example Values: `Levy`, `Lambert`, `Bono` | Value Statics: Total count 3 - Distinct count 3 - Null count 11861
url TEXT, --
fax TEXT, --
contact_form TEXT, --
office TEXT, --
state TEXT, --
foreign key (bioguide) references historical(bioguide_id),
class REAL, -- Example Values: `2.0`, `1.0`, `3.0` | Value Statics: Total count 1256 - Distinct count 3 - Null count 10608
end TEXT, --
district REAL, --
chamber TEXT, -- Example Values: `house`, `senate` | Value Statics: Total count 3 - Distinct count 2 - Null count 11861
);
CREATE TABLE current-terms
(
foreign key (bioguide) references current(bioguide_id),
phone TEXT, --
party_affiliations TEXT, -- Example Values: `{'start': '2009-01-06', 'end': '2009-02-23', 'party': 'Independent'}`, `{'start': '1993-01-05', 'end': '1994-11-09', 'party': 'Democrat'}` | Value Statics: Total count 2 - Distinct count 2 - Null count 3076
title TEXT, -- Example Values: `Minority Whip`, `Majority Whip`, `Minority Leader`, `Majority Leader`, `Speaker` | Value Statics: Total count 28 - Distinct count 5 - Null count 3050
district REAL, --
bioguide TEXT, --
office TEXT, --
class REAL, -- Example Values: `1.0`, `2.0`, `3.0` | Value Statics: Total count 244 - Distinct count 3 - Null count 2834
type TEXT, -- Example Values: `rep`, `sen` | Value Statics: Total count 3014 - Distinct count 2 - Null count 64
start TEXT, --
address TEXT, --
rss_url TEXT, --
url TEXT, --
primary key (bioguide, end),
fax TEXT, --
chamber TEXT, -- Example Values: `senate`, `house` | Value Statics: Total count 28 - Distinct count 2 - Null count 3050
end TEXT, --
caucus TEXT, -- Example Values: `Democrat` | Value Statics: Total count 3 - Distinct count 1 - Null count 3075
state TEXT, --
last TEXT, -- Example Values: `Menendez` | Value Statics: Total count 1 - Distinct count 1 - Null count 3077
relation TEXT, -- Example Values: `son`, `nephew`, `cousin`, `daughter`, `grandson` | Value Statics: Total count 35 - Distinct count 13 - Null count 3043
state_rank TEXT, -- Example Values: `senior`, `junior` | Value Statics: Total count 147 - Distinct count 2 - Null count 2931
name TEXT, --
contact_form TEXT, --
party TEXT, -- Example Values: `Democrat`, `Republican`, `Independent` | Value Statics: Total count 3014 - Distinct count 3 - Null count 64
);
CREATE TABLE social-media
(
foreign key (bioguide) references current(bioguide_id),
instagram TEXT, --
thomas INTEGER, --
youtube TEXT, --
twitter TEXT, --
facebook TEXT, --
youtube_id TEXT, --
twitter_id REAL, --
facebook_id REAL, --
govtrack REAL, --
bioguide TEXT primary key,
instagram_id REAL, --
); |
shakespeare | How many paragraphs are there in Act 1, Scene 1 in Twelfth Night? | Twelfth Night refers to Title = 'Twelfth Night' | SELECT SUM(T3.ParagraphNum) FROM works AS T1 INNER JOIN chapters AS T2 ON T1.id = T2.work_id INNER JOIN paragraphs AS T3 ON T2.id = T3.chapter_id WHERE T2.Act = 1 AND T2.Scene = 1 AND T1.Title = 'Twelfth Night' | CREATE TABLE characters
(
CharName TEXT not null, --
Abbrev TEXT not null, --
Description TEXT not null, --
id INTEGER primary key autoincrement,
);
CREATE TABLE paragraphs
(
chapter_id INTEGER default 0 not null references chapters, --
character_id INTEGER not null references characters, --
ParagraphNum INTEGER not null, --
PlainText TEXT not null, --
id INTEGER primary key autoincrement,
);
CREATE TABLE works
(
GenreType TEXT not null, -- Example Values: `Comedy`, `Tragedy`, `History`, `Poem`, `Sonnet` | Value Statics: Total count 43 - Distinct count 5 - Null count 0
Title TEXT not null, --
Date INTEGER not null, --
id INTEGER primary key autoincrement,
LongTitle TEXT not null, --
);
CREATE TABLE chapters
(
work_id INTEGER not null references works, --
Act INTEGER not null, -- Example Values: `1`, `2`, `3`, `4`, `5` | Value Statics: Total count 945 - Distinct count 6 - Null count 0
Description TEXT not null, --
id INTEGER primary key autoincrement,
Scene INTEGER not null, --
); |
shakespeare | How many more scenes are there in Act 1 than in Act 5 in Twelfth Night? | in Twelfth Night refers to Title = 'Twelfth Night'; How many more scenes = subtract(sum(Act = 1), sum(Act = 5)) | SELECT SUM(IIF(T2.Act = 1, 1, 0)) - SUM(IIF(T2.Act = 5, 1, 0)) AS more FROM works AS T1 INNER JOIN chapters AS T2 ON T1.id = T2.work_id WHERE T1.Title = 'Twelfth Night' | CREATE TABLE characters
(
CharName TEXT not null, --
Abbrev TEXT not null, --
Description TEXT not null, --
id INTEGER primary key autoincrement,
);
CREATE TABLE paragraphs
(
chapter_id INTEGER default 0 not null references chapters, --
character_id INTEGER not null references characters, --
ParagraphNum INTEGER not null, --
PlainText TEXT not null, --
id INTEGER primary key autoincrement,
);
CREATE TABLE works
(
GenreType TEXT not null, -- Example Values: `Comedy`, `Tragedy`, `History`, `Poem`, `Sonnet` | Value Statics: Total count 43 - Distinct count 5 - Null count 0
Title TEXT not null, --
Date INTEGER not null, --
id INTEGER primary key autoincrement,
LongTitle TEXT not null, --
);
CREATE TABLE chapters
(
work_id INTEGER not null references works, --
Act INTEGER not null, -- Example Values: `1`, `2`, `3`, `4`, `5` | Value Statics: Total count 945 - Distinct count 6 - Null count 0
Description TEXT not null, --
id INTEGER primary key autoincrement,
Scene INTEGER not null, --
); |
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 | CREATE TABLE current
(
gender_bio TEXT, -- Example Values: `M`, `F` | Value Statics: Total count 541 - Distinct count 2 - Null count 0
suffix_name TEXT, -- Example Values: `Jr.`, `III`, `II` | Value Statics: Total count 20 - Distinct count 3 - Null count 521
house_history_id REAL, --
birthday_bio DATE, --
nickname_name TEXT, --
religion_bio TEXT, --
google_entity_id_id TEXT, --
govtrack_id INTEGER, --
cspan_id REAL, --
primary key (bioguide_id, cspan_id),
wikipedia_id TEXT, --
maplight_id REAL, --
last_name TEXT, --
icpsr_id REAL, --
fec_id TEXT, --
votesmart_id REAL, --
first_name TEXT, --
lis_id TEXT, --
bioguide_id TEXT, --
wikidata_id TEXT, --
middle_name TEXT, --
ballotpedia_id TEXT, --
opensecrets_id TEXT, --
official_full_name TEXT, --
thomas_id INTEGER, --
);
CREATE TABLE historical
(
fec_id TEXT, --
suffix_name TEXT, -- Example Values: `Jr.`, `Sr.`, `II`, `III`, `IV` | Value Statics: Total count 418 - Distinct count 5 - Null count 11446
govtrack_id INTEGER, --
house_history_id REAL, --
opensecrets_id TEXT, --
votesmart_id TEXT, --
bioguide_id TEXT primary key,
nickname_name TEXT, --
official_full_name TEXT, --
house_history_alternate_id TEXT, -- Example Values: `13283.0` | Value Statics: Total count 1 - Distinct count 1 - Null count 11863
gender_bio TEXT, -- Example Values: `M`, `F` | Value Statics: Total count 11864 - Distinct count 2 - Null count 0
bioguide_previous_id TEXT, -- Example Values: `['F000246']`, `['L000266']`, `['W000790']` | Value Statics: Total count 3 - Distinct count 3 - Null count 11861
icpsr_id REAL, --
wikipedia_id TEXT, --
birthday_bio TEXT, --
religion_bio TEXT, --
lis_id TEXT, --
middle_name TEXT, --
cspan_id TEXT, --
last_name TEXT, --
first_name TEXT, --
wikidata_id TEXT, --
thomas_id TEXT, --
ballotpedia_id TEXT, --
maplight_id TEXT, --
google_entity_id_id TEXT, --
);
CREATE TABLE historical-terms
(
bioguide TEXT primary key,
middle TEXT, --
title TEXT, -- Example Values: `Majority Leader`, `Speaker` | Value Statics: Total count 3 - Distinct count 2 - Null count 11861
party TEXT, --
type TEXT, -- Example Values: `sen`, `rep` | Value Statics: Total count 11858 - Distinct count 2 - Null count 6
phone TEXT, --
rss_url TEXT, -- Example Values: `http://radel.house.gov/news/rss.aspx`, `http://www.begich.senate.gov/public/?a=rss.feed`, `http://www.hagan.senate.gov/rss`, `http://negretemcleod.house.gov/rss.xml`, `http://garcia.house.gov/rss.xml` | Value Statics: Total count 12 - Distinct count 12 - Null count 11852
name TEXT, --
start TEXT, --
address TEXT, --
party_affiliations TEXT, -- Example Values: `{'start': '2009-01-06', 'end': '2009-12-22', 'party': 'Democrat'}`, `{'start': '2003-01-07', 'end': '2004-08-09', 'party': 'Democrat'}` | Value Statics: Total count 2 - Distinct count 2 - Null count 11862
relation TEXT, --
state_rank TEXT, -- Example Values: `junior`, `senior` | Value Statics: Total count 7 - Distinct count 2 - Null count 11857
last TEXT, -- Example Values: `Levy`, `Lambert`, `Bono` | Value Statics: Total count 3 - Distinct count 3 - Null count 11861
url TEXT, --
fax TEXT, --
contact_form TEXT, --
office TEXT, --
state TEXT, --
foreign key (bioguide) references historical(bioguide_id),
class REAL, -- Example Values: `2.0`, `1.0`, `3.0` | Value Statics: Total count 1256 - Distinct count 3 - Null count 10608
end TEXT, --
district REAL, --
chamber TEXT, -- Example Values: `house`, `senate` | Value Statics: Total count 3 - Distinct count 2 - Null count 11861
);
CREATE TABLE current-terms
(
foreign key (bioguide) references current(bioguide_id),
phone TEXT, --
party_affiliations TEXT, -- Example Values: `{'start': '2009-01-06', 'end': '2009-02-23', 'party': 'Independent'}`, `{'start': '1993-01-05', 'end': '1994-11-09', 'party': 'Democrat'}` | Value Statics: Total count 2 - Distinct count 2 - Null count 3076
title TEXT, -- Example Values: `Minority Whip`, `Majority Whip`, `Minority Leader`, `Majority Leader`, `Speaker` | Value Statics: Total count 28 - Distinct count 5 - Null count 3050
district REAL, --
bioguide TEXT, --
office TEXT, --
class REAL, -- Example Values: `1.0`, `2.0`, `3.0` | Value Statics: Total count 244 - Distinct count 3 - Null count 2834
type TEXT, -- Example Values: `rep`, `sen` | Value Statics: Total count 3014 - Distinct count 2 - Null count 64
start TEXT, --
address TEXT, --
rss_url TEXT, --
url TEXT, --
primary key (bioguide, end),
fax TEXT, --
chamber TEXT, -- Example Values: `senate`, `house` | Value Statics: Total count 28 - Distinct count 2 - Null count 3050
end TEXT, --
caucus TEXT, -- Example Values: `Democrat` | Value Statics: Total count 3 - Distinct count 1 - Null count 3075
state TEXT, --
last TEXT, -- Example Values: `Menendez` | Value Statics: Total count 1 - Distinct count 1 - Null count 3077
relation TEXT, -- Example Values: `son`, `nephew`, `cousin`, `daughter`, `grandson` | Value Statics: Total count 35 - Distinct count 13 - Null count 3043
state_rank TEXT, -- Example Values: `senior`, `junior` | Value Statics: Total count 147 - Distinct count 2 - Null count 2931
name TEXT, --
contact_form TEXT, --
party TEXT, -- Example Values: `Democrat`, `Republican`, `Independent` | Value Statics: Total count 3014 - Distinct count 3 - Null count 64
);
CREATE TABLE social-media
(
foreign key (bioguide) references current(bioguide_id),
instagram TEXT, --
thomas INTEGER, --
youtube TEXT, --
twitter TEXT, --
facebook TEXT, --
youtube_id TEXT, --
twitter_id REAL, --
facebook_id REAL, --
govtrack REAL, --
bioguide TEXT primary key,
instagram_id REAL, --
); |
shakespeare | How many paragraphs contain the character Lord Abergavenny? | Lord Abergavenny refers to CharName = 'Lord Abergavenny' | SELECT SUM(T1.ParagraphNum) FROM paragraphs AS T1 INNER JOIN characters AS T2 ON T1.character_id = T2.id WHERE T2.CharName = 'Lord Abergavenny' | CREATE TABLE characters
(
CharName TEXT not null, --
Abbrev TEXT not null, --
Description TEXT not null, --
id INTEGER primary key autoincrement,
);
CREATE TABLE paragraphs
(
chapter_id INTEGER default 0 not null references chapters, --
character_id INTEGER not null references characters, --
ParagraphNum INTEGER not null, --
PlainText TEXT not null, --
id INTEGER primary key autoincrement,
);
CREATE TABLE works
(
GenreType TEXT not null, -- Example Values: `Comedy`, `Tragedy`, `History`, `Poem`, `Sonnet` | Value Statics: Total count 43 - Distinct count 5 - Null count 0
Title TEXT not null, --
Date INTEGER not null, --
id INTEGER primary key autoincrement,
LongTitle TEXT not null, --
);
CREATE TABLE chapters
(
work_id INTEGER not null references works, --
Act INTEGER not null, -- Example Values: `1`, `2`, `3`, `4`, `5` | Value Statics: Total count 945 - Distinct count 6 - Null count 0
Description TEXT not null, --
id INTEGER primary key autoincrement,
Scene INTEGER not null, --
); |
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' | CREATE TABLE current
(
gender_bio TEXT, -- Example Values: `M`, `F` | Value Statics: Total count 541 - Distinct count 2 - Null count 0
suffix_name TEXT, -- Example Values: `Jr.`, `III`, `II` | Value Statics: Total count 20 - Distinct count 3 - Null count 521
house_history_id REAL, --
birthday_bio DATE, --
nickname_name TEXT, --
religion_bio TEXT, --
google_entity_id_id TEXT, --
govtrack_id INTEGER, --
cspan_id REAL, --
primary key (bioguide_id, cspan_id),
wikipedia_id TEXT, --
maplight_id REAL, --
last_name TEXT, --
icpsr_id REAL, --
fec_id TEXT, --
votesmart_id REAL, --
first_name TEXT, --
lis_id TEXT, --
bioguide_id TEXT, --
wikidata_id TEXT, --
middle_name TEXT, --
ballotpedia_id TEXT, --
opensecrets_id TEXT, --
official_full_name TEXT, --
thomas_id INTEGER, --
);
CREATE TABLE historical
(
fec_id TEXT, --
suffix_name TEXT, -- Example Values: `Jr.`, `Sr.`, `II`, `III`, `IV` | Value Statics: Total count 418 - Distinct count 5 - Null count 11446
govtrack_id INTEGER, --
house_history_id REAL, --
opensecrets_id TEXT, --
votesmart_id TEXT, --
bioguide_id TEXT primary key,
nickname_name TEXT, --
official_full_name TEXT, --
house_history_alternate_id TEXT, -- Example Values: `13283.0` | Value Statics: Total count 1 - Distinct count 1 - Null count 11863
gender_bio TEXT, -- Example Values: `M`, `F` | Value Statics: Total count 11864 - Distinct count 2 - Null count 0
bioguide_previous_id TEXT, -- Example Values: `['F000246']`, `['L000266']`, `['W000790']` | Value Statics: Total count 3 - Distinct count 3 - Null count 11861
icpsr_id REAL, --
wikipedia_id TEXT, --
birthday_bio TEXT, --
religion_bio TEXT, --
lis_id TEXT, --
middle_name TEXT, --
cspan_id TEXT, --
last_name TEXT, --
first_name TEXT, --
wikidata_id TEXT, --
thomas_id TEXT, --
ballotpedia_id TEXT, --
maplight_id TEXT, --
google_entity_id_id TEXT, --
);
CREATE TABLE historical-terms
(
bioguide TEXT primary key,
middle TEXT, --
title TEXT, -- Example Values: `Majority Leader`, `Speaker` | Value Statics: Total count 3 - Distinct count 2 - Null count 11861
party TEXT, --
type TEXT, -- Example Values: `sen`, `rep` | Value Statics: Total count 11858 - Distinct count 2 - Null count 6
phone TEXT, --
rss_url TEXT, -- Example Values: `http://radel.house.gov/news/rss.aspx`, `http://www.begich.senate.gov/public/?a=rss.feed`, `http://www.hagan.senate.gov/rss`, `http://negretemcleod.house.gov/rss.xml`, `http://garcia.house.gov/rss.xml` | Value Statics: Total count 12 - Distinct count 12 - Null count 11852
name TEXT, --
start TEXT, --
address TEXT, --
party_affiliations TEXT, -- Example Values: `{'start': '2009-01-06', 'end': '2009-12-22', 'party': 'Democrat'}`, `{'start': '2003-01-07', 'end': '2004-08-09', 'party': 'Democrat'}` | Value Statics: Total count 2 - Distinct count 2 - Null count 11862
relation TEXT, --
state_rank TEXT, -- Example Values: `junior`, `senior` | Value Statics: Total count 7 - Distinct count 2 - Null count 11857
last TEXT, -- Example Values: `Levy`, `Lambert`, `Bono` | Value Statics: Total count 3 - Distinct count 3 - Null count 11861
url TEXT, --
fax TEXT, --
contact_form TEXT, --
office TEXT, --
state TEXT, --
foreign key (bioguide) references historical(bioguide_id),
class REAL, -- Example Values: `2.0`, `1.0`, `3.0` | Value Statics: Total count 1256 - Distinct count 3 - Null count 10608
end TEXT, --
district REAL, --
chamber TEXT, -- Example Values: `house`, `senate` | Value Statics: Total count 3 - Distinct count 2 - Null count 11861
);
CREATE TABLE current-terms
(
foreign key (bioguide) references current(bioguide_id),
phone TEXT, --
party_affiliations TEXT, -- Example Values: `{'start': '2009-01-06', 'end': '2009-02-23', 'party': 'Independent'}`, `{'start': '1993-01-05', 'end': '1994-11-09', 'party': 'Democrat'}` | Value Statics: Total count 2 - Distinct count 2 - Null count 3076
title TEXT, -- Example Values: `Minority Whip`, `Majority Whip`, `Minority Leader`, `Majority Leader`, `Speaker` | Value Statics: Total count 28 - Distinct count 5 - Null count 3050
district REAL, --
bioguide TEXT, --
office TEXT, --
class REAL, -- Example Values: `1.0`, `2.0`, `3.0` | Value Statics: Total count 244 - Distinct count 3 - Null count 2834
type TEXT, -- Example Values: `rep`, `sen` | Value Statics: Total count 3014 - Distinct count 2 - Null count 64
start TEXT, --
address TEXT, --
rss_url TEXT, --
url TEXT, --
primary key (bioguide, end),
fax TEXT, --
chamber TEXT, -- Example Values: `senate`, `house` | Value Statics: Total count 28 - Distinct count 2 - Null count 3050
end TEXT, --
caucus TEXT, -- Example Values: `Democrat` | Value Statics: Total count 3 - Distinct count 1 - Null count 3075
state TEXT, --
last TEXT, -- Example Values: `Menendez` | Value Statics: Total count 1 - Distinct count 1 - Null count 3077
relation TEXT, -- Example Values: `son`, `nephew`, `cousin`, `daughter`, `grandson` | Value Statics: Total count 35 - Distinct count 13 - Null count 3043
state_rank TEXT, -- Example Values: `senior`, `junior` | Value Statics: Total count 147 - Distinct count 2 - Null count 2931
name TEXT, --
contact_form TEXT, --
party TEXT, -- Example Values: `Democrat`, `Republican`, `Independent` | Value Statics: Total count 3014 - Distinct count 3 - Null count 64
);
CREATE TABLE social-media
(
foreign key (bioguide) references current(bioguide_id),
instagram TEXT, --
thomas INTEGER, --
youtube TEXT, --
twitter TEXT, --
facebook TEXT, --
youtube_id TEXT, --
twitter_id REAL, --
facebook_id REAL, --
govtrack REAL, --
bioguide TEXT primary key,
instagram_id REAL, --
); |
shakespeare | Please list the character names of all the characters from the work Twelfth Night. | character names refers to CharName; Twelfth Night refers to Title = 'Twelfth Night' | SELECT DISTINCT T4.CharName FROM works AS T1 INNER JOIN chapters AS T2 ON T1.id = T2.work_id INNER JOIN paragraphs AS T3 ON T2.id = T3.chapter_id INNER JOIN characters AS T4 ON T3.character_id = T4.id WHERE T1.Title = 'Twelfth Night' | CREATE TABLE characters
(
CharName TEXT not null, --
Abbrev TEXT not null, --
Description TEXT not null, --
id INTEGER primary key autoincrement,
);
CREATE TABLE paragraphs
(
chapter_id INTEGER default 0 not null references chapters, --
character_id INTEGER not null references characters, --
ParagraphNum INTEGER not null, --
PlainText TEXT not null, --
id INTEGER primary key autoincrement,
);
CREATE TABLE works
(
GenreType TEXT not null, -- Example Values: `Comedy`, `Tragedy`, `History`, `Poem`, `Sonnet` | Value Statics: Total count 43 - Distinct count 5 - Null count 0
Title TEXT not null, --
Date INTEGER not null, --
id INTEGER primary key autoincrement,
LongTitle TEXT not null, --
);
CREATE TABLE chapters
(
work_id INTEGER not null references works, --
Act INTEGER not null, -- Example Values: `1`, `2`, `3`, `4`, `5` | Value Statics: Total count 945 - Distinct count 6 - Null count 0
Description TEXT not null, --
id INTEGER primary key autoincrement,
Scene INTEGER not null, --
); |
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 | CREATE TABLE current
(
gender_bio TEXT, -- Example Values: `M`, `F` | Value Statics: Total count 541 - Distinct count 2 - Null count 0
suffix_name TEXT, -- Example Values: `Jr.`, `III`, `II` | Value Statics: Total count 20 - Distinct count 3 - Null count 521
house_history_id REAL, --
birthday_bio DATE, --
nickname_name TEXT, --
religion_bio TEXT, --
google_entity_id_id TEXT, --
govtrack_id INTEGER, --
cspan_id REAL, --
primary key (bioguide_id, cspan_id),
wikipedia_id TEXT, --
maplight_id REAL, --
last_name TEXT, --
icpsr_id REAL, --
fec_id TEXT, --
votesmart_id REAL, --
first_name TEXT, --
lis_id TEXT, --
bioguide_id TEXT, --
wikidata_id TEXT, --
middle_name TEXT, --
ballotpedia_id TEXT, --
opensecrets_id TEXT, --
official_full_name TEXT, --
thomas_id INTEGER, --
);
CREATE TABLE historical
(
fec_id TEXT, --
suffix_name TEXT, -- Example Values: `Jr.`, `Sr.`, `II`, `III`, `IV` | Value Statics: Total count 418 - Distinct count 5 - Null count 11446
govtrack_id INTEGER, --
house_history_id REAL, --
opensecrets_id TEXT, --
votesmart_id TEXT, --
bioguide_id TEXT primary key,
nickname_name TEXT, --
official_full_name TEXT, --
house_history_alternate_id TEXT, -- Example Values: `13283.0` | Value Statics: Total count 1 - Distinct count 1 - Null count 11863
gender_bio TEXT, -- Example Values: `M`, `F` | Value Statics: Total count 11864 - Distinct count 2 - Null count 0
bioguide_previous_id TEXT, -- Example Values: `['F000246']`, `['L000266']`, `['W000790']` | Value Statics: Total count 3 - Distinct count 3 - Null count 11861
icpsr_id REAL, --
wikipedia_id TEXT, --
birthday_bio TEXT, --
religion_bio TEXT, --
lis_id TEXT, --
middle_name TEXT, --
cspan_id TEXT, --
last_name TEXT, --
first_name TEXT, --
wikidata_id TEXT, --
thomas_id TEXT, --
ballotpedia_id TEXT, --
maplight_id TEXT, --
google_entity_id_id TEXT, --
);
CREATE TABLE historical-terms
(
bioguide TEXT primary key,
middle TEXT, --
title TEXT, -- Example Values: `Majority Leader`, `Speaker` | Value Statics: Total count 3 - Distinct count 2 - Null count 11861
party TEXT, --
type TEXT, -- Example Values: `sen`, `rep` | Value Statics: Total count 11858 - Distinct count 2 - Null count 6
phone TEXT, --
rss_url TEXT, -- Example Values: `http://radel.house.gov/news/rss.aspx`, `http://www.begich.senate.gov/public/?a=rss.feed`, `http://www.hagan.senate.gov/rss`, `http://negretemcleod.house.gov/rss.xml`, `http://garcia.house.gov/rss.xml` | Value Statics: Total count 12 - Distinct count 12 - Null count 11852
name TEXT, --
start TEXT, --
address TEXT, --
party_affiliations TEXT, -- Example Values: `{'start': '2009-01-06', 'end': '2009-12-22', 'party': 'Democrat'}`, `{'start': '2003-01-07', 'end': '2004-08-09', 'party': 'Democrat'}` | Value Statics: Total count 2 - Distinct count 2 - Null count 11862
relation TEXT, --
state_rank TEXT, -- Example Values: `junior`, `senior` | Value Statics: Total count 7 - Distinct count 2 - Null count 11857
last TEXT, -- Example Values: `Levy`, `Lambert`, `Bono` | Value Statics: Total count 3 - Distinct count 3 - Null count 11861
url TEXT, --
fax TEXT, --
contact_form TEXT, --
office TEXT, --
state TEXT, --
foreign key (bioguide) references historical(bioguide_id),
class REAL, -- Example Values: `2.0`, `1.0`, `3.0` | Value Statics: Total count 1256 - Distinct count 3 - Null count 10608
end TEXT, --
district REAL, --
chamber TEXT, -- Example Values: `house`, `senate` | Value Statics: Total count 3 - Distinct count 2 - Null count 11861
);
CREATE TABLE current-terms
(
foreign key (bioguide) references current(bioguide_id),
phone TEXT, --
party_affiliations TEXT, -- Example Values: `{'start': '2009-01-06', 'end': '2009-02-23', 'party': 'Independent'}`, `{'start': '1993-01-05', 'end': '1994-11-09', 'party': 'Democrat'}` | Value Statics: Total count 2 - Distinct count 2 - Null count 3076
title TEXT, -- Example Values: `Minority Whip`, `Majority Whip`, `Minority Leader`, `Majority Leader`, `Speaker` | Value Statics: Total count 28 - Distinct count 5 - Null count 3050
district REAL, --
bioguide TEXT, --
office TEXT, --
class REAL, -- Example Values: `1.0`, `2.0`, `3.0` | Value Statics: Total count 244 - Distinct count 3 - Null count 2834
type TEXT, -- Example Values: `rep`, `sen` | Value Statics: Total count 3014 - Distinct count 2 - Null count 64
start TEXT, --
address TEXT, --
rss_url TEXT, --
url TEXT, --
primary key (bioguide, end),
fax TEXT, --
chamber TEXT, -- Example Values: `senate`, `house` | Value Statics: Total count 28 - Distinct count 2 - Null count 3050
end TEXT, --
caucus TEXT, -- Example Values: `Democrat` | Value Statics: Total count 3 - Distinct count 1 - Null count 3075
state TEXT, --
last TEXT, -- Example Values: `Menendez` | Value Statics: Total count 1 - Distinct count 1 - Null count 3077
relation TEXT, -- Example Values: `son`, `nephew`, `cousin`, `daughter`, `grandson` | Value Statics: Total count 35 - Distinct count 13 - Null count 3043
state_rank TEXT, -- Example Values: `senior`, `junior` | Value Statics: Total count 147 - Distinct count 2 - Null count 2931
name TEXT, --
contact_form TEXT, --
party TEXT, -- Example Values: `Democrat`, `Republican`, `Independent` | Value Statics: Total count 3014 - Distinct count 3 - Null count 64
);
CREATE TABLE social-media
(
foreign key (bioguide) references current(bioguide_id),
instagram TEXT, --
thomas INTEGER, --
youtube TEXT, --
twitter TEXT, --
facebook TEXT, --
youtube_id TEXT, --
twitter_id REAL, --
facebook_id REAL, --
govtrack REAL, --
bioguide TEXT primary key,
instagram_id REAL, --
); |
shakespeare | For how many times has the scene "OLIVIA’S house." appeared in Twelfth Night? | "OLIVIA’S house." refers to chapters.Description = 'OLIVIA’S house.'; Twelfth Night refers to Title = 'Twelfth Night' | SELECT COUNT(T2.id) FROM works AS T1 INNER JOIN chapters AS T2 ON T1.id = T2.work_id WHERE T2.Description = 'OLIVIA’S house.' AND T1.Title = 'Twelfth Night' | CREATE TABLE characters
(
CharName TEXT not null, --
Abbrev TEXT not null, --
Description TEXT not null, --
id INTEGER primary key autoincrement,
);
CREATE TABLE paragraphs
(
chapter_id INTEGER default 0 not null references chapters, --
character_id INTEGER not null references characters, --
ParagraphNum INTEGER not null, --
PlainText TEXT not null, --
id INTEGER primary key autoincrement,
);
CREATE TABLE works
(
GenreType TEXT not null, -- Example Values: `Comedy`, `Tragedy`, `History`, `Poem`, `Sonnet` | Value Statics: Total count 43 - Distinct count 5 - Null count 0
Title TEXT not null, --
Date INTEGER not null, --
id INTEGER primary key autoincrement,
LongTitle TEXT not null, --
);
CREATE TABLE chapters
(
work_id INTEGER not null references works, --
Act INTEGER not null, -- Example Values: `1`, `2`, `3`, `4`, `5` | Value Statics: Total count 945 - Distinct count 6 - Null count 0
Description TEXT not null, --
id INTEGER primary key autoincrement,
Scene INTEGER not null, --
); |
movie_platform | What is the user avatar url for user 41579158? What is the latest movie rated by him / her? | user avatar url refers to user_avatar_image_url; latest movie rated refers to latest rating_date; | SELECT T3.user_avatar_image_url, T3.rating_date_utc FROM movies AS T1 INNER JOIN ratings AS T2 ON T1.movie_id = T2.movie_id INNER JOIN ratings_users AS T3 ON T3.user_id = T2.user_id WHERE T3.user_id = 41579158 ORDER BY T3.rating_date_utc DESC LIMIT 1 | CREATE TABLE ratings_users
(
user_cover_image_url TEXT, --
user_avatar_image_url TEXT, --
rating_date_utc TEXT, --
user_trialist INTEGER, -- Example Values: `0`, `1` | Value Statics: Total count 100000 - Distinct count 2 - Null count 0
user_has_payment_method INTEGER, -- Example Values: `0`, `1` | Value Statics: Total count 100000 - Distinct count 2 - Null count 0
user_eligible_for_trial INTEGER, -- Example Values: `1`, `0` | Value Statics: Total count 100000 - Distinct count 2 - Null count 0
user_subscriber INTEGER, -- Example Values: `0`, `1` | Value Statics: Total count 100000 - Distinct count 2 - Null count 0
user_id INTEGER references lists_users (user_id), --
);
CREATE TABLE movies
(
director_name TEXT, --
movie_title TEXT, --
director_id TEXT, --
movie_image_url TEXT, --
movie_title_language TEXT, -- Example Values: `en` | Value Statics: Total count 100000 - Distinct count 1 - Null count 0
director_url TEXT, --
movie_popularity INTEGER, --
movie_url TEXT, --
movie_release_year INTEGER, --
movie_id INTEGER not null primary key,
);
CREATE TABLE lists
(
list_creation_timestamp_utc TEXT, --
list_third_image_url TEXT, --
list_cover_image_url TEXT, --
list_description TEXT, --
list_movie_number INTEGER, --
list_first_image_url TEXT, --
user_id INTEGER references lists_users (user_id), --
list_title TEXT, --
list_comments INTEGER, --
list_second_image_url TEXT, --
list_update_timestamp_utc TEXT, --
list_id INTEGER not null primary key,
list_url TEXT, --
list_followers INTEGER, --
);
CREATE TABLE lists_users
(
list_update_date_utc TEXT, --
user_subscriber INTEGER, -- Example Values: `1`, `0` | Value Statics: Total count 80311 - Distinct count 2 - Null count 0
user_eligible_for_trial TEXT, -- Example Values: `0`, `1` | Value Statics: Total count 80311 - Distinct count 2 - Null count 0
user_has_payment_method TEXT, -- Example Values: `1`, `0` | Value Statics: Total count 80311 - Distinct count 2 - Null count 0
foreign key (list_id) references lists(list_id),
foreign key (user_id) references lists(user_id),
user_avatar_image_url TEXT, --
user_cover_image_url TEXT, --
primary key (user_id, list_id),
user_id INTEGER not null, --
user_trialist INTEGER, -- Example Values: `1`, `0` | Value Statics: Total count 80311 - Distinct count 2 - Null count 0
list_id INTEGER not null, --
list_creation_date_utc TEXT, --
);
CREATE TABLE ratings
(
user_subscriber INTEGER, -- Example Values: `0`, `1` | Value Statics: Total count 100000 - Distinct count 2 - Null count 0
movie_id INTEGER, --
rating_url TEXT, --
user_eligible_for_trial INTEGER, -- Example Values: `1`, `0` | Value Statics: Total count 100000 - Distinct count 2 - Null count 0
foreign key (rating_id) references ratings(rating_id),
critic TEXT, --
user_trialist INTEGER, -- Example Values: `0`, `1` | Value Statics: Total count 100000 - Distinct count 2 - Null count 0
foreign key (movie_id) references movies(movie_id),
foreign key (user_id) references lists_users(user_id),
foreign key (user_id) references lists_users(user_id),
rating_score INTEGER, -- Example Values: `3`, `2`, `4`, `5`, `1` | Value Statics: Total count 99731 - Distinct count 5 - Null count 269
critic_likes INTEGER, --
foreign key (user_id) references ratings_users(user_id),
foreign key (user_id) references ratings_users(user_id),
rating_id INTEGER, --
rating_timestamp_utc TEXT, --
user_has_payment_method INTEGER, -- Example Values: `0`, `1` | Value Statics: Total count 100000 - Distinct count 2 - Null count 0
critic_comments INTEGER, --
user_id INTEGER, --
); |
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' | CREATE TABLE current
(
gender_bio TEXT, -- Example Values: `M`, `F` | Value Statics: Total count 541 - Distinct count 2 - Null count 0
suffix_name TEXT, -- Example Values: `Jr.`, `III`, `II` | Value Statics: Total count 20 - Distinct count 3 - Null count 521
house_history_id REAL, --
birthday_bio DATE, --
nickname_name TEXT, --
religion_bio TEXT, --
google_entity_id_id TEXT, --
govtrack_id INTEGER, --
cspan_id REAL, --
primary key (bioguide_id, cspan_id),
wikipedia_id TEXT, --
maplight_id REAL, --
last_name TEXT, --
icpsr_id REAL, --
fec_id TEXT, --
votesmart_id REAL, --
first_name TEXT, --
lis_id TEXT, --
bioguide_id TEXT, --
wikidata_id TEXT, --
middle_name TEXT, --
ballotpedia_id TEXT, --
opensecrets_id TEXT, --
official_full_name TEXT, --
thomas_id INTEGER, --
);
CREATE TABLE historical
(
fec_id TEXT, --
suffix_name TEXT, -- Example Values: `Jr.`, `Sr.`, `II`, `III`, `IV` | Value Statics: Total count 418 - Distinct count 5 - Null count 11446
govtrack_id INTEGER, --
house_history_id REAL, --
opensecrets_id TEXT, --
votesmart_id TEXT, --
bioguide_id TEXT primary key,
nickname_name TEXT, --
official_full_name TEXT, --
house_history_alternate_id TEXT, -- Example Values: `13283.0` | Value Statics: Total count 1 - Distinct count 1 - Null count 11863
gender_bio TEXT, -- Example Values: `M`, `F` | Value Statics: Total count 11864 - Distinct count 2 - Null count 0
bioguide_previous_id TEXT, -- Example Values: `['F000246']`, `['L000266']`, `['W000790']` | Value Statics: Total count 3 - Distinct count 3 - Null count 11861
icpsr_id REAL, --
wikipedia_id TEXT, --
birthday_bio TEXT, --
religion_bio TEXT, --
lis_id TEXT, --
middle_name TEXT, --
cspan_id TEXT, --
last_name TEXT, --
first_name TEXT, --
wikidata_id TEXT, --
thomas_id TEXT, --
ballotpedia_id TEXT, --
maplight_id TEXT, --
google_entity_id_id TEXT, --
);
CREATE TABLE historical-terms
(
bioguide TEXT primary key,
middle TEXT, --
title TEXT, -- Example Values: `Majority Leader`, `Speaker` | Value Statics: Total count 3 - Distinct count 2 - Null count 11861
party TEXT, --
type TEXT, -- Example Values: `sen`, `rep` | Value Statics: Total count 11858 - Distinct count 2 - Null count 6
phone TEXT, --
rss_url TEXT, -- Example Values: `http://radel.house.gov/news/rss.aspx`, `http://www.begich.senate.gov/public/?a=rss.feed`, `http://www.hagan.senate.gov/rss`, `http://negretemcleod.house.gov/rss.xml`, `http://garcia.house.gov/rss.xml` | Value Statics: Total count 12 - Distinct count 12 - Null count 11852
name TEXT, --
start TEXT, --
address TEXT, --
party_affiliations TEXT, -- Example Values: `{'start': '2009-01-06', 'end': '2009-12-22', 'party': 'Democrat'}`, `{'start': '2003-01-07', 'end': '2004-08-09', 'party': 'Democrat'}` | Value Statics: Total count 2 - Distinct count 2 - Null count 11862
relation TEXT, --
state_rank TEXT, -- Example Values: `junior`, `senior` | Value Statics: Total count 7 - Distinct count 2 - Null count 11857
last TEXT, -- Example Values: `Levy`, `Lambert`, `Bono` | Value Statics: Total count 3 - Distinct count 3 - Null count 11861
url TEXT, --
fax TEXT, --
contact_form TEXT, --
office TEXT, --
state TEXT, --
foreign key (bioguide) references historical(bioguide_id),
class REAL, -- Example Values: `2.0`, `1.0`, `3.0` | Value Statics: Total count 1256 - Distinct count 3 - Null count 10608
end TEXT, --
district REAL, --
chamber TEXT, -- Example Values: `house`, `senate` | Value Statics: Total count 3 - Distinct count 2 - Null count 11861
);
CREATE TABLE current-terms
(
foreign key (bioguide) references current(bioguide_id),
phone TEXT, --
party_affiliations TEXT, -- Example Values: `{'start': '2009-01-06', 'end': '2009-02-23', 'party': 'Independent'}`, `{'start': '1993-01-05', 'end': '1994-11-09', 'party': 'Democrat'}` | Value Statics: Total count 2 - Distinct count 2 - Null count 3076
title TEXT, -- Example Values: `Minority Whip`, `Majority Whip`, `Minority Leader`, `Majority Leader`, `Speaker` | Value Statics: Total count 28 - Distinct count 5 - Null count 3050
district REAL, --
bioguide TEXT, --
office TEXT, --
class REAL, -- Example Values: `1.0`, `2.0`, `3.0` | Value Statics: Total count 244 - Distinct count 3 - Null count 2834
type TEXT, -- Example Values: `rep`, `sen` | Value Statics: Total count 3014 - Distinct count 2 - Null count 64
start TEXT, --
address TEXT, --
rss_url TEXT, --
url TEXT, --
primary key (bioguide, end),
fax TEXT, --
chamber TEXT, -- Example Values: `senate`, `house` | Value Statics: Total count 28 - Distinct count 2 - Null count 3050
end TEXT, --
caucus TEXT, -- Example Values: `Democrat` | Value Statics: Total count 3 - Distinct count 1 - Null count 3075
state TEXT, --
last TEXT, -- Example Values: `Menendez` | Value Statics: Total count 1 - Distinct count 1 - Null count 3077
relation TEXT, -- Example Values: `son`, `nephew`, `cousin`, `daughter`, `grandson` | Value Statics: Total count 35 - Distinct count 13 - Null count 3043
state_rank TEXT, -- Example Values: `senior`, `junior` | Value Statics: Total count 147 - Distinct count 2 - Null count 2931
name TEXT, --
contact_form TEXT, --
party TEXT, -- Example Values: `Democrat`, `Republican`, `Independent` | Value Statics: Total count 3014 - Distinct count 3 - Null count 64
);
CREATE TABLE social-media
(
foreign key (bioguide) references current(bioguide_id),
instagram TEXT, --
thomas INTEGER, --
youtube TEXT, --
twitter TEXT, --
facebook TEXT, --
youtube_id TEXT, --
twitter_id REAL, --
facebook_id REAL, --
govtrack REAL, --
bioguide TEXT primary key,
instagram_id REAL, --
); |
shakespeare | Please list all the paragraphs in Act 1, Scene 1 in Twelfth Night. | Twelfth Night refers to Title = 'Twelfth Night'; list the paragraphs refers to PlainText | SELECT T3.PlainText FROM works AS T1 INNER JOIN chapters AS T2 ON T1.id = T2.work_id INNER JOIN paragraphs AS T3 ON T2.id = T3.chapter_id WHERE T2.Act = 1 AND T2.Scene = 1 AND T1.Title = 'Twelfth Night' | CREATE TABLE characters
(
CharName TEXT not null, --
Abbrev TEXT not null, --
Description TEXT not null, --
id INTEGER primary key autoincrement,
);
CREATE TABLE paragraphs
(
chapter_id INTEGER default 0 not null references chapters, --
character_id INTEGER not null references characters, --
ParagraphNum INTEGER not null, --
PlainText TEXT not null, --
id INTEGER primary key autoincrement,
);
CREATE TABLE works
(
GenreType TEXT not null, -- Example Values: `Comedy`, `Tragedy`, `History`, `Poem`, `Sonnet` | Value Statics: Total count 43 - Distinct count 5 - Null count 0
Title TEXT not null, --
Date INTEGER not null, --
id INTEGER primary key autoincrement,
LongTitle TEXT not null, --
);
CREATE TABLE chapters
(
work_id INTEGER not null references works, --
Act INTEGER not null, -- Example Values: `1`, `2`, `3`, `4`, `5` | Value Statics: Total count 945 - Distinct count 6 - Null count 0
Description TEXT not null, --
id INTEGER primary key autoincrement,
Scene INTEGER not null, --
); |
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' | CREATE TABLE current
(
gender_bio TEXT, -- Example Values: `M`, `F` | Value Statics: Total count 541 - Distinct count 2 - Null count 0
suffix_name TEXT, -- Example Values: `Jr.`, `III`, `II` | Value Statics: Total count 20 - Distinct count 3 - Null count 521
house_history_id REAL, --
birthday_bio DATE, --
nickname_name TEXT, --
religion_bio TEXT, --
google_entity_id_id TEXT, --
govtrack_id INTEGER, --
cspan_id REAL, --
primary key (bioguide_id, cspan_id),
wikipedia_id TEXT, --
maplight_id REAL, --
last_name TEXT, --
icpsr_id REAL, --
fec_id TEXT, --
votesmart_id REAL, --
first_name TEXT, --
lis_id TEXT, --
bioguide_id TEXT, --
wikidata_id TEXT, --
middle_name TEXT, --
ballotpedia_id TEXT, --
opensecrets_id TEXT, --
official_full_name TEXT, --
thomas_id INTEGER, --
);
CREATE TABLE historical
(
fec_id TEXT, --
suffix_name TEXT, -- Example Values: `Jr.`, `Sr.`, `II`, `III`, `IV` | Value Statics: Total count 418 - Distinct count 5 - Null count 11446
govtrack_id INTEGER, --
house_history_id REAL, --
opensecrets_id TEXT, --
votesmart_id TEXT, --
bioguide_id TEXT primary key,
nickname_name TEXT, --
official_full_name TEXT, --
house_history_alternate_id TEXT, -- Example Values: `13283.0` | Value Statics: Total count 1 - Distinct count 1 - Null count 11863
gender_bio TEXT, -- Example Values: `M`, `F` | Value Statics: Total count 11864 - Distinct count 2 - Null count 0
bioguide_previous_id TEXT, -- Example Values: `['F000246']`, `['L000266']`, `['W000790']` | Value Statics: Total count 3 - Distinct count 3 - Null count 11861
icpsr_id REAL, --
wikipedia_id TEXT, --
birthday_bio TEXT, --
religion_bio TEXT, --
lis_id TEXT, --
middle_name TEXT, --
cspan_id TEXT, --
last_name TEXT, --
first_name TEXT, --
wikidata_id TEXT, --
thomas_id TEXT, --
ballotpedia_id TEXT, --
maplight_id TEXT, --
google_entity_id_id TEXT, --
);
CREATE TABLE historical-terms
(
bioguide TEXT primary key,
middle TEXT, --
title TEXT, -- Example Values: `Majority Leader`, `Speaker` | Value Statics: Total count 3 - Distinct count 2 - Null count 11861
party TEXT, --
type TEXT, -- Example Values: `sen`, `rep` | Value Statics: Total count 11858 - Distinct count 2 - Null count 6
phone TEXT, --
rss_url TEXT, -- Example Values: `http://radel.house.gov/news/rss.aspx`, `http://www.begich.senate.gov/public/?a=rss.feed`, `http://www.hagan.senate.gov/rss`, `http://negretemcleod.house.gov/rss.xml`, `http://garcia.house.gov/rss.xml` | Value Statics: Total count 12 - Distinct count 12 - Null count 11852
name TEXT, --
start TEXT, --
address TEXT, --
party_affiliations TEXT, -- Example Values: `{'start': '2009-01-06', 'end': '2009-12-22', 'party': 'Democrat'}`, `{'start': '2003-01-07', 'end': '2004-08-09', 'party': 'Democrat'}` | Value Statics: Total count 2 - Distinct count 2 - Null count 11862
relation TEXT, --
state_rank TEXT, -- Example Values: `junior`, `senior` | Value Statics: Total count 7 - Distinct count 2 - Null count 11857
last TEXT, -- Example Values: `Levy`, `Lambert`, `Bono` | Value Statics: Total count 3 - Distinct count 3 - Null count 11861
url TEXT, --
fax TEXT, --
contact_form TEXT, --
office TEXT, --
state TEXT, --
foreign key (bioguide) references historical(bioguide_id),
class REAL, -- Example Values: `2.0`, `1.0`, `3.0` | Value Statics: Total count 1256 - Distinct count 3 - Null count 10608
end TEXT, --
district REAL, --
chamber TEXT, -- Example Values: `house`, `senate` | Value Statics: Total count 3 - Distinct count 2 - Null count 11861
);
CREATE TABLE current-terms
(
foreign key (bioguide) references current(bioguide_id),
phone TEXT, --
party_affiliations TEXT, -- Example Values: `{'start': '2009-01-06', 'end': '2009-02-23', 'party': 'Independent'}`, `{'start': '1993-01-05', 'end': '1994-11-09', 'party': 'Democrat'}` | Value Statics: Total count 2 - Distinct count 2 - Null count 3076
title TEXT, -- Example Values: `Minority Whip`, `Majority Whip`, `Minority Leader`, `Majority Leader`, `Speaker` | Value Statics: Total count 28 - Distinct count 5 - Null count 3050
district REAL, --
bioguide TEXT, --
office TEXT, --
class REAL, -- Example Values: `1.0`, `2.0`, `3.0` | Value Statics: Total count 244 - Distinct count 3 - Null count 2834
type TEXT, -- Example Values: `rep`, `sen` | Value Statics: Total count 3014 - Distinct count 2 - Null count 64
start TEXT, --
address TEXT, --
rss_url TEXT, --
url TEXT, --
primary key (bioguide, end),
fax TEXT, --
chamber TEXT, -- Example Values: `senate`, `house` | Value Statics: Total count 28 - Distinct count 2 - Null count 3050
end TEXT, --
caucus TEXT, -- Example Values: `Democrat` | Value Statics: Total count 3 - Distinct count 1 - Null count 3075
state TEXT, --
last TEXT, -- Example Values: `Menendez` | Value Statics: Total count 1 - Distinct count 1 - Null count 3077
relation TEXT, -- Example Values: `son`, `nephew`, `cousin`, `daughter`, `grandson` | Value Statics: Total count 35 - Distinct count 13 - Null count 3043
state_rank TEXT, -- Example Values: `senior`, `junior` | Value Statics: Total count 147 - Distinct count 2 - Null count 2931
name TEXT, --
contact_form TEXT, --
party TEXT, -- Example Values: `Democrat`, `Republican`, `Independent` | Value Statics: Total count 3014 - Distinct count 3 - Null count 64
);
CREATE TABLE social-media
(
foreign key (bioguide) references current(bioguide_id),
instagram TEXT, --
thomas INTEGER, --
youtube TEXT, --
twitter TEXT, --
facebook TEXT, --
youtube_id TEXT, --
twitter_id REAL, --
facebook_id REAL, --
govtrack REAL, --
bioguide TEXT primary key,
instagram_id REAL, --
); |
shakespeare | Please list the IDs of the paragraphs in which the character "son to Tamora" appears. | character "son to Tamora" refers to characters.Description = 'son to Tamora' | SELECT T1.id FROM paragraphs AS T1 INNER JOIN characters AS T2 ON T1.character_id = T2.id WHERE T2.Description = 'son to Tamora' | CREATE TABLE characters
(
CharName TEXT not null, --
Abbrev TEXT not null, --
Description TEXT not null, --
id INTEGER primary key autoincrement,
);
CREATE TABLE paragraphs
(
chapter_id INTEGER default 0 not null references chapters, --
character_id INTEGER not null references characters, --
ParagraphNum INTEGER not null, --
PlainText TEXT not null, --
id INTEGER primary key autoincrement,
);
CREATE TABLE works
(
GenreType TEXT not null, -- Example Values: `Comedy`, `Tragedy`, `History`, `Poem`, `Sonnet` | Value Statics: Total count 43 - Distinct count 5 - Null count 0
Title TEXT not null, --
Date INTEGER not null, --
id INTEGER primary key autoincrement,
LongTitle TEXT not null, --
);
CREATE TABLE chapters
(
work_id INTEGER not null references works, --
Act INTEGER not null, -- Example Values: `1`, `2`, `3`, `4`, `5` | Value Statics: Total count 945 - Distinct count 6 - Null count 0
Description TEXT not null, --
id INTEGER primary key autoincrement,
Scene INTEGER not null, --
); |
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 | CREATE TABLE current
(
gender_bio TEXT, -- Example Values: `M`, `F` | Value Statics: Total count 541 - Distinct count 2 - Null count 0
suffix_name TEXT, -- Example Values: `Jr.`, `III`, `II` | Value Statics: Total count 20 - Distinct count 3 - Null count 521
house_history_id REAL, --
birthday_bio DATE, --
nickname_name TEXT, --
religion_bio TEXT, --
google_entity_id_id TEXT, --
govtrack_id INTEGER, --
cspan_id REAL, --
primary key (bioguide_id, cspan_id),
wikipedia_id TEXT, --
maplight_id REAL, --
last_name TEXT, --
icpsr_id REAL, --
fec_id TEXT, --
votesmart_id REAL, --
first_name TEXT, --
lis_id TEXT, --
bioguide_id TEXT, --
wikidata_id TEXT, --
middle_name TEXT, --
ballotpedia_id TEXT, --
opensecrets_id TEXT, --
official_full_name TEXT, --
thomas_id INTEGER, --
);
CREATE TABLE historical
(
fec_id TEXT, --
suffix_name TEXT, -- Example Values: `Jr.`, `Sr.`, `II`, `III`, `IV` | Value Statics: Total count 418 - Distinct count 5 - Null count 11446
govtrack_id INTEGER, --
house_history_id REAL, --
opensecrets_id TEXT, --
votesmart_id TEXT, --
bioguide_id TEXT primary key,
nickname_name TEXT, --
official_full_name TEXT, --
house_history_alternate_id TEXT, -- Example Values: `13283.0` | Value Statics: Total count 1 - Distinct count 1 - Null count 11863
gender_bio TEXT, -- Example Values: `M`, `F` | Value Statics: Total count 11864 - Distinct count 2 - Null count 0
bioguide_previous_id TEXT, -- Example Values: `['F000246']`, `['L000266']`, `['W000790']` | Value Statics: Total count 3 - Distinct count 3 - Null count 11861
icpsr_id REAL, --
wikipedia_id TEXT, --
birthday_bio TEXT, --
religion_bio TEXT, --
lis_id TEXT, --
middle_name TEXT, --
cspan_id TEXT, --
last_name TEXT, --
first_name TEXT, --
wikidata_id TEXT, --
thomas_id TEXT, --
ballotpedia_id TEXT, --
maplight_id TEXT, --
google_entity_id_id TEXT, --
);
CREATE TABLE historical-terms
(
bioguide TEXT primary key,
middle TEXT, --
title TEXT, -- Example Values: `Majority Leader`, `Speaker` | Value Statics: Total count 3 - Distinct count 2 - Null count 11861
party TEXT, --
type TEXT, -- Example Values: `sen`, `rep` | Value Statics: Total count 11858 - Distinct count 2 - Null count 6
phone TEXT, --
rss_url TEXT, -- Example Values: `http://radel.house.gov/news/rss.aspx`, `http://www.begich.senate.gov/public/?a=rss.feed`, `http://www.hagan.senate.gov/rss`, `http://negretemcleod.house.gov/rss.xml`, `http://garcia.house.gov/rss.xml` | Value Statics: Total count 12 - Distinct count 12 - Null count 11852
name TEXT, --
start TEXT, --
address TEXT, --
party_affiliations TEXT, -- Example Values: `{'start': '2009-01-06', 'end': '2009-12-22', 'party': 'Democrat'}`, `{'start': '2003-01-07', 'end': '2004-08-09', 'party': 'Democrat'}` | Value Statics: Total count 2 - Distinct count 2 - Null count 11862
relation TEXT, --
state_rank TEXT, -- Example Values: `junior`, `senior` | Value Statics: Total count 7 - Distinct count 2 - Null count 11857
last TEXT, -- Example Values: `Levy`, `Lambert`, `Bono` | Value Statics: Total count 3 - Distinct count 3 - Null count 11861
url TEXT, --
fax TEXT, --
contact_form TEXT, --
office TEXT, --
state TEXT, --
foreign key (bioguide) references historical(bioguide_id),
class REAL, -- Example Values: `2.0`, `1.0`, `3.0` | Value Statics: Total count 1256 - Distinct count 3 - Null count 10608
end TEXT, --
district REAL, --
chamber TEXT, -- Example Values: `house`, `senate` | Value Statics: Total count 3 - Distinct count 2 - Null count 11861
);
CREATE TABLE current-terms
(
foreign key (bioguide) references current(bioguide_id),
phone TEXT, --
party_affiliations TEXT, -- Example Values: `{'start': '2009-01-06', 'end': '2009-02-23', 'party': 'Independent'}`, `{'start': '1993-01-05', 'end': '1994-11-09', 'party': 'Democrat'}` | Value Statics: Total count 2 - Distinct count 2 - Null count 3076
title TEXT, -- Example Values: `Minority Whip`, `Majority Whip`, `Minority Leader`, `Majority Leader`, `Speaker` | Value Statics: Total count 28 - Distinct count 5 - Null count 3050
district REAL, --
bioguide TEXT, --
office TEXT, --
class REAL, -- Example Values: `1.0`, `2.0`, `3.0` | Value Statics: Total count 244 - Distinct count 3 - Null count 2834
type TEXT, -- Example Values: `rep`, `sen` | Value Statics: Total count 3014 - Distinct count 2 - Null count 64
start TEXT, --
address TEXT, --
rss_url TEXT, --
url TEXT, --
primary key (bioguide, end),
fax TEXT, --
chamber TEXT, -- Example Values: `senate`, `house` | Value Statics: Total count 28 - Distinct count 2 - Null count 3050
end TEXT, --
caucus TEXT, -- Example Values: `Democrat` | Value Statics: Total count 3 - Distinct count 1 - Null count 3075
state TEXT, --
last TEXT, -- Example Values: `Menendez` | Value Statics: Total count 1 - Distinct count 1 - Null count 3077
relation TEXT, -- Example Values: `son`, `nephew`, `cousin`, `daughter`, `grandson` | Value Statics: Total count 35 - Distinct count 13 - Null count 3043
state_rank TEXT, -- Example Values: `senior`, `junior` | Value Statics: Total count 147 - Distinct count 2 - Null count 2931
name TEXT, --
contact_form TEXT, --
party TEXT, -- Example Values: `Democrat`, `Republican`, `Independent` | Value Statics: Total count 3014 - Distinct count 3 - Null count 64
);
CREATE TABLE social-media
(
foreign key (bioguide) references current(bioguide_id),
instagram TEXT, --
thomas INTEGER, --
youtube TEXT, --
twitter TEXT, --
facebook TEXT, --
youtube_id TEXT, --
twitter_id REAL, --
facebook_id REAL, --
govtrack REAL, --
bioguide TEXT primary key,
instagram_id REAL, --
); |
professional_basketball | Give the player id of the man who had the most turnovers whose team missed the playoffs in year 1988. | the most turnovers refers to max(turnovers); missed the playoffs refers to PostGP = 0; in year 1988 refers to year = 1988 | SELECT T2.playerID FROM players_teams AS T1 INNER JOIN players AS T2 ON T1.playerID = T2.playerID WHERE T1.PostGP = 0 AND T1.year = 1988 ORDER BY T1.turnovers DESC LIMIT 1 | CREATE TABLE players_teams
(
PostGS INTEGER, --
PostdRebounds INTEGER, --
PostPF INTEGER, --
tmID TEXT, --
threeAttempted INTEGER, --
PostRebounds INTEGER, --
assists INTEGER, --
threeMade INTEGER, --
PostBlocks INTEGER, --
PostTurnovers INTEGER, --
GP INTEGER, --
lgID TEXT, -- Example Values: `NBA`, `NBL`, `ABA`, `ABL1`, `NPBL` | Value Statics: Total count 23751 - Distinct count 6 - Null count 0
foreign key (tmID, year) references teams (tmID, year) on update cascade on delete cascade,
PostfgMade INTEGER, --
steals INTEGER, --
oRebounds INTEGER, --
PostftAttempted INTEGER, --
ftAttempted INTEGER, --
ftMade INTEGER, --
points INTEGER, --
PostfgAttempted INTEGER, --
PostftMade INTEGER, --
note TEXT, -- Example Values: `C` | Value Statics: Total count 43 - Distinct count 1 - Null count 23708
dRebounds INTEGER, --
PostSteals INTEGER, --
blocks INTEGER, --
PostAssists INTEGER, --
minutes INTEGER, --
fgAttempted INTEGER, --
playerID TEXT not null references players on update cascade on delete cascade, --
PostthreeMade INTEGER, --
PostPoints INTEGER, --
year INTEGER, --
PF INTEGER, --
fgMade INTEGER, --
PostthreeAttempted INTEGER, --
rebounds INTEGER, --
id INTEGER primary key autoincrement,
stint INTEGER, -- Example Values: `1`, `2`, `0`, `3`, `4` | Value Statics: Total count 23751 - Distinct count 6 - Null count 0
PostMinutes INTEGER, --
PostGP INTEGER, --
turnovers INTEGER, --
PostoRebounds INTEGER, --
GS INTEGER, --
);
CREATE TABLE awards_coaches
(
award TEXT, -- Example Values: `NBA Coach of the Year`, `ABA Coach of the Year` | Value Statics: Total count 61 - Distinct count 2 - Null count 0
id INTEGER primary key autoincrement,
note TEXT, -- Example Values: `tie` | Value Statics: Total count 4 - Distinct count 1 - Null count 57
coachID TEXT, --
lgID TEXT, -- Example Values: `NBA`, `ABA` | Value Statics: Total count 61 - Distinct count 2 - Null count 0
foreign key (coachID, year) references coaches (coachID, year) on update cascade on delete cascade,
year INTEGER, --
);
CREATE TABLE draft
(
draftOverall INTEGER null, --
lgID TEXT null, -- Example Values: `ABA`, `NBA` | Value Statics: Total count 8621 - Distinct count 2 - Null count 0
suffixName TEXT null, -- Example Values: `Jr.` | Value Statics: Total count 2 - Distinct count 1 - Null count 8619
draftYear INTEGER null, --
draftSelection INTEGER null, --
tmID TEXT null, --
draftRound INTEGER null, --
lastName TEXT null, --
playerID TEXT null, --
draftFrom TEXT null, --
id INTEGER default 0 not null primary key,
firstName TEXT null, --
foreign key (tmID, draftYear) references teams (tmID, year) on update cascade on delete cascade,
foreign key (tmID, draftYear) references teams (tmID, year) on update cascade on delete cascade,
);
CREATE TABLE player_allstar
(
rebounds INTEGER null, --
playerID TEXT not null, --
season_id INTEGER not null, --
assists INTEGER null, --
conference TEXT null, -- Example Values: `East`, `West`, `Weset`, `Allstars`, `Denver` | Value Statics: Total count 1608 - Distinct count 5 - Null count 0
points INTEGER null, --
personal_fouls INTEGER null, -- Example Values: `3`, `2`, `0`, `1`, `5` | Value Statics: Total count 540 - Distinct count 8 - Null count 1068
ft_attempted INTEGER null, -- Example Values: `2`, `4`, `0`, `6`, `3` | Value Statics: Total count 1561 - Distinct count 17 - Null count 47
fg_attempted INTEGER null, --
league_id TEXT null, -- Example Values: `NBA`, `ABA` | Value Statics: Total count 1608 - Distinct count 2 - Null count 0
foreign key (playerID) references players (playerID) on update cascade on delete cascade,
fg_made INTEGER null, -- Example Values: `4`, `8`, `5`, `7`, `3` | Value Statics: Total count 1561 - Distinct count 18 - Null count 47
ft_made INTEGER null, -- Example Values: `2`, `3`, `0`, `1`, `4` | Value Statics: Total count 1561 - Distinct count 13 - Null count 47
steals INTEGER null, -- Example Values: `3`, `0`, `1`, `2`, `5` | Value Statics: Total count 398 - Distinct count 7 - Null count 1210
games_played INTEGER null, -- Example Values: `1` | Value Statics: Total count 1608 - Distinct count 1 - Null count 0
first_name TEXT null, --
d_rebounds INTEGER null, -- Example Values: `2`, `5`, `0`, `1`, `4` | Value Statics: Total count 493 - Distinct count 14 - Null count 1115
last_name TEXT null, --
primary key (playerID, season_id),
turnovers INTEGER null, -- Example Values: `1`, `0`, `3`, `2`, `4` | Value Statics: Total count 493 - Distinct count 9 - Null count 1115
three_made INTEGER null, -- Example Values: `0`, `1`, `3`, `5`, `4` | Value Statics: Total count 566 - Distinct count 7 - Null count 1042
minutes INTEGER null, --
blocks INTEGER null, -- Example Values: `2`, `0`, `1`, `3`, `5` | Value Statics: Total count 398 - Distinct count 6 - Null count 1210
three_attempted INTEGER null, -- Example Values: `0`, `1`, `6`, `7`, `10` | Value Statics: Total count 540 - Distinct count 12 - Null count 1068
o_rebounds INTEGER null, -- Example Values: `1`, `2`, `0`, `3`, `4` | Value Statics: Total count 493 - Distinct count 10 - Null count 1115
);
CREATE TABLE awards_players
(
foreign key (playerID) references players (playerID) on update cascade on delete cascade,
year INTEGER not null, --
pos TEXT null, -- Example Values: `C`, `F`, `G`, `F/G`, `F/C` | Value Statics: Total count 833 - Distinct count 5 - Null count 886
primary key (playerID, year, award),
lgID TEXT null, -- Example Values: `NBA`, `ABA`, `NBL`, `ABL1` | Value Statics: Total count 1719 - Distinct count 4 - Null count 0
award TEXT not null, --
playerID TEXT not null, --
note TEXT null, -- Example Values: `tie` | Value Statics: Total count 37 - Distinct count 1 - Null count 1682
);
CREATE TABLE series_post
(
tmIDLoser TEXT, --
id INTEGER primary key autoincrement,
series TEXT, -- Example Values: `O`, `M`, `N`, `A`, `K` | Value Statics: Total count 775 - Distinct count 11 - Null count 0
tmIDWinner TEXT, --
round TEXT, -- Example Values: `F`, `QF`, `SF`, `DT`, `DF` | Value Statics: Total count 775 - Distinct count 11 - Null count 0
year INTEGER, --
foreign key (tmIDLoser, year) references teams (tmID, year) on update cascade on delete cascade,
foreign key (tmIDWinner, year) references teams (tmID, year) on update cascade on delete cascade,
W INTEGER, -- Example Values: `4`, `2`, `1`, `3`, `0` | Value Statics: Total count 775 - Distinct count 5 - Null count 0
lgIDLoser TEXT, -- Example Values: `NBA`, `ABA` | Value Statics: Total count 775 - Distinct count 2 - Null count 0
lgIDWinner TEXT, -- Example Values: `NBA`, `ABA` | Value Statics: Total count 775 - Distinct count 2 - Null count 0
L INTEGER, -- Example Values: `1`, `0`, `2`, `3`, `4` | Value Statics: Total count 775 - Distinct count 5 - Null count 0
);
CREATE TABLE players
(
nameGiven TEXT null, -- Example Values: `nameGiven`, `Mort`, `Robert`, `Jim`, `Mike` | Value Statics: Total count 10 - Distinct count 9 - Null count 5052
lastseason INTEGER null, -- Example Values: `0`, `1951` | Value Statics: Total count 5047 - Distinct count 2 - Null count 15
hsCountry TEXT null, --
firstName TEXT null, --
hsCity TEXT null, --
firstseason INTEGER null, -- Example Values: `0`, `1951` | Value Statics: Total count 5047 - Distinct count 2 - Null count 15
weight INTEGER null, --
birthCountry TEXT null, --
race TEXT null, -- Example Values: `B`, `W`, `O`, `1`, `r` | Value Statics: Total count 4903 - Distinct count 5 - Null count 159
lastName TEXT null, --
birthDate DATE null, --
collegeOther TEXT null, --
birthState TEXT null, --
useFirst TEXT null, --
pos TEXT null, -- Example Values: `F-C`, `C`, `G`, `G-F`, `C-F` | Value Statics: Total count 4880 - Distinct count 14 - Null count 182
playerID TEXT not null primary key,
college TEXT null, --
highSchool TEXT null, --
hsState TEXT null, --
height REAL null, --
deathDate DATE null, --
nameSuffix TEXT null, -- Example Values: `Jr.`, `III`, `nameSuffix`, `II`, `IV` | Value Statics: Total count 324 - Distinct count 6 - Null count 4738
nameNick TEXT null, --
fullGivenName TEXT null, --
birthCity TEXT null, --
middleName TEXT null, --
);
CREATE TABLE teams
(
d_pts INTEGER null, --
name TEXT null, --
homeLost INTEGER null, --
o_ftm INTEGER null, --
franchID TEXT null, --
tmID TEXT not null, --
awayWon INTEGER null, --
primary key (year, tmID),
o_fgm INTEGER null, --
year INTEGER not null, --
awayLost INTEGER null, --
arena TEXT null, --
confID TEXT null, -- Example Values: `EC`, `WC` | Value Statics: Total count 1064 - Distinct count 2 - Null count 472
games INTEGER null, --
lost INTEGER null, --
divID TEXT null, -- Example Values: `EA`, `WE`, `ED`, `WD`, `SO` | Value Statics: Total count 1498 - Distinct count 13 - Null count 38
lgID TEXT null, -- Example Values: `NBL`, `NBA`, `PBLA`, `NPBL`, `ABL1` | Value Statics: Total count 1536 - Distinct count 6 - Null count 0
homeWon INTEGER null, --
confRank INTEGER null, -- Example Values: `0`, `4`, `3`, `5`, `7` | Value Statics: Total count 1536 - Distinct count 16 - Null count 0
o_pts INTEGER null, --
`rank` INTEGER null, -- Example Values: `1`, `2`, `4`, `5`, `6` | Value Statics: Total count 1536 - Distinct count 10 - Null count 0
playoff TEXT null, -- Example Values: `CF`, `WC`, `LC`, `CS`, `F` | Value Statics: Total count 901 - Distinct count 15 - Null count 635
won INTEGER null, --
);
CREATE TABLE coaches
(
primary key (coachID, year, tmID, stint),
lgID TEXT null, -- Example Values: `NBA`, `ABA`, `ABL1`, `PBLA`, `NPBL` | Value Statics: Total count 1689 - Distinct count 5 - Null count 0
post_losses INTEGER null, -- Example Values: `3`, `9`, `7`, `8`, `0` | Value Statics: Total count 1649 - Distinct count 12 - Null count 40
year INTEGER not null, --
won INTEGER null, --
foreign key (tmID, year) references teams (tmID, year) on update cascade on delete cascade,
post_wins INTEGER null, -- Example Values: `0`, `12`, `9`, `13`, `1` | Value Statics: Total count 1649 - Distinct count 17 - Null count 40
coachID TEXT not null, --
tmID TEXT not null, --
lost INTEGER null, --
stint INTEGER not null, -- Example Values: `2`, `1`, `4`, `5`, `3` | Value Statics: Total count 1689 - Distinct count 5 - Null count 0
); |
legislator | Which legislators are woman? | woman refers to gender_bio = 'F'; | SELECT first_name, last_name FROM historical WHERE gender_bio = 'F' | CREATE TABLE current
(
gender_bio TEXT, -- Example Values: `M`, `F` | Value Statics: Total count 541 - Distinct count 2 - Null count 0
suffix_name TEXT, -- Example Values: `Jr.`, `III`, `II` | Value Statics: Total count 20 - Distinct count 3 - Null count 521
house_history_id REAL, --
birthday_bio DATE, --
nickname_name TEXT, --
religion_bio TEXT, --
google_entity_id_id TEXT, --
govtrack_id INTEGER, --
cspan_id REAL, --
primary key (bioguide_id, cspan_id),
wikipedia_id TEXT, --
maplight_id REAL, --
last_name TEXT, --
icpsr_id REAL, --
fec_id TEXT, --
votesmart_id REAL, --
first_name TEXT, --
lis_id TEXT, --
bioguide_id TEXT, --
wikidata_id TEXT, --
middle_name TEXT, --
ballotpedia_id TEXT, --
opensecrets_id TEXT, --
official_full_name TEXT, --
thomas_id INTEGER, --
);
CREATE TABLE historical
(
fec_id TEXT, --
suffix_name TEXT, -- Example Values: `Jr.`, `Sr.`, `II`, `III`, `IV` | Value Statics: Total count 418 - Distinct count 5 - Null count 11446
govtrack_id INTEGER, --
house_history_id REAL, --
opensecrets_id TEXT, --
votesmart_id TEXT, --
bioguide_id TEXT primary key,
nickname_name TEXT, --
official_full_name TEXT, --
house_history_alternate_id TEXT, -- Example Values: `13283.0` | Value Statics: Total count 1 - Distinct count 1 - Null count 11863
gender_bio TEXT, -- Example Values: `M`, `F` | Value Statics: Total count 11864 - Distinct count 2 - Null count 0
bioguide_previous_id TEXT, -- Example Values: `['F000246']`, `['L000266']`, `['W000790']` | Value Statics: Total count 3 - Distinct count 3 - Null count 11861
icpsr_id REAL, --
wikipedia_id TEXT, --
birthday_bio TEXT, --
religion_bio TEXT, --
lis_id TEXT, --
middle_name TEXT, --
cspan_id TEXT, --
last_name TEXT, --
first_name TEXT, --
wikidata_id TEXT, --
thomas_id TEXT, --
ballotpedia_id TEXT, --
maplight_id TEXT, --
google_entity_id_id TEXT, --
);
CREATE TABLE historical-terms
(
bioguide TEXT primary key,
middle TEXT, --
title TEXT, -- Example Values: `Majority Leader`, `Speaker` | Value Statics: Total count 3 - Distinct count 2 - Null count 11861
party TEXT, --
type TEXT, -- Example Values: `sen`, `rep` | Value Statics: Total count 11858 - Distinct count 2 - Null count 6
phone TEXT, --
rss_url TEXT, -- Example Values: `http://radel.house.gov/news/rss.aspx`, `http://www.begich.senate.gov/public/?a=rss.feed`, `http://www.hagan.senate.gov/rss`, `http://negretemcleod.house.gov/rss.xml`, `http://garcia.house.gov/rss.xml` | Value Statics: Total count 12 - Distinct count 12 - Null count 11852
name TEXT, --
start TEXT, --
address TEXT, --
party_affiliations TEXT, -- Example Values: `{'start': '2009-01-06', 'end': '2009-12-22', 'party': 'Democrat'}`, `{'start': '2003-01-07', 'end': '2004-08-09', 'party': 'Democrat'}` | Value Statics: Total count 2 - Distinct count 2 - Null count 11862
relation TEXT, --
state_rank TEXT, -- Example Values: `junior`, `senior` | Value Statics: Total count 7 - Distinct count 2 - Null count 11857
last TEXT, -- Example Values: `Levy`, `Lambert`, `Bono` | Value Statics: Total count 3 - Distinct count 3 - Null count 11861
url TEXT, --
fax TEXT, --
contact_form TEXT, --
office TEXT, --
state TEXT, --
foreign key (bioguide) references historical(bioguide_id),
class REAL, -- Example Values: `2.0`, `1.0`, `3.0` | Value Statics: Total count 1256 - Distinct count 3 - Null count 10608
end TEXT, --
district REAL, --
chamber TEXT, -- Example Values: `house`, `senate` | Value Statics: Total count 3 - Distinct count 2 - Null count 11861
);
CREATE TABLE current-terms
(
foreign key (bioguide) references current(bioguide_id),
phone TEXT, --
party_affiliations TEXT, -- Example Values: `{'start': '2009-01-06', 'end': '2009-02-23', 'party': 'Independent'}`, `{'start': '1993-01-05', 'end': '1994-11-09', 'party': 'Democrat'}` | Value Statics: Total count 2 - Distinct count 2 - Null count 3076
title TEXT, -- Example Values: `Minority Whip`, `Majority Whip`, `Minority Leader`, `Majority Leader`, `Speaker` | Value Statics: Total count 28 - Distinct count 5 - Null count 3050
district REAL, --
bioguide TEXT, --
office TEXT, --
class REAL, -- Example Values: `1.0`, `2.0`, `3.0` | Value Statics: Total count 244 - Distinct count 3 - Null count 2834
type TEXT, -- Example Values: `rep`, `sen` | Value Statics: Total count 3014 - Distinct count 2 - Null count 64
start TEXT, --
address TEXT, --
rss_url TEXT, --
url TEXT, --
primary key (bioguide, end),
fax TEXT, --
chamber TEXT, -- Example Values: `senate`, `house` | Value Statics: Total count 28 - Distinct count 2 - Null count 3050
end TEXT, --
caucus TEXT, -- Example Values: `Democrat` | Value Statics: Total count 3 - Distinct count 1 - Null count 3075
state TEXT, --
last TEXT, -- Example Values: `Menendez` | Value Statics: Total count 1 - Distinct count 1 - Null count 3077
relation TEXT, -- Example Values: `son`, `nephew`, `cousin`, `daughter`, `grandson` | Value Statics: Total count 35 - Distinct count 13 - Null count 3043
state_rank TEXT, -- Example Values: `senior`, `junior` | Value Statics: Total count 147 - Distinct count 2 - Null count 2931
name TEXT, --
contact_form TEXT, --
party TEXT, -- Example Values: `Democrat`, `Republican`, `Independent` | Value Statics: Total count 3014 - Distinct count 3 - Null count 64
);
CREATE TABLE social-media
(
foreign key (bioguide) references current(bioguide_id),
instagram TEXT, --
thomas INTEGER, --
youtube TEXT, --
twitter TEXT, --
facebook TEXT, --
youtube_id TEXT, --
twitter_id REAL, --
facebook_id REAL, --
govtrack REAL, --
bioguide TEXT primary key,
instagram_id REAL, --
); |
movie_platform | What is the percentage of the ratings were rated by user who was a subcriber? | user is a subscriber refers to user_subscriber = 1; percentage of ratings = DIVIDE(SUM(user_subscriber = 1), SUM(rating_score)) as percent; | SELECT CAST(SUM(CASE WHEN user_subscriber = 1 THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(*) FROM ratings | CREATE TABLE ratings_users
(
user_cover_image_url TEXT, --
user_avatar_image_url TEXT, --
rating_date_utc TEXT, --
user_trialist INTEGER, -- Example Values: `0`, `1` | Value Statics: Total count 100000 - Distinct count 2 - Null count 0
user_has_payment_method INTEGER, -- Example Values: `0`, `1` | Value Statics: Total count 100000 - Distinct count 2 - Null count 0
user_eligible_for_trial INTEGER, -- Example Values: `1`, `0` | Value Statics: Total count 100000 - Distinct count 2 - Null count 0
user_subscriber INTEGER, -- Example Values: `0`, `1` | Value Statics: Total count 100000 - Distinct count 2 - Null count 0
user_id INTEGER references lists_users (user_id), --
);
CREATE TABLE movies
(
director_name TEXT, --
movie_title TEXT, --
director_id TEXT, --
movie_image_url TEXT, --
movie_title_language TEXT, -- Example Values: `en` | Value Statics: Total count 100000 - Distinct count 1 - Null count 0
director_url TEXT, --
movie_popularity INTEGER, --
movie_url TEXT, --
movie_release_year INTEGER, --
movie_id INTEGER not null primary key,
);
CREATE TABLE lists
(
list_creation_timestamp_utc TEXT, --
list_third_image_url TEXT, --
list_cover_image_url TEXT, --
list_description TEXT, --
list_movie_number INTEGER, --
list_first_image_url TEXT, --
user_id INTEGER references lists_users (user_id), --
list_title TEXT, --
list_comments INTEGER, --
list_second_image_url TEXT, --
list_update_timestamp_utc TEXT, --
list_id INTEGER not null primary key,
list_url TEXT, --
list_followers INTEGER, --
);
CREATE TABLE lists_users
(
list_update_date_utc TEXT, --
user_subscriber INTEGER, -- Example Values: `1`, `0` | Value Statics: Total count 80311 - Distinct count 2 - Null count 0
user_eligible_for_trial TEXT, -- Example Values: `0`, `1` | Value Statics: Total count 80311 - Distinct count 2 - Null count 0
user_has_payment_method TEXT, -- Example Values: `1`, `0` | Value Statics: Total count 80311 - Distinct count 2 - Null count 0
foreign key (list_id) references lists(list_id),
foreign key (user_id) references lists(user_id),
user_avatar_image_url TEXT, --
user_cover_image_url TEXT, --
primary key (user_id, list_id),
user_id INTEGER not null, --
user_trialist INTEGER, -- Example Values: `1`, `0` | Value Statics: Total count 80311 - Distinct count 2 - Null count 0
list_id INTEGER not null, --
list_creation_date_utc TEXT, --
);
CREATE TABLE ratings
(
user_subscriber INTEGER, -- Example Values: `0`, `1` | Value Statics: Total count 100000 - Distinct count 2 - Null count 0
movie_id INTEGER, --
rating_url TEXT, --
user_eligible_for_trial INTEGER, -- Example Values: `1`, `0` | Value Statics: Total count 100000 - Distinct count 2 - Null count 0
foreign key (rating_id) references ratings(rating_id),
critic TEXT, --
user_trialist INTEGER, -- Example Values: `0`, `1` | Value Statics: Total count 100000 - Distinct count 2 - Null count 0
foreign key (movie_id) references movies(movie_id),
foreign key (user_id) references lists_users(user_id),
foreign key (user_id) references lists_users(user_id),
rating_score INTEGER, -- Example Values: `3`, `2`, `4`, `5`, `1` | Value Statics: Total count 99731 - Distinct count 5 - Null count 269
critic_likes INTEGER, --
foreign key (user_id) references ratings_users(user_id),
foreign key (user_id) references ratings_users(user_id),
rating_id INTEGER, --
rating_timestamp_utc TEXT, --
user_has_payment_method INTEGER, -- Example Values: `0`, `1` | Value Statics: Total count 100000 - Distinct count 2 - Null count 0
critic_comments INTEGER, --
user_id INTEGER, --
); |
professional_basketball | What's the name of the player in 1996 who had the most steals that didn't play in the playoffs? | name of the player refers to first_name, middle_name, last_name; in 1996 refers to year = 1996; the most steals refers to max(steals); didn't play in the playoffs refers to playoff = null | SELECT T1.playerID FROM players AS T1 INNER JOIN players_teams AS T2 ON T1.playerID = T2.playerID WHERE T2.year = 1996 AND T2.PostGP = 0 ORDER BY T2.steals DESC LIMIT 1 | CREATE TABLE players_teams
(
PostGS INTEGER, --
PostdRebounds INTEGER, --
PostPF INTEGER, --
tmID TEXT, --
threeAttempted INTEGER, --
PostRebounds INTEGER, --
assists INTEGER, --
threeMade INTEGER, --
PostBlocks INTEGER, --
PostTurnovers INTEGER, --
GP INTEGER, --
lgID TEXT, -- Example Values: `NBA`, `NBL`, `ABA`, `ABL1`, `NPBL` | Value Statics: Total count 23751 - Distinct count 6 - Null count 0
foreign key (tmID, year) references teams (tmID, year) on update cascade on delete cascade,
PostfgMade INTEGER, --
steals INTEGER, --
oRebounds INTEGER, --
PostftAttempted INTEGER, --
ftAttempted INTEGER, --
ftMade INTEGER, --
points INTEGER, --
PostfgAttempted INTEGER, --
PostftMade INTEGER, --
note TEXT, -- Example Values: `C` | Value Statics: Total count 43 - Distinct count 1 - Null count 23708
dRebounds INTEGER, --
PostSteals INTEGER, --
blocks INTEGER, --
PostAssists INTEGER, --
minutes INTEGER, --
fgAttempted INTEGER, --
playerID TEXT not null references players on update cascade on delete cascade, --
PostthreeMade INTEGER, --
PostPoints INTEGER, --
year INTEGER, --
PF INTEGER, --
fgMade INTEGER, --
PostthreeAttempted INTEGER, --
rebounds INTEGER, --
id INTEGER primary key autoincrement,
stint INTEGER, -- Example Values: `1`, `2`, `0`, `3`, `4` | Value Statics: Total count 23751 - Distinct count 6 - Null count 0
PostMinutes INTEGER, --
PostGP INTEGER, --
turnovers INTEGER, --
PostoRebounds INTEGER, --
GS INTEGER, --
);
CREATE TABLE awards_coaches
(
award TEXT, -- Example Values: `NBA Coach of the Year`, `ABA Coach of the Year` | Value Statics: Total count 61 - Distinct count 2 - Null count 0
id INTEGER primary key autoincrement,
note TEXT, -- Example Values: `tie` | Value Statics: Total count 4 - Distinct count 1 - Null count 57
coachID TEXT, --
lgID TEXT, -- Example Values: `NBA`, `ABA` | Value Statics: Total count 61 - Distinct count 2 - Null count 0
foreign key (coachID, year) references coaches (coachID, year) on update cascade on delete cascade,
year INTEGER, --
);
CREATE TABLE draft
(
draftOverall INTEGER null, --
lgID TEXT null, -- Example Values: `ABA`, `NBA` | Value Statics: Total count 8621 - Distinct count 2 - Null count 0
suffixName TEXT null, -- Example Values: `Jr.` | Value Statics: Total count 2 - Distinct count 1 - Null count 8619
draftYear INTEGER null, --
draftSelection INTEGER null, --
tmID TEXT null, --
draftRound INTEGER null, --
lastName TEXT null, --
playerID TEXT null, --
draftFrom TEXT null, --
id INTEGER default 0 not null primary key,
firstName TEXT null, --
foreign key (tmID, draftYear) references teams (tmID, year) on update cascade on delete cascade,
foreign key (tmID, draftYear) references teams (tmID, year) on update cascade on delete cascade,
);
CREATE TABLE player_allstar
(
rebounds INTEGER null, --
playerID TEXT not null, --
season_id INTEGER not null, --
assists INTEGER null, --
conference TEXT null, -- Example Values: `East`, `West`, `Weset`, `Allstars`, `Denver` | Value Statics: Total count 1608 - Distinct count 5 - Null count 0
points INTEGER null, --
personal_fouls INTEGER null, -- Example Values: `3`, `2`, `0`, `1`, `5` | Value Statics: Total count 540 - Distinct count 8 - Null count 1068
ft_attempted INTEGER null, -- Example Values: `2`, `4`, `0`, `6`, `3` | Value Statics: Total count 1561 - Distinct count 17 - Null count 47
fg_attempted INTEGER null, --
league_id TEXT null, -- Example Values: `NBA`, `ABA` | Value Statics: Total count 1608 - Distinct count 2 - Null count 0
foreign key (playerID) references players (playerID) on update cascade on delete cascade,
fg_made INTEGER null, -- Example Values: `4`, `8`, `5`, `7`, `3` | Value Statics: Total count 1561 - Distinct count 18 - Null count 47
ft_made INTEGER null, -- Example Values: `2`, `3`, `0`, `1`, `4` | Value Statics: Total count 1561 - Distinct count 13 - Null count 47
steals INTEGER null, -- Example Values: `3`, `0`, `1`, `2`, `5` | Value Statics: Total count 398 - Distinct count 7 - Null count 1210
games_played INTEGER null, -- Example Values: `1` | Value Statics: Total count 1608 - Distinct count 1 - Null count 0
first_name TEXT null, --
d_rebounds INTEGER null, -- Example Values: `2`, `5`, `0`, `1`, `4` | Value Statics: Total count 493 - Distinct count 14 - Null count 1115
last_name TEXT null, --
primary key (playerID, season_id),
turnovers INTEGER null, -- Example Values: `1`, `0`, `3`, `2`, `4` | Value Statics: Total count 493 - Distinct count 9 - Null count 1115
three_made INTEGER null, -- Example Values: `0`, `1`, `3`, `5`, `4` | Value Statics: Total count 566 - Distinct count 7 - Null count 1042
minutes INTEGER null, --
blocks INTEGER null, -- Example Values: `2`, `0`, `1`, `3`, `5` | Value Statics: Total count 398 - Distinct count 6 - Null count 1210
three_attempted INTEGER null, -- Example Values: `0`, `1`, `6`, `7`, `10` | Value Statics: Total count 540 - Distinct count 12 - Null count 1068
o_rebounds INTEGER null, -- Example Values: `1`, `2`, `0`, `3`, `4` | Value Statics: Total count 493 - Distinct count 10 - Null count 1115
);
CREATE TABLE awards_players
(
foreign key (playerID) references players (playerID) on update cascade on delete cascade,
year INTEGER not null, --
pos TEXT null, -- Example Values: `C`, `F`, `G`, `F/G`, `F/C` | Value Statics: Total count 833 - Distinct count 5 - Null count 886
primary key (playerID, year, award),
lgID TEXT null, -- Example Values: `NBA`, `ABA`, `NBL`, `ABL1` | Value Statics: Total count 1719 - Distinct count 4 - Null count 0
award TEXT not null, --
playerID TEXT not null, --
note TEXT null, -- Example Values: `tie` | Value Statics: Total count 37 - Distinct count 1 - Null count 1682
);
CREATE TABLE series_post
(
tmIDLoser TEXT, --
id INTEGER primary key autoincrement,
series TEXT, -- Example Values: `O`, `M`, `N`, `A`, `K` | Value Statics: Total count 775 - Distinct count 11 - Null count 0
tmIDWinner TEXT, --
round TEXT, -- Example Values: `F`, `QF`, `SF`, `DT`, `DF` | Value Statics: Total count 775 - Distinct count 11 - Null count 0
year INTEGER, --
foreign key (tmIDLoser, year) references teams (tmID, year) on update cascade on delete cascade,
foreign key (tmIDWinner, year) references teams (tmID, year) on update cascade on delete cascade,
W INTEGER, -- Example Values: `4`, `2`, `1`, `3`, `0` | Value Statics: Total count 775 - Distinct count 5 - Null count 0
lgIDLoser TEXT, -- Example Values: `NBA`, `ABA` | Value Statics: Total count 775 - Distinct count 2 - Null count 0
lgIDWinner TEXT, -- Example Values: `NBA`, `ABA` | Value Statics: Total count 775 - Distinct count 2 - Null count 0
L INTEGER, -- Example Values: `1`, `0`, `2`, `3`, `4` | Value Statics: Total count 775 - Distinct count 5 - Null count 0
);
CREATE TABLE players
(
nameGiven TEXT null, -- Example Values: `nameGiven`, `Mort`, `Robert`, `Jim`, `Mike` | Value Statics: Total count 10 - Distinct count 9 - Null count 5052
lastseason INTEGER null, -- Example Values: `0`, `1951` | Value Statics: Total count 5047 - Distinct count 2 - Null count 15
hsCountry TEXT null, --
firstName TEXT null, --
hsCity TEXT null, --
firstseason INTEGER null, -- Example Values: `0`, `1951` | Value Statics: Total count 5047 - Distinct count 2 - Null count 15
weight INTEGER null, --
birthCountry TEXT null, --
race TEXT null, -- Example Values: `B`, `W`, `O`, `1`, `r` | Value Statics: Total count 4903 - Distinct count 5 - Null count 159
lastName TEXT null, --
birthDate DATE null, --
collegeOther TEXT null, --
birthState TEXT null, --
useFirst TEXT null, --
pos TEXT null, -- Example Values: `F-C`, `C`, `G`, `G-F`, `C-F` | Value Statics: Total count 4880 - Distinct count 14 - Null count 182
playerID TEXT not null primary key,
college TEXT null, --
highSchool TEXT null, --
hsState TEXT null, --
height REAL null, --
deathDate DATE null, --
nameSuffix TEXT null, -- Example Values: `Jr.`, `III`, `nameSuffix`, `II`, `IV` | Value Statics: Total count 324 - Distinct count 6 - Null count 4738
nameNick TEXT null, --
fullGivenName TEXT null, --
birthCity TEXT null, --
middleName TEXT null, --
);
CREATE TABLE teams
(
d_pts INTEGER null, --
name TEXT null, --
homeLost INTEGER null, --
o_ftm INTEGER null, --
franchID TEXT null, --
tmID TEXT not null, --
awayWon INTEGER null, --
primary key (year, tmID),
o_fgm INTEGER null, --
year INTEGER not null, --
awayLost INTEGER null, --
arena TEXT null, --
confID TEXT null, -- Example Values: `EC`, `WC` | Value Statics: Total count 1064 - Distinct count 2 - Null count 472
games INTEGER null, --
lost INTEGER null, --
divID TEXT null, -- Example Values: `EA`, `WE`, `ED`, `WD`, `SO` | Value Statics: Total count 1498 - Distinct count 13 - Null count 38
lgID TEXT null, -- Example Values: `NBL`, `NBA`, `PBLA`, `NPBL`, `ABL1` | Value Statics: Total count 1536 - Distinct count 6 - Null count 0
homeWon INTEGER null, --
confRank INTEGER null, -- Example Values: `0`, `4`, `3`, `5`, `7` | Value Statics: Total count 1536 - Distinct count 16 - Null count 0
o_pts INTEGER null, --
`rank` INTEGER null, -- Example Values: `1`, `2`, `4`, `5`, `6` | Value Statics: Total count 1536 - Distinct count 10 - Null count 0
playoff TEXT null, -- Example Values: `CF`, `WC`, `LC`, `CS`, `F` | Value Statics: Total count 901 - Distinct count 15 - Null count 635
won INTEGER null, --
);
CREATE TABLE coaches
(
primary key (coachID, year, tmID, stint),
lgID TEXT null, -- Example Values: `NBA`, `ABA`, `ABL1`, `PBLA`, `NPBL` | Value Statics: Total count 1689 - Distinct count 5 - Null count 0
post_losses INTEGER null, -- Example Values: `3`, `9`, `7`, `8`, `0` | Value Statics: Total count 1649 - Distinct count 12 - Null count 40
year INTEGER not null, --
won INTEGER null, --
foreign key (tmID, year) references teams (tmID, year) on update cascade on delete cascade,
post_wins INTEGER null, -- Example Values: `0`, `12`, `9`, `13`, `1` | Value Statics: Total count 1649 - Distinct count 17 - Null count 40
coachID TEXT not null, --
tmID TEXT not null, --
lost INTEGER null, --
stint INTEGER not null, -- Example Values: `2`, `1`, `4`, `5`, `3` | Value Statics: Total count 1689 - Distinct count 5 - Null count 0
); |
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%' | CREATE TABLE current
(
gender_bio TEXT, -- Example Values: `M`, `F` | Value Statics: Total count 541 - Distinct count 2 - Null count 0
suffix_name TEXT, -- Example Values: `Jr.`, `III`, `II` | Value Statics: Total count 20 - Distinct count 3 - Null count 521
house_history_id REAL, --
birthday_bio DATE, --
nickname_name TEXT, --
religion_bio TEXT, --
google_entity_id_id TEXT, --
govtrack_id INTEGER, --
cspan_id REAL, --
primary key (bioguide_id, cspan_id),
wikipedia_id TEXT, --
maplight_id REAL, --
last_name TEXT, --
icpsr_id REAL, --
fec_id TEXT, --
votesmart_id REAL, --
first_name TEXT, --
lis_id TEXT, --
bioguide_id TEXT, --
wikidata_id TEXT, --
middle_name TEXT, --
ballotpedia_id TEXT, --
opensecrets_id TEXT, --
official_full_name TEXT, --
thomas_id INTEGER, --
);
CREATE TABLE historical
(
fec_id TEXT, --
suffix_name TEXT, -- Example Values: `Jr.`, `Sr.`, `II`, `III`, `IV` | Value Statics: Total count 418 - Distinct count 5 - Null count 11446
govtrack_id INTEGER, --
house_history_id REAL, --
opensecrets_id TEXT, --
votesmart_id TEXT, --
bioguide_id TEXT primary key,
nickname_name TEXT, --
official_full_name TEXT, --
house_history_alternate_id TEXT, -- Example Values: `13283.0` | Value Statics: Total count 1 - Distinct count 1 - Null count 11863
gender_bio TEXT, -- Example Values: `M`, `F` | Value Statics: Total count 11864 - Distinct count 2 - Null count 0
bioguide_previous_id TEXT, -- Example Values: `['F000246']`, `['L000266']`, `['W000790']` | Value Statics: Total count 3 - Distinct count 3 - Null count 11861
icpsr_id REAL, --
wikipedia_id TEXT, --
birthday_bio TEXT, --
religion_bio TEXT, --
lis_id TEXT, --
middle_name TEXT, --
cspan_id TEXT, --
last_name TEXT, --
first_name TEXT, --
wikidata_id TEXT, --
thomas_id TEXT, --
ballotpedia_id TEXT, --
maplight_id TEXT, --
google_entity_id_id TEXT, --
);
CREATE TABLE historical-terms
(
bioguide TEXT primary key,
middle TEXT, --
title TEXT, -- Example Values: `Majority Leader`, `Speaker` | Value Statics: Total count 3 - Distinct count 2 - Null count 11861
party TEXT, --
type TEXT, -- Example Values: `sen`, `rep` | Value Statics: Total count 11858 - Distinct count 2 - Null count 6
phone TEXT, --
rss_url TEXT, -- Example Values: `http://radel.house.gov/news/rss.aspx`, `http://www.begich.senate.gov/public/?a=rss.feed`, `http://www.hagan.senate.gov/rss`, `http://negretemcleod.house.gov/rss.xml`, `http://garcia.house.gov/rss.xml` | Value Statics: Total count 12 - Distinct count 12 - Null count 11852
name TEXT, --
start TEXT, --
address TEXT, --
party_affiliations TEXT, -- Example Values: `{'start': '2009-01-06', 'end': '2009-12-22', 'party': 'Democrat'}`, `{'start': '2003-01-07', 'end': '2004-08-09', 'party': 'Democrat'}` | Value Statics: Total count 2 - Distinct count 2 - Null count 11862
relation TEXT, --
state_rank TEXT, -- Example Values: `junior`, `senior` | Value Statics: Total count 7 - Distinct count 2 - Null count 11857
last TEXT, -- Example Values: `Levy`, `Lambert`, `Bono` | Value Statics: Total count 3 - Distinct count 3 - Null count 11861
url TEXT, --
fax TEXT, --
contact_form TEXT, --
office TEXT, --
state TEXT, --
foreign key (bioguide) references historical(bioguide_id),
class REAL, -- Example Values: `2.0`, `1.0`, `3.0` | Value Statics: Total count 1256 - Distinct count 3 - Null count 10608
end TEXT, --
district REAL, --
chamber TEXT, -- Example Values: `house`, `senate` | Value Statics: Total count 3 - Distinct count 2 - Null count 11861
);
CREATE TABLE current-terms
(
foreign key (bioguide) references current(bioguide_id),
phone TEXT, --
party_affiliations TEXT, -- Example Values: `{'start': '2009-01-06', 'end': '2009-02-23', 'party': 'Independent'}`, `{'start': '1993-01-05', 'end': '1994-11-09', 'party': 'Democrat'}` | Value Statics: Total count 2 - Distinct count 2 - Null count 3076
title TEXT, -- Example Values: `Minority Whip`, `Majority Whip`, `Minority Leader`, `Majority Leader`, `Speaker` | Value Statics: Total count 28 - Distinct count 5 - Null count 3050
district REAL, --
bioguide TEXT, --
office TEXT, --
class REAL, -- Example Values: `1.0`, `2.0`, `3.0` | Value Statics: Total count 244 - Distinct count 3 - Null count 2834
type TEXT, -- Example Values: `rep`, `sen` | Value Statics: Total count 3014 - Distinct count 2 - Null count 64
start TEXT, --
address TEXT, --
rss_url TEXT, --
url TEXT, --
primary key (bioguide, end),
fax TEXT, --
chamber TEXT, -- Example Values: `senate`, `house` | Value Statics: Total count 28 - Distinct count 2 - Null count 3050
end TEXT, --
caucus TEXT, -- Example Values: `Democrat` | Value Statics: Total count 3 - Distinct count 1 - Null count 3075
state TEXT, --
last TEXT, -- Example Values: `Menendez` | Value Statics: Total count 1 - Distinct count 1 - Null count 3077
relation TEXT, -- Example Values: `son`, `nephew`, `cousin`, `daughter`, `grandson` | Value Statics: Total count 35 - Distinct count 13 - Null count 3043
state_rank TEXT, -- Example Values: `senior`, `junior` | Value Statics: Total count 147 - Distinct count 2 - Null count 2931
name TEXT, --
contact_form TEXT, --
party TEXT, -- Example Values: `Democrat`, `Republican`, `Independent` | Value Statics: Total count 3014 - Distinct count 3 - Null count 64
);
CREATE TABLE social-media
(
foreign key (bioguide) references current(bioguide_id),
instagram TEXT, --
thomas INTEGER, --
youtube TEXT, --
twitter TEXT, --
facebook TEXT, --
youtube_id TEXT, --
twitter_id REAL, --
facebook_id REAL, --
govtrack REAL, --
bioguide TEXT primary key,
instagram_id REAL, --
); |
legislator | Among all the current legislators who have served for more than 4 terms, what is the percentage of them being female? | have served for more than 4 years refers to count(bioguide) > 4; percentage = MULTIPLY(DIVIDE(SUM(gender_bio = 'F'), count(bioguide)), 100.0); female refers to gender_bio = 'F' | SELECT CAST(SUM(CASE WHEN gender_bio = 'F' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(T3.bioguide) FROM ( SELECT T2.bioguide, T1.gender_bio FROM current AS T1 INNER JOIN `current-terms` AS T2 ON T1.bioguide_id = T2.bioguide GROUP BY T2.bioguide HAVING COUNT(T2.bioguide) > 4 ) T3 | CREATE TABLE current
(
gender_bio TEXT, -- Example Values: `M`, `F` | Value Statics: Total count 541 - Distinct count 2 - Null count 0
suffix_name TEXT, -- Example Values: `Jr.`, `III`, `II` | Value Statics: Total count 20 - Distinct count 3 - Null count 521
house_history_id REAL, --
birthday_bio DATE, --
nickname_name TEXT, --
religion_bio TEXT, --
google_entity_id_id TEXT, --
govtrack_id INTEGER, --
cspan_id REAL, --
primary key (bioguide_id, cspan_id),
wikipedia_id TEXT, --
maplight_id REAL, --
last_name TEXT, --
icpsr_id REAL, --
fec_id TEXT, --
votesmart_id REAL, --
first_name TEXT, --
lis_id TEXT, --
bioguide_id TEXT, --
wikidata_id TEXT, --
middle_name TEXT, --
ballotpedia_id TEXT, --
opensecrets_id TEXT, --
official_full_name TEXT, --
thomas_id INTEGER, --
);
CREATE TABLE historical
(
fec_id TEXT, --
suffix_name TEXT, -- Example Values: `Jr.`, `Sr.`, `II`, `III`, `IV` | Value Statics: Total count 418 - Distinct count 5 - Null count 11446
govtrack_id INTEGER, --
house_history_id REAL, --
opensecrets_id TEXT, --
votesmart_id TEXT, --
bioguide_id TEXT primary key,
nickname_name TEXT, --
official_full_name TEXT, --
house_history_alternate_id TEXT, -- Example Values: `13283.0` | Value Statics: Total count 1 - Distinct count 1 - Null count 11863
gender_bio TEXT, -- Example Values: `M`, `F` | Value Statics: Total count 11864 - Distinct count 2 - Null count 0
bioguide_previous_id TEXT, -- Example Values: `['F000246']`, `['L000266']`, `['W000790']` | Value Statics: Total count 3 - Distinct count 3 - Null count 11861
icpsr_id REAL, --
wikipedia_id TEXT, --
birthday_bio TEXT, --
religion_bio TEXT, --
lis_id TEXT, --
middle_name TEXT, --
cspan_id TEXT, --
last_name TEXT, --
first_name TEXT, --
wikidata_id TEXT, --
thomas_id TEXT, --
ballotpedia_id TEXT, --
maplight_id TEXT, --
google_entity_id_id TEXT, --
);
CREATE TABLE historical-terms
(
bioguide TEXT primary key,
middle TEXT, --
title TEXT, -- Example Values: `Majority Leader`, `Speaker` | Value Statics: Total count 3 - Distinct count 2 - Null count 11861
party TEXT, --
type TEXT, -- Example Values: `sen`, `rep` | Value Statics: Total count 11858 - Distinct count 2 - Null count 6
phone TEXT, --
rss_url TEXT, -- Example Values: `http://radel.house.gov/news/rss.aspx`, `http://www.begich.senate.gov/public/?a=rss.feed`, `http://www.hagan.senate.gov/rss`, `http://negretemcleod.house.gov/rss.xml`, `http://garcia.house.gov/rss.xml` | Value Statics: Total count 12 - Distinct count 12 - Null count 11852
name TEXT, --
start TEXT, --
address TEXT, --
party_affiliations TEXT, -- Example Values: `{'start': '2009-01-06', 'end': '2009-12-22', 'party': 'Democrat'}`, `{'start': '2003-01-07', 'end': '2004-08-09', 'party': 'Democrat'}` | Value Statics: Total count 2 - Distinct count 2 - Null count 11862
relation TEXT, --
state_rank TEXT, -- Example Values: `junior`, `senior` | Value Statics: Total count 7 - Distinct count 2 - Null count 11857
last TEXT, -- Example Values: `Levy`, `Lambert`, `Bono` | Value Statics: Total count 3 - Distinct count 3 - Null count 11861
url TEXT, --
fax TEXT, --
contact_form TEXT, --
office TEXT, --
state TEXT, --
foreign key (bioguide) references historical(bioguide_id),
class REAL, -- Example Values: `2.0`, `1.0`, `3.0` | Value Statics: Total count 1256 - Distinct count 3 - Null count 10608
end TEXT, --
district REAL, --
chamber TEXT, -- Example Values: `house`, `senate` | Value Statics: Total count 3 - Distinct count 2 - Null count 11861
);
CREATE TABLE current-terms
(
foreign key (bioguide) references current(bioguide_id),
phone TEXT, --
party_affiliations TEXT, -- Example Values: `{'start': '2009-01-06', 'end': '2009-02-23', 'party': 'Independent'}`, `{'start': '1993-01-05', 'end': '1994-11-09', 'party': 'Democrat'}` | Value Statics: Total count 2 - Distinct count 2 - Null count 3076
title TEXT, -- Example Values: `Minority Whip`, `Majority Whip`, `Minority Leader`, `Majority Leader`, `Speaker` | Value Statics: Total count 28 - Distinct count 5 - Null count 3050
district REAL, --
bioguide TEXT, --
office TEXT, --
class REAL, -- Example Values: `1.0`, `2.0`, `3.0` | Value Statics: Total count 244 - Distinct count 3 - Null count 2834
type TEXT, -- Example Values: `rep`, `sen` | Value Statics: Total count 3014 - Distinct count 2 - Null count 64
start TEXT, --
address TEXT, --
rss_url TEXT, --
url TEXT, --
primary key (bioguide, end),
fax TEXT, --
chamber TEXT, -- Example Values: `senate`, `house` | Value Statics: Total count 28 - Distinct count 2 - Null count 3050
end TEXT, --
caucus TEXT, -- Example Values: `Democrat` | Value Statics: Total count 3 - Distinct count 1 - Null count 3075
state TEXT, --
last TEXT, -- Example Values: `Menendez` | Value Statics: Total count 1 - Distinct count 1 - Null count 3077
relation TEXT, -- Example Values: `son`, `nephew`, `cousin`, `daughter`, `grandson` | Value Statics: Total count 35 - Distinct count 13 - Null count 3043
state_rank TEXT, -- Example Values: `senior`, `junior` | Value Statics: Total count 147 - Distinct count 2 - Null count 2931
name TEXT, --
contact_form TEXT, --
party TEXT, -- Example Values: `Democrat`, `Republican`, `Independent` | Value Statics: Total count 3014 - Distinct count 3 - Null count 64
);
CREATE TABLE social-media
(
foreign key (bioguide) references current(bioguide_id),
instagram TEXT, --
thomas INTEGER, --
youtube TEXT, --
twitter TEXT, --
facebook TEXT, --
youtube_id TEXT, --
twitter_id REAL, --
facebook_id REAL, --
govtrack REAL, --
bioguide TEXT primary key,
instagram_id REAL, --
); |
shakespeare | How many of Shakespeare's works were finished before the year 1602? | finished before the year 1602 refers to Date < 1602 | SELECT COUNT(id) FROM works WHERE Date < 1602 | CREATE TABLE characters
(
CharName TEXT not null, --
Abbrev TEXT not null, --
Description TEXT not null, --
id INTEGER primary key autoincrement,
);
CREATE TABLE paragraphs
(
chapter_id INTEGER default 0 not null references chapters, --
character_id INTEGER not null references characters, --
ParagraphNum INTEGER not null, --
PlainText TEXT not null, --
id INTEGER primary key autoincrement,
);
CREATE TABLE works
(
GenreType TEXT not null, -- Example Values: `Comedy`, `Tragedy`, `History`, `Poem`, `Sonnet` | Value Statics: Total count 43 - Distinct count 5 - Null count 0
Title TEXT not null, --
Date INTEGER not null, --
id INTEGER primary key autoincrement,
LongTitle TEXT not null, --
);
CREATE TABLE chapters
(
work_id INTEGER not null references works, --
Act INTEGER not null, -- Example Values: `1`, `2`, `3`, `4`, `5` | Value Statics: Total count 945 - Distinct count 6 - Null count 0
Description TEXT not null, --
id INTEGER primary key autoincrement,
Scene INTEGER not null, --
); |
professional_basketball | How many All Star players who played in the 1973 season were black? | 1973 season refers to season_id = 1973; black refers to race = 'B' | SELECT COUNT(DISTINCT T1.playerID) FROM players AS T1 INNER JOIN player_allstar AS T2 ON T1.playerID = T2.playerID WHERE T2.season_id = 1973 AND T1.race = 'B' | CREATE TABLE players_teams
(
PostGS INTEGER, --
PostdRebounds INTEGER, --
PostPF INTEGER, --
tmID TEXT, --
threeAttempted INTEGER, --
PostRebounds INTEGER, --
assists INTEGER, --
threeMade INTEGER, --
PostBlocks INTEGER, --
PostTurnovers INTEGER, --
GP INTEGER, --
lgID TEXT, -- Example Values: `NBA`, `NBL`, `ABA`, `ABL1`, `NPBL` | Value Statics: Total count 23751 - Distinct count 6 - Null count 0
foreign key (tmID, year) references teams (tmID, year) on update cascade on delete cascade,
PostfgMade INTEGER, --
steals INTEGER, --
oRebounds INTEGER, --
PostftAttempted INTEGER, --
ftAttempted INTEGER, --
ftMade INTEGER, --
points INTEGER, --
PostfgAttempted INTEGER, --
PostftMade INTEGER, --
note TEXT, -- Example Values: `C` | Value Statics: Total count 43 - Distinct count 1 - Null count 23708
dRebounds INTEGER, --
PostSteals INTEGER, --
blocks INTEGER, --
PostAssists INTEGER, --
minutes INTEGER, --
fgAttempted INTEGER, --
playerID TEXT not null references players on update cascade on delete cascade, --
PostthreeMade INTEGER, --
PostPoints INTEGER, --
year INTEGER, --
PF INTEGER, --
fgMade INTEGER, --
PostthreeAttempted INTEGER, --
rebounds INTEGER, --
id INTEGER primary key autoincrement,
stint INTEGER, -- Example Values: `1`, `2`, `0`, `3`, `4` | Value Statics: Total count 23751 - Distinct count 6 - Null count 0
PostMinutes INTEGER, --
PostGP INTEGER, --
turnovers INTEGER, --
PostoRebounds INTEGER, --
GS INTEGER, --
);
CREATE TABLE awards_coaches
(
award TEXT, -- Example Values: `NBA Coach of the Year`, `ABA Coach of the Year` | Value Statics: Total count 61 - Distinct count 2 - Null count 0
id INTEGER primary key autoincrement,
note TEXT, -- Example Values: `tie` | Value Statics: Total count 4 - Distinct count 1 - Null count 57
coachID TEXT, --
lgID TEXT, -- Example Values: `NBA`, `ABA` | Value Statics: Total count 61 - Distinct count 2 - Null count 0
foreign key (coachID, year) references coaches (coachID, year) on update cascade on delete cascade,
year INTEGER, --
);
CREATE TABLE draft
(
draftOverall INTEGER null, --
lgID TEXT null, -- Example Values: `ABA`, `NBA` | Value Statics: Total count 8621 - Distinct count 2 - Null count 0
suffixName TEXT null, -- Example Values: `Jr.` | Value Statics: Total count 2 - Distinct count 1 - Null count 8619
draftYear INTEGER null, --
draftSelection INTEGER null, --
tmID TEXT null, --
draftRound INTEGER null, --
lastName TEXT null, --
playerID TEXT null, --
draftFrom TEXT null, --
id INTEGER default 0 not null primary key,
firstName TEXT null, --
foreign key (tmID, draftYear) references teams (tmID, year) on update cascade on delete cascade,
foreign key (tmID, draftYear) references teams (tmID, year) on update cascade on delete cascade,
);
CREATE TABLE player_allstar
(
rebounds INTEGER null, --
playerID TEXT not null, --
season_id INTEGER not null, --
assists INTEGER null, --
conference TEXT null, -- Example Values: `East`, `West`, `Weset`, `Allstars`, `Denver` | Value Statics: Total count 1608 - Distinct count 5 - Null count 0
points INTEGER null, --
personal_fouls INTEGER null, -- Example Values: `3`, `2`, `0`, `1`, `5` | Value Statics: Total count 540 - Distinct count 8 - Null count 1068
ft_attempted INTEGER null, -- Example Values: `2`, `4`, `0`, `6`, `3` | Value Statics: Total count 1561 - Distinct count 17 - Null count 47
fg_attempted INTEGER null, --
league_id TEXT null, -- Example Values: `NBA`, `ABA` | Value Statics: Total count 1608 - Distinct count 2 - Null count 0
foreign key (playerID) references players (playerID) on update cascade on delete cascade,
fg_made INTEGER null, -- Example Values: `4`, `8`, `5`, `7`, `3` | Value Statics: Total count 1561 - Distinct count 18 - Null count 47
ft_made INTEGER null, -- Example Values: `2`, `3`, `0`, `1`, `4` | Value Statics: Total count 1561 - Distinct count 13 - Null count 47
steals INTEGER null, -- Example Values: `3`, `0`, `1`, `2`, `5` | Value Statics: Total count 398 - Distinct count 7 - Null count 1210
games_played INTEGER null, -- Example Values: `1` | Value Statics: Total count 1608 - Distinct count 1 - Null count 0
first_name TEXT null, --
d_rebounds INTEGER null, -- Example Values: `2`, `5`, `0`, `1`, `4` | Value Statics: Total count 493 - Distinct count 14 - Null count 1115
last_name TEXT null, --
primary key (playerID, season_id),
turnovers INTEGER null, -- Example Values: `1`, `0`, `3`, `2`, `4` | Value Statics: Total count 493 - Distinct count 9 - Null count 1115
three_made INTEGER null, -- Example Values: `0`, `1`, `3`, `5`, `4` | Value Statics: Total count 566 - Distinct count 7 - Null count 1042
minutes INTEGER null, --
blocks INTEGER null, -- Example Values: `2`, `0`, `1`, `3`, `5` | Value Statics: Total count 398 - Distinct count 6 - Null count 1210
three_attempted INTEGER null, -- Example Values: `0`, `1`, `6`, `7`, `10` | Value Statics: Total count 540 - Distinct count 12 - Null count 1068
o_rebounds INTEGER null, -- Example Values: `1`, `2`, `0`, `3`, `4` | Value Statics: Total count 493 - Distinct count 10 - Null count 1115
);
CREATE TABLE awards_players
(
foreign key (playerID) references players (playerID) on update cascade on delete cascade,
year INTEGER not null, --
pos TEXT null, -- Example Values: `C`, `F`, `G`, `F/G`, `F/C` | Value Statics: Total count 833 - Distinct count 5 - Null count 886
primary key (playerID, year, award),
lgID TEXT null, -- Example Values: `NBA`, `ABA`, `NBL`, `ABL1` | Value Statics: Total count 1719 - Distinct count 4 - Null count 0
award TEXT not null, --
playerID TEXT not null, --
note TEXT null, -- Example Values: `tie` | Value Statics: Total count 37 - Distinct count 1 - Null count 1682
);
CREATE TABLE series_post
(
tmIDLoser TEXT, --
id INTEGER primary key autoincrement,
series TEXT, -- Example Values: `O`, `M`, `N`, `A`, `K` | Value Statics: Total count 775 - Distinct count 11 - Null count 0
tmIDWinner TEXT, --
round TEXT, -- Example Values: `F`, `QF`, `SF`, `DT`, `DF` | Value Statics: Total count 775 - Distinct count 11 - Null count 0
year INTEGER, --
foreign key (tmIDLoser, year) references teams (tmID, year) on update cascade on delete cascade,
foreign key (tmIDWinner, year) references teams (tmID, year) on update cascade on delete cascade,
W INTEGER, -- Example Values: `4`, `2`, `1`, `3`, `0` | Value Statics: Total count 775 - Distinct count 5 - Null count 0
lgIDLoser TEXT, -- Example Values: `NBA`, `ABA` | Value Statics: Total count 775 - Distinct count 2 - Null count 0
lgIDWinner TEXT, -- Example Values: `NBA`, `ABA` | Value Statics: Total count 775 - Distinct count 2 - Null count 0
L INTEGER, -- Example Values: `1`, `0`, `2`, `3`, `4` | Value Statics: Total count 775 - Distinct count 5 - Null count 0
);
CREATE TABLE players
(
nameGiven TEXT null, -- Example Values: `nameGiven`, `Mort`, `Robert`, `Jim`, `Mike` | Value Statics: Total count 10 - Distinct count 9 - Null count 5052
lastseason INTEGER null, -- Example Values: `0`, `1951` | Value Statics: Total count 5047 - Distinct count 2 - Null count 15
hsCountry TEXT null, --
firstName TEXT null, --
hsCity TEXT null, --
firstseason INTEGER null, -- Example Values: `0`, `1951` | Value Statics: Total count 5047 - Distinct count 2 - Null count 15
weight INTEGER null, --
birthCountry TEXT null, --
race TEXT null, -- Example Values: `B`, `W`, `O`, `1`, `r` | Value Statics: Total count 4903 - Distinct count 5 - Null count 159
lastName TEXT null, --
birthDate DATE null, --
collegeOther TEXT null, --
birthState TEXT null, --
useFirst TEXT null, --
pos TEXT null, -- Example Values: `F-C`, `C`, `G`, `G-F`, `C-F` | Value Statics: Total count 4880 - Distinct count 14 - Null count 182
playerID TEXT not null primary key,
college TEXT null, --
highSchool TEXT null, --
hsState TEXT null, --
height REAL null, --
deathDate DATE null, --
nameSuffix TEXT null, -- Example Values: `Jr.`, `III`, `nameSuffix`, `II`, `IV` | Value Statics: Total count 324 - Distinct count 6 - Null count 4738
nameNick TEXT null, --
fullGivenName TEXT null, --
birthCity TEXT null, --
middleName TEXT null, --
);
CREATE TABLE teams
(
d_pts INTEGER null, --
name TEXT null, --
homeLost INTEGER null, --
o_ftm INTEGER null, --
franchID TEXT null, --
tmID TEXT not null, --
awayWon INTEGER null, --
primary key (year, tmID),
o_fgm INTEGER null, --
year INTEGER not null, --
awayLost INTEGER null, --
arena TEXT null, --
confID TEXT null, -- Example Values: `EC`, `WC` | Value Statics: Total count 1064 - Distinct count 2 - Null count 472
games INTEGER null, --
lost INTEGER null, --
divID TEXT null, -- Example Values: `EA`, `WE`, `ED`, `WD`, `SO` | Value Statics: Total count 1498 - Distinct count 13 - Null count 38
lgID TEXT null, -- Example Values: `NBL`, `NBA`, `PBLA`, `NPBL`, `ABL1` | Value Statics: Total count 1536 - Distinct count 6 - Null count 0
homeWon INTEGER null, --
confRank INTEGER null, -- Example Values: `0`, `4`, `3`, `5`, `7` | Value Statics: Total count 1536 - Distinct count 16 - Null count 0
o_pts INTEGER null, --
`rank` INTEGER null, -- Example Values: `1`, `2`, `4`, `5`, `6` | Value Statics: Total count 1536 - Distinct count 10 - Null count 0
playoff TEXT null, -- Example Values: `CF`, `WC`, `LC`, `CS`, `F` | Value Statics: Total count 901 - Distinct count 15 - Null count 635
won INTEGER null, --
);
CREATE TABLE coaches
(
primary key (coachID, year, tmID, stint),
lgID TEXT null, -- Example Values: `NBA`, `ABA`, `ABL1`, `PBLA`, `NPBL` | Value Statics: Total count 1689 - Distinct count 5 - Null count 0
post_losses INTEGER null, -- Example Values: `3`, `9`, `7`, `8`, `0` | Value Statics: Total count 1649 - Distinct count 12 - Null count 40
year INTEGER not null, --
won INTEGER null, --
foreign key (tmID, year) references teams (tmID, year) on update cascade on delete cascade,
post_wins INTEGER null, -- Example Values: `0`, `12`, `9`, `13`, `1` | Value Statics: Total count 1649 - Distinct count 17 - Null count 40
coachID TEXT not null, --
tmID TEXT not null, --
lost INTEGER null, --
stint INTEGER not null, -- Example Values: `2`, `1`, `4`, `5`, `3` | Value Statics: Total count 1689 - Distinct count 5 - Null count 0
); |
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 | CREATE TABLE current
(
gender_bio TEXT, -- Example Values: `M`, `F` | Value Statics: Total count 541 - Distinct count 2 - Null count 0
suffix_name TEXT, -- Example Values: `Jr.`, `III`, `II` | Value Statics: Total count 20 - Distinct count 3 - Null count 521
house_history_id REAL, --
birthday_bio DATE, --
nickname_name TEXT, --
religion_bio TEXT, --
google_entity_id_id TEXT, --
govtrack_id INTEGER, --
cspan_id REAL, --
primary key (bioguide_id, cspan_id),
wikipedia_id TEXT, --
maplight_id REAL, --
last_name TEXT, --
icpsr_id REAL, --
fec_id TEXT, --
votesmart_id REAL, --
first_name TEXT, --
lis_id TEXT, --
bioguide_id TEXT, --
wikidata_id TEXT, --
middle_name TEXT, --
ballotpedia_id TEXT, --
opensecrets_id TEXT, --
official_full_name TEXT, --
thomas_id INTEGER, --
);
CREATE TABLE historical
(
fec_id TEXT, --
suffix_name TEXT, -- Example Values: `Jr.`, `Sr.`, `II`, `III`, `IV` | Value Statics: Total count 418 - Distinct count 5 - Null count 11446
govtrack_id INTEGER, --
house_history_id REAL, --
opensecrets_id TEXT, --
votesmart_id TEXT, --
bioguide_id TEXT primary key,
nickname_name TEXT, --
official_full_name TEXT, --
house_history_alternate_id TEXT, -- Example Values: `13283.0` | Value Statics: Total count 1 - Distinct count 1 - Null count 11863
gender_bio TEXT, -- Example Values: `M`, `F` | Value Statics: Total count 11864 - Distinct count 2 - Null count 0
bioguide_previous_id TEXT, -- Example Values: `['F000246']`, `['L000266']`, `['W000790']` | Value Statics: Total count 3 - Distinct count 3 - Null count 11861
icpsr_id REAL, --
wikipedia_id TEXT, --
birthday_bio TEXT, --
religion_bio TEXT, --
lis_id TEXT, --
middle_name TEXT, --
cspan_id TEXT, --
last_name TEXT, --
first_name TEXT, --
wikidata_id TEXT, --
thomas_id TEXT, --
ballotpedia_id TEXT, --
maplight_id TEXT, --
google_entity_id_id TEXT, --
);
CREATE TABLE historical-terms
(
bioguide TEXT primary key,
middle TEXT, --
title TEXT, -- Example Values: `Majority Leader`, `Speaker` | Value Statics: Total count 3 - Distinct count 2 - Null count 11861
party TEXT, --
type TEXT, -- Example Values: `sen`, `rep` | Value Statics: Total count 11858 - Distinct count 2 - Null count 6
phone TEXT, --
rss_url TEXT, -- Example Values: `http://radel.house.gov/news/rss.aspx`, `http://www.begich.senate.gov/public/?a=rss.feed`, `http://www.hagan.senate.gov/rss`, `http://negretemcleod.house.gov/rss.xml`, `http://garcia.house.gov/rss.xml` | Value Statics: Total count 12 - Distinct count 12 - Null count 11852
name TEXT, --
start TEXT, --
address TEXT, --
party_affiliations TEXT, -- Example Values: `{'start': '2009-01-06', 'end': '2009-12-22', 'party': 'Democrat'}`, `{'start': '2003-01-07', 'end': '2004-08-09', 'party': 'Democrat'}` | Value Statics: Total count 2 - Distinct count 2 - Null count 11862
relation TEXT, --
state_rank TEXT, -- Example Values: `junior`, `senior` | Value Statics: Total count 7 - Distinct count 2 - Null count 11857
last TEXT, -- Example Values: `Levy`, `Lambert`, `Bono` | Value Statics: Total count 3 - Distinct count 3 - Null count 11861
url TEXT, --
fax TEXT, --
contact_form TEXT, --
office TEXT, --
state TEXT, --
foreign key (bioguide) references historical(bioguide_id),
class REAL, -- Example Values: `2.0`, `1.0`, `3.0` | Value Statics: Total count 1256 - Distinct count 3 - Null count 10608
end TEXT, --
district REAL, --
chamber TEXT, -- Example Values: `house`, `senate` | Value Statics: Total count 3 - Distinct count 2 - Null count 11861
);
CREATE TABLE current-terms
(
foreign key (bioguide) references current(bioguide_id),
phone TEXT, --
party_affiliations TEXT, -- Example Values: `{'start': '2009-01-06', 'end': '2009-02-23', 'party': 'Independent'}`, `{'start': '1993-01-05', 'end': '1994-11-09', 'party': 'Democrat'}` | Value Statics: Total count 2 - Distinct count 2 - Null count 3076
title TEXT, -- Example Values: `Minority Whip`, `Majority Whip`, `Minority Leader`, `Majority Leader`, `Speaker` | Value Statics: Total count 28 - Distinct count 5 - Null count 3050
district REAL, --
bioguide TEXT, --
office TEXT, --
class REAL, -- Example Values: `1.0`, `2.0`, `3.0` | Value Statics: Total count 244 - Distinct count 3 - Null count 2834
type TEXT, -- Example Values: `rep`, `sen` | Value Statics: Total count 3014 - Distinct count 2 - Null count 64
start TEXT, --
address TEXT, --
rss_url TEXT, --
url TEXT, --
primary key (bioguide, end),
fax TEXT, --
chamber TEXT, -- Example Values: `senate`, `house` | Value Statics: Total count 28 - Distinct count 2 - Null count 3050
end TEXT, --
caucus TEXT, -- Example Values: `Democrat` | Value Statics: Total count 3 - Distinct count 1 - Null count 3075
state TEXT, --
last TEXT, -- Example Values: `Menendez` | Value Statics: Total count 1 - Distinct count 1 - Null count 3077
relation TEXT, -- Example Values: `son`, `nephew`, `cousin`, `daughter`, `grandson` | Value Statics: Total count 35 - Distinct count 13 - Null count 3043
state_rank TEXT, -- Example Values: `senior`, `junior` | Value Statics: Total count 147 - Distinct count 2 - Null count 2931
name TEXT, --
contact_form TEXT, --
party TEXT, -- Example Values: `Democrat`, `Republican`, `Independent` | Value Statics: Total count 3014 - Distinct count 3 - Null count 64
);
CREATE TABLE social-media
(
foreign key (bioguide) references current(bioguide_id),
instagram TEXT, --
thomas INTEGER, --
youtube TEXT, --
twitter TEXT, --
facebook TEXT, --
youtube_id TEXT, --
twitter_id REAL, --
facebook_id REAL, --
govtrack REAL, --
bioguide TEXT primary key,
instagram_id REAL, --
); |
professional_basketball | Which team did the all league rebound champion play in 1997? Give the full name of the team. | rebound champion refers to max(rebounds); 1997 refers to 1997; full name refers to teams.name | SELECT T1.name FROM teams AS T1 INNER JOIN players_teams AS T2 ON T1.tmID = T2.tmID AND T1.year = T2.year WHERE T2.year = 1997 GROUP BY T1.name ORDER BY SUM(rebounds + dRebounds) DESC LIMIT 1 | CREATE TABLE players_teams
(
PostGS INTEGER, --
PostdRebounds INTEGER, --
PostPF INTEGER, --
tmID TEXT, --
threeAttempted INTEGER, --
PostRebounds INTEGER, --
assists INTEGER, --
threeMade INTEGER, --
PostBlocks INTEGER, --
PostTurnovers INTEGER, --
GP INTEGER, --
lgID TEXT, -- Example Values: `NBA`, `NBL`, `ABA`, `ABL1`, `NPBL` | Value Statics: Total count 23751 - Distinct count 6 - Null count 0
foreign key (tmID, year) references teams (tmID, year) on update cascade on delete cascade,
PostfgMade INTEGER, --
steals INTEGER, --
oRebounds INTEGER, --
PostftAttempted INTEGER, --
ftAttempted INTEGER, --
ftMade INTEGER, --
points INTEGER, --
PostfgAttempted INTEGER, --
PostftMade INTEGER, --
note TEXT, -- Example Values: `C` | Value Statics: Total count 43 - Distinct count 1 - Null count 23708
dRebounds INTEGER, --
PostSteals INTEGER, --
blocks INTEGER, --
PostAssists INTEGER, --
minutes INTEGER, --
fgAttempted INTEGER, --
playerID TEXT not null references players on update cascade on delete cascade, --
PostthreeMade INTEGER, --
PostPoints INTEGER, --
year INTEGER, --
PF INTEGER, --
fgMade INTEGER, --
PostthreeAttempted INTEGER, --
rebounds INTEGER, --
id INTEGER primary key autoincrement,
stint INTEGER, -- Example Values: `1`, `2`, `0`, `3`, `4` | Value Statics: Total count 23751 - Distinct count 6 - Null count 0
PostMinutes INTEGER, --
PostGP INTEGER, --
turnovers INTEGER, --
PostoRebounds INTEGER, --
GS INTEGER, --
);
CREATE TABLE awards_coaches
(
award TEXT, -- Example Values: `NBA Coach of the Year`, `ABA Coach of the Year` | Value Statics: Total count 61 - Distinct count 2 - Null count 0
id INTEGER primary key autoincrement,
note TEXT, -- Example Values: `tie` | Value Statics: Total count 4 - Distinct count 1 - Null count 57
coachID TEXT, --
lgID TEXT, -- Example Values: `NBA`, `ABA` | Value Statics: Total count 61 - Distinct count 2 - Null count 0
foreign key (coachID, year) references coaches (coachID, year) on update cascade on delete cascade,
year INTEGER, --
);
CREATE TABLE draft
(
draftOverall INTEGER null, --
lgID TEXT null, -- Example Values: `ABA`, `NBA` | Value Statics: Total count 8621 - Distinct count 2 - Null count 0
suffixName TEXT null, -- Example Values: `Jr.` | Value Statics: Total count 2 - Distinct count 1 - Null count 8619
draftYear INTEGER null, --
draftSelection INTEGER null, --
tmID TEXT null, --
draftRound INTEGER null, --
lastName TEXT null, --
playerID TEXT null, --
draftFrom TEXT null, --
id INTEGER default 0 not null primary key,
firstName TEXT null, --
foreign key (tmID, draftYear) references teams (tmID, year) on update cascade on delete cascade,
foreign key (tmID, draftYear) references teams (tmID, year) on update cascade on delete cascade,
);
CREATE TABLE player_allstar
(
rebounds INTEGER null, --
playerID TEXT not null, --
season_id INTEGER not null, --
assists INTEGER null, --
conference TEXT null, -- Example Values: `East`, `West`, `Weset`, `Allstars`, `Denver` | Value Statics: Total count 1608 - Distinct count 5 - Null count 0
points INTEGER null, --
personal_fouls INTEGER null, -- Example Values: `3`, `2`, `0`, `1`, `5` | Value Statics: Total count 540 - Distinct count 8 - Null count 1068
ft_attempted INTEGER null, -- Example Values: `2`, `4`, `0`, `6`, `3` | Value Statics: Total count 1561 - Distinct count 17 - Null count 47
fg_attempted INTEGER null, --
league_id TEXT null, -- Example Values: `NBA`, `ABA` | Value Statics: Total count 1608 - Distinct count 2 - Null count 0
foreign key (playerID) references players (playerID) on update cascade on delete cascade,
fg_made INTEGER null, -- Example Values: `4`, `8`, `5`, `7`, `3` | Value Statics: Total count 1561 - Distinct count 18 - Null count 47
ft_made INTEGER null, -- Example Values: `2`, `3`, `0`, `1`, `4` | Value Statics: Total count 1561 - Distinct count 13 - Null count 47
steals INTEGER null, -- Example Values: `3`, `0`, `1`, `2`, `5` | Value Statics: Total count 398 - Distinct count 7 - Null count 1210
games_played INTEGER null, -- Example Values: `1` | Value Statics: Total count 1608 - Distinct count 1 - Null count 0
first_name TEXT null, --
d_rebounds INTEGER null, -- Example Values: `2`, `5`, `0`, `1`, `4` | Value Statics: Total count 493 - Distinct count 14 - Null count 1115
last_name TEXT null, --
primary key (playerID, season_id),
turnovers INTEGER null, -- Example Values: `1`, `0`, `3`, `2`, `4` | Value Statics: Total count 493 - Distinct count 9 - Null count 1115
three_made INTEGER null, -- Example Values: `0`, `1`, `3`, `5`, `4` | Value Statics: Total count 566 - Distinct count 7 - Null count 1042
minutes INTEGER null, --
blocks INTEGER null, -- Example Values: `2`, `0`, `1`, `3`, `5` | Value Statics: Total count 398 - Distinct count 6 - Null count 1210
three_attempted INTEGER null, -- Example Values: `0`, `1`, `6`, `7`, `10` | Value Statics: Total count 540 - Distinct count 12 - Null count 1068
o_rebounds INTEGER null, -- Example Values: `1`, `2`, `0`, `3`, `4` | Value Statics: Total count 493 - Distinct count 10 - Null count 1115
);
CREATE TABLE awards_players
(
foreign key (playerID) references players (playerID) on update cascade on delete cascade,
year INTEGER not null, --
pos TEXT null, -- Example Values: `C`, `F`, `G`, `F/G`, `F/C` | Value Statics: Total count 833 - Distinct count 5 - Null count 886
primary key (playerID, year, award),
lgID TEXT null, -- Example Values: `NBA`, `ABA`, `NBL`, `ABL1` | Value Statics: Total count 1719 - Distinct count 4 - Null count 0
award TEXT not null, --
playerID TEXT not null, --
note TEXT null, -- Example Values: `tie` | Value Statics: Total count 37 - Distinct count 1 - Null count 1682
);
CREATE TABLE series_post
(
tmIDLoser TEXT, --
id INTEGER primary key autoincrement,
series TEXT, -- Example Values: `O`, `M`, `N`, `A`, `K` | Value Statics: Total count 775 - Distinct count 11 - Null count 0
tmIDWinner TEXT, --
round TEXT, -- Example Values: `F`, `QF`, `SF`, `DT`, `DF` | Value Statics: Total count 775 - Distinct count 11 - Null count 0
year INTEGER, --
foreign key (tmIDLoser, year) references teams (tmID, year) on update cascade on delete cascade,
foreign key (tmIDWinner, year) references teams (tmID, year) on update cascade on delete cascade,
W INTEGER, -- Example Values: `4`, `2`, `1`, `3`, `0` | Value Statics: Total count 775 - Distinct count 5 - Null count 0
lgIDLoser TEXT, -- Example Values: `NBA`, `ABA` | Value Statics: Total count 775 - Distinct count 2 - Null count 0
lgIDWinner TEXT, -- Example Values: `NBA`, `ABA` | Value Statics: Total count 775 - Distinct count 2 - Null count 0
L INTEGER, -- Example Values: `1`, `0`, `2`, `3`, `4` | Value Statics: Total count 775 - Distinct count 5 - Null count 0
);
CREATE TABLE players
(
nameGiven TEXT null, -- Example Values: `nameGiven`, `Mort`, `Robert`, `Jim`, `Mike` | Value Statics: Total count 10 - Distinct count 9 - Null count 5052
lastseason INTEGER null, -- Example Values: `0`, `1951` | Value Statics: Total count 5047 - Distinct count 2 - Null count 15
hsCountry TEXT null, --
firstName TEXT null, --
hsCity TEXT null, --
firstseason INTEGER null, -- Example Values: `0`, `1951` | Value Statics: Total count 5047 - Distinct count 2 - Null count 15
weight INTEGER null, --
birthCountry TEXT null, --
race TEXT null, -- Example Values: `B`, `W`, `O`, `1`, `r` | Value Statics: Total count 4903 - Distinct count 5 - Null count 159
lastName TEXT null, --
birthDate DATE null, --
collegeOther TEXT null, --
birthState TEXT null, --
useFirst TEXT null, --
pos TEXT null, -- Example Values: `F-C`, `C`, `G`, `G-F`, `C-F` | Value Statics: Total count 4880 - Distinct count 14 - Null count 182
playerID TEXT not null primary key,
college TEXT null, --
highSchool TEXT null, --
hsState TEXT null, --
height REAL null, --
deathDate DATE null, --
nameSuffix TEXT null, -- Example Values: `Jr.`, `III`, `nameSuffix`, `II`, `IV` | Value Statics: Total count 324 - Distinct count 6 - Null count 4738
nameNick TEXT null, --
fullGivenName TEXT null, --
birthCity TEXT null, --
middleName TEXT null, --
);
CREATE TABLE teams
(
d_pts INTEGER null, --
name TEXT null, --
homeLost INTEGER null, --
o_ftm INTEGER null, --
franchID TEXT null, --
tmID TEXT not null, --
awayWon INTEGER null, --
primary key (year, tmID),
o_fgm INTEGER null, --
year INTEGER not null, --
awayLost INTEGER null, --
arena TEXT null, --
confID TEXT null, -- Example Values: `EC`, `WC` | Value Statics: Total count 1064 - Distinct count 2 - Null count 472
games INTEGER null, --
lost INTEGER null, --
divID TEXT null, -- Example Values: `EA`, `WE`, `ED`, `WD`, `SO` | Value Statics: Total count 1498 - Distinct count 13 - Null count 38
lgID TEXT null, -- Example Values: `NBL`, `NBA`, `PBLA`, `NPBL`, `ABL1` | Value Statics: Total count 1536 - Distinct count 6 - Null count 0
homeWon INTEGER null, --
confRank INTEGER null, -- Example Values: `0`, `4`, `3`, `5`, `7` | Value Statics: Total count 1536 - Distinct count 16 - Null count 0
o_pts INTEGER null, --
`rank` INTEGER null, -- Example Values: `1`, `2`, `4`, `5`, `6` | Value Statics: Total count 1536 - Distinct count 10 - Null count 0
playoff TEXT null, -- Example Values: `CF`, `WC`, `LC`, `CS`, `F` | Value Statics: Total count 901 - Distinct count 15 - Null count 635
won INTEGER null, --
);
CREATE TABLE coaches
(
primary key (coachID, year, tmID, stint),
lgID TEXT null, -- Example Values: `NBA`, `ABA`, `ABL1`, `PBLA`, `NPBL` | Value Statics: Total count 1689 - Distinct count 5 - Null count 0
post_losses INTEGER null, -- Example Values: `3`, `9`, `7`, `8`, `0` | Value Statics: Total count 1649 - Distinct count 12 - Null count 40
year INTEGER not null, --
won INTEGER null, --
foreign key (tmID, year) references teams (tmID, year) on update cascade on delete cascade,
post_wins INTEGER null, -- Example Values: `0`, `12`, `9`, `13`, `1` | Value Statics: Total count 1649 - Distinct count 17 - Null count 40
coachID TEXT not null, --
tmID TEXT not null, --
lost INTEGER null, --
stint INTEGER not null, -- Example Values: `2`, `1`, `4`, `5`, `3` | Value Statics: Total count 1689 - Distinct count 5 - Null count 0
); |
legislator | What is the total number of senators New Jersey have? | senators refers to type = 'rep'; New Jersey refers to state = 'NJ'; | SELECT COUNT(type) FROM `historical-terms` WHERE state = 'NJ' AND type = 'rep' | CREATE TABLE current
(
gender_bio TEXT, -- Example Values: `M`, `F` | Value Statics: Total count 541 - Distinct count 2 - Null count 0
suffix_name TEXT, -- Example Values: `Jr.`, `III`, `II` | Value Statics: Total count 20 - Distinct count 3 - Null count 521
house_history_id REAL, --
birthday_bio DATE, --
nickname_name TEXT, --
religion_bio TEXT, --
google_entity_id_id TEXT, --
govtrack_id INTEGER, --
cspan_id REAL, --
primary key (bioguide_id, cspan_id),
wikipedia_id TEXT, --
maplight_id REAL, --
last_name TEXT, --
icpsr_id REAL, --
fec_id TEXT, --
votesmart_id REAL, --
first_name TEXT, --
lis_id TEXT, --
bioguide_id TEXT, --
wikidata_id TEXT, --
middle_name TEXT, --
ballotpedia_id TEXT, --
opensecrets_id TEXT, --
official_full_name TEXT, --
thomas_id INTEGER, --
);
CREATE TABLE historical
(
fec_id TEXT, --
suffix_name TEXT, -- Example Values: `Jr.`, `Sr.`, `II`, `III`, `IV` | Value Statics: Total count 418 - Distinct count 5 - Null count 11446
govtrack_id INTEGER, --
house_history_id REAL, --
opensecrets_id TEXT, --
votesmart_id TEXT, --
bioguide_id TEXT primary key,
nickname_name TEXT, --
official_full_name TEXT, --
house_history_alternate_id TEXT, -- Example Values: `13283.0` | Value Statics: Total count 1 - Distinct count 1 - Null count 11863
gender_bio TEXT, -- Example Values: `M`, `F` | Value Statics: Total count 11864 - Distinct count 2 - Null count 0
bioguide_previous_id TEXT, -- Example Values: `['F000246']`, `['L000266']`, `['W000790']` | Value Statics: Total count 3 - Distinct count 3 - Null count 11861
icpsr_id REAL, --
wikipedia_id TEXT, --
birthday_bio TEXT, --
religion_bio TEXT, --
lis_id TEXT, --
middle_name TEXT, --
cspan_id TEXT, --
last_name TEXT, --
first_name TEXT, --
wikidata_id TEXT, --
thomas_id TEXT, --
ballotpedia_id TEXT, --
maplight_id TEXT, --
google_entity_id_id TEXT, --
);
CREATE TABLE historical-terms
(
bioguide TEXT primary key,
middle TEXT, --
title TEXT, -- Example Values: `Majority Leader`, `Speaker` | Value Statics: Total count 3 - Distinct count 2 - Null count 11861
party TEXT, --
type TEXT, -- Example Values: `sen`, `rep` | Value Statics: Total count 11858 - Distinct count 2 - Null count 6
phone TEXT, --
rss_url TEXT, -- Example Values: `http://radel.house.gov/news/rss.aspx`, `http://www.begich.senate.gov/public/?a=rss.feed`, `http://www.hagan.senate.gov/rss`, `http://negretemcleod.house.gov/rss.xml`, `http://garcia.house.gov/rss.xml` | Value Statics: Total count 12 - Distinct count 12 - Null count 11852
name TEXT, --
start TEXT, --
address TEXT, --
party_affiliations TEXT, -- Example Values: `{'start': '2009-01-06', 'end': '2009-12-22', 'party': 'Democrat'}`, `{'start': '2003-01-07', 'end': '2004-08-09', 'party': 'Democrat'}` | Value Statics: Total count 2 - Distinct count 2 - Null count 11862
relation TEXT, --
state_rank TEXT, -- Example Values: `junior`, `senior` | Value Statics: Total count 7 - Distinct count 2 - Null count 11857
last TEXT, -- Example Values: `Levy`, `Lambert`, `Bono` | Value Statics: Total count 3 - Distinct count 3 - Null count 11861
url TEXT, --
fax TEXT, --
contact_form TEXT, --
office TEXT, --
state TEXT, --
foreign key (bioguide) references historical(bioguide_id),
class REAL, -- Example Values: `2.0`, `1.0`, `3.0` | Value Statics: Total count 1256 - Distinct count 3 - Null count 10608
end TEXT, --
district REAL, --
chamber TEXT, -- Example Values: `house`, `senate` | Value Statics: Total count 3 - Distinct count 2 - Null count 11861
);
CREATE TABLE current-terms
(
foreign key (bioguide) references current(bioguide_id),
phone TEXT, --
party_affiliations TEXT, -- Example Values: `{'start': '2009-01-06', 'end': '2009-02-23', 'party': 'Independent'}`, `{'start': '1993-01-05', 'end': '1994-11-09', 'party': 'Democrat'}` | Value Statics: Total count 2 - Distinct count 2 - Null count 3076
title TEXT, -- Example Values: `Minority Whip`, `Majority Whip`, `Minority Leader`, `Majority Leader`, `Speaker` | Value Statics: Total count 28 - Distinct count 5 - Null count 3050
district REAL, --
bioguide TEXT, --
office TEXT, --
class REAL, -- Example Values: `1.0`, `2.0`, `3.0` | Value Statics: Total count 244 - Distinct count 3 - Null count 2834
type TEXT, -- Example Values: `rep`, `sen` | Value Statics: Total count 3014 - Distinct count 2 - Null count 64
start TEXT, --
address TEXT, --
rss_url TEXT, --
url TEXT, --
primary key (bioguide, end),
fax TEXT, --
chamber TEXT, -- Example Values: `senate`, `house` | Value Statics: Total count 28 - Distinct count 2 - Null count 3050
end TEXT, --
caucus TEXT, -- Example Values: `Democrat` | Value Statics: Total count 3 - Distinct count 1 - Null count 3075
state TEXT, --
last TEXT, -- Example Values: `Menendez` | Value Statics: Total count 1 - Distinct count 1 - Null count 3077
relation TEXT, -- Example Values: `son`, `nephew`, `cousin`, `daughter`, `grandson` | Value Statics: Total count 35 - Distinct count 13 - Null count 3043
state_rank TEXT, -- Example Values: `senior`, `junior` | Value Statics: Total count 147 - Distinct count 2 - Null count 2931
name TEXT, --
contact_form TEXT, --
party TEXT, -- Example Values: `Democrat`, `Republican`, `Independent` | Value Statics: Total count 3014 - Distinct count 3 - Null count 64
);
CREATE TABLE social-media
(
foreign key (bioguide) references current(bioguide_id),
instagram TEXT, --
thomas INTEGER, --
youtube TEXT, --
twitter TEXT, --
facebook TEXT, --
youtube_id TEXT, --
twitter_id REAL, --
facebook_id REAL, --
govtrack REAL, --
bioguide TEXT primary key,
instagram_id REAL, --
); |
legislator | Provide the Instagram username of the legislator named Benjamin Hawkins. | Instagram username refers to instagram; | SELECT T1.instagram FROM `social-media` AS T1 INNER JOIN current AS T2 ON T2.bioguide_id = T1.bioguide WHERE T2.first_name = 'Benjamin' AND T2.last_name = 'Hawkins' | CREATE TABLE current
(
gender_bio TEXT, -- Example Values: `M`, `F` | Value Statics: Total count 541 - Distinct count 2 - Null count 0
suffix_name TEXT, -- Example Values: `Jr.`, `III`, `II` | Value Statics: Total count 20 - Distinct count 3 - Null count 521
house_history_id REAL, --
birthday_bio DATE, --
nickname_name TEXT, --
religion_bio TEXT, --
google_entity_id_id TEXT, --
govtrack_id INTEGER, --
cspan_id REAL, --
primary key (bioguide_id, cspan_id),
wikipedia_id TEXT, --
maplight_id REAL, --
last_name TEXT, --
icpsr_id REAL, --
fec_id TEXT, --
votesmart_id REAL, --
first_name TEXT, --
lis_id TEXT, --
bioguide_id TEXT, --
wikidata_id TEXT, --
middle_name TEXT, --
ballotpedia_id TEXT, --
opensecrets_id TEXT, --
official_full_name TEXT, --
thomas_id INTEGER, --
);
CREATE TABLE historical
(
fec_id TEXT, --
suffix_name TEXT, -- Example Values: `Jr.`, `Sr.`, `II`, `III`, `IV` | Value Statics: Total count 418 - Distinct count 5 - Null count 11446
govtrack_id INTEGER, --
house_history_id REAL, --
opensecrets_id TEXT, --
votesmart_id TEXT, --
bioguide_id TEXT primary key,
nickname_name TEXT, --
official_full_name TEXT, --
house_history_alternate_id TEXT, -- Example Values: `13283.0` | Value Statics: Total count 1 - Distinct count 1 - Null count 11863
gender_bio TEXT, -- Example Values: `M`, `F` | Value Statics: Total count 11864 - Distinct count 2 - Null count 0
bioguide_previous_id TEXT, -- Example Values: `['F000246']`, `['L000266']`, `['W000790']` | Value Statics: Total count 3 - Distinct count 3 - Null count 11861
icpsr_id REAL, --
wikipedia_id TEXT, --
birthday_bio TEXT, --
religion_bio TEXT, --
lis_id TEXT, --
middle_name TEXT, --
cspan_id TEXT, --
last_name TEXT, --
first_name TEXT, --
wikidata_id TEXT, --
thomas_id TEXT, --
ballotpedia_id TEXT, --
maplight_id TEXT, --
google_entity_id_id TEXT, --
);
CREATE TABLE historical-terms
(
bioguide TEXT primary key,
middle TEXT, --
title TEXT, -- Example Values: `Majority Leader`, `Speaker` | Value Statics: Total count 3 - Distinct count 2 - Null count 11861
party TEXT, --
type TEXT, -- Example Values: `sen`, `rep` | Value Statics: Total count 11858 - Distinct count 2 - Null count 6
phone TEXT, --
rss_url TEXT, -- Example Values: `http://radel.house.gov/news/rss.aspx`, `http://www.begich.senate.gov/public/?a=rss.feed`, `http://www.hagan.senate.gov/rss`, `http://negretemcleod.house.gov/rss.xml`, `http://garcia.house.gov/rss.xml` | Value Statics: Total count 12 - Distinct count 12 - Null count 11852
name TEXT, --
start TEXT, --
address TEXT, --
party_affiliations TEXT, -- Example Values: `{'start': '2009-01-06', 'end': '2009-12-22', 'party': 'Democrat'}`, `{'start': '2003-01-07', 'end': '2004-08-09', 'party': 'Democrat'}` | Value Statics: Total count 2 - Distinct count 2 - Null count 11862
relation TEXT, --
state_rank TEXT, -- Example Values: `junior`, `senior` | Value Statics: Total count 7 - Distinct count 2 - Null count 11857
last TEXT, -- Example Values: `Levy`, `Lambert`, `Bono` | Value Statics: Total count 3 - Distinct count 3 - Null count 11861
url TEXT, --
fax TEXT, --
contact_form TEXT, --
office TEXT, --
state TEXT, --
foreign key (bioguide) references historical(bioguide_id),
class REAL, -- Example Values: `2.0`, `1.0`, `3.0` | Value Statics: Total count 1256 - Distinct count 3 - Null count 10608
end TEXT, --
district REAL, --
chamber TEXT, -- Example Values: `house`, `senate` | Value Statics: Total count 3 - Distinct count 2 - Null count 11861
);
CREATE TABLE current-terms
(
foreign key (bioguide) references current(bioguide_id),
phone TEXT, --
party_affiliations TEXT, -- Example Values: `{'start': '2009-01-06', 'end': '2009-02-23', 'party': 'Independent'}`, `{'start': '1993-01-05', 'end': '1994-11-09', 'party': 'Democrat'}` | Value Statics: Total count 2 - Distinct count 2 - Null count 3076
title TEXT, -- Example Values: `Minority Whip`, `Majority Whip`, `Minority Leader`, `Majority Leader`, `Speaker` | Value Statics: Total count 28 - Distinct count 5 - Null count 3050
district REAL, --
bioguide TEXT, --
office TEXT, --
class REAL, -- Example Values: `1.0`, `2.0`, `3.0` | Value Statics: Total count 244 - Distinct count 3 - Null count 2834
type TEXT, -- Example Values: `rep`, `sen` | Value Statics: Total count 3014 - Distinct count 2 - Null count 64
start TEXT, --
address TEXT, --
rss_url TEXT, --
url TEXT, --
primary key (bioguide, end),
fax TEXT, --
chamber TEXT, -- Example Values: `senate`, `house` | Value Statics: Total count 28 - Distinct count 2 - Null count 3050
end TEXT, --
caucus TEXT, -- Example Values: `Democrat` | Value Statics: Total count 3 - Distinct count 1 - Null count 3075
state TEXT, --
last TEXT, -- Example Values: `Menendez` | Value Statics: Total count 1 - Distinct count 1 - Null count 3077
relation TEXT, -- Example Values: `son`, `nephew`, `cousin`, `daughter`, `grandson` | Value Statics: Total count 35 - Distinct count 13 - Null count 3043
state_rank TEXT, -- Example Values: `senior`, `junior` | Value Statics: Total count 147 - Distinct count 2 - Null count 2931
name TEXT, --
contact_form TEXT, --
party TEXT, -- Example Values: `Democrat`, `Republican`, `Independent` | Value Statics: Total count 3014 - Distinct count 3 - Null count 64
);
CREATE TABLE social-media
(
foreign key (bioguide) references current(bioguide_id),
instagram TEXT, --
thomas INTEGER, --
youtube TEXT, --
twitter TEXT, --
facebook TEXT, --
youtube_id TEXT, --
twitter_id REAL, --
facebook_id REAL, --
govtrack REAL, --
bioguide TEXT primary key,
instagram_id REAL, --
); |
professional_basketball | Which team had more than one player who grabbed more than 600 rebounds in 2011? Give the full name of the team. | more than one player refers to count(playerID) > 1; grabbed more than 600 rebounds refers to rebounds > 600; in 2011 refers to 2011; full name refers to teams.name | SELECT T1.tmID FROM teams AS T1 INNER JOIN players_teams AS T2 ON T1.tmID = T2.tmID AND T1.year = T2.year WHERE T1.year = 2011 AND T2.rebounds > 600 | CREATE TABLE players_teams
(
PostGS INTEGER, --
PostdRebounds INTEGER, --
PostPF INTEGER, --
tmID TEXT, --
threeAttempted INTEGER, --
PostRebounds INTEGER, --
assists INTEGER, --
threeMade INTEGER, --
PostBlocks INTEGER, --
PostTurnovers INTEGER, --
GP INTEGER, --
lgID TEXT, -- Example Values: `NBA`, `NBL`, `ABA`, `ABL1`, `NPBL` | Value Statics: Total count 23751 - Distinct count 6 - Null count 0
foreign key (tmID, year) references teams (tmID, year) on update cascade on delete cascade,
PostfgMade INTEGER, --
steals INTEGER, --
oRebounds INTEGER, --
PostftAttempted INTEGER, --
ftAttempted INTEGER, --
ftMade INTEGER, --
points INTEGER, --
PostfgAttempted INTEGER, --
PostftMade INTEGER, --
note TEXT, -- Example Values: `C` | Value Statics: Total count 43 - Distinct count 1 - Null count 23708
dRebounds INTEGER, --
PostSteals INTEGER, --
blocks INTEGER, --
PostAssists INTEGER, --
minutes INTEGER, --
fgAttempted INTEGER, --
playerID TEXT not null references players on update cascade on delete cascade, --
PostthreeMade INTEGER, --
PostPoints INTEGER, --
year INTEGER, --
PF INTEGER, --
fgMade INTEGER, --
PostthreeAttempted INTEGER, --
rebounds INTEGER, --
id INTEGER primary key autoincrement,
stint INTEGER, -- Example Values: `1`, `2`, `0`, `3`, `4` | Value Statics: Total count 23751 - Distinct count 6 - Null count 0
PostMinutes INTEGER, --
PostGP INTEGER, --
turnovers INTEGER, --
PostoRebounds INTEGER, --
GS INTEGER, --
);
CREATE TABLE awards_coaches
(
award TEXT, -- Example Values: `NBA Coach of the Year`, `ABA Coach of the Year` | Value Statics: Total count 61 - Distinct count 2 - Null count 0
id INTEGER primary key autoincrement,
note TEXT, -- Example Values: `tie` | Value Statics: Total count 4 - Distinct count 1 - Null count 57
coachID TEXT, --
lgID TEXT, -- Example Values: `NBA`, `ABA` | Value Statics: Total count 61 - Distinct count 2 - Null count 0
foreign key (coachID, year) references coaches (coachID, year) on update cascade on delete cascade,
year INTEGER, --
);
CREATE TABLE draft
(
draftOverall INTEGER null, --
lgID TEXT null, -- Example Values: `ABA`, `NBA` | Value Statics: Total count 8621 - Distinct count 2 - Null count 0
suffixName TEXT null, -- Example Values: `Jr.` | Value Statics: Total count 2 - Distinct count 1 - Null count 8619
draftYear INTEGER null, --
draftSelection INTEGER null, --
tmID TEXT null, --
draftRound INTEGER null, --
lastName TEXT null, --
playerID TEXT null, --
draftFrom TEXT null, --
id INTEGER default 0 not null primary key,
firstName TEXT null, --
foreign key (tmID, draftYear) references teams (tmID, year) on update cascade on delete cascade,
foreign key (tmID, draftYear) references teams (tmID, year) on update cascade on delete cascade,
);
CREATE TABLE player_allstar
(
rebounds INTEGER null, --
playerID TEXT not null, --
season_id INTEGER not null, --
assists INTEGER null, --
conference TEXT null, -- Example Values: `East`, `West`, `Weset`, `Allstars`, `Denver` | Value Statics: Total count 1608 - Distinct count 5 - Null count 0
points INTEGER null, --
personal_fouls INTEGER null, -- Example Values: `3`, `2`, `0`, `1`, `5` | Value Statics: Total count 540 - Distinct count 8 - Null count 1068
ft_attempted INTEGER null, -- Example Values: `2`, `4`, `0`, `6`, `3` | Value Statics: Total count 1561 - Distinct count 17 - Null count 47
fg_attempted INTEGER null, --
league_id TEXT null, -- Example Values: `NBA`, `ABA` | Value Statics: Total count 1608 - Distinct count 2 - Null count 0
foreign key (playerID) references players (playerID) on update cascade on delete cascade,
fg_made INTEGER null, -- Example Values: `4`, `8`, `5`, `7`, `3` | Value Statics: Total count 1561 - Distinct count 18 - Null count 47
ft_made INTEGER null, -- Example Values: `2`, `3`, `0`, `1`, `4` | Value Statics: Total count 1561 - Distinct count 13 - Null count 47
steals INTEGER null, -- Example Values: `3`, `0`, `1`, `2`, `5` | Value Statics: Total count 398 - Distinct count 7 - Null count 1210
games_played INTEGER null, -- Example Values: `1` | Value Statics: Total count 1608 - Distinct count 1 - Null count 0
first_name TEXT null, --
d_rebounds INTEGER null, -- Example Values: `2`, `5`, `0`, `1`, `4` | Value Statics: Total count 493 - Distinct count 14 - Null count 1115
last_name TEXT null, --
primary key (playerID, season_id),
turnovers INTEGER null, -- Example Values: `1`, `0`, `3`, `2`, `4` | Value Statics: Total count 493 - Distinct count 9 - Null count 1115
three_made INTEGER null, -- Example Values: `0`, `1`, `3`, `5`, `4` | Value Statics: Total count 566 - Distinct count 7 - Null count 1042
minutes INTEGER null, --
blocks INTEGER null, -- Example Values: `2`, `0`, `1`, `3`, `5` | Value Statics: Total count 398 - Distinct count 6 - Null count 1210
three_attempted INTEGER null, -- Example Values: `0`, `1`, `6`, `7`, `10` | Value Statics: Total count 540 - Distinct count 12 - Null count 1068
o_rebounds INTEGER null, -- Example Values: `1`, `2`, `0`, `3`, `4` | Value Statics: Total count 493 - Distinct count 10 - Null count 1115
);
CREATE TABLE awards_players
(
foreign key (playerID) references players (playerID) on update cascade on delete cascade,
year INTEGER not null, --
pos TEXT null, -- Example Values: `C`, `F`, `G`, `F/G`, `F/C` | Value Statics: Total count 833 - Distinct count 5 - Null count 886
primary key (playerID, year, award),
lgID TEXT null, -- Example Values: `NBA`, `ABA`, `NBL`, `ABL1` | Value Statics: Total count 1719 - Distinct count 4 - Null count 0
award TEXT not null, --
playerID TEXT not null, --
note TEXT null, -- Example Values: `tie` | Value Statics: Total count 37 - Distinct count 1 - Null count 1682
);
CREATE TABLE series_post
(
tmIDLoser TEXT, --
id INTEGER primary key autoincrement,
series TEXT, -- Example Values: `O`, `M`, `N`, `A`, `K` | Value Statics: Total count 775 - Distinct count 11 - Null count 0
tmIDWinner TEXT, --
round TEXT, -- Example Values: `F`, `QF`, `SF`, `DT`, `DF` | Value Statics: Total count 775 - Distinct count 11 - Null count 0
year INTEGER, --
foreign key (tmIDLoser, year) references teams (tmID, year) on update cascade on delete cascade,
foreign key (tmIDWinner, year) references teams (tmID, year) on update cascade on delete cascade,
W INTEGER, -- Example Values: `4`, `2`, `1`, `3`, `0` | Value Statics: Total count 775 - Distinct count 5 - Null count 0
lgIDLoser TEXT, -- Example Values: `NBA`, `ABA` | Value Statics: Total count 775 - Distinct count 2 - Null count 0
lgIDWinner TEXT, -- Example Values: `NBA`, `ABA` | Value Statics: Total count 775 - Distinct count 2 - Null count 0
L INTEGER, -- Example Values: `1`, `0`, `2`, `3`, `4` | Value Statics: Total count 775 - Distinct count 5 - Null count 0
);
CREATE TABLE players
(
nameGiven TEXT null, -- Example Values: `nameGiven`, `Mort`, `Robert`, `Jim`, `Mike` | Value Statics: Total count 10 - Distinct count 9 - Null count 5052
lastseason INTEGER null, -- Example Values: `0`, `1951` | Value Statics: Total count 5047 - Distinct count 2 - Null count 15
hsCountry TEXT null, --
firstName TEXT null, --
hsCity TEXT null, --
firstseason INTEGER null, -- Example Values: `0`, `1951` | Value Statics: Total count 5047 - Distinct count 2 - Null count 15
weight INTEGER null, --
birthCountry TEXT null, --
race TEXT null, -- Example Values: `B`, `W`, `O`, `1`, `r` | Value Statics: Total count 4903 - Distinct count 5 - Null count 159
lastName TEXT null, --
birthDate DATE null, --
collegeOther TEXT null, --
birthState TEXT null, --
useFirst TEXT null, --
pos TEXT null, -- Example Values: `F-C`, `C`, `G`, `G-F`, `C-F` | Value Statics: Total count 4880 - Distinct count 14 - Null count 182
playerID TEXT not null primary key,
college TEXT null, --
highSchool TEXT null, --
hsState TEXT null, --
height REAL null, --
deathDate DATE null, --
nameSuffix TEXT null, -- Example Values: `Jr.`, `III`, `nameSuffix`, `II`, `IV` | Value Statics: Total count 324 - Distinct count 6 - Null count 4738
nameNick TEXT null, --
fullGivenName TEXT null, --
birthCity TEXT null, --
middleName TEXT null, --
);
CREATE TABLE teams
(
d_pts INTEGER null, --
name TEXT null, --
homeLost INTEGER null, --
o_ftm INTEGER null, --
franchID TEXT null, --
tmID TEXT not null, --
awayWon INTEGER null, --
primary key (year, tmID),
o_fgm INTEGER null, --
year INTEGER not null, --
awayLost INTEGER null, --
arena TEXT null, --
confID TEXT null, -- Example Values: `EC`, `WC` | Value Statics: Total count 1064 - Distinct count 2 - Null count 472
games INTEGER null, --
lost INTEGER null, --
divID TEXT null, -- Example Values: `EA`, `WE`, `ED`, `WD`, `SO` | Value Statics: Total count 1498 - Distinct count 13 - Null count 38
lgID TEXT null, -- Example Values: `NBL`, `NBA`, `PBLA`, `NPBL`, `ABL1` | Value Statics: Total count 1536 - Distinct count 6 - Null count 0
homeWon INTEGER null, --
confRank INTEGER null, -- Example Values: `0`, `4`, `3`, `5`, `7` | Value Statics: Total count 1536 - Distinct count 16 - Null count 0
o_pts INTEGER null, --
`rank` INTEGER null, -- Example Values: `1`, `2`, `4`, `5`, `6` | Value Statics: Total count 1536 - Distinct count 10 - Null count 0
playoff TEXT null, -- Example Values: `CF`, `WC`, `LC`, `CS`, `F` | Value Statics: Total count 901 - Distinct count 15 - Null count 635
won INTEGER null, --
);
CREATE TABLE coaches
(
primary key (coachID, year, tmID, stint),
lgID TEXT null, -- Example Values: `NBA`, `ABA`, `ABL1`, `PBLA`, `NPBL` | Value Statics: Total count 1689 - Distinct count 5 - Null count 0
post_losses INTEGER null, -- Example Values: `3`, `9`, `7`, `8`, `0` | Value Statics: Total count 1649 - Distinct count 12 - Null count 40
year INTEGER not null, --
won INTEGER null, --
foreign key (tmID, year) references teams (tmID, year) on update cascade on delete cascade,
post_wins INTEGER null, -- Example Values: `0`, `12`, `9`, `13`, `1` | Value Statics: Total count 1649 - Distinct count 17 - Null count 40
coachID TEXT not null, --
tmID TEXT not null, --
lost INTEGER null, --
stint INTEGER not null, -- Example Values: `2`, `1`, `4`, `5`, `3` | Value Statics: Total count 1689 - Distinct count 5 - Null count 0
); |
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' | CREATE TABLE current
(
gender_bio TEXT, -- Example Values: `M`, `F` | Value Statics: Total count 541 - Distinct count 2 - Null count 0
suffix_name TEXT, -- Example Values: `Jr.`, `III`, `II` | Value Statics: Total count 20 - Distinct count 3 - Null count 521
house_history_id REAL, --
birthday_bio DATE, --
nickname_name TEXT, --
religion_bio TEXT, --
google_entity_id_id TEXT, --
govtrack_id INTEGER, --
cspan_id REAL, --
primary key (bioguide_id, cspan_id),
wikipedia_id TEXT, --
maplight_id REAL, --
last_name TEXT, --
icpsr_id REAL, --
fec_id TEXT, --
votesmart_id REAL, --
first_name TEXT, --
lis_id TEXT, --
bioguide_id TEXT, --
wikidata_id TEXT, --
middle_name TEXT, --
ballotpedia_id TEXT, --
opensecrets_id TEXT, --
official_full_name TEXT, --
thomas_id INTEGER, --
);
CREATE TABLE historical
(
fec_id TEXT, --
suffix_name TEXT, -- Example Values: `Jr.`, `Sr.`, `II`, `III`, `IV` | Value Statics: Total count 418 - Distinct count 5 - Null count 11446
govtrack_id INTEGER, --
house_history_id REAL, --
opensecrets_id TEXT, --
votesmart_id TEXT, --
bioguide_id TEXT primary key,
nickname_name TEXT, --
official_full_name TEXT, --
house_history_alternate_id TEXT, -- Example Values: `13283.0` | Value Statics: Total count 1 - Distinct count 1 - Null count 11863
gender_bio TEXT, -- Example Values: `M`, `F` | Value Statics: Total count 11864 - Distinct count 2 - Null count 0
bioguide_previous_id TEXT, -- Example Values: `['F000246']`, `['L000266']`, `['W000790']` | Value Statics: Total count 3 - Distinct count 3 - Null count 11861
icpsr_id REAL, --
wikipedia_id TEXT, --
birthday_bio TEXT, --
religion_bio TEXT, --
lis_id TEXT, --
middle_name TEXT, --
cspan_id TEXT, --
last_name TEXT, --
first_name TEXT, --
wikidata_id TEXT, --
thomas_id TEXT, --
ballotpedia_id TEXT, --
maplight_id TEXT, --
google_entity_id_id TEXT, --
);
CREATE TABLE historical-terms
(
bioguide TEXT primary key,
middle TEXT, --
title TEXT, -- Example Values: `Majority Leader`, `Speaker` | Value Statics: Total count 3 - Distinct count 2 - Null count 11861
party TEXT, --
type TEXT, -- Example Values: `sen`, `rep` | Value Statics: Total count 11858 - Distinct count 2 - Null count 6
phone TEXT, --
rss_url TEXT, -- Example Values: `http://radel.house.gov/news/rss.aspx`, `http://www.begich.senate.gov/public/?a=rss.feed`, `http://www.hagan.senate.gov/rss`, `http://negretemcleod.house.gov/rss.xml`, `http://garcia.house.gov/rss.xml` | Value Statics: Total count 12 - Distinct count 12 - Null count 11852
name TEXT, --
start TEXT, --
address TEXT, --
party_affiliations TEXT, -- Example Values: `{'start': '2009-01-06', 'end': '2009-12-22', 'party': 'Democrat'}`, `{'start': '2003-01-07', 'end': '2004-08-09', 'party': 'Democrat'}` | Value Statics: Total count 2 - Distinct count 2 - Null count 11862
relation TEXT, --
state_rank TEXT, -- Example Values: `junior`, `senior` | Value Statics: Total count 7 - Distinct count 2 - Null count 11857
last TEXT, -- Example Values: `Levy`, `Lambert`, `Bono` | Value Statics: Total count 3 - Distinct count 3 - Null count 11861
url TEXT, --
fax TEXT, --
contact_form TEXT, --
office TEXT, --
state TEXT, --
foreign key (bioguide) references historical(bioguide_id),
class REAL, -- Example Values: `2.0`, `1.0`, `3.0` | Value Statics: Total count 1256 - Distinct count 3 - Null count 10608
end TEXT, --
district REAL, --
chamber TEXT, -- Example Values: `house`, `senate` | Value Statics: Total count 3 - Distinct count 2 - Null count 11861
);
CREATE TABLE current-terms
(
foreign key (bioguide) references current(bioguide_id),
phone TEXT, --
party_affiliations TEXT, -- Example Values: `{'start': '2009-01-06', 'end': '2009-02-23', 'party': 'Independent'}`, `{'start': '1993-01-05', 'end': '1994-11-09', 'party': 'Democrat'}` | Value Statics: Total count 2 - Distinct count 2 - Null count 3076
title TEXT, -- Example Values: `Minority Whip`, `Majority Whip`, `Minority Leader`, `Majority Leader`, `Speaker` | Value Statics: Total count 28 - Distinct count 5 - Null count 3050
district REAL, --
bioguide TEXT, --
office TEXT, --
class REAL, -- Example Values: `1.0`, `2.0`, `3.0` | Value Statics: Total count 244 - Distinct count 3 - Null count 2834
type TEXT, -- Example Values: `rep`, `sen` | Value Statics: Total count 3014 - Distinct count 2 - Null count 64
start TEXT, --
address TEXT, --
rss_url TEXT, --
url TEXT, --
primary key (bioguide, end),
fax TEXT, --
chamber TEXT, -- Example Values: `senate`, `house` | Value Statics: Total count 28 - Distinct count 2 - Null count 3050
end TEXT, --
caucus TEXT, -- Example Values: `Democrat` | Value Statics: Total count 3 - Distinct count 1 - Null count 3075
state TEXT, --
last TEXT, -- Example Values: `Menendez` | Value Statics: Total count 1 - Distinct count 1 - Null count 3077
relation TEXT, -- Example Values: `son`, `nephew`, `cousin`, `daughter`, `grandson` | Value Statics: Total count 35 - Distinct count 13 - Null count 3043
state_rank TEXT, -- Example Values: `senior`, `junior` | Value Statics: Total count 147 - Distinct count 2 - Null count 2931
name TEXT, --
contact_form TEXT, --
party TEXT, -- Example Values: `Democrat`, `Republican`, `Independent` | Value Statics: Total count 3014 - Distinct count 3 - Null count 64
);
CREATE TABLE social-media
(
foreign key (bioguide) references current(bioguide_id),
instagram TEXT, --
thomas INTEGER, --
youtube TEXT, --
twitter TEXT, --
facebook TEXT, --
youtube_id TEXT, --
twitter_id REAL, --
facebook_id REAL, --
govtrack REAL, --
bioguide TEXT primary key,
instagram_id REAL, --
); |
professional_basketball | What were the difference of the CHS team's winning rate between 1946 and 1947 in the post-season series games? Please provide your answer in percentages. | CHS team refers to tmIDWinner = 'CHS'; difference = subtract(divide(count(series_post where year = 1947 and tmIDWinner = 'CHS'), count(series_post where year = 1947)), divide(count(series_post where year = 1946 and tmIDWinner = 'CHS'), count(series_post where year = 1946))) | SELECT CAST(SUM(CASE WHEN year = 1947 AND tmIDWinner = 'CHS' THEN 1 ELSE 0 END) AS REAL) * 100 / SUM(CASE WHEN year = 1947 THEN 1 ELSE 0 END) - CAST(SUM(CASE WHEN year = 1946 AND tmIDWinner = 'CHS' THEN 1 ELSE 0 END) AS REAL) * 100 / SUM(CASE WHEN year = 1946 THEN 1 ELSE 0 END) FROM series_post | CREATE TABLE players_teams
(
PostGS INTEGER, --
PostdRebounds INTEGER, --
PostPF INTEGER, --
tmID TEXT, --
threeAttempted INTEGER, --
PostRebounds INTEGER, --
assists INTEGER, --
threeMade INTEGER, --
PostBlocks INTEGER, --
PostTurnovers INTEGER, --
GP INTEGER, --
lgID TEXT, -- Example Values: `NBA`, `NBL`, `ABA`, `ABL1`, `NPBL` | Value Statics: Total count 23751 - Distinct count 6 - Null count 0
foreign key (tmID, year) references teams (tmID, year) on update cascade on delete cascade,
PostfgMade INTEGER, --
steals INTEGER, --
oRebounds INTEGER, --
PostftAttempted INTEGER, --
ftAttempted INTEGER, --
ftMade INTEGER, --
points INTEGER, --
PostfgAttempted INTEGER, --
PostftMade INTEGER, --
note TEXT, -- Example Values: `C` | Value Statics: Total count 43 - Distinct count 1 - Null count 23708
dRebounds INTEGER, --
PostSteals INTEGER, --
blocks INTEGER, --
PostAssists INTEGER, --
minutes INTEGER, --
fgAttempted INTEGER, --
playerID TEXT not null references players on update cascade on delete cascade, --
PostthreeMade INTEGER, --
PostPoints INTEGER, --
year INTEGER, --
PF INTEGER, --
fgMade INTEGER, --
PostthreeAttempted INTEGER, --
rebounds INTEGER, --
id INTEGER primary key autoincrement,
stint INTEGER, -- Example Values: `1`, `2`, `0`, `3`, `4` | Value Statics: Total count 23751 - Distinct count 6 - Null count 0
PostMinutes INTEGER, --
PostGP INTEGER, --
turnovers INTEGER, --
PostoRebounds INTEGER, --
GS INTEGER, --
);
CREATE TABLE awards_coaches
(
award TEXT, -- Example Values: `NBA Coach of the Year`, `ABA Coach of the Year` | Value Statics: Total count 61 - Distinct count 2 - Null count 0
id INTEGER primary key autoincrement,
note TEXT, -- Example Values: `tie` | Value Statics: Total count 4 - Distinct count 1 - Null count 57
coachID TEXT, --
lgID TEXT, -- Example Values: `NBA`, `ABA` | Value Statics: Total count 61 - Distinct count 2 - Null count 0
foreign key (coachID, year) references coaches (coachID, year) on update cascade on delete cascade,
year INTEGER, --
);
CREATE TABLE draft
(
draftOverall INTEGER null, --
lgID TEXT null, -- Example Values: `ABA`, `NBA` | Value Statics: Total count 8621 - Distinct count 2 - Null count 0
suffixName TEXT null, -- Example Values: `Jr.` | Value Statics: Total count 2 - Distinct count 1 - Null count 8619
draftYear INTEGER null, --
draftSelection INTEGER null, --
tmID TEXT null, --
draftRound INTEGER null, --
lastName TEXT null, --
playerID TEXT null, --
draftFrom TEXT null, --
id INTEGER default 0 not null primary key,
firstName TEXT null, --
foreign key (tmID, draftYear) references teams (tmID, year) on update cascade on delete cascade,
foreign key (tmID, draftYear) references teams (tmID, year) on update cascade on delete cascade,
);
CREATE TABLE player_allstar
(
rebounds INTEGER null, --
playerID TEXT not null, --
season_id INTEGER not null, --
assists INTEGER null, --
conference TEXT null, -- Example Values: `East`, `West`, `Weset`, `Allstars`, `Denver` | Value Statics: Total count 1608 - Distinct count 5 - Null count 0
points INTEGER null, --
personal_fouls INTEGER null, -- Example Values: `3`, `2`, `0`, `1`, `5` | Value Statics: Total count 540 - Distinct count 8 - Null count 1068
ft_attempted INTEGER null, -- Example Values: `2`, `4`, `0`, `6`, `3` | Value Statics: Total count 1561 - Distinct count 17 - Null count 47
fg_attempted INTEGER null, --
league_id TEXT null, -- Example Values: `NBA`, `ABA` | Value Statics: Total count 1608 - Distinct count 2 - Null count 0
foreign key (playerID) references players (playerID) on update cascade on delete cascade,
fg_made INTEGER null, -- Example Values: `4`, `8`, `5`, `7`, `3` | Value Statics: Total count 1561 - Distinct count 18 - Null count 47
ft_made INTEGER null, -- Example Values: `2`, `3`, `0`, `1`, `4` | Value Statics: Total count 1561 - Distinct count 13 - Null count 47
steals INTEGER null, -- Example Values: `3`, `0`, `1`, `2`, `5` | Value Statics: Total count 398 - Distinct count 7 - Null count 1210
games_played INTEGER null, -- Example Values: `1` | Value Statics: Total count 1608 - Distinct count 1 - Null count 0
first_name TEXT null, --
d_rebounds INTEGER null, -- Example Values: `2`, `5`, `0`, `1`, `4` | Value Statics: Total count 493 - Distinct count 14 - Null count 1115
last_name TEXT null, --
primary key (playerID, season_id),
turnovers INTEGER null, -- Example Values: `1`, `0`, `3`, `2`, `4` | Value Statics: Total count 493 - Distinct count 9 - Null count 1115
three_made INTEGER null, -- Example Values: `0`, `1`, `3`, `5`, `4` | Value Statics: Total count 566 - Distinct count 7 - Null count 1042
minutes INTEGER null, --
blocks INTEGER null, -- Example Values: `2`, `0`, `1`, `3`, `5` | Value Statics: Total count 398 - Distinct count 6 - Null count 1210
three_attempted INTEGER null, -- Example Values: `0`, `1`, `6`, `7`, `10` | Value Statics: Total count 540 - Distinct count 12 - Null count 1068
o_rebounds INTEGER null, -- Example Values: `1`, `2`, `0`, `3`, `4` | Value Statics: Total count 493 - Distinct count 10 - Null count 1115
);
CREATE TABLE awards_players
(
foreign key (playerID) references players (playerID) on update cascade on delete cascade,
year INTEGER not null, --
pos TEXT null, -- Example Values: `C`, `F`, `G`, `F/G`, `F/C` | Value Statics: Total count 833 - Distinct count 5 - Null count 886
primary key (playerID, year, award),
lgID TEXT null, -- Example Values: `NBA`, `ABA`, `NBL`, `ABL1` | Value Statics: Total count 1719 - Distinct count 4 - Null count 0
award TEXT not null, --
playerID TEXT not null, --
note TEXT null, -- Example Values: `tie` | Value Statics: Total count 37 - Distinct count 1 - Null count 1682
);
CREATE TABLE series_post
(
tmIDLoser TEXT, --
id INTEGER primary key autoincrement,
series TEXT, -- Example Values: `O`, `M`, `N`, `A`, `K` | Value Statics: Total count 775 - Distinct count 11 - Null count 0
tmIDWinner TEXT, --
round TEXT, -- Example Values: `F`, `QF`, `SF`, `DT`, `DF` | Value Statics: Total count 775 - Distinct count 11 - Null count 0
year INTEGER, --
foreign key (tmIDLoser, year) references teams (tmID, year) on update cascade on delete cascade,
foreign key (tmIDWinner, year) references teams (tmID, year) on update cascade on delete cascade,
W INTEGER, -- Example Values: `4`, `2`, `1`, `3`, `0` | Value Statics: Total count 775 - Distinct count 5 - Null count 0
lgIDLoser TEXT, -- Example Values: `NBA`, `ABA` | Value Statics: Total count 775 - Distinct count 2 - Null count 0
lgIDWinner TEXT, -- Example Values: `NBA`, `ABA` | Value Statics: Total count 775 - Distinct count 2 - Null count 0
L INTEGER, -- Example Values: `1`, `0`, `2`, `3`, `4` | Value Statics: Total count 775 - Distinct count 5 - Null count 0
);
CREATE TABLE players
(
nameGiven TEXT null, -- Example Values: `nameGiven`, `Mort`, `Robert`, `Jim`, `Mike` | Value Statics: Total count 10 - Distinct count 9 - Null count 5052
lastseason INTEGER null, -- Example Values: `0`, `1951` | Value Statics: Total count 5047 - Distinct count 2 - Null count 15
hsCountry TEXT null, --
firstName TEXT null, --
hsCity TEXT null, --
firstseason INTEGER null, -- Example Values: `0`, `1951` | Value Statics: Total count 5047 - Distinct count 2 - Null count 15
weight INTEGER null, --
birthCountry TEXT null, --
race TEXT null, -- Example Values: `B`, `W`, `O`, `1`, `r` | Value Statics: Total count 4903 - Distinct count 5 - Null count 159
lastName TEXT null, --
birthDate DATE null, --
collegeOther TEXT null, --
birthState TEXT null, --
useFirst TEXT null, --
pos TEXT null, -- Example Values: `F-C`, `C`, `G`, `G-F`, `C-F` | Value Statics: Total count 4880 - Distinct count 14 - Null count 182
playerID TEXT not null primary key,
college TEXT null, --
highSchool TEXT null, --
hsState TEXT null, --
height REAL null, --
deathDate DATE null, --
nameSuffix TEXT null, -- Example Values: `Jr.`, `III`, `nameSuffix`, `II`, `IV` | Value Statics: Total count 324 - Distinct count 6 - Null count 4738
nameNick TEXT null, --
fullGivenName TEXT null, --
birthCity TEXT null, --
middleName TEXT null, --
);
CREATE TABLE teams
(
d_pts INTEGER null, --
name TEXT null, --
homeLost INTEGER null, --
o_ftm INTEGER null, --
franchID TEXT null, --
tmID TEXT not null, --
awayWon INTEGER null, --
primary key (year, tmID),
o_fgm INTEGER null, --
year INTEGER not null, --
awayLost INTEGER null, --
arena TEXT null, --
confID TEXT null, -- Example Values: `EC`, `WC` | Value Statics: Total count 1064 - Distinct count 2 - Null count 472
games INTEGER null, --
lost INTEGER null, --
divID TEXT null, -- Example Values: `EA`, `WE`, `ED`, `WD`, `SO` | Value Statics: Total count 1498 - Distinct count 13 - Null count 38
lgID TEXT null, -- Example Values: `NBL`, `NBA`, `PBLA`, `NPBL`, `ABL1` | Value Statics: Total count 1536 - Distinct count 6 - Null count 0
homeWon INTEGER null, --
confRank INTEGER null, -- Example Values: `0`, `4`, `3`, `5`, `7` | Value Statics: Total count 1536 - Distinct count 16 - Null count 0
o_pts INTEGER null, --
`rank` INTEGER null, -- Example Values: `1`, `2`, `4`, `5`, `6` | Value Statics: Total count 1536 - Distinct count 10 - Null count 0
playoff TEXT null, -- Example Values: `CF`, `WC`, `LC`, `CS`, `F` | Value Statics: Total count 901 - Distinct count 15 - Null count 635
won INTEGER null, --
);
CREATE TABLE coaches
(
primary key (coachID, year, tmID, stint),
lgID TEXT null, -- Example Values: `NBA`, `ABA`, `ABL1`, `PBLA`, `NPBL` | Value Statics: Total count 1689 - Distinct count 5 - Null count 0
post_losses INTEGER null, -- Example Values: `3`, `9`, `7`, `8`, `0` | Value Statics: Total count 1649 - Distinct count 12 - Null count 40
year INTEGER not null, --
won INTEGER null, --
foreign key (tmID, year) references teams (tmID, year) on update cascade on delete cascade,
post_wins INTEGER null, -- Example Values: `0`, `12`, `9`, `13`, `1` | Value Statics: Total count 1649 - Distinct count 17 - Null count 40
coachID TEXT not null, --
tmID TEXT not null, --
lost INTEGER null, --
stint INTEGER not null, -- Example Values: `2`, `1`, `4`, `5`, `3` | Value Statics: Total count 1689 - Distinct count 5 - Null count 0
); |
professional_basketball | Which team had the most same starting players througout the season? Give the full name of the team. | the same starting player refers to GP = GS; full name of the team refers to teams.name | SELECT DISTINCT T1.tmID FROM teams AS T1 INNER JOIN players_teams AS T2 ON T1.tmID = T2.tmID AND T1.year = T2.year WHERE T2.GP = T2.GS | CREATE TABLE players_teams
(
PostGS INTEGER, --
PostdRebounds INTEGER, --
PostPF INTEGER, --
tmID TEXT, --
threeAttempted INTEGER, --
PostRebounds INTEGER, --
assists INTEGER, --
threeMade INTEGER, --
PostBlocks INTEGER, --
PostTurnovers INTEGER, --
GP INTEGER, --
lgID TEXT, -- Example Values: `NBA`, `NBL`, `ABA`, `ABL1`, `NPBL` | Value Statics: Total count 23751 - Distinct count 6 - Null count 0
foreign key (tmID, year) references teams (tmID, year) on update cascade on delete cascade,
PostfgMade INTEGER, --
steals INTEGER, --
oRebounds INTEGER, --
PostftAttempted INTEGER, --
ftAttempted INTEGER, --
ftMade INTEGER, --
points INTEGER, --
PostfgAttempted INTEGER, --
PostftMade INTEGER, --
note TEXT, -- Example Values: `C` | Value Statics: Total count 43 - Distinct count 1 - Null count 23708
dRebounds INTEGER, --
PostSteals INTEGER, --
blocks INTEGER, --
PostAssists INTEGER, --
minutes INTEGER, --
fgAttempted INTEGER, --
playerID TEXT not null references players on update cascade on delete cascade, --
PostthreeMade INTEGER, --
PostPoints INTEGER, --
year INTEGER, --
PF INTEGER, --
fgMade INTEGER, --
PostthreeAttempted INTEGER, --
rebounds INTEGER, --
id INTEGER primary key autoincrement,
stint INTEGER, -- Example Values: `1`, `2`, `0`, `3`, `4` | Value Statics: Total count 23751 - Distinct count 6 - Null count 0
PostMinutes INTEGER, --
PostGP INTEGER, --
turnovers INTEGER, --
PostoRebounds INTEGER, --
GS INTEGER, --
);
CREATE TABLE awards_coaches
(
award TEXT, -- Example Values: `NBA Coach of the Year`, `ABA Coach of the Year` | Value Statics: Total count 61 - Distinct count 2 - Null count 0
id INTEGER primary key autoincrement,
note TEXT, -- Example Values: `tie` | Value Statics: Total count 4 - Distinct count 1 - Null count 57
coachID TEXT, --
lgID TEXT, -- Example Values: `NBA`, `ABA` | Value Statics: Total count 61 - Distinct count 2 - Null count 0
foreign key (coachID, year) references coaches (coachID, year) on update cascade on delete cascade,
year INTEGER, --
);
CREATE TABLE draft
(
draftOverall INTEGER null, --
lgID TEXT null, -- Example Values: `ABA`, `NBA` | Value Statics: Total count 8621 - Distinct count 2 - Null count 0
suffixName TEXT null, -- Example Values: `Jr.` | Value Statics: Total count 2 - Distinct count 1 - Null count 8619
draftYear INTEGER null, --
draftSelection INTEGER null, --
tmID TEXT null, --
draftRound INTEGER null, --
lastName TEXT null, --
playerID TEXT null, --
draftFrom TEXT null, --
id INTEGER default 0 not null primary key,
firstName TEXT null, --
foreign key (tmID, draftYear) references teams (tmID, year) on update cascade on delete cascade,
foreign key (tmID, draftYear) references teams (tmID, year) on update cascade on delete cascade,
);
CREATE TABLE player_allstar
(
rebounds INTEGER null, --
playerID TEXT not null, --
season_id INTEGER not null, --
assists INTEGER null, --
conference TEXT null, -- Example Values: `East`, `West`, `Weset`, `Allstars`, `Denver` | Value Statics: Total count 1608 - Distinct count 5 - Null count 0
points INTEGER null, --
personal_fouls INTEGER null, -- Example Values: `3`, `2`, `0`, `1`, `5` | Value Statics: Total count 540 - Distinct count 8 - Null count 1068
ft_attempted INTEGER null, -- Example Values: `2`, `4`, `0`, `6`, `3` | Value Statics: Total count 1561 - Distinct count 17 - Null count 47
fg_attempted INTEGER null, --
league_id TEXT null, -- Example Values: `NBA`, `ABA` | Value Statics: Total count 1608 - Distinct count 2 - Null count 0
foreign key (playerID) references players (playerID) on update cascade on delete cascade,
fg_made INTEGER null, -- Example Values: `4`, `8`, `5`, `7`, `3` | Value Statics: Total count 1561 - Distinct count 18 - Null count 47
ft_made INTEGER null, -- Example Values: `2`, `3`, `0`, `1`, `4` | Value Statics: Total count 1561 - Distinct count 13 - Null count 47
steals INTEGER null, -- Example Values: `3`, `0`, `1`, `2`, `5` | Value Statics: Total count 398 - Distinct count 7 - Null count 1210
games_played INTEGER null, -- Example Values: `1` | Value Statics: Total count 1608 - Distinct count 1 - Null count 0
first_name TEXT null, --
d_rebounds INTEGER null, -- Example Values: `2`, `5`, `0`, `1`, `4` | Value Statics: Total count 493 - Distinct count 14 - Null count 1115
last_name TEXT null, --
primary key (playerID, season_id),
turnovers INTEGER null, -- Example Values: `1`, `0`, `3`, `2`, `4` | Value Statics: Total count 493 - Distinct count 9 - Null count 1115
three_made INTEGER null, -- Example Values: `0`, `1`, `3`, `5`, `4` | Value Statics: Total count 566 - Distinct count 7 - Null count 1042
minutes INTEGER null, --
blocks INTEGER null, -- Example Values: `2`, `0`, `1`, `3`, `5` | Value Statics: Total count 398 - Distinct count 6 - Null count 1210
three_attempted INTEGER null, -- Example Values: `0`, `1`, `6`, `7`, `10` | Value Statics: Total count 540 - Distinct count 12 - Null count 1068
o_rebounds INTEGER null, -- Example Values: `1`, `2`, `0`, `3`, `4` | Value Statics: Total count 493 - Distinct count 10 - Null count 1115
);
CREATE TABLE awards_players
(
foreign key (playerID) references players (playerID) on update cascade on delete cascade,
year INTEGER not null, --
pos TEXT null, -- Example Values: `C`, `F`, `G`, `F/G`, `F/C` | Value Statics: Total count 833 - Distinct count 5 - Null count 886
primary key (playerID, year, award),
lgID TEXT null, -- Example Values: `NBA`, `ABA`, `NBL`, `ABL1` | Value Statics: Total count 1719 - Distinct count 4 - Null count 0
award TEXT not null, --
playerID TEXT not null, --
note TEXT null, -- Example Values: `tie` | Value Statics: Total count 37 - Distinct count 1 - Null count 1682
);
CREATE TABLE series_post
(
tmIDLoser TEXT, --
id INTEGER primary key autoincrement,
series TEXT, -- Example Values: `O`, `M`, `N`, `A`, `K` | Value Statics: Total count 775 - Distinct count 11 - Null count 0
tmIDWinner TEXT, --
round TEXT, -- Example Values: `F`, `QF`, `SF`, `DT`, `DF` | Value Statics: Total count 775 - Distinct count 11 - Null count 0
year INTEGER, --
foreign key (tmIDLoser, year) references teams (tmID, year) on update cascade on delete cascade,
foreign key (tmIDWinner, year) references teams (tmID, year) on update cascade on delete cascade,
W INTEGER, -- Example Values: `4`, `2`, `1`, `3`, `0` | Value Statics: Total count 775 - Distinct count 5 - Null count 0
lgIDLoser TEXT, -- Example Values: `NBA`, `ABA` | Value Statics: Total count 775 - Distinct count 2 - Null count 0
lgIDWinner TEXT, -- Example Values: `NBA`, `ABA` | Value Statics: Total count 775 - Distinct count 2 - Null count 0
L INTEGER, -- Example Values: `1`, `0`, `2`, `3`, `4` | Value Statics: Total count 775 - Distinct count 5 - Null count 0
);
CREATE TABLE players
(
nameGiven TEXT null, -- Example Values: `nameGiven`, `Mort`, `Robert`, `Jim`, `Mike` | Value Statics: Total count 10 - Distinct count 9 - Null count 5052
lastseason INTEGER null, -- Example Values: `0`, `1951` | Value Statics: Total count 5047 - Distinct count 2 - Null count 15
hsCountry TEXT null, --
firstName TEXT null, --
hsCity TEXT null, --
firstseason INTEGER null, -- Example Values: `0`, `1951` | Value Statics: Total count 5047 - Distinct count 2 - Null count 15
weight INTEGER null, --
birthCountry TEXT null, --
race TEXT null, -- Example Values: `B`, `W`, `O`, `1`, `r` | Value Statics: Total count 4903 - Distinct count 5 - Null count 159
lastName TEXT null, --
birthDate DATE null, --
collegeOther TEXT null, --
birthState TEXT null, --
useFirst TEXT null, --
pos TEXT null, -- Example Values: `F-C`, `C`, `G`, `G-F`, `C-F` | Value Statics: Total count 4880 - Distinct count 14 - Null count 182
playerID TEXT not null primary key,
college TEXT null, --
highSchool TEXT null, --
hsState TEXT null, --
height REAL null, --
deathDate DATE null, --
nameSuffix TEXT null, -- Example Values: `Jr.`, `III`, `nameSuffix`, `II`, `IV` | Value Statics: Total count 324 - Distinct count 6 - Null count 4738
nameNick TEXT null, --
fullGivenName TEXT null, --
birthCity TEXT null, --
middleName TEXT null, --
);
CREATE TABLE teams
(
d_pts INTEGER null, --
name TEXT null, --
homeLost INTEGER null, --
o_ftm INTEGER null, --
franchID TEXT null, --
tmID TEXT not null, --
awayWon INTEGER null, --
primary key (year, tmID),
o_fgm INTEGER null, --
year INTEGER not null, --
awayLost INTEGER null, --
arena TEXT null, --
confID TEXT null, -- Example Values: `EC`, `WC` | Value Statics: Total count 1064 - Distinct count 2 - Null count 472
games INTEGER null, --
lost INTEGER null, --
divID TEXT null, -- Example Values: `EA`, `WE`, `ED`, `WD`, `SO` | Value Statics: Total count 1498 - Distinct count 13 - Null count 38
lgID TEXT null, -- Example Values: `NBL`, `NBA`, `PBLA`, `NPBL`, `ABL1` | Value Statics: Total count 1536 - Distinct count 6 - Null count 0
homeWon INTEGER null, --
confRank INTEGER null, -- Example Values: `0`, `4`, `3`, `5`, `7` | Value Statics: Total count 1536 - Distinct count 16 - Null count 0
o_pts INTEGER null, --
`rank` INTEGER null, -- Example Values: `1`, `2`, `4`, `5`, `6` | Value Statics: Total count 1536 - Distinct count 10 - Null count 0
playoff TEXT null, -- Example Values: `CF`, `WC`, `LC`, `CS`, `F` | Value Statics: Total count 901 - Distinct count 15 - Null count 635
won INTEGER null, --
);
CREATE TABLE coaches
(
primary key (coachID, year, tmID, stint),
lgID TEXT null, -- Example Values: `NBA`, `ABA`, `ABL1`, `PBLA`, `NPBL` | Value Statics: Total count 1689 - Distinct count 5 - Null count 0
post_losses INTEGER null, -- Example Values: `3`, `9`, `7`, `8`, `0` | Value Statics: Total count 1649 - Distinct count 12 - Null count 40
year INTEGER not null, --
won INTEGER null, --
foreign key (tmID, year) references teams (tmID, year) on update cascade on delete cascade,
post_wins INTEGER null, -- Example Values: `0`, `12`, `9`, `13`, `1` | Value Statics: Total count 1649 - Distinct count 17 - Null count 40
coachID TEXT not null, --
tmID TEXT not null, --
lost INTEGER null, --
stint INTEGER not null, -- Example Values: `2`, `1`, `4`, `5`, `3` | Value Statics: Total count 1689 - Distinct count 5 - Null count 0
); |
legislator | How many districts are in Idaho? | Idaho refers to state = 'ID'; | SELECT COUNT(district) FROM `current-terms` WHERE state = 'ID' | CREATE TABLE current
(
gender_bio TEXT, -- Example Values: `M`, `F` | Value Statics: Total count 541 - Distinct count 2 - Null count 0
suffix_name TEXT, -- Example Values: `Jr.`, `III`, `II` | Value Statics: Total count 20 - Distinct count 3 - Null count 521
house_history_id REAL, --
birthday_bio DATE, --
nickname_name TEXT, --
religion_bio TEXT, --
google_entity_id_id TEXT, --
govtrack_id INTEGER, --
cspan_id REAL, --
primary key (bioguide_id, cspan_id),
wikipedia_id TEXT, --
maplight_id REAL, --
last_name TEXT, --
icpsr_id REAL, --
fec_id TEXT, --
votesmart_id REAL, --
first_name TEXT, --
lis_id TEXT, --
bioguide_id TEXT, --
wikidata_id TEXT, --
middle_name TEXT, --
ballotpedia_id TEXT, --
opensecrets_id TEXT, --
official_full_name TEXT, --
thomas_id INTEGER, --
);
CREATE TABLE historical
(
fec_id TEXT, --
suffix_name TEXT, -- Example Values: `Jr.`, `Sr.`, `II`, `III`, `IV` | Value Statics: Total count 418 - Distinct count 5 - Null count 11446
govtrack_id INTEGER, --
house_history_id REAL, --
opensecrets_id TEXT, --
votesmart_id TEXT, --
bioguide_id TEXT primary key,
nickname_name TEXT, --
official_full_name TEXT, --
house_history_alternate_id TEXT, -- Example Values: `13283.0` | Value Statics: Total count 1 - Distinct count 1 - Null count 11863
gender_bio TEXT, -- Example Values: `M`, `F` | Value Statics: Total count 11864 - Distinct count 2 - Null count 0
bioguide_previous_id TEXT, -- Example Values: `['F000246']`, `['L000266']`, `['W000790']` | Value Statics: Total count 3 - Distinct count 3 - Null count 11861
icpsr_id REAL, --
wikipedia_id TEXT, --
birthday_bio TEXT, --
religion_bio TEXT, --
lis_id TEXT, --
middle_name TEXT, --
cspan_id TEXT, --
last_name TEXT, --
first_name TEXT, --
wikidata_id TEXT, --
thomas_id TEXT, --
ballotpedia_id TEXT, --
maplight_id TEXT, --
google_entity_id_id TEXT, --
);
CREATE TABLE historical-terms
(
bioguide TEXT primary key,
middle TEXT, --
title TEXT, -- Example Values: `Majority Leader`, `Speaker` | Value Statics: Total count 3 - Distinct count 2 - Null count 11861
party TEXT, --
type TEXT, -- Example Values: `sen`, `rep` | Value Statics: Total count 11858 - Distinct count 2 - Null count 6
phone TEXT, --
rss_url TEXT, -- Example Values: `http://radel.house.gov/news/rss.aspx`, `http://www.begich.senate.gov/public/?a=rss.feed`, `http://www.hagan.senate.gov/rss`, `http://negretemcleod.house.gov/rss.xml`, `http://garcia.house.gov/rss.xml` | Value Statics: Total count 12 - Distinct count 12 - Null count 11852
name TEXT, --
start TEXT, --
address TEXT, --
party_affiliations TEXT, -- Example Values: `{'start': '2009-01-06', 'end': '2009-12-22', 'party': 'Democrat'}`, `{'start': '2003-01-07', 'end': '2004-08-09', 'party': 'Democrat'}` | Value Statics: Total count 2 - Distinct count 2 - Null count 11862
relation TEXT, --
state_rank TEXT, -- Example Values: `junior`, `senior` | Value Statics: Total count 7 - Distinct count 2 - Null count 11857
last TEXT, -- Example Values: `Levy`, `Lambert`, `Bono` | Value Statics: Total count 3 - Distinct count 3 - Null count 11861
url TEXT, --
fax TEXT, --
contact_form TEXT, --
office TEXT, --
state TEXT, --
foreign key (bioguide) references historical(bioguide_id),
class REAL, -- Example Values: `2.0`, `1.0`, `3.0` | Value Statics: Total count 1256 - Distinct count 3 - Null count 10608
end TEXT, --
district REAL, --
chamber TEXT, -- Example Values: `house`, `senate` | Value Statics: Total count 3 - Distinct count 2 - Null count 11861
);
CREATE TABLE current-terms
(
foreign key (bioguide) references current(bioguide_id),
phone TEXT, --
party_affiliations TEXT, -- Example Values: `{'start': '2009-01-06', 'end': '2009-02-23', 'party': 'Independent'}`, `{'start': '1993-01-05', 'end': '1994-11-09', 'party': 'Democrat'}` | Value Statics: Total count 2 - Distinct count 2 - Null count 3076
title TEXT, -- Example Values: `Minority Whip`, `Majority Whip`, `Minority Leader`, `Majority Leader`, `Speaker` | Value Statics: Total count 28 - Distinct count 5 - Null count 3050
district REAL, --
bioguide TEXT, --
office TEXT, --
class REAL, -- Example Values: `1.0`, `2.0`, `3.0` | Value Statics: Total count 244 - Distinct count 3 - Null count 2834
type TEXT, -- Example Values: `rep`, `sen` | Value Statics: Total count 3014 - Distinct count 2 - Null count 64
start TEXT, --
address TEXT, --
rss_url TEXT, --
url TEXT, --
primary key (bioguide, end),
fax TEXT, --
chamber TEXT, -- Example Values: `senate`, `house` | Value Statics: Total count 28 - Distinct count 2 - Null count 3050
end TEXT, --
caucus TEXT, -- Example Values: `Democrat` | Value Statics: Total count 3 - Distinct count 1 - Null count 3075
state TEXT, --
last TEXT, -- Example Values: `Menendez` | Value Statics: Total count 1 - Distinct count 1 - Null count 3077
relation TEXT, -- Example Values: `son`, `nephew`, `cousin`, `daughter`, `grandson` | Value Statics: Total count 35 - Distinct count 13 - Null count 3043
state_rank TEXT, -- Example Values: `senior`, `junior` | Value Statics: Total count 147 - Distinct count 2 - Null count 2931
name TEXT, --
contact_form TEXT, --
party TEXT, -- Example Values: `Democrat`, `Republican`, `Independent` | Value Statics: Total count 3014 - Distinct count 3 - Null count 64
);
CREATE TABLE social-media
(
foreign key (bioguide) references current(bioguide_id),
instagram TEXT, --
thomas INTEGER, --
youtube TEXT, --
twitter TEXT, --
facebook TEXT, --
youtube_id TEXT, --
twitter_id REAL, --
facebook_id REAL, --
govtrack REAL, --
bioguide TEXT primary key,
instagram_id REAL, --
); |
legislator | How many of the legislators are female? | female refers to gender_bio = 'F'; | SELECT COUNT(gender_bio) FROM current WHERE gender_bio = 'F' | CREATE TABLE current
(
gender_bio TEXT, -- Example Values: `M`, `F` | Value Statics: Total count 541 - Distinct count 2 - Null count 0
suffix_name TEXT, -- Example Values: `Jr.`, `III`, `II` | Value Statics: Total count 20 - Distinct count 3 - Null count 521
house_history_id REAL, --
birthday_bio DATE, --
nickname_name TEXT, --
religion_bio TEXT, --
google_entity_id_id TEXT, --
govtrack_id INTEGER, --
cspan_id REAL, --
primary key (bioguide_id, cspan_id),
wikipedia_id TEXT, --
maplight_id REAL, --
last_name TEXT, --
icpsr_id REAL, --
fec_id TEXT, --
votesmart_id REAL, --
first_name TEXT, --
lis_id TEXT, --
bioguide_id TEXT, --
wikidata_id TEXT, --
middle_name TEXT, --
ballotpedia_id TEXT, --
opensecrets_id TEXT, --
official_full_name TEXT, --
thomas_id INTEGER, --
);
CREATE TABLE historical
(
fec_id TEXT, --
suffix_name TEXT, -- Example Values: `Jr.`, `Sr.`, `II`, `III`, `IV` | Value Statics: Total count 418 - Distinct count 5 - Null count 11446
govtrack_id INTEGER, --
house_history_id REAL, --
opensecrets_id TEXT, --
votesmart_id TEXT, --
bioguide_id TEXT primary key,
nickname_name TEXT, --
official_full_name TEXT, --
house_history_alternate_id TEXT, -- Example Values: `13283.0` | Value Statics: Total count 1 - Distinct count 1 - Null count 11863
gender_bio TEXT, -- Example Values: `M`, `F` | Value Statics: Total count 11864 - Distinct count 2 - Null count 0
bioguide_previous_id TEXT, -- Example Values: `['F000246']`, `['L000266']`, `['W000790']` | Value Statics: Total count 3 - Distinct count 3 - Null count 11861
icpsr_id REAL, --
wikipedia_id TEXT, --
birthday_bio TEXT, --
religion_bio TEXT, --
lis_id TEXT, --
middle_name TEXT, --
cspan_id TEXT, --
last_name TEXT, --
first_name TEXT, --
wikidata_id TEXT, --
thomas_id TEXT, --
ballotpedia_id TEXT, --
maplight_id TEXT, --
google_entity_id_id TEXT, --
);
CREATE TABLE historical-terms
(
bioguide TEXT primary key,
middle TEXT, --
title TEXT, -- Example Values: `Majority Leader`, `Speaker` | Value Statics: Total count 3 - Distinct count 2 - Null count 11861
party TEXT, --
type TEXT, -- Example Values: `sen`, `rep` | Value Statics: Total count 11858 - Distinct count 2 - Null count 6
phone TEXT, --
rss_url TEXT, -- Example Values: `http://radel.house.gov/news/rss.aspx`, `http://www.begich.senate.gov/public/?a=rss.feed`, `http://www.hagan.senate.gov/rss`, `http://negretemcleod.house.gov/rss.xml`, `http://garcia.house.gov/rss.xml` | Value Statics: Total count 12 - Distinct count 12 - Null count 11852
name TEXT, --
start TEXT, --
address TEXT, --
party_affiliations TEXT, -- Example Values: `{'start': '2009-01-06', 'end': '2009-12-22', 'party': 'Democrat'}`, `{'start': '2003-01-07', 'end': '2004-08-09', 'party': 'Democrat'}` | Value Statics: Total count 2 - Distinct count 2 - Null count 11862
relation TEXT, --
state_rank TEXT, -- Example Values: `junior`, `senior` | Value Statics: Total count 7 - Distinct count 2 - Null count 11857
last TEXT, -- Example Values: `Levy`, `Lambert`, `Bono` | Value Statics: Total count 3 - Distinct count 3 - Null count 11861
url TEXT, --
fax TEXT, --
contact_form TEXT, --
office TEXT, --
state TEXT, --
foreign key (bioguide) references historical(bioguide_id),
class REAL, -- Example Values: `2.0`, `1.0`, `3.0` | Value Statics: Total count 1256 - Distinct count 3 - Null count 10608
end TEXT, --
district REAL, --
chamber TEXT, -- Example Values: `house`, `senate` | Value Statics: Total count 3 - Distinct count 2 - Null count 11861
);
CREATE TABLE current-terms
(
foreign key (bioguide) references current(bioguide_id),
phone TEXT, --
party_affiliations TEXT, -- Example Values: `{'start': '2009-01-06', 'end': '2009-02-23', 'party': 'Independent'}`, `{'start': '1993-01-05', 'end': '1994-11-09', 'party': 'Democrat'}` | Value Statics: Total count 2 - Distinct count 2 - Null count 3076
title TEXT, -- Example Values: `Minority Whip`, `Majority Whip`, `Minority Leader`, `Majority Leader`, `Speaker` | Value Statics: Total count 28 - Distinct count 5 - Null count 3050
district REAL, --
bioguide TEXT, --
office TEXT, --
class REAL, -- Example Values: `1.0`, `2.0`, `3.0` | Value Statics: Total count 244 - Distinct count 3 - Null count 2834
type TEXT, -- Example Values: `rep`, `sen` | Value Statics: Total count 3014 - Distinct count 2 - Null count 64
start TEXT, --
address TEXT, --
rss_url TEXT, --
url TEXT, --
primary key (bioguide, end),
fax TEXT, --
chamber TEXT, -- Example Values: `senate`, `house` | Value Statics: Total count 28 - Distinct count 2 - Null count 3050
end TEXT, --
caucus TEXT, -- Example Values: `Democrat` | Value Statics: Total count 3 - Distinct count 1 - Null count 3075
state TEXT, --
last TEXT, -- Example Values: `Menendez` | Value Statics: Total count 1 - Distinct count 1 - Null count 3077
relation TEXT, -- Example Values: `son`, `nephew`, `cousin`, `daughter`, `grandson` | Value Statics: Total count 35 - Distinct count 13 - Null count 3043
state_rank TEXT, -- Example Values: `senior`, `junior` | Value Statics: Total count 147 - Distinct count 2 - Null count 2931
name TEXT, --
contact_form TEXT, --
party TEXT, -- Example Values: `Democrat`, `Republican`, `Independent` | Value Statics: Total count 3014 - Distinct count 3 - Null count 64
);
CREATE TABLE social-media
(
foreign key (bioguide) references current(bioguide_id),
instagram TEXT, --
thomas INTEGER, --
youtube TEXT, --
twitter TEXT, --
facebook TEXT, --
youtube_id TEXT, --
twitter_id REAL, --
facebook_id REAL, --
govtrack REAL, --
bioguide TEXT primary key,
instagram_id REAL, --
); |
professional_basketball | For the 2001 rebounds leader in the league, when was his birthday? | 2001 refers to year = 2001; rebounds leader refers to max(rebounds); birthday refers to birthDate | SELECT birthDate FROM players WHERE playerID = ( SELECT playerID FROM players_teams WHERE year = 2001 GROUP BY playerID ORDER BY SUM(rebounds + dRebounds) DESC LIMIT 1 ) | CREATE TABLE players_teams
(
PostGS INTEGER, --
PostdRebounds INTEGER, --
PostPF INTEGER, --
tmID TEXT, --
threeAttempted INTEGER, --
PostRebounds INTEGER, --
assists INTEGER, --
threeMade INTEGER, --
PostBlocks INTEGER, --
PostTurnovers INTEGER, --
GP INTEGER, --
lgID TEXT, -- Example Values: `NBA`, `NBL`, `ABA`, `ABL1`, `NPBL` | Value Statics: Total count 23751 - Distinct count 6 - Null count 0
foreign key (tmID, year) references teams (tmID, year) on update cascade on delete cascade,
PostfgMade INTEGER, --
steals INTEGER, --
oRebounds INTEGER, --
PostftAttempted INTEGER, --
ftAttempted INTEGER, --
ftMade INTEGER, --
points INTEGER, --
PostfgAttempted INTEGER, --
PostftMade INTEGER, --
note TEXT, -- Example Values: `C` | Value Statics: Total count 43 - Distinct count 1 - Null count 23708
dRebounds INTEGER, --
PostSteals INTEGER, --
blocks INTEGER, --
PostAssists INTEGER, --
minutes INTEGER, --
fgAttempted INTEGER, --
playerID TEXT not null references players on update cascade on delete cascade, --
PostthreeMade INTEGER, --
PostPoints INTEGER, --
year INTEGER, --
PF INTEGER, --
fgMade INTEGER, --
PostthreeAttempted INTEGER, --
rebounds INTEGER, --
id INTEGER primary key autoincrement,
stint INTEGER, -- Example Values: `1`, `2`, `0`, `3`, `4` | Value Statics: Total count 23751 - Distinct count 6 - Null count 0
PostMinutes INTEGER, --
PostGP INTEGER, --
turnovers INTEGER, --
PostoRebounds INTEGER, --
GS INTEGER, --
);
CREATE TABLE awards_coaches
(
award TEXT, -- Example Values: `NBA Coach of the Year`, `ABA Coach of the Year` | Value Statics: Total count 61 - Distinct count 2 - Null count 0
id INTEGER primary key autoincrement,
note TEXT, -- Example Values: `tie` | Value Statics: Total count 4 - Distinct count 1 - Null count 57
coachID TEXT, --
lgID TEXT, -- Example Values: `NBA`, `ABA` | Value Statics: Total count 61 - Distinct count 2 - Null count 0
foreign key (coachID, year) references coaches (coachID, year) on update cascade on delete cascade,
year INTEGER, --
);
CREATE TABLE draft
(
draftOverall INTEGER null, --
lgID TEXT null, -- Example Values: `ABA`, `NBA` | Value Statics: Total count 8621 - Distinct count 2 - Null count 0
suffixName TEXT null, -- Example Values: `Jr.` | Value Statics: Total count 2 - Distinct count 1 - Null count 8619
draftYear INTEGER null, --
draftSelection INTEGER null, --
tmID TEXT null, --
draftRound INTEGER null, --
lastName TEXT null, --
playerID TEXT null, --
draftFrom TEXT null, --
id INTEGER default 0 not null primary key,
firstName TEXT null, --
foreign key (tmID, draftYear) references teams (tmID, year) on update cascade on delete cascade,
foreign key (tmID, draftYear) references teams (tmID, year) on update cascade on delete cascade,
);
CREATE TABLE player_allstar
(
rebounds INTEGER null, --
playerID TEXT not null, --
season_id INTEGER not null, --
assists INTEGER null, --
conference TEXT null, -- Example Values: `East`, `West`, `Weset`, `Allstars`, `Denver` | Value Statics: Total count 1608 - Distinct count 5 - Null count 0
points INTEGER null, --
personal_fouls INTEGER null, -- Example Values: `3`, `2`, `0`, `1`, `5` | Value Statics: Total count 540 - Distinct count 8 - Null count 1068
ft_attempted INTEGER null, -- Example Values: `2`, `4`, `0`, `6`, `3` | Value Statics: Total count 1561 - Distinct count 17 - Null count 47
fg_attempted INTEGER null, --
league_id TEXT null, -- Example Values: `NBA`, `ABA` | Value Statics: Total count 1608 - Distinct count 2 - Null count 0
foreign key (playerID) references players (playerID) on update cascade on delete cascade,
fg_made INTEGER null, -- Example Values: `4`, `8`, `5`, `7`, `3` | Value Statics: Total count 1561 - Distinct count 18 - Null count 47
ft_made INTEGER null, -- Example Values: `2`, `3`, `0`, `1`, `4` | Value Statics: Total count 1561 - Distinct count 13 - Null count 47
steals INTEGER null, -- Example Values: `3`, `0`, `1`, `2`, `5` | Value Statics: Total count 398 - Distinct count 7 - Null count 1210
games_played INTEGER null, -- Example Values: `1` | Value Statics: Total count 1608 - Distinct count 1 - Null count 0
first_name TEXT null, --
d_rebounds INTEGER null, -- Example Values: `2`, `5`, `0`, `1`, `4` | Value Statics: Total count 493 - Distinct count 14 - Null count 1115
last_name TEXT null, --
primary key (playerID, season_id),
turnovers INTEGER null, -- Example Values: `1`, `0`, `3`, `2`, `4` | Value Statics: Total count 493 - Distinct count 9 - Null count 1115
three_made INTEGER null, -- Example Values: `0`, `1`, `3`, `5`, `4` | Value Statics: Total count 566 - Distinct count 7 - Null count 1042
minutes INTEGER null, --
blocks INTEGER null, -- Example Values: `2`, `0`, `1`, `3`, `5` | Value Statics: Total count 398 - Distinct count 6 - Null count 1210
three_attempted INTEGER null, -- Example Values: `0`, `1`, `6`, `7`, `10` | Value Statics: Total count 540 - Distinct count 12 - Null count 1068
o_rebounds INTEGER null, -- Example Values: `1`, `2`, `0`, `3`, `4` | Value Statics: Total count 493 - Distinct count 10 - Null count 1115
);
CREATE TABLE awards_players
(
foreign key (playerID) references players (playerID) on update cascade on delete cascade,
year INTEGER not null, --
pos TEXT null, -- Example Values: `C`, `F`, `G`, `F/G`, `F/C` | Value Statics: Total count 833 - Distinct count 5 - Null count 886
primary key (playerID, year, award),
lgID TEXT null, -- Example Values: `NBA`, `ABA`, `NBL`, `ABL1` | Value Statics: Total count 1719 - Distinct count 4 - Null count 0
award TEXT not null, --
playerID TEXT not null, --
note TEXT null, -- Example Values: `tie` | Value Statics: Total count 37 - Distinct count 1 - Null count 1682
);
CREATE TABLE series_post
(
tmIDLoser TEXT, --
id INTEGER primary key autoincrement,
series TEXT, -- Example Values: `O`, `M`, `N`, `A`, `K` | Value Statics: Total count 775 - Distinct count 11 - Null count 0
tmIDWinner TEXT, --
round TEXT, -- Example Values: `F`, `QF`, `SF`, `DT`, `DF` | Value Statics: Total count 775 - Distinct count 11 - Null count 0
year INTEGER, --
foreign key (tmIDLoser, year) references teams (tmID, year) on update cascade on delete cascade,
foreign key (tmIDWinner, year) references teams (tmID, year) on update cascade on delete cascade,
W INTEGER, -- Example Values: `4`, `2`, `1`, `3`, `0` | Value Statics: Total count 775 - Distinct count 5 - Null count 0
lgIDLoser TEXT, -- Example Values: `NBA`, `ABA` | Value Statics: Total count 775 - Distinct count 2 - Null count 0
lgIDWinner TEXT, -- Example Values: `NBA`, `ABA` | Value Statics: Total count 775 - Distinct count 2 - Null count 0
L INTEGER, -- Example Values: `1`, `0`, `2`, `3`, `4` | Value Statics: Total count 775 - Distinct count 5 - Null count 0
);
CREATE TABLE players
(
nameGiven TEXT null, -- Example Values: `nameGiven`, `Mort`, `Robert`, `Jim`, `Mike` | Value Statics: Total count 10 - Distinct count 9 - Null count 5052
lastseason INTEGER null, -- Example Values: `0`, `1951` | Value Statics: Total count 5047 - Distinct count 2 - Null count 15
hsCountry TEXT null, --
firstName TEXT null, --
hsCity TEXT null, --
firstseason INTEGER null, -- Example Values: `0`, `1951` | Value Statics: Total count 5047 - Distinct count 2 - Null count 15
weight INTEGER null, --
birthCountry TEXT null, --
race TEXT null, -- Example Values: `B`, `W`, `O`, `1`, `r` | Value Statics: Total count 4903 - Distinct count 5 - Null count 159
lastName TEXT null, --
birthDate DATE null, --
collegeOther TEXT null, --
birthState TEXT null, --
useFirst TEXT null, --
pos TEXT null, -- Example Values: `F-C`, `C`, `G`, `G-F`, `C-F` | Value Statics: Total count 4880 - Distinct count 14 - Null count 182
playerID TEXT not null primary key,
college TEXT null, --
highSchool TEXT null, --
hsState TEXT null, --
height REAL null, --
deathDate DATE null, --
nameSuffix TEXT null, -- Example Values: `Jr.`, `III`, `nameSuffix`, `II`, `IV` | Value Statics: Total count 324 - Distinct count 6 - Null count 4738
nameNick TEXT null, --
fullGivenName TEXT null, --
birthCity TEXT null, --
middleName TEXT null, --
);
CREATE TABLE teams
(
d_pts INTEGER null, --
name TEXT null, --
homeLost INTEGER null, --
o_ftm INTEGER null, --
franchID TEXT null, --
tmID TEXT not null, --
awayWon INTEGER null, --
primary key (year, tmID),
o_fgm INTEGER null, --
year INTEGER not null, --
awayLost INTEGER null, --
arena TEXT null, --
confID TEXT null, -- Example Values: `EC`, `WC` | Value Statics: Total count 1064 - Distinct count 2 - Null count 472
games INTEGER null, --
lost INTEGER null, --
divID TEXT null, -- Example Values: `EA`, `WE`, `ED`, `WD`, `SO` | Value Statics: Total count 1498 - Distinct count 13 - Null count 38
lgID TEXT null, -- Example Values: `NBL`, `NBA`, `PBLA`, `NPBL`, `ABL1` | Value Statics: Total count 1536 - Distinct count 6 - Null count 0
homeWon INTEGER null, --
confRank INTEGER null, -- Example Values: `0`, `4`, `3`, `5`, `7` | Value Statics: Total count 1536 - Distinct count 16 - Null count 0
o_pts INTEGER null, --
`rank` INTEGER null, -- Example Values: `1`, `2`, `4`, `5`, `6` | Value Statics: Total count 1536 - Distinct count 10 - Null count 0
playoff TEXT null, -- Example Values: `CF`, `WC`, `LC`, `CS`, `F` | Value Statics: Total count 901 - Distinct count 15 - Null count 635
won INTEGER null, --
);
CREATE TABLE coaches
(
primary key (coachID, year, tmID, stint),
lgID TEXT null, -- Example Values: `NBA`, `ABA`, `ABL1`, `PBLA`, `NPBL` | Value Statics: Total count 1689 - Distinct count 5 - Null count 0
post_losses INTEGER null, -- Example Values: `3`, `9`, `7`, `8`, `0` | Value Statics: Total count 1649 - Distinct count 12 - Null count 40
year INTEGER not null, --
won INTEGER null, --
foreign key (tmID, year) references teams (tmID, year) on update cascade on delete cascade,
post_wins INTEGER null, -- Example Values: `0`, `12`, `9`, `13`, `1` | Value Statics: Total count 1649 - Distinct count 17 - Null count 40
coachID TEXT not null, --
tmID TEXT not null, --
lost INTEGER null, --
stint INTEGER not null, -- Example Values: `2`, `1`, `4`, `5`, `3` | Value Statics: Total count 1689 - Distinct count 5 - Null count 0
); |
olympics | How many Olympic competitors are from Finland? | competitors refer to person_id; from Finland refers to region_name = 'Finland'; | SELECT COUNT(T1.person_id) FROM person_region AS T1 INNER JOIN noc_region AS T2 ON T1.region_id = T2.id WHERE T2.region_name = 'Finland' | CREATE TABLE event
(
event_name TEXT default NULL, --
sport_id INTEGER default NULL, --
foreign key (sport_id) references sport(id),
id INTEGER not null primary key,
);
CREATE TABLE sport
(
id INTEGER not null primary key,
sport_name TEXT default NULL, --
);
CREATE TABLE city
(
city_name TEXT default NULL, --
id INTEGER not null primary key,
);
CREATE TABLE games_city
(
city_id INTEGER default NULL, --
foreign key (games_id) references games(id),
games_id INTEGER default NULL, --
foreign key (city_id) references city(id),
);
CREATE TABLE competitor_event
(
foreign key (event_id) references event(id),
foreign key (competitor_id) references games_competitor(id),
foreign key (competitor_id) references games_competitor(id),
foreign key (medal_id) references medal(id),
medal_id INTEGER default NULL, -- Example Values: `4`, `1`, `3`, `2` | Value Statics: Total count 100000 - Distinct count 4 - Null count 0
event_id INTEGER default NULL, --
competitor_id INTEGER default NULL, --
);
CREATE TABLE person
(
weight INTEGER default NULL, --
height INTEGER default NULL, --
id INTEGER not null primary key,
full_name TEXT default NULL, --
gender TEXT default NULL, -- Example Values: `M`, `F` | Value Statics: Total count 100000 - Distinct count 2 - Null count 0
);
CREATE TABLE noc_region
(
region_name TEXT default NULL, --
id INTEGER not null primary key,
noc TEXT default NULL, --
);
CREATE TABLE medal
(
id INTEGER not null primary key,
medal_name TEXT default NULL, -- Example Values: `Gold`, `Silver`, `Bronze`, `NA` | Value Statics: Total count 4 - Distinct count 4 - Null count 0
);
CREATE TABLE person_region
(
foreign key (region_id) references noc_region(id),
region_id INTEGER default NULL, --
foreign key (person_id) references person(id),
person_id INTEGER default NULL, --
);
CREATE TABLE games
(
season TEXT default NULL, -- Example Values: `Summer`, `Winter` | Value Statics: Total count 51 - Distinct count 2 - Null count 0
id INTEGER not null primary key,
games_name TEXT default NULL, --
games_year INTEGER default NULL, --
);
CREATE TABLE games_competitor
(
id INTEGER not null primary key,
foreign key (games_id) references games(id),
games_id INTEGER default NULL, --
age INTEGER default NULL, --
foreign key (person_id) references person(id),
person_id INTEGER default NULL, --
); |
shakespeare | How many scenes are there in Act 1 in Twelfth Night? | Twelfth Night refers to Title = 'Twelfth Night' | SELECT COUNT(T1.id) FROM works AS T1 INNER JOIN chapters AS T2 ON T1.id = T2.work_id WHERE T2.Act = 1 AND T1.Title = 'Twelfth Night' | CREATE TABLE characters
(
CharName TEXT not null, --
Abbrev TEXT not null, --
Description TEXT not null, --
id INTEGER primary key autoincrement,
);
CREATE TABLE paragraphs
(
chapter_id INTEGER default 0 not null references chapters, --
character_id INTEGER not null references characters, --
ParagraphNum INTEGER not null, --
PlainText TEXT not null, --
id INTEGER primary key autoincrement,
);
CREATE TABLE works
(
GenreType TEXT not null, -- Example Values: `Comedy`, `Tragedy`, `History`, `Poem`, `Sonnet` | Value Statics: Total count 43 - Distinct count 5 - Null count 0
Title TEXT not null, --
Date INTEGER not null, --
id INTEGER primary key autoincrement,
LongTitle TEXT not null, --
);
CREATE TABLE chapters
(
work_id INTEGER not null references works, --
Act INTEGER not null, -- Example Values: `1`, `2`, `3`, `4`, `5` | Value Statics: Total count 945 - Distinct count 6 - Null count 0
Description TEXT not null, --
id INTEGER primary key autoincrement,
Scene INTEGER not null, --
); |
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' | CREATE TABLE current
(
gender_bio TEXT, -- Example Values: `M`, `F` | Value Statics: Total count 541 - Distinct count 2 - Null count 0
suffix_name TEXT, -- Example Values: `Jr.`, `III`, `II` | Value Statics: Total count 20 - Distinct count 3 - Null count 521
house_history_id REAL, --
birthday_bio DATE, --
nickname_name TEXT, --
religion_bio TEXT, --
google_entity_id_id TEXT, --
govtrack_id INTEGER, --
cspan_id REAL, --
primary key (bioguide_id, cspan_id),
wikipedia_id TEXT, --
maplight_id REAL, --
last_name TEXT, --
icpsr_id REAL, --
fec_id TEXT, --
votesmart_id REAL, --
first_name TEXT, --
lis_id TEXT, --
bioguide_id TEXT, --
wikidata_id TEXT, --
middle_name TEXT, --
ballotpedia_id TEXT, --
opensecrets_id TEXT, --
official_full_name TEXT, --
thomas_id INTEGER, --
);
CREATE TABLE historical
(
fec_id TEXT, --
suffix_name TEXT, -- Example Values: `Jr.`, `Sr.`, `II`, `III`, `IV` | Value Statics: Total count 418 - Distinct count 5 - Null count 11446
govtrack_id INTEGER, --
house_history_id REAL, --
opensecrets_id TEXT, --
votesmart_id TEXT, --
bioguide_id TEXT primary key,
nickname_name TEXT, --
official_full_name TEXT, --
house_history_alternate_id TEXT, -- Example Values: `13283.0` | Value Statics: Total count 1 - Distinct count 1 - Null count 11863
gender_bio TEXT, -- Example Values: `M`, `F` | Value Statics: Total count 11864 - Distinct count 2 - Null count 0
bioguide_previous_id TEXT, -- Example Values: `['F000246']`, `['L000266']`, `['W000790']` | Value Statics: Total count 3 - Distinct count 3 - Null count 11861
icpsr_id REAL, --
wikipedia_id TEXT, --
birthday_bio TEXT, --
religion_bio TEXT, --
lis_id TEXT, --
middle_name TEXT, --
cspan_id TEXT, --
last_name TEXT, --
first_name TEXT, --
wikidata_id TEXT, --
thomas_id TEXT, --
ballotpedia_id TEXT, --
maplight_id TEXT, --
google_entity_id_id TEXT, --
);
CREATE TABLE historical-terms
(
bioguide TEXT primary key,
middle TEXT, --
title TEXT, -- Example Values: `Majority Leader`, `Speaker` | Value Statics: Total count 3 - Distinct count 2 - Null count 11861
party TEXT, --
type TEXT, -- Example Values: `sen`, `rep` | Value Statics: Total count 11858 - Distinct count 2 - Null count 6
phone TEXT, --
rss_url TEXT, -- Example Values: `http://radel.house.gov/news/rss.aspx`, `http://www.begich.senate.gov/public/?a=rss.feed`, `http://www.hagan.senate.gov/rss`, `http://negretemcleod.house.gov/rss.xml`, `http://garcia.house.gov/rss.xml` | Value Statics: Total count 12 - Distinct count 12 - Null count 11852
name TEXT, --
start TEXT, --
address TEXT, --
party_affiliations TEXT, -- Example Values: `{'start': '2009-01-06', 'end': '2009-12-22', 'party': 'Democrat'}`, `{'start': '2003-01-07', 'end': '2004-08-09', 'party': 'Democrat'}` | Value Statics: Total count 2 - Distinct count 2 - Null count 11862
relation TEXT, --
state_rank TEXT, -- Example Values: `junior`, `senior` | Value Statics: Total count 7 - Distinct count 2 - Null count 11857
last TEXT, -- Example Values: `Levy`, `Lambert`, `Bono` | Value Statics: Total count 3 - Distinct count 3 - Null count 11861
url TEXT, --
fax TEXT, --
contact_form TEXT, --
office TEXT, --
state TEXT, --
foreign key (bioguide) references historical(bioguide_id),
class REAL, -- Example Values: `2.0`, `1.0`, `3.0` | Value Statics: Total count 1256 - Distinct count 3 - Null count 10608
end TEXT, --
district REAL, --
chamber TEXT, -- Example Values: `house`, `senate` | Value Statics: Total count 3 - Distinct count 2 - Null count 11861
);
CREATE TABLE current-terms
(
foreign key (bioguide) references current(bioguide_id),
phone TEXT, --
party_affiliations TEXT, -- Example Values: `{'start': '2009-01-06', 'end': '2009-02-23', 'party': 'Independent'}`, `{'start': '1993-01-05', 'end': '1994-11-09', 'party': 'Democrat'}` | Value Statics: Total count 2 - Distinct count 2 - Null count 3076
title TEXT, -- Example Values: `Minority Whip`, `Majority Whip`, `Minority Leader`, `Majority Leader`, `Speaker` | Value Statics: Total count 28 - Distinct count 5 - Null count 3050
district REAL, --
bioguide TEXT, --
office TEXT, --
class REAL, -- Example Values: `1.0`, `2.0`, `3.0` | Value Statics: Total count 244 - Distinct count 3 - Null count 2834
type TEXT, -- Example Values: `rep`, `sen` | Value Statics: Total count 3014 - Distinct count 2 - Null count 64
start TEXT, --
address TEXT, --
rss_url TEXT, --
url TEXT, --
primary key (bioguide, end),
fax TEXT, --
chamber TEXT, -- Example Values: `senate`, `house` | Value Statics: Total count 28 - Distinct count 2 - Null count 3050
end TEXT, --
caucus TEXT, -- Example Values: `Democrat` | Value Statics: Total count 3 - Distinct count 1 - Null count 3075
state TEXT, --
last TEXT, -- Example Values: `Menendez` | Value Statics: Total count 1 - Distinct count 1 - Null count 3077
relation TEXT, -- Example Values: `son`, `nephew`, `cousin`, `daughter`, `grandson` | Value Statics: Total count 35 - Distinct count 13 - Null count 3043
state_rank TEXT, -- Example Values: `senior`, `junior` | Value Statics: Total count 147 - Distinct count 2 - Null count 2931
name TEXT, --
contact_form TEXT, --
party TEXT, -- Example Values: `Democrat`, `Republican`, `Independent` | Value Statics: Total count 3014 - Distinct count 3 - Null count 64
);
CREATE TABLE social-media
(
foreign key (bioguide) references current(bioguide_id),
instagram TEXT, --
thomas INTEGER, --
youtube TEXT, --
twitter TEXT, --
facebook TEXT, --
youtube_id TEXT, --
twitter_id REAL, --
facebook_id REAL, --
govtrack REAL, --
bioguide TEXT primary key,
instagram_id REAL, --
); |
olympics | When John Aalberg took part in the 1994 Winter Olympic Game, how old was he? | how old was he refers to age; 1994 Winter refers to games_name = '1994 Winter'; | SELECT T2.age FROM games AS T1 INNER JOIN games_competitor AS T2 ON T1.id = T2.games_id INNER JOIN person AS T3 ON T2.person_id = T3.id WHERE T3.full_name = 'John Aalberg' AND T1.games_name = '1994 Winter' | CREATE TABLE event
(
event_name TEXT default NULL, --
sport_id INTEGER default NULL, --
foreign key (sport_id) references sport(id),
id INTEGER not null primary key,
);
CREATE TABLE sport
(
id INTEGER not null primary key,
sport_name TEXT default NULL, --
);
CREATE TABLE city
(
city_name TEXT default NULL, --
id INTEGER not null primary key,
);
CREATE TABLE games_city
(
city_id INTEGER default NULL, --
foreign key (games_id) references games(id),
games_id INTEGER default NULL, --
foreign key (city_id) references city(id),
);
CREATE TABLE competitor_event
(
foreign key (event_id) references event(id),
foreign key (competitor_id) references games_competitor(id),
foreign key (competitor_id) references games_competitor(id),
foreign key (medal_id) references medal(id),
medal_id INTEGER default NULL, -- Example Values: `4`, `1`, `3`, `2` | Value Statics: Total count 100000 - Distinct count 4 - Null count 0
event_id INTEGER default NULL, --
competitor_id INTEGER default NULL, --
);
CREATE TABLE person
(
weight INTEGER default NULL, --
height INTEGER default NULL, --
id INTEGER not null primary key,
full_name TEXT default NULL, --
gender TEXT default NULL, -- Example Values: `M`, `F` | Value Statics: Total count 100000 - Distinct count 2 - Null count 0
);
CREATE TABLE noc_region
(
region_name TEXT default NULL, --
id INTEGER not null primary key,
noc TEXT default NULL, --
);
CREATE TABLE medal
(
id INTEGER not null primary key,
medal_name TEXT default NULL, -- Example Values: `Gold`, `Silver`, `Bronze`, `NA` | Value Statics: Total count 4 - Distinct count 4 - Null count 0
);
CREATE TABLE person_region
(
foreign key (region_id) references noc_region(id),
region_id INTEGER default NULL, --
foreign key (person_id) references person(id),
person_id INTEGER default NULL, --
);
CREATE TABLE games
(
season TEXT default NULL, -- Example Values: `Summer`, `Winter` | Value Statics: Total count 51 - Distinct count 2 - Null count 0
id INTEGER not null primary key,
games_name TEXT default NULL, --
games_year INTEGER default NULL, --
);
CREATE TABLE games_competitor
(
id INTEGER not null primary key,
foreign key (games_id) references games(id),
games_id INTEGER default NULL, --
age INTEGER default NULL, --
foreign key (person_id) references person(id),
person_id INTEGER default NULL, --
); |
professional_basketball | For the player in 2011 who started every game he played, which team had the player who had the most steals? | in 2011 refers to year = 2011; started every game refers to GP = GS; the most steals refers to max(steals); team refers to tmID | SELECT T1.tmID FROM teams AS T1 INNER JOIN players_teams AS T2 ON T1.tmID = T2.tmID AND T1.year = T2.year WHERE T1.year = 2011 AND T2.GP = T2.GS GROUP BY T1.tmID, T2.steals ORDER BY T2.steals DESC LIMIT 1 | CREATE TABLE players_teams
(
PostGS INTEGER, --
PostdRebounds INTEGER, --
PostPF INTEGER, --
tmID TEXT, --
threeAttempted INTEGER, --
PostRebounds INTEGER, --
assists INTEGER, --
threeMade INTEGER, --
PostBlocks INTEGER, --
PostTurnovers INTEGER, --
GP INTEGER, --
lgID TEXT, -- Example Values: `NBA`, `NBL`, `ABA`, `ABL1`, `NPBL` | Value Statics: Total count 23751 - Distinct count 6 - Null count 0
foreign key (tmID, year) references teams (tmID, year) on update cascade on delete cascade,
PostfgMade INTEGER, --
steals INTEGER, --
oRebounds INTEGER, --
PostftAttempted INTEGER, --
ftAttempted INTEGER, --
ftMade INTEGER, --
points INTEGER, --
PostfgAttempted INTEGER, --
PostftMade INTEGER, --
note TEXT, -- Example Values: `C` | Value Statics: Total count 43 - Distinct count 1 - Null count 23708
dRebounds INTEGER, --
PostSteals INTEGER, --
blocks INTEGER, --
PostAssists INTEGER, --
minutes INTEGER, --
fgAttempted INTEGER, --
playerID TEXT not null references players on update cascade on delete cascade, --
PostthreeMade INTEGER, --
PostPoints INTEGER, --
year INTEGER, --
PF INTEGER, --
fgMade INTEGER, --
PostthreeAttempted INTEGER, --
rebounds INTEGER, --
id INTEGER primary key autoincrement,
stint INTEGER, -- Example Values: `1`, `2`, `0`, `3`, `4` | Value Statics: Total count 23751 - Distinct count 6 - Null count 0
PostMinutes INTEGER, --
PostGP INTEGER, --
turnovers INTEGER, --
PostoRebounds INTEGER, --
GS INTEGER, --
);
CREATE TABLE awards_coaches
(
award TEXT, -- Example Values: `NBA Coach of the Year`, `ABA Coach of the Year` | Value Statics: Total count 61 - Distinct count 2 - Null count 0
id INTEGER primary key autoincrement,
note TEXT, -- Example Values: `tie` | Value Statics: Total count 4 - Distinct count 1 - Null count 57
coachID TEXT, --
lgID TEXT, -- Example Values: `NBA`, `ABA` | Value Statics: Total count 61 - Distinct count 2 - Null count 0
foreign key (coachID, year) references coaches (coachID, year) on update cascade on delete cascade,
year INTEGER, --
);
CREATE TABLE draft
(
draftOverall INTEGER null, --
lgID TEXT null, -- Example Values: `ABA`, `NBA` | Value Statics: Total count 8621 - Distinct count 2 - Null count 0
suffixName TEXT null, -- Example Values: `Jr.` | Value Statics: Total count 2 - Distinct count 1 - Null count 8619
draftYear INTEGER null, --
draftSelection INTEGER null, --
tmID TEXT null, --
draftRound INTEGER null, --
lastName TEXT null, --
playerID TEXT null, --
draftFrom TEXT null, --
id INTEGER default 0 not null primary key,
firstName TEXT null, --
foreign key (tmID, draftYear) references teams (tmID, year) on update cascade on delete cascade,
foreign key (tmID, draftYear) references teams (tmID, year) on update cascade on delete cascade,
);
CREATE TABLE player_allstar
(
rebounds INTEGER null, --
playerID TEXT not null, --
season_id INTEGER not null, --
assists INTEGER null, --
conference TEXT null, -- Example Values: `East`, `West`, `Weset`, `Allstars`, `Denver` | Value Statics: Total count 1608 - Distinct count 5 - Null count 0
points INTEGER null, --
personal_fouls INTEGER null, -- Example Values: `3`, `2`, `0`, `1`, `5` | Value Statics: Total count 540 - Distinct count 8 - Null count 1068
ft_attempted INTEGER null, -- Example Values: `2`, `4`, `0`, `6`, `3` | Value Statics: Total count 1561 - Distinct count 17 - Null count 47
fg_attempted INTEGER null, --
league_id TEXT null, -- Example Values: `NBA`, `ABA` | Value Statics: Total count 1608 - Distinct count 2 - Null count 0
foreign key (playerID) references players (playerID) on update cascade on delete cascade,
fg_made INTEGER null, -- Example Values: `4`, `8`, `5`, `7`, `3` | Value Statics: Total count 1561 - Distinct count 18 - Null count 47
ft_made INTEGER null, -- Example Values: `2`, `3`, `0`, `1`, `4` | Value Statics: Total count 1561 - Distinct count 13 - Null count 47
steals INTEGER null, -- Example Values: `3`, `0`, `1`, `2`, `5` | Value Statics: Total count 398 - Distinct count 7 - Null count 1210
games_played INTEGER null, -- Example Values: `1` | Value Statics: Total count 1608 - Distinct count 1 - Null count 0
first_name TEXT null, --
d_rebounds INTEGER null, -- Example Values: `2`, `5`, `0`, `1`, `4` | Value Statics: Total count 493 - Distinct count 14 - Null count 1115
last_name TEXT null, --
primary key (playerID, season_id),
turnovers INTEGER null, -- Example Values: `1`, `0`, `3`, `2`, `4` | Value Statics: Total count 493 - Distinct count 9 - Null count 1115
three_made INTEGER null, -- Example Values: `0`, `1`, `3`, `5`, `4` | Value Statics: Total count 566 - Distinct count 7 - Null count 1042
minutes INTEGER null, --
blocks INTEGER null, -- Example Values: `2`, `0`, `1`, `3`, `5` | Value Statics: Total count 398 - Distinct count 6 - Null count 1210
three_attempted INTEGER null, -- Example Values: `0`, `1`, `6`, `7`, `10` | Value Statics: Total count 540 - Distinct count 12 - Null count 1068
o_rebounds INTEGER null, -- Example Values: `1`, `2`, `0`, `3`, `4` | Value Statics: Total count 493 - Distinct count 10 - Null count 1115
);
CREATE TABLE awards_players
(
foreign key (playerID) references players (playerID) on update cascade on delete cascade,
year INTEGER not null, --
pos TEXT null, -- Example Values: `C`, `F`, `G`, `F/G`, `F/C` | Value Statics: Total count 833 - Distinct count 5 - Null count 886
primary key (playerID, year, award),
lgID TEXT null, -- Example Values: `NBA`, `ABA`, `NBL`, `ABL1` | Value Statics: Total count 1719 - Distinct count 4 - Null count 0
award TEXT not null, --
playerID TEXT not null, --
note TEXT null, -- Example Values: `tie` | Value Statics: Total count 37 - Distinct count 1 - Null count 1682
);
CREATE TABLE series_post
(
tmIDLoser TEXT, --
id INTEGER primary key autoincrement,
series TEXT, -- Example Values: `O`, `M`, `N`, `A`, `K` | Value Statics: Total count 775 - Distinct count 11 - Null count 0
tmIDWinner TEXT, --
round TEXT, -- Example Values: `F`, `QF`, `SF`, `DT`, `DF` | Value Statics: Total count 775 - Distinct count 11 - Null count 0
year INTEGER, --
foreign key (tmIDLoser, year) references teams (tmID, year) on update cascade on delete cascade,
foreign key (tmIDWinner, year) references teams (tmID, year) on update cascade on delete cascade,
W INTEGER, -- Example Values: `4`, `2`, `1`, `3`, `0` | Value Statics: Total count 775 - Distinct count 5 - Null count 0
lgIDLoser TEXT, -- Example Values: `NBA`, `ABA` | Value Statics: Total count 775 - Distinct count 2 - Null count 0
lgIDWinner TEXT, -- Example Values: `NBA`, `ABA` | Value Statics: Total count 775 - Distinct count 2 - Null count 0
L INTEGER, -- Example Values: `1`, `0`, `2`, `3`, `4` | Value Statics: Total count 775 - Distinct count 5 - Null count 0
);
CREATE TABLE players
(
nameGiven TEXT null, -- Example Values: `nameGiven`, `Mort`, `Robert`, `Jim`, `Mike` | Value Statics: Total count 10 - Distinct count 9 - Null count 5052
lastseason INTEGER null, -- Example Values: `0`, `1951` | Value Statics: Total count 5047 - Distinct count 2 - Null count 15
hsCountry TEXT null, --
firstName TEXT null, --
hsCity TEXT null, --
firstseason INTEGER null, -- Example Values: `0`, `1951` | Value Statics: Total count 5047 - Distinct count 2 - Null count 15
weight INTEGER null, --
birthCountry TEXT null, --
race TEXT null, -- Example Values: `B`, `W`, `O`, `1`, `r` | Value Statics: Total count 4903 - Distinct count 5 - Null count 159
lastName TEXT null, --
birthDate DATE null, --
collegeOther TEXT null, --
birthState TEXT null, --
useFirst TEXT null, --
pos TEXT null, -- Example Values: `F-C`, `C`, `G`, `G-F`, `C-F` | Value Statics: Total count 4880 - Distinct count 14 - Null count 182
playerID TEXT not null primary key,
college TEXT null, --
highSchool TEXT null, --
hsState TEXT null, --
height REAL null, --
deathDate DATE null, --
nameSuffix TEXT null, -- Example Values: `Jr.`, `III`, `nameSuffix`, `II`, `IV` | Value Statics: Total count 324 - Distinct count 6 - Null count 4738
nameNick TEXT null, --
fullGivenName TEXT null, --
birthCity TEXT null, --
middleName TEXT null, --
);
CREATE TABLE teams
(
d_pts INTEGER null, --
name TEXT null, --
homeLost INTEGER null, --
o_ftm INTEGER null, --
franchID TEXT null, --
tmID TEXT not null, --
awayWon INTEGER null, --
primary key (year, tmID),
o_fgm INTEGER null, --
year INTEGER not null, --
awayLost INTEGER null, --
arena TEXT null, --
confID TEXT null, -- Example Values: `EC`, `WC` | Value Statics: Total count 1064 - Distinct count 2 - Null count 472
games INTEGER null, --
lost INTEGER null, --
divID TEXT null, -- Example Values: `EA`, `WE`, `ED`, `WD`, `SO` | Value Statics: Total count 1498 - Distinct count 13 - Null count 38
lgID TEXT null, -- Example Values: `NBL`, `NBA`, `PBLA`, `NPBL`, `ABL1` | Value Statics: Total count 1536 - Distinct count 6 - Null count 0
homeWon INTEGER null, --
confRank INTEGER null, -- Example Values: `0`, `4`, `3`, `5`, `7` | Value Statics: Total count 1536 - Distinct count 16 - Null count 0
o_pts INTEGER null, --
`rank` INTEGER null, -- Example Values: `1`, `2`, `4`, `5`, `6` | Value Statics: Total count 1536 - Distinct count 10 - Null count 0
playoff TEXT null, -- Example Values: `CF`, `WC`, `LC`, `CS`, `F` | Value Statics: Total count 901 - Distinct count 15 - Null count 635
won INTEGER null, --
);
CREATE TABLE coaches
(
primary key (coachID, year, tmID, stint),
lgID TEXT null, -- Example Values: `NBA`, `ABA`, `ABL1`, `PBLA`, `NPBL` | Value Statics: Total count 1689 - Distinct count 5 - Null count 0
post_losses INTEGER null, -- Example Values: `3`, `9`, `7`, `8`, `0` | Value Statics: Total count 1649 - Distinct count 12 - Null count 40
year INTEGER not null, --
won INTEGER null, --
foreign key (tmID, year) references teams (tmID, year) on update cascade on delete cascade,
post_wins INTEGER null, -- Example Values: `0`, `12`, `9`, `13`, `1` | Value Statics: Total count 1649 - Distinct count 17 - Null count 40
coachID TEXT not null, --
tmID TEXT not null, --
lost INTEGER null, --
stint INTEGER not null, -- Example Values: `2`, `1`, `4`, `5`, `3` | Value Statics: Total count 1689 - Distinct count 5 - Null count 0
); |
legislator | How many legislators are not senator? | not senator refers to class is null; | SELECT COUNT(bioguide) FROM `current-terms` WHERE class IS NULL | CREATE TABLE current
(
gender_bio TEXT, -- Example Values: `M`, `F` | Value Statics: Total count 541 - Distinct count 2 - Null count 0
suffix_name TEXT, -- Example Values: `Jr.`, `III`, `II` | Value Statics: Total count 20 - Distinct count 3 - Null count 521
house_history_id REAL, --
birthday_bio DATE, --
nickname_name TEXT, --
religion_bio TEXT, --
google_entity_id_id TEXT, --
govtrack_id INTEGER, --
cspan_id REAL, --
primary key (bioguide_id, cspan_id),
wikipedia_id TEXT, --
maplight_id REAL, --
last_name TEXT, --
icpsr_id REAL, --
fec_id TEXT, --
votesmart_id REAL, --
first_name TEXT, --
lis_id TEXT, --
bioguide_id TEXT, --
wikidata_id TEXT, --
middle_name TEXT, --
ballotpedia_id TEXT, --
opensecrets_id TEXT, --
official_full_name TEXT, --
thomas_id INTEGER, --
);
CREATE TABLE historical
(
fec_id TEXT, --
suffix_name TEXT, -- Example Values: `Jr.`, `Sr.`, `II`, `III`, `IV` | Value Statics: Total count 418 - Distinct count 5 - Null count 11446
govtrack_id INTEGER, --
house_history_id REAL, --
opensecrets_id TEXT, --
votesmart_id TEXT, --
bioguide_id TEXT primary key,
nickname_name TEXT, --
official_full_name TEXT, --
house_history_alternate_id TEXT, -- Example Values: `13283.0` | Value Statics: Total count 1 - Distinct count 1 - Null count 11863
gender_bio TEXT, -- Example Values: `M`, `F` | Value Statics: Total count 11864 - Distinct count 2 - Null count 0
bioguide_previous_id TEXT, -- Example Values: `['F000246']`, `['L000266']`, `['W000790']` | Value Statics: Total count 3 - Distinct count 3 - Null count 11861
icpsr_id REAL, --
wikipedia_id TEXT, --
birthday_bio TEXT, --
religion_bio TEXT, --
lis_id TEXT, --
middle_name TEXT, --
cspan_id TEXT, --
last_name TEXT, --
first_name TEXT, --
wikidata_id TEXT, --
thomas_id TEXT, --
ballotpedia_id TEXT, --
maplight_id TEXT, --
google_entity_id_id TEXT, --
);
CREATE TABLE historical-terms
(
bioguide TEXT primary key,
middle TEXT, --
title TEXT, -- Example Values: `Majority Leader`, `Speaker` | Value Statics: Total count 3 - Distinct count 2 - Null count 11861
party TEXT, --
type TEXT, -- Example Values: `sen`, `rep` | Value Statics: Total count 11858 - Distinct count 2 - Null count 6
phone TEXT, --
rss_url TEXT, -- Example Values: `http://radel.house.gov/news/rss.aspx`, `http://www.begich.senate.gov/public/?a=rss.feed`, `http://www.hagan.senate.gov/rss`, `http://negretemcleod.house.gov/rss.xml`, `http://garcia.house.gov/rss.xml` | Value Statics: Total count 12 - Distinct count 12 - Null count 11852
name TEXT, --
start TEXT, --
address TEXT, --
party_affiliations TEXT, -- Example Values: `{'start': '2009-01-06', 'end': '2009-12-22', 'party': 'Democrat'}`, `{'start': '2003-01-07', 'end': '2004-08-09', 'party': 'Democrat'}` | Value Statics: Total count 2 - Distinct count 2 - Null count 11862
relation TEXT, --
state_rank TEXT, -- Example Values: `junior`, `senior` | Value Statics: Total count 7 - Distinct count 2 - Null count 11857
last TEXT, -- Example Values: `Levy`, `Lambert`, `Bono` | Value Statics: Total count 3 - Distinct count 3 - Null count 11861
url TEXT, --
fax TEXT, --
contact_form TEXT, --
office TEXT, --
state TEXT, --
foreign key (bioguide) references historical(bioguide_id),
class REAL, -- Example Values: `2.0`, `1.0`, `3.0` | Value Statics: Total count 1256 - Distinct count 3 - Null count 10608
end TEXT, --
district REAL, --
chamber TEXT, -- Example Values: `house`, `senate` | Value Statics: Total count 3 - Distinct count 2 - Null count 11861
);
CREATE TABLE current-terms
(
foreign key (bioguide) references current(bioguide_id),
phone TEXT, --
party_affiliations TEXT, -- Example Values: `{'start': '2009-01-06', 'end': '2009-02-23', 'party': 'Independent'}`, `{'start': '1993-01-05', 'end': '1994-11-09', 'party': 'Democrat'}` | Value Statics: Total count 2 - Distinct count 2 - Null count 3076
title TEXT, -- Example Values: `Minority Whip`, `Majority Whip`, `Minority Leader`, `Majority Leader`, `Speaker` | Value Statics: Total count 28 - Distinct count 5 - Null count 3050
district REAL, --
bioguide TEXT, --
office TEXT, --
class REAL, -- Example Values: `1.0`, `2.0`, `3.0` | Value Statics: Total count 244 - Distinct count 3 - Null count 2834
type TEXT, -- Example Values: `rep`, `sen` | Value Statics: Total count 3014 - Distinct count 2 - Null count 64
start TEXT, --
address TEXT, --
rss_url TEXT, --
url TEXT, --
primary key (bioguide, end),
fax TEXT, --
chamber TEXT, -- Example Values: `senate`, `house` | Value Statics: Total count 28 - Distinct count 2 - Null count 3050
end TEXT, --
caucus TEXT, -- Example Values: `Democrat` | Value Statics: Total count 3 - Distinct count 1 - Null count 3075
state TEXT, --
last TEXT, -- Example Values: `Menendez` | Value Statics: Total count 1 - Distinct count 1 - Null count 3077
relation TEXT, -- Example Values: `son`, `nephew`, `cousin`, `daughter`, `grandson` | Value Statics: Total count 35 - Distinct count 13 - Null count 3043
state_rank TEXT, -- Example Values: `senior`, `junior` | Value Statics: Total count 147 - Distinct count 2 - Null count 2931
name TEXT, --
contact_form TEXT, --
party TEXT, -- Example Values: `Democrat`, `Republican`, `Independent` | Value Statics: Total count 3014 - Distinct count 3 - Null count 64
);
CREATE TABLE social-media
(
foreign key (bioguide) references current(bioguide_id),
instagram TEXT, --
thomas INTEGER, --
youtube TEXT, --
twitter TEXT, --
facebook TEXT, --
youtube_id TEXT, --
twitter_id REAL, --
facebook_id REAL, --
govtrack REAL, --
bioguide TEXT primary key,
instagram_id REAL, --
); |
professional_basketball | Which team did the youngest player who could be in F-G position play in the NBA? | team refers to tmID; the youngest refers to max(year); F-G position refers to pos like '%F'; NBA refers to lgID = 'NBA' | SELECT T1.tmID FROM teams AS T1 INNER JOIN players_teams AS T2 ON T1.tmID = T2.tmID AND T1.year = T2.year INNER JOIN players AS T3 ON T2.playerID = T3.playerID WHERE T3.pos = 'F-G' AND T2.lgID = 'NBA' ORDER BY T3.birthDate DESC LIMIT 1 | CREATE TABLE players_teams
(
PostGS INTEGER, --
PostdRebounds INTEGER, --
PostPF INTEGER, --
tmID TEXT, --
threeAttempted INTEGER, --
PostRebounds INTEGER, --
assists INTEGER, --
threeMade INTEGER, --
PostBlocks INTEGER, --
PostTurnovers INTEGER, --
GP INTEGER, --
lgID TEXT, -- Example Values: `NBA`, `NBL`, `ABA`, `ABL1`, `NPBL` | Value Statics: Total count 23751 - Distinct count 6 - Null count 0
foreign key (tmID, year) references teams (tmID, year) on update cascade on delete cascade,
PostfgMade INTEGER, --
steals INTEGER, --
oRebounds INTEGER, --
PostftAttempted INTEGER, --
ftAttempted INTEGER, --
ftMade INTEGER, --
points INTEGER, --
PostfgAttempted INTEGER, --
PostftMade INTEGER, --
note TEXT, -- Example Values: `C` | Value Statics: Total count 43 - Distinct count 1 - Null count 23708
dRebounds INTEGER, --
PostSteals INTEGER, --
blocks INTEGER, --
PostAssists INTEGER, --
minutes INTEGER, --
fgAttempted INTEGER, --
playerID TEXT not null references players on update cascade on delete cascade, --
PostthreeMade INTEGER, --
PostPoints INTEGER, --
year INTEGER, --
PF INTEGER, --
fgMade INTEGER, --
PostthreeAttempted INTEGER, --
rebounds INTEGER, --
id INTEGER primary key autoincrement,
stint INTEGER, -- Example Values: `1`, `2`, `0`, `3`, `4` | Value Statics: Total count 23751 - Distinct count 6 - Null count 0
PostMinutes INTEGER, --
PostGP INTEGER, --
turnovers INTEGER, --
PostoRebounds INTEGER, --
GS INTEGER, --
);
CREATE TABLE awards_coaches
(
award TEXT, -- Example Values: `NBA Coach of the Year`, `ABA Coach of the Year` | Value Statics: Total count 61 - Distinct count 2 - Null count 0
id INTEGER primary key autoincrement,
note TEXT, -- Example Values: `tie` | Value Statics: Total count 4 - Distinct count 1 - Null count 57
coachID TEXT, --
lgID TEXT, -- Example Values: `NBA`, `ABA` | Value Statics: Total count 61 - Distinct count 2 - Null count 0
foreign key (coachID, year) references coaches (coachID, year) on update cascade on delete cascade,
year INTEGER, --
);
CREATE TABLE draft
(
draftOverall INTEGER null, --
lgID TEXT null, -- Example Values: `ABA`, `NBA` | Value Statics: Total count 8621 - Distinct count 2 - Null count 0
suffixName TEXT null, -- Example Values: `Jr.` | Value Statics: Total count 2 - Distinct count 1 - Null count 8619
draftYear INTEGER null, --
draftSelection INTEGER null, --
tmID TEXT null, --
draftRound INTEGER null, --
lastName TEXT null, --
playerID TEXT null, --
draftFrom TEXT null, --
id INTEGER default 0 not null primary key,
firstName TEXT null, --
foreign key (tmID, draftYear) references teams (tmID, year) on update cascade on delete cascade,
foreign key (tmID, draftYear) references teams (tmID, year) on update cascade on delete cascade,
);
CREATE TABLE player_allstar
(
rebounds INTEGER null, --
playerID TEXT not null, --
season_id INTEGER not null, --
assists INTEGER null, --
conference TEXT null, -- Example Values: `East`, `West`, `Weset`, `Allstars`, `Denver` | Value Statics: Total count 1608 - Distinct count 5 - Null count 0
points INTEGER null, --
personal_fouls INTEGER null, -- Example Values: `3`, `2`, `0`, `1`, `5` | Value Statics: Total count 540 - Distinct count 8 - Null count 1068
ft_attempted INTEGER null, -- Example Values: `2`, `4`, `0`, `6`, `3` | Value Statics: Total count 1561 - Distinct count 17 - Null count 47
fg_attempted INTEGER null, --
league_id TEXT null, -- Example Values: `NBA`, `ABA` | Value Statics: Total count 1608 - Distinct count 2 - Null count 0
foreign key (playerID) references players (playerID) on update cascade on delete cascade,
fg_made INTEGER null, -- Example Values: `4`, `8`, `5`, `7`, `3` | Value Statics: Total count 1561 - Distinct count 18 - Null count 47
ft_made INTEGER null, -- Example Values: `2`, `3`, `0`, `1`, `4` | Value Statics: Total count 1561 - Distinct count 13 - Null count 47
steals INTEGER null, -- Example Values: `3`, `0`, `1`, `2`, `5` | Value Statics: Total count 398 - Distinct count 7 - Null count 1210
games_played INTEGER null, -- Example Values: `1` | Value Statics: Total count 1608 - Distinct count 1 - Null count 0
first_name TEXT null, --
d_rebounds INTEGER null, -- Example Values: `2`, `5`, `0`, `1`, `4` | Value Statics: Total count 493 - Distinct count 14 - Null count 1115
last_name TEXT null, --
primary key (playerID, season_id),
turnovers INTEGER null, -- Example Values: `1`, `0`, `3`, `2`, `4` | Value Statics: Total count 493 - Distinct count 9 - Null count 1115
three_made INTEGER null, -- Example Values: `0`, `1`, `3`, `5`, `4` | Value Statics: Total count 566 - Distinct count 7 - Null count 1042
minutes INTEGER null, --
blocks INTEGER null, -- Example Values: `2`, `0`, `1`, `3`, `5` | Value Statics: Total count 398 - Distinct count 6 - Null count 1210
three_attempted INTEGER null, -- Example Values: `0`, `1`, `6`, `7`, `10` | Value Statics: Total count 540 - Distinct count 12 - Null count 1068
o_rebounds INTEGER null, -- Example Values: `1`, `2`, `0`, `3`, `4` | Value Statics: Total count 493 - Distinct count 10 - Null count 1115
);
CREATE TABLE awards_players
(
foreign key (playerID) references players (playerID) on update cascade on delete cascade,
year INTEGER not null, --
pos TEXT null, -- Example Values: `C`, `F`, `G`, `F/G`, `F/C` | Value Statics: Total count 833 - Distinct count 5 - Null count 886
primary key (playerID, year, award),
lgID TEXT null, -- Example Values: `NBA`, `ABA`, `NBL`, `ABL1` | Value Statics: Total count 1719 - Distinct count 4 - Null count 0
award TEXT not null, --
playerID TEXT not null, --
note TEXT null, -- Example Values: `tie` | Value Statics: Total count 37 - Distinct count 1 - Null count 1682
);
CREATE TABLE series_post
(
tmIDLoser TEXT, --
id INTEGER primary key autoincrement,
series TEXT, -- Example Values: `O`, `M`, `N`, `A`, `K` | Value Statics: Total count 775 - Distinct count 11 - Null count 0
tmIDWinner TEXT, --
round TEXT, -- Example Values: `F`, `QF`, `SF`, `DT`, `DF` | Value Statics: Total count 775 - Distinct count 11 - Null count 0
year INTEGER, --
foreign key (tmIDLoser, year) references teams (tmID, year) on update cascade on delete cascade,
foreign key (tmIDWinner, year) references teams (tmID, year) on update cascade on delete cascade,
W INTEGER, -- Example Values: `4`, `2`, `1`, `3`, `0` | Value Statics: Total count 775 - Distinct count 5 - Null count 0
lgIDLoser TEXT, -- Example Values: `NBA`, `ABA` | Value Statics: Total count 775 - Distinct count 2 - Null count 0
lgIDWinner TEXT, -- Example Values: `NBA`, `ABA` | Value Statics: Total count 775 - Distinct count 2 - Null count 0
L INTEGER, -- Example Values: `1`, `0`, `2`, `3`, `4` | Value Statics: Total count 775 - Distinct count 5 - Null count 0
);
CREATE TABLE players
(
nameGiven TEXT null, -- Example Values: `nameGiven`, `Mort`, `Robert`, `Jim`, `Mike` | Value Statics: Total count 10 - Distinct count 9 - Null count 5052
lastseason INTEGER null, -- Example Values: `0`, `1951` | Value Statics: Total count 5047 - Distinct count 2 - Null count 15
hsCountry TEXT null, --
firstName TEXT null, --
hsCity TEXT null, --
firstseason INTEGER null, -- Example Values: `0`, `1951` | Value Statics: Total count 5047 - Distinct count 2 - Null count 15
weight INTEGER null, --
birthCountry TEXT null, --
race TEXT null, -- Example Values: `B`, `W`, `O`, `1`, `r` | Value Statics: Total count 4903 - Distinct count 5 - Null count 159
lastName TEXT null, --
birthDate DATE null, --
collegeOther TEXT null, --
birthState TEXT null, --
useFirst TEXT null, --
pos TEXT null, -- Example Values: `F-C`, `C`, `G`, `G-F`, `C-F` | Value Statics: Total count 4880 - Distinct count 14 - Null count 182
playerID TEXT not null primary key,
college TEXT null, --
highSchool TEXT null, --
hsState TEXT null, --
height REAL null, --
deathDate DATE null, --
nameSuffix TEXT null, -- Example Values: `Jr.`, `III`, `nameSuffix`, `II`, `IV` | Value Statics: Total count 324 - Distinct count 6 - Null count 4738
nameNick TEXT null, --
fullGivenName TEXT null, --
birthCity TEXT null, --
middleName TEXT null, --
);
CREATE TABLE teams
(
d_pts INTEGER null, --
name TEXT null, --
homeLost INTEGER null, --
o_ftm INTEGER null, --
franchID TEXT null, --
tmID TEXT not null, --
awayWon INTEGER null, --
primary key (year, tmID),
o_fgm INTEGER null, --
year INTEGER not null, --
awayLost INTEGER null, --
arena TEXT null, --
confID TEXT null, -- Example Values: `EC`, `WC` | Value Statics: Total count 1064 - Distinct count 2 - Null count 472
games INTEGER null, --
lost INTEGER null, --
divID TEXT null, -- Example Values: `EA`, `WE`, `ED`, `WD`, `SO` | Value Statics: Total count 1498 - Distinct count 13 - Null count 38
lgID TEXT null, -- Example Values: `NBL`, `NBA`, `PBLA`, `NPBL`, `ABL1` | Value Statics: Total count 1536 - Distinct count 6 - Null count 0
homeWon INTEGER null, --
confRank INTEGER null, -- Example Values: `0`, `4`, `3`, `5`, `7` | Value Statics: Total count 1536 - Distinct count 16 - Null count 0
o_pts INTEGER null, --
`rank` INTEGER null, -- Example Values: `1`, `2`, `4`, `5`, `6` | Value Statics: Total count 1536 - Distinct count 10 - Null count 0
playoff TEXT null, -- Example Values: `CF`, `WC`, `LC`, `CS`, `F` | Value Statics: Total count 901 - Distinct count 15 - Null count 635
won INTEGER null, --
);
CREATE TABLE coaches
(
primary key (coachID, year, tmID, stint),
lgID TEXT null, -- Example Values: `NBA`, `ABA`, `ABL1`, `PBLA`, `NPBL` | Value Statics: Total count 1689 - Distinct count 5 - Null count 0
post_losses INTEGER null, -- Example Values: `3`, `9`, `7`, `8`, `0` | Value Statics: Total count 1649 - Distinct count 12 - Null count 40
year INTEGER not null, --
won INTEGER null, --
foreign key (tmID, year) references teams (tmID, year) on update cascade on delete cascade,
post_wins INTEGER null, -- Example Values: `0`, `12`, `9`, `13`, `1` | Value Statics: Total count 1649 - Distinct count 17 - Null count 40
coachID TEXT not null, --
tmID TEXT not null, --
lost INTEGER null, --
stint INTEGER not null, -- Example Values: `2`, `1`, `4`, `5`, `3` | Value Statics: Total count 1689 - Distinct count 5 - Null count 0
); |
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%' | CREATE TABLE current
(
gender_bio TEXT, -- Example Values: `M`, `F` | Value Statics: Total count 541 - Distinct count 2 - Null count 0
suffix_name TEXT, -- Example Values: `Jr.`, `III`, `II` | Value Statics: Total count 20 - Distinct count 3 - Null count 521
house_history_id REAL, --
birthday_bio DATE, --
nickname_name TEXT, --
religion_bio TEXT, --
google_entity_id_id TEXT, --
govtrack_id INTEGER, --
cspan_id REAL, --
primary key (bioguide_id, cspan_id),
wikipedia_id TEXT, --
maplight_id REAL, --
last_name TEXT, --
icpsr_id REAL, --
fec_id TEXT, --
votesmart_id REAL, --
first_name TEXT, --
lis_id TEXT, --
bioguide_id TEXT, --
wikidata_id TEXT, --
middle_name TEXT, --
ballotpedia_id TEXT, --
opensecrets_id TEXT, --
official_full_name TEXT, --
thomas_id INTEGER, --
);
CREATE TABLE historical
(
fec_id TEXT, --
suffix_name TEXT, -- Example Values: `Jr.`, `Sr.`, `II`, `III`, `IV` | Value Statics: Total count 418 - Distinct count 5 - Null count 11446
govtrack_id INTEGER, --
house_history_id REAL, --
opensecrets_id TEXT, --
votesmart_id TEXT, --
bioguide_id TEXT primary key,
nickname_name TEXT, --
official_full_name TEXT, --
house_history_alternate_id TEXT, -- Example Values: `13283.0` | Value Statics: Total count 1 - Distinct count 1 - Null count 11863
gender_bio TEXT, -- Example Values: `M`, `F` | Value Statics: Total count 11864 - Distinct count 2 - Null count 0
bioguide_previous_id TEXT, -- Example Values: `['F000246']`, `['L000266']`, `['W000790']` | Value Statics: Total count 3 - Distinct count 3 - Null count 11861
icpsr_id REAL, --
wikipedia_id TEXT, --
birthday_bio TEXT, --
religion_bio TEXT, --
lis_id TEXT, --
middle_name TEXT, --
cspan_id TEXT, --
last_name TEXT, --
first_name TEXT, --
wikidata_id TEXT, --
thomas_id TEXT, --
ballotpedia_id TEXT, --
maplight_id TEXT, --
google_entity_id_id TEXT, --
);
CREATE TABLE historical-terms
(
bioguide TEXT primary key,
middle TEXT, --
title TEXT, -- Example Values: `Majority Leader`, `Speaker` | Value Statics: Total count 3 - Distinct count 2 - Null count 11861
party TEXT, --
type TEXT, -- Example Values: `sen`, `rep` | Value Statics: Total count 11858 - Distinct count 2 - Null count 6
phone TEXT, --
rss_url TEXT, -- Example Values: `http://radel.house.gov/news/rss.aspx`, `http://www.begich.senate.gov/public/?a=rss.feed`, `http://www.hagan.senate.gov/rss`, `http://negretemcleod.house.gov/rss.xml`, `http://garcia.house.gov/rss.xml` | Value Statics: Total count 12 - Distinct count 12 - Null count 11852
name TEXT, --
start TEXT, --
address TEXT, --
party_affiliations TEXT, -- Example Values: `{'start': '2009-01-06', 'end': '2009-12-22', 'party': 'Democrat'}`, `{'start': '2003-01-07', 'end': '2004-08-09', 'party': 'Democrat'}` | Value Statics: Total count 2 - Distinct count 2 - Null count 11862
relation TEXT, --
state_rank TEXT, -- Example Values: `junior`, `senior` | Value Statics: Total count 7 - Distinct count 2 - Null count 11857
last TEXT, -- Example Values: `Levy`, `Lambert`, `Bono` | Value Statics: Total count 3 - Distinct count 3 - Null count 11861
url TEXT, --
fax TEXT, --
contact_form TEXT, --
office TEXT, --
state TEXT, --
foreign key (bioguide) references historical(bioguide_id),
class REAL, -- Example Values: `2.0`, `1.0`, `3.0` | Value Statics: Total count 1256 - Distinct count 3 - Null count 10608
end TEXT, --
district REAL, --
chamber TEXT, -- Example Values: `house`, `senate` | Value Statics: Total count 3 - Distinct count 2 - Null count 11861
);
CREATE TABLE current-terms
(
foreign key (bioguide) references current(bioguide_id),
phone TEXT, --
party_affiliations TEXT, -- Example Values: `{'start': '2009-01-06', 'end': '2009-02-23', 'party': 'Independent'}`, `{'start': '1993-01-05', 'end': '1994-11-09', 'party': 'Democrat'}` | Value Statics: Total count 2 - Distinct count 2 - Null count 3076
title TEXT, -- Example Values: `Minority Whip`, `Majority Whip`, `Minority Leader`, `Majority Leader`, `Speaker` | Value Statics: Total count 28 - Distinct count 5 - Null count 3050
district REAL, --
bioguide TEXT, --
office TEXT, --
class REAL, -- Example Values: `1.0`, `2.0`, `3.0` | Value Statics: Total count 244 - Distinct count 3 - Null count 2834
type TEXT, -- Example Values: `rep`, `sen` | Value Statics: Total count 3014 - Distinct count 2 - Null count 64
start TEXT, --
address TEXT, --
rss_url TEXT, --
url TEXT, --
primary key (bioguide, end),
fax TEXT, --
chamber TEXT, -- Example Values: `senate`, `house` | Value Statics: Total count 28 - Distinct count 2 - Null count 3050
end TEXT, --
caucus TEXT, -- Example Values: `Democrat` | Value Statics: Total count 3 - Distinct count 1 - Null count 3075
state TEXT, --
last TEXT, -- Example Values: `Menendez` | Value Statics: Total count 1 - Distinct count 1 - Null count 3077
relation TEXT, -- Example Values: `son`, `nephew`, `cousin`, `daughter`, `grandson` | Value Statics: Total count 35 - Distinct count 13 - Null count 3043
state_rank TEXT, -- Example Values: `senior`, `junior` | Value Statics: Total count 147 - Distinct count 2 - Null count 2931
name TEXT, --
contact_form TEXT, --
party TEXT, -- Example Values: `Democrat`, `Republican`, `Independent` | Value Statics: Total count 3014 - Distinct count 3 - Null count 64
);
CREATE TABLE social-media
(
foreign key (bioguide) references current(bioguide_id),
instagram TEXT, --
thomas INTEGER, --
youtube TEXT, --
twitter TEXT, --
facebook TEXT, --
youtube_id TEXT, --
twitter_id REAL, --
facebook_id REAL, --
govtrack REAL, --
bioguide TEXT primary key,
instagram_id REAL, --
); |
professional_basketball | For the players who played the most PBLA games, who was graduated from Central Missouri State college? | the most PBLA games refers to max(games_played); Central Missouri State college refers to college = 'Central Missouri State' | SELECT T1.firstName, T1.middleName, T1.lastName FROM players AS T1 INNER JOIN players_teams AS T2 ON T1.playerID = T2.playerID WHERE T2.lgID = 'PBLA' AND T2.GP = 10 AND T1.college = 'Central Missouri State' GROUP BY T1.firstName, T1.middleName, T1.lastName ORDER BY COUNT(T2.id) DESC LIMIT 1 | CREATE TABLE players_teams
(
PostGS INTEGER, --
PostdRebounds INTEGER, --
PostPF INTEGER, --
tmID TEXT, --
threeAttempted INTEGER, --
PostRebounds INTEGER, --
assists INTEGER, --
threeMade INTEGER, --
PostBlocks INTEGER, --
PostTurnovers INTEGER, --
GP INTEGER, --
lgID TEXT, -- Example Values: `NBA`, `NBL`, `ABA`, `ABL1`, `NPBL` | Value Statics: Total count 23751 - Distinct count 6 - Null count 0
foreign key (tmID, year) references teams (tmID, year) on update cascade on delete cascade,
PostfgMade INTEGER, --
steals INTEGER, --
oRebounds INTEGER, --
PostftAttempted INTEGER, --
ftAttempted INTEGER, --
ftMade INTEGER, --
points INTEGER, --
PostfgAttempted INTEGER, --
PostftMade INTEGER, --
note TEXT, -- Example Values: `C` | Value Statics: Total count 43 - Distinct count 1 - Null count 23708
dRebounds INTEGER, --
PostSteals INTEGER, --
blocks INTEGER, --
PostAssists INTEGER, --
minutes INTEGER, --
fgAttempted INTEGER, --
playerID TEXT not null references players on update cascade on delete cascade, --
PostthreeMade INTEGER, --
PostPoints INTEGER, --
year INTEGER, --
PF INTEGER, --
fgMade INTEGER, --
PostthreeAttempted INTEGER, --
rebounds INTEGER, --
id INTEGER primary key autoincrement,
stint INTEGER, -- Example Values: `1`, `2`, `0`, `3`, `4` | Value Statics: Total count 23751 - Distinct count 6 - Null count 0
PostMinutes INTEGER, --
PostGP INTEGER, --
turnovers INTEGER, --
PostoRebounds INTEGER, --
GS INTEGER, --
);
CREATE TABLE awards_coaches
(
award TEXT, -- Example Values: `NBA Coach of the Year`, `ABA Coach of the Year` | Value Statics: Total count 61 - Distinct count 2 - Null count 0
id INTEGER primary key autoincrement,
note TEXT, -- Example Values: `tie` | Value Statics: Total count 4 - Distinct count 1 - Null count 57
coachID TEXT, --
lgID TEXT, -- Example Values: `NBA`, `ABA` | Value Statics: Total count 61 - Distinct count 2 - Null count 0
foreign key (coachID, year) references coaches (coachID, year) on update cascade on delete cascade,
year INTEGER, --
);
CREATE TABLE draft
(
draftOverall INTEGER null, --
lgID TEXT null, -- Example Values: `ABA`, `NBA` | Value Statics: Total count 8621 - Distinct count 2 - Null count 0
suffixName TEXT null, -- Example Values: `Jr.` | Value Statics: Total count 2 - Distinct count 1 - Null count 8619
draftYear INTEGER null, --
draftSelection INTEGER null, --
tmID TEXT null, --
draftRound INTEGER null, --
lastName TEXT null, --
playerID TEXT null, --
draftFrom TEXT null, --
id INTEGER default 0 not null primary key,
firstName TEXT null, --
foreign key (tmID, draftYear) references teams (tmID, year) on update cascade on delete cascade,
foreign key (tmID, draftYear) references teams (tmID, year) on update cascade on delete cascade,
);
CREATE TABLE player_allstar
(
rebounds INTEGER null, --
playerID TEXT not null, --
season_id INTEGER not null, --
assists INTEGER null, --
conference TEXT null, -- Example Values: `East`, `West`, `Weset`, `Allstars`, `Denver` | Value Statics: Total count 1608 - Distinct count 5 - Null count 0
points INTEGER null, --
personal_fouls INTEGER null, -- Example Values: `3`, `2`, `0`, `1`, `5` | Value Statics: Total count 540 - Distinct count 8 - Null count 1068
ft_attempted INTEGER null, -- Example Values: `2`, `4`, `0`, `6`, `3` | Value Statics: Total count 1561 - Distinct count 17 - Null count 47
fg_attempted INTEGER null, --
league_id TEXT null, -- Example Values: `NBA`, `ABA` | Value Statics: Total count 1608 - Distinct count 2 - Null count 0
foreign key (playerID) references players (playerID) on update cascade on delete cascade,
fg_made INTEGER null, -- Example Values: `4`, `8`, `5`, `7`, `3` | Value Statics: Total count 1561 - Distinct count 18 - Null count 47
ft_made INTEGER null, -- Example Values: `2`, `3`, `0`, `1`, `4` | Value Statics: Total count 1561 - Distinct count 13 - Null count 47
steals INTEGER null, -- Example Values: `3`, `0`, `1`, `2`, `5` | Value Statics: Total count 398 - Distinct count 7 - Null count 1210
games_played INTEGER null, -- Example Values: `1` | Value Statics: Total count 1608 - Distinct count 1 - Null count 0
first_name TEXT null, --
d_rebounds INTEGER null, -- Example Values: `2`, `5`, `0`, `1`, `4` | Value Statics: Total count 493 - Distinct count 14 - Null count 1115
last_name TEXT null, --
primary key (playerID, season_id),
turnovers INTEGER null, -- Example Values: `1`, `0`, `3`, `2`, `4` | Value Statics: Total count 493 - Distinct count 9 - Null count 1115
three_made INTEGER null, -- Example Values: `0`, `1`, `3`, `5`, `4` | Value Statics: Total count 566 - Distinct count 7 - Null count 1042
minutes INTEGER null, --
blocks INTEGER null, -- Example Values: `2`, `0`, `1`, `3`, `5` | Value Statics: Total count 398 - Distinct count 6 - Null count 1210
three_attempted INTEGER null, -- Example Values: `0`, `1`, `6`, `7`, `10` | Value Statics: Total count 540 - Distinct count 12 - Null count 1068
o_rebounds INTEGER null, -- Example Values: `1`, `2`, `0`, `3`, `4` | Value Statics: Total count 493 - Distinct count 10 - Null count 1115
);
CREATE TABLE awards_players
(
foreign key (playerID) references players (playerID) on update cascade on delete cascade,
year INTEGER not null, --
pos TEXT null, -- Example Values: `C`, `F`, `G`, `F/G`, `F/C` | Value Statics: Total count 833 - Distinct count 5 - Null count 886
primary key (playerID, year, award),
lgID TEXT null, -- Example Values: `NBA`, `ABA`, `NBL`, `ABL1` | Value Statics: Total count 1719 - Distinct count 4 - Null count 0
award TEXT not null, --
playerID TEXT not null, --
note TEXT null, -- Example Values: `tie` | Value Statics: Total count 37 - Distinct count 1 - Null count 1682
);
CREATE TABLE series_post
(
tmIDLoser TEXT, --
id INTEGER primary key autoincrement,
series TEXT, -- Example Values: `O`, `M`, `N`, `A`, `K` | Value Statics: Total count 775 - Distinct count 11 - Null count 0
tmIDWinner TEXT, --
round TEXT, -- Example Values: `F`, `QF`, `SF`, `DT`, `DF` | Value Statics: Total count 775 - Distinct count 11 - Null count 0
year INTEGER, --
foreign key (tmIDLoser, year) references teams (tmID, year) on update cascade on delete cascade,
foreign key (tmIDWinner, year) references teams (tmID, year) on update cascade on delete cascade,
W INTEGER, -- Example Values: `4`, `2`, `1`, `3`, `0` | Value Statics: Total count 775 - Distinct count 5 - Null count 0
lgIDLoser TEXT, -- Example Values: `NBA`, `ABA` | Value Statics: Total count 775 - Distinct count 2 - Null count 0
lgIDWinner TEXT, -- Example Values: `NBA`, `ABA` | Value Statics: Total count 775 - Distinct count 2 - Null count 0
L INTEGER, -- Example Values: `1`, `0`, `2`, `3`, `4` | Value Statics: Total count 775 - Distinct count 5 - Null count 0
);
CREATE TABLE players
(
nameGiven TEXT null, -- Example Values: `nameGiven`, `Mort`, `Robert`, `Jim`, `Mike` | Value Statics: Total count 10 - Distinct count 9 - Null count 5052
lastseason INTEGER null, -- Example Values: `0`, `1951` | Value Statics: Total count 5047 - Distinct count 2 - Null count 15
hsCountry TEXT null, --
firstName TEXT null, --
hsCity TEXT null, --
firstseason INTEGER null, -- Example Values: `0`, `1951` | Value Statics: Total count 5047 - Distinct count 2 - Null count 15
weight INTEGER null, --
birthCountry TEXT null, --
race TEXT null, -- Example Values: `B`, `W`, `O`, `1`, `r` | Value Statics: Total count 4903 - Distinct count 5 - Null count 159
lastName TEXT null, --
birthDate DATE null, --
collegeOther TEXT null, --
birthState TEXT null, --
useFirst TEXT null, --
pos TEXT null, -- Example Values: `F-C`, `C`, `G`, `G-F`, `C-F` | Value Statics: Total count 4880 - Distinct count 14 - Null count 182
playerID TEXT not null primary key,
college TEXT null, --
highSchool TEXT null, --
hsState TEXT null, --
height REAL null, --
deathDate DATE null, --
nameSuffix TEXT null, -- Example Values: `Jr.`, `III`, `nameSuffix`, `II`, `IV` | Value Statics: Total count 324 - Distinct count 6 - Null count 4738
nameNick TEXT null, --
fullGivenName TEXT null, --
birthCity TEXT null, --
middleName TEXT null, --
);
CREATE TABLE teams
(
d_pts INTEGER null, --
name TEXT null, --
homeLost INTEGER null, --
o_ftm INTEGER null, --
franchID TEXT null, --
tmID TEXT not null, --
awayWon INTEGER null, --
primary key (year, tmID),
o_fgm INTEGER null, --
year INTEGER not null, --
awayLost INTEGER null, --
arena TEXT null, --
confID TEXT null, -- Example Values: `EC`, `WC` | Value Statics: Total count 1064 - Distinct count 2 - Null count 472
games INTEGER null, --
lost INTEGER null, --
divID TEXT null, -- Example Values: `EA`, `WE`, `ED`, `WD`, `SO` | Value Statics: Total count 1498 - Distinct count 13 - Null count 38
lgID TEXT null, -- Example Values: `NBL`, `NBA`, `PBLA`, `NPBL`, `ABL1` | Value Statics: Total count 1536 - Distinct count 6 - Null count 0
homeWon INTEGER null, --
confRank INTEGER null, -- Example Values: `0`, `4`, `3`, `5`, `7` | Value Statics: Total count 1536 - Distinct count 16 - Null count 0
o_pts INTEGER null, --
`rank` INTEGER null, -- Example Values: `1`, `2`, `4`, `5`, `6` | Value Statics: Total count 1536 - Distinct count 10 - Null count 0
playoff TEXT null, -- Example Values: `CF`, `WC`, `LC`, `CS`, `F` | Value Statics: Total count 901 - Distinct count 15 - Null count 635
won INTEGER null, --
);
CREATE TABLE coaches
(
primary key (coachID, year, tmID, stint),
lgID TEXT null, -- Example Values: `NBA`, `ABA`, `ABL1`, `PBLA`, `NPBL` | Value Statics: Total count 1689 - Distinct count 5 - Null count 0
post_losses INTEGER null, -- Example Values: `3`, `9`, `7`, `8`, `0` | Value Statics: Total count 1649 - Distinct count 12 - Null count 40
year INTEGER not null, --
won INTEGER null, --
foreign key (tmID, year) references teams (tmID, year) on update cascade on delete cascade,
post_wins INTEGER null, -- Example Values: `0`, `12`, `9`, `13`, `1` | Value Statics: Total count 1649 - Distinct count 17 - Null count 40
coachID TEXT not null, --
tmID TEXT not null, --
lost INTEGER null, --
stint INTEGER not null, -- Example Values: `2`, `1`, `4`, `5`, `3` | Value Statics: Total count 1689 - Distinct count 5 - Null count 0
); |
professional_basketball | In the year 1997 allstar game, which teams did the players had the most rebounds play in? List their team ids. | in 1997 refers to year = 1997; the most rebounds refers to max(rebounds); team id refers to tmID | SELECT T2.tmID FROM players_teams AS T1 INNER JOIN teams AS T2 ON T1.tmID = T2.tmID AND T1.year = T2.year INNER JOIN player_allstar AS T3 ON T3.playerID = T1.playerID WHERE T3.season_id = 1997 ORDER BY T1.rebounds DESC LIMIT 1 | CREATE TABLE players_teams
(
PostGS INTEGER, --
PostdRebounds INTEGER, --
PostPF INTEGER, --
tmID TEXT, --
threeAttempted INTEGER, --
PostRebounds INTEGER, --
assists INTEGER, --
threeMade INTEGER, --
PostBlocks INTEGER, --
PostTurnovers INTEGER, --
GP INTEGER, --
lgID TEXT, -- Example Values: `NBA`, `NBL`, `ABA`, `ABL1`, `NPBL` | Value Statics: Total count 23751 - Distinct count 6 - Null count 0
foreign key (tmID, year) references teams (tmID, year) on update cascade on delete cascade,
PostfgMade INTEGER, --
steals INTEGER, --
oRebounds INTEGER, --
PostftAttempted INTEGER, --
ftAttempted INTEGER, --
ftMade INTEGER, --
points INTEGER, --
PostfgAttempted INTEGER, --
PostftMade INTEGER, --
note TEXT, -- Example Values: `C` | Value Statics: Total count 43 - Distinct count 1 - Null count 23708
dRebounds INTEGER, --
PostSteals INTEGER, --
blocks INTEGER, --
PostAssists INTEGER, --
minutes INTEGER, --
fgAttempted INTEGER, --
playerID TEXT not null references players on update cascade on delete cascade, --
PostthreeMade INTEGER, --
PostPoints INTEGER, --
year INTEGER, --
PF INTEGER, --
fgMade INTEGER, --
PostthreeAttempted INTEGER, --
rebounds INTEGER, --
id INTEGER primary key autoincrement,
stint INTEGER, -- Example Values: `1`, `2`, `0`, `3`, `4` | Value Statics: Total count 23751 - Distinct count 6 - Null count 0
PostMinutes INTEGER, --
PostGP INTEGER, --
turnovers INTEGER, --
PostoRebounds INTEGER, --
GS INTEGER, --
);
CREATE TABLE awards_coaches
(
award TEXT, -- Example Values: `NBA Coach of the Year`, `ABA Coach of the Year` | Value Statics: Total count 61 - Distinct count 2 - Null count 0
id INTEGER primary key autoincrement,
note TEXT, -- Example Values: `tie` | Value Statics: Total count 4 - Distinct count 1 - Null count 57
coachID TEXT, --
lgID TEXT, -- Example Values: `NBA`, `ABA` | Value Statics: Total count 61 - Distinct count 2 - Null count 0
foreign key (coachID, year) references coaches (coachID, year) on update cascade on delete cascade,
year INTEGER, --
);
CREATE TABLE draft
(
draftOverall INTEGER null, --
lgID TEXT null, -- Example Values: `ABA`, `NBA` | Value Statics: Total count 8621 - Distinct count 2 - Null count 0
suffixName TEXT null, -- Example Values: `Jr.` | Value Statics: Total count 2 - Distinct count 1 - Null count 8619
draftYear INTEGER null, --
draftSelection INTEGER null, --
tmID TEXT null, --
draftRound INTEGER null, --
lastName TEXT null, --
playerID TEXT null, --
draftFrom TEXT null, --
id INTEGER default 0 not null primary key,
firstName TEXT null, --
foreign key (tmID, draftYear) references teams (tmID, year) on update cascade on delete cascade,
foreign key (tmID, draftYear) references teams (tmID, year) on update cascade on delete cascade,
);
CREATE TABLE player_allstar
(
rebounds INTEGER null, --
playerID TEXT not null, --
season_id INTEGER not null, --
assists INTEGER null, --
conference TEXT null, -- Example Values: `East`, `West`, `Weset`, `Allstars`, `Denver` | Value Statics: Total count 1608 - Distinct count 5 - Null count 0
points INTEGER null, --
personal_fouls INTEGER null, -- Example Values: `3`, `2`, `0`, `1`, `5` | Value Statics: Total count 540 - Distinct count 8 - Null count 1068
ft_attempted INTEGER null, -- Example Values: `2`, `4`, `0`, `6`, `3` | Value Statics: Total count 1561 - Distinct count 17 - Null count 47
fg_attempted INTEGER null, --
league_id TEXT null, -- Example Values: `NBA`, `ABA` | Value Statics: Total count 1608 - Distinct count 2 - Null count 0
foreign key (playerID) references players (playerID) on update cascade on delete cascade,
fg_made INTEGER null, -- Example Values: `4`, `8`, `5`, `7`, `3` | Value Statics: Total count 1561 - Distinct count 18 - Null count 47
ft_made INTEGER null, -- Example Values: `2`, `3`, `0`, `1`, `4` | Value Statics: Total count 1561 - Distinct count 13 - Null count 47
steals INTEGER null, -- Example Values: `3`, `0`, `1`, `2`, `5` | Value Statics: Total count 398 - Distinct count 7 - Null count 1210
games_played INTEGER null, -- Example Values: `1` | Value Statics: Total count 1608 - Distinct count 1 - Null count 0
first_name TEXT null, --
d_rebounds INTEGER null, -- Example Values: `2`, `5`, `0`, `1`, `4` | Value Statics: Total count 493 - Distinct count 14 - Null count 1115
last_name TEXT null, --
primary key (playerID, season_id),
turnovers INTEGER null, -- Example Values: `1`, `0`, `3`, `2`, `4` | Value Statics: Total count 493 - Distinct count 9 - Null count 1115
three_made INTEGER null, -- Example Values: `0`, `1`, `3`, `5`, `4` | Value Statics: Total count 566 - Distinct count 7 - Null count 1042
minutes INTEGER null, --
blocks INTEGER null, -- Example Values: `2`, `0`, `1`, `3`, `5` | Value Statics: Total count 398 - Distinct count 6 - Null count 1210
three_attempted INTEGER null, -- Example Values: `0`, `1`, `6`, `7`, `10` | Value Statics: Total count 540 - Distinct count 12 - Null count 1068
o_rebounds INTEGER null, -- Example Values: `1`, `2`, `0`, `3`, `4` | Value Statics: Total count 493 - Distinct count 10 - Null count 1115
);
CREATE TABLE awards_players
(
foreign key (playerID) references players (playerID) on update cascade on delete cascade,
year INTEGER not null, --
pos TEXT null, -- Example Values: `C`, `F`, `G`, `F/G`, `F/C` | Value Statics: Total count 833 - Distinct count 5 - Null count 886
primary key (playerID, year, award),
lgID TEXT null, -- Example Values: `NBA`, `ABA`, `NBL`, `ABL1` | Value Statics: Total count 1719 - Distinct count 4 - Null count 0
award TEXT not null, --
playerID TEXT not null, --
note TEXT null, -- Example Values: `tie` | Value Statics: Total count 37 - Distinct count 1 - Null count 1682
);
CREATE TABLE series_post
(
tmIDLoser TEXT, --
id INTEGER primary key autoincrement,
series TEXT, -- Example Values: `O`, `M`, `N`, `A`, `K` | Value Statics: Total count 775 - Distinct count 11 - Null count 0
tmIDWinner TEXT, --
round TEXT, -- Example Values: `F`, `QF`, `SF`, `DT`, `DF` | Value Statics: Total count 775 - Distinct count 11 - Null count 0
year INTEGER, --
foreign key (tmIDLoser, year) references teams (tmID, year) on update cascade on delete cascade,
foreign key (tmIDWinner, year) references teams (tmID, year) on update cascade on delete cascade,
W INTEGER, -- Example Values: `4`, `2`, `1`, `3`, `0` | Value Statics: Total count 775 - Distinct count 5 - Null count 0
lgIDLoser TEXT, -- Example Values: `NBA`, `ABA` | Value Statics: Total count 775 - Distinct count 2 - Null count 0
lgIDWinner TEXT, -- Example Values: `NBA`, `ABA` | Value Statics: Total count 775 - Distinct count 2 - Null count 0
L INTEGER, -- Example Values: `1`, `0`, `2`, `3`, `4` | Value Statics: Total count 775 - Distinct count 5 - Null count 0
);
CREATE TABLE players
(
nameGiven TEXT null, -- Example Values: `nameGiven`, `Mort`, `Robert`, `Jim`, `Mike` | Value Statics: Total count 10 - Distinct count 9 - Null count 5052
lastseason INTEGER null, -- Example Values: `0`, `1951` | Value Statics: Total count 5047 - Distinct count 2 - Null count 15
hsCountry TEXT null, --
firstName TEXT null, --
hsCity TEXT null, --
firstseason INTEGER null, -- Example Values: `0`, `1951` | Value Statics: Total count 5047 - Distinct count 2 - Null count 15
weight INTEGER null, --
birthCountry TEXT null, --
race TEXT null, -- Example Values: `B`, `W`, `O`, `1`, `r` | Value Statics: Total count 4903 - Distinct count 5 - Null count 159
lastName TEXT null, --
birthDate DATE null, --
collegeOther TEXT null, --
birthState TEXT null, --
useFirst TEXT null, --
pos TEXT null, -- Example Values: `F-C`, `C`, `G`, `G-F`, `C-F` | Value Statics: Total count 4880 - Distinct count 14 - Null count 182
playerID TEXT not null primary key,
college TEXT null, --
highSchool TEXT null, --
hsState TEXT null, --
height REAL null, --
deathDate DATE null, --
nameSuffix TEXT null, -- Example Values: `Jr.`, `III`, `nameSuffix`, `II`, `IV` | Value Statics: Total count 324 - Distinct count 6 - Null count 4738
nameNick TEXT null, --
fullGivenName TEXT null, --
birthCity TEXT null, --
middleName TEXT null, --
);
CREATE TABLE teams
(
d_pts INTEGER null, --
name TEXT null, --
homeLost INTEGER null, --
o_ftm INTEGER null, --
franchID TEXT null, --
tmID TEXT not null, --
awayWon INTEGER null, --
primary key (year, tmID),
o_fgm INTEGER null, --
year INTEGER not null, --
awayLost INTEGER null, --
arena TEXT null, --
confID TEXT null, -- Example Values: `EC`, `WC` | Value Statics: Total count 1064 - Distinct count 2 - Null count 472
games INTEGER null, --
lost INTEGER null, --
divID TEXT null, -- Example Values: `EA`, `WE`, `ED`, `WD`, `SO` | Value Statics: Total count 1498 - Distinct count 13 - Null count 38
lgID TEXT null, -- Example Values: `NBL`, `NBA`, `PBLA`, `NPBL`, `ABL1` | Value Statics: Total count 1536 - Distinct count 6 - Null count 0
homeWon INTEGER null, --
confRank INTEGER null, -- Example Values: `0`, `4`, `3`, `5`, `7` | Value Statics: Total count 1536 - Distinct count 16 - Null count 0
o_pts INTEGER null, --
`rank` INTEGER null, -- Example Values: `1`, `2`, `4`, `5`, `6` | Value Statics: Total count 1536 - Distinct count 10 - Null count 0
playoff TEXT null, -- Example Values: `CF`, `WC`, `LC`, `CS`, `F` | Value Statics: Total count 901 - Distinct count 15 - Null count 635
won INTEGER null, --
);
CREATE TABLE coaches
(
primary key (coachID, year, tmID, stint),
lgID TEXT null, -- Example Values: `NBA`, `ABA`, `ABL1`, `PBLA`, `NPBL` | Value Statics: Total count 1689 - Distinct count 5 - Null count 0
post_losses INTEGER null, -- Example Values: `3`, `9`, `7`, `8`, `0` | Value Statics: Total count 1649 - Distinct count 12 - Null count 40
year INTEGER not null, --
won INTEGER null, --
foreign key (tmID, year) references teams (tmID, year) on update cascade on delete cascade,
post_wins INTEGER null, -- Example Values: `0`, `12`, `9`, `13`, `1` | Value Statics: Total count 1649 - Distinct count 17 - Null count 40
coachID TEXT not null, --
tmID TEXT not null, --
lost INTEGER null, --
stint INTEGER not null, -- Example Values: `2`, `1`, `4`, `5`, `3` | Value Statics: Total count 1689 - Distinct count 5 - Null count 0
); |
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' | CREATE TABLE current
(
gender_bio TEXT, -- Example Values: `M`, `F` | Value Statics: Total count 541 - Distinct count 2 - Null count 0
suffix_name TEXT, -- Example Values: `Jr.`, `III`, `II` | Value Statics: Total count 20 - Distinct count 3 - Null count 521
house_history_id REAL, --
birthday_bio DATE, --
nickname_name TEXT, --
religion_bio TEXT, --
google_entity_id_id TEXT, --
govtrack_id INTEGER, --
cspan_id REAL, --
primary key (bioguide_id, cspan_id),
wikipedia_id TEXT, --
maplight_id REAL, --
last_name TEXT, --
icpsr_id REAL, --
fec_id TEXT, --
votesmart_id REAL, --
first_name TEXT, --
lis_id TEXT, --
bioguide_id TEXT, --
wikidata_id TEXT, --
middle_name TEXT, --
ballotpedia_id TEXT, --
opensecrets_id TEXT, --
official_full_name TEXT, --
thomas_id INTEGER, --
);
CREATE TABLE historical
(
fec_id TEXT, --
suffix_name TEXT, -- Example Values: `Jr.`, `Sr.`, `II`, `III`, `IV` | Value Statics: Total count 418 - Distinct count 5 - Null count 11446
govtrack_id INTEGER, --
house_history_id REAL, --
opensecrets_id TEXT, --
votesmart_id TEXT, --
bioguide_id TEXT primary key,
nickname_name TEXT, --
official_full_name TEXT, --
house_history_alternate_id TEXT, -- Example Values: `13283.0` | Value Statics: Total count 1 - Distinct count 1 - Null count 11863
gender_bio TEXT, -- Example Values: `M`, `F` | Value Statics: Total count 11864 - Distinct count 2 - Null count 0
bioguide_previous_id TEXT, -- Example Values: `['F000246']`, `['L000266']`, `['W000790']` | Value Statics: Total count 3 - Distinct count 3 - Null count 11861
icpsr_id REAL, --
wikipedia_id TEXT, --
birthday_bio TEXT, --
religion_bio TEXT, --
lis_id TEXT, --
middle_name TEXT, --
cspan_id TEXT, --
last_name TEXT, --
first_name TEXT, --
wikidata_id TEXT, --
thomas_id TEXT, --
ballotpedia_id TEXT, --
maplight_id TEXT, --
google_entity_id_id TEXT, --
);
CREATE TABLE historical-terms
(
bioguide TEXT primary key,
middle TEXT, --
title TEXT, -- Example Values: `Majority Leader`, `Speaker` | Value Statics: Total count 3 - Distinct count 2 - Null count 11861
party TEXT, --
type TEXT, -- Example Values: `sen`, `rep` | Value Statics: Total count 11858 - Distinct count 2 - Null count 6
phone TEXT, --
rss_url TEXT, -- Example Values: `http://radel.house.gov/news/rss.aspx`, `http://www.begich.senate.gov/public/?a=rss.feed`, `http://www.hagan.senate.gov/rss`, `http://negretemcleod.house.gov/rss.xml`, `http://garcia.house.gov/rss.xml` | Value Statics: Total count 12 - Distinct count 12 - Null count 11852
name TEXT, --
start TEXT, --
address TEXT, --
party_affiliations TEXT, -- Example Values: `{'start': '2009-01-06', 'end': '2009-12-22', 'party': 'Democrat'}`, `{'start': '2003-01-07', 'end': '2004-08-09', 'party': 'Democrat'}` | Value Statics: Total count 2 - Distinct count 2 - Null count 11862
relation TEXT, --
state_rank TEXT, -- Example Values: `junior`, `senior` | Value Statics: Total count 7 - Distinct count 2 - Null count 11857
last TEXT, -- Example Values: `Levy`, `Lambert`, `Bono` | Value Statics: Total count 3 - Distinct count 3 - Null count 11861
url TEXT, --
fax TEXT, --
contact_form TEXT, --
office TEXT, --
state TEXT, --
foreign key (bioguide) references historical(bioguide_id),
class REAL, -- Example Values: `2.0`, `1.0`, `3.0` | Value Statics: Total count 1256 - Distinct count 3 - Null count 10608
end TEXT, --
district REAL, --
chamber TEXT, -- Example Values: `house`, `senate` | Value Statics: Total count 3 - Distinct count 2 - Null count 11861
);
CREATE TABLE current-terms
(
foreign key (bioguide) references current(bioguide_id),
phone TEXT, --
party_affiliations TEXT, -- Example Values: `{'start': '2009-01-06', 'end': '2009-02-23', 'party': 'Independent'}`, `{'start': '1993-01-05', 'end': '1994-11-09', 'party': 'Democrat'}` | Value Statics: Total count 2 - Distinct count 2 - Null count 3076
title TEXT, -- Example Values: `Minority Whip`, `Majority Whip`, `Minority Leader`, `Majority Leader`, `Speaker` | Value Statics: Total count 28 - Distinct count 5 - Null count 3050
district REAL, --
bioguide TEXT, --
office TEXT, --
class REAL, -- Example Values: `1.0`, `2.0`, `3.0` | Value Statics: Total count 244 - Distinct count 3 - Null count 2834
type TEXT, -- Example Values: `rep`, `sen` | Value Statics: Total count 3014 - Distinct count 2 - Null count 64
start TEXT, --
address TEXT, --
rss_url TEXT, --
url TEXT, --
primary key (bioguide, end),
fax TEXT, --
chamber TEXT, -- Example Values: `senate`, `house` | Value Statics: Total count 28 - Distinct count 2 - Null count 3050
end TEXT, --
caucus TEXT, -- Example Values: `Democrat` | Value Statics: Total count 3 - Distinct count 1 - Null count 3075
state TEXT, --
last TEXT, -- Example Values: `Menendez` | Value Statics: Total count 1 - Distinct count 1 - Null count 3077
relation TEXT, -- Example Values: `son`, `nephew`, `cousin`, `daughter`, `grandson` | Value Statics: Total count 35 - Distinct count 13 - Null count 3043
state_rank TEXT, -- Example Values: `senior`, `junior` | Value Statics: Total count 147 - Distinct count 2 - Null count 2931
name TEXT, --
contact_form TEXT, --
party TEXT, -- Example Values: `Democrat`, `Republican`, `Independent` | Value Statics: Total count 3014 - Distinct count 3 - Null count 64
);
CREATE TABLE social-media
(
foreign key (bioguide) references current(bioguide_id),
instagram TEXT, --
thomas INTEGER, --
youtube TEXT, --
twitter TEXT, --
facebook TEXT, --
youtube_id TEXT, --
twitter_id REAL, --
facebook_id REAL, --
govtrack REAL, --
bioguide TEXT primary key,
instagram_id REAL, --
); |
professional_basketball | For the latest passing player who could play all the positions in the court, how many points did he have in his career? | the latest passing refers to max(season_id); play all the positions refers to pos like '%C%' or pos like '%F%' or pos like '%G%' | SELECT SUM(T2.points) FROM players AS T1 INNER JOIN players_teams AS T2 ON T1.playerID = T2.playerID WHERE T1.pos = 'C-F-G' GROUP BY T2.playerID, T2.year ORDER BY T2.year DESC LIMIT 1 | CREATE TABLE players_teams
(
PostGS INTEGER, --
PostdRebounds INTEGER, --
PostPF INTEGER, --
tmID TEXT, --
threeAttempted INTEGER, --
PostRebounds INTEGER, --
assists INTEGER, --
threeMade INTEGER, --
PostBlocks INTEGER, --
PostTurnovers INTEGER, --
GP INTEGER, --
lgID TEXT, -- Example Values: `NBA`, `NBL`, `ABA`, `ABL1`, `NPBL` | Value Statics: Total count 23751 - Distinct count 6 - Null count 0
foreign key (tmID, year) references teams (tmID, year) on update cascade on delete cascade,
PostfgMade INTEGER, --
steals INTEGER, --
oRebounds INTEGER, --
PostftAttempted INTEGER, --
ftAttempted INTEGER, --
ftMade INTEGER, --
points INTEGER, --
PostfgAttempted INTEGER, --
PostftMade INTEGER, --
note TEXT, -- Example Values: `C` | Value Statics: Total count 43 - Distinct count 1 - Null count 23708
dRebounds INTEGER, --
PostSteals INTEGER, --
blocks INTEGER, --
PostAssists INTEGER, --
minutes INTEGER, --
fgAttempted INTEGER, --
playerID TEXT not null references players on update cascade on delete cascade, --
PostthreeMade INTEGER, --
PostPoints INTEGER, --
year INTEGER, --
PF INTEGER, --
fgMade INTEGER, --
PostthreeAttempted INTEGER, --
rebounds INTEGER, --
id INTEGER primary key autoincrement,
stint INTEGER, -- Example Values: `1`, `2`, `0`, `3`, `4` | Value Statics: Total count 23751 - Distinct count 6 - Null count 0
PostMinutes INTEGER, --
PostGP INTEGER, --
turnovers INTEGER, --
PostoRebounds INTEGER, --
GS INTEGER, --
);
CREATE TABLE awards_coaches
(
award TEXT, -- Example Values: `NBA Coach of the Year`, `ABA Coach of the Year` | Value Statics: Total count 61 - Distinct count 2 - Null count 0
id INTEGER primary key autoincrement,
note TEXT, -- Example Values: `tie` | Value Statics: Total count 4 - Distinct count 1 - Null count 57
coachID TEXT, --
lgID TEXT, -- Example Values: `NBA`, `ABA` | Value Statics: Total count 61 - Distinct count 2 - Null count 0
foreign key (coachID, year) references coaches (coachID, year) on update cascade on delete cascade,
year INTEGER, --
);
CREATE TABLE draft
(
draftOverall INTEGER null, --
lgID TEXT null, -- Example Values: `ABA`, `NBA` | Value Statics: Total count 8621 - Distinct count 2 - Null count 0
suffixName TEXT null, -- Example Values: `Jr.` | Value Statics: Total count 2 - Distinct count 1 - Null count 8619
draftYear INTEGER null, --
draftSelection INTEGER null, --
tmID TEXT null, --
draftRound INTEGER null, --
lastName TEXT null, --
playerID TEXT null, --
draftFrom TEXT null, --
id INTEGER default 0 not null primary key,
firstName TEXT null, --
foreign key (tmID, draftYear) references teams (tmID, year) on update cascade on delete cascade,
foreign key (tmID, draftYear) references teams (tmID, year) on update cascade on delete cascade,
);
CREATE TABLE player_allstar
(
rebounds INTEGER null, --
playerID TEXT not null, --
season_id INTEGER not null, --
assists INTEGER null, --
conference TEXT null, -- Example Values: `East`, `West`, `Weset`, `Allstars`, `Denver` | Value Statics: Total count 1608 - Distinct count 5 - Null count 0
points INTEGER null, --
personal_fouls INTEGER null, -- Example Values: `3`, `2`, `0`, `1`, `5` | Value Statics: Total count 540 - Distinct count 8 - Null count 1068
ft_attempted INTEGER null, -- Example Values: `2`, `4`, `0`, `6`, `3` | Value Statics: Total count 1561 - Distinct count 17 - Null count 47
fg_attempted INTEGER null, --
league_id TEXT null, -- Example Values: `NBA`, `ABA` | Value Statics: Total count 1608 - Distinct count 2 - Null count 0
foreign key (playerID) references players (playerID) on update cascade on delete cascade,
fg_made INTEGER null, -- Example Values: `4`, `8`, `5`, `7`, `3` | Value Statics: Total count 1561 - Distinct count 18 - Null count 47
ft_made INTEGER null, -- Example Values: `2`, `3`, `0`, `1`, `4` | Value Statics: Total count 1561 - Distinct count 13 - Null count 47
steals INTEGER null, -- Example Values: `3`, `0`, `1`, `2`, `5` | Value Statics: Total count 398 - Distinct count 7 - Null count 1210
games_played INTEGER null, -- Example Values: `1` | Value Statics: Total count 1608 - Distinct count 1 - Null count 0
first_name TEXT null, --
d_rebounds INTEGER null, -- Example Values: `2`, `5`, `0`, `1`, `4` | Value Statics: Total count 493 - Distinct count 14 - Null count 1115
last_name TEXT null, --
primary key (playerID, season_id),
turnovers INTEGER null, -- Example Values: `1`, `0`, `3`, `2`, `4` | Value Statics: Total count 493 - Distinct count 9 - Null count 1115
three_made INTEGER null, -- Example Values: `0`, `1`, `3`, `5`, `4` | Value Statics: Total count 566 - Distinct count 7 - Null count 1042
minutes INTEGER null, --
blocks INTEGER null, -- Example Values: `2`, `0`, `1`, `3`, `5` | Value Statics: Total count 398 - Distinct count 6 - Null count 1210
three_attempted INTEGER null, -- Example Values: `0`, `1`, `6`, `7`, `10` | Value Statics: Total count 540 - Distinct count 12 - Null count 1068
o_rebounds INTEGER null, -- Example Values: `1`, `2`, `0`, `3`, `4` | Value Statics: Total count 493 - Distinct count 10 - Null count 1115
);
CREATE TABLE awards_players
(
foreign key (playerID) references players (playerID) on update cascade on delete cascade,
year INTEGER not null, --
pos TEXT null, -- Example Values: `C`, `F`, `G`, `F/G`, `F/C` | Value Statics: Total count 833 - Distinct count 5 - Null count 886
primary key (playerID, year, award),
lgID TEXT null, -- Example Values: `NBA`, `ABA`, `NBL`, `ABL1` | Value Statics: Total count 1719 - Distinct count 4 - Null count 0
award TEXT not null, --
playerID TEXT not null, --
note TEXT null, -- Example Values: `tie` | Value Statics: Total count 37 - Distinct count 1 - Null count 1682
);
CREATE TABLE series_post
(
tmIDLoser TEXT, --
id INTEGER primary key autoincrement,
series TEXT, -- Example Values: `O`, `M`, `N`, `A`, `K` | Value Statics: Total count 775 - Distinct count 11 - Null count 0
tmIDWinner TEXT, --
round TEXT, -- Example Values: `F`, `QF`, `SF`, `DT`, `DF` | Value Statics: Total count 775 - Distinct count 11 - Null count 0
year INTEGER, --
foreign key (tmIDLoser, year) references teams (tmID, year) on update cascade on delete cascade,
foreign key (tmIDWinner, year) references teams (tmID, year) on update cascade on delete cascade,
W INTEGER, -- Example Values: `4`, `2`, `1`, `3`, `0` | Value Statics: Total count 775 - Distinct count 5 - Null count 0
lgIDLoser TEXT, -- Example Values: `NBA`, `ABA` | Value Statics: Total count 775 - Distinct count 2 - Null count 0
lgIDWinner TEXT, -- Example Values: `NBA`, `ABA` | Value Statics: Total count 775 - Distinct count 2 - Null count 0
L INTEGER, -- Example Values: `1`, `0`, `2`, `3`, `4` | Value Statics: Total count 775 - Distinct count 5 - Null count 0
);
CREATE TABLE players
(
nameGiven TEXT null, -- Example Values: `nameGiven`, `Mort`, `Robert`, `Jim`, `Mike` | Value Statics: Total count 10 - Distinct count 9 - Null count 5052
lastseason INTEGER null, -- Example Values: `0`, `1951` | Value Statics: Total count 5047 - Distinct count 2 - Null count 15
hsCountry TEXT null, --
firstName TEXT null, --
hsCity TEXT null, --
firstseason INTEGER null, -- Example Values: `0`, `1951` | Value Statics: Total count 5047 - Distinct count 2 - Null count 15
weight INTEGER null, --
birthCountry TEXT null, --
race TEXT null, -- Example Values: `B`, `W`, `O`, `1`, `r` | Value Statics: Total count 4903 - Distinct count 5 - Null count 159
lastName TEXT null, --
birthDate DATE null, --
collegeOther TEXT null, --
birthState TEXT null, --
useFirst TEXT null, --
pos TEXT null, -- Example Values: `F-C`, `C`, `G`, `G-F`, `C-F` | Value Statics: Total count 4880 - Distinct count 14 - Null count 182
playerID TEXT not null primary key,
college TEXT null, --
highSchool TEXT null, --
hsState TEXT null, --
height REAL null, --
deathDate DATE null, --
nameSuffix TEXT null, -- Example Values: `Jr.`, `III`, `nameSuffix`, `II`, `IV` | Value Statics: Total count 324 - Distinct count 6 - Null count 4738
nameNick TEXT null, --
fullGivenName TEXT null, --
birthCity TEXT null, --
middleName TEXT null, --
);
CREATE TABLE teams
(
d_pts INTEGER null, --
name TEXT null, --
homeLost INTEGER null, --
o_ftm INTEGER null, --
franchID TEXT null, --
tmID TEXT not null, --
awayWon INTEGER null, --
primary key (year, tmID),
o_fgm INTEGER null, --
year INTEGER not null, --
awayLost INTEGER null, --
arena TEXT null, --
confID TEXT null, -- Example Values: `EC`, `WC` | Value Statics: Total count 1064 - Distinct count 2 - Null count 472
games INTEGER null, --
lost INTEGER null, --
divID TEXT null, -- Example Values: `EA`, `WE`, `ED`, `WD`, `SO` | Value Statics: Total count 1498 - Distinct count 13 - Null count 38
lgID TEXT null, -- Example Values: `NBL`, `NBA`, `PBLA`, `NPBL`, `ABL1` | Value Statics: Total count 1536 - Distinct count 6 - Null count 0
homeWon INTEGER null, --
confRank INTEGER null, -- Example Values: `0`, `4`, `3`, `5`, `7` | Value Statics: Total count 1536 - Distinct count 16 - Null count 0
o_pts INTEGER null, --
`rank` INTEGER null, -- Example Values: `1`, `2`, `4`, `5`, `6` | Value Statics: Total count 1536 - Distinct count 10 - Null count 0
playoff TEXT null, -- Example Values: `CF`, `WC`, `LC`, `CS`, `F` | Value Statics: Total count 901 - Distinct count 15 - Null count 635
won INTEGER null, --
);
CREATE TABLE coaches
(
primary key (coachID, year, tmID, stint),
lgID TEXT null, -- Example Values: `NBA`, `ABA`, `ABL1`, `PBLA`, `NPBL` | Value Statics: Total count 1689 - Distinct count 5 - Null count 0
post_losses INTEGER null, -- Example Values: `3`, `9`, `7`, `8`, `0` | Value Statics: Total count 1649 - Distinct count 12 - Null count 40
year INTEGER not null, --
won INTEGER null, --
foreign key (tmID, year) references teams (tmID, year) on update cascade on delete cascade,
post_wins INTEGER null, -- Example Values: `0`, `12`, `9`, `13`, `1` | Value Statics: Total count 1649 - Distinct count 17 - Null count 40
coachID TEXT not null, --
tmID TEXT not null, --
lost INTEGER null, --
stint INTEGER not null, -- Example Values: `2`, `1`, `4`, `5`, `3` | Value Statics: Total count 1689 - Distinct count 5 - Null count 0
); |
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' | CREATE TABLE current
(
gender_bio TEXT, -- Example Values: `M`, `F` | Value Statics: Total count 541 - Distinct count 2 - Null count 0
suffix_name TEXT, -- Example Values: `Jr.`, `III`, `II` | Value Statics: Total count 20 - Distinct count 3 - Null count 521
house_history_id REAL, --
birthday_bio DATE, --
nickname_name TEXT, --
religion_bio TEXT, --
google_entity_id_id TEXT, --
govtrack_id INTEGER, --
cspan_id REAL, --
primary key (bioguide_id, cspan_id),
wikipedia_id TEXT, --
maplight_id REAL, --
last_name TEXT, --
icpsr_id REAL, --
fec_id TEXT, --
votesmart_id REAL, --
first_name TEXT, --
lis_id TEXT, --
bioguide_id TEXT, --
wikidata_id TEXT, --
middle_name TEXT, --
ballotpedia_id TEXT, --
opensecrets_id TEXT, --
official_full_name TEXT, --
thomas_id INTEGER, --
);
CREATE TABLE historical
(
fec_id TEXT, --
suffix_name TEXT, -- Example Values: `Jr.`, `Sr.`, `II`, `III`, `IV` | Value Statics: Total count 418 - Distinct count 5 - Null count 11446
govtrack_id INTEGER, --
house_history_id REAL, --
opensecrets_id TEXT, --
votesmart_id TEXT, --
bioguide_id TEXT primary key,
nickname_name TEXT, --
official_full_name TEXT, --
house_history_alternate_id TEXT, -- Example Values: `13283.0` | Value Statics: Total count 1 - Distinct count 1 - Null count 11863
gender_bio TEXT, -- Example Values: `M`, `F` | Value Statics: Total count 11864 - Distinct count 2 - Null count 0
bioguide_previous_id TEXT, -- Example Values: `['F000246']`, `['L000266']`, `['W000790']` | Value Statics: Total count 3 - Distinct count 3 - Null count 11861
icpsr_id REAL, --
wikipedia_id TEXT, --
birthday_bio TEXT, --
religion_bio TEXT, --
lis_id TEXT, --
middle_name TEXT, --
cspan_id TEXT, --
last_name TEXT, --
first_name TEXT, --
wikidata_id TEXT, --
thomas_id TEXT, --
ballotpedia_id TEXT, --
maplight_id TEXT, --
google_entity_id_id TEXT, --
);
CREATE TABLE historical-terms
(
bioguide TEXT primary key,
middle TEXT, --
title TEXT, -- Example Values: `Majority Leader`, `Speaker` | Value Statics: Total count 3 - Distinct count 2 - Null count 11861
party TEXT, --
type TEXT, -- Example Values: `sen`, `rep` | Value Statics: Total count 11858 - Distinct count 2 - Null count 6
phone TEXT, --
rss_url TEXT, -- Example Values: `http://radel.house.gov/news/rss.aspx`, `http://www.begich.senate.gov/public/?a=rss.feed`, `http://www.hagan.senate.gov/rss`, `http://negretemcleod.house.gov/rss.xml`, `http://garcia.house.gov/rss.xml` | Value Statics: Total count 12 - Distinct count 12 - Null count 11852
name TEXT, --
start TEXT, --
address TEXT, --
party_affiliations TEXT, -- Example Values: `{'start': '2009-01-06', 'end': '2009-12-22', 'party': 'Democrat'}`, `{'start': '2003-01-07', 'end': '2004-08-09', 'party': 'Democrat'}` | Value Statics: Total count 2 - Distinct count 2 - Null count 11862
relation TEXT, --
state_rank TEXT, -- Example Values: `junior`, `senior` | Value Statics: Total count 7 - Distinct count 2 - Null count 11857
last TEXT, -- Example Values: `Levy`, `Lambert`, `Bono` | Value Statics: Total count 3 - Distinct count 3 - Null count 11861
url TEXT, --
fax TEXT, --
contact_form TEXT, --
office TEXT, --
state TEXT, --
foreign key (bioguide) references historical(bioguide_id),
class REAL, -- Example Values: `2.0`, `1.0`, `3.0` | Value Statics: Total count 1256 - Distinct count 3 - Null count 10608
end TEXT, --
district REAL, --
chamber TEXT, -- Example Values: `house`, `senate` | Value Statics: Total count 3 - Distinct count 2 - Null count 11861
);
CREATE TABLE current-terms
(
foreign key (bioguide) references current(bioguide_id),
phone TEXT, --
party_affiliations TEXT, -- Example Values: `{'start': '2009-01-06', 'end': '2009-02-23', 'party': 'Independent'}`, `{'start': '1993-01-05', 'end': '1994-11-09', 'party': 'Democrat'}` | Value Statics: Total count 2 - Distinct count 2 - Null count 3076
title TEXT, -- Example Values: `Minority Whip`, `Majority Whip`, `Minority Leader`, `Majority Leader`, `Speaker` | Value Statics: Total count 28 - Distinct count 5 - Null count 3050
district REAL, --
bioguide TEXT, --
office TEXT, --
class REAL, -- Example Values: `1.0`, `2.0`, `3.0` | Value Statics: Total count 244 - Distinct count 3 - Null count 2834
type TEXT, -- Example Values: `rep`, `sen` | Value Statics: Total count 3014 - Distinct count 2 - Null count 64
start TEXT, --
address TEXT, --
rss_url TEXT, --
url TEXT, --
primary key (bioguide, end),
fax TEXT, --
chamber TEXT, -- Example Values: `senate`, `house` | Value Statics: Total count 28 - Distinct count 2 - Null count 3050
end TEXT, --
caucus TEXT, -- Example Values: `Democrat` | Value Statics: Total count 3 - Distinct count 1 - Null count 3075
state TEXT, --
last TEXT, -- Example Values: `Menendez` | Value Statics: Total count 1 - Distinct count 1 - Null count 3077
relation TEXT, -- Example Values: `son`, `nephew`, `cousin`, `daughter`, `grandson` | Value Statics: Total count 35 - Distinct count 13 - Null count 3043
state_rank TEXT, -- Example Values: `senior`, `junior` | Value Statics: Total count 147 - Distinct count 2 - Null count 2931
name TEXT, --
contact_form TEXT, --
party TEXT, -- Example Values: `Democrat`, `Republican`, `Independent` | Value Statics: Total count 3014 - Distinct count 3 - Null count 64
);
CREATE TABLE social-media
(
foreign key (bioguide) references current(bioguide_id),
instagram TEXT, --
thomas INTEGER, --
youtube TEXT, --
twitter TEXT, --
facebook TEXT, --
youtube_id TEXT, --
twitter_id REAL, --
facebook_id REAL, --
govtrack REAL, --
bioguide TEXT primary key,
instagram_id REAL, --
); |
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' | CREATE TABLE current
(
gender_bio TEXT, -- Example Values: `M`, `F` | Value Statics: Total count 541 - Distinct count 2 - Null count 0
suffix_name TEXT, -- Example Values: `Jr.`, `III`, `II` | Value Statics: Total count 20 - Distinct count 3 - Null count 521
house_history_id REAL, --
birthday_bio DATE, --
nickname_name TEXT, --
religion_bio TEXT, --
google_entity_id_id TEXT, --
govtrack_id INTEGER, --
cspan_id REAL, --
primary key (bioguide_id, cspan_id),
wikipedia_id TEXT, --
maplight_id REAL, --
last_name TEXT, --
icpsr_id REAL, --
fec_id TEXT, --
votesmart_id REAL, --
first_name TEXT, --
lis_id TEXT, --
bioguide_id TEXT, --
wikidata_id TEXT, --
middle_name TEXT, --
ballotpedia_id TEXT, --
opensecrets_id TEXT, --
official_full_name TEXT, --
thomas_id INTEGER, --
);
CREATE TABLE historical
(
fec_id TEXT, --
suffix_name TEXT, -- Example Values: `Jr.`, `Sr.`, `II`, `III`, `IV` | Value Statics: Total count 418 - Distinct count 5 - Null count 11446
govtrack_id INTEGER, --
house_history_id REAL, --
opensecrets_id TEXT, --
votesmart_id TEXT, --
bioguide_id TEXT primary key,
nickname_name TEXT, --
official_full_name TEXT, --
house_history_alternate_id TEXT, -- Example Values: `13283.0` | Value Statics: Total count 1 - Distinct count 1 - Null count 11863
gender_bio TEXT, -- Example Values: `M`, `F` | Value Statics: Total count 11864 - Distinct count 2 - Null count 0
bioguide_previous_id TEXT, -- Example Values: `['F000246']`, `['L000266']`, `['W000790']` | Value Statics: Total count 3 - Distinct count 3 - Null count 11861
icpsr_id REAL, --
wikipedia_id TEXT, --
birthday_bio TEXT, --
religion_bio TEXT, --
lis_id TEXT, --
middle_name TEXT, --
cspan_id TEXT, --
last_name TEXT, --
first_name TEXT, --
wikidata_id TEXT, --
thomas_id TEXT, --
ballotpedia_id TEXT, --
maplight_id TEXT, --
google_entity_id_id TEXT, --
);
CREATE TABLE historical-terms
(
bioguide TEXT primary key,
middle TEXT, --
title TEXT, -- Example Values: `Majority Leader`, `Speaker` | Value Statics: Total count 3 - Distinct count 2 - Null count 11861
party TEXT, --
type TEXT, -- Example Values: `sen`, `rep` | Value Statics: Total count 11858 - Distinct count 2 - Null count 6
phone TEXT, --
rss_url TEXT, -- Example Values: `http://radel.house.gov/news/rss.aspx`, `http://www.begich.senate.gov/public/?a=rss.feed`, `http://www.hagan.senate.gov/rss`, `http://negretemcleod.house.gov/rss.xml`, `http://garcia.house.gov/rss.xml` | Value Statics: Total count 12 - Distinct count 12 - Null count 11852
name TEXT, --
start TEXT, --
address TEXT, --
party_affiliations TEXT, -- Example Values: `{'start': '2009-01-06', 'end': '2009-12-22', 'party': 'Democrat'}`, `{'start': '2003-01-07', 'end': '2004-08-09', 'party': 'Democrat'}` | Value Statics: Total count 2 - Distinct count 2 - Null count 11862
relation TEXT, --
state_rank TEXT, -- Example Values: `junior`, `senior` | Value Statics: Total count 7 - Distinct count 2 - Null count 11857
last TEXT, -- Example Values: `Levy`, `Lambert`, `Bono` | Value Statics: Total count 3 - Distinct count 3 - Null count 11861
url TEXT, --
fax TEXT, --
contact_form TEXT, --
office TEXT, --
state TEXT, --
foreign key (bioguide) references historical(bioguide_id),
class REAL, -- Example Values: `2.0`, `1.0`, `3.0` | Value Statics: Total count 1256 - Distinct count 3 - Null count 10608
end TEXT, --
district REAL, --
chamber TEXT, -- Example Values: `house`, `senate` | Value Statics: Total count 3 - Distinct count 2 - Null count 11861
);
CREATE TABLE current-terms
(
foreign key (bioguide) references current(bioguide_id),
phone TEXT, --
party_affiliations TEXT, -- Example Values: `{'start': '2009-01-06', 'end': '2009-02-23', 'party': 'Independent'}`, `{'start': '1993-01-05', 'end': '1994-11-09', 'party': 'Democrat'}` | Value Statics: Total count 2 - Distinct count 2 - Null count 3076
title TEXT, -- Example Values: `Minority Whip`, `Majority Whip`, `Minority Leader`, `Majority Leader`, `Speaker` | Value Statics: Total count 28 - Distinct count 5 - Null count 3050
district REAL, --
bioguide TEXT, --
office TEXT, --
class REAL, -- Example Values: `1.0`, `2.0`, `3.0` | Value Statics: Total count 244 - Distinct count 3 - Null count 2834
type TEXT, -- Example Values: `rep`, `sen` | Value Statics: Total count 3014 - Distinct count 2 - Null count 64
start TEXT, --
address TEXT, --
rss_url TEXT, --
url TEXT, --
primary key (bioguide, end),
fax TEXT, --
chamber TEXT, -- Example Values: `senate`, `house` | Value Statics: Total count 28 - Distinct count 2 - Null count 3050
end TEXT, --
caucus TEXT, -- Example Values: `Democrat` | Value Statics: Total count 3 - Distinct count 1 - Null count 3075
state TEXT, --
last TEXT, -- Example Values: `Menendez` | Value Statics: Total count 1 - Distinct count 1 - Null count 3077
relation TEXT, -- Example Values: `son`, `nephew`, `cousin`, `daughter`, `grandson` | Value Statics: Total count 35 - Distinct count 13 - Null count 3043
state_rank TEXT, -- Example Values: `senior`, `junior` | Value Statics: Total count 147 - Distinct count 2 - Null count 2931
name TEXT, --
contact_form TEXT, --
party TEXT, -- Example Values: `Democrat`, `Republican`, `Independent` | Value Statics: Total count 3014 - Distinct count 3 - Null count 64
);
CREATE TABLE social-media
(
foreign key (bioguide) references current(bioguide_id),
instagram TEXT, --
thomas INTEGER, --
youtube TEXT, --
twitter TEXT, --
facebook TEXT, --
youtube_id TEXT, --
twitter_id REAL, --
facebook_id REAL, --
govtrack REAL, --
bioguide TEXT primary key,
instagram_id REAL, --
); |
professional_basketball | For all the full attendence players in 1995, which player had most turnovers? Give the full name of the player. | full attendance refers to GP = 82; in 1995 refers to year = 1995; the most turnovers refers to max(turnovers); full name refers to first_name, last_name | SELECT T1.firstName, T1.middleName, T1.lastName FROM players AS T1 INNER JOIN players_teams AS T2 ON T1.playerID = T2.playerID WHERE T2.GP = 82 AND T2.year = 1995 ORDER BY T2.turnovers DESC LIMIT 1 | CREATE TABLE players_teams
(
PostGS INTEGER, --
PostdRebounds INTEGER, --
PostPF INTEGER, --
tmID TEXT, --
threeAttempted INTEGER, --
PostRebounds INTEGER, --
assists INTEGER, --
threeMade INTEGER, --
PostBlocks INTEGER, --
PostTurnovers INTEGER, --
GP INTEGER, --
lgID TEXT, -- Example Values: `NBA`, `NBL`, `ABA`, `ABL1`, `NPBL` | Value Statics: Total count 23751 - Distinct count 6 - Null count 0
foreign key (tmID, year) references teams (tmID, year) on update cascade on delete cascade,
PostfgMade INTEGER, --
steals INTEGER, --
oRebounds INTEGER, --
PostftAttempted INTEGER, --
ftAttempted INTEGER, --
ftMade INTEGER, --
points INTEGER, --
PostfgAttempted INTEGER, --
PostftMade INTEGER, --
note TEXT, -- Example Values: `C` | Value Statics: Total count 43 - Distinct count 1 - Null count 23708
dRebounds INTEGER, --
PostSteals INTEGER, --
blocks INTEGER, --
PostAssists INTEGER, --
minutes INTEGER, --
fgAttempted INTEGER, --
playerID TEXT not null references players on update cascade on delete cascade, --
PostthreeMade INTEGER, --
PostPoints INTEGER, --
year INTEGER, --
PF INTEGER, --
fgMade INTEGER, --
PostthreeAttempted INTEGER, --
rebounds INTEGER, --
id INTEGER primary key autoincrement,
stint INTEGER, -- Example Values: `1`, `2`, `0`, `3`, `4` | Value Statics: Total count 23751 - Distinct count 6 - Null count 0
PostMinutes INTEGER, --
PostGP INTEGER, --
turnovers INTEGER, --
PostoRebounds INTEGER, --
GS INTEGER, --
);
CREATE TABLE awards_coaches
(
award TEXT, -- Example Values: `NBA Coach of the Year`, `ABA Coach of the Year` | Value Statics: Total count 61 - Distinct count 2 - Null count 0
id INTEGER primary key autoincrement,
note TEXT, -- Example Values: `tie` | Value Statics: Total count 4 - Distinct count 1 - Null count 57
coachID TEXT, --
lgID TEXT, -- Example Values: `NBA`, `ABA` | Value Statics: Total count 61 - Distinct count 2 - Null count 0
foreign key (coachID, year) references coaches (coachID, year) on update cascade on delete cascade,
year INTEGER, --
);
CREATE TABLE draft
(
draftOverall INTEGER null, --
lgID TEXT null, -- Example Values: `ABA`, `NBA` | Value Statics: Total count 8621 - Distinct count 2 - Null count 0
suffixName TEXT null, -- Example Values: `Jr.` | Value Statics: Total count 2 - Distinct count 1 - Null count 8619
draftYear INTEGER null, --
draftSelection INTEGER null, --
tmID TEXT null, --
draftRound INTEGER null, --
lastName TEXT null, --
playerID TEXT null, --
draftFrom TEXT null, --
id INTEGER default 0 not null primary key,
firstName TEXT null, --
foreign key (tmID, draftYear) references teams (tmID, year) on update cascade on delete cascade,
foreign key (tmID, draftYear) references teams (tmID, year) on update cascade on delete cascade,
);
CREATE TABLE player_allstar
(
rebounds INTEGER null, --
playerID TEXT not null, --
season_id INTEGER not null, --
assists INTEGER null, --
conference TEXT null, -- Example Values: `East`, `West`, `Weset`, `Allstars`, `Denver` | Value Statics: Total count 1608 - Distinct count 5 - Null count 0
points INTEGER null, --
personal_fouls INTEGER null, -- Example Values: `3`, `2`, `0`, `1`, `5` | Value Statics: Total count 540 - Distinct count 8 - Null count 1068
ft_attempted INTEGER null, -- Example Values: `2`, `4`, `0`, `6`, `3` | Value Statics: Total count 1561 - Distinct count 17 - Null count 47
fg_attempted INTEGER null, --
league_id TEXT null, -- Example Values: `NBA`, `ABA` | Value Statics: Total count 1608 - Distinct count 2 - Null count 0
foreign key (playerID) references players (playerID) on update cascade on delete cascade,
fg_made INTEGER null, -- Example Values: `4`, `8`, `5`, `7`, `3` | Value Statics: Total count 1561 - Distinct count 18 - Null count 47
ft_made INTEGER null, -- Example Values: `2`, `3`, `0`, `1`, `4` | Value Statics: Total count 1561 - Distinct count 13 - Null count 47
steals INTEGER null, -- Example Values: `3`, `0`, `1`, `2`, `5` | Value Statics: Total count 398 - Distinct count 7 - Null count 1210
games_played INTEGER null, -- Example Values: `1` | Value Statics: Total count 1608 - Distinct count 1 - Null count 0
first_name TEXT null, --
d_rebounds INTEGER null, -- Example Values: `2`, `5`, `0`, `1`, `4` | Value Statics: Total count 493 - Distinct count 14 - Null count 1115
last_name TEXT null, --
primary key (playerID, season_id),
turnovers INTEGER null, -- Example Values: `1`, `0`, `3`, `2`, `4` | Value Statics: Total count 493 - Distinct count 9 - Null count 1115
three_made INTEGER null, -- Example Values: `0`, `1`, `3`, `5`, `4` | Value Statics: Total count 566 - Distinct count 7 - Null count 1042
minutes INTEGER null, --
blocks INTEGER null, -- Example Values: `2`, `0`, `1`, `3`, `5` | Value Statics: Total count 398 - Distinct count 6 - Null count 1210
three_attempted INTEGER null, -- Example Values: `0`, `1`, `6`, `7`, `10` | Value Statics: Total count 540 - Distinct count 12 - Null count 1068
o_rebounds INTEGER null, -- Example Values: `1`, `2`, `0`, `3`, `4` | Value Statics: Total count 493 - Distinct count 10 - Null count 1115
);
CREATE TABLE awards_players
(
foreign key (playerID) references players (playerID) on update cascade on delete cascade,
year INTEGER not null, --
pos TEXT null, -- Example Values: `C`, `F`, `G`, `F/G`, `F/C` | Value Statics: Total count 833 - Distinct count 5 - Null count 886
primary key (playerID, year, award),
lgID TEXT null, -- Example Values: `NBA`, `ABA`, `NBL`, `ABL1` | Value Statics: Total count 1719 - Distinct count 4 - Null count 0
award TEXT not null, --
playerID TEXT not null, --
note TEXT null, -- Example Values: `tie` | Value Statics: Total count 37 - Distinct count 1 - Null count 1682
);
CREATE TABLE series_post
(
tmIDLoser TEXT, --
id INTEGER primary key autoincrement,
series TEXT, -- Example Values: `O`, `M`, `N`, `A`, `K` | Value Statics: Total count 775 - Distinct count 11 - Null count 0
tmIDWinner TEXT, --
round TEXT, -- Example Values: `F`, `QF`, `SF`, `DT`, `DF` | Value Statics: Total count 775 - Distinct count 11 - Null count 0
year INTEGER, --
foreign key (tmIDLoser, year) references teams (tmID, year) on update cascade on delete cascade,
foreign key (tmIDWinner, year) references teams (tmID, year) on update cascade on delete cascade,
W INTEGER, -- Example Values: `4`, `2`, `1`, `3`, `0` | Value Statics: Total count 775 - Distinct count 5 - Null count 0
lgIDLoser TEXT, -- Example Values: `NBA`, `ABA` | Value Statics: Total count 775 - Distinct count 2 - Null count 0
lgIDWinner TEXT, -- Example Values: `NBA`, `ABA` | Value Statics: Total count 775 - Distinct count 2 - Null count 0
L INTEGER, -- Example Values: `1`, `0`, `2`, `3`, `4` | Value Statics: Total count 775 - Distinct count 5 - Null count 0
);
CREATE TABLE players
(
nameGiven TEXT null, -- Example Values: `nameGiven`, `Mort`, `Robert`, `Jim`, `Mike` | Value Statics: Total count 10 - Distinct count 9 - Null count 5052
lastseason INTEGER null, -- Example Values: `0`, `1951` | Value Statics: Total count 5047 - Distinct count 2 - Null count 15
hsCountry TEXT null, --
firstName TEXT null, --
hsCity TEXT null, --
firstseason INTEGER null, -- Example Values: `0`, `1951` | Value Statics: Total count 5047 - Distinct count 2 - Null count 15
weight INTEGER null, --
birthCountry TEXT null, --
race TEXT null, -- Example Values: `B`, `W`, `O`, `1`, `r` | Value Statics: Total count 4903 - Distinct count 5 - Null count 159
lastName TEXT null, --
birthDate DATE null, --
collegeOther TEXT null, --
birthState TEXT null, --
useFirst TEXT null, --
pos TEXT null, -- Example Values: `F-C`, `C`, `G`, `G-F`, `C-F` | Value Statics: Total count 4880 - Distinct count 14 - Null count 182
playerID TEXT not null primary key,
college TEXT null, --
highSchool TEXT null, --
hsState TEXT null, --
height REAL null, --
deathDate DATE null, --
nameSuffix TEXT null, -- Example Values: `Jr.`, `III`, `nameSuffix`, `II`, `IV` | Value Statics: Total count 324 - Distinct count 6 - Null count 4738
nameNick TEXT null, --
fullGivenName TEXT null, --
birthCity TEXT null, --
middleName TEXT null, --
);
CREATE TABLE teams
(
d_pts INTEGER null, --
name TEXT null, --
homeLost INTEGER null, --
o_ftm INTEGER null, --
franchID TEXT null, --
tmID TEXT not null, --
awayWon INTEGER null, --
primary key (year, tmID),
o_fgm INTEGER null, --
year INTEGER not null, --
awayLost INTEGER null, --
arena TEXT null, --
confID TEXT null, -- Example Values: `EC`, `WC` | Value Statics: Total count 1064 - Distinct count 2 - Null count 472
games INTEGER null, --
lost INTEGER null, --
divID TEXT null, -- Example Values: `EA`, `WE`, `ED`, `WD`, `SO` | Value Statics: Total count 1498 - Distinct count 13 - Null count 38
lgID TEXT null, -- Example Values: `NBL`, `NBA`, `PBLA`, `NPBL`, `ABL1` | Value Statics: Total count 1536 - Distinct count 6 - Null count 0
homeWon INTEGER null, --
confRank INTEGER null, -- Example Values: `0`, `4`, `3`, `5`, `7` | Value Statics: Total count 1536 - Distinct count 16 - Null count 0
o_pts INTEGER null, --
`rank` INTEGER null, -- Example Values: `1`, `2`, `4`, `5`, `6` | Value Statics: Total count 1536 - Distinct count 10 - Null count 0
playoff TEXT null, -- Example Values: `CF`, `WC`, `LC`, `CS`, `F` | Value Statics: Total count 901 - Distinct count 15 - Null count 635
won INTEGER null, --
);
CREATE TABLE coaches
(
primary key (coachID, year, tmID, stint),
lgID TEXT null, -- Example Values: `NBA`, `ABA`, `ABL1`, `PBLA`, `NPBL` | Value Statics: Total count 1689 - Distinct count 5 - Null count 0
post_losses INTEGER null, -- Example Values: `3`, `9`, `7`, `8`, `0` | Value Statics: Total count 1649 - Distinct count 12 - Null count 40
year INTEGER not null, --
won INTEGER null, --
foreign key (tmID, year) references teams (tmID, year) on update cascade on delete cascade,
post_wins INTEGER null, -- Example Values: `0`, `12`, `9`, `13`, `1` | Value Statics: Total count 1649 - Distinct count 17 - Null count 40
coachID TEXT not null, --
tmID TEXT not null, --
lost INTEGER null, --
stint INTEGER not null, -- Example Values: `2`, `1`, `4`, `5`, `3` | Value Statics: Total count 1689 - Distinct count 5 - Null count 0
); |
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/' | CREATE TABLE current
(
gender_bio TEXT, -- Example Values: `M`, `F` | Value Statics: Total count 541 - Distinct count 2 - Null count 0
suffix_name TEXT, -- Example Values: `Jr.`, `III`, `II` | Value Statics: Total count 20 - Distinct count 3 - Null count 521
house_history_id REAL, --
birthday_bio DATE, --
nickname_name TEXT, --
religion_bio TEXT, --
google_entity_id_id TEXT, --
govtrack_id INTEGER, --
cspan_id REAL, --
primary key (bioguide_id, cspan_id),
wikipedia_id TEXT, --
maplight_id REAL, --
last_name TEXT, --
icpsr_id REAL, --
fec_id TEXT, --
votesmart_id REAL, --
first_name TEXT, --
lis_id TEXT, --
bioguide_id TEXT, --
wikidata_id TEXT, --
middle_name TEXT, --
ballotpedia_id TEXT, --
opensecrets_id TEXT, --
official_full_name TEXT, --
thomas_id INTEGER, --
);
CREATE TABLE historical
(
fec_id TEXT, --
suffix_name TEXT, -- Example Values: `Jr.`, `Sr.`, `II`, `III`, `IV` | Value Statics: Total count 418 - Distinct count 5 - Null count 11446
govtrack_id INTEGER, --
house_history_id REAL, --
opensecrets_id TEXT, --
votesmart_id TEXT, --
bioguide_id TEXT primary key,
nickname_name TEXT, --
official_full_name TEXT, --
house_history_alternate_id TEXT, -- Example Values: `13283.0` | Value Statics: Total count 1 - Distinct count 1 - Null count 11863
gender_bio TEXT, -- Example Values: `M`, `F` | Value Statics: Total count 11864 - Distinct count 2 - Null count 0
bioguide_previous_id TEXT, -- Example Values: `['F000246']`, `['L000266']`, `['W000790']` | Value Statics: Total count 3 - Distinct count 3 - Null count 11861
icpsr_id REAL, --
wikipedia_id TEXT, --
birthday_bio TEXT, --
religion_bio TEXT, --
lis_id TEXT, --
middle_name TEXT, --
cspan_id TEXT, --
last_name TEXT, --
first_name TEXT, --
wikidata_id TEXT, --
thomas_id TEXT, --
ballotpedia_id TEXT, --
maplight_id TEXT, --
google_entity_id_id TEXT, --
);
CREATE TABLE historical-terms
(
bioguide TEXT primary key,
middle TEXT, --
title TEXT, -- Example Values: `Majority Leader`, `Speaker` | Value Statics: Total count 3 - Distinct count 2 - Null count 11861
party TEXT, --
type TEXT, -- Example Values: `sen`, `rep` | Value Statics: Total count 11858 - Distinct count 2 - Null count 6
phone TEXT, --
rss_url TEXT, -- Example Values: `http://radel.house.gov/news/rss.aspx`, `http://www.begich.senate.gov/public/?a=rss.feed`, `http://www.hagan.senate.gov/rss`, `http://negretemcleod.house.gov/rss.xml`, `http://garcia.house.gov/rss.xml` | Value Statics: Total count 12 - Distinct count 12 - Null count 11852
name TEXT, --
start TEXT, --
address TEXT, --
party_affiliations TEXT, -- Example Values: `{'start': '2009-01-06', 'end': '2009-12-22', 'party': 'Democrat'}`, `{'start': '2003-01-07', 'end': '2004-08-09', 'party': 'Democrat'}` | Value Statics: Total count 2 - Distinct count 2 - Null count 11862
relation TEXT, --
state_rank TEXT, -- Example Values: `junior`, `senior` | Value Statics: Total count 7 - Distinct count 2 - Null count 11857
last TEXT, -- Example Values: `Levy`, `Lambert`, `Bono` | Value Statics: Total count 3 - Distinct count 3 - Null count 11861
url TEXT, --
fax TEXT, --
contact_form TEXT, --
office TEXT, --
state TEXT, --
foreign key (bioguide) references historical(bioguide_id),
class REAL, -- Example Values: `2.0`, `1.0`, `3.0` | Value Statics: Total count 1256 - Distinct count 3 - Null count 10608
end TEXT, --
district REAL, --
chamber TEXT, -- Example Values: `house`, `senate` | Value Statics: Total count 3 - Distinct count 2 - Null count 11861
);
CREATE TABLE current-terms
(
foreign key (bioguide) references current(bioguide_id),
phone TEXT, --
party_affiliations TEXT, -- Example Values: `{'start': '2009-01-06', 'end': '2009-02-23', 'party': 'Independent'}`, `{'start': '1993-01-05', 'end': '1994-11-09', 'party': 'Democrat'}` | Value Statics: Total count 2 - Distinct count 2 - Null count 3076
title TEXT, -- Example Values: `Minority Whip`, `Majority Whip`, `Minority Leader`, `Majority Leader`, `Speaker` | Value Statics: Total count 28 - Distinct count 5 - Null count 3050
district REAL, --
bioguide TEXT, --
office TEXT, --
class REAL, -- Example Values: `1.0`, `2.0`, `3.0` | Value Statics: Total count 244 - Distinct count 3 - Null count 2834
type TEXT, -- Example Values: `rep`, `sen` | Value Statics: Total count 3014 - Distinct count 2 - Null count 64
start TEXT, --
address TEXT, --
rss_url TEXT, --
url TEXT, --
primary key (bioguide, end),
fax TEXT, --
chamber TEXT, -- Example Values: `senate`, `house` | Value Statics: Total count 28 - Distinct count 2 - Null count 3050
end TEXT, --
caucus TEXT, -- Example Values: `Democrat` | Value Statics: Total count 3 - Distinct count 1 - Null count 3075
state TEXT, --
last TEXT, -- Example Values: `Menendez` | Value Statics: Total count 1 - Distinct count 1 - Null count 3077
relation TEXT, -- Example Values: `son`, `nephew`, `cousin`, `daughter`, `grandson` | Value Statics: Total count 35 - Distinct count 13 - Null count 3043
state_rank TEXT, -- Example Values: `senior`, `junior` | Value Statics: Total count 147 - Distinct count 2 - Null count 2931
name TEXT, --
contact_form TEXT, --
party TEXT, -- Example Values: `Democrat`, `Republican`, `Independent` | Value Statics: Total count 3014 - Distinct count 3 - Null count 64
);
CREATE TABLE social-media
(
foreign key (bioguide) references current(bioguide_id),
instagram TEXT, --
thomas INTEGER, --
youtube TEXT, --
twitter TEXT, --
facebook TEXT, --
youtube_id TEXT, --
twitter_id REAL, --
facebook_id REAL, --
govtrack REAL, --
bioguide TEXT primary key,
instagram_id REAL, --
); |
professional_basketball | Please list the players who received the "Most Valuable Player" award in the NBA league after the year of 1990, along with their IDs. | player refers to playerID; "Most Valuable Player" award refers to award = 'Most Valuable Player'; after the year of 1990 refers to year > 1990; ID refers to playerID | SELECT playerID FROM awards_players WHERE year > 1990 AND award = 'Most Valuable Player' AND lgID = 'NBA' | CREATE TABLE players_teams
(
PostGS INTEGER, --
PostdRebounds INTEGER, --
PostPF INTEGER, --
tmID TEXT, --
threeAttempted INTEGER, --
PostRebounds INTEGER, --
assists INTEGER, --
threeMade INTEGER, --
PostBlocks INTEGER, --
PostTurnovers INTEGER, --
GP INTEGER, --
lgID TEXT, -- Example Values: `NBA`, `NBL`, `ABA`, `ABL1`, `NPBL` | Value Statics: Total count 23751 - Distinct count 6 - Null count 0
foreign key (tmID, year) references teams (tmID, year) on update cascade on delete cascade,
PostfgMade INTEGER, --
steals INTEGER, --
oRebounds INTEGER, --
PostftAttempted INTEGER, --
ftAttempted INTEGER, --
ftMade INTEGER, --
points INTEGER, --
PostfgAttempted INTEGER, --
PostftMade INTEGER, --
note TEXT, -- Example Values: `C` | Value Statics: Total count 43 - Distinct count 1 - Null count 23708
dRebounds INTEGER, --
PostSteals INTEGER, --
blocks INTEGER, --
PostAssists INTEGER, --
minutes INTEGER, --
fgAttempted INTEGER, --
playerID TEXT not null references players on update cascade on delete cascade, --
PostthreeMade INTEGER, --
PostPoints INTEGER, --
year INTEGER, --
PF INTEGER, --
fgMade INTEGER, --
PostthreeAttempted INTEGER, --
rebounds INTEGER, --
id INTEGER primary key autoincrement,
stint INTEGER, -- Example Values: `1`, `2`, `0`, `3`, `4` | Value Statics: Total count 23751 - Distinct count 6 - Null count 0
PostMinutes INTEGER, --
PostGP INTEGER, --
turnovers INTEGER, --
PostoRebounds INTEGER, --
GS INTEGER, --
);
CREATE TABLE awards_coaches
(
award TEXT, -- Example Values: `NBA Coach of the Year`, `ABA Coach of the Year` | Value Statics: Total count 61 - Distinct count 2 - Null count 0
id INTEGER primary key autoincrement,
note TEXT, -- Example Values: `tie` | Value Statics: Total count 4 - Distinct count 1 - Null count 57
coachID TEXT, --
lgID TEXT, -- Example Values: `NBA`, `ABA` | Value Statics: Total count 61 - Distinct count 2 - Null count 0
foreign key (coachID, year) references coaches (coachID, year) on update cascade on delete cascade,
year INTEGER, --
);
CREATE TABLE draft
(
draftOverall INTEGER null, --
lgID TEXT null, -- Example Values: `ABA`, `NBA` | Value Statics: Total count 8621 - Distinct count 2 - Null count 0
suffixName TEXT null, -- Example Values: `Jr.` | Value Statics: Total count 2 - Distinct count 1 - Null count 8619
draftYear INTEGER null, --
draftSelection INTEGER null, --
tmID TEXT null, --
draftRound INTEGER null, --
lastName TEXT null, --
playerID TEXT null, --
draftFrom TEXT null, --
id INTEGER default 0 not null primary key,
firstName TEXT null, --
foreign key (tmID, draftYear) references teams (tmID, year) on update cascade on delete cascade,
foreign key (tmID, draftYear) references teams (tmID, year) on update cascade on delete cascade,
);
CREATE TABLE player_allstar
(
rebounds INTEGER null, --
playerID TEXT not null, --
season_id INTEGER not null, --
assists INTEGER null, --
conference TEXT null, -- Example Values: `East`, `West`, `Weset`, `Allstars`, `Denver` | Value Statics: Total count 1608 - Distinct count 5 - Null count 0
points INTEGER null, --
personal_fouls INTEGER null, -- Example Values: `3`, `2`, `0`, `1`, `5` | Value Statics: Total count 540 - Distinct count 8 - Null count 1068
ft_attempted INTEGER null, -- Example Values: `2`, `4`, `0`, `6`, `3` | Value Statics: Total count 1561 - Distinct count 17 - Null count 47
fg_attempted INTEGER null, --
league_id TEXT null, -- Example Values: `NBA`, `ABA` | Value Statics: Total count 1608 - Distinct count 2 - Null count 0
foreign key (playerID) references players (playerID) on update cascade on delete cascade,
fg_made INTEGER null, -- Example Values: `4`, `8`, `5`, `7`, `3` | Value Statics: Total count 1561 - Distinct count 18 - Null count 47
ft_made INTEGER null, -- Example Values: `2`, `3`, `0`, `1`, `4` | Value Statics: Total count 1561 - Distinct count 13 - Null count 47
steals INTEGER null, -- Example Values: `3`, `0`, `1`, `2`, `5` | Value Statics: Total count 398 - Distinct count 7 - Null count 1210
games_played INTEGER null, -- Example Values: `1` | Value Statics: Total count 1608 - Distinct count 1 - Null count 0
first_name TEXT null, --
d_rebounds INTEGER null, -- Example Values: `2`, `5`, `0`, `1`, `4` | Value Statics: Total count 493 - Distinct count 14 - Null count 1115
last_name TEXT null, --
primary key (playerID, season_id),
turnovers INTEGER null, -- Example Values: `1`, `0`, `3`, `2`, `4` | Value Statics: Total count 493 - Distinct count 9 - Null count 1115
three_made INTEGER null, -- Example Values: `0`, `1`, `3`, `5`, `4` | Value Statics: Total count 566 - Distinct count 7 - Null count 1042
minutes INTEGER null, --
blocks INTEGER null, -- Example Values: `2`, `0`, `1`, `3`, `5` | Value Statics: Total count 398 - Distinct count 6 - Null count 1210
three_attempted INTEGER null, -- Example Values: `0`, `1`, `6`, `7`, `10` | Value Statics: Total count 540 - Distinct count 12 - Null count 1068
o_rebounds INTEGER null, -- Example Values: `1`, `2`, `0`, `3`, `4` | Value Statics: Total count 493 - Distinct count 10 - Null count 1115
);
CREATE TABLE awards_players
(
foreign key (playerID) references players (playerID) on update cascade on delete cascade,
year INTEGER not null, --
pos TEXT null, -- Example Values: `C`, `F`, `G`, `F/G`, `F/C` | Value Statics: Total count 833 - Distinct count 5 - Null count 886
primary key (playerID, year, award),
lgID TEXT null, -- Example Values: `NBA`, `ABA`, `NBL`, `ABL1` | Value Statics: Total count 1719 - Distinct count 4 - Null count 0
award TEXT not null, --
playerID TEXT not null, --
note TEXT null, -- Example Values: `tie` | Value Statics: Total count 37 - Distinct count 1 - Null count 1682
);
CREATE TABLE series_post
(
tmIDLoser TEXT, --
id INTEGER primary key autoincrement,
series TEXT, -- Example Values: `O`, `M`, `N`, `A`, `K` | Value Statics: Total count 775 - Distinct count 11 - Null count 0
tmIDWinner TEXT, --
round TEXT, -- Example Values: `F`, `QF`, `SF`, `DT`, `DF` | Value Statics: Total count 775 - Distinct count 11 - Null count 0
year INTEGER, --
foreign key (tmIDLoser, year) references teams (tmID, year) on update cascade on delete cascade,
foreign key (tmIDWinner, year) references teams (tmID, year) on update cascade on delete cascade,
W INTEGER, -- Example Values: `4`, `2`, `1`, `3`, `0` | Value Statics: Total count 775 - Distinct count 5 - Null count 0
lgIDLoser TEXT, -- Example Values: `NBA`, `ABA` | Value Statics: Total count 775 - Distinct count 2 - Null count 0
lgIDWinner TEXT, -- Example Values: `NBA`, `ABA` | Value Statics: Total count 775 - Distinct count 2 - Null count 0
L INTEGER, -- Example Values: `1`, `0`, `2`, `3`, `4` | Value Statics: Total count 775 - Distinct count 5 - Null count 0
);
CREATE TABLE players
(
nameGiven TEXT null, -- Example Values: `nameGiven`, `Mort`, `Robert`, `Jim`, `Mike` | Value Statics: Total count 10 - Distinct count 9 - Null count 5052
lastseason INTEGER null, -- Example Values: `0`, `1951` | Value Statics: Total count 5047 - Distinct count 2 - Null count 15
hsCountry TEXT null, --
firstName TEXT null, --
hsCity TEXT null, --
firstseason INTEGER null, -- Example Values: `0`, `1951` | Value Statics: Total count 5047 - Distinct count 2 - Null count 15
weight INTEGER null, --
birthCountry TEXT null, --
race TEXT null, -- Example Values: `B`, `W`, `O`, `1`, `r` | Value Statics: Total count 4903 - Distinct count 5 - Null count 159
lastName TEXT null, --
birthDate DATE null, --
collegeOther TEXT null, --
birthState TEXT null, --
useFirst TEXT null, --
pos TEXT null, -- Example Values: `F-C`, `C`, `G`, `G-F`, `C-F` | Value Statics: Total count 4880 - Distinct count 14 - Null count 182
playerID TEXT not null primary key,
college TEXT null, --
highSchool TEXT null, --
hsState TEXT null, --
height REAL null, --
deathDate DATE null, --
nameSuffix TEXT null, -- Example Values: `Jr.`, `III`, `nameSuffix`, `II`, `IV` | Value Statics: Total count 324 - Distinct count 6 - Null count 4738
nameNick TEXT null, --
fullGivenName TEXT null, --
birthCity TEXT null, --
middleName TEXT null, --
);
CREATE TABLE teams
(
d_pts INTEGER null, --
name TEXT null, --
homeLost INTEGER null, --
o_ftm INTEGER null, --
franchID TEXT null, --
tmID TEXT not null, --
awayWon INTEGER null, --
primary key (year, tmID),
o_fgm INTEGER null, --
year INTEGER not null, --
awayLost INTEGER null, --
arena TEXT null, --
confID TEXT null, -- Example Values: `EC`, `WC` | Value Statics: Total count 1064 - Distinct count 2 - Null count 472
games INTEGER null, --
lost INTEGER null, --
divID TEXT null, -- Example Values: `EA`, `WE`, `ED`, `WD`, `SO` | Value Statics: Total count 1498 - Distinct count 13 - Null count 38
lgID TEXT null, -- Example Values: `NBL`, `NBA`, `PBLA`, `NPBL`, `ABL1` | Value Statics: Total count 1536 - Distinct count 6 - Null count 0
homeWon INTEGER null, --
confRank INTEGER null, -- Example Values: `0`, `4`, `3`, `5`, `7` | Value Statics: Total count 1536 - Distinct count 16 - Null count 0
o_pts INTEGER null, --
`rank` INTEGER null, -- Example Values: `1`, `2`, `4`, `5`, `6` | Value Statics: Total count 1536 - Distinct count 10 - Null count 0
playoff TEXT null, -- Example Values: `CF`, `WC`, `LC`, `CS`, `F` | Value Statics: Total count 901 - Distinct count 15 - Null count 635
won INTEGER null, --
);
CREATE TABLE coaches
(
primary key (coachID, year, tmID, stint),
lgID TEXT null, -- Example Values: `NBA`, `ABA`, `ABL1`, `PBLA`, `NPBL` | Value Statics: Total count 1689 - Distinct count 5 - Null count 0
post_losses INTEGER null, -- Example Values: `3`, `9`, `7`, `8`, `0` | Value Statics: Total count 1649 - Distinct count 12 - Null count 40
year INTEGER not null, --
won INTEGER null, --
foreign key (tmID, year) references teams (tmID, year) on update cascade on delete cascade,
post_wins INTEGER null, -- Example Values: `0`, `12`, `9`, `13`, `1` | Value Statics: Total count 1649 - Distinct count 17 - Null count 40
coachID TEXT not null, --
tmID TEXT not null, --
lost INTEGER null, --
stint INTEGER not null, -- Example Values: `2`, `1`, `4`, `5`, `3` | Value Statics: Total count 1689 - Distinct count 5 - Null count 0
); |
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' | CREATE TABLE current
(
gender_bio TEXT, -- Example Values: `M`, `F` | Value Statics: Total count 541 - Distinct count 2 - Null count 0
suffix_name TEXT, -- Example Values: `Jr.`, `III`, `II` | Value Statics: Total count 20 - Distinct count 3 - Null count 521
house_history_id REAL, --
birthday_bio DATE, --
nickname_name TEXT, --
religion_bio TEXT, --
google_entity_id_id TEXT, --
govtrack_id INTEGER, --
cspan_id REAL, --
primary key (bioguide_id, cspan_id),
wikipedia_id TEXT, --
maplight_id REAL, --
last_name TEXT, --
icpsr_id REAL, --
fec_id TEXT, --
votesmart_id REAL, --
first_name TEXT, --
lis_id TEXT, --
bioguide_id TEXT, --
wikidata_id TEXT, --
middle_name TEXT, --
ballotpedia_id TEXT, --
opensecrets_id TEXT, --
official_full_name TEXT, --
thomas_id INTEGER, --
);
CREATE TABLE historical
(
fec_id TEXT, --
suffix_name TEXT, -- Example Values: `Jr.`, `Sr.`, `II`, `III`, `IV` | Value Statics: Total count 418 - Distinct count 5 - Null count 11446
govtrack_id INTEGER, --
house_history_id REAL, --
opensecrets_id TEXT, --
votesmart_id TEXT, --
bioguide_id TEXT primary key,
nickname_name TEXT, --
official_full_name TEXT, --
house_history_alternate_id TEXT, -- Example Values: `13283.0` | Value Statics: Total count 1 - Distinct count 1 - Null count 11863
gender_bio TEXT, -- Example Values: `M`, `F` | Value Statics: Total count 11864 - Distinct count 2 - Null count 0
bioguide_previous_id TEXT, -- Example Values: `['F000246']`, `['L000266']`, `['W000790']` | Value Statics: Total count 3 - Distinct count 3 - Null count 11861
icpsr_id REAL, --
wikipedia_id TEXT, --
birthday_bio TEXT, --
religion_bio TEXT, --
lis_id TEXT, --
middle_name TEXT, --
cspan_id TEXT, --
last_name TEXT, --
first_name TEXT, --
wikidata_id TEXT, --
thomas_id TEXT, --
ballotpedia_id TEXT, --
maplight_id TEXT, --
google_entity_id_id TEXT, --
);
CREATE TABLE historical-terms
(
bioguide TEXT primary key,
middle TEXT, --
title TEXT, -- Example Values: `Majority Leader`, `Speaker` | Value Statics: Total count 3 - Distinct count 2 - Null count 11861
party TEXT, --
type TEXT, -- Example Values: `sen`, `rep` | Value Statics: Total count 11858 - Distinct count 2 - Null count 6
phone TEXT, --
rss_url TEXT, -- Example Values: `http://radel.house.gov/news/rss.aspx`, `http://www.begich.senate.gov/public/?a=rss.feed`, `http://www.hagan.senate.gov/rss`, `http://negretemcleod.house.gov/rss.xml`, `http://garcia.house.gov/rss.xml` | Value Statics: Total count 12 - Distinct count 12 - Null count 11852
name TEXT, --
start TEXT, --
address TEXT, --
party_affiliations TEXT, -- Example Values: `{'start': '2009-01-06', 'end': '2009-12-22', 'party': 'Democrat'}`, `{'start': '2003-01-07', 'end': '2004-08-09', 'party': 'Democrat'}` | Value Statics: Total count 2 - Distinct count 2 - Null count 11862
relation TEXT, --
state_rank TEXT, -- Example Values: `junior`, `senior` | Value Statics: Total count 7 - Distinct count 2 - Null count 11857
last TEXT, -- Example Values: `Levy`, `Lambert`, `Bono` | Value Statics: Total count 3 - Distinct count 3 - Null count 11861
url TEXT, --
fax TEXT, --
contact_form TEXT, --
office TEXT, --
state TEXT, --
foreign key (bioguide) references historical(bioguide_id),
class REAL, -- Example Values: `2.0`, `1.0`, `3.0` | Value Statics: Total count 1256 - Distinct count 3 - Null count 10608
end TEXT, --
district REAL, --
chamber TEXT, -- Example Values: `house`, `senate` | Value Statics: Total count 3 - Distinct count 2 - Null count 11861
);
CREATE TABLE current-terms
(
foreign key (bioguide) references current(bioguide_id),
phone TEXT, --
party_affiliations TEXT, -- Example Values: `{'start': '2009-01-06', 'end': '2009-02-23', 'party': 'Independent'}`, `{'start': '1993-01-05', 'end': '1994-11-09', 'party': 'Democrat'}` | Value Statics: Total count 2 - Distinct count 2 - Null count 3076
title TEXT, -- Example Values: `Minority Whip`, `Majority Whip`, `Minority Leader`, `Majority Leader`, `Speaker` | Value Statics: Total count 28 - Distinct count 5 - Null count 3050
district REAL, --
bioguide TEXT, --
office TEXT, --
class REAL, -- Example Values: `1.0`, `2.0`, `3.0` | Value Statics: Total count 244 - Distinct count 3 - Null count 2834
type TEXT, -- Example Values: `rep`, `sen` | Value Statics: Total count 3014 - Distinct count 2 - Null count 64
start TEXT, --
address TEXT, --
rss_url TEXT, --
url TEXT, --
primary key (bioguide, end),
fax TEXT, --
chamber TEXT, -- Example Values: `senate`, `house` | Value Statics: Total count 28 - Distinct count 2 - Null count 3050
end TEXT, --
caucus TEXT, -- Example Values: `Democrat` | Value Statics: Total count 3 - Distinct count 1 - Null count 3075
state TEXT, --
last TEXT, -- Example Values: `Menendez` | Value Statics: Total count 1 - Distinct count 1 - Null count 3077
relation TEXT, -- Example Values: `son`, `nephew`, `cousin`, `daughter`, `grandson` | Value Statics: Total count 35 - Distinct count 13 - Null count 3043
state_rank TEXT, -- Example Values: `senior`, `junior` | Value Statics: Total count 147 - Distinct count 2 - Null count 2931
name TEXT, --
contact_form TEXT, --
party TEXT, -- Example Values: `Democrat`, `Republican`, `Independent` | Value Statics: Total count 3014 - Distinct count 3 - Null count 64
);
CREATE TABLE social-media
(
foreign key (bioguide) references current(bioguide_id),
instagram TEXT, --
thomas INTEGER, --
youtube TEXT, --
twitter TEXT, --
facebook TEXT, --
youtube_id TEXT, --
twitter_id REAL, --
facebook_id REAL, --
govtrack REAL, --
bioguide TEXT primary key,
instagram_id REAL, --
); |
olympics | Please list the names of all the Olympic games that John Aalberg has taken part in. | name of the Olympic games refers to games_name; | SELECT T1.games_name FROM games AS T1 INNER JOIN games_competitor AS T2 ON T1.id = T2.games_id INNER JOIN person AS T3 ON T2.person_id = T3.id WHERE T3.full_name = 'John Aalberg' | CREATE TABLE event
(
event_name TEXT default NULL, --
sport_id INTEGER default NULL, --
foreign key (sport_id) references sport(id),
id INTEGER not null primary key,
);
CREATE TABLE sport
(
id INTEGER not null primary key,
sport_name TEXT default NULL, --
);
CREATE TABLE city
(
city_name TEXT default NULL, --
id INTEGER not null primary key,
);
CREATE TABLE games_city
(
city_id INTEGER default NULL, --
foreign key (games_id) references games(id),
games_id INTEGER default NULL, --
foreign key (city_id) references city(id),
);
CREATE TABLE competitor_event
(
foreign key (event_id) references event(id),
foreign key (competitor_id) references games_competitor(id),
foreign key (competitor_id) references games_competitor(id),
foreign key (medal_id) references medal(id),
medal_id INTEGER default NULL, -- Example Values: `4`, `1`, `3`, `2` | Value Statics: Total count 100000 - Distinct count 4 - Null count 0
event_id INTEGER default NULL, --
competitor_id INTEGER default NULL, --
);
CREATE TABLE person
(
weight INTEGER default NULL, --
height INTEGER default NULL, --
id INTEGER not null primary key,
full_name TEXT default NULL, --
gender TEXT default NULL, -- Example Values: `M`, `F` | Value Statics: Total count 100000 - Distinct count 2 - Null count 0
);
CREATE TABLE noc_region
(
region_name TEXT default NULL, --
id INTEGER not null primary key,
noc TEXT default NULL, --
);
CREATE TABLE medal
(
id INTEGER not null primary key,
medal_name TEXT default NULL, -- Example Values: `Gold`, `Silver`, `Bronze`, `NA` | Value Statics: Total count 4 - Distinct count 4 - Null count 0
);
CREATE TABLE person_region
(
foreign key (region_id) references noc_region(id),
region_id INTEGER default NULL, --
foreign key (person_id) references person(id),
person_id INTEGER default NULL, --
);
CREATE TABLE games
(
season TEXT default NULL, -- Example Values: `Summer`, `Winter` | Value Statics: Total count 51 - Distinct count 2 - Null count 0
id INTEGER not null primary key,
games_name TEXT default NULL, --
games_year INTEGER default NULL, --
);
CREATE TABLE games_competitor
(
id INTEGER not null primary key,
foreign key (games_id) references games(id),
games_id INTEGER default NULL, --
age INTEGER default NULL, --
foreign key (person_id) references person(id),
person_id INTEGER default NULL, --
); |
professional_basketball | Percentage of games lost out of total games played by the Houston Mavericks | Houston Mavericks refers to name = 'Houston Mavericks'; percentage = divide(sum(lost), sum(games)) * 100% | SELECT CAST(SUM(lost) AS REAL) * 100 / SUM(games) FROM teams WHERE name = 'Houston Mavericks' | CREATE TABLE players_teams
(
PostGS INTEGER, --
PostdRebounds INTEGER, --
PostPF INTEGER, --
tmID TEXT, --
threeAttempted INTEGER, --
PostRebounds INTEGER, --
assists INTEGER, --
threeMade INTEGER, --
PostBlocks INTEGER, --
PostTurnovers INTEGER, --
GP INTEGER, --
lgID TEXT, -- Example Values: `NBA`, `NBL`, `ABA`, `ABL1`, `NPBL` | Value Statics: Total count 23751 - Distinct count 6 - Null count 0
foreign key (tmID, year) references teams (tmID, year) on update cascade on delete cascade,
PostfgMade INTEGER, --
steals INTEGER, --
oRebounds INTEGER, --
PostftAttempted INTEGER, --
ftAttempted INTEGER, --
ftMade INTEGER, --
points INTEGER, --
PostfgAttempted INTEGER, --
PostftMade INTEGER, --
note TEXT, -- Example Values: `C` | Value Statics: Total count 43 - Distinct count 1 - Null count 23708
dRebounds INTEGER, --
PostSteals INTEGER, --
blocks INTEGER, --
PostAssists INTEGER, --
minutes INTEGER, --
fgAttempted INTEGER, --
playerID TEXT not null references players on update cascade on delete cascade, --
PostthreeMade INTEGER, --
PostPoints INTEGER, --
year INTEGER, --
PF INTEGER, --
fgMade INTEGER, --
PostthreeAttempted INTEGER, --
rebounds INTEGER, --
id INTEGER primary key autoincrement,
stint INTEGER, -- Example Values: `1`, `2`, `0`, `3`, `4` | Value Statics: Total count 23751 - Distinct count 6 - Null count 0
PostMinutes INTEGER, --
PostGP INTEGER, --
turnovers INTEGER, --
PostoRebounds INTEGER, --
GS INTEGER, --
);
CREATE TABLE awards_coaches
(
award TEXT, -- Example Values: `NBA Coach of the Year`, `ABA Coach of the Year` | Value Statics: Total count 61 - Distinct count 2 - Null count 0
id INTEGER primary key autoincrement,
note TEXT, -- Example Values: `tie` | Value Statics: Total count 4 - Distinct count 1 - Null count 57
coachID TEXT, --
lgID TEXT, -- Example Values: `NBA`, `ABA` | Value Statics: Total count 61 - Distinct count 2 - Null count 0
foreign key (coachID, year) references coaches (coachID, year) on update cascade on delete cascade,
year INTEGER, --
);
CREATE TABLE draft
(
draftOverall INTEGER null, --
lgID TEXT null, -- Example Values: `ABA`, `NBA` | Value Statics: Total count 8621 - Distinct count 2 - Null count 0
suffixName TEXT null, -- Example Values: `Jr.` | Value Statics: Total count 2 - Distinct count 1 - Null count 8619
draftYear INTEGER null, --
draftSelection INTEGER null, --
tmID TEXT null, --
draftRound INTEGER null, --
lastName TEXT null, --
playerID TEXT null, --
draftFrom TEXT null, --
id INTEGER default 0 not null primary key,
firstName TEXT null, --
foreign key (tmID, draftYear) references teams (tmID, year) on update cascade on delete cascade,
foreign key (tmID, draftYear) references teams (tmID, year) on update cascade on delete cascade,
);
CREATE TABLE player_allstar
(
rebounds INTEGER null, --
playerID TEXT not null, --
season_id INTEGER not null, --
assists INTEGER null, --
conference TEXT null, -- Example Values: `East`, `West`, `Weset`, `Allstars`, `Denver` | Value Statics: Total count 1608 - Distinct count 5 - Null count 0
points INTEGER null, --
personal_fouls INTEGER null, -- Example Values: `3`, `2`, `0`, `1`, `5` | Value Statics: Total count 540 - Distinct count 8 - Null count 1068
ft_attempted INTEGER null, -- Example Values: `2`, `4`, `0`, `6`, `3` | Value Statics: Total count 1561 - Distinct count 17 - Null count 47
fg_attempted INTEGER null, --
league_id TEXT null, -- Example Values: `NBA`, `ABA` | Value Statics: Total count 1608 - Distinct count 2 - Null count 0
foreign key (playerID) references players (playerID) on update cascade on delete cascade,
fg_made INTEGER null, -- Example Values: `4`, `8`, `5`, `7`, `3` | Value Statics: Total count 1561 - Distinct count 18 - Null count 47
ft_made INTEGER null, -- Example Values: `2`, `3`, `0`, `1`, `4` | Value Statics: Total count 1561 - Distinct count 13 - Null count 47
steals INTEGER null, -- Example Values: `3`, `0`, `1`, `2`, `5` | Value Statics: Total count 398 - Distinct count 7 - Null count 1210
games_played INTEGER null, -- Example Values: `1` | Value Statics: Total count 1608 - Distinct count 1 - Null count 0
first_name TEXT null, --
d_rebounds INTEGER null, -- Example Values: `2`, `5`, `0`, `1`, `4` | Value Statics: Total count 493 - Distinct count 14 - Null count 1115
last_name TEXT null, --
primary key (playerID, season_id),
turnovers INTEGER null, -- Example Values: `1`, `0`, `3`, `2`, `4` | Value Statics: Total count 493 - Distinct count 9 - Null count 1115
three_made INTEGER null, -- Example Values: `0`, `1`, `3`, `5`, `4` | Value Statics: Total count 566 - Distinct count 7 - Null count 1042
minutes INTEGER null, --
blocks INTEGER null, -- Example Values: `2`, `0`, `1`, `3`, `5` | Value Statics: Total count 398 - Distinct count 6 - Null count 1210
three_attempted INTEGER null, -- Example Values: `0`, `1`, `6`, `7`, `10` | Value Statics: Total count 540 - Distinct count 12 - Null count 1068
o_rebounds INTEGER null, -- Example Values: `1`, `2`, `0`, `3`, `4` | Value Statics: Total count 493 - Distinct count 10 - Null count 1115
);
CREATE TABLE awards_players
(
foreign key (playerID) references players (playerID) on update cascade on delete cascade,
year INTEGER not null, --
pos TEXT null, -- Example Values: `C`, `F`, `G`, `F/G`, `F/C` | Value Statics: Total count 833 - Distinct count 5 - Null count 886
primary key (playerID, year, award),
lgID TEXT null, -- Example Values: `NBA`, `ABA`, `NBL`, `ABL1` | Value Statics: Total count 1719 - Distinct count 4 - Null count 0
award TEXT not null, --
playerID TEXT not null, --
note TEXT null, -- Example Values: `tie` | Value Statics: Total count 37 - Distinct count 1 - Null count 1682
);
CREATE TABLE series_post
(
tmIDLoser TEXT, --
id INTEGER primary key autoincrement,
series TEXT, -- Example Values: `O`, `M`, `N`, `A`, `K` | Value Statics: Total count 775 - Distinct count 11 - Null count 0
tmIDWinner TEXT, --
round TEXT, -- Example Values: `F`, `QF`, `SF`, `DT`, `DF` | Value Statics: Total count 775 - Distinct count 11 - Null count 0
year INTEGER, --
foreign key (tmIDLoser, year) references teams (tmID, year) on update cascade on delete cascade,
foreign key (tmIDWinner, year) references teams (tmID, year) on update cascade on delete cascade,
W INTEGER, -- Example Values: `4`, `2`, `1`, `3`, `0` | Value Statics: Total count 775 - Distinct count 5 - Null count 0
lgIDLoser TEXT, -- Example Values: `NBA`, `ABA` | Value Statics: Total count 775 - Distinct count 2 - Null count 0
lgIDWinner TEXT, -- Example Values: `NBA`, `ABA` | Value Statics: Total count 775 - Distinct count 2 - Null count 0
L INTEGER, -- Example Values: `1`, `0`, `2`, `3`, `4` | Value Statics: Total count 775 - Distinct count 5 - Null count 0
);
CREATE TABLE players
(
nameGiven TEXT null, -- Example Values: `nameGiven`, `Mort`, `Robert`, `Jim`, `Mike` | Value Statics: Total count 10 - Distinct count 9 - Null count 5052
lastseason INTEGER null, -- Example Values: `0`, `1951` | Value Statics: Total count 5047 - Distinct count 2 - Null count 15
hsCountry TEXT null, --
firstName TEXT null, --
hsCity TEXT null, --
firstseason INTEGER null, -- Example Values: `0`, `1951` | Value Statics: Total count 5047 - Distinct count 2 - Null count 15
weight INTEGER null, --
birthCountry TEXT null, --
race TEXT null, -- Example Values: `B`, `W`, `O`, `1`, `r` | Value Statics: Total count 4903 - Distinct count 5 - Null count 159
lastName TEXT null, --
birthDate DATE null, --
collegeOther TEXT null, --
birthState TEXT null, --
useFirst TEXT null, --
pos TEXT null, -- Example Values: `F-C`, `C`, `G`, `G-F`, `C-F` | Value Statics: Total count 4880 - Distinct count 14 - Null count 182
playerID TEXT not null primary key,
college TEXT null, --
highSchool TEXT null, --
hsState TEXT null, --
height REAL null, --
deathDate DATE null, --
nameSuffix TEXT null, -- Example Values: `Jr.`, `III`, `nameSuffix`, `II`, `IV` | Value Statics: Total count 324 - Distinct count 6 - Null count 4738
nameNick TEXT null, --
fullGivenName TEXT null, --
birthCity TEXT null, --
middleName TEXT null, --
);
CREATE TABLE teams
(
d_pts INTEGER null, --
name TEXT null, --
homeLost INTEGER null, --
o_ftm INTEGER null, --
franchID TEXT null, --
tmID TEXT not null, --
awayWon INTEGER null, --
primary key (year, tmID),
o_fgm INTEGER null, --
year INTEGER not null, --
awayLost INTEGER null, --
arena TEXT null, --
confID TEXT null, -- Example Values: `EC`, `WC` | Value Statics: Total count 1064 - Distinct count 2 - Null count 472
games INTEGER null, --
lost INTEGER null, --
divID TEXT null, -- Example Values: `EA`, `WE`, `ED`, `WD`, `SO` | Value Statics: Total count 1498 - Distinct count 13 - Null count 38
lgID TEXT null, -- Example Values: `NBL`, `NBA`, `PBLA`, `NPBL`, `ABL1` | Value Statics: Total count 1536 - Distinct count 6 - Null count 0
homeWon INTEGER null, --
confRank INTEGER null, -- Example Values: `0`, `4`, `3`, `5`, `7` | Value Statics: Total count 1536 - Distinct count 16 - Null count 0
o_pts INTEGER null, --
`rank` INTEGER null, -- Example Values: `1`, `2`, `4`, `5`, `6` | Value Statics: Total count 1536 - Distinct count 10 - Null count 0
playoff TEXT null, -- Example Values: `CF`, `WC`, `LC`, `CS`, `F` | Value Statics: Total count 901 - Distinct count 15 - Null count 635
won INTEGER null, --
);
CREATE TABLE coaches
(
primary key (coachID, year, tmID, stint),
lgID TEXT null, -- Example Values: `NBA`, `ABA`, `ABL1`, `PBLA`, `NPBL` | Value Statics: Total count 1689 - Distinct count 5 - Null count 0
post_losses INTEGER null, -- Example Values: `3`, `9`, `7`, `8`, `0` | Value Statics: Total count 1649 - Distinct count 12 - Null count 40
year INTEGER not null, --
won INTEGER null, --
foreign key (tmID, year) references teams (tmID, year) on update cascade on delete cascade,
post_wins INTEGER null, -- Example Values: `0`, `12`, `9`, `13`, `1` | Value Statics: Total count 1649 - Distinct count 17 - Null count 40
coachID TEXT not null, --
tmID TEXT not null, --
lost INTEGER null, --
stint INTEGER not null, -- Example Values: `2`, `1`, `4`, `5`, `3` | Value Statics: Total count 1689 - Distinct count 5 - Null count 0
); |
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 | CREATE TABLE current
(
gender_bio TEXT, -- Example Values: `M`, `F` | Value Statics: Total count 541 - Distinct count 2 - Null count 0
suffix_name TEXT, -- Example Values: `Jr.`, `III`, `II` | Value Statics: Total count 20 - Distinct count 3 - Null count 521
house_history_id REAL, --
birthday_bio DATE, --
nickname_name TEXT, --
religion_bio TEXT, --
google_entity_id_id TEXT, --
govtrack_id INTEGER, --
cspan_id REAL, --
primary key (bioguide_id, cspan_id),
wikipedia_id TEXT, --
maplight_id REAL, --
last_name TEXT, --
icpsr_id REAL, --
fec_id TEXT, --
votesmart_id REAL, --
first_name TEXT, --
lis_id TEXT, --
bioguide_id TEXT, --
wikidata_id TEXT, --
middle_name TEXT, --
ballotpedia_id TEXT, --
opensecrets_id TEXT, --
official_full_name TEXT, --
thomas_id INTEGER, --
);
CREATE TABLE historical
(
fec_id TEXT, --
suffix_name TEXT, -- Example Values: `Jr.`, `Sr.`, `II`, `III`, `IV` | Value Statics: Total count 418 - Distinct count 5 - Null count 11446
govtrack_id INTEGER, --
house_history_id REAL, --
opensecrets_id TEXT, --
votesmart_id TEXT, --
bioguide_id TEXT primary key,
nickname_name TEXT, --
official_full_name TEXT, --
house_history_alternate_id TEXT, -- Example Values: `13283.0` | Value Statics: Total count 1 - Distinct count 1 - Null count 11863
gender_bio TEXT, -- Example Values: `M`, `F` | Value Statics: Total count 11864 - Distinct count 2 - Null count 0
bioguide_previous_id TEXT, -- Example Values: `['F000246']`, `['L000266']`, `['W000790']` | Value Statics: Total count 3 - Distinct count 3 - Null count 11861
icpsr_id REAL, --
wikipedia_id TEXT, --
birthday_bio TEXT, --
religion_bio TEXT, --
lis_id TEXT, --
middle_name TEXT, --
cspan_id TEXT, --
last_name TEXT, --
first_name TEXT, --
wikidata_id TEXT, --
thomas_id TEXT, --
ballotpedia_id TEXT, --
maplight_id TEXT, --
google_entity_id_id TEXT, --
);
CREATE TABLE historical-terms
(
bioguide TEXT primary key,
middle TEXT, --
title TEXT, -- Example Values: `Majority Leader`, `Speaker` | Value Statics: Total count 3 - Distinct count 2 - Null count 11861
party TEXT, --
type TEXT, -- Example Values: `sen`, `rep` | Value Statics: Total count 11858 - Distinct count 2 - Null count 6
phone TEXT, --
rss_url TEXT, -- Example Values: `http://radel.house.gov/news/rss.aspx`, `http://www.begich.senate.gov/public/?a=rss.feed`, `http://www.hagan.senate.gov/rss`, `http://negretemcleod.house.gov/rss.xml`, `http://garcia.house.gov/rss.xml` | Value Statics: Total count 12 - Distinct count 12 - Null count 11852
name TEXT, --
start TEXT, --
address TEXT, --
party_affiliations TEXT, -- Example Values: `{'start': '2009-01-06', 'end': '2009-12-22', 'party': 'Democrat'}`, `{'start': '2003-01-07', 'end': '2004-08-09', 'party': 'Democrat'}` | Value Statics: Total count 2 - Distinct count 2 - Null count 11862
relation TEXT, --
state_rank TEXT, -- Example Values: `junior`, `senior` | Value Statics: Total count 7 - Distinct count 2 - Null count 11857
last TEXT, -- Example Values: `Levy`, `Lambert`, `Bono` | Value Statics: Total count 3 - Distinct count 3 - Null count 11861
url TEXT, --
fax TEXT, --
contact_form TEXT, --
office TEXT, --
state TEXT, --
foreign key (bioguide) references historical(bioguide_id),
class REAL, -- Example Values: `2.0`, `1.0`, `3.0` | Value Statics: Total count 1256 - Distinct count 3 - Null count 10608
end TEXT, --
district REAL, --
chamber TEXT, -- Example Values: `house`, `senate` | Value Statics: Total count 3 - Distinct count 2 - Null count 11861
);
CREATE TABLE current-terms
(
foreign key (bioguide) references current(bioguide_id),
phone TEXT, --
party_affiliations TEXT, -- Example Values: `{'start': '2009-01-06', 'end': '2009-02-23', 'party': 'Independent'}`, `{'start': '1993-01-05', 'end': '1994-11-09', 'party': 'Democrat'}` | Value Statics: Total count 2 - Distinct count 2 - Null count 3076
title TEXT, -- Example Values: `Minority Whip`, `Majority Whip`, `Minority Leader`, `Majority Leader`, `Speaker` | Value Statics: Total count 28 - Distinct count 5 - Null count 3050
district REAL, --
bioguide TEXT, --
office TEXT, --
class REAL, -- Example Values: `1.0`, `2.0`, `3.0` | Value Statics: Total count 244 - Distinct count 3 - Null count 2834
type TEXT, -- Example Values: `rep`, `sen` | Value Statics: Total count 3014 - Distinct count 2 - Null count 64
start TEXT, --
address TEXT, --
rss_url TEXT, --
url TEXT, --
primary key (bioguide, end),
fax TEXT, --
chamber TEXT, -- Example Values: `senate`, `house` | Value Statics: Total count 28 - Distinct count 2 - Null count 3050
end TEXT, --
caucus TEXT, -- Example Values: `Democrat` | Value Statics: Total count 3 - Distinct count 1 - Null count 3075
state TEXT, --
last TEXT, -- Example Values: `Menendez` | Value Statics: Total count 1 - Distinct count 1 - Null count 3077
relation TEXT, -- Example Values: `son`, `nephew`, `cousin`, `daughter`, `grandson` | Value Statics: Total count 35 - Distinct count 13 - Null count 3043
state_rank TEXT, -- Example Values: `senior`, `junior` | Value Statics: Total count 147 - Distinct count 2 - Null count 2931
name TEXT, --
contact_form TEXT, --
party TEXT, -- Example Values: `Democrat`, `Republican`, `Independent` | Value Statics: Total count 3014 - Distinct count 3 - Null count 64
);
CREATE TABLE social-media
(
foreign key (bioguide) references current(bioguide_id),
instagram TEXT, --
thomas INTEGER, --
youtube TEXT, --
twitter TEXT, --
facebook TEXT, --
youtube_id TEXT, --
twitter_id REAL, --
facebook_id REAL, --
govtrack REAL, --
bioguide TEXT primary key,
instagram_id REAL, --
); |
professional_basketball | Where was the high school of the player who had the most rebounds in the NBA allstar history? | the most rebounds refers to max(rebounds) | SELECT T2.highSchool FROM player_allstar AS T1 INNER JOIN players AS T2 ON T1.playerID = T2.playerID ORDER BY T1.rebounds DESC LIMIT 1 | CREATE TABLE players_teams
(
PostGS INTEGER, --
PostdRebounds INTEGER, --
PostPF INTEGER, --
tmID TEXT, --
threeAttempted INTEGER, --
PostRebounds INTEGER, --
assists INTEGER, --
threeMade INTEGER, --
PostBlocks INTEGER, --
PostTurnovers INTEGER, --
GP INTEGER, --
lgID TEXT, -- Example Values: `NBA`, `NBL`, `ABA`, `ABL1`, `NPBL` | Value Statics: Total count 23751 - Distinct count 6 - Null count 0
foreign key (tmID, year) references teams (tmID, year) on update cascade on delete cascade,
PostfgMade INTEGER, --
steals INTEGER, --
oRebounds INTEGER, --
PostftAttempted INTEGER, --
ftAttempted INTEGER, --
ftMade INTEGER, --
points INTEGER, --
PostfgAttempted INTEGER, --
PostftMade INTEGER, --
note TEXT, -- Example Values: `C` | Value Statics: Total count 43 - Distinct count 1 - Null count 23708
dRebounds INTEGER, --
PostSteals INTEGER, --
blocks INTEGER, --
PostAssists INTEGER, --
minutes INTEGER, --
fgAttempted INTEGER, --
playerID TEXT not null references players on update cascade on delete cascade, --
PostthreeMade INTEGER, --
PostPoints INTEGER, --
year INTEGER, --
PF INTEGER, --
fgMade INTEGER, --
PostthreeAttempted INTEGER, --
rebounds INTEGER, --
id INTEGER primary key autoincrement,
stint INTEGER, -- Example Values: `1`, `2`, `0`, `3`, `4` | Value Statics: Total count 23751 - Distinct count 6 - Null count 0
PostMinutes INTEGER, --
PostGP INTEGER, --
turnovers INTEGER, --
PostoRebounds INTEGER, --
GS INTEGER, --
);
CREATE TABLE awards_coaches
(
award TEXT, -- Example Values: `NBA Coach of the Year`, `ABA Coach of the Year` | Value Statics: Total count 61 - Distinct count 2 - Null count 0
id INTEGER primary key autoincrement,
note TEXT, -- Example Values: `tie` | Value Statics: Total count 4 - Distinct count 1 - Null count 57
coachID TEXT, --
lgID TEXT, -- Example Values: `NBA`, `ABA` | Value Statics: Total count 61 - Distinct count 2 - Null count 0
foreign key (coachID, year) references coaches (coachID, year) on update cascade on delete cascade,
year INTEGER, --
);
CREATE TABLE draft
(
draftOverall INTEGER null, --
lgID TEXT null, -- Example Values: `ABA`, `NBA` | Value Statics: Total count 8621 - Distinct count 2 - Null count 0
suffixName TEXT null, -- Example Values: `Jr.` | Value Statics: Total count 2 - Distinct count 1 - Null count 8619
draftYear INTEGER null, --
draftSelection INTEGER null, --
tmID TEXT null, --
draftRound INTEGER null, --
lastName TEXT null, --
playerID TEXT null, --
draftFrom TEXT null, --
id INTEGER default 0 not null primary key,
firstName TEXT null, --
foreign key (tmID, draftYear) references teams (tmID, year) on update cascade on delete cascade,
foreign key (tmID, draftYear) references teams (tmID, year) on update cascade on delete cascade,
);
CREATE TABLE player_allstar
(
rebounds INTEGER null, --
playerID TEXT not null, --
season_id INTEGER not null, --
assists INTEGER null, --
conference TEXT null, -- Example Values: `East`, `West`, `Weset`, `Allstars`, `Denver` | Value Statics: Total count 1608 - Distinct count 5 - Null count 0
points INTEGER null, --
personal_fouls INTEGER null, -- Example Values: `3`, `2`, `0`, `1`, `5` | Value Statics: Total count 540 - Distinct count 8 - Null count 1068
ft_attempted INTEGER null, -- Example Values: `2`, `4`, `0`, `6`, `3` | Value Statics: Total count 1561 - Distinct count 17 - Null count 47
fg_attempted INTEGER null, --
league_id TEXT null, -- Example Values: `NBA`, `ABA` | Value Statics: Total count 1608 - Distinct count 2 - Null count 0
foreign key (playerID) references players (playerID) on update cascade on delete cascade,
fg_made INTEGER null, -- Example Values: `4`, `8`, `5`, `7`, `3` | Value Statics: Total count 1561 - Distinct count 18 - Null count 47
ft_made INTEGER null, -- Example Values: `2`, `3`, `0`, `1`, `4` | Value Statics: Total count 1561 - Distinct count 13 - Null count 47
steals INTEGER null, -- Example Values: `3`, `0`, `1`, `2`, `5` | Value Statics: Total count 398 - Distinct count 7 - Null count 1210
games_played INTEGER null, -- Example Values: `1` | Value Statics: Total count 1608 - Distinct count 1 - Null count 0
first_name TEXT null, --
d_rebounds INTEGER null, -- Example Values: `2`, `5`, `0`, `1`, `4` | Value Statics: Total count 493 - Distinct count 14 - Null count 1115
last_name TEXT null, --
primary key (playerID, season_id),
turnovers INTEGER null, -- Example Values: `1`, `0`, `3`, `2`, `4` | Value Statics: Total count 493 - Distinct count 9 - Null count 1115
three_made INTEGER null, -- Example Values: `0`, `1`, `3`, `5`, `4` | Value Statics: Total count 566 - Distinct count 7 - Null count 1042
minutes INTEGER null, --
blocks INTEGER null, -- Example Values: `2`, `0`, `1`, `3`, `5` | Value Statics: Total count 398 - Distinct count 6 - Null count 1210
three_attempted INTEGER null, -- Example Values: `0`, `1`, `6`, `7`, `10` | Value Statics: Total count 540 - Distinct count 12 - Null count 1068
o_rebounds INTEGER null, -- Example Values: `1`, `2`, `0`, `3`, `4` | Value Statics: Total count 493 - Distinct count 10 - Null count 1115
);
CREATE TABLE awards_players
(
foreign key (playerID) references players (playerID) on update cascade on delete cascade,
year INTEGER not null, --
pos TEXT null, -- Example Values: `C`, `F`, `G`, `F/G`, `F/C` | Value Statics: Total count 833 - Distinct count 5 - Null count 886
primary key (playerID, year, award),
lgID TEXT null, -- Example Values: `NBA`, `ABA`, `NBL`, `ABL1` | Value Statics: Total count 1719 - Distinct count 4 - Null count 0
award TEXT not null, --
playerID TEXT not null, --
note TEXT null, -- Example Values: `tie` | Value Statics: Total count 37 - Distinct count 1 - Null count 1682
);
CREATE TABLE series_post
(
tmIDLoser TEXT, --
id INTEGER primary key autoincrement,
series TEXT, -- Example Values: `O`, `M`, `N`, `A`, `K` | Value Statics: Total count 775 - Distinct count 11 - Null count 0
tmIDWinner TEXT, --
round TEXT, -- Example Values: `F`, `QF`, `SF`, `DT`, `DF` | Value Statics: Total count 775 - Distinct count 11 - Null count 0
year INTEGER, --
foreign key (tmIDLoser, year) references teams (tmID, year) on update cascade on delete cascade,
foreign key (tmIDWinner, year) references teams (tmID, year) on update cascade on delete cascade,
W INTEGER, -- Example Values: `4`, `2`, `1`, `3`, `0` | Value Statics: Total count 775 - Distinct count 5 - Null count 0
lgIDLoser TEXT, -- Example Values: `NBA`, `ABA` | Value Statics: Total count 775 - Distinct count 2 - Null count 0
lgIDWinner TEXT, -- Example Values: `NBA`, `ABA` | Value Statics: Total count 775 - Distinct count 2 - Null count 0
L INTEGER, -- Example Values: `1`, `0`, `2`, `3`, `4` | Value Statics: Total count 775 - Distinct count 5 - Null count 0
);
CREATE TABLE players
(
nameGiven TEXT null, -- Example Values: `nameGiven`, `Mort`, `Robert`, `Jim`, `Mike` | Value Statics: Total count 10 - Distinct count 9 - Null count 5052
lastseason INTEGER null, -- Example Values: `0`, `1951` | Value Statics: Total count 5047 - Distinct count 2 - Null count 15
hsCountry TEXT null, --
firstName TEXT null, --
hsCity TEXT null, --
firstseason INTEGER null, -- Example Values: `0`, `1951` | Value Statics: Total count 5047 - Distinct count 2 - Null count 15
weight INTEGER null, --
birthCountry TEXT null, --
race TEXT null, -- Example Values: `B`, `W`, `O`, `1`, `r` | Value Statics: Total count 4903 - Distinct count 5 - Null count 159
lastName TEXT null, --
birthDate DATE null, --
collegeOther TEXT null, --
birthState TEXT null, --
useFirst TEXT null, --
pos TEXT null, -- Example Values: `F-C`, `C`, `G`, `G-F`, `C-F` | Value Statics: Total count 4880 - Distinct count 14 - Null count 182
playerID TEXT not null primary key,
college TEXT null, --
highSchool TEXT null, --
hsState TEXT null, --
height REAL null, --
deathDate DATE null, --
nameSuffix TEXT null, -- Example Values: `Jr.`, `III`, `nameSuffix`, `II`, `IV` | Value Statics: Total count 324 - Distinct count 6 - Null count 4738
nameNick TEXT null, --
fullGivenName TEXT null, --
birthCity TEXT null, --
middleName TEXT null, --
);
CREATE TABLE teams
(
d_pts INTEGER null, --
name TEXT null, --
homeLost INTEGER null, --
o_ftm INTEGER null, --
franchID TEXT null, --
tmID TEXT not null, --
awayWon INTEGER null, --
primary key (year, tmID),
o_fgm INTEGER null, --
year INTEGER not null, --
awayLost INTEGER null, --
arena TEXT null, --
confID TEXT null, -- Example Values: `EC`, `WC` | Value Statics: Total count 1064 - Distinct count 2 - Null count 472
games INTEGER null, --
lost INTEGER null, --
divID TEXT null, -- Example Values: `EA`, `WE`, `ED`, `WD`, `SO` | Value Statics: Total count 1498 - Distinct count 13 - Null count 38
lgID TEXT null, -- Example Values: `NBL`, `NBA`, `PBLA`, `NPBL`, `ABL1` | Value Statics: Total count 1536 - Distinct count 6 - Null count 0
homeWon INTEGER null, --
confRank INTEGER null, -- Example Values: `0`, `4`, `3`, `5`, `7` | Value Statics: Total count 1536 - Distinct count 16 - Null count 0
o_pts INTEGER null, --
`rank` INTEGER null, -- Example Values: `1`, `2`, `4`, `5`, `6` | Value Statics: Total count 1536 - Distinct count 10 - Null count 0
playoff TEXT null, -- Example Values: `CF`, `WC`, `LC`, `CS`, `F` | Value Statics: Total count 901 - Distinct count 15 - Null count 635
won INTEGER null, --
);
CREATE TABLE coaches
(
primary key (coachID, year, tmID, stint),
lgID TEXT null, -- Example Values: `NBA`, `ABA`, `ABL1`, `PBLA`, `NPBL` | Value Statics: Total count 1689 - Distinct count 5 - Null count 0
post_losses INTEGER null, -- Example Values: `3`, `9`, `7`, `8`, `0` | Value Statics: Total count 1649 - Distinct count 12 - Null count 40
year INTEGER not null, --
won INTEGER null, --
foreign key (tmID, year) references teams (tmID, year) on update cascade on delete cascade,
post_wins INTEGER null, -- Example Values: `0`, `12`, `9`, `13`, `1` | Value Statics: Total count 1649 - Distinct count 17 - Null count 40
coachID TEXT not null, --
tmID TEXT not null, --
lost INTEGER null, --
stint INTEGER not null, -- Example Values: `2`, `1`, `4`, `5`, `3` | Value Statics: Total count 1689 - Distinct count 5 - Null count 0
); |
professional_basketball | Which team that didn't play in playoffs had the most total rebounds in the year 1997? | didn't play in playoffs refers to PostGP = 0; in the year 1997 refers to year = 1997; the most total rebounds refers to max(o_tmRebound) | SELECT T2.tmID FROM players_teams AS T1 INNER JOIN teams AS T2 ON T1.tmID = T2.tmID AND T1.year = T2.year WHERE T1.PostGP = 0 AND T1.year = 1997 ORDER BY T1.rebounds DESC LIMIT 1 | CREATE TABLE players_teams
(
PostGS INTEGER, --
PostdRebounds INTEGER, --
PostPF INTEGER, --
tmID TEXT, --
threeAttempted INTEGER, --
PostRebounds INTEGER, --
assists INTEGER, --
threeMade INTEGER, --
PostBlocks INTEGER, --
PostTurnovers INTEGER, --
GP INTEGER, --
lgID TEXT, -- Example Values: `NBA`, `NBL`, `ABA`, `ABL1`, `NPBL` | Value Statics: Total count 23751 - Distinct count 6 - Null count 0
foreign key (tmID, year) references teams (tmID, year) on update cascade on delete cascade,
PostfgMade INTEGER, --
steals INTEGER, --
oRebounds INTEGER, --
PostftAttempted INTEGER, --
ftAttempted INTEGER, --
ftMade INTEGER, --
points INTEGER, --
PostfgAttempted INTEGER, --
PostftMade INTEGER, --
note TEXT, -- Example Values: `C` | Value Statics: Total count 43 - Distinct count 1 - Null count 23708
dRebounds INTEGER, --
PostSteals INTEGER, --
blocks INTEGER, --
PostAssists INTEGER, --
minutes INTEGER, --
fgAttempted INTEGER, --
playerID TEXT not null references players on update cascade on delete cascade, --
PostthreeMade INTEGER, --
PostPoints INTEGER, --
year INTEGER, --
PF INTEGER, --
fgMade INTEGER, --
PostthreeAttempted INTEGER, --
rebounds INTEGER, --
id INTEGER primary key autoincrement,
stint INTEGER, -- Example Values: `1`, `2`, `0`, `3`, `4` | Value Statics: Total count 23751 - Distinct count 6 - Null count 0
PostMinutes INTEGER, --
PostGP INTEGER, --
turnovers INTEGER, --
PostoRebounds INTEGER, --
GS INTEGER, --
);
CREATE TABLE awards_coaches
(
award TEXT, -- Example Values: `NBA Coach of the Year`, `ABA Coach of the Year` | Value Statics: Total count 61 - Distinct count 2 - Null count 0
id INTEGER primary key autoincrement,
note TEXT, -- Example Values: `tie` | Value Statics: Total count 4 - Distinct count 1 - Null count 57
coachID TEXT, --
lgID TEXT, -- Example Values: `NBA`, `ABA` | Value Statics: Total count 61 - Distinct count 2 - Null count 0
foreign key (coachID, year) references coaches (coachID, year) on update cascade on delete cascade,
year INTEGER, --
);
CREATE TABLE draft
(
draftOverall INTEGER null, --
lgID TEXT null, -- Example Values: `ABA`, `NBA` | Value Statics: Total count 8621 - Distinct count 2 - Null count 0
suffixName TEXT null, -- Example Values: `Jr.` | Value Statics: Total count 2 - Distinct count 1 - Null count 8619
draftYear INTEGER null, --
draftSelection INTEGER null, --
tmID TEXT null, --
draftRound INTEGER null, --
lastName TEXT null, --
playerID TEXT null, --
draftFrom TEXT null, --
id INTEGER default 0 not null primary key,
firstName TEXT null, --
foreign key (tmID, draftYear) references teams (tmID, year) on update cascade on delete cascade,
foreign key (tmID, draftYear) references teams (tmID, year) on update cascade on delete cascade,
);
CREATE TABLE player_allstar
(
rebounds INTEGER null, --
playerID TEXT not null, --
season_id INTEGER not null, --
assists INTEGER null, --
conference TEXT null, -- Example Values: `East`, `West`, `Weset`, `Allstars`, `Denver` | Value Statics: Total count 1608 - Distinct count 5 - Null count 0
points INTEGER null, --
personal_fouls INTEGER null, -- Example Values: `3`, `2`, `0`, `1`, `5` | Value Statics: Total count 540 - Distinct count 8 - Null count 1068
ft_attempted INTEGER null, -- Example Values: `2`, `4`, `0`, `6`, `3` | Value Statics: Total count 1561 - Distinct count 17 - Null count 47
fg_attempted INTEGER null, --
league_id TEXT null, -- Example Values: `NBA`, `ABA` | Value Statics: Total count 1608 - Distinct count 2 - Null count 0
foreign key (playerID) references players (playerID) on update cascade on delete cascade,
fg_made INTEGER null, -- Example Values: `4`, `8`, `5`, `7`, `3` | Value Statics: Total count 1561 - Distinct count 18 - Null count 47
ft_made INTEGER null, -- Example Values: `2`, `3`, `0`, `1`, `4` | Value Statics: Total count 1561 - Distinct count 13 - Null count 47
steals INTEGER null, -- Example Values: `3`, `0`, `1`, `2`, `5` | Value Statics: Total count 398 - Distinct count 7 - Null count 1210
games_played INTEGER null, -- Example Values: `1` | Value Statics: Total count 1608 - Distinct count 1 - Null count 0
first_name TEXT null, --
d_rebounds INTEGER null, -- Example Values: `2`, `5`, `0`, `1`, `4` | Value Statics: Total count 493 - Distinct count 14 - Null count 1115
last_name TEXT null, --
primary key (playerID, season_id),
turnovers INTEGER null, -- Example Values: `1`, `0`, `3`, `2`, `4` | Value Statics: Total count 493 - Distinct count 9 - Null count 1115
three_made INTEGER null, -- Example Values: `0`, `1`, `3`, `5`, `4` | Value Statics: Total count 566 - Distinct count 7 - Null count 1042
minutes INTEGER null, --
blocks INTEGER null, -- Example Values: `2`, `0`, `1`, `3`, `5` | Value Statics: Total count 398 - Distinct count 6 - Null count 1210
three_attempted INTEGER null, -- Example Values: `0`, `1`, `6`, `7`, `10` | Value Statics: Total count 540 - Distinct count 12 - Null count 1068
o_rebounds INTEGER null, -- Example Values: `1`, `2`, `0`, `3`, `4` | Value Statics: Total count 493 - Distinct count 10 - Null count 1115
);
CREATE TABLE awards_players
(
foreign key (playerID) references players (playerID) on update cascade on delete cascade,
year INTEGER not null, --
pos TEXT null, -- Example Values: `C`, `F`, `G`, `F/G`, `F/C` | Value Statics: Total count 833 - Distinct count 5 - Null count 886
primary key (playerID, year, award),
lgID TEXT null, -- Example Values: `NBA`, `ABA`, `NBL`, `ABL1` | Value Statics: Total count 1719 - Distinct count 4 - Null count 0
award TEXT not null, --
playerID TEXT not null, --
note TEXT null, -- Example Values: `tie` | Value Statics: Total count 37 - Distinct count 1 - Null count 1682
);
CREATE TABLE series_post
(
tmIDLoser TEXT, --
id INTEGER primary key autoincrement,
series TEXT, -- Example Values: `O`, `M`, `N`, `A`, `K` | Value Statics: Total count 775 - Distinct count 11 - Null count 0
tmIDWinner TEXT, --
round TEXT, -- Example Values: `F`, `QF`, `SF`, `DT`, `DF` | Value Statics: Total count 775 - Distinct count 11 - Null count 0
year INTEGER, --
foreign key (tmIDLoser, year) references teams (tmID, year) on update cascade on delete cascade,
foreign key (tmIDWinner, year) references teams (tmID, year) on update cascade on delete cascade,
W INTEGER, -- Example Values: `4`, `2`, `1`, `3`, `0` | Value Statics: Total count 775 - Distinct count 5 - Null count 0
lgIDLoser TEXT, -- Example Values: `NBA`, `ABA` | Value Statics: Total count 775 - Distinct count 2 - Null count 0
lgIDWinner TEXT, -- Example Values: `NBA`, `ABA` | Value Statics: Total count 775 - Distinct count 2 - Null count 0
L INTEGER, -- Example Values: `1`, `0`, `2`, `3`, `4` | Value Statics: Total count 775 - Distinct count 5 - Null count 0
);
CREATE TABLE players
(
nameGiven TEXT null, -- Example Values: `nameGiven`, `Mort`, `Robert`, `Jim`, `Mike` | Value Statics: Total count 10 - Distinct count 9 - Null count 5052
lastseason INTEGER null, -- Example Values: `0`, `1951` | Value Statics: Total count 5047 - Distinct count 2 - Null count 15
hsCountry TEXT null, --
firstName TEXT null, --
hsCity TEXT null, --
firstseason INTEGER null, -- Example Values: `0`, `1951` | Value Statics: Total count 5047 - Distinct count 2 - Null count 15
weight INTEGER null, --
birthCountry TEXT null, --
race TEXT null, -- Example Values: `B`, `W`, `O`, `1`, `r` | Value Statics: Total count 4903 - Distinct count 5 - Null count 159
lastName TEXT null, --
birthDate DATE null, --
collegeOther TEXT null, --
birthState TEXT null, --
useFirst TEXT null, --
pos TEXT null, -- Example Values: `F-C`, `C`, `G`, `G-F`, `C-F` | Value Statics: Total count 4880 - Distinct count 14 - Null count 182
playerID TEXT not null primary key,
college TEXT null, --
highSchool TEXT null, --
hsState TEXT null, --
height REAL null, --
deathDate DATE null, --
nameSuffix TEXT null, -- Example Values: `Jr.`, `III`, `nameSuffix`, `II`, `IV` | Value Statics: Total count 324 - Distinct count 6 - Null count 4738
nameNick TEXT null, --
fullGivenName TEXT null, --
birthCity TEXT null, --
middleName TEXT null, --
);
CREATE TABLE teams
(
d_pts INTEGER null, --
name TEXT null, --
homeLost INTEGER null, --
o_ftm INTEGER null, --
franchID TEXT null, --
tmID TEXT not null, --
awayWon INTEGER null, --
primary key (year, tmID),
o_fgm INTEGER null, --
year INTEGER not null, --
awayLost INTEGER null, --
arena TEXT null, --
confID TEXT null, -- Example Values: `EC`, `WC` | Value Statics: Total count 1064 - Distinct count 2 - Null count 472
games INTEGER null, --
lost INTEGER null, --
divID TEXT null, -- Example Values: `EA`, `WE`, `ED`, `WD`, `SO` | Value Statics: Total count 1498 - Distinct count 13 - Null count 38
lgID TEXT null, -- Example Values: `NBL`, `NBA`, `PBLA`, `NPBL`, `ABL1` | Value Statics: Total count 1536 - Distinct count 6 - Null count 0
homeWon INTEGER null, --
confRank INTEGER null, -- Example Values: `0`, `4`, `3`, `5`, `7` | Value Statics: Total count 1536 - Distinct count 16 - Null count 0
o_pts INTEGER null, --
`rank` INTEGER null, -- Example Values: `1`, `2`, `4`, `5`, `6` | Value Statics: Total count 1536 - Distinct count 10 - Null count 0
playoff TEXT null, -- Example Values: `CF`, `WC`, `LC`, `CS`, `F` | Value Statics: Total count 901 - Distinct count 15 - Null count 635
won INTEGER null, --
);
CREATE TABLE coaches
(
primary key (coachID, year, tmID, stint),
lgID TEXT null, -- Example Values: `NBA`, `ABA`, `ABL1`, `PBLA`, `NPBL` | Value Statics: Total count 1689 - Distinct count 5 - Null count 0
post_losses INTEGER null, -- Example Values: `3`, `9`, `7`, `8`, `0` | Value Statics: Total count 1649 - Distinct count 12 - Null count 40
year INTEGER not null, --
won INTEGER null, --
foreign key (tmID, year) references teams (tmID, year) on update cascade on delete cascade,
post_wins INTEGER null, -- Example Values: `0`, `12`, `9`, `13`, `1` | Value Statics: Total count 1649 - Distinct count 17 - Null count 40
coachID TEXT not null, --
tmID TEXT not null, --
lost INTEGER null, --
stint INTEGER not null, -- Example Values: `2`, `1`, `4`, `5`, `3` | Value Statics: Total count 1689 - Distinct count 5 - Null count 0
); |
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 | CREATE TABLE current
(
gender_bio TEXT, -- Example Values: `M`, `F` | Value Statics: Total count 541 - Distinct count 2 - Null count 0
suffix_name TEXT, -- Example Values: `Jr.`, `III`, `II` | Value Statics: Total count 20 - Distinct count 3 - Null count 521
house_history_id REAL, --
birthday_bio DATE, --
nickname_name TEXT, --
religion_bio TEXT, --
google_entity_id_id TEXT, --
govtrack_id INTEGER, --
cspan_id REAL, --
primary key (bioguide_id, cspan_id),
wikipedia_id TEXT, --
maplight_id REAL, --
last_name TEXT, --
icpsr_id REAL, --
fec_id TEXT, --
votesmart_id REAL, --
first_name TEXT, --
lis_id TEXT, --
bioguide_id TEXT, --
wikidata_id TEXT, --
middle_name TEXT, --
ballotpedia_id TEXT, --
opensecrets_id TEXT, --
official_full_name TEXT, --
thomas_id INTEGER, --
);
CREATE TABLE historical
(
fec_id TEXT, --
suffix_name TEXT, -- Example Values: `Jr.`, `Sr.`, `II`, `III`, `IV` | Value Statics: Total count 418 - Distinct count 5 - Null count 11446
govtrack_id INTEGER, --
house_history_id REAL, --
opensecrets_id TEXT, --
votesmart_id TEXT, --
bioguide_id TEXT primary key,
nickname_name TEXT, --
official_full_name TEXT, --
house_history_alternate_id TEXT, -- Example Values: `13283.0` | Value Statics: Total count 1 - Distinct count 1 - Null count 11863
gender_bio TEXT, -- Example Values: `M`, `F` | Value Statics: Total count 11864 - Distinct count 2 - Null count 0
bioguide_previous_id TEXT, -- Example Values: `['F000246']`, `['L000266']`, `['W000790']` | Value Statics: Total count 3 - Distinct count 3 - Null count 11861
icpsr_id REAL, --
wikipedia_id TEXT, --
birthday_bio TEXT, --
religion_bio TEXT, --
lis_id TEXT, --
middle_name TEXT, --
cspan_id TEXT, --
last_name TEXT, --
first_name TEXT, --
wikidata_id TEXT, --
thomas_id TEXT, --
ballotpedia_id TEXT, --
maplight_id TEXT, --
google_entity_id_id TEXT, --
);
CREATE TABLE historical-terms
(
bioguide TEXT primary key,
middle TEXT, --
title TEXT, -- Example Values: `Majority Leader`, `Speaker` | Value Statics: Total count 3 - Distinct count 2 - Null count 11861
party TEXT, --
type TEXT, -- Example Values: `sen`, `rep` | Value Statics: Total count 11858 - Distinct count 2 - Null count 6
phone TEXT, --
rss_url TEXT, -- Example Values: `http://radel.house.gov/news/rss.aspx`, `http://www.begich.senate.gov/public/?a=rss.feed`, `http://www.hagan.senate.gov/rss`, `http://negretemcleod.house.gov/rss.xml`, `http://garcia.house.gov/rss.xml` | Value Statics: Total count 12 - Distinct count 12 - Null count 11852
name TEXT, --
start TEXT, --
address TEXT, --
party_affiliations TEXT, -- Example Values: `{'start': '2009-01-06', 'end': '2009-12-22', 'party': 'Democrat'}`, `{'start': '2003-01-07', 'end': '2004-08-09', 'party': 'Democrat'}` | Value Statics: Total count 2 - Distinct count 2 - Null count 11862
relation TEXT, --
state_rank TEXT, -- Example Values: `junior`, `senior` | Value Statics: Total count 7 - Distinct count 2 - Null count 11857
last TEXT, -- Example Values: `Levy`, `Lambert`, `Bono` | Value Statics: Total count 3 - Distinct count 3 - Null count 11861
url TEXT, --
fax TEXT, --
contact_form TEXT, --
office TEXT, --
state TEXT, --
foreign key (bioguide) references historical(bioguide_id),
class REAL, -- Example Values: `2.0`, `1.0`, `3.0` | Value Statics: Total count 1256 - Distinct count 3 - Null count 10608
end TEXT, --
district REAL, --
chamber TEXT, -- Example Values: `house`, `senate` | Value Statics: Total count 3 - Distinct count 2 - Null count 11861
);
CREATE TABLE current-terms
(
foreign key (bioguide) references current(bioguide_id),
phone TEXT, --
party_affiliations TEXT, -- Example Values: `{'start': '2009-01-06', 'end': '2009-02-23', 'party': 'Independent'}`, `{'start': '1993-01-05', 'end': '1994-11-09', 'party': 'Democrat'}` | Value Statics: Total count 2 - Distinct count 2 - Null count 3076
title TEXT, -- Example Values: `Minority Whip`, `Majority Whip`, `Minority Leader`, `Majority Leader`, `Speaker` | Value Statics: Total count 28 - Distinct count 5 - Null count 3050
district REAL, --
bioguide TEXT, --
office TEXT, --
class REAL, -- Example Values: `1.0`, `2.0`, `3.0` | Value Statics: Total count 244 - Distinct count 3 - Null count 2834
type TEXT, -- Example Values: `rep`, `sen` | Value Statics: Total count 3014 - Distinct count 2 - Null count 64
start TEXT, --
address TEXT, --
rss_url TEXT, --
url TEXT, --
primary key (bioguide, end),
fax TEXT, --
chamber TEXT, -- Example Values: `senate`, `house` | Value Statics: Total count 28 - Distinct count 2 - Null count 3050
end TEXT, --
caucus TEXT, -- Example Values: `Democrat` | Value Statics: Total count 3 - Distinct count 1 - Null count 3075
state TEXT, --
last TEXT, -- Example Values: `Menendez` | Value Statics: Total count 1 - Distinct count 1 - Null count 3077
relation TEXT, -- Example Values: `son`, `nephew`, `cousin`, `daughter`, `grandson` | Value Statics: Total count 35 - Distinct count 13 - Null count 3043
state_rank TEXT, -- Example Values: `senior`, `junior` | Value Statics: Total count 147 - Distinct count 2 - Null count 2931
name TEXT, --
contact_form TEXT, --
party TEXT, -- Example Values: `Democrat`, `Republican`, `Independent` | Value Statics: Total count 3014 - Distinct count 3 - Null count 64
);
CREATE TABLE social-media
(
foreign key (bioguide) references current(bioguide_id),
instagram TEXT, --
thomas INTEGER, --
youtube TEXT, --
twitter TEXT, --
facebook TEXT, --
youtube_id TEXT, --
twitter_id REAL, --
facebook_id REAL, --
govtrack REAL, --
bioguide TEXT primary key,
instagram_id REAL, --
); |
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' | CREATE TABLE current
(
gender_bio TEXT, -- Example Values: `M`, `F` | Value Statics: Total count 541 - Distinct count 2 - Null count 0
suffix_name TEXT, -- Example Values: `Jr.`, `III`, `II` | Value Statics: Total count 20 - Distinct count 3 - Null count 521
house_history_id REAL, --
birthday_bio DATE, --
nickname_name TEXT, --
religion_bio TEXT, --
google_entity_id_id TEXT, --
govtrack_id INTEGER, --
cspan_id REAL, --
primary key (bioguide_id, cspan_id),
wikipedia_id TEXT, --
maplight_id REAL, --
last_name TEXT, --
icpsr_id REAL, --
fec_id TEXT, --
votesmart_id REAL, --
first_name TEXT, --
lis_id TEXT, --
bioguide_id TEXT, --
wikidata_id TEXT, --
middle_name TEXT, --
ballotpedia_id TEXT, --
opensecrets_id TEXT, --
official_full_name TEXT, --
thomas_id INTEGER, --
);
CREATE TABLE historical
(
fec_id TEXT, --
suffix_name TEXT, -- Example Values: `Jr.`, `Sr.`, `II`, `III`, `IV` | Value Statics: Total count 418 - Distinct count 5 - Null count 11446
govtrack_id INTEGER, --
house_history_id REAL, --
opensecrets_id TEXT, --
votesmart_id TEXT, --
bioguide_id TEXT primary key,
nickname_name TEXT, --
official_full_name TEXT, --
house_history_alternate_id TEXT, -- Example Values: `13283.0` | Value Statics: Total count 1 - Distinct count 1 - Null count 11863
gender_bio TEXT, -- Example Values: `M`, `F` | Value Statics: Total count 11864 - Distinct count 2 - Null count 0
bioguide_previous_id TEXT, -- Example Values: `['F000246']`, `['L000266']`, `['W000790']` | Value Statics: Total count 3 - Distinct count 3 - Null count 11861
icpsr_id REAL, --
wikipedia_id TEXT, --
birthday_bio TEXT, --
religion_bio TEXT, --
lis_id TEXT, --
middle_name TEXT, --
cspan_id TEXT, --
last_name TEXT, --
first_name TEXT, --
wikidata_id TEXT, --
thomas_id TEXT, --
ballotpedia_id TEXT, --
maplight_id TEXT, --
google_entity_id_id TEXT, --
);
CREATE TABLE historical-terms
(
bioguide TEXT primary key,
middle TEXT, --
title TEXT, -- Example Values: `Majority Leader`, `Speaker` | Value Statics: Total count 3 - Distinct count 2 - Null count 11861
party TEXT, --
type TEXT, -- Example Values: `sen`, `rep` | Value Statics: Total count 11858 - Distinct count 2 - Null count 6
phone TEXT, --
rss_url TEXT, -- Example Values: `http://radel.house.gov/news/rss.aspx`, `http://www.begich.senate.gov/public/?a=rss.feed`, `http://www.hagan.senate.gov/rss`, `http://negretemcleod.house.gov/rss.xml`, `http://garcia.house.gov/rss.xml` | Value Statics: Total count 12 - Distinct count 12 - Null count 11852
name TEXT, --
start TEXT, --
address TEXT, --
party_affiliations TEXT, -- Example Values: `{'start': '2009-01-06', 'end': '2009-12-22', 'party': 'Democrat'}`, `{'start': '2003-01-07', 'end': '2004-08-09', 'party': 'Democrat'}` | Value Statics: Total count 2 - Distinct count 2 - Null count 11862
relation TEXT, --
state_rank TEXT, -- Example Values: `junior`, `senior` | Value Statics: Total count 7 - Distinct count 2 - Null count 11857
last TEXT, -- Example Values: `Levy`, `Lambert`, `Bono` | Value Statics: Total count 3 - Distinct count 3 - Null count 11861
url TEXT, --
fax TEXT, --
contact_form TEXT, --
office TEXT, --
state TEXT, --
foreign key (bioguide) references historical(bioguide_id),
class REAL, -- Example Values: `2.0`, `1.0`, `3.0` | Value Statics: Total count 1256 - Distinct count 3 - Null count 10608
end TEXT, --
district REAL, --
chamber TEXT, -- Example Values: `house`, `senate` | Value Statics: Total count 3 - Distinct count 2 - Null count 11861
);
CREATE TABLE current-terms
(
foreign key (bioguide) references current(bioguide_id),
phone TEXT, --
party_affiliations TEXT, -- Example Values: `{'start': '2009-01-06', 'end': '2009-02-23', 'party': 'Independent'}`, `{'start': '1993-01-05', 'end': '1994-11-09', 'party': 'Democrat'}` | Value Statics: Total count 2 - Distinct count 2 - Null count 3076
title TEXT, -- Example Values: `Minority Whip`, `Majority Whip`, `Minority Leader`, `Majority Leader`, `Speaker` | Value Statics: Total count 28 - Distinct count 5 - Null count 3050
district REAL, --
bioguide TEXT, --
office TEXT, --
class REAL, -- Example Values: `1.0`, `2.0`, `3.0` | Value Statics: Total count 244 - Distinct count 3 - Null count 2834
type TEXT, -- Example Values: `rep`, `sen` | Value Statics: Total count 3014 - Distinct count 2 - Null count 64
start TEXT, --
address TEXT, --
rss_url TEXT, --
url TEXT, --
primary key (bioguide, end),
fax TEXT, --
chamber TEXT, -- Example Values: `senate`, `house` | Value Statics: Total count 28 - Distinct count 2 - Null count 3050
end TEXT, --
caucus TEXT, -- Example Values: `Democrat` | Value Statics: Total count 3 - Distinct count 1 - Null count 3075
state TEXT, --
last TEXT, -- Example Values: `Menendez` | Value Statics: Total count 1 - Distinct count 1 - Null count 3077
relation TEXT, -- Example Values: `son`, `nephew`, `cousin`, `daughter`, `grandson` | Value Statics: Total count 35 - Distinct count 13 - Null count 3043
state_rank TEXT, -- Example Values: `senior`, `junior` | Value Statics: Total count 147 - Distinct count 2 - Null count 2931
name TEXT, --
contact_form TEXT, --
party TEXT, -- Example Values: `Democrat`, `Republican`, `Independent` | Value Statics: Total count 3014 - Distinct count 3 - Null count 64
);
CREATE TABLE social-media
(
foreign key (bioguide) references current(bioguide_id),
instagram TEXT, --
thomas INTEGER, --
youtube TEXT, --
twitter TEXT, --
facebook TEXT, --
youtube_id TEXT, --
twitter_id REAL, --
facebook_id REAL, --
govtrack REAL, --
bioguide TEXT primary key,
instagram_id REAL, --
); |
shakespeare | Please give the title of the work of Shakespeare that has the most characters. | most characters refers to max(count(character_id)) | SELECT T.Title FROM ( SELECT T1.Title, COUNT(T3.character_id) AS num FROM works T1 INNER JOIN chapters T2 ON T1.id = T2.work_id INNER JOIN paragraphs T3 ON T2.id = T3.chapter_id INNER JOIN characters T4 ON T3.character_id = T4.id GROUP BY T3.character_id, T1.Title ) T ORDER BY T.num DESC LIMIT 1 | CREATE TABLE characters
(
CharName TEXT not null, --
Abbrev TEXT not null, --
Description TEXT not null, --
id INTEGER primary key autoincrement,
);
CREATE TABLE paragraphs
(
chapter_id INTEGER default 0 not null references chapters, --
character_id INTEGER not null references characters, --
ParagraphNum INTEGER not null, --
PlainText TEXT not null, --
id INTEGER primary key autoincrement,
);
CREATE TABLE works
(
GenreType TEXT not null, -- Example Values: `Comedy`, `Tragedy`, `History`, `Poem`, `Sonnet` | Value Statics: Total count 43 - Distinct count 5 - Null count 0
Title TEXT not null, --
Date INTEGER not null, --
id INTEGER primary key autoincrement,
LongTitle TEXT not null, --
);
CREATE TABLE chapters
(
work_id INTEGER not null references works, --
Act INTEGER not null, -- Example Values: `1`, `2`, `3`, `4`, `5` | Value Statics: Total count 945 - Distinct count 6 - Null count 0
Description TEXT not null, --
id INTEGER primary key autoincrement,
Scene INTEGER not null, --
); |
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 | CREATE TABLE current
(
gender_bio TEXT, -- Example Values: `M`, `F` | Value Statics: Total count 541 - Distinct count 2 - Null count 0
suffix_name TEXT, -- Example Values: `Jr.`, `III`, `II` | Value Statics: Total count 20 - Distinct count 3 - Null count 521
house_history_id REAL, --
birthday_bio DATE, --
nickname_name TEXT, --
religion_bio TEXT, --
google_entity_id_id TEXT, --
govtrack_id INTEGER, --
cspan_id REAL, --
primary key (bioguide_id, cspan_id),
wikipedia_id TEXT, --
maplight_id REAL, --
last_name TEXT, --
icpsr_id REAL, --
fec_id TEXT, --
votesmart_id REAL, --
first_name TEXT, --
lis_id TEXT, --
bioguide_id TEXT, --
wikidata_id TEXT, --
middle_name TEXT, --
ballotpedia_id TEXT, --
opensecrets_id TEXT, --
official_full_name TEXT, --
thomas_id INTEGER, --
);
CREATE TABLE historical
(
fec_id TEXT, --
suffix_name TEXT, -- Example Values: `Jr.`, `Sr.`, `II`, `III`, `IV` | Value Statics: Total count 418 - Distinct count 5 - Null count 11446
govtrack_id INTEGER, --
house_history_id REAL, --
opensecrets_id TEXT, --
votesmart_id TEXT, --
bioguide_id TEXT primary key,
nickname_name TEXT, --
official_full_name TEXT, --
house_history_alternate_id TEXT, -- Example Values: `13283.0` | Value Statics: Total count 1 - Distinct count 1 - Null count 11863
gender_bio TEXT, -- Example Values: `M`, `F` | Value Statics: Total count 11864 - Distinct count 2 - Null count 0
bioguide_previous_id TEXT, -- Example Values: `['F000246']`, `['L000266']`, `['W000790']` | Value Statics: Total count 3 - Distinct count 3 - Null count 11861
icpsr_id REAL, --
wikipedia_id TEXT, --
birthday_bio TEXT, --
religion_bio TEXT, --
lis_id TEXT, --
middle_name TEXT, --
cspan_id TEXT, --
last_name TEXT, --
first_name TEXT, --
wikidata_id TEXT, --
thomas_id TEXT, --
ballotpedia_id TEXT, --
maplight_id TEXT, --
google_entity_id_id TEXT, --
);
CREATE TABLE historical-terms
(
bioguide TEXT primary key,
middle TEXT, --
title TEXT, -- Example Values: `Majority Leader`, `Speaker` | Value Statics: Total count 3 - Distinct count 2 - Null count 11861
party TEXT, --
type TEXT, -- Example Values: `sen`, `rep` | Value Statics: Total count 11858 - Distinct count 2 - Null count 6
phone TEXT, --
rss_url TEXT, -- Example Values: `http://radel.house.gov/news/rss.aspx`, `http://www.begich.senate.gov/public/?a=rss.feed`, `http://www.hagan.senate.gov/rss`, `http://negretemcleod.house.gov/rss.xml`, `http://garcia.house.gov/rss.xml` | Value Statics: Total count 12 - Distinct count 12 - Null count 11852
name TEXT, --
start TEXT, --
address TEXT, --
party_affiliations TEXT, -- Example Values: `{'start': '2009-01-06', 'end': '2009-12-22', 'party': 'Democrat'}`, `{'start': '2003-01-07', 'end': '2004-08-09', 'party': 'Democrat'}` | Value Statics: Total count 2 - Distinct count 2 - Null count 11862
relation TEXT, --
state_rank TEXT, -- Example Values: `junior`, `senior` | Value Statics: Total count 7 - Distinct count 2 - Null count 11857
last TEXT, -- Example Values: `Levy`, `Lambert`, `Bono` | Value Statics: Total count 3 - Distinct count 3 - Null count 11861
url TEXT, --
fax TEXT, --
contact_form TEXT, --
office TEXT, --
state TEXT, --
foreign key (bioguide) references historical(bioguide_id),
class REAL, -- Example Values: `2.0`, `1.0`, `3.0` | Value Statics: Total count 1256 - Distinct count 3 - Null count 10608
end TEXT, --
district REAL, --
chamber TEXT, -- Example Values: `house`, `senate` | Value Statics: Total count 3 - Distinct count 2 - Null count 11861
);
CREATE TABLE current-terms
(
foreign key (bioguide) references current(bioguide_id),
phone TEXT, --
party_affiliations TEXT, -- Example Values: `{'start': '2009-01-06', 'end': '2009-02-23', 'party': 'Independent'}`, `{'start': '1993-01-05', 'end': '1994-11-09', 'party': 'Democrat'}` | Value Statics: Total count 2 - Distinct count 2 - Null count 3076
title TEXT, -- Example Values: `Minority Whip`, `Majority Whip`, `Minority Leader`, `Majority Leader`, `Speaker` | Value Statics: Total count 28 - Distinct count 5 - Null count 3050
district REAL, --
bioguide TEXT, --
office TEXT, --
class REAL, -- Example Values: `1.0`, `2.0`, `3.0` | Value Statics: Total count 244 - Distinct count 3 - Null count 2834
type TEXT, -- Example Values: `rep`, `sen` | Value Statics: Total count 3014 - Distinct count 2 - Null count 64
start TEXT, --
address TEXT, --
rss_url TEXT, --
url TEXT, --
primary key (bioguide, end),
fax TEXT, --
chamber TEXT, -- Example Values: `senate`, `house` | Value Statics: Total count 28 - Distinct count 2 - Null count 3050
end TEXT, --
caucus TEXT, -- Example Values: `Democrat` | Value Statics: Total count 3 - Distinct count 1 - Null count 3075
state TEXT, --
last TEXT, -- Example Values: `Menendez` | Value Statics: Total count 1 - Distinct count 1 - Null count 3077
relation TEXT, -- Example Values: `son`, `nephew`, `cousin`, `daughter`, `grandson` | Value Statics: Total count 35 - Distinct count 13 - Null count 3043
state_rank TEXT, -- Example Values: `senior`, `junior` | Value Statics: Total count 147 - Distinct count 2 - Null count 2931
name TEXT, --
contact_form TEXT, --
party TEXT, -- Example Values: `Democrat`, `Republican`, `Independent` | Value Statics: Total count 3014 - Distinct count 3 - Null count 64
);
CREATE TABLE social-media
(
foreign key (bioguide) references current(bioguide_id),
instagram TEXT, --
thomas INTEGER, --
youtube TEXT, --
twitter TEXT, --
facebook TEXT, --
youtube_id TEXT, --
twitter_id REAL, --
facebook_id REAL, --
govtrack REAL, --
bioguide TEXT primary key,
instagram_id REAL, --
); |
legislator | What is the average number of terms served for a current legislator that's famous or impact? | average = DIVIDE(COUNT(bioguide), COUNT(bioguide_id)); legislator that's famous or impact refers to wikipedia_id is not null; | SELECT CAST(COUNT(T2.bioguide) AS REAL) / COUNT(DISTINCT T1.bioguide_id) FROM current AS T1 INNER JOIN `current-terms` AS T2 ON T1.bioguide_id = T2.bioguide WHERE T1.wikipedia_id IS NOT NULL | CREATE TABLE current
(
gender_bio TEXT, -- Example Values: `M`, `F` | Value Statics: Total count 541 - Distinct count 2 - Null count 0
suffix_name TEXT, -- Example Values: `Jr.`, `III`, `II` | Value Statics: Total count 20 - Distinct count 3 - Null count 521
house_history_id REAL, --
birthday_bio DATE, --
nickname_name TEXT, --
religion_bio TEXT, --
google_entity_id_id TEXT, --
govtrack_id INTEGER, --
cspan_id REAL, --
primary key (bioguide_id, cspan_id),
wikipedia_id TEXT, --
maplight_id REAL, --
last_name TEXT, --
icpsr_id REAL, --
fec_id TEXT, --
votesmart_id REAL, --
first_name TEXT, --
lis_id TEXT, --
bioguide_id TEXT, --
wikidata_id TEXT, --
middle_name TEXT, --
ballotpedia_id TEXT, --
opensecrets_id TEXT, --
official_full_name TEXT, --
thomas_id INTEGER, --
);
CREATE TABLE historical
(
fec_id TEXT, --
suffix_name TEXT, -- Example Values: `Jr.`, `Sr.`, `II`, `III`, `IV` | Value Statics: Total count 418 - Distinct count 5 - Null count 11446
govtrack_id INTEGER, --
house_history_id REAL, --
opensecrets_id TEXT, --
votesmart_id TEXT, --
bioguide_id TEXT primary key,
nickname_name TEXT, --
official_full_name TEXT, --
house_history_alternate_id TEXT, -- Example Values: `13283.0` | Value Statics: Total count 1 - Distinct count 1 - Null count 11863
gender_bio TEXT, -- Example Values: `M`, `F` | Value Statics: Total count 11864 - Distinct count 2 - Null count 0
bioguide_previous_id TEXT, -- Example Values: `['F000246']`, `['L000266']`, `['W000790']` | Value Statics: Total count 3 - Distinct count 3 - Null count 11861
icpsr_id REAL, --
wikipedia_id TEXT, --
birthday_bio TEXT, --
religion_bio TEXT, --
lis_id TEXT, --
middle_name TEXT, --
cspan_id TEXT, --
last_name TEXT, --
first_name TEXT, --
wikidata_id TEXT, --
thomas_id TEXT, --
ballotpedia_id TEXT, --
maplight_id TEXT, --
google_entity_id_id TEXT, --
);
CREATE TABLE historical-terms
(
bioguide TEXT primary key,
middle TEXT, --
title TEXT, -- Example Values: `Majority Leader`, `Speaker` | Value Statics: Total count 3 - Distinct count 2 - Null count 11861
party TEXT, --
type TEXT, -- Example Values: `sen`, `rep` | Value Statics: Total count 11858 - Distinct count 2 - Null count 6
phone TEXT, --
rss_url TEXT, -- Example Values: `http://radel.house.gov/news/rss.aspx`, `http://www.begich.senate.gov/public/?a=rss.feed`, `http://www.hagan.senate.gov/rss`, `http://negretemcleod.house.gov/rss.xml`, `http://garcia.house.gov/rss.xml` | Value Statics: Total count 12 - Distinct count 12 - Null count 11852
name TEXT, --
start TEXT, --
address TEXT, --
party_affiliations TEXT, -- Example Values: `{'start': '2009-01-06', 'end': '2009-12-22', 'party': 'Democrat'}`, `{'start': '2003-01-07', 'end': '2004-08-09', 'party': 'Democrat'}` | Value Statics: Total count 2 - Distinct count 2 - Null count 11862
relation TEXT, --
state_rank TEXT, -- Example Values: `junior`, `senior` | Value Statics: Total count 7 - Distinct count 2 - Null count 11857
last TEXT, -- Example Values: `Levy`, `Lambert`, `Bono` | Value Statics: Total count 3 - Distinct count 3 - Null count 11861
url TEXT, --
fax TEXT, --
contact_form TEXT, --
office TEXT, --
state TEXT, --
foreign key (bioguide) references historical(bioguide_id),
class REAL, -- Example Values: `2.0`, `1.0`, `3.0` | Value Statics: Total count 1256 - Distinct count 3 - Null count 10608
end TEXT, --
district REAL, --
chamber TEXT, -- Example Values: `house`, `senate` | Value Statics: Total count 3 - Distinct count 2 - Null count 11861
);
CREATE TABLE current-terms
(
foreign key (bioguide) references current(bioguide_id),
phone TEXT, --
party_affiliations TEXT, -- Example Values: `{'start': '2009-01-06', 'end': '2009-02-23', 'party': 'Independent'}`, `{'start': '1993-01-05', 'end': '1994-11-09', 'party': 'Democrat'}` | Value Statics: Total count 2 - Distinct count 2 - Null count 3076
title TEXT, -- Example Values: `Minority Whip`, `Majority Whip`, `Minority Leader`, `Majority Leader`, `Speaker` | Value Statics: Total count 28 - Distinct count 5 - Null count 3050
district REAL, --
bioguide TEXT, --
office TEXT, --
class REAL, -- Example Values: `1.0`, `2.0`, `3.0` | Value Statics: Total count 244 - Distinct count 3 - Null count 2834
type TEXT, -- Example Values: `rep`, `sen` | Value Statics: Total count 3014 - Distinct count 2 - Null count 64
start TEXT, --
address TEXT, --
rss_url TEXT, --
url TEXT, --
primary key (bioguide, end),
fax TEXT, --
chamber TEXT, -- Example Values: `senate`, `house` | Value Statics: Total count 28 - Distinct count 2 - Null count 3050
end TEXT, --
caucus TEXT, -- Example Values: `Democrat` | Value Statics: Total count 3 - Distinct count 1 - Null count 3075
state TEXT, --
last TEXT, -- Example Values: `Menendez` | Value Statics: Total count 1 - Distinct count 1 - Null count 3077
relation TEXT, -- Example Values: `son`, `nephew`, `cousin`, `daughter`, `grandson` | Value Statics: Total count 35 - Distinct count 13 - Null count 3043
state_rank TEXT, -- Example Values: `senior`, `junior` | Value Statics: Total count 147 - Distinct count 2 - Null count 2931
name TEXT, --
contact_form TEXT, --
party TEXT, -- Example Values: `Democrat`, `Republican`, `Independent` | Value Statics: Total count 3014 - Distinct count 3 - Null count 64
);
CREATE TABLE social-media
(
foreign key (bioguide) references current(bioguide_id),
instagram TEXT, --
thomas INTEGER, --
youtube TEXT, --
twitter TEXT, --
facebook TEXT, --
youtube_id TEXT, --
twitter_id REAL, --
facebook_id REAL, --
govtrack REAL, --
bioguide TEXT primary key,
instagram_id REAL, --
); |
professional_basketball | For the player who was drafted in the 1st round, 6th position in 1976, which team did he play in that year? | drafted in the 1st round refers to draftRound = 1; 6th position refers to draftSelection = 6; in 1976 refers to year = 1976; team refers to tmID | SELECT T2.tmID FROM draft AS T1 INNER JOIN teams AS T2 ON T1.tmID = T2.tmID AND T1.draftYear = T2.year WHERE T1.draftRound = 1 AND T1.draftSelection = 6 AND T1.draftYear = 1976 | CREATE TABLE players_teams
(
PostGS INTEGER, --
PostdRebounds INTEGER, --
PostPF INTEGER, --
tmID TEXT, --
threeAttempted INTEGER, --
PostRebounds INTEGER, --
assists INTEGER, --
threeMade INTEGER, --
PostBlocks INTEGER, --
PostTurnovers INTEGER, --
GP INTEGER, --
lgID TEXT, -- Example Values: `NBA`, `NBL`, `ABA`, `ABL1`, `NPBL` | Value Statics: Total count 23751 - Distinct count 6 - Null count 0
foreign key (tmID, year) references teams (tmID, year) on update cascade on delete cascade,
PostfgMade INTEGER, --
steals INTEGER, --
oRebounds INTEGER, --
PostftAttempted INTEGER, --
ftAttempted INTEGER, --
ftMade INTEGER, --
points INTEGER, --
PostfgAttempted INTEGER, --
PostftMade INTEGER, --
note TEXT, -- Example Values: `C` | Value Statics: Total count 43 - Distinct count 1 - Null count 23708
dRebounds INTEGER, --
PostSteals INTEGER, --
blocks INTEGER, --
PostAssists INTEGER, --
minutes INTEGER, --
fgAttempted INTEGER, --
playerID TEXT not null references players on update cascade on delete cascade, --
PostthreeMade INTEGER, --
PostPoints INTEGER, --
year INTEGER, --
PF INTEGER, --
fgMade INTEGER, --
PostthreeAttempted INTEGER, --
rebounds INTEGER, --
id INTEGER primary key autoincrement,
stint INTEGER, -- Example Values: `1`, `2`, `0`, `3`, `4` | Value Statics: Total count 23751 - Distinct count 6 - Null count 0
PostMinutes INTEGER, --
PostGP INTEGER, --
turnovers INTEGER, --
PostoRebounds INTEGER, --
GS INTEGER, --
);
CREATE TABLE awards_coaches
(
award TEXT, -- Example Values: `NBA Coach of the Year`, `ABA Coach of the Year` | Value Statics: Total count 61 - Distinct count 2 - Null count 0
id INTEGER primary key autoincrement,
note TEXT, -- Example Values: `tie` | Value Statics: Total count 4 - Distinct count 1 - Null count 57
coachID TEXT, --
lgID TEXT, -- Example Values: `NBA`, `ABA` | Value Statics: Total count 61 - Distinct count 2 - Null count 0
foreign key (coachID, year) references coaches (coachID, year) on update cascade on delete cascade,
year INTEGER, --
);
CREATE TABLE draft
(
draftOverall INTEGER null, --
lgID TEXT null, -- Example Values: `ABA`, `NBA` | Value Statics: Total count 8621 - Distinct count 2 - Null count 0
suffixName TEXT null, -- Example Values: `Jr.` | Value Statics: Total count 2 - Distinct count 1 - Null count 8619
draftYear INTEGER null, --
draftSelection INTEGER null, --
tmID TEXT null, --
draftRound INTEGER null, --
lastName TEXT null, --
playerID TEXT null, --
draftFrom TEXT null, --
id INTEGER default 0 not null primary key,
firstName TEXT null, --
foreign key (tmID, draftYear) references teams (tmID, year) on update cascade on delete cascade,
foreign key (tmID, draftYear) references teams (tmID, year) on update cascade on delete cascade,
);
CREATE TABLE player_allstar
(
rebounds INTEGER null, --
playerID TEXT not null, --
season_id INTEGER not null, --
assists INTEGER null, --
conference TEXT null, -- Example Values: `East`, `West`, `Weset`, `Allstars`, `Denver` | Value Statics: Total count 1608 - Distinct count 5 - Null count 0
points INTEGER null, --
personal_fouls INTEGER null, -- Example Values: `3`, `2`, `0`, `1`, `5` | Value Statics: Total count 540 - Distinct count 8 - Null count 1068
ft_attempted INTEGER null, -- Example Values: `2`, `4`, `0`, `6`, `3` | Value Statics: Total count 1561 - Distinct count 17 - Null count 47
fg_attempted INTEGER null, --
league_id TEXT null, -- Example Values: `NBA`, `ABA` | Value Statics: Total count 1608 - Distinct count 2 - Null count 0
foreign key (playerID) references players (playerID) on update cascade on delete cascade,
fg_made INTEGER null, -- Example Values: `4`, `8`, `5`, `7`, `3` | Value Statics: Total count 1561 - Distinct count 18 - Null count 47
ft_made INTEGER null, -- Example Values: `2`, `3`, `0`, `1`, `4` | Value Statics: Total count 1561 - Distinct count 13 - Null count 47
steals INTEGER null, -- Example Values: `3`, `0`, `1`, `2`, `5` | Value Statics: Total count 398 - Distinct count 7 - Null count 1210
games_played INTEGER null, -- Example Values: `1` | Value Statics: Total count 1608 - Distinct count 1 - Null count 0
first_name TEXT null, --
d_rebounds INTEGER null, -- Example Values: `2`, `5`, `0`, `1`, `4` | Value Statics: Total count 493 - Distinct count 14 - Null count 1115
last_name TEXT null, --
primary key (playerID, season_id),
turnovers INTEGER null, -- Example Values: `1`, `0`, `3`, `2`, `4` | Value Statics: Total count 493 - Distinct count 9 - Null count 1115
three_made INTEGER null, -- Example Values: `0`, `1`, `3`, `5`, `4` | Value Statics: Total count 566 - Distinct count 7 - Null count 1042
minutes INTEGER null, --
blocks INTEGER null, -- Example Values: `2`, `0`, `1`, `3`, `5` | Value Statics: Total count 398 - Distinct count 6 - Null count 1210
three_attempted INTEGER null, -- Example Values: `0`, `1`, `6`, `7`, `10` | Value Statics: Total count 540 - Distinct count 12 - Null count 1068
o_rebounds INTEGER null, -- Example Values: `1`, `2`, `0`, `3`, `4` | Value Statics: Total count 493 - Distinct count 10 - Null count 1115
);
CREATE TABLE awards_players
(
foreign key (playerID) references players (playerID) on update cascade on delete cascade,
year INTEGER not null, --
pos TEXT null, -- Example Values: `C`, `F`, `G`, `F/G`, `F/C` | Value Statics: Total count 833 - Distinct count 5 - Null count 886
primary key (playerID, year, award),
lgID TEXT null, -- Example Values: `NBA`, `ABA`, `NBL`, `ABL1` | Value Statics: Total count 1719 - Distinct count 4 - Null count 0
award TEXT not null, --
playerID TEXT not null, --
note TEXT null, -- Example Values: `tie` | Value Statics: Total count 37 - Distinct count 1 - Null count 1682
);
CREATE TABLE series_post
(
tmIDLoser TEXT, --
id INTEGER primary key autoincrement,
series TEXT, -- Example Values: `O`, `M`, `N`, `A`, `K` | Value Statics: Total count 775 - Distinct count 11 - Null count 0
tmIDWinner TEXT, --
round TEXT, -- Example Values: `F`, `QF`, `SF`, `DT`, `DF` | Value Statics: Total count 775 - Distinct count 11 - Null count 0
year INTEGER, --
foreign key (tmIDLoser, year) references teams (tmID, year) on update cascade on delete cascade,
foreign key (tmIDWinner, year) references teams (tmID, year) on update cascade on delete cascade,
W INTEGER, -- Example Values: `4`, `2`, `1`, `3`, `0` | Value Statics: Total count 775 - Distinct count 5 - Null count 0
lgIDLoser TEXT, -- Example Values: `NBA`, `ABA` | Value Statics: Total count 775 - Distinct count 2 - Null count 0
lgIDWinner TEXT, -- Example Values: `NBA`, `ABA` | Value Statics: Total count 775 - Distinct count 2 - Null count 0
L INTEGER, -- Example Values: `1`, `0`, `2`, `3`, `4` | Value Statics: Total count 775 - Distinct count 5 - Null count 0
);
CREATE TABLE players
(
nameGiven TEXT null, -- Example Values: `nameGiven`, `Mort`, `Robert`, `Jim`, `Mike` | Value Statics: Total count 10 - Distinct count 9 - Null count 5052
lastseason INTEGER null, -- Example Values: `0`, `1951` | Value Statics: Total count 5047 - Distinct count 2 - Null count 15
hsCountry TEXT null, --
firstName TEXT null, --
hsCity TEXT null, --
firstseason INTEGER null, -- Example Values: `0`, `1951` | Value Statics: Total count 5047 - Distinct count 2 - Null count 15
weight INTEGER null, --
birthCountry TEXT null, --
race TEXT null, -- Example Values: `B`, `W`, `O`, `1`, `r` | Value Statics: Total count 4903 - Distinct count 5 - Null count 159
lastName TEXT null, --
birthDate DATE null, --
collegeOther TEXT null, --
birthState TEXT null, --
useFirst TEXT null, --
pos TEXT null, -- Example Values: `F-C`, `C`, `G`, `G-F`, `C-F` | Value Statics: Total count 4880 - Distinct count 14 - Null count 182
playerID TEXT not null primary key,
college TEXT null, --
highSchool TEXT null, --
hsState TEXT null, --
height REAL null, --
deathDate DATE null, --
nameSuffix TEXT null, -- Example Values: `Jr.`, `III`, `nameSuffix`, `II`, `IV` | Value Statics: Total count 324 - Distinct count 6 - Null count 4738
nameNick TEXT null, --
fullGivenName TEXT null, --
birthCity TEXT null, --
middleName TEXT null, --
);
CREATE TABLE teams
(
d_pts INTEGER null, --
name TEXT null, --
homeLost INTEGER null, --
o_ftm INTEGER null, --
franchID TEXT null, --
tmID TEXT not null, --
awayWon INTEGER null, --
primary key (year, tmID),
o_fgm INTEGER null, --
year INTEGER not null, --
awayLost INTEGER null, --
arena TEXT null, --
confID TEXT null, -- Example Values: `EC`, `WC` | Value Statics: Total count 1064 - Distinct count 2 - Null count 472
games INTEGER null, --
lost INTEGER null, --
divID TEXT null, -- Example Values: `EA`, `WE`, `ED`, `WD`, `SO` | Value Statics: Total count 1498 - Distinct count 13 - Null count 38
lgID TEXT null, -- Example Values: `NBL`, `NBA`, `PBLA`, `NPBL`, `ABL1` | Value Statics: Total count 1536 - Distinct count 6 - Null count 0
homeWon INTEGER null, --
confRank INTEGER null, -- Example Values: `0`, `4`, `3`, `5`, `7` | Value Statics: Total count 1536 - Distinct count 16 - Null count 0
o_pts INTEGER null, --
`rank` INTEGER null, -- Example Values: `1`, `2`, `4`, `5`, `6` | Value Statics: Total count 1536 - Distinct count 10 - Null count 0
playoff TEXT null, -- Example Values: `CF`, `WC`, `LC`, `CS`, `F` | Value Statics: Total count 901 - Distinct count 15 - Null count 635
won INTEGER null, --
);
CREATE TABLE coaches
(
primary key (coachID, year, tmID, stint),
lgID TEXT null, -- Example Values: `NBA`, `ABA`, `ABL1`, `PBLA`, `NPBL` | Value Statics: Total count 1689 - Distinct count 5 - Null count 0
post_losses INTEGER null, -- Example Values: `3`, `9`, `7`, `8`, `0` | Value Statics: Total count 1649 - Distinct count 12 - Null count 40
year INTEGER not null, --
won INTEGER null, --
foreign key (tmID, year) references teams (tmID, year) on update cascade on delete cascade,
post_wins INTEGER null, -- Example Values: `0`, `12`, `9`, `13`, `1` | Value Statics: Total count 1649 - Distinct count 17 - Null count 40
coachID TEXT not null, --
tmID TEXT not null, --
lost INTEGER null, --
stint INTEGER not null, -- Example Values: `2`, `1`, `4`, `5`, `3` | Value Statics: Total count 1689 - Distinct count 5 - Null count 0
); |
legislator | Provide the address of the legislator with the contact form of http://www.carper.senate.gov/contact/. | null | SELECT address FROM `current-terms` WHERE contact_form = 'http://www.carper.senate.gov/contact/' | CREATE TABLE current
(
gender_bio TEXT, -- Example Values: `M`, `F` | Value Statics: Total count 541 - Distinct count 2 - Null count 0
suffix_name TEXT, -- Example Values: `Jr.`, `III`, `II` | Value Statics: Total count 20 - Distinct count 3 - Null count 521
house_history_id REAL, --
birthday_bio DATE, --
nickname_name TEXT, --
religion_bio TEXT, --
google_entity_id_id TEXT, --
govtrack_id INTEGER, --
cspan_id REAL, --
primary key (bioguide_id, cspan_id),
wikipedia_id TEXT, --
maplight_id REAL, --
last_name TEXT, --
icpsr_id REAL, --
fec_id TEXT, --
votesmart_id REAL, --
first_name TEXT, --
lis_id TEXT, --
bioguide_id TEXT, --
wikidata_id TEXT, --
middle_name TEXT, --
ballotpedia_id TEXT, --
opensecrets_id TEXT, --
official_full_name TEXT, --
thomas_id INTEGER, --
);
CREATE TABLE historical
(
fec_id TEXT, --
suffix_name TEXT, -- Example Values: `Jr.`, `Sr.`, `II`, `III`, `IV` | Value Statics: Total count 418 - Distinct count 5 - Null count 11446
govtrack_id INTEGER, --
house_history_id REAL, --
opensecrets_id TEXT, --
votesmart_id TEXT, --
bioguide_id TEXT primary key,
nickname_name TEXT, --
official_full_name TEXT, --
house_history_alternate_id TEXT, -- Example Values: `13283.0` | Value Statics: Total count 1 - Distinct count 1 - Null count 11863
gender_bio TEXT, -- Example Values: `M`, `F` | Value Statics: Total count 11864 - Distinct count 2 - Null count 0
bioguide_previous_id TEXT, -- Example Values: `['F000246']`, `['L000266']`, `['W000790']` | Value Statics: Total count 3 - Distinct count 3 - Null count 11861
icpsr_id REAL, --
wikipedia_id TEXT, --
birthday_bio TEXT, --
religion_bio TEXT, --
lis_id TEXT, --
middle_name TEXT, --
cspan_id TEXT, --
last_name TEXT, --
first_name TEXT, --
wikidata_id TEXT, --
thomas_id TEXT, --
ballotpedia_id TEXT, --
maplight_id TEXT, --
google_entity_id_id TEXT, --
);
CREATE TABLE historical-terms
(
bioguide TEXT primary key,
middle TEXT, --
title TEXT, -- Example Values: `Majority Leader`, `Speaker` | Value Statics: Total count 3 - Distinct count 2 - Null count 11861
party TEXT, --
type TEXT, -- Example Values: `sen`, `rep` | Value Statics: Total count 11858 - Distinct count 2 - Null count 6
phone TEXT, --
rss_url TEXT, -- Example Values: `http://radel.house.gov/news/rss.aspx`, `http://www.begich.senate.gov/public/?a=rss.feed`, `http://www.hagan.senate.gov/rss`, `http://negretemcleod.house.gov/rss.xml`, `http://garcia.house.gov/rss.xml` | Value Statics: Total count 12 - Distinct count 12 - Null count 11852
name TEXT, --
start TEXT, --
address TEXT, --
party_affiliations TEXT, -- Example Values: `{'start': '2009-01-06', 'end': '2009-12-22', 'party': 'Democrat'}`, `{'start': '2003-01-07', 'end': '2004-08-09', 'party': 'Democrat'}` | Value Statics: Total count 2 - Distinct count 2 - Null count 11862
relation TEXT, --
state_rank TEXT, -- Example Values: `junior`, `senior` | Value Statics: Total count 7 - Distinct count 2 - Null count 11857
last TEXT, -- Example Values: `Levy`, `Lambert`, `Bono` | Value Statics: Total count 3 - Distinct count 3 - Null count 11861
url TEXT, --
fax TEXT, --
contact_form TEXT, --
office TEXT, --
state TEXT, --
foreign key (bioguide) references historical(bioguide_id),
class REAL, -- Example Values: `2.0`, `1.0`, `3.0` | Value Statics: Total count 1256 - Distinct count 3 - Null count 10608
end TEXT, --
district REAL, --
chamber TEXT, -- Example Values: `house`, `senate` | Value Statics: Total count 3 - Distinct count 2 - Null count 11861
);
CREATE TABLE current-terms
(
foreign key (bioguide) references current(bioguide_id),
phone TEXT, --
party_affiliations TEXT, -- Example Values: `{'start': '2009-01-06', 'end': '2009-02-23', 'party': 'Independent'}`, `{'start': '1993-01-05', 'end': '1994-11-09', 'party': 'Democrat'}` | Value Statics: Total count 2 - Distinct count 2 - Null count 3076
title TEXT, -- Example Values: `Minority Whip`, `Majority Whip`, `Minority Leader`, `Majority Leader`, `Speaker` | Value Statics: Total count 28 - Distinct count 5 - Null count 3050
district REAL, --
bioguide TEXT, --
office TEXT, --
class REAL, -- Example Values: `1.0`, `2.0`, `3.0` | Value Statics: Total count 244 - Distinct count 3 - Null count 2834
type TEXT, -- Example Values: `rep`, `sen` | Value Statics: Total count 3014 - Distinct count 2 - Null count 64
start TEXT, --
address TEXT, --
rss_url TEXT, --
url TEXT, --
primary key (bioguide, end),
fax TEXT, --
chamber TEXT, -- Example Values: `senate`, `house` | Value Statics: Total count 28 - Distinct count 2 - Null count 3050
end TEXT, --
caucus TEXT, -- Example Values: `Democrat` | Value Statics: Total count 3 - Distinct count 1 - Null count 3075
state TEXT, --
last TEXT, -- Example Values: `Menendez` | Value Statics: Total count 1 - Distinct count 1 - Null count 3077
relation TEXT, -- Example Values: `son`, `nephew`, `cousin`, `daughter`, `grandson` | Value Statics: Total count 35 - Distinct count 13 - Null count 3043
state_rank TEXT, -- Example Values: `senior`, `junior` | Value Statics: Total count 147 - Distinct count 2 - Null count 2931
name TEXT, --
contact_form TEXT, --
party TEXT, -- Example Values: `Democrat`, `Republican`, `Independent` | Value Statics: Total count 3014 - Distinct count 3 - Null count 64
);
CREATE TABLE social-media
(
foreign key (bioguide) references current(bioguide_id),
instagram TEXT, --
thomas INTEGER, --
youtube TEXT, --
twitter TEXT, --
facebook TEXT, --
youtube_id TEXT, --
twitter_id REAL, --
facebook_id REAL, --
govtrack REAL, --
bioguide TEXT primary key,
instagram_id REAL, --
); |
shakespeare | How many scenes are there on average in one act in Twelfth Night? | Twelfth Night refers to Title = 'Twelfth Night'; average scene = divide(sum(Scene), count(Act)) | SELECT SUM(T2.Scene) / COUNT(T2.Act) FROM works AS T1 INNER JOIN chapters AS T2 ON T1.id = T2.work_id WHERE T1.Title = 'Twelfth Night' | CREATE TABLE characters
(
CharName TEXT not null, --
Abbrev TEXT not null, --
Description TEXT not null, --
id INTEGER primary key autoincrement,
);
CREATE TABLE paragraphs
(
chapter_id INTEGER default 0 not null references chapters, --
character_id INTEGER not null references characters, --
ParagraphNum INTEGER not null, --
PlainText TEXT not null, --
id INTEGER primary key autoincrement,
);
CREATE TABLE works
(
GenreType TEXT not null, -- Example Values: `Comedy`, `Tragedy`, `History`, `Poem`, `Sonnet` | Value Statics: Total count 43 - Distinct count 5 - Null count 0
Title TEXT not null, --
Date INTEGER not null, --
id INTEGER primary key autoincrement,
LongTitle TEXT not null, --
);
CREATE TABLE chapters
(
work_id INTEGER not null references works, --
Act INTEGER not null, -- Example Values: `1`, `2`, `3`, `4`, `5` | Value Statics: Total count 945 - Distinct count 6 - Null count 0
Description TEXT not null, --
id INTEGER primary key autoincrement,
Scene INTEGER not null, --
); |
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' | CREATE TABLE current
(
gender_bio TEXT, -- Example Values: `M`, `F` | Value Statics: Total count 541 - Distinct count 2 - Null count 0
suffix_name TEXT, -- Example Values: `Jr.`, `III`, `II` | Value Statics: Total count 20 - Distinct count 3 - Null count 521
house_history_id REAL, --
birthday_bio DATE, --
nickname_name TEXT, --
religion_bio TEXT, --
google_entity_id_id TEXT, --
govtrack_id INTEGER, --
cspan_id REAL, --
primary key (bioguide_id, cspan_id),
wikipedia_id TEXT, --
maplight_id REAL, --
last_name TEXT, --
icpsr_id REAL, --
fec_id TEXT, --
votesmart_id REAL, --
first_name TEXT, --
lis_id TEXT, --
bioguide_id TEXT, --
wikidata_id TEXT, --
middle_name TEXT, --
ballotpedia_id TEXT, --
opensecrets_id TEXT, --
official_full_name TEXT, --
thomas_id INTEGER, --
);
CREATE TABLE historical
(
fec_id TEXT, --
suffix_name TEXT, -- Example Values: `Jr.`, `Sr.`, `II`, `III`, `IV` | Value Statics: Total count 418 - Distinct count 5 - Null count 11446
govtrack_id INTEGER, --
house_history_id REAL, --
opensecrets_id TEXT, --
votesmart_id TEXT, --
bioguide_id TEXT primary key,
nickname_name TEXT, --
official_full_name TEXT, --
house_history_alternate_id TEXT, -- Example Values: `13283.0` | Value Statics: Total count 1 - Distinct count 1 - Null count 11863
gender_bio TEXT, -- Example Values: `M`, `F` | Value Statics: Total count 11864 - Distinct count 2 - Null count 0
bioguide_previous_id TEXT, -- Example Values: `['F000246']`, `['L000266']`, `['W000790']` | Value Statics: Total count 3 - Distinct count 3 - Null count 11861
icpsr_id REAL, --
wikipedia_id TEXT, --
birthday_bio TEXT, --
religion_bio TEXT, --
lis_id TEXT, --
middle_name TEXT, --
cspan_id TEXT, --
last_name TEXT, --
first_name TEXT, --
wikidata_id TEXT, --
thomas_id TEXT, --
ballotpedia_id TEXT, --
maplight_id TEXT, --
google_entity_id_id TEXT, --
);
CREATE TABLE historical-terms
(
bioguide TEXT primary key,
middle TEXT, --
title TEXT, -- Example Values: `Majority Leader`, `Speaker` | Value Statics: Total count 3 - Distinct count 2 - Null count 11861
party TEXT, --
type TEXT, -- Example Values: `sen`, `rep` | Value Statics: Total count 11858 - Distinct count 2 - Null count 6
phone TEXT, --
rss_url TEXT, -- Example Values: `http://radel.house.gov/news/rss.aspx`, `http://www.begich.senate.gov/public/?a=rss.feed`, `http://www.hagan.senate.gov/rss`, `http://negretemcleod.house.gov/rss.xml`, `http://garcia.house.gov/rss.xml` | Value Statics: Total count 12 - Distinct count 12 - Null count 11852
name TEXT, --
start TEXT, --
address TEXT, --
party_affiliations TEXT, -- Example Values: `{'start': '2009-01-06', 'end': '2009-12-22', 'party': 'Democrat'}`, `{'start': '2003-01-07', 'end': '2004-08-09', 'party': 'Democrat'}` | Value Statics: Total count 2 - Distinct count 2 - Null count 11862
relation TEXT, --
state_rank TEXT, -- Example Values: `junior`, `senior` | Value Statics: Total count 7 - Distinct count 2 - Null count 11857
last TEXT, -- Example Values: `Levy`, `Lambert`, `Bono` | Value Statics: Total count 3 - Distinct count 3 - Null count 11861
url TEXT, --
fax TEXT, --
contact_form TEXT, --
office TEXT, --
state TEXT, --
foreign key (bioguide) references historical(bioguide_id),
class REAL, -- Example Values: `2.0`, `1.0`, `3.0` | Value Statics: Total count 1256 - Distinct count 3 - Null count 10608
end TEXT, --
district REAL, --
chamber TEXT, -- Example Values: `house`, `senate` | Value Statics: Total count 3 - Distinct count 2 - Null count 11861
);
CREATE TABLE current-terms
(
foreign key (bioguide) references current(bioguide_id),
phone TEXT, --
party_affiliations TEXT, -- Example Values: `{'start': '2009-01-06', 'end': '2009-02-23', 'party': 'Independent'}`, `{'start': '1993-01-05', 'end': '1994-11-09', 'party': 'Democrat'}` | Value Statics: Total count 2 - Distinct count 2 - Null count 3076
title TEXT, -- Example Values: `Minority Whip`, `Majority Whip`, `Minority Leader`, `Majority Leader`, `Speaker` | Value Statics: Total count 28 - Distinct count 5 - Null count 3050
district REAL, --
bioguide TEXT, --
office TEXT, --
class REAL, -- Example Values: `1.0`, `2.0`, `3.0` | Value Statics: Total count 244 - Distinct count 3 - Null count 2834
type TEXT, -- Example Values: `rep`, `sen` | Value Statics: Total count 3014 - Distinct count 2 - Null count 64
start TEXT, --
address TEXT, --
rss_url TEXT, --
url TEXT, --
primary key (bioguide, end),
fax TEXT, --
chamber TEXT, -- Example Values: `senate`, `house` | Value Statics: Total count 28 - Distinct count 2 - Null count 3050
end TEXT, --
caucus TEXT, -- Example Values: `Democrat` | Value Statics: Total count 3 - Distinct count 1 - Null count 3075
state TEXT, --
last TEXT, -- Example Values: `Menendez` | Value Statics: Total count 1 - Distinct count 1 - Null count 3077
relation TEXT, -- Example Values: `son`, `nephew`, `cousin`, `daughter`, `grandson` | Value Statics: Total count 35 - Distinct count 13 - Null count 3043
state_rank TEXT, -- Example Values: `senior`, `junior` | Value Statics: Total count 147 - Distinct count 2 - Null count 2931
name TEXT, --
contact_form TEXT, --
party TEXT, -- Example Values: `Democrat`, `Republican`, `Independent` | Value Statics: Total count 3014 - Distinct count 3 - Null count 64
);
CREATE TABLE social-media
(
foreign key (bioguide) references current(bioguide_id),
instagram TEXT, --
thomas INTEGER, --
youtube TEXT, --
twitter TEXT, --
facebook TEXT, --
youtube_id TEXT, --
twitter_id REAL, --
facebook_id REAL, --
govtrack REAL, --
bioguide TEXT primary key,
instagram_id REAL, --
); |
shakespeare | How many characters are there in Twelfth Night? | Twelfth Night refers to Title = 'Twelfth Night' | SELECT COUNT(DISTINCT T4.id) FROM works AS T1 INNER JOIN chapters AS T2 ON T1.id = T2.work_id INNER JOIN paragraphs AS T3 ON T2.id = T3.chapter_id INNER JOIN characters AS T4 ON T3.character_id = T4.id WHERE T1.Title = 'Twelfth Night' | CREATE TABLE characters
(
CharName TEXT not null, --
Abbrev TEXT not null, --
Description TEXT not null, --
id INTEGER primary key autoincrement,
);
CREATE TABLE paragraphs
(
chapter_id INTEGER default 0 not null references chapters, --
character_id INTEGER not null references characters, --
ParagraphNum INTEGER not null, --
PlainText TEXT not null, --
id INTEGER primary key autoincrement,
);
CREATE TABLE works
(
GenreType TEXT not null, -- Example Values: `Comedy`, `Tragedy`, `History`, `Poem`, `Sonnet` | Value Statics: Total count 43 - Distinct count 5 - Null count 0
Title TEXT not null, --
Date INTEGER not null, --
id INTEGER primary key autoincrement,
LongTitle TEXT not null, --
);
CREATE TABLE chapters
(
work_id INTEGER not null references works, --
Act INTEGER not null, -- Example Values: `1`, `2`, `3`, `4`, `5` | Value Statics: Total count 945 - Distinct count 6 - Null count 0
Description TEXT not null, --
id INTEGER primary key autoincrement,
Scene INTEGER not null, --
); |
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 | CREATE TABLE current
(
gender_bio TEXT, -- Example Values: `M`, `F` | Value Statics: Total count 541 - Distinct count 2 - Null count 0
suffix_name TEXT, -- Example Values: `Jr.`, `III`, `II` | Value Statics: Total count 20 - Distinct count 3 - Null count 521
house_history_id REAL, --
birthday_bio DATE, --
nickname_name TEXT, --
religion_bio TEXT, --
google_entity_id_id TEXT, --
govtrack_id INTEGER, --
cspan_id REAL, --
primary key (bioguide_id, cspan_id),
wikipedia_id TEXT, --
maplight_id REAL, --
last_name TEXT, --
icpsr_id REAL, --
fec_id TEXT, --
votesmart_id REAL, --
first_name TEXT, --
lis_id TEXT, --
bioguide_id TEXT, --
wikidata_id TEXT, --
middle_name TEXT, --
ballotpedia_id TEXT, --
opensecrets_id TEXT, --
official_full_name TEXT, --
thomas_id INTEGER, --
);
CREATE TABLE historical
(
fec_id TEXT, --
suffix_name TEXT, -- Example Values: `Jr.`, `Sr.`, `II`, `III`, `IV` | Value Statics: Total count 418 - Distinct count 5 - Null count 11446
govtrack_id INTEGER, --
house_history_id REAL, --
opensecrets_id TEXT, --
votesmart_id TEXT, --
bioguide_id TEXT primary key,
nickname_name TEXT, --
official_full_name TEXT, --
house_history_alternate_id TEXT, -- Example Values: `13283.0` | Value Statics: Total count 1 - Distinct count 1 - Null count 11863
gender_bio TEXT, -- Example Values: `M`, `F` | Value Statics: Total count 11864 - Distinct count 2 - Null count 0
bioguide_previous_id TEXT, -- Example Values: `['F000246']`, `['L000266']`, `['W000790']` | Value Statics: Total count 3 - Distinct count 3 - Null count 11861
icpsr_id REAL, --
wikipedia_id TEXT, --
birthday_bio TEXT, --
religion_bio TEXT, --
lis_id TEXT, --
middle_name TEXT, --
cspan_id TEXT, --
last_name TEXT, --
first_name TEXT, --
wikidata_id TEXT, --
thomas_id TEXT, --
ballotpedia_id TEXT, --
maplight_id TEXT, --
google_entity_id_id TEXT, --
);
CREATE TABLE historical-terms
(
bioguide TEXT primary key,
middle TEXT, --
title TEXT, -- Example Values: `Majority Leader`, `Speaker` | Value Statics: Total count 3 - Distinct count 2 - Null count 11861
party TEXT, --
type TEXT, -- Example Values: `sen`, `rep` | Value Statics: Total count 11858 - Distinct count 2 - Null count 6
phone TEXT, --
rss_url TEXT, -- Example Values: `http://radel.house.gov/news/rss.aspx`, `http://www.begich.senate.gov/public/?a=rss.feed`, `http://www.hagan.senate.gov/rss`, `http://negretemcleod.house.gov/rss.xml`, `http://garcia.house.gov/rss.xml` | Value Statics: Total count 12 - Distinct count 12 - Null count 11852
name TEXT, --
start TEXT, --
address TEXT, --
party_affiliations TEXT, -- Example Values: `{'start': '2009-01-06', 'end': '2009-12-22', 'party': 'Democrat'}`, `{'start': '2003-01-07', 'end': '2004-08-09', 'party': 'Democrat'}` | Value Statics: Total count 2 - Distinct count 2 - Null count 11862
relation TEXT, --
state_rank TEXT, -- Example Values: `junior`, `senior` | Value Statics: Total count 7 - Distinct count 2 - Null count 11857
last TEXT, -- Example Values: `Levy`, `Lambert`, `Bono` | Value Statics: Total count 3 - Distinct count 3 - Null count 11861
url TEXT, --
fax TEXT, --
contact_form TEXT, --
office TEXT, --
state TEXT, --
foreign key (bioguide) references historical(bioguide_id),
class REAL, -- Example Values: `2.0`, `1.0`, `3.0` | Value Statics: Total count 1256 - Distinct count 3 - Null count 10608
end TEXT, --
district REAL, --
chamber TEXT, -- Example Values: `house`, `senate` | Value Statics: Total count 3 - Distinct count 2 - Null count 11861
);
CREATE TABLE current-terms
(
foreign key (bioguide) references current(bioguide_id),
phone TEXT, --
party_affiliations TEXT, -- Example Values: `{'start': '2009-01-06', 'end': '2009-02-23', 'party': 'Independent'}`, `{'start': '1993-01-05', 'end': '1994-11-09', 'party': 'Democrat'}` | Value Statics: Total count 2 - Distinct count 2 - Null count 3076
title TEXT, -- Example Values: `Minority Whip`, `Majority Whip`, `Minority Leader`, `Majority Leader`, `Speaker` | Value Statics: Total count 28 - Distinct count 5 - Null count 3050
district REAL, --
bioguide TEXT, --
office TEXT, --
class REAL, -- Example Values: `1.0`, `2.0`, `3.0` | Value Statics: Total count 244 - Distinct count 3 - Null count 2834
type TEXT, -- Example Values: `rep`, `sen` | Value Statics: Total count 3014 - Distinct count 2 - Null count 64
start TEXT, --
address TEXT, --
rss_url TEXT, --
url TEXT, --
primary key (bioguide, end),
fax TEXT, --
chamber TEXT, -- Example Values: `senate`, `house` | Value Statics: Total count 28 - Distinct count 2 - Null count 3050
end TEXT, --
caucus TEXT, -- Example Values: `Democrat` | Value Statics: Total count 3 - Distinct count 1 - Null count 3075
state TEXT, --
last TEXT, -- Example Values: `Menendez` | Value Statics: Total count 1 - Distinct count 1 - Null count 3077
relation TEXT, -- Example Values: `son`, `nephew`, `cousin`, `daughter`, `grandson` | Value Statics: Total count 35 - Distinct count 13 - Null count 3043
state_rank TEXT, -- Example Values: `senior`, `junior` | Value Statics: Total count 147 - Distinct count 2 - Null count 2931
name TEXT, --
contact_form TEXT, --
party TEXT, -- Example Values: `Democrat`, `Republican`, `Independent` | Value Statics: Total count 3014 - Distinct count 3 - Null count 64
);
CREATE TABLE social-media
(
foreign key (bioguide) references current(bioguide_id),
instagram TEXT, --
thomas INTEGER, --
youtube TEXT, --
twitter TEXT, --
facebook TEXT, --
youtube_id TEXT, --
twitter_id REAL, --
facebook_id REAL, --
govtrack REAL, --
bioguide TEXT primary key,
instagram_id REAL, --
); |
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%' | CREATE TABLE current
(
gender_bio TEXT, -- Example Values: `M`, `F` | Value Statics: Total count 541 - Distinct count 2 - Null count 0
suffix_name TEXT, -- Example Values: `Jr.`, `III`, `II` | Value Statics: Total count 20 - Distinct count 3 - Null count 521
house_history_id REAL, --
birthday_bio DATE, --
nickname_name TEXT, --
religion_bio TEXT, --
google_entity_id_id TEXT, --
govtrack_id INTEGER, --
cspan_id REAL, --
primary key (bioguide_id, cspan_id),
wikipedia_id TEXT, --
maplight_id REAL, --
last_name TEXT, --
icpsr_id REAL, --
fec_id TEXT, --
votesmart_id REAL, --
first_name TEXT, --
lis_id TEXT, --
bioguide_id TEXT, --
wikidata_id TEXT, --
middle_name TEXT, --
ballotpedia_id TEXT, --
opensecrets_id TEXT, --
official_full_name TEXT, --
thomas_id INTEGER, --
);
CREATE TABLE historical
(
fec_id TEXT, --
suffix_name TEXT, -- Example Values: `Jr.`, `Sr.`, `II`, `III`, `IV` | Value Statics: Total count 418 - Distinct count 5 - Null count 11446
govtrack_id INTEGER, --
house_history_id REAL, --
opensecrets_id TEXT, --
votesmart_id TEXT, --
bioguide_id TEXT primary key,
nickname_name TEXT, --
official_full_name TEXT, --
house_history_alternate_id TEXT, -- Example Values: `13283.0` | Value Statics: Total count 1 - Distinct count 1 - Null count 11863
gender_bio TEXT, -- Example Values: `M`, `F` | Value Statics: Total count 11864 - Distinct count 2 - Null count 0
bioguide_previous_id TEXT, -- Example Values: `['F000246']`, `['L000266']`, `['W000790']` | Value Statics: Total count 3 - Distinct count 3 - Null count 11861
icpsr_id REAL, --
wikipedia_id TEXT, --
birthday_bio TEXT, --
religion_bio TEXT, --
lis_id TEXT, --
middle_name TEXT, --
cspan_id TEXT, --
last_name TEXT, --
first_name TEXT, --
wikidata_id TEXT, --
thomas_id TEXT, --
ballotpedia_id TEXT, --
maplight_id TEXT, --
google_entity_id_id TEXT, --
);
CREATE TABLE historical-terms
(
bioguide TEXT primary key,
middle TEXT, --
title TEXT, -- Example Values: `Majority Leader`, `Speaker` | Value Statics: Total count 3 - Distinct count 2 - Null count 11861
party TEXT, --
type TEXT, -- Example Values: `sen`, `rep` | Value Statics: Total count 11858 - Distinct count 2 - Null count 6
phone TEXT, --
rss_url TEXT, -- Example Values: `http://radel.house.gov/news/rss.aspx`, `http://www.begich.senate.gov/public/?a=rss.feed`, `http://www.hagan.senate.gov/rss`, `http://negretemcleod.house.gov/rss.xml`, `http://garcia.house.gov/rss.xml` | Value Statics: Total count 12 - Distinct count 12 - Null count 11852
name TEXT, --
start TEXT, --
address TEXT, --
party_affiliations TEXT, -- Example Values: `{'start': '2009-01-06', 'end': '2009-12-22', 'party': 'Democrat'}`, `{'start': '2003-01-07', 'end': '2004-08-09', 'party': 'Democrat'}` | Value Statics: Total count 2 - Distinct count 2 - Null count 11862
relation TEXT, --
state_rank TEXT, -- Example Values: `junior`, `senior` | Value Statics: Total count 7 - Distinct count 2 - Null count 11857
last TEXT, -- Example Values: `Levy`, `Lambert`, `Bono` | Value Statics: Total count 3 - Distinct count 3 - Null count 11861
url TEXT, --
fax TEXT, --
contact_form TEXT, --
office TEXT, --
state TEXT, --
foreign key (bioguide) references historical(bioguide_id),
class REAL, -- Example Values: `2.0`, `1.0`, `3.0` | Value Statics: Total count 1256 - Distinct count 3 - Null count 10608
end TEXT, --
district REAL, --
chamber TEXT, -- Example Values: `house`, `senate` | Value Statics: Total count 3 - Distinct count 2 - Null count 11861
);
CREATE TABLE current-terms
(
foreign key (bioguide) references current(bioguide_id),
phone TEXT, --
party_affiliations TEXT, -- Example Values: `{'start': '2009-01-06', 'end': '2009-02-23', 'party': 'Independent'}`, `{'start': '1993-01-05', 'end': '1994-11-09', 'party': 'Democrat'}` | Value Statics: Total count 2 - Distinct count 2 - Null count 3076
title TEXT, -- Example Values: `Minority Whip`, `Majority Whip`, `Minority Leader`, `Majority Leader`, `Speaker` | Value Statics: Total count 28 - Distinct count 5 - Null count 3050
district REAL, --
bioguide TEXT, --
office TEXT, --
class REAL, -- Example Values: `1.0`, `2.0`, `3.0` | Value Statics: Total count 244 - Distinct count 3 - Null count 2834
type TEXT, -- Example Values: `rep`, `sen` | Value Statics: Total count 3014 - Distinct count 2 - Null count 64
start TEXT, --
address TEXT, --
rss_url TEXT, --
url TEXT, --
primary key (bioguide, end),
fax TEXT, --
chamber TEXT, -- Example Values: `senate`, `house` | Value Statics: Total count 28 - Distinct count 2 - Null count 3050
end TEXT, --
caucus TEXT, -- Example Values: `Democrat` | Value Statics: Total count 3 - Distinct count 1 - Null count 3075
state TEXT, --
last TEXT, -- Example Values: `Menendez` | Value Statics: Total count 1 - Distinct count 1 - Null count 3077
relation TEXT, -- Example Values: `son`, `nephew`, `cousin`, `daughter`, `grandson` | Value Statics: Total count 35 - Distinct count 13 - Null count 3043
state_rank TEXT, -- Example Values: `senior`, `junior` | Value Statics: Total count 147 - Distinct count 2 - Null count 2931
name TEXT, --
contact_form TEXT, --
party TEXT, -- Example Values: `Democrat`, `Republican`, `Independent` | Value Statics: Total count 3014 - Distinct count 3 - Null count 64
);
CREATE TABLE social-media
(
foreign key (bioguide) references current(bioguide_id),
instagram TEXT, --
thomas INTEGER, --
youtube TEXT, --
twitter TEXT, --
facebook TEXT, --
youtube_id TEXT, --
twitter_id REAL, --
facebook_id REAL, --
govtrack REAL, --
bioguide TEXT primary key,
instagram_id REAL, --
); |
shakespeare | When did Shakespeare write the first poem? | first poem refers to GenreType = 'Poem' and Date = 'min' | SELECT MIN(Date) FROM works WHERE GenreType = 'Poem' | CREATE TABLE characters
(
CharName TEXT not null, --
Abbrev TEXT not null, --
Description TEXT not null, --
id INTEGER primary key autoincrement,
);
CREATE TABLE paragraphs
(
chapter_id INTEGER default 0 not null references chapters, --
character_id INTEGER not null references characters, --
ParagraphNum INTEGER not null, --
PlainText TEXT not null, --
id INTEGER primary key autoincrement,
);
CREATE TABLE works
(
GenreType TEXT not null, -- Example Values: `Comedy`, `Tragedy`, `History`, `Poem`, `Sonnet` | Value Statics: Total count 43 - Distinct count 5 - Null count 0
Title TEXT not null, --
Date INTEGER not null, --
id INTEGER primary key autoincrement,
LongTitle TEXT not null, --
);
CREATE TABLE chapters
(
work_id INTEGER not null references works, --
Act INTEGER not null, -- Example Values: `1`, `2`, `3`, `4`, `5` | Value Statics: Total count 945 - Distinct count 6 - Null count 0
Description TEXT not null, --
id INTEGER primary key autoincrement,
Scene INTEGER not null, --
); |
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 | CREATE TABLE current
(
gender_bio TEXT, -- Example Values: `M`, `F` | Value Statics: Total count 541 - Distinct count 2 - Null count 0
suffix_name TEXT, -- Example Values: `Jr.`, `III`, `II` | Value Statics: Total count 20 - Distinct count 3 - Null count 521
house_history_id REAL, --
birthday_bio DATE, --
nickname_name TEXT, --
religion_bio TEXT, --
google_entity_id_id TEXT, --
govtrack_id INTEGER, --
cspan_id REAL, --
primary key (bioguide_id, cspan_id),
wikipedia_id TEXT, --
maplight_id REAL, --
last_name TEXT, --
icpsr_id REAL, --
fec_id TEXT, --
votesmart_id REAL, --
first_name TEXT, --
lis_id TEXT, --
bioguide_id TEXT, --
wikidata_id TEXT, --
middle_name TEXT, --
ballotpedia_id TEXT, --
opensecrets_id TEXT, --
official_full_name TEXT, --
thomas_id INTEGER, --
);
CREATE TABLE historical
(
fec_id TEXT, --
suffix_name TEXT, -- Example Values: `Jr.`, `Sr.`, `II`, `III`, `IV` | Value Statics: Total count 418 - Distinct count 5 - Null count 11446
govtrack_id INTEGER, --
house_history_id REAL, --
opensecrets_id TEXT, --
votesmart_id TEXT, --
bioguide_id TEXT primary key,
nickname_name TEXT, --
official_full_name TEXT, --
house_history_alternate_id TEXT, -- Example Values: `13283.0` | Value Statics: Total count 1 - Distinct count 1 - Null count 11863
gender_bio TEXT, -- Example Values: `M`, `F` | Value Statics: Total count 11864 - Distinct count 2 - Null count 0
bioguide_previous_id TEXT, -- Example Values: `['F000246']`, `['L000266']`, `['W000790']` | Value Statics: Total count 3 - Distinct count 3 - Null count 11861
icpsr_id REAL, --
wikipedia_id TEXT, --
birthday_bio TEXT, --
religion_bio TEXT, --
lis_id TEXT, --
middle_name TEXT, --
cspan_id TEXT, --
last_name TEXT, --
first_name TEXT, --
wikidata_id TEXT, --
thomas_id TEXT, --
ballotpedia_id TEXT, --
maplight_id TEXT, --
google_entity_id_id TEXT, --
);
CREATE TABLE historical-terms
(
bioguide TEXT primary key,
middle TEXT, --
title TEXT, -- Example Values: `Majority Leader`, `Speaker` | Value Statics: Total count 3 - Distinct count 2 - Null count 11861
party TEXT, --
type TEXT, -- Example Values: `sen`, `rep` | Value Statics: Total count 11858 - Distinct count 2 - Null count 6
phone TEXT, --
rss_url TEXT, -- Example Values: `http://radel.house.gov/news/rss.aspx`, `http://www.begich.senate.gov/public/?a=rss.feed`, `http://www.hagan.senate.gov/rss`, `http://negretemcleod.house.gov/rss.xml`, `http://garcia.house.gov/rss.xml` | Value Statics: Total count 12 - Distinct count 12 - Null count 11852
name TEXT, --
start TEXT, --
address TEXT, --
party_affiliations TEXT, -- Example Values: `{'start': '2009-01-06', 'end': '2009-12-22', 'party': 'Democrat'}`, `{'start': '2003-01-07', 'end': '2004-08-09', 'party': 'Democrat'}` | Value Statics: Total count 2 - Distinct count 2 - Null count 11862
relation TEXT, --
state_rank TEXT, -- Example Values: `junior`, `senior` | Value Statics: Total count 7 - Distinct count 2 - Null count 11857
last TEXT, -- Example Values: `Levy`, `Lambert`, `Bono` | Value Statics: Total count 3 - Distinct count 3 - Null count 11861
url TEXT, --
fax TEXT, --
contact_form TEXT, --
office TEXT, --
state TEXT, --
foreign key (bioguide) references historical(bioguide_id),
class REAL, -- Example Values: `2.0`, `1.0`, `3.0` | Value Statics: Total count 1256 - Distinct count 3 - Null count 10608
end TEXT, --
district REAL, --
chamber TEXT, -- Example Values: `house`, `senate` | Value Statics: Total count 3 - Distinct count 2 - Null count 11861
);
CREATE TABLE current-terms
(
foreign key (bioguide) references current(bioguide_id),
phone TEXT, --
party_affiliations TEXT, -- Example Values: `{'start': '2009-01-06', 'end': '2009-02-23', 'party': 'Independent'}`, `{'start': '1993-01-05', 'end': '1994-11-09', 'party': 'Democrat'}` | Value Statics: Total count 2 - Distinct count 2 - Null count 3076
title TEXT, -- Example Values: `Minority Whip`, `Majority Whip`, `Minority Leader`, `Majority Leader`, `Speaker` | Value Statics: Total count 28 - Distinct count 5 - Null count 3050
district REAL, --
bioguide TEXT, --
office TEXT, --
class REAL, -- Example Values: `1.0`, `2.0`, `3.0` | Value Statics: Total count 244 - Distinct count 3 - Null count 2834
type TEXT, -- Example Values: `rep`, `sen` | Value Statics: Total count 3014 - Distinct count 2 - Null count 64
start TEXT, --
address TEXT, --
rss_url TEXT, --
url TEXT, --
primary key (bioguide, end),
fax TEXT, --
chamber TEXT, -- Example Values: `senate`, `house` | Value Statics: Total count 28 - Distinct count 2 - Null count 3050
end TEXT, --
caucus TEXT, -- Example Values: `Democrat` | Value Statics: Total count 3 - Distinct count 1 - Null count 3075
state TEXT, --
last TEXT, -- Example Values: `Menendez` | Value Statics: Total count 1 - Distinct count 1 - Null count 3077
relation TEXT, -- Example Values: `son`, `nephew`, `cousin`, `daughter`, `grandson` | Value Statics: Total count 35 - Distinct count 13 - Null count 3043
state_rank TEXT, -- Example Values: `senior`, `junior` | Value Statics: Total count 147 - Distinct count 2 - Null count 2931
name TEXT, --
contact_form TEXT, --
party TEXT, -- Example Values: `Democrat`, `Republican`, `Independent` | Value Statics: Total count 3014 - Distinct count 3 - Null count 64
);
CREATE TABLE social-media
(
foreign key (bioguide) references current(bioguide_id),
instagram TEXT, --
thomas INTEGER, --
youtube TEXT, --
twitter TEXT, --
facebook TEXT, --
youtube_id TEXT, --
twitter_id REAL, --
facebook_id REAL, --
govtrack REAL, --
bioguide TEXT primary key,
instagram_id REAL, --
); |
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' | CREATE TABLE current
(
gender_bio TEXT, -- Example Values: `M`, `F` | Value Statics: Total count 541 - Distinct count 2 - Null count 0
suffix_name TEXT, -- Example Values: `Jr.`, `III`, `II` | Value Statics: Total count 20 - Distinct count 3 - Null count 521
house_history_id REAL, --
birthday_bio DATE, --
nickname_name TEXT, --
religion_bio TEXT, --
google_entity_id_id TEXT, --
govtrack_id INTEGER, --
cspan_id REAL, --
primary key (bioguide_id, cspan_id),
wikipedia_id TEXT, --
maplight_id REAL, --
last_name TEXT, --
icpsr_id REAL, --
fec_id TEXT, --
votesmart_id REAL, --
first_name TEXT, --
lis_id TEXT, --
bioguide_id TEXT, --
wikidata_id TEXT, --
middle_name TEXT, --
ballotpedia_id TEXT, --
opensecrets_id TEXT, --
official_full_name TEXT, --
thomas_id INTEGER, --
);
CREATE TABLE historical
(
fec_id TEXT, --
suffix_name TEXT, -- Example Values: `Jr.`, `Sr.`, `II`, `III`, `IV` | Value Statics: Total count 418 - Distinct count 5 - Null count 11446
govtrack_id INTEGER, --
house_history_id REAL, --
opensecrets_id TEXT, --
votesmart_id TEXT, --
bioguide_id TEXT primary key,
nickname_name TEXT, --
official_full_name TEXT, --
house_history_alternate_id TEXT, -- Example Values: `13283.0` | Value Statics: Total count 1 - Distinct count 1 - Null count 11863
gender_bio TEXT, -- Example Values: `M`, `F` | Value Statics: Total count 11864 - Distinct count 2 - Null count 0
bioguide_previous_id TEXT, -- Example Values: `['F000246']`, `['L000266']`, `['W000790']` | Value Statics: Total count 3 - Distinct count 3 - Null count 11861
icpsr_id REAL, --
wikipedia_id TEXT, --
birthday_bio TEXT, --
religion_bio TEXT, --
lis_id TEXT, --
middle_name TEXT, --
cspan_id TEXT, --
last_name TEXT, --
first_name TEXT, --
wikidata_id TEXT, --
thomas_id TEXT, --
ballotpedia_id TEXT, --
maplight_id TEXT, --
google_entity_id_id TEXT, --
);
CREATE TABLE historical-terms
(
bioguide TEXT primary key,
middle TEXT, --
title TEXT, -- Example Values: `Majority Leader`, `Speaker` | Value Statics: Total count 3 - Distinct count 2 - Null count 11861
party TEXT, --
type TEXT, -- Example Values: `sen`, `rep` | Value Statics: Total count 11858 - Distinct count 2 - Null count 6
phone TEXT, --
rss_url TEXT, -- Example Values: `http://radel.house.gov/news/rss.aspx`, `http://www.begich.senate.gov/public/?a=rss.feed`, `http://www.hagan.senate.gov/rss`, `http://negretemcleod.house.gov/rss.xml`, `http://garcia.house.gov/rss.xml` | Value Statics: Total count 12 - Distinct count 12 - Null count 11852
name TEXT, --
start TEXT, --
address TEXT, --
party_affiliations TEXT, -- Example Values: `{'start': '2009-01-06', 'end': '2009-12-22', 'party': 'Democrat'}`, `{'start': '2003-01-07', 'end': '2004-08-09', 'party': 'Democrat'}` | Value Statics: Total count 2 - Distinct count 2 - Null count 11862
relation TEXT, --
state_rank TEXT, -- Example Values: `junior`, `senior` | Value Statics: Total count 7 - Distinct count 2 - Null count 11857
last TEXT, -- Example Values: `Levy`, `Lambert`, `Bono` | Value Statics: Total count 3 - Distinct count 3 - Null count 11861
url TEXT, --
fax TEXT, --
contact_form TEXT, --
office TEXT, --
state TEXT, --
foreign key (bioguide) references historical(bioguide_id),
class REAL, -- Example Values: `2.0`, `1.0`, `3.0` | Value Statics: Total count 1256 - Distinct count 3 - Null count 10608
end TEXT, --
district REAL, --
chamber TEXT, -- Example Values: `house`, `senate` | Value Statics: Total count 3 - Distinct count 2 - Null count 11861
);
CREATE TABLE current-terms
(
foreign key (bioguide) references current(bioguide_id),
phone TEXT, --
party_affiliations TEXT, -- Example Values: `{'start': '2009-01-06', 'end': '2009-02-23', 'party': 'Independent'}`, `{'start': '1993-01-05', 'end': '1994-11-09', 'party': 'Democrat'}` | Value Statics: Total count 2 - Distinct count 2 - Null count 3076
title TEXT, -- Example Values: `Minority Whip`, `Majority Whip`, `Minority Leader`, `Majority Leader`, `Speaker` | Value Statics: Total count 28 - Distinct count 5 - Null count 3050
district REAL, --
bioguide TEXT, --
office TEXT, --
class REAL, -- Example Values: `1.0`, `2.0`, `3.0` | Value Statics: Total count 244 - Distinct count 3 - Null count 2834
type TEXT, -- Example Values: `rep`, `sen` | Value Statics: Total count 3014 - Distinct count 2 - Null count 64
start TEXT, --
address TEXT, --
rss_url TEXT, --
url TEXT, --
primary key (bioguide, end),
fax TEXT, --
chamber TEXT, -- Example Values: `senate`, `house` | Value Statics: Total count 28 - Distinct count 2 - Null count 3050
end TEXT, --
caucus TEXT, -- Example Values: `Democrat` | Value Statics: Total count 3 - Distinct count 1 - Null count 3075
state TEXT, --
last TEXT, -- Example Values: `Menendez` | Value Statics: Total count 1 - Distinct count 1 - Null count 3077
relation TEXT, -- Example Values: `son`, `nephew`, `cousin`, `daughter`, `grandson` | Value Statics: Total count 35 - Distinct count 13 - Null count 3043
state_rank TEXT, -- Example Values: `senior`, `junior` | Value Statics: Total count 147 - Distinct count 2 - Null count 2931
name TEXT, --
contact_form TEXT, --
party TEXT, -- Example Values: `Democrat`, `Republican`, `Independent` | Value Statics: Total count 3014 - Distinct count 3 - Null count 64
);
CREATE TABLE social-media
(
foreign key (bioguide) references current(bioguide_id),
instagram TEXT, --
thomas INTEGER, --
youtube TEXT, --
twitter TEXT, --
facebook TEXT, --
youtube_id TEXT, --
twitter_id REAL, --
facebook_id REAL, --
govtrack REAL, --
bioguide TEXT primary key,
instagram_id REAL, --
); |
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' | CREATE TABLE current
(
gender_bio TEXT, -- Example Values: `M`, `F` | Value Statics: Total count 541 - Distinct count 2 - Null count 0
suffix_name TEXT, -- Example Values: `Jr.`, `III`, `II` | Value Statics: Total count 20 - Distinct count 3 - Null count 521
house_history_id REAL, --
birthday_bio DATE, --
nickname_name TEXT, --
religion_bio TEXT, --
google_entity_id_id TEXT, --
govtrack_id INTEGER, --
cspan_id REAL, --
primary key (bioguide_id, cspan_id),
wikipedia_id TEXT, --
maplight_id REAL, --
last_name TEXT, --
icpsr_id REAL, --
fec_id TEXT, --
votesmart_id REAL, --
first_name TEXT, --
lis_id TEXT, --
bioguide_id TEXT, --
wikidata_id TEXT, --
middle_name TEXT, --
ballotpedia_id TEXT, --
opensecrets_id TEXT, --
official_full_name TEXT, --
thomas_id INTEGER, --
);
CREATE TABLE historical
(
fec_id TEXT, --
suffix_name TEXT, -- Example Values: `Jr.`, `Sr.`, `II`, `III`, `IV` | Value Statics: Total count 418 - Distinct count 5 - Null count 11446
govtrack_id INTEGER, --
house_history_id REAL, --
opensecrets_id TEXT, --
votesmart_id TEXT, --
bioguide_id TEXT primary key,
nickname_name TEXT, --
official_full_name TEXT, --
house_history_alternate_id TEXT, -- Example Values: `13283.0` | Value Statics: Total count 1 - Distinct count 1 - Null count 11863
gender_bio TEXT, -- Example Values: `M`, `F` | Value Statics: Total count 11864 - Distinct count 2 - Null count 0
bioguide_previous_id TEXT, -- Example Values: `['F000246']`, `['L000266']`, `['W000790']` | Value Statics: Total count 3 - Distinct count 3 - Null count 11861
icpsr_id REAL, --
wikipedia_id TEXT, --
birthday_bio TEXT, --
religion_bio TEXT, --
lis_id TEXT, --
middle_name TEXT, --
cspan_id TEXT, --
last_name TEXT, --
first_name TEXT, --
wikidata_id TEXT, --
thomas_id TEXT, --
ballotpedia_id TEXT, --
maplight_id TEXT, --
google_entity_id_id TEXT, --
);
CREATE TABLE historical-terms
(
bioguide TEXT primary key,
middle TEXT, --
title TEXT, -- Example Values: `Majority Leader`, `Speaker` | Value Statics: Total count 3 - Distinct count 2 - Null count 11861
party TEXT, --
type TEXT, -- Example Values: `sen`, `rep` | Value Statics: Total count 11858 - Distinct count 2 - Null count 6
phone TEXT, --
rss_url TEXT, -- Example Values: `http://radel.house.gov/news/rss.aspx`, `http://www.begich.senate.gov/public/?a=rss.feed`, `http://www.hagan.senate.gov/rss`, `http://negretemcleod.house.gov/rss.xml`, `http://garcia.house.gov/rss.xml` | Value Statics: Total count 12 - Distinct count 12 - Null count 11852
name TEXT, --
start TEXT, --
address TEXT, --
party_affiliations TEXT, -- Example Values: `{'start': '2009-01-06', 'end': '2009-12-22', 'party': 'Democrat'}`, `{'start': '2003-01-07', 'end': '2004-08-09', 'party': 'Democrat'}` | Value Statics: Total count 2 - Distinct count 2 - Null count 11862
relation TEXT, --
state_rank TEXT, -- Example Values: `junior`, `senior` | Value Statics: Total count 7 - Distinct count 2 - Null count 11857
last TEXT, -- Example Values: `Levy`, `Lambert`, `Bono` | Value Statics: Total count 3 - Distinct count 3 - Null count 11861
url TEXT, --
fax TEXT, --
contact_form TEXT, --
office TEXT, --
state TEXT, --
foreign key (bioguide) references historical(bioguide_id),
class REAL, -- Example Values: `2.0`, `1.0`, `3.0` | Value Statics: Total count 1256 - Distinct count 3 - Null count 10608
end TEXT, --
district REAL, --
chamber TEXT, -- Example Values: `house`, `senate` | Value Statics: Total count 3 - Distinct count 2 - Null count 11861
);
CREATE TABLE current-terms
(
foreign key (bioguide) references current(bioguide_id),
phone TEXT, --
party_affiliations TEXT, -- Example Values: `{'start': '2009-01-06', 'end': '2009-02-23', 'party': 'Independent'}`, `{'start': '1993-01-05', 'end': '1994-11-09', 'party': 'Democrat'}` | Value Statics: Total count 2 - Distinct count 2 - Null count 3076
title TEXT, -- Example Values: `Minority Whip`, `Majority Whip`, `Minority Leader`, `Majority Leader`, `Speaker` | Value Statics: Total count 28 - Distinct count 5 - Null count 3050
district REAL, --
bioguide TEXT, --
office TEXT, --
class REAL, -- Example Values: `1.0`, `2.0`, `3.0` | Value Statics: Total count 244 - Distinct count 3 - Null count 2834
type TEXT, -- Example Values: `rep`, `sen` | Value Statics: Total count 3014 - Distinct count 2 - Null count 64
start TEXT, --
address TEXT, --
rss_url TEXT, --
url TEXT, --
primary key (bioguide, end),
fax TEXT, --
chamber TEXT, -- Example Values: `senate`, `house` | Value Statics: Total count 28 - Distinct count 2 - Null count 3050
end TEXT, --
caucus TEXT, -- Example Values: `Democrat` | Value Statics: Total count 3 - Distinct count 1 - Null count 3075
state TEXT, --
last TEXT, -- Example Values: `Menendez` | Value Statics: Total count 1 - Distinct count 1 - Null count 3077
relation TEXT, -- Example Values: `son`, `nephew`, `cousin`, `daughter`, `grandson` | Value Statics: Total count 35 - Distinct count 13 - Null count 3043
state_rank TEXT, -- Example Values: `senior`, `junior` | Value Statics: Total count 147 - Distinct count 2 - Null count 2931
name TEXT, --
contact_form TEXT, --
party TEXT, -- Example Values: `Democrat`, `Republican`, `Independent` | Value Statics: Total count 3014 - Distinct count 3 - Null count 64
);
CREATE TABLE social-media
(
foreign key (bioguide) references current(bioguide_id),
instagram TEXT, --
thomas INTEGER, --
youtube TEXT, --
twitter TEXT, --
facebook TEXT, --
youtube_id TEXT, --
twitter_id REAL, --
facebook_id REAL, --
govtrack REAL, --
bioguide TEXT primary key,
instagram_id REAL, --
); |
shakespeare | What is the average number of characters in all the works of Shakespeare? | average number = divide(sum(character_id), count(work_id)) | SELECT SUM(DISTINCT T4.id) / COUNT(T1.id) FROM works AS T1 INNER JOIN chapters AS T2 ON T1.id = T2.work_id INNER JOIN paragraphs AS T3 ON T2.id = T3.chapter_id INNER JOIN characters AS T4 ON T3.character_id = T4.id | CREATE TABLE characters
(
CharName TEXT not null, --
Abbrev TEXT not null, --
Description TEXT not null, --
id INTEGER primary key autoincrement,
);
CREATE TABLE paragraphs
(
chapter_id INTEGER default 0 not null references chapters, --
character_id INTEGER not null references characters, --
ParagraphNum INTEGER not null, --
PlainText TEXT not null, --
id INTEGER primary key autoincrement,
);
CREATE TABLE works
(
GenreType TEXT not null, -- Example Values: `Comedy`, `Tragedy`, `History`, `Poem`, `Sonnet` | Value Statics: Total count 43 - Distinct count 5 - Null count 0
Title TEXT not null, --
Date INTEGER not null, --
id INTEGER primary key autoincrement,
LongTitle TEXT not null, --
);
CREATE TABLE chapters
(
work_id INTEGER not null references works, --
Act INTEGER not null, -- Example Values: `1`, `2`, `3`, `4`, `5` | Value Statics: Total count 945 - Distinct count 6 - Null count 0
Description TEXT not null, --
id INTEGER primary key autoincrement,
Scene INTEGER not null, --
); |
legislator | Provide the facebook ID of the facebook account named "RepWilson". | null | SELECT facebook_id FROM `social-media` WHERE facebook = 'RepWilson' | CREATE TABLE current
(
gender_bio TEXT, -- Example Values: `M`, `F` | Value Statics: Total count 541 - Distinct count 2 - Null count 0
suffix_name TEXT, -- Example Values: `Jr.`, `III`, `II` | Value Statics: Total count 20 - Distinct count 3 - Null count 521
house_history_id REAL, --
birthday_bio DATE, --
nickname_name TEXT, --
religion_bio TEXT, --
google_entity_id_id TEXT, --
govtrack_id INTEGER, --
cspan_id REAL, --
primary key (bioguide_id, cspan_id),
wikipedia_id TEXT, --
maplight_id REAL, --
last_name TEXT, --
icpsr_id REAL, --
fec_id TEXT, --
votesmart_id REAL, --
first_name TEXT, --
lis_id TEXT, --
bioguide_id TEXT, --
wikidata_id TEXT, --
middle_name TEXT, --
ballotpedia_id TEXT, --
opensecrets_id TEXT, --
official_full_name TEXT, --
thomas_id INTEGER, --
);
CREATE TABLE historical
(
fec_id TEXT, --
suffix_name TEXT, -- Example Values: `Jr.`, `Sr.`, `II`, `III`, `IV` | Value Statics: Total count 418 - Distinct count 5 - Null count 11446
govtrack_id INTEGER, --
house_history_id REAL, --
opensecrets_id TEXT, --
votesmart_id TEXT, --
bioguide_id TEXT primary key,
nickname_name TEXT, --
official_full_name TEXT, --
house_history_alternate_id TEXT, -- Example Values: `13283.0` | Value Statics: Total count 1 - Distinct count 1 - Null count 11863
gender_bio TEXT, -- Example Values: `M`, `F` | Value Statics: Total count 11864 - Distinct count 2 - Null count 0
bioguide_previous_id TEXT, -- Example Values: `['F000246']`, `['L000266']`, `['W000790']` | Value Statics: Total count 3 - Distinct count 3 - Null count 11861
icpsr_id REAL, --
wikipedia_id TEXT, --
birthday_bio TEXT, --
religion_bio TEXT, --
lis_id TEXT, --
middle_name TEXT, --
cspan_id TEXT, --
last_name TEXT, --
first_name TEXT, --
wikidata_id TEXT, --
thomas_id TEXT, --
ballotpedia_id TEXT, --
maplight_id TEXT, --
google_entity_id_id TEXT, --
);
CREATE TABLE historical-terms
(
bioguide TEXT primary key,
middle TEXT, --
title TEXT, -- Example Values: `Majority Leader`, `Speaker` | Value Statics: Total count 3 - Distinct count 2 - Null count 11861
party TEXT, --
type TEXT, -- Example Values: `sen`, `rep` | Value Statics: Total count 11858 - Distinct count 2 - Null count 6
phone TEXT, --
rss_url TEXT, -- Example Values: `http://radel.house.gov/news/rss.aspx`, `http://www.begich.senate.gov/public/?a=rss.feed`, `http://www.hagan.senate.gov/rss`, `http://negretemcleod.house.gov/rss.xml`, `http://garcia.house.gov/rss.xml` | Value Statics: Total count 12 - Distinct count 12 - Null count 11852
name TEXT, --
start TEXT, --
address TEXT, --
party_affiliations TEXT, -- Example Values: `{'start': '2009-01-06', 'end': '2009-12-22', 'party': 'Democrat'}`, `{'start': '2003-01-07', 'end': '2004-08-09', 'party': 'Democrat'}` | Value Statics: Total count 2 - Distinct count 2 - Null count 11862
relation TEXT, --
state_rank TEXT, -- Example Values: `junior`, `senior` | Value Statics: Total count 7 - Distinct count 2 - Null count 11857
last TEXT, -- Example Values: `Levy`, `Lambert`, `Bono` | Value Statics: Total count 3 - Distinct count 3 - Null count 11861
url TEXT, --
fax TEXT, --
contact_form TEXT, --
office TEXT, --
state TEXT, --
foreign key (bioguide) references historical(bioguide_id),
class REAL, -- Example Values: `2.0`, `1.0`, `3.0` | Value Statics: Total count 1256 - Distinct count 3 - Null count 10608
end TEXT, --
district REAL, --
chamber TEXT, -- Example Values: `house`, `senate` | Value Statics: Total count 3 - Distinct count 2 - Null count 11861
);
CREATE TABLE current-terms
(
foreign key (bioguide) references current(bioguide_id),
phone TEXT, --
party_affiliations TEXT, -- Example Values: `{'start': '2009-01-06', 'end': '2009-02-23', 'party': 'Independent'}`, `{'start': '1993-01-05', 'end': '1994-11-09', 'party': 'Democrat'}` | Value Statics: Total count 2 - Distinct count 2 - Null count 3076
title TEXT, -- Example Values: `Minority Whip`, `Majority Whip`, `Minority Leader`, `Majority Leader`, `Speaker` | Value Statics: Total count 28 - Distinct count 5 - Null count 3050
district REAL, --
bioguide TEXT, --
office TEXT, --
class REAL, -- Example Values: `1.0`, `2.0`, `3.0` | Value Statics: Total count 244 - Distinct count 3 - Null count 2834
type TEXT, -- Example Values: `rep`, `sen` | Value Statics: Total count 3014 - Distinct count 2 - Null count 64
start TEXT, --
address TEXT, --
rss_url TEXT, --
url TEXT, --
primary key (bioguide, end),
fax TEXT, --
chamber TEXT, -- Example Values: `senate`, `house` | Value Statics: Total count 28 - Distinct count 2 - Null count 3050
end TEXT, --
caucus TEXT, -- Example Values: `Democrat` | Value Statics: Total count 3 - Distinct count 1 - Null count 3075
state TEXT, --
last TEXT, -- Example Values: `Menendez` | Value Statics: Total count 1 - Distinct count 1 - Null count 3077
relation TEXT, -- Example Values: `son`, `nephew`, `cousin`, `daughter`, `grandson` | Value Statics: Total count 35 - Distinct count 13 - Null count 3043
state_rank TEXT, -- Example Values: `senior`, `junior` | Value Statics: Total count 147 - Distinct count 2 - Null count 2931
name TEXT, --
contact_form TEXT, --
party TEXT, -- Example Values: `Democrat`, `Republican`, `Independent` | Value Statics: Total count 3014 - Distinct count 3 - Null count 64
);
CREATE TABLE social-media
(
foreign key (bioguide) references current(bioguide_id),
instagram TEXT, --
thomas INTEGER, --
youtube TEXT, --
twitter TEXT, --
facebook TEXT, --
youtube_id TEXT, --
twitter_id REAL, --
facebook_id REAL, --
govtrack REAL, --
bioguide TEXT primary key,
instagram_id REAL, --
); |
shakespeare | How many comedies did Shakespeare create? | comedies refers to GenreType = 'Comedy' | SELECT COUNT(id) FROM works WHERE GenreType = 'Comedy' | CREATE TABLE characters
(
CharName TEXT not null, --
Abbrev TEXT not null, --
Description TEXT not null, --
id INTEGER primary key autoincrement,
);
CREATE TABLE paragraphs
(
chapter_id INTEGER default 0 not null references chapters, --
character_id INTEGER not null references characters, --
ParagraphNum INTEGER not null, --
PlainText TEXT not null, --
id INTEGER primary key autoincrement,
);
CREATE TABLE works
(
GenreType TEXT not null, -- Example Values: `Comedy`, `Tragedy`, `History`, `Poem`, `Sonnet` | Value Statics: Total count 43 - Distinct count 5 - Null count 0
Title TEXT not null, --
Date INTEGER not null, --
id INTEGER primary key autoincrement,
LongTitle TEXT not null, --
);
CREATE TABLE chapters
(
work_id INTEGER not null references works, --
Act INTEGER not null, -- Example Values: `1`, `2`, `3`, `4`, `5` | Value Statics: Total count 945 - Distinct count 6 - Null count 0
Description TEXT not null, --
id INTEGER primary key autoincrement,
Scene INTEGER not null, --
); |
legislator | What is the total number of legislators with "John" as their first name? | null | SELECT COUNT(*) FROM current WHERE first_name = 'John' | CREATE TABLE current
(
gender_bio TEXT, -- Example Values: `M`, `F` | Value Statics: Total count 541 - Distinct count 2 - Null count 0
suffix_name TEXT, -- Example Values: `Jr.`, `III`, `II` | Value Statics: Total count 20 - Distinct count 3 - Null count 521
house_history_id REAL, --
birthday_bio DATE, --
nickname_name TEXT, --
religion_bio TEXT, --
google_entity_id_id TEXT, --
govtrack_id INTEGER, --
cspan_id REAL, --
primary key (bioguide_id, cspan_id),
wikipedia_id TEXT, --
maplight_id REAL, --
last_name TEXT, --
icpsr_id REAL, --
fec_id TEXT, --
votesmart_id REAL, --
first_name TEXT, --
lis_id TEXT, --
bioguide_id TEXT, --
wikidata_id TEXT, --
middle_name TEXT, --
ballotpedia_id TEXT, --
opensecrets_id TEXT, --
official_full_name TEXT, --
thomas_id INTEGER, --
);
CREATE TABLE historical
(
fec_id TEXT, --
suffix_name TEXT, -- Example Values: `Jr.`, `Sr.`, `II`, `III`, `IV` | Value Statics: Total count 418 - Distinct count 5 - Null count 11446
govtrack_id INTEGER, --
house_history_id REAL, --
opensecrets_id TEXT, --
votesmart_id TEXT, --
bioguide_id TEXT primary key,
nickname_name TEXT, --
official_full_name TEXT, --
house_history_alternate_id TEXT, -- Example Values: `13283.0` | Value Statics: Total count 1 - Distinct count 1 - Null count 11863
gender_bio TEXT, -- Example Values: `M`, `F` | Value Statics: Total count 11864 - Distinct count 2 - Null count 0
bioguide_previous_id TEXT, -- Example Values: `['F000246']`, `['L000266']`, `['W000790']` | Value Statics: Total count 3 - Distinct count 3 - Null count 11861
icpsr_id REAL, --
wikipedia_id TEXT, --
birthday_bio TEXT, --
religion_bio TEXT, --
lis_id TEXT, --
middle_name TEXT, --
cspan_id TEXT, --
last_name TEXT, --
first_name TEXT, --
wikidata_id TEXT, --
thomas_id TEXT, --
ballotpedia_id TEXT, --
maplight_id TEXT, --
google_entity_id_id TEXT, --
);
CREATE TABLE historical-terms
(
bioguide TEXT primary key,
middle TEXT, --
title TEXT, -- Example Values: `Majority Leader`, `Speaker` | Value Statics: Total count 3 - Distinct count 2 - Null count 11861
party TEXT, --
type TEXT, -- Example Values: `sen`, `rep` | Value Statics: Total count 11858 - Distinct count 2 - Null count 6
phone TEXT, --
rss_url TEXT, -- Example Values: `http://radel.house.gov/news/rss.aspx`, `http://www.begich.senate.gov/public/?a=rss.feed`, `http://www.hagan.senate.gov/rss`, `http://negretemcleod.house.gov/rss.xml`, `http://garcia.house.gov/rss.xml` | Value Statics: Total count 12 - Distinct count 12 - Null count 11852
name TEXT, --
start TEXT, --
address TEXT, --
party_affiliations TEXT, -- Example Values: `{'start': '2009-01-06', 'end': '2009-12-22', 'party': 'Democrat'}`, `{'start': '2003-01-07', 'end': '2004-08-09', 'party': 'Democrat'}` | Value Statics: Total count 2 - Distinct count 2 - Null count 11862
relation TEXT, --
state_rank TEXT, -- Example Values: `junior`, `senior` | Value Statics: Total count 7 - Distinct count 2 - Null count 11857
last TEXT, -- Example Values: `Levy`, `Lambert`, `Bono` | Value Statics: Total count 3 - Distinct count 3 - Null count 11861
url TEXT, --
fax TEXT, --
contact_form TEXT, --
office TEXT, --
state TEXT, --
foreign key (bioguide) references historical(bioguide_id),
class REAL, -- Example Values: `2.0`, `1.0`, `3.0` | Value Statics: Total count 1256 - Distinct count 3 - Null count 10608
end TEXT, --
district REAL, --
chamber TEXT, -- Example Values: `house`, `senate` | Value Statics: Total count 3 - Distinct count 2 - Null count 11861
);
CREATE TABLE current-terms
(
foreign key (bioguide) references current(bioguide_id),
phone TEXT, --
party_affiliations TEXT, -- Example Values: `{'start': '2009-01-06', 'end': '2009-02-23', 'party': 'Independent'}`, `{'start': '1993-01-05', 'end': '1994-11-09', 'party': 'Democrat'}` | Value Statics: Total count 2 - Distinct count 2 - Null count 3076
title TEXT, -- Example Values: `Minority Whip`, `Majority Whip`, `Minority Leader`, `Majority Leader`, `Speaker` | Value Statics: Total count 28 - Distinct count 5 - Null count 3050
district REAL, --
bioguide TEXT, --
office TEXT, --
class REAL, -- Example Values: `1.0`, `2.0`, `3.0` | Value Statics: Total count 244 - Distinct count 3 - Null count 2834
type TEXT, -- Example Values: `rep`, `sen` | Value Statics: Total count 3014 - Distinct count 2 - Null count 64
start TEXT, --
address TEXT, --
rss_url TEXT, --
url TEXT, --
primary key (bioguide, end),
fax TEXT, --
chamber TEXT, -- Example Values: `senate`, `house` | Value Statics: Total count 28 - Distinct count 2 - Null count 3050
end TEXT, --
caucus TEXT, -- Example Values: `Democrat` | Value Statics: Total count 3 - Distinct count 1 - Null count 3075
state TEXT, --
last TEXT, -- Example Values: `Menendez` | Value Statics: Total count 1 - Distinct count 1 - Null count 3077
relation TEXT, -- Example Values: `son`, `nephew`, `cousin`, `daughter`, `grandson` | Value Statics: Total count 35 - Distinct count 13 - Null count 3043
state_rank TEXT, -- Example Values: `senior`, `junior` | Value Statics: Total count 147 - Distinct count 2 - Null count 2931
name TEXT, --
contact_form TEXT, --
party TEXT, -- Example Values: `Democrat`, `Republican`, `Independent` | Value Statics: Total count 3014 - Distinct count 3 - Null count 64
);
CREATE TABLE social-media
(
foreign key (bioguide) references current(bioguide_id),
instagram TEXT, --
thomas INTEGER, --
youtube TEXT, --
twitter TEXT, --
facebook TEXT, --
youtube_id TEXT, --
twitter_id REAL, --
facebook_id REAL, --
govtrack REAL, --
bioguide TEXT primary key,
instagram_id REAL, --
); |
professional_basketball | What's the full name of the team that won the most games in 2001 but didn't make the playoffs? | full name of the team refers to teams.name; in 2001 refers to year = 2001; didn't make the playoffs refers to PostGP = 0; won the most games refers to max(won) | SELECT T2.tmID FROM players_teams AS T1 INNER JOIN teams AS T2 ON T1.tmID = T2.tmID AND T1.year = T2.year WHERE T1.PostGP = 0 ORDER BY T2.won DESC LIMIT 1 | CREATE TABLE players_teams
(
PostGS INTEGER, --
PostdRebounds INTEGER, --
PostPF INTEGER, --
tmID TEXT, --
threeAttempted INTEGER, --
PostRebounds INTEGER, --
assists INTEGER, --
threeMade INTEGER, --
PostBlocks INTEGER, --
PostTurnovers INTEGER, --
GP INTEGER, --
lgID TEXT, -- Example Values: `NBA`, `NBL`, `ABA`, `ABL1`, `NPBL` | Value Statics: Total count 23751 - Distinct count 6 - Null count 0
foreign key (tmID, year) references teams (tmID, year) on update cascade on delete cascade,
PostfgMade INTEGER, --
steals INTEGER, --
oRebounds INTEGER, --
PostftAttempted INTEGER, --
ftAttempted INTEGER, --
ftMade INTEGER, --
points INTEGER, --
PostfgAttempted INTEGER, --
PostftMade INTEGER, --
note TEXT, -- Example Values: `C` | Value Statics: Total count 43 - Distinct count 1 - Null count 23708
dRebounds INTEGER, --
PostSteals INTEGER, --
blocks INTEGER, --
PostAssists INTEGER, --
minutes INTEGER, --
fgAttempted INTEGER, --
playerID TEXT not null references players on update cascade on delete cascade, --
PostthreeMade INTEGER, --
PostPoints INTEGER, --
year INTEGER, --
PF INTEGER, --
fgMade INTEGER, --
PostthreeAttempted INTEGER, --
rebounds INTEGER, --
id INTEGER primary key autoincrement,
stint INTEGER, -- Example Values: `1`, `2`, `0`, `3`, `4` | Value Statics: Total count 23751 - Distinct count 6 - Null count 0
PostMinutes INTEGER, --
PostGP INTEGER, --
turnovers INTEGER, --
PostoRebounds INTEGER, --
GS INTEGER, --
);
CREATE TABLE awards_coaches
(
award TEXT, -- Example Values: `NBA Coach of the Year`, `ABA Coach of the Year` | Value Statics: Total count 61 - Distinct count 2 - Null count 0
id INTEGER primary key autoincrement,
note TEXT, -- Example Values: `tie` | Value Statics: Total count 4 - Distinct count 1 - Null count 57
coachID TEXT, --
lgID TEXT, -- Example Values: `NBA`, `ABA` | Value Statics: Total count 61 - Distinct count 2 - Null count 0
foreign key (coachID, year) references coaches (coachID, year) on update cascade on delete cascade,
year INTEGER, --
);
CREATE TABLE draft
(
draftOverall INTEGER null, --
lgID TEXT null, -- Example Values: `ABA`, `NBA` | Value Statics: Total count 8621 - Distinct count 2 - Null count 0
suffixName TEXT null, -- Example Values: `Jr.` | Value Statics: Total count 2 - Distinct count 1 - Null count 8619
draftYear INTEGER null, --
draftSelection INTEGER null, --
tmID TEXT null, --
draftRound INTEGER null, --
lastName TEXT null, --
playerID TEXT null, --
draftFrom TEXT null, --
id INTEGER default 0 not null primary key,
firstName TEXT null, --
foreign key (tmID, draftYear) references teams (tmID, year) on update cascade on delete cascade,
foreign key (tmID, draftYear) references teams (tmID, year) on update cascade on delete cascade,
);
CREATE TABLE player_allstar
(
rebounds INTEGER null, --
playerID TEXT not null, --
season_id INTEGER not null, --
assists INTEGER null, --
conference TEXT null, -- Example Values: `East`, `West`, `Weset`, `Allstars`, `Denver` | Value Statics: Total count 1608 - Distinct count 5 - Null count 0
points INTEGER null, --
personal_fouls INTEGER null, -- Example Values: `3`, `2`, `0`, `1`, `5` | Value Statics: Total count 540 - Distinct count 8 - Null count 1068
ft_attempted INTEGER null, -- Example Values: `2`, `4`, `0`, `6`, `3` | Value Statics: Total count 1561 - Distinct count 17 - Null count 47
fg_attempted INTEGER null, --
league_id TEXT null, -- Example Values: `NBA`, `ABA` | Value Statics: Total count 1608 - Distinct count 2 - Null count 0
foreign key (playerID) references players (playerID) on update cascade on delete cascade,
fg_made INTEGER null, -- Example Values: `4`, `8`, `5`, `7`, `3` | Value Statics: Total count 1561 - Distinct count 18 - Null count 47
ft_made INTEGER null, -- Example Values: `2`, `3`, `0`, `1`, `4` | Value Statics: Total count 1561 - Distinct count 13 - Null count 47
steals INTEGER null, -- Example Values: `3`, `0`, `1`, `2`, `5` | Value Statics: Total count 398 - Distinct count 7 - Null count 1210
games_played INTEGER null, -- Example Values: `1` | Value Statics: Total count 1608 - Distinct count 1 - Null count 0
first_name TEXT null, --
d_rebounds INTEGER null, -- Example Values: `2`, `5`, `0`, `1`, `4` | Value Statics: Total count 493 - Distinct count 14 - Null count 1115
last_name TEXT null, --
primary key (playerID, season_id),
turnovers INTEGER null, -- Example Values: `1`, `0`, `3`, `2`, `4` | Value Statics: Total count 493 - Distinct count 9 - Null count 1115
three_made INTEGER null, -- Example Values: `0`, `1`, `3`, `5`, `4` | Value Statics: Total count 566 - Distinct count 7 - Null count 1042
minutes INTEGER null, --
blocks INTEGER null, -- Example Values: `2`, `0`, `1`, `3`, `5` | Value Statics: Total count 398 - Distinct count 6 - Null count 1210
three_attempted INTEGER null, -- Example Values: `0`, `1`, `6`, `7`, `10` | Value Statics: Total count 540 - Distinct count 12 - Null count 1068
o_rebounds INTEGER null, -- Example Values: `1`, `2`, `0`, `3`, `4` | Value Statics: Total count 493 - Distinct count 10 - Null count 1115
);
CREATE TABLE awards_players
(
foreign key (playerID) references players (playerID) on update cascade on delete cascade,
year INTEGER not null, --
pos TEXT null, -- Example Values: `C`, `F`, `G`, `F/G`, `F/C` | Value Statics: Total count 833 - Distinct count 5 - Null count 886
primary key (playerID, year, award),
lgID TEXT null, -- Example Values: `NBA`, `ABA`, `NBL`, `ABL1` | Value Statics: Total count 1719 - Distinct count 4 - Null count 0
award TEXT not null, --
playerID TEXT not null, --
note TEXT null, -- Example Values: `tie` | Value Statics: Total count 37 - Distinct count 1 - Null count 1682
);
CREATE TABLE series_post
(
tmIDLoser TEXT, --
id INTEGER primary key autoincrement,
series TEXT, -- Example Values: `O`, `M`, `N`, `A`, `K` | Value Statics: Total count 775 - Distinct count 11 - Null count 0
tmIDWinner TEXT, --
round TEXT, -- Example Values: `F`, `QF`, `SF`, `DT`, `DF` | Value Statics: Total count 775 - Distinct count 11 - Null count 0
year INTEGER, --
foreign key (tmIDLoser, year) references teams (tmID, year) on update cascade on delete cascade,
foreign key (tmIDWinner, year) references teams (tmID, year) on update cascade on delete cascade,
W INTEGER, -- Example Values: `4`, `2`, `1`, `3`, `0` | Value Statics: Total count 775 - Distinct count 5 - Null count 0
lgIDLoser TEXT, -- Example Values: `NBA`, `ABA` | Value Statics: Total count 775 - Distinct count 2 - Null count 0
lgIDWinner TEXT, -- Example Values: `NBA`, `ABA` | Value Statics: Total count 775 - Distinct count 2 - Null count 0
L INTEGER, -- Example Values: `1`, `0`, `2`, `3`, `4` | Value Statics: Total count 775 - Distinct count 5 - Null count 0
);
CREATE TABLE players
(
nameGiven TEXT null, -- Example Values: `nameGiven`, `Mort`, `Robert`, `Jim`, `Mike` | Value Statics: Total count 10 - Distinct count 9 - Null count 5052
lastseason INTEGER null, -- Example Values: `0`, `1951` | Value Statics: Total count 5047 - Distinct count 2 - Null count 15
hsCountry TEXT null, --
firstName TEXT null, --
hsCity TEXT null, --
firstseason INTEGER null, -- Example Values: `0`, `1951` | Value Statics: Total count 5047 - Distinct count 2 - Null count 15
weight INTEGER null, --
birthCountry TEXT null, --
race TEXT null, -- Example Values: `B`, `W`, `O`, `1`, `r` | Value Statics: Total count 4903 - Distinct count 5 - Null count 159
lastName TEXT null, --
birthDate DATE null, --
collegeOther TEXT null, --
birthState TEXT null, --
useFirst TEXT null, --
pos TEXT null, -- Example Values: `F-C`, `C`, `G`, `G-F`, `C-F` | Value Statics: Total count 4880 - Distinct count 14 - Null count 182
playerID TEXT not null primary key,
college TEXT null, --
highSchool TEXT null, --
hsState TEXT null, --
height REAL null, --
deathDate DATE null, --
nameSuffix TEXT null, -- Example Values: `Jr.`, `III`, `nameSuffix`, `II`, `IV` | Value Statics: Total count 324 - Distinct count 6 - Null count 4738
nameNick TEXT null, --
fullGivenName TEXT null, --
birthCity TEXT null, --
middleName TEXT null, --
);
CREATE TABLE teams
(
d_pts INTEGER null, --
name TEXT null, --
homeLost INTEGER null, --
o_ftm INTEGER null, --
franchID TEXT null, --
tmID TEXT not null, --
awayWon INTEGER null, --
primary key (year, tmID),
o_fgm INTEGER null, --
year INTEGER not null, --
awayLost INTEGER null, --
arena TEXT null, --
confID TEXT null, -- Example Values: `EC`, `WC` | Value Statics: Total count 1064 - Distinct count 2 - Null count 472
games INTEGER null, --
lost INTEGER null, --
divID TEXT null, -- Example Values: `EA`, `WE`, `ED`, `WD`, `SO` | Value Statics: Total count 1498 - Distinct count 13 - Null count 38
lgID TEXT null, -- Example Values: `NBL`, `NBA`, `PBLA`, `NPBL`, `ABL1` | Value Statics: Total count 1536 - Distinct count 6 - Null count 0
homeWon INTEGER null, --
confRank INTEGER null, -- Example Values: `0`, `4`, `3`, `5`, `7` | Value Statics: Total count 1536 - Distinct count 16 - Null count 0
o_pts INTEGER null, --
`rank` INTEGER null, -- Example Values: `1`, `2`, `4`, `5`, `6` | Value Statics: Total count 1536 - Distinct count 10 - Null count 0
playoff TEXT null, -- Example Values: `CF`, `WC`, `LC`, `CS`, `F` | Value Statics: Total count 901 - Distinct count 15 - Null count 635
won INTEGER null, --
);
CREATE TABLE coaches
(
primary key (coachID, year, tmID, stint),
lgID TEXT null, -- Example Values: `NBA`, `ABA`, `ABL1`, `PBLA`, `NPBL` | Value Statics: Total count 1689 - Distinct count 5 - Null count 0
post_losses INTEGER null, -- Example Values: `3`, `9`, `7`, `8`, `0` | Value Statics: Total count 1649 - Distinct count 12 - Null count 40
year INTEGER not null, --
won INTEGER null, --
foreign key (tmID, year) references teams (tmID, year) on update cascade on delete cascade,
post_wins INTEGER null, -- Example Values: `0`, `12`, `9`, `13`, `1` | Value Statics: Total count 1649 - Distinct count 17 - Null count 40
coachID TEXT not null, --
tmID TEXT not null, --
lost INTEGER null, --
stint INTEGER not null, -- Example Values: `2`, `1`, `4`, `5`, `3` | Value Statics: Total count 1689 - Distinct count 5 - Null count 0
); |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.