instruction stringlengths 151 7.46k | output stringlengths 2 4.44k | source stringclasses 26
values |
|---|---|---|
CREATE TABLE t_kc21 (
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 t_kc21.MED_SER_ORG_NO FROM t_kc21 WHERE t_kc21.PERSON_ID = '06203278' AND t_kc21.MED_CLINIC_ID IN (SELECT t_kc21_t_kc22.MED_CLINIC_ID FROM t_kc22 WHERE t_kc22.SOC_SRT_DIRE_NM = '蜜炼川贝枇杷膏') | css |
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,
KSMC text,
SQRGH text,
SQRXM text,
BGRGH text,
BGRXM text,
SHRGH ... | SELECT mzjzjlb.JZLSH FROM hz_info JOIN mzjzjlb ON hz_info.YLJGDM = mzjzjlb.YLJGDM AND hz_info.KH = mzjzjlb.KH AND hz_info.KLX = mzjzjlb.KLX WHERE hz_info.RYBH = '22165387' AND NOT mzjzjlb.JZLSH IN (SELECT JZLSH FROM jybgb WHERE BGRQ <= '2014-03-04') | css |
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
)
CREAT... | SELECT SUM(intakeoutput.cellvaluenumeric) FROM intakeoutput WHERE intakeoutput.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '006-13677')) AND intakeoutput.cellpath LIKE '%ou... | eicu |
CREATE TABLE table_17782308_1 (
game_site VARCHAR,
date VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- On October 16, 1966, what was the game site?
| SELECT game_site FROM table_17782308_1 WHERE date = "October 16, 1966" | sql_create_context |
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 jyjgzbb.JCZBJGDL, jyjgzbb.JCZBJGDW FROM hz_info JOIN mzjzjlb JOIN jybgb JOIN jyjgzbb ON hz_info.YLJGDM = mzjzjlb.YLJGDM AND hz_info.KH = mzjzjlb.KH AND hz_info.KLX = mzjzjlb.KLX AND mzjzjlb.YLJGDM = jybgb.YLJGDM_MZJZJLB AND mzjzjlb.JZLSH = jybgb.JZLSH_MZJZJLB AND jybgb.YLJGDM = jyjgzbb.YLJGDM AND jybgb.BGDH = jy... | css |
CREATE TABLE table_train_13 (
"id" int,
"active_infection" bool,
"procalcitonin" int,
"receiving_vasopressor" bool,
"sepsis" bool,
"septic_shock" bool,
"age" float,
"lactate" int,
"NOUSE" float
)
-- Using valid SQLite, answer the following questions for the tables provided above.
... | SELECT * FROM table_train_13 WHERE age >= 18 AND age <= 80 | criteria2sql |
CREATE TABLE inputevents_cv (
row_id number,
subject_id number,
hadm_id number,
icustay_id number,
charttime time,
itemid number,
amount number
)
CREATE TABLE outputevents (
row_id number,
subject_id number,
hadm_id number,
icustay_id number,
charttime time,
itemid n... | SELECT COUNT(DISTINCT t1.subject_id) FROM (SELECT admissions.subject_id, diagnoses_icd.charttime 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 = 'atrial fibrillatio... | mimic_iii |
CREATE TABLE table_35399 (
"Region" text,
"Employment ( salaries & wages)" text,
"Self employed" text,
"Investment income" text,
"Working tax credit" text,
"State pensions" text,
"Occupational pensions" text,
"Disability benefits" text,
"Other social security benefits" text,
"Oth... | SELECT "Investment income" FROM table_35399 WHERE "State pensions" = '7%' AND "Self employed" = '7%' AND "Other income sources" = '2%' | wikisql |
CREATE TABLE table_64644 (
"Name" text,
"Nickname" text,
"Location" text,
"Home ground(s)" text,
"Coach" text,
"Captain" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the Name listed for the Nickname of Storm?
| SELECT "Name" FROM table_64644 WHERE "Nickname" = 'storm' | wikisql |
CREATE TABLE table_11677691_4 (
hometown VARCHAR,
school VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Where was the hometown for the player that attended Shanley High School?
| SELECT hometown FROM table_11677691_4 WHERE school = "Shanley High school" | sql_create_context |
CREATE TABLE table_27396 (
"Season" text,
"Games" real,
"Won" real,
"Lost" real,
"Tied" real,
"Points" real,
"Goals for" real,
"Goals against" real,
"Standing" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Name the total number of g... | SELECT COUNT("Games") FROM table_27396 WHERE "Goals against" = '352' | wikisql |
CREATE TABLE table_6218 (
"Election date" real,
"Party leader" text,
"Number of votes received" text,
"Percentage of votes" text,
"Number of deputies" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What was deputies with the lowest number of unknown... | SELECT MIN("Number of deputies") FROM table_6218 WHERE "Number of votes received" = 'unknown' AND "Election date" > '1986' | wikisql |
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 t... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE lab.itemid = "51464" | mimicsql_data |
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 t... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE demographic.admityear < "2195" AND diagnoses.short_title = "Other postop infection" | mimicsql_data |
CREATE TABLE ReviewTaskStates (
Id number,
Name text,
Description text
)
CREATE TABLE Votes (
Id number,
PostId number,
VoteTypeId number,
UserId number,
CreationDate time,
BountyAmount number
)
CREATE TABLE FlagTypes (
Id number,
Name text,
Description text
)
CREATE T... | SELECT DATENAME(dw, CreationDate), COUNT(1) FROM Posts WHERE CreationDate > DATEADD(DAY, -120, CURRENT_TIMESTAMP()) AND ParentId IS NULL GROUP BY DATENAME(dw, CreationDate) | sede |
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.PERSON_NM, t_kc21.PERSON_SEX, t_kc21.PERSON_AGE, t_kc21.IDENTITY_CARD FROM t_kc21 WHERE t_kc21.MED_CLINIC_ID = '65250841483' | css |
CREATE TABLE Rooms (
RoomId TEXT,
roomName TEXT,
beds INTEGER,
bedType TEXT,
maxOccupancy INTEGER,
basePrice INTEGER,
decor TEXT
)
CREATE TABLE Reservations (
Code INTEGER,
Room TEXT,
CheckIn TEXT,
CheckOut TEXT,
Rate REAL,
LastName TEXT,
FirstName TEXT,
Adul... | SELECT bedType, AVG(basePrice) FROM Rooms GROUP BY bedType | nvbench |
CREATE TABLE d_items (
row_id number,
itemid number,
label text,
linksto text
)
CREATE TABLE patients (
row_id number,
subject_id number,
gender text,
dob time,
dod time
)
CREATE TABLE inputevents_cv (
row_id number,
subject_id number,
hadm_id number,
icustay_id num... | SELECT MAX(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 = 15794)) AND chartevents.itemid IN (SELECT d_items.itemid FROM d_items WHERE d_items.label = 'arte... | mimic_iii |
CREATE TABLE table_203_383 (
id number,
"week" number,
"date" text,
"opponent" text,
"time" text,
"game site" text,
"tv" text,
"result/score" text,
"record" text,
"bye" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- what was the ... | SELECT MIN("result/score") FROM table_203_383 WHERE "result/score" = 'w' | squall |
CREATE TABLE movie (
mid number,
title text,
year number,
director text
)
CREATE TABLE reviewer (
rid number,
name text
)
CREATE TABLE rating (
rid number,
mid number,
stars number,
ratingdate time
)
-- Using valid SQLite, answer the following questions for the tables provide... | SELECT T2.title, AVG(T1.stars) FROM rating AS T1 JOIN movie AS T2 ON T1.mid = T2.mid GROUP BY T1.mid ORDER BY AVG(T1.stars) LIMIT 1 | spider |
CREATE TABLE table_29527 (
"Episode air date" text,
"Audition city" text,
"First audition date" text,
"Audition venue" text,
"Callback audition date" text,
"Callback venue" text,
"Golden tickets" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-... | SELECT "Callback audition date" FROM table_29527 WHERE "Callback venue" = 'Hilton Riverside Hotel' | wikisql |
CREATE TABLE locations (
LOCATION_ID decimal(4,0),
STREET_ADDRESS varchar(40),
POSTAL_CODE varchar(12),
CITY varchar(30),
STATE_PROVINCE varchar(25),
COUNTRY_ID varchar(2)
)
CREATE TABLE departments (
DEPARTMENT_ID decimal(4,0),
DEPARTMENT_NAME varchar(30),
MANAGER_ID decimal(6,0),
... | SELECT JOB_ID, COUNT(JOB_ID) FROM employees WHERE HIRE_DATE < '2002-06-21' GROUP BY JOB_ID ORDER BY COUNT(JOB_ID) | nvbench |
CREATE TABLE table_68055 (
"Tournament" text,
"1999" text,
"2002" text,
"2004" text,
"2006" text,
"2007" text,
"2010" text,
"2011" text,
"2012" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the 2010 value with a 2r in 200r a... | SELECT "2010" FROM table_68055 WHERE "2004" = '2r' AND "2011" = '3r' | wikisql |
CREATE TABLE table_name_58 (
nba_years_ VARCHAR,
a_ VARCHAR,
nationality VARCHAR,
previous_team VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- How many NBA years did the player from the United States who was previously on the los angeles lakers have?... | SELECT nba_years_ AS "a_" FROM table_name_58 WHERE nationality = "united states" AND previous_team = "los angeles lakers" | sql_create_context |
CREATE TABLE table_2174 (
"Pitcher" text,
"Stats" real,
"Wins" real,
"Losses" real,
"No decisions" real,
"Winning %" text,
"Seasons" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What are Doug Davis' maximum pitching stats?
| SELECT MAX("Stats") FROM table_2174 WHERE "Pitcher" = 'Doug Davis' | wikisql |
CREATE TABLE job_history (
EMPLOYEE_ID decimal(6,0),
START_DATE date,
END_DATE date,
JOB_ID varchar(10),
DEPARTMENT_ID decimal(4,0)
)
CREATE TABLE departments (
DEPARTMENT_ID decimal(4,0),
DEPARTMENT_NAME varchar(30),
MANAGER_ID decimal(6,0),
LOCATION_ID decimal(4,0)
)
CREATE TABLE... | SELECT HIRE_DATE, COUNT(HIRE_DATE) FROM employees WHERE HIRE_DATE < '2002-06-21' | nvbench |
CREATE TABLE table_name_75 (
silver INTEGER,
gold VARCHAR,
bronze VARCHAR,
rank VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the smallest Silver value associated with teams having more than 0 gold, 0 bronze, and a rank of 14?
| SELECT MIN(silver) FROM table_name_75 WHERE bronze = 0 AND rank = 14 AND gold > 0 | sql_create_context |
CREATE TABLE jyjgzbb (
JYZBLSH text,
YLJGDM text,
BGDH text,
BGRQ time,
JYRQ time,
JCRGH text,
JCRXM text,
SHRGH text,
SHRXM text,
JCXMMC text,
JCZBDM text,
JCFF text,
JCZBMC text,
JCZBJGDX text,
JCZBJGDL number,
JCZBJGDW text,
SBBM text,
YQBH text... | (SELECT jybgb.KSBM, jybgb.KSMC FROM hz_info JOIN mzjzjlb JOIN jybgb ON hz_info.YLJGDM = mzjzjlb.YLJGDM AND hz_info.KH = mzjzjlb.KH AND hz_info.KLX = mzjzjlb.KLX AND mzjzjlb.YLJGDM = jybgb.YLJGDM_MZJZJLB AND mzjzjlb.JZLSH = jybgb.JZLSH_MZJZJLB WHERE hz_info.RYBH = '27615170' AND jybgb.BGRQ BETWEEN '2013-04-02' AND '2021... | css |
CREATE TABLE t_kc22 (
MED_EXP_DET_ID text,
OVERALL_CD_ORG text,
OVERALL_CD_PERSON text,
MED_CLINIC_ID text,
MED_EXP_BILL_ID text,
SOC_SRT_DIRE_CD text,
SOC_SRT_DIRE_NM text,
DIRE_TYPE number,
CHA_ITEM_LEV number,
MED_INV_ITEM_TYPE text,
MED_DIRE_CD text,
MED_DIRE_NM text,... | SELECT MIN(MED_AMOUT), MAX(MED_AMOUT) FROM t_kc24 WHERE MED_CLINIC_ID IN (SELECT MED_CLINIC_ID FROM t_kc21 WHERE MED_SER_ORG_NO = '7367933' AND OUT_DIAG_DIS_NM = '复发性阿弗他溃疡') | css |
CREATE TABLE table_20928682_1 (
opponents VARCHAR,
opponent VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- How many games were played against Tulane?
| SELECT COUNT(opponents) FROM table_20928682_1 WHERE opponent = "Tulane" | sql_create_context |
CREATE TABLE table_7909 (
"Date" text,
"Opponent" text,
"Venue" text,
"Result" text,
"Attendance" text,
"Competition" text,
"Man of the Match" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the Man of the Match of the Competition wit... | SELECT "Man of the Match" FROM table_7909 WHERE "Result" = 'lost 2-5' | wikisql |
CREATE TABLE d_labitems (
row_id number,
itemid number,
label text
)
CREATE TABLE procedures_icd (
row_id number,
subject_id number,
hadm_id number,
icd9_code text,
charttime time
)
CREATE TABLE prescriptions (
row_id number,
subject_id number,
hadm_id number,
startdate... | SELECT COUNT(DISTINCT admissions.hadm_id) FROM admissions WHERE admissions.subject_id = 273 AND STRFTIME('%y', admissions.admittime) >= '2104' | mimic_iii |
CREATE TABLE ReviewRejectionReasons (
Id number,
Name text,
Description text,
PostTypeId number
)
CREATE TABLE PostHistory (
Id number,
PostHistoryTypeId number,
PostId number,
RevisionGUID other,
CreationDate time,
UserId number,
UserDisplayName text,
Comment text,
... | SELECT RANK() OVER (ORDER BY AVG(CAST(a.Score AS FLOAT)) DESC) AS Rank, t.TagName, AVG(CAST(a.Score AS FLOAT)) AS "average_score", COUNT(a.Id) AS Count, SUM(a.Score) AS "total_score" FROM Posts AS q INNER JOIN Posts AS a ON q.Id = a.ParentId INNER JOIN PostTags AS pt ON q.Id = pt.PostId INNER JOIN Tags AS t ON t.Id = p... | sede |
CREATE TABLE mzjzjlb (
HXPLC number,
HZXM text,
JLSJ time,
JZJSSJ time,
JZKSBM text,
JZKSMC text,
JZKSRQ time,
JZLSH text,
JZZDBM text,
JZZDSM text,
JZZTDM number,
JZZTMC text,
KH text,
KLX number,
MJZH text,
ML number,
MZZYZDZZBM text,
MZZYZDZZMC ... | SELECT COUNT(*) FROM zyjzjlb JOIN hz_info_zyjzjlb JOIN hz_info ON hz_info_zyjzjlb.JZLSH = zyjzjlb.JZLSH AND hz_info_zyjzjlb.YLJGDM = hz_info_zyjzjlb.YLJGDM AND hz_info_zyjzjlb.JZLSH = zyjzjlb.JZLSH AND hz_info_zyjzjlb.zyjzjlb_id = zyjzjlb.zyjzjlb_id AND hz_info_zyjzjlb.YLJGDM = hz_info.YLJGDM WHERE hz_info.YLJGDM = '97... | css |
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 INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE demographic.ethnicity = "WHITE - RUSSIAN" AND diagnoses.icd9_code = "30501" | mimicsql_data |
CREATE TABLE table_39161 (
"Year" real,
"Championship" text,
"54 holes" text,
"Winning score" text,
"Margin" text,
"Runner-up" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Name the winning score for 54 holes of 5 shot deficit
| SELECT "Winning score" FROM table_39161 WHERE "54 holes" = '5 shot deficit' | wikisql |
CREATE TABLE table_14439 (
"Player" text,
"Position" text,
"Round" text,
"Overall" real,
"MLB Team" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What position was less than 421 overall played by Matt Clark?
| SELECT "Position" FROM table_14439 WHERE "Overall" < '421' AND "Player" = 'matt clark' | wikisql |
CREATE TABLE table_18619 (
"District" text,
"Incumbent" text,
"Party" text,
"First elected" real,
"Result" text,
"Candidates" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- what's the first elected with incumbent being joe starnes
| SELECT "First elected" FROM table_18619 WHERE "Incumbent" = 'Joe Starnes' | wikisql |
CREATE TABLE table_14717 (
"Rank" text,
"Address" text,
"Height feet / m" text,
"Floors" real,
"Year" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the rank associated with a Height feet / m of 427 / 130?
| SELECT "Rank" FROM table_14717 WHERE "Height feet / m" = '427 / 130' | wikisql |
CREATE TABLE table_dev_44 (
"id" int,
"gender" string,
"arterial_ph" float,
"systolic_blood_pressure_sbp" int,
"serum_bicarbonate" int,
"anion_gap" int,
"diabetic" string,
"diabetic_ketoacidosis" bool,
"blood_glucose" int,
"diastolic_blood_pressure_dbp" int,
"positive_serum_k... | SELECT * FROM table_dev_44 WHERE hypertension = 1 OR systolic_blood_pressure_sbp > 150 OR diastolic_blood_pressure_dbp > 110 | criteria2sql |
CREATE TABLE table_name_28 (
player VARCHAR,
place VARCHAR,
score VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which player has a score of 70-68-69-73=280 and a place of t4?
| SELECT player FROM table_name_28 WHERE place = "t4" AND score = 70 - 68 - 69 - 73 = 280 | sql_create_context |
CREATE TABLE requirement (
requirement_id int,
requirement varchar,
college varchar
)
CREATE TABLE offering_instructor (
offering_instructor_id int,
offering_id int,
instructor_id int
)
CREATE TABLE student (
student_id int,
lastname varchar,
firstname varchar,
program_id int,
... | SELECT DISTINCT course.department, course.name, course.number, program_course.workload FROM course INNER JOIN area ON course.course_id = area.course_id INNER JOIN program_course ON program_course.course_id = course.course_id WHERE area.area LIKE '%theory%' AND program_course.workload < (SELECT MIN(PROGRAM_COURSEalias1.... | advising |
CREATE TABLE treatment (
treatmentid number,
patientunitstayid number,
treatmentname text,
treatmenttime time
)
CREATE TABLE diagnosis (
diagnosisid number,
patientunitstayid number,
diagnosisname text,
diagnosistime time,
icd9code text
)
CREATE TABLE lab (
labid number,
pa... | SELECT MAX(t1.c1) FROM (SELECT SUM(cost.cost) AS c1 FROM cost WHERE cost.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.patientunitstayid IN (SELECT treatment.patientunitstayid FROM treatment WHERE treatment.treatmentname = 'tracheal suctioning')) AND DATETIME(cost.cha... | eicu |
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 demographic.age, demographic.days_stay FROM demographic WHERE demographic.subject_id = "2560" | mimicsql_data |
CREATE TABLE table_203_375 (
id number,
"name" text,
"year built" text,
"country" text,
"town" text,
"height" text,
"remarks" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- which pylon has the most remarks about it ?
| SELECT "name" FROM table_203_375 ORDER BY LENGTH("remarks") DESC LIMIT 1 | squall |
CREATE TABLE table_77811 (
"Date" text,
"Visitor" text,
"Score" text,
"Home" text,
"Leading scorer" text,
"Attendance" real,
"Record" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- How many people were in attendance on January 4, 2008?
| SELECT SUM("Attendance") FROM table_77811 WHERE "Date" = 'january 4, 2008' | wikisql |
CREATE TABLE locations (
LOCATION_ID decimal(4,0),
STREET_ADDRESS varchar(40),
POSTAL_CODE varchar(12),
CITY varchar(30),
STATE_PROVINCE varchar(25),
COUNTRY_ID varchar(2)
)
CREATE TABLE departments (
DEPARTMENT_ID decimal(4,0),
DEPARTMENT_NAME varchar(30),
MANAGER_ID decimal(6,0),
... | SELECT HIRE_DATE, SUM(DEPARTMENT_ID) FROM employees WHERE NOT EMPLOYEE_ID IN (SELECT EMPLOYEE_ID FROM job_history) ORDER BY SUM(DEPARTMENT_ID) | nvbench |
CREATE TABLE table_30058355_7 (
sat_27_aug VARCHAR,
thurs_25_aug VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is every entry for Saturday August 27 when the entry for Thursday August 25 is 23' 56.90 94.528mph?
| SELECT sat_27_aug FROM table_30058355_7 WHERE thurs_25_aug = "23' 56.90 94.528mph" | sql_create_context |
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,
... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.admission_location = "CLINIC REFERRAL/PREMATURE" AND demographic.diagnosis = "BRAIN MASS;INTRACRANIAL HEMORRHAGE" | mimicsql_data |
CREATE TABLE table_28385 (
"No. in series" real,
"No. in season" 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.
-- Which season had 'angel'?
| SELECT "No. in season" FROM table_28385 WHERE "Title" = 'Angel' | wikisql |
CREATE TABLE table_46228 (
"Tournament" text,
"1990" text,
"1991" text,
"1992" text,
"1993" text,
"1994" text,
"1995" text,
"1996" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the 1993 value of the French open?
| SELECT "1993" FROM table_46228 WHERE "Tournament" = 'french open' | wikisql |
CREATE TABLE table_33170 (
"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.
-- Which Away team has the Home team of Carlton?
| SELECT "Away team" FROM table_33170 WHERE "Home team" = 'carlton' | wikisql |
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 lab (
subject_id text,
hadm_id text,
itemid text,
charttime text,
flag text,
value_unit text,... | SELECT demographic.diagnosis, diagnoses.short_title FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE demographic.subject_id = "14755" | mimicsql_data |
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 INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE diagnoses.short_title = "Epistaxis" AND lab."CATEGORY" = "Chemistry" | mimicsql_data |
CREATE TABLE table_204_868 (
id number,
"outcome" text,
"no." number,
"date" text,
"tournament" text,
"surface" text,
"opponent" text,
"score" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- how many times was the surface clay ?
| SELECT COUNT(*) FROM table_204_868 WHERE "surface" = 'clay' | squall |
CREATE TABLE table_51355 (
"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.
-- What home team played at Glenferrie Oval?
| SELECT "Home team" FROM table_51355 WHERE "Venue" = 'glenferrie oval' | wikisql |
CREATE TABLE table_name_83 (
date VARCHAR,
surface VARCHAR,
tournament VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Name the date with a hard surface and tournament of usa f5, brownsville
| SELECT date FROM table_name_83 WHERE surface = "hard" AND tournament = "usa f5, brownsville" | sql_create_context |
CREATE TABLE table_68810 (
"Year" real,
"Competition" text,
"Venue" text,
"Position" text,
"Notes" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What was the venue before 2006, with the position of 10th?
| SELECT "Venue" FROM table_68810 WHERE "Year" < '2006' AND "Position" = '10th' | wikisql |
CREATE TABLE table_name_29 (
giro_wins INTEGER,
young_rider VARCHAR,
jerseys VARCHAR,
country VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- what is the giro wins when jerseys is 2, country is portugal and young rider is more than 0?
| SELECT SUM(giro_wins) FROM table_name_29 WHERE jerseys = 2 AND country = "portugal" AND young_rider > 0 | sql_create_context |
CREATE TABLE table_61425 (
"Rank" real,
"Champion" text,
"Runner-up" text,
"Third place" text,
"Fourth place" text,
"Total" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- How many third places has a total greater than 2 and a rank less than 2?
| SELECT "Third place" FROM table_61425 WHERE "Total" > '2' AND "Rank" < '2' | wikisql |
CREATE TABLE table_10006830_1 (
max_gross_weight VARCHAR,
aircraft VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the max gross weight of the Robinson R-22?
| SELECT max_gross_weight FROM table_10006830_1 WHERE aircraft = "Robinson R-22" | sql_create_context |
CREATE TABLE table_name_58 (
earnings___ INTEGER,
country VARCHAR,
score VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the average earnings of a United States player who had a score of 72-68-74-72=286?
| SELECT AVG(earnings___) AS $__ FROM table_name_58 WHERE country = "united states" AND score = 72 - 68 - 74 - 72 = 286 | sql_create_context |
CREATE TABLE table_name_85 (
winner VARCHAR,
points_classification VARCHAR,
stage VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Who was the winner of Stage 12 with a Points Classification of Francesco Moser?
| SELECT winner FROM table_name_85 WHERE points_classification = "francesco moser" AND stage = "12" | sql_create_context |
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,
ZYLBDM text,
ZYMC text
)
CREATE TABLE jyjgzbb (
BGDH text,
BGRQ tim... | SELECT jybgb.BGRGH, jybgb.BGRXM FROM jybgb WHERE jybgb.JZLSH = '71275819532' GROUP BY jybgb.BGRGH HAVING COUNT(*) > 20 | css |
CREATE TABLE table_name_42 (
team VARCHAR,
circuit VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which team won at the symmons plains raceway?
| SELECT team FROM table_name_42 WHERE circuit = "symmons plains raceway" | sql_create_context |
CREATE TABLE table_57468 (
"Election" text,
"1st Member" text,
"1st Party" text,
"2nd Member" text,
"2nd Party" text,
"3rd Member" text,
"3rd Party" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What was the 3rd Party in the Election of 192... | SELECT "3rd Party" FROM table_57468 WHERE "Election" = '1922' | wikisql |
CREATE TABLE table_63993 (
"Class" text,
"Wheel arrangement" text,
"Fleet number(s)" text,
"Manufacturer" text,
"Serial numbers" text,
"Year made" text,
"Quantity made" text,
"Quantity preserved" text,
"Year(s) retired" text
)
-- Using valid SQLite, answer the following questions f... | SELECT "Serial numbers" FROM table_63993 WHERE "Year made" = '1930' | wikisql |
CREATE TABLE t_kc24 (
MED_SAFE_PAY_ID text,
OVERALL_CD_ORG text,
OVERALL_CD_PERSON text,
MED_CLINIC_ID text,
REF_SLT_FLG number,
CLINIC_SLT_DATE time,
COMP_ID text,
PERSON_ID text,
FLX_MED_ORG_ID text,
INSU_TYPE text,
MED_AMOUT number,
PER_ACC_PAY number,
OVE_PAY numb... | SELECT SUM(MED_AMOUT) FROM t_kc24 WHERE MED_CLINIC_ID IN (SELECT MED_CLINIC_ID FROM t_kc21 WHERE MED_SER_ORG_NO = '1849548' AND MED_ORG_DEPT_CD = '1081') AND CLINIC_SLT_DATE BETWEEN '2000-11-11' AND '2020-07-03' | css |
CREATE TABLE table_204_442 (
id number,
"institution" text,
"location" text,
"enrollment" number,
"nickname" text,
"varsity\nsports" number,
"rugby\nsince" text,
"head coach" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- what was the nu... | SELECT "enrollment" FROM table_204_442 WHERE "rugby\nsince" = 1967 | squall |
CREATE TABLE table_name_88 (
county_team VARCHAR,
player VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which county team has jimmy finn as the player?
| SELECT county_team FROM table_name_88 WHERE player = "jimmy finn" | sql_create_context |
CREATE TABLE table_20898602_1 (
status VARCHAR,
pick__number VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- state the status of pick # 32
| SELECT status FROM table_20898602_1 WHERE pick__number = 32 | sql_create_context |
CREATE TABLE ReviewTaskStates (
Id number,
Name text,
Description text
)
CREATE TABLE PostLinks (
Id number,
CreationDate time,
PostId number,
RelatedPostId number,
LinkTypeId number
)
CREATE TABLE PendingFlags (
Id number,
FlagTypeId number,
PostId number,
CreationDate... | SELECT answers.Id AS "post_link", answers.* FROM Posts AS questions INNER JOIN Posts AS answers ON questions.Id = answers.ParentId WHERE questions.PostTypeId = 1 AND answers.PostTypeId = 2 AND answers.Body LIKE '%strategy%' AND NOT questions.Body LIKE '%strategy%' AND questions.Score > 0 AND questions.Tags LIKE '%java%... | sede |
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_labitems (
row_id number,
itemid number,
label text
)
CREATE TABLE diagnoses_icd (
row_id numbe... | SELECT t3.drug FROM (SELECT t2.drug, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM (SELECT admissions.subject_id, diagnoses_icd.charttime 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 ... | mimic_iii |
CREATE TABLE table_56726 (
"Date" text,
"Visitor" text,
"Score" text,
"Home" text,
"Leading scorer" text,
"Attendance" real,
"Record" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What was the Record of the game in which the Trail Blazers w... | SELECT "Record" FROM table_56726 WHERE "Visitor" = 'trail blazers' | wikisql |
CREATE TABLE table_59942 (
"Tournament" text,
"2006" 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 2008 when the tournament is year end ranking?
| SELECT "2008" FROM table_59942 WHERE "Tournament" = 'year end ranking' | wikisql |
CREATE TABLE table_79959 (
"Year built" text,
"Builder" text,
"Model" text,
"Fleet ID" text,
"Seats" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- How many seats does the BTC-5 model have?
| SELECT SUM("Seats") FROM table_79959 WHERE "Model" = 'btc-5' | wikisql |
CREATE TABLE table_name_79 (
name VARCHAR,
points VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Who had 1344 points?
| SELECT name FROM table_name_79 WHERE points = 1344 | sql_create_context |
CREATE TABLE table_name_48 (
year INTEGER,
entrant VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What year did Bryant Heating enter?
| SELECT SUM(year) FROM table_name_48 WHERE entrant = "bryant heating" | sql_create_context |
CREATE TABLE Manufacturers (
Code INTEGER,
Name VARCHAR(255),
Headquarter VARCHAR(255),
Founder VARCHAR(255),
Revenue REAL
)
CREATE TABLE Products (
Code INTEGER,
Name VARCHAR(255),
Price DECIMAL,
Manufacturer INTEGER
)
-- Using valid SQLite, answer the following questions for the... | SELECT T1.Name, T1.Manufacturer FROM Products AS T1 JOIN Manufacturers AS T2 ON T1.Manufacturer = T2.Code GROUP BY T1.Name, T1.Name ORDER BY T1.Name DESC | nvbench |
CREATE TABLE table_204_696 (
id number,
"issue" number,
"volume" number,
"title" text,
"main feature story" text,
"first/early appearance story/stories" text,
"release date" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- how many release dat... | SELECT COUNT("release date") FROM table_204_696 WHERE "release date" = 4 | squall |
CREATE TABLE table_41472 (
"Season" text,
"PAT Pct." text,
"20-29" text,
"30-39" text,
"40-49" text,
"FG-FGA" text,
"FG Pct." text,
"Long" real,
"Points" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which 20-29 had a season of 1997... | SELECT "20-29" FROM table_41472 WHERE "Season" = '1997' | wikisql |
CREATE TABLE table_name_88 (
width VARCHAR,
number_of_vehicles VARCHAR,
type_designation VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which Width has a Number of vehicles larger than 15, and a Type designation of k5000?
| SELECT width FROM table_name_88 WHERE number_of_vehicles > 15 AND type_designation = "k5000" | sql_create_context |
CREATE TABLE table_name_43 (
administration_of_oaths VARCHAR,
rights_of_audience VARCHAR,
reserved_instruments VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is Administration of Oaths, when Rights of Audience is Yes, and when Reserved Instruments i... | SELECT administration_of_oaths FROM table_name_43 WHERE rights_of_audience = "yes" AND reserved_instruments = "yes" | sql_create_context |
CREATE TABLE membership_register_branch (
Member_ID int,
Branch_ID text,
Register_Year text
)
CREATE TABLE purchase (
Member_ID int,
Branch_ID text,
Year text,
Total_pounds real
)
CREATE TABLE member (
Member_ID int,
Card_Number text,
Name text,
Hometown text,
Level int... | SELECT Name, COUNT(*) FROM membership_register_branch AS T1 JOIN branch AS T2 ON T1.Branch_ID = T2.Branch_ID WHERE T1.Register_Year > 2015 GROUP BY T2.Branch_ID ORDER BY COUNT(*) DESC | nvbench |
CREATE TABLE table_61980 (
"Draw" real,
"Language" text,
"Artist" text,
"English translation" text,
"Place" real,
"Points" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Can you tell me the Artist that has the Draw smaller than 16, and the Engli... | SELECT "Artist" FROM table_61980 WHERE "Draw" < '16' AND "English translation" = 'lullaby' | wikisql |
CREATE TABLE d_icd_diagnoses (
row_id number,
icd9_code text,
short_title text,
long_title 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 cost (
row_id... | 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 = 18877)) AND chartevents.itemid IN (SELECT d_items.itemid FROM d_items WHERE d_items.label = 'admit ht'... | mimic_iii |
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 person_info JOIN hz_info JOIN mzjzjlb JOIN jybgb JOIN jyjgzbb 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 AND mzjzjlb.YLJGDM = jybgb.YLJGDM_MZJZJLB AND mzjzjlb.JZLSH = jybgb.JZLSH_MZJZJLB AND jybgb.YLJGDM = jyjgzbb.YLJGDM... | css |
CREATE TABLE employees (
EMPLOYEE_ID decimal(6,0),
FIRST_NAME varchar(20),
LAST_NAME varchar(25),
EMAIL varchar(25),
PHONE_NUMBER varchar(20),
HIRE_DATE date,
JOB_ID varchar(10),
SALARY decimal(8,2),
COMMISSION_PCT decimal(2,2),
MANAGER_ID decimal(6,0),
DEPARTMENT_ID decimal(... | SELECT HIRE_DATE, COUNT(HIRE_DATE) FROM employees WHERE NOT DEPARTMENT_ID IN (SELECT DEPARTMENT_ID FROM departments WHERE MANAGER_ID BETWEEN 100 AND 200) ORDER BY COUNT(HIRE_DATE) DESC | nvbench |
CREATE TABLE Documents_with_Expenses (
Document_ID INTEGER,
Budget_Type_Code CHAR(15),
Document_Details VARCHAR(255)
)
CREATE TABLE Ref_Document_Types (
Document_Type_Code CHAR(15),
Document_Type_Name VARCHAR(255),
Document_Type_Description VARCHAR(255)
)
CREATE TABLE Accounts (
Account_ID... | SELECT T1.Project_Details, T1.Project_ID FROM Projects AS T1 JOIN Documents AS T2 ON T1.Project_ID = T2.Project_ID ORDER BY T1.Project_ID DESC | nvbench |
CREATE TABLE table_name_15 (
club VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What 2007-08 had A.S. Gubbio 1910 Club?
| SELECT 2007 AS _08_season FROM table_name_15 WHERE club = "a.s. gubbio 1910" | sql_create_context |
CREATE TABLE table_name_70 (
team VARCHAR,
date VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Who was the opposing team for the February 1 game?
| SELECT team FROM table_name_70 WHERE date = "february 1" | sql_create_context |
CREATE TABLE inputevents_cv (
row_id number,
subject_id number,
hadm_id number,
icustay_id number,
charttime time,
itemid number,
amount number
)
CREATE TABLE cost (
row_id number,
subject_id number,
hadm_id number,
event_type text,
event_id number,
chargetime time,
... | 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 FROM diagnoses_icd JOIN admissions ON diagnoses_icd.hadm_id = admissions.hadm_id WHERE diagnoses_icd.i... | mimic_iii |
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 prescriptions... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE demographic.days_stay > "9" AND prescriptions.drug = "Ibuprofen Suspension" | mimicsql_data |
CREATE TABLE table_name_23 (
notes VARCHAR,
builder VARCHAR,
total VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What are the notes for Ford when the total is 5?
| SELECT notes FROM table_name_23 WHERE builder = "ford" AND total = "5" | sql_create_context |
CREATE TABLE table_name_3 (
song_title VARCHAR,
number VARCHAR,
singer_s_ VARCHAR,
lyricist VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the song title sung by Sonu Nigam with lyricists of Dev Kohli/Biddu, and number over 8?
| SELECT song_title FROM table_name_3 WHERE singer_s_ = "sonu nigam" AND lyricist = "dev kohli/biddu" AND number > 8 | sql_create_context |
CREATE TABLE table_24670 (
"Date (GMT)" text,
"Yield (megatons)" text,
"Deployment" text,
"Country" text,
"Test Site" text,
"Name or Number" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Name the name for 15 yield
| SELECT "Name or Number" FROM table_24670 WHERE "Yield (megatons)" = '15' | wikisql |
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 t_kc22.SOC_SRT_DIRE_CD, t_kc22.SOC_SRT_DIRE_NM, t_kc22.UNIVALENT FROM t_kc22 WHERE t_kc22.MED_CLINIC_ID IN (SELECT qtb.MED_CLINIC_ID FROM qtb WHERE qtb.PERSON_NM = '陈颖然' AND qtb.MED_SER_ORG_NO = '5544241' UNION SELECT gyb.MED_CLINIC_ID FROM gyb WHERE gyb.PERSON_NM = '陈颖然' AND gyb.MED_SER_ORG_NO = '5544241' UNION... | css |
CREATE TABLE t_kc21 (
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 t_kc22.SOC_SRT_DIRE_CD, t_kc22.SOC_SRT_DIRE_NM FROM t_kc21 JOIN t_kc22 ON t_kc21.MED_CLINIC_ID = t_kc22.MED_CLINIC_ID WHERE t_kc21.PERSON_ID = '67040899' AND t_kc22.MED_INV_ITEM_TYPE = '治疗费' | css |
CREATE TABLE table_203_504 (
id number,
"#" number,
"date" text,
"venue" text,
"opponent" text,
"score" text,
"result" text,
"competition" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- what was the score previous to the benin opponent ?... | SELECT "score" FROM table_203_504 WHERE "date" < (SELECT "date" FROM table_203_504 WHERE "opponent" = 'benin') ORDER BY "date" DESC LIMIT 1 | squall |
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,
... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE diagnoses.icd9_code = "45620" | mimicsql_data |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.