instruction stringlengths 151 7.46k | output stringlengths 2 4.44k | source stringclasses 26
values |
|---|---|---|
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_... | SELECT DISTINCT fare.fare_id FROM airport_service AS AIRPORT_SERVICE_0, airport_service AS AIRPORT_SERVICE_1, city AS CITY_0, city AS CITY_1, fare, flight, flight_fare 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_... | atis |
CREATE TABLE table_name_38 (
heat VARCHAR,
name VARCHAR,
lane VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the total number of heats with a finisher named Gregor Tait in lanes over 6?
| SELECT COUNT(heat) FROM table_name_38 WHERE name = "gregor tait" AND lane > 6 | sql_create_context |
CREATE TABLE table_25918 (
"Episode" text,
"First broadcast" text,
"Seans team" text,
"Jasons team" text,
"Scores" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Name the first broadcast for trisha goddard and glenn wool
| SELECT "First broadcast" FROM table_25918 WHERE "Jasons team" = 'Trisha Goddard and Glenn Wool' | wikisql |
CREATE TABLE table_7621 (
"Sign" text,
"Element" text,
"Qualities" text,
"Season: North" text,
"Season: South" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the qualities of the sign cancer?
| SELECT "Qualities" FROM table_7621 WHERE "Sign" = 'cancer' | wikisql |
CREATE TABLE table_15481 (
"Institution" text,
"Location" text,
"Founded" real,
"Type" text,
"Joined" real,
"Nickname" text,
"Colors" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- When did Northeastern University join?
| SELECT SUM("Joined") FROM table_15481 WHERE "Institution" = 'northeastern university' | wikisql |
CREATE TABLE table_32818 (
"Year" real,
"Rider" text,
"Country" text,
"Distance" text,
"Pacing" text,
"Velodrome" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What velodrome took place earlier than 1950 with a winner from France in tandem pace... | SELECT "Velodrome" FROM table_32818 WHERE "Year" < '1950' AND "Country" = 'france' AND "Pacing" = 'tandem paced' AND "Distance" = '951.750 km' | wikisql |
CREATE TABLE table_name_52 (
laps INTEGER,
grid VARCHAR,
time_retired VARCHAR,
driver VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What was Alexander Wurz's highest laps when he has a grid less than 14 and a time/retired of +1 lap.
| SELECT MAX(laps) FROM table_name_52 WHERE time_retired = "+1 lap" AND driver = "alexander wurz" AND grid < 14 | sql_create_context |
CREATE TABLE SuggestedEditVotes (
Id number,
SuggestedEditId number,
UserId number,
VoteTypeId number,
CreationDate time,
TargetUserId number,
TargetRepChange number
)
CREATE TABLE FlagTypes (
Id number,
Name text,
Description text
)
CREATE TABLE ReviewRejectionReasons (
Id... | SELECT Score / 10, AVG(LENGTH(Title)) AS "average_title_length" FROM Posts WHERE PostTypeId = 1 GROUP BY Score / 10 ORDER BY Score / 10 DESC | sede |
CREATE TABLE jybgb (
BBCJBW text,
BBDM text,
BBMC text,
BBZT number,
BGDH text,
BGJGDM text,
BGJGMC text,
BGRGH text,
BGRQ time,
BGRXM text,
BGSJ time,
CJRQ time,
JSBBRQSJ time,
JSBBSJ time,
JYBBH text,
JYJGMC text,
JYJSGH text,
JYJSQM text,
JY... | SELECT mzjzjlb.JZLSH FROM person_info JOIN hz_info JOIN mzjzjlb ON person_info.RYBH = hz_info.RYBH AND hz_info.YLJGDM = mzjzjlb.YLJGDM AND hz_info.KH = mzjzjlb.KH AND hz_info.KLX = mzjzjlb.KLX WHERE person_info.XM = '吴兰若' AND NOT mzjzjlb.JZLSH IN (SELECT jybgb.JZLSH FROM jybgb WHERE jybgb.BGRQ <= '2008-07-26') | css |
CREATE TABLE PostTypes (
Id number,
Name text
)
CREATE TABLE PostLinks (
Id number,
CreationDate time,
PostId number,
RelatedPostId number,
LinkTypeId number
)
CREATE TABLE PostNoticeTypes (
Id number,
ClassId number,
Name text,
Body text,
IsHidden boolean,
Predefin... | SELECT DATEADD(m, MONTH(Date), '2010-12-01') AS "month", COUNT(Id) AS "scholar" FROM Badges WHERE YEAR(Date) = 2011 AND Name = 'Scholar' GROUP BY MONTH(Date) ORDER BY MONTH(Date) | sede |
CREATE TABLE table_204_905 (
id number,
"team" text,
"wins" number,
"losses" number,
"win %" number,
"gb" number
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- what was the only team to win more than 100 games ?
| SELECT "team" FROM table_204_905 WHERE "wins" > 100 | squall |
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 t... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE diagnoses.short_title = "B-complex defic NEC" | mimicsql_data |
CREATE TABLE table_name_97 (
goals_for INTEGER,
lost VARCHAR,
goals_against VARCHAR,
points_1 VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the highest goals for less than 63 goals against, more than 65 points 1, and more than 10 losses?
| SELECT MAX(goals_for) FROM table_name_97 WHERE goals_against < 63 AND points_1 > 65 AND lost > 10 | sql_create_context |
CREATE TABLE course_prerequisite (
pre_course_id int,
course_id int
)
CREATE TABLE jobs (
job_id int,
job_title varchar,
description varchar,
requirement varchar,
city varchar,
state varchar,
country varchar,
zip int
)
CREATE TABLE area (
course_id int,
area varchar
)
... | SELECT DISTINCT course_offering.friday FROM course INNER JOIN course_offering ON course.course_id = course_offering.course_id INNER JOIN semester ON semester.semester_id = course_offering.semester WHERE course.department = 'MECHENG' AND course.number = 501 AND semester.semester = 'WN' AND semester.year = 2016 | advising |
CREATE TABLE table_name_51 (
high_estimate INTEGER,
low_estimate VARCHAR,
type VARCHAR,
location VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- With a type of mass suicide located in France and a low estimate greater than 16, the sum of the high esti... | SELECT SUM(high_estimate) FROM table_name_51 WHERE type = "mass suicide" AND location = "france" AND low_estimate > 16 | sql_create_context |
CREATE TABLE table_2144863_1 (
laps VARCHAR,
driver VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Name the laps for ryan newman
| SELECT laps FROM table_2144863_1 WHERE driver = "Ryan Newman" | sql_create_context |
CREATE TABLE location (
restaurant_id int,
house_number int,
street_name varchar,
city_name varchar
)
CREATE TABLE restaurant (
id int,
name varchar,
food_type varchar,
city_name varchar,
rating "decimal
)
CREATE TABLE geographic (
city_name varchar,
county varchar,
reg... | SELECT location.house_number, restaurant.name FROM location, restaurant WHERE location.city_name = 'san francisco' AND location.street_name = 'buchanan' AND restaurant.food_type = 'arabic' AND restaurant.id = location.restaurant_id AND restaurant.rating > 2.5 | restaurants |
CREATE TABLE procedures (
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 prescription... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE diagnoses.icd9_code = "5679" AND prescriptions.drug_type = "MAIN" | mimicsql_data |
CREATE TABLE table_48272 (
"Government" text,
"Federal excise tax ( CAD\u00a2 / L )" real,
"Total excise tax (CAD\u00a2/L)" real,
"Minimum tax incl. sales taxes (CAD\u00a2/L)" real,
"Min. tax (CAD\u00a2/US gal)" real
)
-- Using valid SQLite, answer the following questions for the tables provided a... | SELECT MIN("Minimum tax incl. sales taxes (CAD\u00a2/L)") FROM table_48272 WHERE "Min. tax (CAD\u00a2/US gal)" = '105.7' AND "Federal excise tax ( CAD\u00a2 / L )" > '10' | wikisql |
CREATE TABLE table_name_76 (
draws VARCHAR,
losses VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is Draws, when Losses is 'Did Not Qualify'?
| SELECT draws FROM table_name_76 WHERE losses = "did not qualify" | sql_create_context |
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,
... | SELECT demographic.marital_status, demographic.diagnosis FROM demographic WHERE demographic.name = "Hector Blair" | mimicsql_data |
CREATE TABLE table_14754471_1 (
hispanic___percentage_ VARCHAR,
free_reduced_lunch___percentage_ VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What percentage of hispanics are there when the free/reduced lunch percentage is 81.4?
| SELECT hispanic___percentage_ FROM table_14754471_1 WHERE free_reduced_lunch___percentage_ = "81.4" | sql_create_context |
CREATE TABLE Products (
Code INTEGER,
Name VARCHAR(255),
Price DECIMAL,
Manufacturer INTEGER
)
CREATE TABLE Manufacturers (
Code INTEGER,
Name VARCHAR(255),
Headquarter VARCHAR(255),
Founder VARCHAR(255),
Revenue REAL
)
-- Using valid SQLite, answer the following questions for the... | SELECT T1.Name, T1.Code FROM Products AS T1 JOIN Manufacturers AS T2 ON T1.Manufacturer = T2.Code GROUP BY Founder, T1.Name ORDER BY T1.Name DESC | nvbench |
CREATE TABLE table_9382 (
"Date" text,
"Opponent" text,
"Site" text,
"Result" text,
"Attendance" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is Attendance, when Opponent is 'At Syracuse'?
| SELECT "Attendance" FROM table_9382 WHERE "Opponent" = 'at syracuse' | wikisql |
CREATE TABLE table_16677874_2 (
opponents VARCHAR,
game VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- How many opponents did the team play in week 13?
| SELECT COUNT(opponents) FROM table_16677874_2 WHERE game = 13 | sql_create_context |
CREATE TABLE table_204_401 (
id number,
"rank" number,
"lane" number,
"name" text,
"nationality" text,
"react" number,
"time" number,
"notes" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- who finished after sabina veit ?
| SELECT "name" FROM table_204_401 WHERE "rank" = (SELECT "rank" FROM table_204_401 WHERE "name" = 'sabina veit') + 1 | squall |
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
)
CREATE TABLE labevents (
row_id number,
subject_id number,
hadm_... | SELECT MIN(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 = 'insulin human regular') AND DATETIME(cost.chargetime, 'start of year') = DATETIME(CURRENT_TIME(), 'start of year', '-1 year') GROUP BY cost.hadm_id) AS t1 | mimic_iii |
CREATE TABLE table_34289 (
"Round" real,
"Pick #" real,
"Overall" real,
"Name" text,
"Position" text,
"College" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- How many rounds had a pick number of more than 10 and Appalachian State as a college?
| SELECT COUNT("Round") FROM table_34289 WHERE "Pick #" > '10' AND "College" = 'appalachian state' | wikisql |
CREATE TABLE ReviewTaskStates (
Id number,
Name text,
Description text
)
CREATE TABLE SuggestedEdits (
Id number,
PostId number,
CreationDate time,
ApprovalDate time,
RejectionDate time,
OwnerUserId number,
Comment text,
Text text,
Title text,
Tags text,
Revision... | SELECT COUNT(a.uid) FROM (SELECT OwnerUserId AS uid, MAX(PostTypeId) AS type FROM Posts GROUP BY OwnerUserId HAVING COUNT(Id) = 1) AS a WHERE type = 1 | sede |
CREATE TABLE table_53752 (
"Total fat" text,
"Saturated fat" text,
"Monounsaturated fat" text,
"Polyunsaturated fat" text,
"Smoke point" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Name the polyunsaturated fat with a saturated fat of 25g
| SELECT "Polyunsaturated fat" FROM table_53752 WHERE "Saturated fat" = '25g' | wikisql |
CREATE TABLE zyjzjlb (
CYBQDM text,
CYBQMC text,
CYCWH text,
CYKSDM text,
CYKSMC text,
CYSJ time,
CYZTDM number,
HZXM text,
JZKSDM text,
JZKSMC text,
JZLSH text,
KH text,
KLX number,
MZBMLX number,
MZJZLSH text,
MZZDBM text,
MZZDMC text,
MZZYZDZZBM... | SELECT txmzjzjlb.YLJGDM FROM person_info JOIN hz_info JOIN txmzjzjlb ON person_info.RYBH = hz_info.RYBH AND hz_info.YLJGDM = txmzjzjlb.YLJGDM AND hz_info.KH = txmzjzjlb.KH AND hz_info.KLX = txmzjzjlb.KLX WHERE person_info.XM = '卫奇胜' UNION SELECT ftxmzjzjlb.YLJGDM FROM person_info JOIN hz_info JOIN ftxmzjzjlb ON person_... | css |
CREATE TABLE table_20297 (
"#" real,
"Advocate # 1" text,
"Advocate # 2" text,
"Root of All Evil" text,
"Poll winner" text,
"Original air date" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Name the poll winner for march 19, 2008
| SELECT COUNT("Poll winner") FROM table_20297 WHERE "Original air date" = 'March 19, 2008' | wikisql |
CREATE TABLE table_203_608 (
id number,
"rank" number,
"nation" text,
"gold" number,
"silver" number,
"bronze" number,
"total" number
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- what was the difference in medal count between slovakia and mexic... | SELECT (SELECT "total" FROM table_203_608 WHERE "nation" = 'slovakia') - (SELECT "total" FROM table_203_608 WHERE "nation" = 'mexico') | squall |
CREATE TABLE table_name_50 (
player VARCHAR,
position VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which player is a centre?
| SELECT player FROM table_name_50 WHERE position = "centre" | sql_create_context |
CREATE TABLE table_1157867_2 (
builder VARCHAR,
wheel_arrangement VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Who is the builder of the locomotives with wheel arrangement of 2-4-2 T?
| SELECT builder FROM table_1157867_2 WHERE wheel_arrangement = "2-4-2 T" | sql_create_context |
CREATE TABLE table_name_34 (
long INTEGER,
loss VARCHAR,
gain VARCHAR,
gp_gs VARCHAR,
avg_g VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the average Long that has a GP-GS less than 14, a AVg/G less than 0.8 and a Gain less than 3 and a ... | SELECT AVG(long) FROM table_name_34 WHERE gp_gs < 14 AND avg_g < 0.8 AND gain < 3 AND loss > 8 | sql_create_context |
CREATE TABLE table_name_23 (
name VARCHAR,
ship_type VARCHAR,
date VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- what is the name of the battleship with the battle listed on May 13, 1915?
| SELECT name FROM table_name_23 WHERE ship_type = "battleship" AND date = "may 13, 1915" | sql_create_context |
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
)
CRE... | SELECT MAX(LENGTH(Body)) FROM Posts | sede |
CREATE TABLE table_43075 (
"Tournament" text,
"2007" text,
"2008" text,
"2009" text,
"2010" text,
"2011" text,
"2012" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the 2008 of the 2r 2011 and A 2010?
| SELECT "2008" FROM table_43075 WHERE "2011" = '2r' AND "2010" = 'a' | wikisql |
CREATE TABLE table_12744 (
"Place" text,
"Player" text,
"Country" text,
"Score" text,
"To par" real,
"Money ( $ )" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Can you tell me the Player that has the Place of t5, and the Score of 73-72-71-75=2... | SELECT "Player" FROM table_12744 WHERE "Place" = 't5' AND "Score" = '73-72-71-75=291' | wikisql |
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 t... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.dob_year < "2078" AND lab.itemid = "50981" | mimicsql_data |
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
)
C... | 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.long_title = "Systemic inflammatory response syndrome due to noninfectious process without acute organ dysfunction" AND lab."... | mimicsql_data |
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 procedures (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.admission_type = "ELECTIVE" AND demographic.admityear < "2108" | mimicsql_data |
CREATE TABLE PostHistoryTypes (
Id number,
Name text
)
CREATE TABLE ReviewTaskResultTypes (
Id number,
Name text,
Description text
)
CREATE TABLE PendingFlags (
Id number,
FlagTypeId number,
PostId number,
CreationDate time,
CloseReasonTypeId number,
CloseAsOffTopicReasonTy... | SELECT TagName, Count FROM Tags WHERE TagName = 'java' | sede |
CREATE TABLE station (
id int,
network_name text,
services text,
local_authority text
)
CREATE TABLE route (
train_id int,
station_id int
)
CREATE TABLE train (
id int,
train_number int,
name text,
origin text,
destination text,
time text,
interval text
)
CREATE TA... | SELECT services, COUNT(services) FROM station GROUP BY local_authority, services | nvbench |
CREATE TABLE table_2739 (
"Rank" real,
"Census-designated place" text,
"Metropolitan area" text,
"State" text,
"Population (2000 census)" real,
"Land area (mi 2 )" text,
"Population density (people per mi 2 )" text
)
-- Using valid SQLite, answer the following questions for the tables prov... | SELECT "Metropolitan area" FROM table_2739 WHERE "Rank" = '60' | wikisql |
CREATE TABLE table_1342393_23 (
result VARCHAR,
district VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Name the total number of result for mississippi 4?
| SELECT COUNT(result) FROM table_1342393_23 WHERE district = "Mississippi 4" | sql_create_context |
CREATE TABLE table_name_35 (
date VARCHAR,
opponent VARCHAR,
home_away VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the date of the game away against Pride?
| SELECT date FROM table_name_35 WHERE opponent = "pride" AND home_away = "away" | sql_create_context |
CREATE TABLE hz_info (
KH text,
KLX number,
RYBH text,
YLJGDM text
)
CREATE TABLE jybgb (
BBCJBW text,
BBDM text,
BBMC text,
BBZT number,
BGDH text,
BGJGDM text,
BGJGMC text,
BGRGH text,
BGRQ time,
BGRXM text,
BGSJ time,
CJRQ time,
JSBBRQSJ time,
... | SELECT mzjzjlb.JZZDBM, mzjzjlb.JZZDSM FROM person_info JOIN hz_info JOIN mzjzjlb ON person_info.RYBH = hz_info.RYBH AND hz_info.YLJGDM = mzjzjlb.YLJGDM AND hz_info.KH = mzjzjlb.KH AND hz_info.KLX = mzjzjlb.KLX WHERE person_info.XM = '赵怡宁' | css |
CREATE TABLE qtb (
CLINIC_ID text,
COMP_ID text,
DATA_ID text,
DIFF_PLACE_FLG number,
FERTILITY_STS number,
FLX_MED_ORG_ID text,
HOSP_LEV number,
HOSP_STS number,
IDENTITY_CARD text,
INPT_AREA_BED text,
INSURED_IDENTITY number,
INSURED_STS text,
INSU_TYPE text,
IN... | SELECT qtb.MED_ORG_DEPT_CD, qtb.OUT_DIAG_DIS_NM, AVG(qtb.PERSON_AGE) FROM qtb WHERE qtb.MED_SER_ORG_NO = '4355063' GROUP BY qtb.MED_ORG_DEPT_CD, qtb.OUT_DIAG_DIS_NM UNION SELECT gyb.MED_ORG_DEPT_CD, gyb.OUT_DIAG_DIS_NM, AVG(gyb.PERSON_AGE) FROM gyb WHERE gyb.MED_SER_ORG_NO = '4355063' GROUP BY gyb.MED_ORG_DEPT_CD, gyb.... | css |
CREATE TABLE table_202_196 (
id number,
"ethnicity" text,
"1880" text,
"1899" text,
"1913" text,
"19301" text,
"1956" text,
"1966" text,
"1977" text,
"1992" text,
"2002" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- how many... | SELECT "1966" FROM table_202_196 WHERE "ethnicity" = 'russian-lipovan' | squall |
CREATE TABLE table_13146 (
"Player" text,
"Country" text,
"Year(s) won" text,
"Total" real,
"To par" text,
"Finish" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which Total has a Finish of t59?
| SELECT MIN("Total") FROM table_13146 WHERE "Finish" = 't59' | wikisql |
CREATE TABLE table_name_73 (
high_points VARCHAR,
team VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is High Points, when Team is @ Phoenix?
| SELECT high_points FROM table_name_73 WHERE team = "@ phoenix" | sql_create_context |
CREATE TABLE table_name_7 (
distance VARCHAR,
winning_horse VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What distance did the winning horse run in the Summer Doldrums.
| SELECT distance FROM table_name_7 WHERE winning_horse = "summer doldrums" | sql_create_context |
CREATE TABLE table_32133 (
"Rank" real,
"Nation" text,
"Gold" real,
"Silver" real,
"Bronze" real,
"Total" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Tell me the lowest bronze for panama and total larger than 8
| SELECT MIN("Bronze") FROM table_32133 WHERE "Nation" = 'panama' AND "Total" > '8' | wikisql |
CREATE TABLE table_name_37 (
year INTEGER,
label VARCHAR,
Nr VARCHAR,
st VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the earliest year with a label-Nr of st-43?
| SELECT MIN(year) FROM table_name_37 WHERE label - Nr = st - 43 | sql_create_context |
CREATE TABLE table_33034 (
"Week" real,
"Date" text,
"Opponent" text,
"Result" text,
"Game site" text,
"Attendance" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What was the attendance at the Meadowlands against the New England Patriots?
| SELECT "Attendance" FROM table_33034 WHERE "Game site" = 'the meadowlands' AND "Opponent" = 'new england patriots' | wikisql |
CREATE TABLE t_kc22 (
AMOUNT number,
CHA_ITEM_LEV number,
DATA_ID text,
DIRE_TYPE number,
DOSE_FORM text,
DOSE_UNIT text,
EACH_DOSAGE text,
EXP_OCC_DATE time,
FLX_MED_ORG_ID text,
FXBZ number,
HOSP_DOC_CD text,
HOSP_DOC_NM text,
MED_CLINIC_ID text,
MED_DIRE_CD tex... | SELECT t_kc21.MED_SER_ORG_NO FROM t_kc21 WHERE t_kc21.PERSON_ID = '83857179' GROUP BY t_kc21.MED_SER_ORG_NO ORDER BY COUNT(*) DESC | css |
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 procedures (
... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.marital_status = "WIDOWED" AND demographic.age < "81" | mimicsql_data |
CREATE TABLE labevents (
row_id number,
subject_id number,
hadm_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 patients (
row_id number,
subject_... | SELECT COUNT(DISTINCT admissions.subject_id) FROM admissions WHERE admissions.hadm_id IN (SELECT diagnoses_icd.hadm_id FROM diagnoses_icd WHERE diagnoses_icd.icd9_code = (SELECT d_icd_diagnoses.icd9_code FROM d_icd_diagnoses WHERE d_icd_diagnoses.short_title = 'twin-mate lb-in hos w cs') AND STRFTIME('%y', diagnoses_ic... | mimic_iii |
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 COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.insurance = "Medicare" AND demographic.age < "83" | mimicsql_data |
CREATE TABLE jyjgzbb (
BGDH text,
BGRQ time,
CKZFWDX text,
CKZFWSX number,
CKZFWXX number,
JCFF text,
JCRGH text,
JCRXM text,
JCXMMC text,
JCZBDM text,
JCZBJGDL number,
JCZBJGDW text,
JCZBJGDX text,
JCZBMC text,
JLDW text,
JYRQ time,
JYZBLSH text,
... | SELECT zyjybgb.SHRGH, zyjybgb.SHRXM FROM zyjybgb WHERE zyjybgb.BGDH = '09731045975' UNION SELECT mzjybgb.SHRGH, mzjybgb.SHRXM FROM mzjybgb WHERE mzjybgb.BGDH = '09731045975' | css |
CREATE TABLE hz_info (
KH text,
KLX number,
YLJGDM text,
RYBH text
)
CREATE TABLE jybgb (
YLJGDM text,
YLJGDM_MZJZJLB text,
YLJGDM_ZYJZJLB text,
BGDH text,
BGRQ time,
JYLX number,
JZLSH text,
JZLSH_MZJZJLB text,
JZLSH_ZYJZJLB text,
JZLX number,
KSBM text,
... | SELECT CYZTDM FROM zyjzjlb WHERE JZLSH = '65100285762' | css |
CREATE TABLE table_name_25 (
date VARCHAR,
game VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What was the date of the game number 22?
| SELECT date FROM table_name_25 WHERE game = 22 | sql_create_context |
CREATE TABLE table_name_37 (
country VARCHAR,
place VARCHAR,
player VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which country placed t3 and had the player Fred Couples?
| SELECT country FROM table_name_37 WHERE place = "t3" AND player = "fred couples" | sql_create_context |
CREATE TABLE table_name_81 (
res VARCHAR,
event VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is Res., when Event is 'KOTC 11 - Domination'?
| SELECT res FROM table_name_81 WHERE event = "kotc 11 - domination" | sql_create_context |
CREATE TABLE gwyjzb (
CLINIC_ID text,
CLINIC_TYPE text,
COMP_ID text,
DATA_ID text,
DIFF_PLACE_FLG number,
FERTILITY_STS number,
FLX_MED_ORG_ID text,
HOSP_LEV number,
HOSP_STS number,
IDENTITY_CARD text,
INPT_AREA_BED text,
INSURED_IDENTITY number,
INSURED_STS text,
... | SELECT gwyjzb.MED_SER_ORG_NO FROM gwyjzb WHERE gwyjzb.PERSON_NM = '蒋华荣' AND gwyjzb.IN_HOSP_DATE BETWEEN '2012-09-21' AND '2015-10-15' GROUP BY gwyjzb.MED_SER_ORG_NO ORDER BY COUNT(*) DESC LIMIT 1 UNION SELECT fgwyjzb.MED_SER_ORG_NO FROM fgwyjzb WHERE fgwyjzb.PERSON_NM = '蒋华荣' AND fgwyjzb.IN_HOSP_DATE BETWEEN '2012-09-2... | css |
CREATE TABLE procedures (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE diagnoses (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE prescriptions (
subject_id text,
hadm_id... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE demographic.admission_type = "NEWBORN" AND prescriptions.route = "IVPCA" | mimicsql_data |
CREATE TABLE table_55320 (
"Date" text,
"Opponent" text,
"Home/Away" text,
"Field" text,
"Result" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What was the opponent for the game at Multi-sport Field?
| SELECT "Opponent" FROM table_55320 WHERE "Field" = 'multi-sport field' | wikisql |
CREATE TABLE program_requirement (
program_id int,
category varchar,
min_credit int,
additional_req varchar
)
CREATE TABLE course (
course_id int,
name varchar,
department varchar,
number varchar,
credits varchar,
advisory_requirement varchar,
enforced_requirement varchar,
... | SELECT DISTINCT course.number FROM course INNER JOIN program_course ON program_course.course_id = course.course_id WHERE (course.number = 512 OR course.number = 490) AND program_course.workload = (SELECT MIN(PROGRAM_COURSEalias1.workload) FROM program_course AS PROGRAM_COURSEalias1 INNER JOIN course AS COURSEalias1 ON ... | advising |
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 t... | SELECT (SELECT vitalperiodic.systemicmean FROM vitalperiodic WHERE vitalperiodic.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '022-187132') AND patient.unitdischargetime IS ... | eicu |
CREATE TABLE table_56950 (
"Place" real,
"Player Name" text,
"Yards" text,
"TD's" real,
"Long" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the highest place a player with 4 long and less than 2 TDs has?
| SELECT MIN("Place") FROM table_56950 WHERE "Long" = '4' AND "TD's" < '2' | wikisql |
CREATE TABLE t_kc24 (
ACCOUNT_DASH_DATE time,
ACCOUNT_DASH_FLG number,
CASH_PAY number,
CIVIL_SUBSIDY number,
CKC102 number,
CLINIC_ID text,
CLINIC_SLT_DATE time,
COMP_ID text,
COM_ACC_PAY number,
COM_PAY number,
DATA_ID text,
ENT_ACC_PAY number,
ENT_PAY number,
F... | SELECT t_kc22.MED_CLINIC_ID FROM t_kc22 WHERE t_kc22.t_kc21_PERSON_ID = '85839461' AND t_kc22.MED_CLINIC_ID IN (SELECT t_kc22.MED_CLINIC_ID FROM t_kc22 WHERE t_kc22.AMOUNT >= 9856.88) | css |
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 t... | SELECT MAX(demographic.age) FROM demographic WHERE demographic.admission_location = "PHYS REFERRAL/NORMAL DELI" AND demographic.days_stay = "26" | mimicsql_data |
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_icd_diagnoses (
row_id number,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE... | SELECT t3.drug FROM (SELECT t2.drug, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM (SELECT admissions.subject_id, prescriptions.startdate FROM prescriptions JOIN admissions ON prescriptions.hadm_id = admissions.hadm_id WHERE prescriptions.drug = 'sterile diluent for flolan' AND DATETIME(prescriptions.startdate)... | mimic_iii |
CREATE TABLE table_train_161 (
"id" int,
"white_blood_cell_count_wbc" int,
"systolic_blood_pressure_sbp" int,
"c_peptide_level" float,
"diastolic_blood_pressure_dbp" int,
"heart_rate" int,
"glycosylated_hemoglobin" float,
"NOUSE" float
)
-- Using valid SQLite, answer the following ques... | SELECT * FROM table_train_161 WHERE heart_rate > 120 | criteria2sql |
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 (... | 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.icd9_code = "9110" AND lab.fluid = "Ascites" | mimicsql_data |
CREATE TABLE table_name_29 (
rank INTEGER,
name VARCHAR,
points VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which Rank that a Name of thomas morgenstern, and Points larger than 288.7?
| SELECT SUM(rank) FROM table_name_29 WHERE name = "thomas morgenstern" AND points > 288.7 | sql_create_context |
CREATE TABLE jyjgzbb (
BGDH text,
BGRQ time,
CKZFWDX text,
CKZFWSX number,
CKZFWXX number,
JCFF text,
JCRGH text,
JCRXM text,
JCXMMC text,
JCZBDM text,
JCZBJGDL number,
JCZBJGDW text,
JCZBJGDX text,
JCZBMC text,
JLDW text,
JYRQ time,
JYZBLSH text,
... | SELECT * FROM hz_info JOIN zyjzjlb ON hz_info.YLJGDM = zyjzjlb.YLJGDM AND hz_info.KH = zyjzjlb.KH AND hz_info.KLX = zyjzjlb.KLX WHERE hz_info.RYBH = '36497408' AND hz_info.YLJGDM = '1547387' AND zyjzjlb.CYKSMC LIKE '%内%' | css |
CREATE TABLE CloseReasonTypes (
Id number,
Name text,
Description text
)
CREATE TABLE PostTags (
PostId number,
TagId number
)
CREATE TABLE ReviewTaskTypes (
Id number,
Name text,
Description text
)
CREATE TABLE PostLinks (
Id number,
CreationDate time,
PostId number,
... | SELECT 'FlagTypes' AS "table", Id, Name FROM FlagTypes UNION SELECT 'ReviewTaskStates' AS "table", Id, Name FROM ReviewTaskStates UNION SELECT 'PostTypes' AS "table", Id, Name FROM PostTypes UNION SELECT 'ReviewTaskTypes' AS "table", Id, Name FROM ReviewTaskTypes UNION SELECT 'CloseReasonTypes' AS "table", Id, Name FRO... | sede |
CREATE TABLE table_name_79 (
round VARCHAR,
date VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- How many rounds total were there on may 31?
| SELECT COUNT(round) FROM table_name_79 WHERE date = "may 31" | sql_create_context |
CREATE TABLE budget (
School_id int,
Year int,
Budgeted int,
total_budget_percent_budgeted real,
Invested int,
total_budget_percent_invested real,
Budget_invested_percent text
)
CREATE TABLE endowment (
endowment_id int,
School_id int,
donator_name text,
amount real
)
CREAT... | SELECT COUNT(*), SUM(Enrollment) FROM School GROUP BY County | nvbench |
CREATE TABLE college (
college_id TEXT,
name_full TEXT,
city TEXT,
state TEXT,
country 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... | SELECT year, SUM(attendance) FROM home_game ORDER BY year | nvbench |
CREATE TABLE table_name_66 (
rank INTEGER,
lose VARCHAR,
goal_loss VARCHAR,
point VARCHAR,
draw VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What was the average rank of a player with more than 52 points, fewer than 10 draws, a goal loss under ... | SELECT AVG(rank) FROM table_name_66 WHERE point > 52 AND draw < 10 AND goal_loss < 44 AND lose < 15 | sql_create_context |
CREATE TABLE department (
dept_code text,
dept_name text,
school_code text,
emp_num number,
dept_address text,
dept_extension text
)
CREATE TABLE professor (
emp_num number,
dept_code text,
prof_office text,
prof_extension text,
prof_high_degree text
)
CREATE TABLE enroll (... | SELECT COUNT(DISTINCT dept_name), school_code FROM department GROUP BY school_code HAVING COUNT(DISTINCT dept_name) < 5 | spider |
CREATE TABLE table_17386 (
"No. in series" real,
"Title" text,
"Directed by" text,
"Written by" text,
"Original air date" text,
"Production code" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- WHO WROTE THE STORY WITH THE PRODUCTION CODE OF 1ADK... | SELECT "Written by" FROM table_17386 WHERE "Production code" = '1ADK-03' | wikisql |
CREATE TABLE table_65302 (
"Outcome" text,
"Date" text,
"Tournament" text,
"Surface" text,
"Opponent" text,
"Score" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the Tournament against Vladimir Zednik?
| SELECT "Tournament" FROM table_65302 WHERE "Opponent" = 'vladimir zednik' | wikisql |
CREATE TABLE t_kc22 (
AMOUNT number,
CHA_ITEM_LEV number,
DATA_ID text,
DIRE_TYPE number,
DOSE_FORM text,
DOSE_UNIT text,
EACH_DOSAGE text,
EXP_OCC_DATE time,
FLX_MED_ORG_ID text,
FXBZ number,
HOSP_DOC_CD text,
HOSP_DOC_NM text,
MED_CLINIC_ID text,
MED_DIRE_CD tex... | SELECT t_kc24.t_kc21_MED_ORG_DEPT_CD, t_kc24.t_kc21_MED_ORG_DEPT_NM FROM t_kc24 WHERE t_kc24.t_kc21_MED_SER_ORG_NO = '6663690' AND t_kc24.CLINIC_SLT_DATE BETWEEN '2012-08-22' AND '2013-10-08' GROUP BY t_kc24.t_kc21_MED_ORG_DEPT_CD ORDER BY SUM(t_kc24.OVE_PAY) DESC LIMIT 17 | css |
CREATE TABLE table_7234 (
"Rank" real,
"Name" text,
"Team" text,
"Games" real,
"Assists" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- With more than 69 Assists, what is Dejuan Collins' Rank?
| SELECT COUNT("Rank") FROM table_7234 WHERE "Name" = 'dejuan collins' AND "Assists" > '69' | wikisql |
CREATE TABLE table_name_14 (
tournament VARCHAR,
week VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What was the tournament for the week of August 4?
| SELECT tournament FROM table_name_14 WHERE week = "august 4" | sql_create_context |
CREATE TABLE table_1569516_1 (
platform VARCHAR,
operator VARCHAR,
service_pattern VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- How many platforms have a southern opertator and the pattern is all stations via clapham junction?
| SELECT COUNT(platform) FROM table_1569516_1 WHERE operator = "Southern" AND service_pattern = "All stations via Clapham Junction" | sql_create_context |
CREATE TABLE table_49531 (
"Class" text,
"Wheel arrangement" text,
"Fleet number(s)" text,
"Manufacturer" text,
"Year made" text,
"Quantity made" text,
"Quantity preserved" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which fleet numbers h... | SELECT "Fleet number(s)" FROM table_49531 WHERE "Quantity made" = '1' | wikisql |
CREATE TABLE hz_info (
KH text,
KLX number,
RYBH text,
YLJGDM text
)
CREATE TABLE person_info (
CSD text,
CSRQ time,
GJDM text,
GJMC text,
JGDM text,
JGMC text,
MZDM text,
MZMC text,
RYBH text,
XBDM number,
XBMC text,
XLDM text,
XLMC text,
XM text... | SELECT * FROM hz_info JOIN wdmzjzjlb JOIN jybgb JOIN jyjgzbb ON hz_info.YLJGDM = wdmzjzjlb.YLJGDM AND hz_info.KH = wdmzjzjlb.KH AND hz_info.KLX = wdmzjzjlb.KLX AND wdmzjzjlb.YLJGDM = jybgb.YLJGDM_MZJZJLB AND wdmzjzjlb.JZLSH = jybgb.JZLSH_MZJZJLB AND jybgb.YLJGDM = jyjgzbb.YLJGDM AND jybgb.BGDH = jyjgzbb.BGDH WHERE hz_i... | css |
CREATE TABLE table_29136 (
"English" text,
"Proto-Semitic" text,
"IPA" text,
"Arabic" text,
"Hebrew" text,
"Tigrinya" text,
"Sabaean" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Name the arabic for amu te
| SELECT "Arabic" FROM table_29136 WHERE "Tigrinya" = 'ħamuʃte' | wikisql |
CREATE TABLE patients (
row_id number,
subject_id number,
gender text,
dob time,
dod time
)
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,
... | SELECT chartevents.valuenum FROM chartevents WHERE chartevents.icustay_id IN (SELECT icustays.icustay_id FROM icustays WHERE icustays.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 27703)) AND chartevents.itemid IN (SELECT d_items.itemid FROM d_items WHERE d_items.label = 'admit ht'... | mimic_iii |
CREATE TABLE table_name_3 (
date VARCHAR,
week VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the Date of Week 5?
| SELECT date FROM table_name_3 WHERE week = 5 | sql_create_context |
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,
d... | SELECT (SELECT vitalperiodic.heartrate FROM vitalperiodic WHERE vitalperiodic.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '016-22566') AND NOT patient.unitdischargetime IS ... | eicu |
CREATE TABLE table_name_70 (
league VARCHAR,
total VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- How many League cups had a total less than 25 and a league larger than 19?
| SELECT COUNT(league) AS Cup FROM table_name_70 WHERE total < 25 AND league > 19 | sql_create_context |
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... | SELECT diagnoses_icd.charttime FROM diagnoses_icd WHERE diagnoses_icd.icd9_code = (SELECT d_icd_diagnoses.icd9_code FROM d_icd_diagnoses WHERE d_icd_diagnoses.short_title = 'delirium d/t other cond') AND diagnoses_icd.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 5142) AND DATETIME... | mimic_iii |
CREATE TABLE table_4746 (
"Home team" text,
"Home team score" text,
"Away team" text,
"Away team score" text,
"Venue" text,
"Crowd" real,
"Date" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- On what day did the home team score 10.10 (70)?
| SELECT "Date" FROM table_4746 WHERE "Home team score" = '10.10 (70)' | wikisql |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.