answer stringlengths 6 3.91k | question stringlengths 7 766 | context stringlengths 27 7.14k |
|---|---|---|
SELECT MIN(game) FROM table_name_48 WHERE record = "32-12-3" | What is the lowest game for a record of 32-12-3? | CREATE TABLE table_name_48 (
game INTEGER,
record VARCHAR
) |
SELECT slovak FROM table_25008327_8 WHERE ukrainian = "пес, собака" | What area all values for Slovak when value for Ukranian is пес, собака? | CREATE TABLE table_25008327_8 (slovak VARCHAR, ukrainian VARCHAR) |
SELECT title FROM table_28140588_1 WHERE directed_by = "Maynard C. Virgil I" | What is the title when the director is Maynard C. Virgil i ? | CREATE TABLE table_28140588_1 (title VARCHAR, directed_by VARCHAR) |
SELECT "Vehicle" FROM table_27010 WHERE "EPA rated combined fuel economy" = '102 mpg-e (33kW-hrs/100mi)' | When 102 mpg-e (33kw-hrs/100mi) is the epa rated combined fuel economy what is the vehicle type? | CREATE TABLE table_27010 (
"Vehicle" text,
"Operating mode" text,
"EPA rated All-electric range" text,
"EPA rated combined fuel economy" text,
"Clean electric grid California (San Francisco)" text,
"U.S. national average electric mix" text,
"Dirty electric grid Rocky Mountains (Denver)" text
) |
SELECT croatian FROM table_25008327_8 WHERE english = "dog" | What is every value for Croatian when value for English is dog? | CREATE TABLE table_25008327_8 (croatian VARCHAR, english VARCHAR) |
SELECT directed_by FROM table_28140588_1 WHERE production_code = 60034 | Who is the director when the production code is 60034? | CREATE TABLE table_28140588_1 (directed_by VARCHAR, production_code VARCHAR) |
SELECT production_code FROM table_21304155_1 WHERE directed_by = "David Solomon" | What is the production code of the episode directed by David Solomon? | CREATE TABLE table_21304155_1 (
production_code VARCHAR,
directed_by VARCHAR
) |
SELECT polish FROM table_25008327_8 WHERE belarusian = "ноч" | What is every value for Polish when Balarusian is ноч? | CREATE TABLE table_25008327_8 (polish VARCHAR, belarusian VARCHAR) |
SELECT title FROM table_2818164_5 WHERE production_code = 418 | What is the name of the episode with 418 as the production code? | CREATE TABLE table_2818164_5 (title VARCHAR, production_code VARCHAR) |
SELECT patient.age FROM patient WHERE patient.uniquepid = '022-76925' AND NOT patient.hospitaldischargetime IS NULL ORDER BY patient.hospitaladmittime DESC LIMIT 1 | what is the age of patient 022-76925 during their last hospital encounter? | 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 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 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 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 medication (
medicationid number,
patientunitstayid number,
drugname text,
dosage text,
routeadmin text,
drugstarttime time,
drugstoptime time
) |
SELECT russian FROM table_25008327_8 WHERE bulgarian = "пес, куче" | What is every value for Russian when value for Bulgarian is пес, куче? | CREATE TABLE table_25008327_8 (russian VARCHAR, bulgarian VARCHAR) |
SELECT no_in_season FROM table_2818164_5 WHERE original_air_date = "February 11, 1988" | What episoe number in the season originally aired on February 11, 1988? | CREATE TABLE table_2818164_5 (no_in_season VARCHAR, original_air_date VARCHAR) |
SELECT activity_name, COUNT(*) FROM Activity AS T1 JOIN Faculty_Participates_in AS T2 ON T1.actid = T2.actid GROUP BY T1.actid ORDER BY activity_name DESC | How many faculty members participate in each activity? Return the activity names and the number of faculty members by a bar chart, and display from high to low by the activity_name. | CREATE TABLE Activity (
actid INTEGER,
activity_name varchar(25)
)
CREATE TABLE Faculty_Participates_in (
FacID INTEGER,
actid INTEGER
)
CREATE TABLE Participates_in (
stuid INTEGER,
actid INTEGER
)
CREATE TABLE Faculty (
FacID INTEGER,
Lname VARCHAR(15),
Fname VARCHAR(15),
Rank VARCHAR(15),
Sex VARCHAR(1),
Phone INTEGER,
Room VARCHAR(5),
Building VARCHAR(13)
)
CREATE TABLE Student (
StuID INTEGER,
LName VARCHAR(12),
Fname VARCHAR(12),
Age INTEGER,
Sex VARCHAR(1),
Major INTEGER,
Advisor INTEGER,
city_code VARCHAR(3)
) |
SELECT словјански FROM table_25008327_8 WHERE polish = "książka" | What is every value for словјански if polish is książka? | CREATE TABLE table_25008327_8 (словјански VARCHAR, polish VARCHAR) |
SELECT no_in_series FROM table_2818164_5 WHERE no_in_season = "17" | What episode number in the series is also number 17 in the season? | CREATE TABLE table_2818164_5 (no_in_series VARCHAR, no_in_season VARCHAR) |
SELECT Users.Id AS "user_link", Users.DisplayName, Users.Reputation, SUM(CASE WHEN Posts.PostTypeId = 1 THEN 1 ELSE 0 END) AS Questions, SUM(CASE WHEN Posts.PostTypeId = 2 THEN 1 ELSE 0 END) AS Answers, Users.UpVotes, Users.DownVotes FROM Users INNER JOIN Posts ON Users.Id = Posts.OwnerUserId AND (Posts.PostTypeId = 1 OR Posts.PostTypeId = 2) AND Users.Reputation > 5000 GROUP BY Users.Id, Users.CreationDate, Users.LastAccessDate, Users.Reputation, Users.DisplayName, Users.CreationDate, Users.Views, Users.UpVotes, Users.DownVotes HAVING SUM(CASE WHEN Posts.PostTypeId = 2 THEN 1 ELSE 0 END) < 10 ORDER BY Users.Id | Users with reputation > 5000 and < 10 answers. | CREATE TABLE PostNotices (
Id number,
PostId number,
PostNoticeTypeId number,
CreationDate time,
DeletionDate time,
ExpiryDate time,
Body text,
OwnerUserId number,
DeletionUserId number
)
CREATE TABLE PostHistoryTypes (
Id number,
Name 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 ReviewTaskTypes (
Id number,
Name text,
Description text
)
CREATE TABLE PostTypes (
Id number,
Name text
)
CREATE TABLE ReviewTaskStates (
Id number,
Name text,
Description text
)
CREATE TABLE Badges (
Id number,
UserId number,
Name text,
Date time,
Class number,
TagBased boolean
)
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 FlagTypes (
Id number,
Name text,
Description text
)
CREATE TABLE ReviewTaskResultTypes (
Id number,
Name text,
Description text
)
CREATE TABLE ReviewTaskResults (
Id number,
ReviewTaskId number,
ReviewTaskResultTypeId number,
CreationDate time,
RejectionReasonId number,
Comment text
)
CREATE TABLE Votes (
Id number,
PostId number,
VoteTypeId number,
UserId number,
CreationDate time,
BountyAmount number
)
CREATE TABLE PendingFlags (
Id number,
FlagTypeId number,
PostId number,
CreationDate time,
CloseReasonTypeId number,
CloseAsOffTopicReasonTypeId number,
DuplicateOfQuestionId number,
BelongsOnBaseHostAddress text
)
CREATE TABLE PostLinks (
Id number,
CreationDate time,
PostId number,
RelatedPostId number,
LinkTypeId number
)
CREATE TABLE ReviewRejectionReasons (
Id number,
Name text,
Description text,
PostTypeId number
)
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 CloseReasonTypes (
Id number,
Name text,
Description text
)
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 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 PostFeedback (
Id number,
PostId number,
IsAnonymous boolean,
VoteTypeId number,
CreationDate time
)
CREATE TABLE Comments (
Id number,
PostId number,
Score number,
Text text,
CreationDate time,
UserDisplayName text,
UserId number,
ContentLicense text
)
CREATE TABLE PostNoticeTypes (
Id number,
ClassId number,
Name text,
Body text,
IsHidden boolean,
Predefined boolean,
PostNoticeDurationId number
)
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 VoteTypes (
Id number,
Name text
)
CREATE TABLE SuggestedEditVotes (
Id number,
SuggestedEditId number,
UserId number,
VoteTypeId number,
CreationDate time,
TargetUserId number,
TargetRepChange number
)
CREATE TABLE PostTags (
PostId number,
TagId number
)
CREATE TABLE Tags (
Id number,
TagName text,
Count number,
ExcerptPostId number,
WikiPostId number
)
CREATE TABLE ReviewTasks (
Id number,
ReviewTaskTypeId number,
CreationDate time,
DeletionDate time,
ReviewTaskStateId number,
PostId number,
SuggestedEditId number,
CompletedByReviewTaskId number
)
CREATE TABLE PostHistory (
Id number,
PostHistoryTypeId number,
PostId number,
RevisionGUID other,
CreationDate time,
UserId number,
UserDisplayName text,
Comment text,
Text text,
ContentLicense text
) |
SELECT position FROM table_25017530_5 WHERE player = "Christopher Smith" | Name the position for christopher smith | CREATE TABLE table_25017530_5 (position VARCHAR, player VARCHAR) |
SELECT MIN(production_code) FROM table_2818164_5 WHERE no_in_series = "96" | What is the production code for episode 96 in the series? | CREATE TABLE table_2818164_5 (production_code INTEGER, no_in_series VARCHAR) |
SELECT COUNT("Rank") FROM table_64464 WHERE "Time" = '49' AND "Lane" > '7' | What is the Rank of the swimmer with a Time of 49 in Lane 7 or larger? | CREATE TABLE table_64464 (
"Rank" real,
"Lane" real,
"Name" text,
"Nationality" text,
"Time" real
) |
SELECT college FROM table_25017530_5 WHERE player = "Nate Binder" | Name the college for nate binder | CREATE TABLE table_25017530_5 (college VARCHAR, player VARCHAR) |
SELECT production_code FROM table_2818164_7 WHERE written_by = "Matt Robinson" | What is the production code that was written by matt robinson? | CREATE TABLE table_2818164_7 (production_code VARCHAR, written_by VARCHAR) |
SELECT "Home team" FROM table_54290 WHERE "Away team score" = '12.11 (83)' | What team was the home team when the away team scored 12.11 (83)? | CREATE TABLE table_54290 (
"Home team" text,
"Home team score" text,
"Away team" text,
"Away team score" text,
"Venue" text,
"Crowd" real,
"Date" text
) |
SELECT MIN(pick__number) FROM table_25017530_5 WHERE player = "Steven Turner" | Name the least pick number for steven turner | CREATE TABLE table_25017530_5 (pick__number INTEGER, player VARCHAR) |
SELECT title FROM table_2818164_7 WHERE no_in_series = 147 | Which title has 147 as no. in series? | CREATE TABLE table_2818164_7 (title VARCHAR, no_in_series VARCHAR) |
SELECT d_labitems.label FROM d_labitems WHERE d_labitems.itemid IN (SELECT t3.itemid FROM (SELECT t2.itemid, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM (SELECT admissions.subject_id, diagnoses_icd.charttime, admissions.hadm_id FROM diagnoses_icd JOIN admissions ON diagnoses_icd.hadm_id = admissions.hadm_id WHERE diagnoses_icd.icd9_code = (SELECT d_icd_diagnoses.icd9_code FROM d_icd_diagnoses WHERE d_icd_diagnoses.short_title = 'no family able to care') AND DATETIME(diagnoses_icd.charttime) <= DATETIME(CURRENT_TIME(), '-1 year')) AS t1 JOIN (SELECT admissions.subject_id, labevents.itemid, labevents.charttime, admissions.hadm_id FROM labevents JOIN admissions ON labevents.hadm_id = admissions.hadm_id WHERE DATETIME(labevents.charttime) <= DATETIME(CURRENT_TIME(), '-1 year')) AS t2 ON t1.subject_id = t2.subject_id WHERE t1.charttime < t2.charttime AND t1.hadm_id = t2.hadm_id GROUP BY t2.itemid) AS t3 WHERE t3.c1 <= 5) | until 1 year ago, what was the top five most frequent laboratory tests ordered for patients during the same hospital encounter after the diagnosis of no family able to care? | 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 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 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 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 chartevents (
row_id number,
subject_id number,
hadm_id number,
icustay_id number,
itemid number,
charttime time,
valuenum number,
valueuom text
)
CREATE TABLE d_items (
row_id number,
itemid number,
label text,
linksto text
)
CREATE TABLE outputevents (
row_id number,
subject_id number,
hadm_id number,
icustay_id number,
charttime time,
itemid number,
value number
)
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 inputevents_cv (
row_id number,
subject_id number,
hadm_id number,
icustay_id number,
charttime time,
itemid number,
amount number
)
CREATE TABLE procedures_icd (
row_id number,
subject_id number,
hadm_id number,
icd9_code text,
charttime time
)
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_procedures (
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 labevents (
row_id number,
subject_id number,
hadm_id number,
itemid number,
charttime time,
valuenum number,
valueuom text
)
CREATE TABLE patients (
row_id number,
subject_id number,
gender text,
dob time,
dod time
)
CREATE TABLE cost (
row_id number,
subject_id number,
hadm_id number,
event_type text,
event_id number,
chargetime time,
cost number
) |
SELECT cfl_team FROM table_25017530_5 WHERE player = "Steven Turner" | Name the cfl team for steven turner | CREATE TABLE table_25017530_5 (cfl_team VARCHAR, player VARCHAR) |
SELECT original_air_date FROM table_2818164_7 WHERE written_by = "Mark St. Germain" AND directed_by = "Jay Sandrich" | What is the original air date the was written by mark st. germain and direct by jay sandrich? | CREATE TABLE table_2818164_7 (original_air_date VARCHAR, written_by VARCHAR, directed_by VARCHAR) |
SELECT "Surface" FROM table_26537 WHERE "Against" = 'Sweden' | What is every surface against Sweden? | CREATE TABLE table_26537 (
"Edition" text,
"Round" text,
"Date" text,
"Against" text,
"Surface" text,
"Opponent" text,
"Win/Lose" text,
"Result" text
) |
SELECT cfl_team FROM table_25017530_6 WHERE position = "LB" | Name the cfl team for lb position | CREATE TABLE table_25017530_6 (cfl_team VARCHAR, position VARCHAR) |
SELECT network FROM table_28190363_1 WHERE judges = "Batuhan Zeynioğlu Piatti Murat Bozok Erol Kaynar" | What are the networks whose version of the show includes the judges batuhan zeynioğlu piatti murat bozok erol kaynar? | CREATE TABLE table_28190363_1 (network VARCHAR, judges VARCHAR) |
SELECT COUNT(*) FROM intakeoutput WHERE intakeoutput.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '027-142451')) AND intakeoutput.cellpath LIKE '%intake%' AND intakeoutput.celllabel = 'continuous infusion meds' AND STRFTIME('%y-%m', intakeoutput.intakeoutputtime) >= '2105-12' | how many times patient 027-142451 has had continuous infusion meds taken since 12/2105? | CREATE TABLE diagnosis (
diagnosisid number,
patientunitstayid number,
diagnosisname text,
diagnosistime time,
icd9code text
)
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
)
CREATE TABLE allergy (
allergyid number,
patientunitstayid number,
drugname text,
allergyname text,
allergytime time
)
CREATE TABLE medication (
medicationid number,
patientunitstayid number,
drugname text,
dosage text,
routeadmin text,
drugstarttime time,
drugstoptime 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 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 treatment (
treatmentid number,
patientunitstayid number,
treatmentname text,
treatmenttime time
)
CREATE TABLE microlab (
microlabid number,
patientunitstayid number,
culturesite text,
organism text,
culturetakentime time
) |
SELECT cfl_team FROM table_25017530_6 WHERE college = "Saskatchewan" | Name the cfl team for saskatchewan | CREATE TABLE table_25017530_6 (cfl_team VARCHAR, college VARCHAR) |
SELECT COUNT(network) FROM table_28190363_1 WHERE judges = "Pete Goffe-Wood Andrew Atkinson Benny Masekwameng" | How many networks are there that include the judges pete goffe-wood andrew atkinson benny masekwameng? | CREATE TABLE table_28190363_1 (network VARCHAR, judges VARCHAR) |
SELECT MIN(khmer) FROM table_name_9 WHERE ala_lc = "kau sip" AND value < 90 | What is smallest Khmer valued less than 90 have a kau sip ALA-LC? | CREATE TABLE table_name_9 (
khmer INTEGER,
ala_lc VARCHAR,
value VARCHAR
) |
SELECT position FROM table_25017530_6 WHERE player = "Michael Warner" | Name the position for michael warner | CREATE TABLE table_25017530_6 (position VARCHAR, player VARCHAR) |
SELECT COUNT(network) FROM table_28190363_1 WHERE judges = "TBA" AND presenter_s_ = "Arbana Osmani" | How many networks are there whose version of the shows includes judges tba and the presenter is Arbana Osmani? | CREATE TABLE table_28190363_1 (network VARCHAR, judges VARCHAR, presenter_s_ VARCHAR) |
SELECT "defendant" FROM table_204_479 WHERE "result" = 'tried, found not guilty' | which is the only defendant who was tried and found not guilty ? | CREATE TABLE table_204_479 (
id number,
"defendant" text,
"arrested" text,
"charge" text,
"result" text,
"sentence" text
) |
SELECT COUNT(production_count) FROM table_2501754_2 WHERE episode__number = 5 | How many episodes were numbered 5? | CREATE TABLE table_2501754_2 (production_count VARCHAR, episode__number VARCHAR) |
SELECT COUNT(presenter_s_) FROM table_28190363_1 WHERE name = "Celebrity MasterChef" | How many sets of presenters are there for the version of the show named Celebrity Masterchef? | CREATE TABLE table_28190363_1 (presenter_s_ VARCHAR, name VARCHAR) |
SELECT winner FROM table_name_48 WHERE points_classification = "damiano cunego" | Who was the winner in the stage that Damiano Cunego led the points classification? | CREATE TABLE table_name_48 (
winner VARCHAR,
points_classification VARCHAR
) |
SELECT original_airdate FROM table_2501754_2 WHERE prod_code = "IPEA343L" | What are the original air date(s) for episodes with production code ipea343l? | CREATE TABLE table_2501754_2 (original_airdate VARCHAR, prod_code VARCHAR) |
SELECT incumbent FROM table_28188239_1 WHERE district = "PA-8" | Who is the incumbent of district pa-8? | CREATE TABLE table_28188239_1 (incumbent VARCHAR, district VARCHAR) |
SELECT score FROM table_name_80 WHERE location = "olympia fields, illinois" | what is the score at Olympia fields, illinois? | CREATE TABLE table_name_80 (
score VARCHAR,
location VARCHAR
) |
SELECT original_airdate FROM table_2501754_2 WHERE prod_code = "IPEA345A" | What are the original air date(s) for episodes with production code ipea345a? | CREATE TABLE table_2501754_2 (original_airdate VARCHAR, prod_code VARCHAR) |
SELECT COUNT(incumbent) FROM table_28188239_1 WHERE district = "LA-1" | How many incumbents are in district la-1? | CREATE TABLE table_28188239_1 (incumbent VARCHAR, district VARCHAR) |
SELECT COUNT("No. in series") FROM table_24881 WHERE "Production code" = '7.07' | Which series number has the production code 7.07? | CREATE TABLE table_24881 (
"No. in series" real,
"No. in season" real,
"Title" text,
"Directed by" text,
"Written by" text,
"Original air date" text,
"Production code" text
) |
SELECT original_airdate FROM table_2501754_2 WHERE viewing_figures_millions = "8.63" | What are the original air date(s) for episodes with 8.63 million viewers? | CREATE TABLE table_2501754_2 (original_airdate VARCHAR, viewing_figures_millions VARCHAR) |
SELECT directed_by FROM table_28194879_1 WHERE production_code = "PABF05" | Who directed the episode whose production code is pabf05? | CREATE TABLE table_28194879_1 (directed_by VARCHAR, production_code VARCHAR) |
SELECT "Perth" FROM table_70890 WHERE "Auckland" = 'yes' AND "Gold Coast" = 'yes' | Which Perth has Auckland yes and Gold Coast yes? | CREATE TABLE table_70890 (
"Auckland" text,
"Gold Coast" text,
"Sydney" text,
"Melbourne" text,
"Adelaide" text,
"Perth" text
) |
SELECT power FROM table_250230_2 WHERE model = "Type R" | What is the power of the Type R? | CREATE TABLE table_250230_2 (power VARCHAR, model VARCHAR) |
SELECT MAX(_number) FROM table_28194879_1 WHERE written_by = "Dan Vebber" | What is the last number in season of the episodes written by Dan Vebber? | CREATE TABLE table_28194879_1 (_number INTEGER, written_by VARCHAR) |
SELECT demographic.days_stay FROM demographic WHERE demographic.name = "Jerry Deberry" | what is days of hospital stay of subject name jerry deberry? | CREATE TABLE diagnoses (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE procedures (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title 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 lab (
subject_id text,
hadm_id text,
itemid text,
charttime text,
flag text,
value_unit text,
label text,
fluid 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
) |
SELECT brakes FROM table_250230_2 WHERE wheels = "16x8.0JJ (front) 16x8.0JJ (rear)" AND tyres = "225/50R16 92V(front) 225/50R16 92V(rear)" AND model = "Type RB 4AT" | What kind of brakes for the model type rb 4at with 16x8.0jj (front) 16x8.0jj (rear) wheels and 225/50r16 92v(front) 225/50r16 92v(rear) tyres? | CREATE TABLE table_250230_2 (brakes VARCHAR, model VARCHAR, wheels VARCHAR, tyres VARCHAR) |
SELECT _number FROM table_28194879_1 WHERE production_code = "PABF05" | What is the number in season of the episode whose production code is pabf05? | CREATE TABLE table_28194879_1 (_number VARCHAR, production_code VARCHAR) |
SELECT release_date FROM table_name_10 WHERE title = "forward march hare" | What's the release date of Forward March Hare? | CREATE TABLE table_name_10 (
release_date VARCHAR,
title VARCHAR
) |
SELECT brakes FROM table_250230_2 WHERE gearbox = "4-speed automatic" | What brakes for the 4-speed automatic gearbox? | CREATE TABLE table_250230_2 (brakes VARCHAR, gearbox VARCHAR) |
SELECT MAX(founded) FROM table_28211213_1 WHERE team_nickname = "Spartans" | When were the Spartans founded? | CREATE TABLE table_28211213_1 (founded INTEGER, team_nickname VARCHAR) |
SELECT "Date" FROM table_58204 WHERE "Home team score" = '9.13 (67)' | On what Date was the Home Team Score 9.13 (67)? | CREATE TABLE table_58204 (
"Home team" text,
"Home team score" text,
"Away team" text,
"Away team score" text,
"Venue" text,
"Crowd" real,
"Date" text
) |
SELECT power FROM table_250230_2 WHERE model = "Spirit R (Type B)" | What is the power for the Spirit R (Type B)? | CREATE TABLE table_250230_2 (power VARCHAR, model VARCHAR) |
SELECT COUNT(affiliation) FROM table_28211213_1 WHERE institution = "University of Toledo" | How many affiliations does the University of Toledo have? | CREATE TABLE table_28211213_1 (affiliation VARCHAR, institution VARCHAR) |
SELECT "Away team score" FROM table_58498 WHERE "Home team" = 'essendon' | what is the away team score when the home team is essendon? | CREATE TABLE table_58498 (
"Home team" text,
"Home team score" text,
"Away team" text,
"Away team score" text,
"Venue" text,
"Crowd" real,
"Date" text
) |
SELECT gearbox FROM table_250230_2 WHERE "torque" = "torque" | What is the gearbox when the torque is torque? | CREATE TABLE table_250230_2 (gearbox VARCHAR) |
SELECT affiliation FROM table_28211213_1 WHERE institution = "Davenport University" | What is the affiliation of Davenport University? | CREATE TABLE table_28211213_1 (affiliation VARCHAR, institution VARCHAR) |
SELECT "Home team score" FROM table_57264 WHERE "Away team" = 'carlton' | What is the home team score that played away team carlton? | CREATE TABLE table_57264 (
"Home team" text,
"Home team score" text,
"Away team" text,
"Away team score" text,
"Venue" text,
"Crowd" real,
"Date" text
) |
SELECT COUNT(first_elected) FROM table_25030512_4 WHERE district = "Alabama 3" | Name the first elected for alabama 3 | CREATE TABLE table_25030512_4 (first_elected VARCHAR, district VARCHAR) |
SELECT MAX(2001 AS _population) FROM table_282413_3 WHERE ethnic_group = "White: British" | What is the highest 2001 population when the ethnic group is white: british? | CREATE TABLE table_282413_3 (ethnic_group VARCHAR) |
SELECT d_icd_diagnoses.short_title FROM d_icd_diagnoses WHERE d_icd_diagnoses.icd9_code IN (SELECT t3.icd9_code FROM (SELECT t2.icd9_code, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM (SELECT admissions.subject_id, procedures_icd.charttime, admissions.hadm_id FROM procedures_icd JOIN admissions ON procedures_icd.hadm_id = admissions.hadm_id WHERE procedures_icd.icd9_code = (SELECT d_icd_procedures.icd9_code FROM d_icd_procedures WHERE d_icd_procedures.short_title = 'packed cell transfusion') AND DATETIME(procedures_icd.charttime, 'start of year') = DATETIME(CURRENT_TIME(), 'start of year', '-1 year')) AS t1 JOIN (SELECT admissions.subject_id, diagnoses_icd.icd9_code, diagnoses_icd.charttime, admissions.hadm_id FROM diagnoses_icd JOIN admissions ON diagnoses_icd.hadm_id = admissions.hadm_id WHERE DATETIME(diagnoses_icd.charttime, 'start of year') = DATETIME(CURRENT_TIME(), 'start of year', '-1 year')) AS t2 ON t1.subject_id = t2.subject_id WHERE t1.charttime < t2.charttime AND t1.hadm_id = t2.hadm_id GROUP BY t2.icd9_code) AS t3 WHERE t3.c1 <= 5) | what was the top five most frequent diagnoses that patients were given in the same hospital visit after receiving a packed cell transfusion a year before? | CREATE TABLE cost (
row_id number,
subject_id number,
hadm_id number,
event_type text,
event_id number,
chargetime time,
cost number
)
CREATE TABLE d_icd_procedures (
row_id number,
icd9_code text,
short_title text,
long_title text
)
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 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 microbiologyevents (
row_id number,
subject_id number,
hadm_id number,
charttime time,
spec_type_desc text,
org_name text
)
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 d_items (
row_id number,
itemid number,
label text,
linksto text
)
CREATE TABLE procedures_icd (
row_id number,
subject_id number,
hadm_id number,
icd9_code text,
charttime time
)
CREATE TABLE outputevents (
row_id number,
subject_id number,
hadm_id number,
icustay_id number,
charttime time,
itemid number,
value number
)
CREATE TABLE d_icd_diagnoses (
row_id number,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE patients (
row_id number,
subject_id number,
gender text,
dob time,
dod time
)
CREATE TABLE labevents (
row_id number,
subject_id number,
hadm_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 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 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 inputevents_cv (
row_id number,
subject_id number,
hadm_id number,
icustay_id number,
charttime time,
itemid number,
amount number
)
CREATE TABLE d_labitems (
row_id number,
itemid number,
label text
) |
SELECT party FROM table_25030512_4 WHERE incumbent = "Spencer Bachus" | Name the party for spencer bachus | CREATE TABLE table_25030512_4 (party VARCHAR, incumbent VARCHAR) |
SELECT COUNT(2001 AS __percentage) FROM table_282413_3 WHERE ethnic_group = "Other: Total" | How many times is the ethnic group other: total? | CREATE TABLE table_282413_3 (ethnic_group VARCHAR) |
SELECT "Green Rating" FROM table_14146 WHERE "L/100km Urban (Cold)" > '10.9' AND "mpg-US Urban" > '14.1' AND "Manufacturer" = 'volkswagen' AND "Engine Capacity" < '3189' | What is the green rating for the vehicle with L/100km urban (cold) over 10.9, mpg in the US (urban) over 14.1, manufacturer of Volkswagen, and engine capacity under 3189? | CREATE TABLE table_14146 (
"Manufacturer" text,
"Transmission" text,
"Engine Capacity" real,
"Fuel Type" text,
"L/100km Urban (Cold)" real,
"L/100km Extra-Urban" real,
"L/100km Combined" real,
"mpg-UK Urban (Cold)" real,
"mpg-UK Extra-Urban" real,
"mpg-UK Combined" real,
"mpg-US Urban" real,
"mpg-US Extra-Urban" real,
"mpg-US Combined" real,
"CO 2 g/km" real,
"Green Rating" text
) |
SELECT district FROM table_25030512_4 WHERE incumbent = "Mike Rogers" | Name the district for mike rogers | CREATE TABLE table_25030512_4 (district VARCHAR, incumbent VARCHAR) |
SELECT MAX(2011 AS _population) FROM table_282413_3 WHERE ethnic_group = "Asian or Asian British: Asian Other" | What is the highest 2011 population when the ethnic group is asian or asian british: asian other? | CREATE TABLE table_282413_3 (ethnic_group VARCHAR) |
SELECT MIN("Drawn") FROM table_6357 WHERE "Games" < '7' | What is the lowest drawn that has games less than 7? | CREATE TABLE table_6357 (
"Games" real,
"Drawn" real,
"Lost" real,
"Points difference" text,
"Points" real
) |
SELECT district FROM table_25030512_4 WHERE incumbent = "Spencer Bachus" | Name the district for spencer bachus | CREATE TABLE table_25030512_4 (district VARCHAR, incumbent VARCHAR) |
SELECT affiliation FROM table_28253870_1 WHERE enrollment = 27209 | Name the affiliation for 27209 enrollment | CREATE TABLE table_28253870_1 (affiliation VARCHAR, enrollment VARCHAR) |
SELECT demographic.days_stay FROM demographic WHERE demographic.name = "Steven Sepulveda" | what is days of hospital stay of subject name steven sepulveda? | CREATE TABLE lab (
subject_id text,
hadm_id text,
itemid text,
charttime text,
flag text,
value_unit text,
label text,
fluid text
)
CREATE TABLE diagnoses (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title 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
)
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
) |
SELECT district FROM table_25030512_26 WHERE incumbent = "Keith Ellison" | In what district was keith ellison the incumbent? | CREATE TABLE table_25030512_26 (district VARCHAR, incumbent VARCHAR) |
SELECT MIN(founded) FROM table_28253870_1 | Name the least founded | CREATE TABLE table_28253870_1 (founded INTEGER) |
SELECT "2010" FROM table_55481 WHERE "2008" = 'a' AND "2011" = 'a' AND "2012" = 'qf' | What is the categorization in 2010 when it was A in 2008 and 20011 while being QF in 2012? | CREATE TABLE table_55481 (
"Tournament" text,
"2007" text,
"2008" text,
"2009" text,
"2010" text,
"2011" text,
"2012" text
) |
SELECT day_power___w__ FROM table_25034983_2 WHERE city = "Moline" | List the kilo watt hoours per day for moline. | CREATE TABLE table_25034983_2 (day_power___w__ VARCHAR, city VARCHAR) |
SELECT founded FROM table_28253870_1 WHERE institution = "Florida State University" | Name the founded for florida state university | CREATE TABLE table_28253870_1 (founded VARCHAR, institution VARCHAR) |
SELECT "Listed" FROM table_49983 WHERE "Built" = 'ca.1876' | What is the date Listed of the Bridge Built CA.1876? | CREATE TABLE table_49983 (
"Name" text,
"Built" text,
"Listed" text,
"Location" text,
"County" text
) |
SELECT start FROM table_25034983_2 WHERE nickname = "Voice of Muscatine" | In which year did the voice of muscatine show start? | CREATE TABLE table_25034983_2 (start VARCHAR, nickname VARCHAR) |
SELECT location FROM table_28253870_1 WHERE team_nickname = "Yellow Jackets" | Name the location for yellow jackets | CREATE TABLE table_28253870_1 (location VARCHAR, team_nickname VARCHAR) |
SELECT MIN("Population (2011)") FROM table_42839 WHERE "Density (inhabitants/km 2 )" = '36.7' | What is the lowest population for the area that has a density of 36.7? | CREATE TABLE table_42839 (
"Name" text,
"Seat" text,
"Population (2011)" real,
"Area (km 2 )" real,
"Density (inhabitants/km 2 )" real
) |
SELECT MIN(start) FROM table_25034983_2 WHERE owner = "Cumulus" | In what year was cumulus founded? | CREATE TABLE table_25034983_2 (start INTEGER, owner VARCHAR) |
SELECT COUNT(college_junior_club_team) FROM table_2840500_6 WHERE nationality = "Russia" | How many college teams have a player with a nationality of Russia? | CREATE TABLE table_2840500_6 (college_junior_club_team VARCHAR, nationality VARCHAR) |
SELECT player FROM table_name_4 WHERE rank = "t12" AND country = "taiwan" AND lifespan = "1963–" | Which Player has a Rank of t12, and a Country of taiwan, and a Lifespan of 1963 ? | CREATE TABLE table_name_4 (
player VARCHAR,
lifespan VARCHAR,
rank VARCHAR,
country VARCHAR
) |
SELECT stereo FROM table_25034983_2 WHERE city = "Moline" | Does the city of moline have stereo? | CREATE TABLE table_25034983_2 (stereo VARCHAR, city VARCHAR) |
SELECT pick FROM table_2840500_6 WHERE player = "Michel Larocque" | Which pick did Michel Larocque receive? | CREATE TABLE table_2840500_6 (pick VARCHAR, player VARCHAR) |
SELECT Sex, AVG(Age) FROM Student GROUP BY Sex ORDER BY Sex | Show me mean age by sex in a histogram, display x axis in asc order please. | CREATE TABLE Has_Allergy (
StuID INTEGER,
Allergy VARCHAR(20)
)
CREATE TABLE Allergy_Type (
Allergy VARCHAR(20),
AllergyType VARCHAR(20)
)
CREATE TABLE Student (
StuID INTEGER,
LName VARCHAR(12),
Fname VARCHAR(12),
Age INTEGER,
Sex VARCHAR(1),
Major INTEGER,
Advisor INTEGER,
city_code VARCHAR(3)
) |
SELECT company FROM table_250309_1 WHERE parent_company = "Wrightbus" | what is the company with the parent company wrightbus? | CREATE TABLE table_250309_1 (company VARCHAR, parent_company VARCHAR) |
SELECT nhl_team FROM table_2840500_6 WHERE player = "Blaine Russell" | Which team picked Blaine Russell? | CREATE TABLE table_2840500_6 (nhl_team VARCHAR, player VARCHAR) |
SELECT status_code FROM bookings GROUP BY status_code ORDER BY COUNT(*) DESC LIMIT 1 | What is the most frequent status of bookings? | CREATE TABLE ref_service_types (
service_type_code text,
parent_service_type_code text,
service_type_description text
)
CREATE TABLE drama_workshop_groups (
workshop_group_id number,
address_id number,
currency_code text,
marketing_region_code text,
store_name text,
store_phone text,
store_email_address text,
other_details text
)
CREATE TABLE marketing_regions (
marketing_region_code text,
marketing_region_name text,
marketing_region_descriptrion text,
other_details text
)
CREATE TABLE products (
product_id text,
product_name text,
product_price number,
product_description text,
other_product_service_details text
)
CREATE TABLE performers_in_bookings (
order_id number,
performer_id number
)
CREATE TABLE invoices (
invoice_id number,
order_id number,
payment_method_code text,
product_id number,
order_quantity text,
other_item_details text,
order_item_id number
)
CREATE TABLE customer_orders (
order_id number,
customer_id number,
store_id number,
order_date time,
planned_delivery_date time,
actual_delivery_date time,
other_order_details text
)
CREATE TABLE addresses (
address_id text,
line_1 text,
line_2 text,
city_town text,
state_county text,
other_details text
)
CREATE TABLE bookings_services (
order_id number,
product_id number
)
CREATE TABLE clients (
client_id number,
address_id number,
customer_email_address text,
customer_name text,
customer_phone text,
other_details text
)
CREATE TABLE stores (
store_id text,
address_id number,
marketing_region_code text,
store_name text,
store_phone text,
store_email_address text,
other_details text
)
CREATE TABLE invoice_items (
invoice_item_id number,
invoice_id number,
order_id number,
order_item_id number,
product_id number,
order_quantity number,
other_item_details text
)
CREATE TABLE performers (
performer_id number,
address_id number,
customer_name text,
customer_phone text,
customer_email_address text,
other_details text
)
CREATE TABLE bookings (
booking_id number,
customer_id number,
workshop_group_id text,
status_code text,
store_id number,
order_date time,
planned_delivery_date time,
actual_delivery_date time,
other_order_details text
)
CREATE TABLE customers (
customer_id text,
address_id number,
customer_name text,
customer_phone text,
customer_email_address text,
other_details text
)
CREATE TABLE services (
service_id number,
service_type_code text,
workshop_group_id number,
product_description text,
product_name text,
product_price number,
other_product_service_details text
)
CREATE TABLE ref_payment_methods (
payment_method_code text,
payment_method_description text
)
CREATE TABLE order_items (
order_item_id number,
order_id number,
product_id number,
order_quantity text,
other_item_details text
) |
SELECT company FROM table_250309_1 WHERE plant = "Burnaston" | what is the name ofhte company where the plant is in burnaston? | CREATE TABLE table_250309_1 (company VARCHAR, plant VARCHAR) |
SELECT COUNT(district_home) FROM table_2841865_2 WHERE congress = "87th" | How many entries for district home are listed for the 87th congress? | CREATE TABLE table_2841865_2 (district_home VARCHAR, congress VARCHAR) |
SELECT team FROM table_name_44 WHERE school = "milford" | Name the team for school of milford | CREATE TABLE table_name_44 (
team VARCHAR,
school VARCHAR
) |
SELECT models_produced FROM table_250309_1 WHERE plant = "Scarborough" | what models are produced where the plant is scarborough? | CREATE TABLE table_250309_1 (models_produced VARCHAR, plant VARCHAR) |
SELECT years FROM table_2841865_2 WHERE congress = "96th" | What time span is listed under years for the 96th congres? | CREATE TABLE table_2841865_2 (years VARCHAR, congress VARCHAR) |
SELECT employee_id, job_id FROM employees WHERE salary < (SELECT MIN(salary) FROM employees WHERE job_id = 'MK_MAN') | display the employee number and job id for all employees whose salary is smaller than any salary of those employees whose job title is MK_MAN. | CREATE TABLE employees (
employee_id VARCHAR,
job_id VARCHAR,
salary INTEGER
) |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.