answer stringlengths 6 3.91k | question stringlengths 7 766 | context stringlengths 27 7.14k |
|---|---|---|
SELECT TagName, COUNT(p.Id) AS k FROM Posts AS p INNER JOIN PostTags AS pt ON p.Id = pt.PostId INNER JOIN Tags AS t ON pt.TagId = t.Id WHERE p.PostTypeId = 1 GROUP BY TagName ORDER BY COUNT(p.Id) DESC | Questions per tag ever before. | CREATE TABLE PostLinks (
Id number,
CreationDate time,
PostId number,
RelatedPostId number,
LinkTypeId number
)
CREATE TABLE PostTypes (
Id number,
Name text
)
CREATE TABLE ReviewRejectionReasons (
Id number,
Name text,
Description text,
PostTypeId number
)
CREATE TABLE PostTags (
PostId number,
TagId number
)
CREATE TABLE PostNoticeTypes (
Id number,
ClassId number,
Name text,
Body text,
IsHidden boolean,
Predefined boolean,
PostNoticeDurationId number
)
CREATE TABLE PendingFlags (
Id number,
FlagTypeId number,
PostId number,
CreationDate time,
CloseReasonTypeId number,
CloseAsOffTopicReasonTypeId number,
DuplicateOfQuestionId number,
BelongsOnBaseHostAddress text
)
CREATE TABLE PostFeedback (
Id number,
PostId number,
IsAnonymous boolean,
VoteTypeId number,
CreationDate time
)
CREATE TABLE CloseAsOffTopicReasonTypes (
Id number,
IsUniversal boolean,
InputTitle text,
MarkdownInputGuidance text,
MarkdownPostOwnerGuidance text,
MarkdownPrivilegedUserGuidance text,
MarkdownConcensusDescription text,
CreationDate time,
CreationModeratorId number,
ApprovalDate time,
ApprovalModeratorId number,
DeactivationDate time,
DeactivationModeratorId number
)
CREATE TABLE ReviewTaskTypes (
Id number,
Name text,
Description text
)
CREATE TABLE CloseReasonTypes (
Id number,
Name text,
Description text
)
CREATE TABLE PostNotices (
Id number,
PostId number,
PostNoticeTypeId number,
CreationDate time,
DeletionDate time,
ExpiryDate time,
Body text,
OwnerUserId number,
DeletionUserId number
)
CREATE TABLE Tags (
Id number,
TagName text,
Count number,
ExcerptPostId number,
WikiPostId number
)
CREATE TABLE PostHistoryTypes (
Id number,
Name text
)
CREATE TABLE PostHistory (
Id number,
PostHistoryTypeId number,
PostId number,
RevisionGUID other,
CreationDate time,
UserId number,
UserDisplayName text,
Comment text,
Text text,
ContentLicense text
)
CREATE TABLE ReviewTaskResultTypes (
Id number,
Name text,
Description text
)
CREATE TABLE Posts (
Id number,
PostTypeId number,
AcceptedAnswerId number,
ParentId number,
CreationDate time,
DeletionDate time,
Score number,
ViewCount number,
Body text,
OwnerUserId number,
OwnerDisplayName text,
LastEditorUserId number,
LastEditorDisplayName text,
LastEditDate time,
LastActivityDate time,
Title text,
Tags text,
AnswerCount number,
CommentCount number,
FavoriteCount number,
ClosedDate time,
CommunityOwnedDate time,
ContentLicense text
)
CREATE TABLE ReviewTaskStates (
Id number,
Name text,
Description text
)
CREATE TABLE PostsWithDeleted (
Id number,
PostTypeId number,
AcceptedAnswerId number,
ParentId number,
CreationDate time,
DeletionDate time,
Score number,
ViewCount number,
Body text,
OwnerUserId number,
OwnerDisplayName text,
LastEditorUserId number,
LastEditorDisplayName text,
LastEditDate time,
LastActivityDate time,
Title text,
Tags text,
AnswerCount number,
CommentCount number,
FavoriteCount number,
ClosedDate time,
CommunityOwnedDate time,
ContentLicense text
)
CREATE TABLE Users (
Id number,
Reputation number,
CreationDate time,
DisplayName text,
LastAccessDate time,
WebsiteUrl text,
Location text,
AboutMe text,
Views number,
UpVotes number,
DownVotes number,
ProfileImageUrl text,
EmailHash text,
AccountId number
)
CREATE TABLE FlagTypes (
Id number,
Name text,
Description text
)
CREATE TABLE ReviewTasks (
Id number,
ReviewTaskTypeId number,
CreationDate time,
DeletionDate time,
ReviewTaskStateId number,
PostId number,
SuggestedEditId number,
CompletedByReviewTaskId number
)
CREATE TABLE Comments (
Id number,
PostId number,
Score number,
Text text,
CreationDate time,
UserDisplayName text,
UserId number,
ContentLicense text
)
CREATE TABLE SuggestedEdits (
Id number,
PostId number,
CreationDate time,
ApprovalDate time,
RejectionDate time,
OwnerUserId number,
Comment text,
Text text,
Title text,
Tags text,
RevisionGUID other
)
CREATE TABLE SuggestedEditVotes (
Id number,
SuggestedEditId number,
UserId number,
VoteTypeId number,
CreationDate time,
TargetUserId number,
TargetRepChange number
)
CREATE TABLE Votes (
Id number,
PostId number,
VoteTypeId number,
UserId number,
CreationDate time,
BountyAmount number
)
CREATE TABLE VoteTypes (
Id number,
Name text
)
CREATE TABLE ReviewTaskResults (
Id number,
ReviewTaskId number,
ReviewTaskResultTypeId number,
CreationDate time,
RejectionReasonId number,
Comment text
)
CREATE TABLE TagSynonyms (
Id number,
SourceTagName text,
TargetTagName text,
CreationDate time,
OwnerUserId number,
AutoRenameCount number,
LastAutoRename time,
Score number,
ApprovedByUserId number,
ApprovalDate time
)
CREATE TABLE Badges (
Id number,
UserId number,
Name text,
Date time,
Class number,
TagBased boolean
) |
SELECT home_team AS score FROM table_name_30 WHERE away_team = "hawthorn" | What did the home team score against the away team Hawthorn? | CREATE TABLE table_name_30 (home_team VARCHAR, away_team VARCHAR) |
SELECT in_county_tuition_per_credit_hour__fall_2009_ FROM table_22308881_2 WHERE college = "Gloucester" | How much was the cost of in-county tuition per credit hour at the Gloucester College by the fall of 2009? | CREATE TABLE table_22308881_2 (in_county_tuition_per_credit_hour__fall_2009_ VARCHAR, college VARCHAR) |
SELECT "2000" FROM table_39115 WHERE "2006" = '10–4' | 2006 of 10 4 is in which 2000? | CREATE TABLE table_39115 (
"Tournament" text,
"1998" text,
"2000" text,
"2001" text,
"2002" text,
"2003" text,
"2004" text,
"2005" text,
"2006" text,
"2007" text,
"2008" text,
"2009" text,
"2010" text,
"2011" text,
"2012" text,
"2013" text
) |
SELECT AVG(crowd) FROM table_name_38 WHERE venue = "western oval" | In the Western Oval venue, what is the average crowd? | CREATE TABLE table_name_38 (crowd INTEGER, venue VARCHAR) |
SELECT in_county_tuition_per_credit_hour__fall_2009_ FROM table_22308881_2 WHERE college = "Mercer" | How much was the in-county tuition per credit hour at the Mercer College by the fall of 2009? | CREATE TABLE table_22308881_2 (in_county_tuition_per_credit_hour__fall_2009_ VARCHAR, college VARCHAR) |
SELECT t3.labname FROM (SELECT t2.labname, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM (SELECT patient.uniquepid, treatment.treatmenttime FROM treatment JOIN patient ON treatment.patientunitstayid = patient.patientunitstayid WHERE treatment.treatmentname = 'beta blocker' AND DATETIME(treatment.treatmenttime, 'start of year') = DATETIME(CURRENT_TIME(), 'start of year', '-1 year')) AS t1 JOIN (SELECT patient.uniquepid, lab.labname, lab.labresulttime FROM lab JOIN patient ON lab.patientunitstayid = patient.patientunitstayid WHERE DATETIME(lab.labresulttime, 'start of year') = DATETIME(CURRENT_TIME(), 'start of year', '-1 year')) AS t2 ON t1.uniquepid = t2.uniquepid WHERE t1.treatmenttime < t2.labresulttime AND DATETIME(t1.treatmenttime, 'start of month') = DATETIME(t2.labresulttime, 'start of month') GROUP BY t2.labname) AS t3 WHERE t3.c1 <= 4 | what are the four most frequently ordered lab tests for patients who had previously received beta blocker within the same month, during the previous year? | CREATE TABLE allergy (
allergyid number,
patientunitstayid number,
drugname text,
allergyname text,
allergytime time
)
CREATE TABLE patient (
uniquepid text,
patienthealthsystemstayid number,
patientunitstayid number,
gender text,
age text,
ethnicity text,
hospitalid number,
wardid number,
admissionheight number,
admissionweight number,
dischargeweight number,
hospitaladmittime time,
hospitaladmitsource text,
unitadmittime time,
unitdischargetime time,
hospitaldischargetime time,
hospitaldischargestatus text
)
CREATE TABLE microlab (
microlabid number,
patientunitstayid number,
culturesite text,
organism text,
culturetakentime time
)
CREATE TABLE treatment (
treatmentid number,
patientunitstayid number,
treatmentname text,
treatmenttime time
)
CREATE TABLE cost (
costid number,
uniquepid text,
patienthealthsystemstayid number,
eventtype text,
eventid number,
chargetime time,
cost number
)
CREATE TABLE diagnosis (
diagnosisid number,
patientunitstayid number,
diagnosisname text,
diagnosistime time,
icd9code text
)
CREATE TABLE lab (
labid number,
patientunitstayid number,
labname text,
labresult number,
labresulttime time
)
CREATE TABLE medication (
medicationid number,
patientunitstayid number,
drugname text,
dosage text,
routeadmin text,
drugstarttime time,
drugstoptime time
)
CREATE TABLE intakeoutput (
intakeoutputid number,
patientunitstayid number,
cellpath text,
celllabel text,
cellvaluenumeric number,
intakeoutputtime time
)
CREATE TABLE vitalperiodic (
vitalperiodicid number,
patientunitstayid number,
temperature number,
sao2 number,
heartrate number,
respiration number,
systemicsystolic number,
systemicdiastolic number,
systemicmean number,
observationtime time
) |
SELECT crowd FROM table_name_23 WHERE away_team = "richmond" | When Richmond is the away team, what is the crowd size? | CREATE TABLE table_name_23 (crowd VARCHAR, away_team VARCHAR) |
SELECT replaced_by FROM table_22297198_3 WHERE date_of_vacancy = "12 Dec 2009" | Who was the replacement manager for the vacancy of 12 Dec 2009? | CREATE TABLE table_22297198_3 (replaced_by VARCHAR, date_of_vacancy VARCHAR) |
SELECT "Seats" FROM table_74657 WHERE "Net gain/loss" = '0' AND "Party" = 'swedish people''s party' | When the Swedish People's Party had a net gain/loss of 0, how many seats did they have? | CREATE TABLE table_74657 (
"Party" text,
"Seats" text,
"Net gain/loss" text,
"% of seats" text,
"% of votes" text
) |
SELECT name FROM table_name_60 WHERE round = 8 | Who is the person from round 8? | CREATE TABLE table_name_60 (name VARCHAR, round VARCHAR) |
SELECT team FROM table_22297198_3 WHERE outgoing_manager = "Alireza Mansourian" | What team did Alireza mansourian leave? | CREATE TABLE table_22297198_3 (team VARCHAR, outgoing_manager VARCHAR) |
SELECT lab.labresulttime FROM lab WHERE lab.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '027-73025' AND NOT patient.hospitaldischargetime IS NULL ORDER BY patient.hospitaladmittime DESC LIMIT 1)) ORDER BY lab.labresulttime LIMIT 1 | what was the first time patient 027-73025 during their last hospital encounter received a lab test? | CREATE TABLE cost (
costid number,
uniquepid text,
patienthealthsystemstayid number,
eventtype text,
eventid number,
chargetime time,
cost number
)
CREATE TABLE diagnosis (
diagnosisid number,
patientunitstayid number,
diagnosisname text,
diagnosistime time,
icd9code text
)
CREATE TABLE patient (
uniquepid text,
patienthealthsystemstayid number,
patientunitstayid number,
gender text,
age text,
ethnicity text,
hospitalid number,
wardid number,
admissionheight number,
admissionweight number,
dischargeweight number,
hospitaladmittime time,
hospitaladmitsource text,
unitadmittime time,
unitdischargetime time,
hospitaldischargetime time,
hospitaldischargestatus text
)
CREATE TABLE medication (
medicationid number,
patientunitstayid number,
drugname text,
dosage text,
routeadmin text,
drugstarttime time,
drugstoptime time
)
CREATE TABLE allergy (
allergyid number,
patientunitstayid number,
drugname text,
allergyname text,
allergytime time
)
CREATE TABLE vitalperiodic (
vitalperiodicid number,
patientunitstayid number,
temperature number,
sao2 number,
heartrate number,
respiration number,
systemicsystolic number,
systemicdiastolic number,
systemicmean number,
observationtime time
)
CREATE TABLE intakeoutput (
intakeoutputid number,
patientunitstayid number,
cellpath text,
celllabel text,
cellvaluenumeric number,
intakeoutputtime time
)
CREATE TABLE lab (
labid number,
patientunitstayid number,
labname text,
labresult number,
labresulttime time
)
CREATE TABLE microlab (
microlabid number,
patientunitstayid number,
culturesite text,
organism text,
culturetakentime time
)
CREATE TABLE treatment (
treatmentid number,
patientunitstayid number,
treatmentname text,
treatmenttime time
) |
SELECT AVG(round) FROM table_name_48 WHERE school = "arizona" AND pick > 100 | What is the round for Arizona with a pick over 100? | CREATE TABLE table_name_48 (round INTEGER, school VARCHAR, pick VARCHAR) |
SELECT manner_of_departure FROM table_22297198_3 WHERE outgoing_manager = "Majid Bagherinia" | Why did Majid bagherinia leave? | CREATE TABLE table_22297198_3 (manner_of_departure VARCHAR, outgoing_manager VARCHAR) |
SELECT location FROM table_23315271_2 WHERE circuit = "ACI Vallelunga circuit" | In which location is aci vallelunga circuit? | CREATE TABLE table_23315271_2 (
location VARCHAR,
circuit VARCHAR
) |
SELECT pick FROM table_name_66 WHERE position = "wide receiver" AND name = "johnny holloway" | What pick had a wide receiver named johnny holloway? | CREATE TABLE table_name_66 (pick VARCHAR, position VARCHAR, name VARCHAR) |
SELECT team FROM table_22297198_3 WHERE date_of_vacancy = "12 Dec 2009" | What team did a manager leave on 12 Dec 2009 | CREATE TABLE table_22297198_3 (team VARCHAR, date_of_vacancy VARCHAR) |
SELECT COUNT(*) > 0 FROM inputevents_cv WHERE inputevents_cv.icustay_id IN (SELECT icustays.icustay_id FROM icustays WHERE icustays.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 18866 AND NOT admissions.dischtime IS NULL ORDER BY admissions.admittime LIMIT 1)) AND inputevents_cv.itemid IN (SELECT d_items.itemid FROM d_items WHERE d_items.label = '3% citrate' AND d_items.linksto = 'inputevents_cv') | has 3% citrate been administered to patient 18866 on the first hospital visit? | CREATE TABLE procedures_icd (
row_id number,
subject_id number,
hadm_id number,
icd9_code text,
charttime time
)
CREATE TABLE inputevents_cv (
row_id number,
subject_id number,
hadm_id number,
icustay_id number,
charttime time,
itemid number,
amount number
)
CREATE TABLE patients (
row_id number,
subject_id number,
gender text,
dob time,
dod time
)
CREATE TABLE chartevents (
row_id number,
subject_id number,
hadm_id number,
icustay_id number,
itemid number,
charttime time,
valuenum number,
valueuom text
)
CREATE TABLE microbiologyevents (
row_id number,
subject_id number,
hadm_id number,
charttime time,
spec_type_desc text,
org_name text
)
CREATE TABLE d_icd_diagnoses (
row_id number,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE diagnoses_icd (
row_id number,
subject_id number,
hadm_id number,
icd9_code text,
charttime time
)
CREATE TABLE admissions (
row_id number,
subject_id number,
hadm_id number,
admittime time,
dischtime time,
admission_type text,
admission_location text,
discharge_location text,
insurance text,
language text,
marital_status text,
ethnicity text,
age number
)
CREATE TABLE d_items (
row_id number,
itemid number,
label text,
linksto text
)
CREATE TABLE icustays (
row_id number,
subject_id number,
hadm_id number,
icustay_id number,
first_careunit text,
last_careunit text,
first_wardid number,
last_wardid number,
intime time,
outtime time
)
CREATE TABLE d_icd_procedures (
row_id number,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE outputevents (
row_id number,
subject_id number,
hadm_id number,
icustay_id number,
charttime time,
itemid number,
value number
)
CREATE TABLE labevents (
row_id number,
subject_id number,
hadm_id number,
itemid number,
charttime time,
valuenum number,
valueuom text
)
CREATE TABLE cost (
row_id number,
subject_id number,
hadm_id number,
event_type text,
event_id number,
chargetime time,
cost number
)
CREATE TABLE prescriptions (
row_id number,
subject_id number,
hadm_id number,
startdate time,
enddate time,
drug text,
dose_val_rx text,
dose_unit_rx text,
route text
)
CREATE TABLE d_labitems (
row_id number,
itemid number,
label text
)
CREATE TABLE transfers (
row_id number,
subject_id number,
hadm_id number,
icustay_id number,
eventtype text,
careunit text,
wardid number,
intime time,
outtime time
) |
SELECT score FROM table_name_61 WHERE home_team = "saskatoon accelerators" | Which score has a Home Team of saskatoon accelerators? | CREATE TABLE table_name_61 (score VARCHAR, home_team VARCHAR) |
SELECT COUNT(team) FROM table_22297198_3 WHERE outgoing_manager = "Farhad Kazemi" | How many teams did Farhad Kazemi leave? | CREATE TABLE table_22297198_3 (team VARCHAR, outgoing_manager VARCHAR) |
SELECT "Modern German (standard wording)" FROM table_72968 WHERE "English ( BCP )" = 'For thine is the kingdom, the power' | What is the english (bcp) phrase 'for thine is the kingdom, the power' in modern german with standard wording? | CREATE TABLE table_72968 (
"English ( BCP )" text,
"Writing system 1 (English-based)" text,
"Writing system 2 (German-based)" text,
"Modern German (close translation)" text,
"Modern German (standard wording)" text
) |
SELECT visiting_team FROM table_name_56 WHERE stadium = "servus centre" AND date = "march 7" | Which Visiting Team has a Stadium of servus centre on march 7? | CREATE TABLE table_name_56 (visiting_team VARCHAR, stadium VARCHAR, date VARCHAR) |
SELECT team_name FROM table_22319599_1 WHERE school = "Rend Lake College" | If the school is Rend Lake College, what is the team name? | CREATE TABLE table_22319599_1 (team_name VARCHAR, school VARCHAR) |
SELECT common FROM table_1449169_1 WHERE area__km_2__ = "38.38" | Which common has an area (km2) of 38.38? | CREATE TABLE table_1449169_1 (
common VARCHAR,
area__km_2__ VARCHAR
) |
SELECT visiting_team FROM table_name_82 WHERE stadium = "servus centre" | Which Visiting Team has a Stadium of servus centre? | CREATE TABLE table_name_82 (visiting_team VARCHAR, stadium VARCHAR) |
SELECT MIN(njcaa_championships) FROM table_22319599_1 | What is the minimum possible for the NJCAA championships? | CREATE TABLE table_22319599_1 (njcaa_championships INTEGER) |
SELECT year, COUNT(year) FROM home_game ORDER BY COUNT(year) DESC | Bar chart x axis year y axis the number of year, sort y-axis in descending order. | CREATE TABLE hall_of_fame (
player_id TEXT,
yearid INTEGER,
votedby TEXT,
ballots NUMERIC,
needed NUMERIC,
votes NUMERIC,
inducted TEXT,
category TEXT,
needed_note TEXT
)
CREATE TABLE player (
player_id TEXT,
birth_year NUMERIC,
birth_month NUMERIC,
birth_day NUMERIC,
birth_country TEXT,
birth_state TEXT,
birth_city TEXT,
death_year NUMERIC,
death_month NUMERIC,
death_day NUMERIC,
death_country TEXT,
death_state TEXT,
death_city TEXT,
name_first TEXT,
name_last TEXT,
name_given TEXT,
weight NUMERIC,
height NUMERIC,
bats TEXT,
throws TEXT,
debut TEXT,
final_game TEXT,
retro_id TEXT,
bbref_id TEXT
)
CREATE TABLE manager_award (
player_id TEXT,
award_id TEXT,
year INTEGER,
league_id TEXT,
tie TEXT,
notes NUMERIC
)
CREATE TABLE player_award_vote (
award_id TEXT,
year INTEGER,
league_id TEXT,
player_id TEXT,
points_won NUMERIC,
points_max INTEGER,
votes_first NUMERIC
)
CREATE TABLE pitching (
player_id TEXT,
year INTEGER,
stint INTEGER,
team_id TEXT,
league_id TEXT,
w INTEGER,
l INTEGER,
g INTEGER,
gs INTEGER,
cg INTEGER,
sho INTEGER,
sv INTEGER,
ipouts NUMERIC,
h INTEGER,
er INTEGER,
hr INTEGER,
bb INTEGER,
so INTEGER,
baopp NUMERIC,
era NUMERIC,
ibb NUMERIC,
wp NUMERIC,
hbp NUMERIC,
bk INTEGER,
bfp NUMERIC,
gf NUMERIC,
r INTEGER,
sh NUMERIC,
sf NUMERIC,
g_idp NUMERIC
)
CREATE TABLE college (
college_id TEXT,
name_full TEXT,
city TEXT,
state TEXT,
country TEXT
)
CREATE TABLE fielding_postseason (
player_id TEXT,
year INTEGER,
team_id TEXT,
league_id TEXT,
round TEXT,
pos TEXT,
g INTEGER,
gs NUMERIC,
inn_outs NUMERIC,
po INTEGER,
a INTEGER,
e INTEGER,
dp INTEGER,
tp INTEGER,
pb NUMERIC,
sb NUMERIC,
cs NUMERIC
)
CREATE TABLE fielding_outfield (
player_id TEXT,
year INTEGER,
stint INTEGER,
glf NUMERIC,
gcf NUMERIC,
grf NUMERIC
)
CREATE TABLE batting (
player_id TEXT,
year INTEGER,
stint INTEGER,
team_id TEXT,
league_id TEXT,
g INTEGER,
ab NUMERIC,
r NUMERIC,
h NUMERIC,
double NUMERIC,
triple NUMERIC,
hr NUMERIC,
rbi NUMERIC,
sb NUMERIC,
cs NUMERIC,
bb NUMERIC,
so NUMERIC,
ibb NUMERIC,
hbp NUMERIC,
sh NUMERIC,
sf NUMERIC,
g_idp NUMERIC
)
CREATE TABLE player_award (
player_id TEXT,
award_id TEXT,
year INTEGER,
league_id TEXT,
tie TEXT,
notes TEXT
)
CREATE TABLE team_franchise (
franchise_id TEXT,
franchise_name TEXT,
active TEXT,
na_assoc TEXT
)
CREATE TABLE manager_award_vote (
award_id TEXT,
year INTEGER,
league_id TEXT,
player_id TEXT,
points_won INTEGER,
points_max INTEGER,
votes_first INTEGER
)
CREATE TABLE batting_postseason (
year INTEGER,
round TEXT,
player_id TEXT,
team_id TEXT,
league_id TEXT,
g INTEGER,
ab INTEGER,
r INTEGER,
h INTEGER,
double INTEGER,
triple INTEGER,
hr INTEGER,
rbi INTEGER,
sb INTEGER,
cs NUMERIC,
bb INTEGER,
so INTEGER,
ibb NUMERIC,
hbp NUMERIC,
sh NUMERIC,
sf NUMERIC,
g_idp NUMERIC
)
CREATE TABLE salary (
year INTEGER,
team_id TEXT,
league_id TEXT,
player_id TEXT,
salary INTEGER
)
CREATE TABLE park (
park_id TEXT,
park_name TEXT,
park_alias TEXT,
city TEXT,
state TEXT,
country TEXT
)
CREATE TABLE team (
year INTEGER,
league_id TEXT,
team_id TEXT,
franchise_id TEXT,
div_id TEXT,
rank INTEGER,
g INTEGER,
ghome NUMERIC,
w INTEGER,
l INTEGER,
div_win TEXT,
wc_win TEXT,
lg_win TEXT,
ws_win TEXT,
r INTEGER,
ab INTEGER,
h INTEGER,
double INTEGER,
triple INTEGER,
hr INTEGER,
bb INTEGER,
so NUMERIC,
sb NUMERIC,
cs NUMERIC,
hbp NUMERIC,
sf NUMERIC,
ra INTEGER,
er INTEGER,
era NUMERIC,
cg INTEGER,
sho INTEGER,
sv INTEGER,
ipouts INTEGER,
ha INTEGER,
hra INTEGER,
bba INTEGER,
soa INTEGER,
e INTEGER,
dp NUMERIC,
fp NUMERIC,
name TEXT,
park TEXT,
attendance NUMERIC,
bpf INTEGER,
ppf INTEGER,
team_id_br TEXT,
team_id_lahman45 TEXT,
team_id_retro TEXT
)
CREATE TABLE home_game (
year INTEGER,
league_id TEXT,
team_id TEXT,
park_id TEXT,
span_first TEXT,
span_last TEXT,
games INTEGER,
openings INTEGER,
attendance INTEGER
)
CREATE TABLE pitching_postseason (
player_id TEXT,
year INTEGER,
round TEXT,
team_id TEXT,
league_id TEXT,
w INTEGER,
l INTEGER,
g INTEGER,
gs INTEGER,
cg INTEGER,
sho INTEGER,
sv INTEGER,
ipouts INTEGER,
h INTEGER,
er INTEGER,
hr INTEGER,
bb INTEGER,
so INTEGER,
baopp TEXT,
era NUMERIC,
ibb NUMERIC,
wp NUMERIC,
hbp NUMERIC,
bk NUMERIC,
bfp NUMERIC,
gf INTEGER,
r INTEGER,
sh NUMERIC,
sf NUMERIC,
g_idp NUMERIC
)
CREATE TABLE manager (
player_id TEXT,
year INTEGER,
team_id TEXT,
league_id TEXT,
inseason INTEGER,
g INTEGER,
w INTEGER,
l INTEGER,
rank NUMERIC,
plyr_mgr TEXT
)
CREATE TABLE manager_half (
player_id TEXT,
year INTEGER,
team_id TEXT,
league_id TEXT,
inseason INTEGER,
half INTEGER,
g INTEGER,
w INTEGER,
l INTEGER,
rank INTEGER
)
CREATE TABLE all_star (
player_id TEXT,
year INTEGER,
game_num INTEGER,
game_id TEXT,
team_id TEXT,
league_id TEXT,
gp NUMERIC,
starting_pos NUMERIC
)
CREATE TABLE fielding (
player_id TEXT,
year INTEGER,
stint INTEGER,
team_id TEXT,
league_id TEXT,
pos TEXT,
g INTEGER,
gs NUMERIC,
inn_outs NUMERIC,
po NUMERIC,
a NUMERIC,
e NUMERIC,
dp NUMERIC,
pb NUMERIC,
wp NUMERIC,
sb NUMERIC,
cs NUMERIC,
zr NUMERIC
)
CREATE TABLE postseason (
year INTEGER,
round TEXT,
team_id_winner TEXT,
league_id_winner TEXT,
team_id_loser TEXT,
league_id_loser TEXT,
wins INTEGER,
losses INTEGER,
ties INTEGER
)
CREATE TABLE appearances (
year INTEGER,
team_id TEXT,
league_id TEXT,
player_id TEXT,
g_all NUMERIC,
gs NUMERIC,
g_batting INTEGER,
g_defense NUMERIC,
g_p INTEGER,
g_c INTEGER,
g_1b INTEGER,
g_2b INTEGER,
g_3b INTEGER,
g_ss INTEGER,
g_lf INTEGER,
g_cf INTEGER,
g_rf INTEGER,
g_of INTEGER,
g_dh NUMERIC,
g_ph NUMERIC,
g_pr NUMERIC
)
CREATE TABLE team_half (
year INTEGER,
league_id TEXT,
team_id TEXT,
half INTEGER,
div_id TEXT,
div_win TEXT,
rank INTEGER,
g INTEGER,
w INTEGER,
l INTEGER
)
CREATE TABLE player_college (
player_id TEXT,
college_id TEXT,
year INTEGER
) |
SELECT COUNT(heavy_attacks) FROM table_name_29 WHERE luftflotte_2_sorties = 450 | How many heavy attacks did the 450 Luftflotte 2 conduct? | CREATE TABLE table_name_29 (heavy_attacks VARCHAR, luftflotte_2_sorties VARCHAR) |
SELECT location FROM table_22319599_1 WHERE varsity_teams = 6 | If the varsity team is 6, what is the location? | CREATE TABLE table_22319599_1 (location VARCHAR, varsity_teams VARCHAR) |
SELECT "Score" FROM table_30999 WHERE "High points" = 'Boris Diaw (34)' | What was the final in the game that boris diaw (34) scored the most points? | CREATE TABLE table_30999 (
"Game" real,
"Date" text,
"Team" text,
"Score" text,
"High points" text,
"High rebounds" text,
"High assists" text,
"Location Attendance" text,
"Series" text
) |
SELECT time_retired FROM table_name_40 WHERE grid = 19 | What is the time/retired for grid 19? | CREATE TABLE table_name_40 (time_retired VARCHAR, grid VARCHAR) |
SELECT colors FROM table_22319599_1 WHERE school = "John A. Logan College" | If the school is John A. Logan College, what are the colors? | CREATE TABLE table_22319599_1 (colors VARCHAR, school VARCHAR) |
SELECT MAX("Game") FROM table_76798 WHERE "Opponents" < '80' AND "Record" = '1-0' | What is the highest Game, when Opponents is less than 80, and when Record is '1-0'? | CREATE TABLE table_76798 (
"Game" real,
"Date" text,
"Opponent" text,
"Result" text,
"Heat points" real,
"Opponents" real,
"Record" text,
"Streak" text
) |
SELECT SUM(grid) FROM table_name_14 WHERE laps > 73 AND driver = "bruce mclaren" | What is the grid total for bruce mclaren with over 73 laps? | CREATE TABLE table_name_14 (grid INTEGER, laps VARCHAR, driver VARCHAR) |
SELECT COUNT(date) FROM table_22334183_3 WHERE circuit = "Silverstone" | On how many different dates was the race at the Silverstone circuit? | CREATE TABLE table_22334183_3 (date VARCHAR, circuit VARCHAR) |
SELECT "Episode" FROM table_27045 WHERE "Viewers (millions)" = '11.73' | what episode number had 11.73 million viewers? | CREATE TABLE table_27045 (
"Episode" real,
"First Air Date" text,
"Rating (18\u201349)" text,
"Share (18\u201349)" real,
"Viewers (millions)" text,
"Rank (timeslot)" text,
"Rank (night)" text
) |
SELECT film FROM table_name_66 WHERE year = 1971 | What film was released in 1971? | CREATE TABLE table_name_66 (film VARCHAR, year VARCHAR) |
SELECT date FROM table_22334183_3 WHERE circuit = "Donington Park" | When was the circuit Donington Park? | CREATE TABLE table_22334183_3 (date VARCHAR, circuit VARCHAR) |
SELECT nielsen_ranking FROM table_name_99 WHERE season = "season 8" | What is the Nielsen ranking for Season 8? | CREATE TABLE table_name_99 (
nielsen_ranking VARCHAR,
season VARCHAR
) |
SELECT MAX(pick) FROM table_name_79 WHERE player = "steve bartalo" | When was steve bartalo picked? | CREATE TABLE table_name_79 (pick INTEGER, player VARCHAR) |
SELECT weight FROM table_22344463_2 WHERE name = "Stuart Craig" | What is the weight is the name is Stuart Craig? | CREATE TABLE table_22344463_2 (weight VARCHAR, name VARCHAR) |
SELECT AVG(t1.c1) FROM (SELECT SUM(cost.cost) AS c1 FROM cost WHERE cost.hadm_id IN (SELECT prescriptions.hadm_id FROM prescriptions WHERE prescriptions.drug = 'lithium carbonate') AND STRFTIME('%y', cost.chargetime) >= '2105' GROUP BY cost.hadm_id) AS t1 | what is the average cost of a hospital that involves a drug named lithium carbonate since 2105? | CREATE TABLE prescriptions (
row_id number,
subject_id number,
hadm_id number,
startdate time,
enddate time,
drug text,
dose_val_rx text,
dose_unit_rx text,
route text
)
CREATE TABLE procedures_icd (
row_id number,
subject_id number,
hadm_id number,
icd9_code text,
charttime time
)
CREATE TABLE patients (
row_id number,
subject_id number,
gender text,
dob time,
dod time
)
CREATE TABLE admissions (
row_id number,
subject_id number,
hadm_id number,
admittime time,
dischtime time,
admission_type text,
admission_location text,
discharge_location text,
insurance text,
language text,
marital_status text,
ethnicity text,
age number
)
CREATE TABLE inputevents_cv (
row_id number,
subject_id number,
hadm_id number,
icustay_id number,
charttime time,
itemid number,
amount number
)
CREATE TABLE chartevents (
row_id number,
subject_id number,
hadm_id number,
icustay_id number,
itemid number,
charttime time,
valuenum number,
valueuom text
)
CREATE TABLE diagnoses_icd (
row_id number,
subject_id number,
hadm_id number,
icd9_code text,
charttime time
)
CREATE TABLE cost (
row_id number,
subject_id number,
hadm_id number,
event_type text,
event_id number,
chargetime time,
cost number
)
CREATE TABLE icustays (
row_id number,
subject_id number,
hadm_id number,
icustay_id number,
first_careunit text,
last_careunit text,
first_wardid number,
last_wardid number,
intime time,
outtime time
)
CREATE TABLE d_icd_procedures (
row_id number,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE outputevents (
row_id number,
subject_id number,
hadm_id number,
icustay_id number,
charttime time,
itemid number,
value number
)
CREATE TABLE transfers (
row_id number,
subject_id number,
hadm_id number,
icustay_id number,
eventtype text,
careunit text,
wardid number,
intime time,
outtime time
)
CREATE TABLE d_items (
row_id number,
itemid number,
label text,
linksto text
)
CREATE TABLE labevents (
row_id number,
subject_id number,
hadm_id number,
itemid number,
charttime time,
valuenum number,
valueuom text
)
CREATE TABLE d_icd_diagnoses (
row_id number,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE d_labitems (
row_id number,
itemid number,
label text
)
CREATE TABLE microbiologyevents (
row_id number,
subject_id number,
hadm_id number,
charttime time,
spec_type_desc text,
org_name text
) |
SELECT player FROM table_name_57 WHERE position = "cornerback" | What player is a cornerback? | CREATE TABLE table_name_57 (player VARCHAR, position VARCHAR) |
SELECT COUNT(date_of_birth) FROM table_22344463_2 WHERE name = "Timo Higgins" | If the name is Timo Higgins, what is the total date of birth amount? | CREATE TABLE table_22344463_2 (date_of_birth VARCHAR, name VARCHAR) |
SELECT "Team" FROM table_10575 WHERE "Replaced by" = 'mark mcghee' | I want the team for replaced by mark mcghee | CREATE TABLE table_10575 (
"Team" text,
"Outgoing manager" text,
"Manner of departure" text,
"Replaced by" text,
"Date of appointment" text
) |
SELECT home_team FROM table_name_85 WHERE venue = "windy hill" | Windy hill is the home to what team? | CREATE TABLE table_name_85 (home_team VARCHAR, venue VARCHAR) |
SELECT position FROM table_22344463_2 WHERE height = "181cm" | If the height is 181cm, what was the position? | CREATE TABLE table_22344463_2 (position VARCHAR, height VARCHAR) |
SELECT score FROM table_name_7 WHERE record = "56-46" | What was the score when the record 56-46 was met? | CREATE TABLE table_name_7 (
score VARCHAR,
record VARCHAR
) |
SELECT competition FROM table_name_49 WHERE score = "1-5" | What is the name of the competition with a score of 1-5? | CREATE TABLE table_name_49 (competition VARCHAR, score VARCHAR) |
SELECT COUNT(name) FROM table_22344463_2 WHERE weight = "78kg" AND home_team = "UMBC" | If the home team is UMBC and the weight is 78kg, what the the name total number? | CREATE TABLE table_22344463_2 (name VARCHAR, weight VARCHAR, home_team VARCHAR) |
SELECT AVG("Laps") FROM table_42560 WHERE "Grid" < '19' AND "Time/Retired" = '+21.3 secs' | What is the mean number of laps when the grid is less than 19 and time/retired is +21.3 secs? | CREATE TABLE table_42560 (
"Driver" text,
"Team" text,
"Laps" real,
"Time/Retired" text,
"Grid" real
) |
SELECT competition FROM table_name_37 WHERE opponents = "sv werder bremen" AND score = "1-2" | What is the name of the competition with opponents of Sv Werder Bremen and a score of 1-2? | CREATE TABLE table_name_37 (competition VARCHAR, opponents VARCHAR, score VARCHAR) |
SELECT date_of_birth FROM table_22344463_2 WHERE height = "185cm" AND home_team = "Heaton Mersey" | If the height is 185cm and the home team is Heaton Mersey, what is the date of birth? | CREATE TABLE table_22344463_2 (date_of_birth VARCHAR, height VARCHAR, home_team VARCHAR) |
SELECT area__km²_ FROM table_28367242_1 WHERE corporate_name = "Powell River, The Corporation of the City of" | What is the area of the corporation named the powell river, the corporation of the city of? | CREATE TABLE table_28367242_1 (
area__km²_ VARCHAR,
corporate_name VARCHAR
) |
SELECT reg_season FROM table_name_16 WHERE avg_attendance < 942 | What regular season result had an average attendance less than 942? | CREATE TABLE table_name_16 (reg_season VARCHAR, avg_attendance INTEGER) |
SELECT us_viewers__million_ FROM table_22347090_4 WHERE no_in_season = 2 | How many viewers tuned in for season 2? | CREATE TABLE table_22347090_4 (us_viewers__million_ VARCHAR, no_in_season VARCHAR) |
SELECT location, COUNT(*) FROM cinema GROUP BY location | Show each location and the number of cinemas there. | CREATE TABLE schedule (
cinema_id number,
film_id number,
date text,
show_times_per_day number,
price number
)
CREATE TABLE film (
film_id number,
rank_in_series number,
number_in_season number,
title text,
directed_by text,
original_air_date text,
production_code text
)
CREATE TABLE cinema (
cinema_id number,
name text,
openning_year number,
capacity number,
location text
) |
SELECT league FROM table_name_31 WHERE playoffs = "lost semifinal" | Which league had a playoffs result of a lost semifinal? | CREATE TABLE table_name_31 (league VARCHAR, playoffs VARCHAR) |
SELECT directed_by FROM table_22347090_4 WHERE production_code = "3X6752" | Who directed the episode that has 3x6752 listed as the production code? | CREATE TABLE table_22347090_4 (directed_by VARCHAR, production_code VARCHAR) |
SELECT "Directed by" FROM table_16332 WHERE "Title" = 'Escape' | Who directed the episode 'Escape'? | CREATE TABLE table_16332 (
"No. in series" real,
"No. in season" real,
"Title" text,
"Directed by" text,
"Written by" text,
"Original air date" text,
"Production code" text,
"U.S. viewers (millions)" text
) |
SELECT reg_season FROM table_name_67 WHERE avg_attendance > 3 OFFSET 170 | What regular season result had an average attendance bigger than 3,170? | CREATE TABLE table_name_67 (reg_season VARCHAR, avg_attendance INTEGER) |
SELECT MIN(no_in_series) FROM table_22347090_4 WHERE us_viewers__million_ = "1.98" | Which series number had 1.98 million viewers? | CREATE TABLE table_22347090_4 (no_in_series INTEGER, us_viewers__million_ VARCHAR) |
SELECT DISTINCT flight.flight_id FROM airport_service AS AIRPORT_SERVICE_0, airport_service AS AIRPORT_SERVICE_1, city AS CITY_0, city AS CITY_1, flight WHERE CITY_0.city_code = AIRPORT_SERVICE_0.city_code AND CITY_0.city_name = 'DENVER' AND CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'PITTSBURGH' AND flight.from_airport = AIRPORT_SERVICE_0.airport_code AND flight.to_airport = AIRPORT_SERVICE_1.airport_code | i would like to fly from DENVER to PITTSBURGH | CREATE TABLE airport_service (
city_code varchar,
airport_code varchar,
miles_distant int,
direction varchar,
minutes_distant int
)
CREATE TABLE restriction (
restriction_code text,
advance_purchase int,
stopovers text,
saturday_stay_required text,
minimum_stay int,
maximum_stay int,
application text,
no_discounts text
)
CREATE TABLE dual_carrier (
main_airline varchar,
low_flight_number int,
high_flight_number int,
dual_airline varchar,
service_name text
)
CREATE TABLE flight_stop (
flight_id int,
stop_number int,
stop_days text,
stop_airport text,
arrival_time int,
arrival_airline text,
arrival_flight_number int,
departure_time int,
departure_airline text,
departure_flight_number int,
stop_time int
)
CREATE TABLE aircraft (
aircraft_code varchar,
aircraft_description varchar,
manufacturer varchar,
basic_type varchar,
engines int,
propulsion varchar,
wide_body varchar,
wing_span int,
length int,
weight int,
capacity int,
pay_load int,
cruising_speed int,
range_miles int,
pressurized varchar
)
CREATE TABLE date_day (
month_number int,
day_number int,
year int,
day_name varchar
)
CREATE TABLE airline (
airline_code varchar,
airline_name text,
note text
)
CREATE TABLE fare (
fare_id int,
from_airport varchar,
to_airport varchar,
fare_basis_code text,
fare_airline text,
restriction_code text,
one_direction_cost int,
round_trip_cost int,
round_trip_required varchar
)
CREATE TABLE time_zone (
time_zone_code text,
time_zone_name text,
hours_from_gmt int
)
CREATE TABLE month (
month_number int,
month_name text
)
CREATE TABLE code_description (
code varchar,
description text
)
CREATE TABLE time_interval (
period text,
begin_time int,
end_time int
)
CREATE TABLE ground_service (
city_code text,
airport_code text,
transport_type text,
ground_fare int
)
CREATE TABLE food_service (
meal_code text,
meal_number int,
compartment text,
meal_description varchar
)
CREATE TABLE fare_basis (
fare_basis_code text,
booking_class text,
class_type text,
premium text,
economy text,
discounted text,
night text,
season text,
basis_days text
)
CREATE TABLE class_of_service (
booking_class varchar,
rank int,
class_description text
)
CREATE TABLE flight_leg (
flight_id int,
leg_number int,
leg_flight int
)
CREATE TABLE flight_fare (
flight_id int,
fare_id int
)
CREATE TABLE airport (
airport_code varchar,
airport_name text,
airport_location text,
state_code varchar,
country_name varchar,
time_zone_code varchar,
minimum_connect_time int
)
CREATE TABLE flight (
aircraft_code_sequence text,
airline_code varchar,
airline_flight text,
arrival_time int,
connections int,
departure_time int,
dual_carrier text,
flight_days text,
flight_id int,
flight_number int,
from_airport varchar,
meal_code text,
stops int,
time_elapsed int,
to_airport varchar
)
CREATE TABLE days (
days_code varchar,
day_name varchar
)
CREATE TABLE compartment_class (
compartment varchar,
class_type varchar
)
CREATE TABLE city (
city_code varchar,
city_name varchar,
state_code varchar,
country_name varchar,
time_zone_code varchar
)
CREATE TABLE equipment_sequence (
aircraft_code_sequence varchar,
aircraft_code varchar
)
CREATE TABLE state (
state_code text,
state_name text,
country_name text
) |
SELECT COUNT(length__miles_) FROM table_name_95 WHERE east_or_north_terminus = "ne 2 in lincoln" | what is the length (miles) when the east or north terminus is ne 2 in lincoln? | CREATE TABLE table_name_95 (length__miles_ VARCHAR, east_or_north_terminus VARCHAR) |
SELECT us_viewers__million_ FROM table_22347090_5 WHERE production_code = "3X6704" | Name the viewers for production code for 3x6704 | CREATE TABLE table_22347090_5 (us_viewers__million_ VARCHAR, production_code VARCHAR) |
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE diagnoses.short_title = "Abn react-cardiac cath" AND lab.flag = "delta" | provide the number of patients whose diagnoses short title is abn react-cardiac cath and lab test abnormal status is delta? | CREATE TABLE lab (
subject_id text,
hadm_id text,
itemid text,
charttime text,
flag text,
value_unit text,
label text,
fluid text
)
CREATE TABLE procedures (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE prescriptions (
subject_id text,
hadm_id text,
icustay_id text,
drug_type text,
drug text,
formulary_drug_cd text,
route text,
drug_dose text
)
CREATE TABLE demographic (
subject_id text,
hadm_id text,
name text,
marital_status text,
age text,
dob text,
gender text,
language text,
religion text,
admission_type text,
days_stay text,
insurance text,
ethnicity text,
expire_flag text,
admission_location text,
discharge_location text,
diagnosis text,
dod text,
dob_year text,
dod_year text,
admittime text,
dischtime text,
admityear text
)
CREATE TABLE diagnoses (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
) |
SELECT MAX(length__miles_) FROM table_name_19 WHERE name = "l-56g" | what is the length (miles) when the name is l-56g? | CREATE TABLE table_name_19 (length__miles_ INTEGER, name VARCHAR) |
SELECT us_viewers__million_ FROM table_22347090_5 WHERE production_code = "3X6706" | Name the viewers for production code being 3x6706 | CREATE TABLE table_22347090_5 (us_viewers__million_ VARCHAR, production_code VARCHAR) |
SELECT DISTINCT cost.cost FROM cost WHERE cost.eventtype = 'diagnosis' AND cost.eventid IN (SELECT diagnosis.diagnosisid FROM diagnosis WHERE diagnosis.diagnosisname = 'acute respiratory failure - due to obstructive lung disease') | how much is the diagnosis price for acute respiratory failure - due to obstructive lung disease. | CREATE TABLE treatment (
treatmentid number,
patientunitstayid number,
treatmentname text,
treatmenttime time
)
CREATE TABLE intakeoutput (
intakeoutputid number,
patientunitstayid number,
cellpath text,
celllabel text,
cellvaluenumeric number,
intakeoutputtime time
)
CREATE TABLE microlab (
microlabid number,
patientunitstayid number,
culturesite text,
organism text,
culturetakentime time
)
CREATE TABLE patient (
uniquepid text,
patienthealthsystemstayid number,
patientunitstayid number,
gender text,
age text,
ethnicity text,
hospitalid number,
wardid number,
admissionheight number,
admissionweight number,
dischargeweight number,
hospitaladmittime time,
hospitaladmitsource text,
unitadmittime time,
unitdischargetime time,
hospitaldischargetime time,
hospitaldischargestatus text
)
CREATE TABLE medication (
medicationid number,
patientunitstayid number,
drugname text,
dosage text,
routeadmin text,
drugstarttime time,
drugstoptime time
)
CREATE TABLE allergy (
allergyid number,
patientunitstayid number,
drugname text,
allergyname text,
allergytime time
)
CREATE TABLE cost (
costid number,
uniquepid text,
patienthealthsystemstayid number,
eventtype text,
eventid number,
chargetime time,
cost number
)
CREATE TABLE lab (
labid number,
patientunitstayid number,
labname text,
labresult number,
labresulttime time
)
CREATE TABLE diagnosis (
diagnosisid number,
patientunitstayid number,
diagnosisname text,
diagnosistime time,
icd9code text
)
CREATE TABLE vitalperiodic (
vitalperiodicid number,
patientunitstayid number,
temperature number,
sao2 number,
heartrate number,
respiration number,
systemicsystolic number,
systemicdiastolic number,
systemicmean number,
observationtime time
) |
SELECT name FROM table_name_63 WHERE west_or_south_terminus = "ne 112 west of blue springs" | what is the name when the west or south terminus is ne 112 west of blue springs? | CREATE TABLE table_name_63 (name VARCHAR, west_or_south_terminus VARCHAR) |
SELECT title FROM table_22347090_5 WHERE us_viewers__million_ = "1.54" | Name the title that got 1.54 viewers | CREATE TABLE table_22347090_5 (title VARCHAR, us_viewers__million_ VARCHAR) |
SELECT district FROM table_name_67 WHERE result = "retired republican hold" AND incumbent = "rufus p. spalding" | Which district has a retired republican hold and an incumbent of rufus p. spalding? | CREATE TABLE table_name_67 (
district VARCHAR,
result VARCHAR,
incumbent VARCHAR
) |
SELECT time_retired FROM table_name_38 WHERE constructor = "benetton - renault" AND driver = "johnny herbert" | What is the Time/Retired value for Driver Johnny Herbert with Constructor Benetton - Renault | CREATE TABLE table_name_38 (time_retired VARCHAR, constructor VARCHAR, driver VARCHAR) |
SELECT COUNT(no_in_season) FROM table_22347090_5 WHERE no_in_series = 26 | Name the number of number in season for 26 | CREATE TABLE table_22347090_5 (no_in_season VARCHAR, no_in_series VARCHAR) |
SELECT COUNT(DISTINCT T2.id), COUNT(DISTINCT T3.id), T3.dept_name FROM department AS T1 JOIN student AS T2 ON T1.dept_name = T2.dept_name JOIN instructor AS T3 ON T1.dept_name = T3.dept_name GROUP BY T3.dept_name | How many students and instructors are in each department? | CREATE TABLE takes (
id text,
course_id text,
sec_id text,
semester text,
year number,
grade text
)
CREATE TABLE instructor (
id text,
name text,
dept_name text,
salary number
)
CREATE TABLE prereq (
course_id text,
prereq_id text
)
CREATE TABLE section (
course_id text,
sec_id text,
semester text,
year number,
building text,
room_number text,
time_slot_id text
)
CREATE TABLE advisor (
s_id text,
i_id text
)
CREATE TABLE department (
dept_name text,
building text,
budget number
)
CREATE TABLE classroom (
building text,
room_number text,
capacity number
)
CREATE TABLE student (
id text,
name text,
dept_name text,
tot_cred number
)
CREATE TABLE time_slot (
time_slot_id text,
day text,
start_hr number,
start_min number,
end_hr number,
end_min number
)
CREATE TABLE course (
course_id text,
title text,
dept_name text,
credits number
)
CREATE TABLE teaches (
id text,
course_id text,
sec_id text,
semester text,
year number
) |
SELECT time_retired FROM table_name_50 WHERE laps = "66" AND constructor = "jordan - peugeot" AND grid = "5" | What is the Time/Retired value for constructor Jordan - Peugeot with 66 laps and grid value 5? | CREATE TABLE table_name_50 (time_retired VARCHAR, grid VARCHAR, laps VARCHAR, constructor VARCHAR) |
SELECT written_by FROM table_22347090_6 WHERE production_code = "3X7557" | Who wrote the episode that has a production code 3x7557? | CREATE TABLE table_22347090_6 (written_by VARCHAR, production_code VARCHAR) |
SELECT attendance FROM table_name_60 WHERE week = 13 | How many people attended the game in week 13? | CREATE TABLE table_name_60 (
attendance VARCHAR,
week VARCHAR
) |
SELECT time_retired FROM table_name_7 WHERE driver = "pedro diniz" | What is the Time/Retired value of driver Pedro Diniz? | CREATE TABLE table_name_7 (time_retired VARCHAR, driver VARCHAR) |
SELECT COUNT(directed_by) FROM table_22347090_6 WHERE us_viewers__million_ = "1.59" | How many directors are there for the episode that had 1.59 million U.S. viewers? | CREATE TABLE table_22347090_6 (directed_by VARCHAR, us_viewers__million_ VARCHAR) |
SELECT "Tie no" FROM table_61080 WHERE "Home team" = 'scarborough' | What is the Tie no when Scarborough is the Home team? | CREATE TABLE table_61080 (
"Tie no" text,
"Home team" text,
"Score" text,
"Away team" text,
"Date" text
) |
SELECT driver FROM table_name_45 WHERE grid = "18" | Which driver has grid value of 18? | CREATE TABLE table_name_45 (driver VARCHAR, grid VARCHAR) |
SELECT production_code FROM table_22347090_6 WHERE us_viewers__million_ = "1.32" | What is the production code for the episode that had 1.32 million U.S. viewers? | CREATE TABLE table_22347090_6 (production_code VARCHAR, us_viewers__million_ VARCHAR) |
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.days_stay > "26" AND lab.label = "Lymphocytes" | What is the number of patients who had a lymphocytes lab test and stayed in the hospital for more than 26 days? | CREATE TABLE prescriptions (
subject_id text,
hadm_id text,
icustay_id text,
drug_type text,
drug text,
formulary_drug_cd text,
route text,
drug_dose text
)
CREATE TABLE diagnoses (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE lab (
subject_id text,
hadm_id text,
itemid text,
charttime text,
flag text,
value_unit text,
label text,
fluid text
)
CREATE TABLE demographic (
subject_id text,
hadm_id text,
name text,
marital_status text,
age text,
dob text,
gender text,
language text,
religion text,
admission_type text,
days_stay text,
insurance text,
ethnicity text,
expire_flag text,
admission_location text,
discharge_location text,
diagnosis text,
dod text,
dob_year text,
dod_year text,
admittime text,
dischtime text,
admityear text
)
CREATE TABLE procedures (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
) |
SELECT constructor FROM table_name_54 WHERE grid = "5" | What is the constructor with grid value 5? | CREATE TABLE table_name_54 (constructor VARCHAR, grid VARCHAR) |
SELECT MIN(no_in_series) FROM table_22347090_6 WHERE production_code = "3X7554" | What episode number in the series had a production code of 3x7554? | CREATE TABLE table_22347090_6 (no_in_series INTEGER, production_code VARCHAR) |
SELECT "Location" FROM table_39765 WHERE "Attendance" = '51,212' | What location has 51,212 as the attendance? | CREATE TABLE table_39765 (
"Season" real,
"Bowl game" text,
"Result" text,
"Opponent" text,
"Stadium" text,
"Location" text,
"Attendance" text
) |
SELECT grid FROM table_name_57 WHERE time_retired = "accident" | What is the grid value which has Time/Retired value of accident? | CREATE TABLE table_name_57 (grid VARCHAR, time_retired VARCHAR) |
SELECT title FROM table_22347090_6 WHERE no_in_series = 41 | What is the name of episode number 41 in the series? | CREATE TABLE table_22347090_6 (title VARCHAR, no_in_series VARCHAR) |
SELECT "Region" FROM table_60783 WHERE "Year" = 'march 10, 1998' | Which region had a year March 10, 1998? | CREATE TABLE table_60783 (
"Region" text,
"Year" text,
"Label" text,
"Format" text,
"Catalog" text
) |
SELECT leading_scorer FROM table_name_35 WHERE visitor = "trail blazers" | Who was the leading scorer that was a visitor of the Trail Blazers? | CREATE TABLE table_name_35 (leading_scorer VARCHAR, visitor VARCHAR) |
SELECT MIN(silver) FROM table_22355_20 | Who has the minimum number of silver? | CREATE TABLE table_22355_20 (silver INTEGER) |
SELECT director_s_ FROM table_18994724_1 WHERE film_title_used_in_nomination = "Gomorra" | Who directed the film Gomorra? | CREATE TABLE table_18994724_1 (
director_s_ VARCHAR,
film_title_used_in_nomination VARCHAR
) |
SELECT leading_scorer FROM table_name_51 WHERE home = "clippers" | Who is the leading scorer when they were at home of the Clippers? | CREATE TABLE table_name_51 (leading_scorer VARCHAR, home VARCHAR) |
SELECT athlete FROM table_22355_20 WHERE rank = 8 AND olympics = "1948–1952" | Who is the athlete who's rank is 8 and competed in the olympics during 1948–1952? | CREATE TABLE table_22355_20 (athlete VARCHAR, rank VARCHAR, olympics VARCHAR) |
SELECT game FROM table_name_60 WHERE location_attendance = "los angeles memorial sports arena" | What game was located at the Los Angeles Memorial Sports Arena? | CREATE TABLE table_name_60 (
game VARCHAR,
location_attendance VARCHAR
) |
SELECT visitor FROM table_name_38 WHERE date = "january 19, 2008" | Who was the visitor on January 19, 2008? | CREATE TABLE table_name_38 (visitor VARCHAR, date VARCHAR) |
SELECT nation FROM table_22355_20 WHERE olympics = "1924–1928" AND bronze = 1 | What is the nation who won 1 bronze in the Olympics during 1924–1928? | CREATE TABLE table_22355_20 (nation VARCHAR, olympics VARCHAR, bronze VARCHAR) |
SELECT league FROM table_name_31 WHERE playoffs = "lost semifinal" | Which league had a playoffs result of a lost semifinal? | CREATE TABLE table_name_31 (
league VARCHAR,
playoffs VARCHAR
) |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.