instruction stringlengths 151 7.46k | output stringlengths 2 4.44k | source stringclasses 26
values |
|---|---|---|
CREATE TABLE cost (
row_id number,
subject_id number,
hadm_id number,
event_type text,
event_id number,
chargetime time,
cost number
)
CREATE TABLE procedures_icd (
row_id number,
subject_id number,
hadm_id number,
icd9_code text,
charttime time
)
CREATE TABLE icustays ... | SELECT t3.drug FROM (SELECT t2.drug, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM (SELECT admissions.subject_id, prescriptions.startdate, admissions.hadm_id FROM prescriptions JOIN admissions ON prescriptions.hadm_id = admissions.hadm_id WHERE prescriptions.drug = 'lidocaine 2%' AND DATETIME(prescriptions.star... | mimic_iii |
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 * FROM t_kc21 WHERE t_kc21.MED_SER_ORG_NO = '5930977' AND t_kc21.IN_HOSP_DATE BETWEEN '2004-11-28' AND '2012-07-27' EXCEPT SELECT * FROM t_kc21 WHERE t_kc21.MED_SER_ORG_NO = '5930977' AND t_kc21.IN_HOSP_DATE BETWEEN '2004-11-28' AND '2012-07-27' AND t_kc21.IN_DIAG_DIS_CD = t_kc21.OUT_DIAG_DIS_CD | css |
CREATE TABLE table_64924 (
"Event" text,
"Date" text,
"Location" text,
"Winning skip" text,
"Runner-up skip" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Who was the runner-up during the Mac Ice Classic?
| SELECT "Runner-up skip" FROM table_64924 WHERE "Event" = 'mac ice classic' | wikisql |
CREATE TABLE table_6045 (
"Month" text,
"Week" real,
"Offensive" text,
"Defensive" text,
"Goalkeeper" text,
"Rookie" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Who is the rookie goalkeeper Mike Gabel?
| SELECT "Rookie" FROM table_6045 WHERE "Goalkeeper" = 'mike gabel' | wikisql |
CREATE TABLE ReviewTaskTypes (
Id number,
Name text,
Description text
)
CREATE TABLE PostFeedback (
Id number,
PostId number,
IsAnonymous boolean,
VoteTypeId number,
CreationDate time
)
CREATE TABLE ReviewTaskStates (
Id number,
Name text,
Description text
)
CREATE TABLE S... | SELECT MONTH(p.CreationDate), COUNT(p.Id) FROM Posts AS p WHERE p.PostTypeId = 2 AND YEAR(p.CreationDate) = @Year AND p.OwnerUserId IN (SELECT TOP(1000) AS Id FROM Users ORDER BY Reputation DESC) GROUP BY MONTH(p.CreationDate) | sede |
CREATE TABLE table_name_22 (
games INTEGER,
drawn INTEGER
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What games have more than 1 draw?
| SELECT AVG(games) FROM table_name_22 WHERE drawn > 1 | sql_create_context |
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.gender = "M" AND demographic.ethnicity = "WHITE" | mimicsql_data |
CREATE TABLE table_name_48 (
team VARCHAR,
stadium VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the team at Stadion Maksimir?
| SELECT team FROM table_name_48 WHERE stadium = "stadion maksimir" | sql_create_context |
CREATE TABLE table_name_76 (
date INTEGER,
championship VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the earliest date when the championship was Monterrey WCT, Mexico?
| SELECT MIN(date) FROM table_name_76 WHERE championship = "monterrey wct, mexico" | sql_create_context |
CREATE TABLE table_name_7 (
athlete VARCHAR,
fastest_time__s_ VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which athlete has the fastest time of 15.82?
| SELECT athlete FROM table_name_7 WHERE fastest_time__s_ = 15.82 | sql_create_context |
CREATE TABLE lab (
labid number,
patientunitstayid number,
labname text,
labresult number,
labresulttime time
)
CREATE TABLE intakeoutput (
intakeoutputid number,
patientunitstayid number,
cellpath text,
celllabel text,
cellvaluenumeric number,
intakeoutputtime time
)
CREAT... | SELECT treatment.treatmentname FROM treatment WHERE treatment.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '003-33922' AND NOT patient.hospitaldischargetime IS NULL ORDER BY... | eicu |
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 qtb.IN_DIAG_DIS_CD, qtb.IN_DIAG_DIS_NM FROM qtb WHERE qtb.PERSON_ID = '28022050' AND qtb.MED_CLINIC_ID IN (SELECT t_kc24.MED_CLINIC_ID FROM t_kc24 WHERE t_kc24.MED_AMOUT >= 7272.12) UNION SELECT gyb.IN_DIAG_DIS_CD, gyb.IN_DIAG_DIS_NM FROM gyb WHERE gyb.PERSON_ID = '28022050' AND gyb.MED_CLINIC_ID IN (SELECT t_kc... | css |
CREATE TABLE table_22040 (
"Team" text,
"Average" text,
"Points" real,
"Played" real,
"1991-92" text,
"1992-93" text,
"1993-94" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Name the points for 1992-93 for 42
| SELECT "Points" FROM table_22040 WHERE "1992-93" = '42' | wikisql |
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 jybgb.BBCJBW 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.person_info_XM = '朱泰和' AND jybgb.BGRQ BETWEEN '2010-08-21' AND '2016-12-05... | css |
CREATE TABLE table_21220720_1 (
position VARCHAR,
name VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Name the position for van den brink, bas
| SELECT position FROM table_21220720_1 WHERE name = "van den Brink, Bas" | sql_create_context |
CREATE TABLE cost (
row_id number,
subject_id number,
hadm_id number,
event_type text,
event_id number,
chargetime time,
cost number
)
CREATE TABLE transfers (
row_id number,
subject_id number,
hadm_id number,
icustay_id number,
eventtype text,
careunit text,
war... | SELECT microbiologyevents.charttime FROM microbiologyevents WHERE microbiologyevents.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 13440 AND NOT admissions.dischtime IS NULL ORDER BY admissions.admittime DESC LIMIT 1) ORDER BY microbiologyevents.charttime LIMIT 1 | mimic_iii |
CREATE TABLE table_53989 (
"Track #" real,
"Song" text,
"Singers" text,
"Picturization" text,
"Length" text,
"Lyricist" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- How long is the song 'Maduraikku Pogathadee'?
| SELECT "Length" FROM table_53989 WHERE "Song" = 'maduraikku pogathadee' | wikisql |
CREATE TABLE table_36070 (
"Rank" real,
"Name" text,
"Team" text,
"Games" real,
"Rebounds" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- with games more than 22 what is the rebound total?
| SELECT SUM("Rebounds") FROM table_36070 WHERE "Games" > '22' | wikisql |
CREATE TABLE table_27214 (
"Number" real,
"Name" text,
"Titles" text,
"Date" text,
"Opponent" text,
"Result" text,
"Defenses" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Name the most number
| SELECT MAX("Number") FROM table_27214 | wikisql |
CREATE TABLE table_14835 (
"Date" text,
"Tournament" text,
"Surface" text,
"Partner" text,
"Opponents in final" text,
"Score" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the name of the partner who played in the final against Lucas Ar... | SELECT "Partner" FROM table_14835 WHERE "Opponents in final" = 'lucas arnold ker martín garcía' | wikisql |
CREATE TABLE table_25894 (
"Game" real,
"Date" text,
"Team" text,
"Score" text,
"High points" text,
"High rebounds" text,
"High assists" text,
"Location Attendance" text,
"Record" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- When d... | SELECT "Date" FROM table_25894 WHERE "Team" = 'Cleveland' | wikisql |
CREATE TABLE table_28744929_2 (
years_at_school VARCHAR,
team VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- How many values were used to express the years at school of the Maryland team?
| SELECT COUNT(years_at_school) FROM table_28744929_2 WHERE team = "Maryland" | sql_create_context |
CREATE TABLE table_name_31 (
surface VARCHAR,
opponent VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is Surface, when Opponent is 'Ji Van k'?
| SELECT surface FROM table_name_31 WHERE opponent = "jiří vaněk" | sql_create_context |
CREATE TABLE table_12828723_3 (
lost VARCHAR,
try_bonus VARCHAR,
points_for VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- what's the loss with try bonus being 5 and points for being 390
| SELECT lost FROM table_12828723_3 WHERE try_bonus = "5" AND points_for = "390" | sql_create_context |
CREATE TABLE table_1072 (
"Week" real,
"Date" text,
"Opponent" text,
"Location" text,
"Time ( ET )" text,
"TV" text,
"Result" text,
"Record" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- How many days were the Kansas City Chiefs the opp... | SELECT COUNT("Date") FROM table_1072 WHERE "Opponent" = 'Kansas City Chiefs' | wikisql |
CREATE TABLE table_73072 (
"Date" text,
"B-52 Model" text,
"Serial #" text,
"Unit" text,
"Bomb Capacity" text,
"Mission/Target" text,
"Cause of Loss" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- When hit by sam at 38,500 feet just after bo... | SELECT "Mission/Target" FROM table_73072 WHERE "Cause of Loss" = 'Hit by SAM at 38,500 feet just after bomb release' | wikisql |
CREATE TABLE departments (
DEPARTMENT_ID decimal(4,0),
DEPARTMENT_NAME varchar(30),
MANAGER_ID decimal(6,0),
LOCATION_ID decimal(4,0)
)
CREATE TABLE countries (
COUNTRY_ID varchar(2),
COUNTRY_NAME varchar(40),
REGION_ID decimal(10,0)
)
CREATE TABLE employees (
EMPLOYEE_ID decimal(6,0),... | SELECT EMAIL, COMMISSION_PCT FROM employees WHERE NOT DEPARTMENT_ID IN (SELECT DEPARTMENT_ID FROM departments WHERE MANAGER_ID BETWEEN 100 AND 200) | nvbench |
CREATE TABLE artist (
artist_name text,
country text,
gender text,
preferred_genre text
)
CREATE TABLE song (
song_name text,
artist_name text,
country text,
f_id number,
genre_is text,
rating number,
languages text,
releasedate time,
resolution number
)
CREATE TABL... | SELECT AVG(T1.duration) FROM files AS T1 JOIN song AS T2 ON T1.f_id = T2.f_id WHERE T1.formats = "mp3" AND T2.resolution < 800 | spider |
CREATE TABLE school (
School_ID int,
Grade text,
School text,
Location text,
Type text
)
CREATE TABLE school_bus (
School_ID int,
Driver_ID int,
Years_Working int,
If_full_time bool
)
CREATE TABLE driver (
Driver_ID int,
Name text,
Party text,
Home_city text,
Ag... | SELECT Home_city, COUNT(Home_city) FROM driver GROUP BY Home_city ORDER BY COUNT(Home_city) | nvbench |
CREATE TABLE table_203_694 (
id number,
"#" number,
"name" text,
"took office" text,
"left office" text,
"party" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- who was next to serve after nejat konuk ?
| SELECT "name" FROM table_203_694 WHERE "took office" > (SELECT "took office" FROM table_203_694 WHERE "name" = 'nejat konuk') ORDER BY "took office" LIMIT 1 | squall |
CREATE TABLE t_kc21 (
MED_CLINIC_ID text,
OVERALL_CD_ORG text,
OVERALL_CD_PERSON text,
COMP_ID text,
PERSON_ID text,
PERSON_NM text,
IDENTITY_CARD text,
SOC_SRT_CARD text,
PERSON_SEX number,
PERSON_AGE number,
IN_HOSP_DATE time,
OUT_HOSP_DATE time,
DIFF_PLACE_FLG numb... | SELECT MED_ORG_DEPT_NM, OUT_DIAG_DIS_NM, AVG(PERSON_AGE) FROM t_kc21 WHERE MED_SER_ORG_NO = '3290779' GROUP BY MED_ORG_DEPT_NM, OUT_DIAG_DIS_NM HAVING AVG(PERSON_AGE) > 29 | css |
CREATE TABLE table_1311 (
"Team" text,
"Titles" real,
"Runner-up" real,
"Third place" real,
"Fourth place" real,
"Years participated" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- When colgate is the team how many times did they place fourth?
| SELECT COUNT("Fourth place") FROM table_1311 WHERE "Team" = 'Colgate' | wikisql |
CREATE TABLE table_name_18 (
weeks VARCHAR,
date VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- On December 12, 2001, how many weeks had the single been in its position?
| SELECT weeks FROM table_name_18 WHERE date = "december 12, 2001" | sql_create_context |
CREATE TABLE table_20549 (
"Season" text,
"1st Place" text,
"2nd Place" text,
"3rd Place" text,
"4th Place" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What team finished in 1st when tau cer mica was in 3rd?
| SELECT "1st Place" FROM table_20549 WHERE "3rd Place" = 'TAU Cerámica' | wikisql |
CREATE TABLE table_64297 (
"Japanese Title" text,
"Romaji Title" text,
"TV Station" text,
"Episodes" real,
"Average Ratings" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which TV station, has romaji title of tantei gakuen q and episodes larger tha... | SELECT "TV Station" FROM table_64297 WHERE "Episodes" > '10' AND "Romaji Title" = 'tantei gakuen q' | wikisql |
CREATE TABLE cost (
costid number,
uniquepid text,
patienthealthsystemstayid number,
eventtype text,
eventid number,
chargetime time,
cost number
)
CREATE TABLE diagnosis (
diagnosisid number,
patientunitstayid number,
diagnosisname text,
diagnosistime time,
icd9code tex... | SELECT medication.drugname FROM medication WHERE medication.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '016-24379')) AND medication.routeadmin = 'intravenous' AND DATETIME... | eicu |
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 qtb.IN_DIAG_DIS_CD, qtb.IN_DIAG_DIS_NM FROM qtb WHERE qtb.PERSON_ID = '06397639' AND qtb.MED_CLINIC_ID IN (SELECT t_kc24.MED_CLINIC_ID FROM t_kc24 WHERE t_kc24.MED_AMOUT >= 6289.51) UNION SELECT gyb.IN_DIAG_DIS_CD, gyb.IN_DIAG_DIS_NM FROM gyb WHERE gyb.PERSON_ID = '06397639' AND gyb.MED_CLINIC_ID IN (SELECT t_kc... | css |
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... | SELECT COUNT(DISTINCT admissions.subject_id) FROM admissions WHERE admissions.hadm_id IN (SELECT icustays.hadm_id FROM icustays WHERE icustays.icustay_id IN (SELECT inputevents_cv.icustay_id FROM inputevents_cv WHERE inputevents_cv.itemid IN (SELECT d_items.itemid FROM d_items WHERE d_items.label = '1:1 ns repletion.' ... | mimic_iii |
CREATE TABLE table_6876 (
"Name" text,
"Position" text,
"Number" real,
"School/Club Team" text,
"Season" text,
"Acquisition via" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the average Number, when Position is Forward?
| SELECT AVG("Number") FROM table_6876 WHERE "Position" = 'forward' | wikisql |
CREATE TABLE table_52864 (
"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 had a score of 17.13 (115)?
| SELECT "Away team" FROM table_52864 WHERE "Away team score" = '17.13 (115)' | 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 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 procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.admission_location = "CLINIC REFERRAL/PREMATURE" AND procedures.short_title = "Cont inv mec ven <96 hrs" | mimicsql_data |
CREATE TABLE table_204_313 (
id number,
"date" text,
"operation" text,
"location" text,
"type" text,
"information" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- which operation occurred right after operation maritime guard ?
| SELECT "operation" FROM table_204_313 WHERE "date" > (SELECT "date" FROM table_204_313 WHERE "operation" = 'operation maritime guard') ORDER BY "date" LIMIT 1 | squall |
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 comment_instructor (
instructor_id int,
... | SELECT DISTINCT course.number FROM course INNER JOIN program_course ON program_course.course_id = course.course_id WHERE (course.number = 282 OR course.number = 767) AND program_course.workload = (SELECT MIN(PROGRAM_COURSEalias1.workload) FROM program_course AS PROGRAM_COURSEalias1 INNER JOIN course AS COURSEalias1 ON ... | advising |
CREATE TABLE offering_instructor (
offering_instructor_id int,
offering_id int,
instructor_id int
)
CREATE TABLE program_requirement (
program_id int,
category varchar,
min_credit int,
additional_req varchar
)
CREATE TABLE course_offering (
offering_id int,
course_id int,
semes... | SELECT DISTINCT course_offering.friday, course_offering.monday, course_offering.saturday, course_offering.sunday, course_offering.thursday, course_offering.tuesday, course_offering.wednesday, semester.semester, semester.year FROM course, course_offering, semester WHERE course.course_id = course_offering.course_id AND c... | advising |
CREATE TABLE table_18442691_2 (
no VARCHAR,
released VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- When cannot handle non-empty timestamp argument! 2007 is released what is the no.?
| SELECT no FROM table_18442691_2 WHERE released = "Cannot handle non-empty timestamp argument! 2007" | sql_create_context |
CREATE TABLE table_30611 (
"Callsign" text,
"City of license" text,
"Virtual channel" text,
"Digital channel" text,
"Network" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What city licensed the broadcast on virtual channel 8.2?
| SELECT "City of license" FROM table_30611 WHERE "Virtual channel" = '8.2' | 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 procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.admission_type = "ELECTIVE" AND procedures.short_title = "Hemodialysis" | mimicsql_data |
CREATE TABLE table_78730 (
"Played" real,
"Drawn" real,
"Lost" real,
"Winning %" real,
"Tries" real,
"Conversions" real,
"Penalties" real,
"s Drop goal" real,
"Points total" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- How many tie... | SELECT SUM("Drawn") FROM table_78730 WHERE "Penalties" = '1' AND "Conversions" > '20' | wikisql |
CREATE TABLE table_name_98 (
injured VARCHAR,
date VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is Injured, when Date is '09.15 Sep. 15'?
| SELECT injured FROM table_name_98 WHERE date = "09.15 sep. 15" | sql_create_context |
CREATE TABLE table_name_83 (
date VARCHAR,
outcome VARCHAR,
score VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the Date of the game with an Outcome of runner-up and Score of 5 7, 3 6, 6 3, 2 6?
| SELECT date FROM table_name_83 WHERE outcome = "runner-up" AND score = "5–7, 3–6, 6–3, 2–6" | 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.days_stay, diagnoses.long_title FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE demographic.subject_id = "91588" | mimicsql_data |
CREATE TABLE table_11438 (
"Date" text,
"Opponent" text,
"Score" text,
"Loss" text,
"Attendance" real,
"Record" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What was the record on April 7?
| SELECT "Record" FROM table_11438 WHERE "Date" = 'april 7' | wikisql |
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.JZKSRQ FROM mzjzjlb WHERE mzjzjlb.JZLSH = '39298720035' | css |
CREATE TABLE table_27713030_12 (
high_points VARCHAR,
date VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What were the high points on April 8?
| SELECT high_points FROM table_27713030_12 WHERE date = "April 8" | sql_create_context |
CREATE TABLE table_name_71 (
date VARCHAR,
home_team VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- If collingwood was the Home team, what Date did they play?
| SELECT date FROM table_name_71 WHERE home_team = "collingwood" | sql_create_context |
CREATE TABLE table_name_97 (
pick__number VARCHAR,
position VARCHAR,
player VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What was the pick# for Lorenzo Freeman as defensive tackle?
| SELECT pick__number FROM table_name_97 WHERE position = "defensive tackle" AND player = "lorenzo freeman" | sql_create_context |
CREATE TABLE table_24399615_5 (
cable_rank VARCHAR,
episode_no VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- How many times did episode number 8 air?
| SELECT COUNT(cable_rank) FROM table_24399615_5 WHERE episode_no = 8 | sql_create_context |
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 COUNT(*) FROM t_kc21 WHERE t_kc21.PERSON_ID = '90342065' AND t_kc21.IN_HOSP_DATE BETWEEN '2014-09-24' AND '2016-06-21' AND t_kc21.CLINIC_TYPE = '住院' | css |
CREATE TABLE fgwyjzb (
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 COUNT(*) FROM gwyjzb JOIN t_kc22 ON gwyjzb.MED_CLINIC_ID = t_kc22.MED_CLINIC_ID WHERE gwyjzb.PERSON_ID = '75340002' AND t_kc22.STA_DATE BETWEEN '2004-08-08' AND '2019-09-03' AND t_kc22.SELF_PAY_AMO > 8808.11 UNION SELECT COUNT(*) FROM fgwyjzb JOIN t_kc22 ON fgwyjzb.MED_CLINIC_ID = t_kc22.MED_CLINIC_ID WHERE fgwy... | css |
CREATE TABLE table_train_109 (
"id" int,
"serum_potassium" float,
"systolic_blood_pressure_sbp" int,
"body_mass_index_bmi" float,
"hypertension" bool,
"NOUSE" float
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- potassium > 5.5 meq / dl at baseline
| SELECT * FROM table_train_109 WHERE serum_potassium > 5.5 | criteria2sql |
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,
... | SELECT t3.culturesite FROM (SELECT t2.culturesite, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM (SELECT patient.uniquepid, treatment.treatmenttime FROM treatment JOIN patient ON treatment.patientunitstayid = patient.patientunitstayid WHERE treatment.treatmentname = 'laxatives - doss (colace)' AND STRFTIME('%y'... | eicu |
CREATE TABLE table_9414 (
"Round" real,
"Pick" real,
"Player" text,
"Position" text,
"Nationality" text,
"School/Club Team" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the pick for the Maryland-Eastern Shore team with a round lower th... | SELECT SUM("Pick") FROM table_9414 WHERE "School/Club Team" = 'maryland-eastern shore' AND "Round" < '2' | wikisql |
CREATE TABLE table_21256068_3 (
score VARCHAR,
opponent VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- what's the score against crusaders
| SELECT score FROM table_21256068_3 WHERE opponent = "Crusaders" | sql_create_context |
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.admission_location FROM demographic WHERE demographic.name = "Thomas Nazario" | mimicsql_data |
CREATE TABLE table_15272 (
"Rank" real,
"Lane" real,
"Name" text,
"Nationality" text,
"Time" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Name the sum of time for lane of 1 and rank less than 8
| SELECT SUM("Time") FROM table_15272 WHERE "Lane" = '1' AND "Rank" < '8' | wikisql |
CREATE TABLE table_65845 (
"Draw" real,
"Artist" text,
"Song" text,
"Points" real,
"Place" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the number of points for the song 'viva rock 'n' roll', with more than 3 Draws?
| SELECT AVG("Points") FROM table_65845 WHERE "Song" = 'viva rock ''n'' roll' AND "Draw" > '3' | 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 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 prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE prescriptions.drug = "Sertraline" | mimicsql_data |
CREATE TABLE table_name_8 (
gold_coast VARCHAR,
melbourne VARCHAR,
auckland VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which Gold Coast has Melbourne yes, and Auckland yes?
| SELECT gold_coast FROM table_name_8 WHERE melbourne = "yes" AND auckland = "yes" | sql_create_context |
CREATE TABLE table_17787 (
"Day" text,
"Sunday Surya (the Sun)" text,
"Monday Soma (the Moon)" text,
"Tuesday Mangala (Mars)" text,
"Wednesday Budha (Mercury)" text,
"Thursday Guru (Jupiter)" text,
"Friday Shukra (Venus)" text,
"Saturday Shani (Saturn)" text
)
-- Using valid SQLite, an... | SELECT "Saturday Shani (Saturn)" FROM table_17787 WHERE "Wednesday Budha (Mercury)" = 'برھ وار Budh''var' | wikisql |
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_ORG_DEPT_CD, t_kc21.MED_ORG_DEPT_NM, AVG(t_kc21.IN_HOSP_DAYS) FROM t_kc21 WHERE t_kc21.MED_SER_ORG_NO = '2092473' GROUP BY t_kc21.MED_ORG_DEPT_CD ORDER BY AVG(t_kc21.IN_HOSP_DAYS) | css |
CREATE TABLE table_204_763 (
id number,
"county" text,
"km" number,
"intersecting road" text,
"notes" text,
"coordinates" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- which intersecting road comes before range road 273 ?
| SELECT "intersecting road" FROM table_204_763 WHERE id = (SELECT id FROM table_204_763 WHERE "intersecting road" = 'range road 273') - 1 | squall |
CREATE TABLE table_train_251 (
"id" int,
"gender" string,
"left_ventricular_ejection_fraction_lvef" int,
"allergy_to_rabbit_proteins" bool,
"recurring_alcohol_related_legal_problem" bool,
"hyperlipidemia" bool,
"fasting_ldl_cholesterol" int,
"baseline_hemoglobin_hgb" float,
"NOUSE" f... | SELECT * FROM table_train_251 WHERE recurring_alcohol_related_legal_problem = 1 | criteria2sql |
CREATE TABLE table_48025 (
"Place" text,
"Player" text,
"Country" text,
"Score" text,
"To par" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is To Par, when Score is '69-72=141
| SELECT "To par" FROM table_48025 WHERE "Score" = '69-72=141' | wikisql |
CREATE TABLE table_name_74 (
employed VARCHAR,
position_held VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What are the years employed shown for mathematics & prefect master?
| SELECT employed FROM table_name_74 WHERE position_held = "mathematics & prefect master" | sql_create_context |
CREATE TABLE table_9492 (
"Outcome" text,
"Date" real,
"Tournament" text,
"Surface" text,
"Partner" text,
"Opponents in the final" text,
"Score in the final" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the total number of Date, wh... | SELECT COUNT("Date") FROM table_9492 WHERE "Partner" = 'carl-uwe steeb' | wikisql |
CREATE TABLE table_30825 (
"Conference" text,
"Regular Season Winner" text,
"Conference Player of the Year" text,
"Conference Tournament" text,
"Tournament Venue (City)" text,
"Tournament Winner" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Wh... | SELECT "Tournament Winner" FROM table_30825 WHERE "Conference" = 'Southwestern Athletic Conference' | wikisql |
CREATE TABLE table_name_56 (
position VARCHAR,
club_province VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the position of Perpignan?
| SELECT position FROM table_name_56 WHERE club_province = "perpignan" | sql_create_context |
CREATE TABLE table_name_93 (
total VARCHAR,
gold VARCHAR,
silver VARCHAR,
bronze VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which Total has a Silver larger than 8, and a Bronze of 20, and a Gold smaller than 20?
| SELECT COUNT(total) FROM table_name_93 WHERE silver > 8 AND bronze = 20 AND gold < 20 | sql_create_context |
CREATE TABLE Order_Items (
order_item_id INTEGER,
order_id INTEGER,
product_id INTEGER,
order_quantity VARCHAR(80)
)
CREATE TABLE Customer_Address_History (
customer_id INTEGER,
address_id INTEGER,
date_from DATETIME,
date_to DATETIME
)
CREATE TABLE Contacts (
contact_id INTEGER,
... | SELECT date_to, COUNT(date_to) FROM Customer_Address_History AS T1 JOIN Customers AS T2 ON T1.customer_id = T2.customer_id JOIN Addresses AS T3 ON T1.address_id = T3.address_id ORDER BY COUNT(date_to) | nvbench |
CREATE TABLE musical (
musical_id number,
name text,
year number,
award text,
category text,
nominee text,
result text
)
CREATE TABLE actor (
actor_id number,
name text,
musical_id number,
character text,
duration text,
age number
)
-- Using valid SQLite, answer th... | SELECT T2.name FROM actor AS T1 JOIN musical AS T2 ON T1.musical_id = T2.musical_id GROUP BY T1.musical_id HAVING COUNT(*) >= 3 | spider |
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 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 job_history (
EMPLOYEE_ID decimal(6,0),
START_DATE date,
END_DATE date,
JOB_ID varchar(10),
DEPARTMENT_ID decimal(4,0)
)
CREATE TABLE jobs (
JOB_ID varchar(10),
JOB_TITLE varchar(35),
MIN_SALARY decimal(6,0),
MAX_SALARY decimal(6,0)
)
CREATE TABLE employees (
EMPLO... | SELECT HIRE_DATE, AVG(DEPARTMENT_ID) FROM employees WHERE HIRE_DATE < '2002-06-21' ORDER BY AVG(DEPARTMENT_ID) | nvbench |
CREATE TABLE restriction (
restriction_code text,
advance_purchase int,
stopovers text,
saturday_stay_required text,
minimum_stay int,
maximum_stay int,
application text,
no_discounts text
)
CREATE TABLE flight (
aircraft_code_sequence text,
airline_code varchar,
airline_fli... | SELECT DISTINCT flight.flight_id FROM airport_service AS AIRPORT_SERVICE_0, airport_service AS AIRPORT_SERVICE_1, city AS CITY_0, city AS CITY_1, flight, state WHERE CITY_0.city_code = AIRPORT_SERVICE_0.city_code AND CITY_0.city_name = 'SALT LAKE CITY' AND CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_... | atis |
CREATE TABLE table_17904 (
"Series number" text,
"Episode number" real,
"Date of first broadcast" text,
"Total viewers" real,
"Series average" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- what is the total viewers where the date of first broadcast... | SELECT MIN("Total viewers") FROM table_17904 WHERE "Date of first broadcast" = '28 January 2010' AND "Episode number" = '1' | wikisql |
CREATE TABLE table_34597 (
"Number" real,
"Name" text,
"Position" text,
"Height" text,
"Weight" real,
"Class" text,
"Hometown" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Weight of 220 has what class?
| SELECT "Class" FROM table_34597 WHERE "Weight" = '220' | wikisql |
CREATE TABLE intakeoutput (
intakeoutputid number,
patientunitstayid number,
cellpath text,
celllabel text,
cellvaluenumeric number,
intakeoutputtime time
)
CREATE TABLE medication (
medicationid number,
patientunitstayid number,
drugname text,
dosage text,
routeadmin text,
... | SELECT patient.hospitaldischargetime FROM patient WHERE patient.uniquepid = '010-11305' AND STRFTIME('%y', patient.hospitaldischargetime) <= '2101' ORDER BY patient.hospitaldischargetime DESC LIMIT 1 | eicu |
CREATE TABLE treatment (
treatmentid number,
patientunitstayid number,
treatmentname text,
treatmenttime time
)
CREATE TABLE lab (
labid number,
patientunitstayid number,
labname text,
labresult number,
labresulttime time
)
CREATE TABLE microlab (
microlabid number,
patient... | SELECT patient.hospitaladmittime FROM patient WHERE patient.uniquepid = '028-23341' AND patient.hospitaladmitsource = 'recovery room' AND DATETIME(patient.hospitaladmittime) >= DATETIME(CURRENT_TIME(), '-4 year') ORDER BY patient.hospitaladmittime DESC LIMIT 1 | eicu |
CREATE TABLE zyjzjlb_jybgb (
YLJGDM_ZYJZJLB text,
BGDH number,
YLJGDM number
)
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,
X... | SELECT jybgb.JYKSBM, jybgb.JYKSMC FROM jybgb WHERE jybgb.JZLSH = '62739895555' | css |
CREATE TABLE table_name_9 (
run_2 VARCHAR,
rank VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which Run 2 has a Rank of 4?
| SELECT run_2 FROM table_name_9 WHERE rank = "4" | sql_create_context |
CREATE TABLE code_description (
code varchar,
description text
)
CREATE TABLE state (
state_code text,
state_name text,
country_name text
)
CREATE TABLE flight_fare (
flight_id int,
fare_id int
)
CREATE TABLE month (
month_number int,
month_name text
)
CREATE TABLE class_of_servi... | SELECT DISTINCT ground_service.ground_fare FROM airport, city, ground_service WHERE (airport.airport_code = 'LGA' AND city.city_name = 'NEW YORK' AND ground_service.airport_code = airport.airport_code AND ground_service.city_code = city.city_code) AND ground_service.transport_type = 'LIMOUSINE' | atis |
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 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 jyb... | css |
CREATE TABLE status (
station_id INTEGER,
bikes_available INTEGER,
docks_available INTEGER,
time TEXT
)
CREATE TABLE station (
id INTEGER,
name TEXT,
lat NUMERIC,
long NUMERIC,
dock_count INTEGER,
city TEXT,
installation_date TEXT
)
CREATE TABLE trip (
id INTEGER,
d... | SELECT city, COUNT(*) FROM station GROUP BY city | nvbench |
CREATE TABLE table_71837 (
"Date" text,
"Visitor" text,
"Score" text,
"Home" text,
"Decision" text,
"Attendance" real,
"Record" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Name the average attendance with dallas visitor
| SELECT AVG("Attendance") FROM table_71837 WHERE "Visitor" = 'dallas' | wikisql |
CREATE TABLE useracct (
u_id VARCHAR
)
CREATE TABLE review (
u_id VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Find the number of users who did not write any review.
| SELECT COUNT(*) FROM useracct WHERE NOT u_id IN (SELECT u_id FROM review) | sql_create_context |
CREATE TABLE table_200_47 (
id number,
"date" text,
"event" text,
"duration\t\n(months)" text,
"duration\t\t\n(years)" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- when did the first drop in the experiment fall ?
| SELECT "date" FROM table_200_47 WHERE "event" = '1st drop fell' | squall |
CREATE TABLE zyjzjlb (
YLJGDM text,
JZLSH text,
MZJZLSH text,
KH text,
KLX number,
HZXM text,
WDBZ number,
RYDJSJ time,
RYTJDM number,
RYTJMC text,
JZKSDM text,
JZKSMC text,
RZBQDM text,
RZBQMC text,
RYCWH text,
CYKSDM text,
CYKSMC text,
CYBQDM tex... | SELECT JCZBMC, JCZBJGDW, AVG(JCZBJGDL) FROM jyjgzbb WHERE YLJGDM = '0049779' AND BGRQ BETWEEN '2002-10-26' AND '2004-11-22' GROUP BY JCZBMC, JCZBJGDW ORDER BY AVG(JCZBJGDL) DESC LIMIT 9 | css |
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_DIRE_CD text,
MED_DIRE_NM text,... | SELECT SUM(t_kc22.AMOUNT) FROM t_kc21 JOIN t_kc22 JOIN t_kc21_t_kc22 ON t_kc21.MED_CLINIC_ID = t_kc21_t_kc22.MED_CLINIC_ID AND t_kc21_t_kc22.MED_EXP_DET_ID = t_kc22.MED_EXP_DET_ID WHERE t_kc21.PERSON_ID = '41547321' AND t_kc21.CLINIC_TYPE = '门诊' AND t_kc22.STA_DATE BETWEEN '2014-11-21' AND '2016-07-07' AND t_kc22.MED_I... | css |
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_NM = '施志业' AND NOT t_kc22.MED_CLINIC_ID IN (SELECT t_kc22.MED_CLINIC_ID FROM t_kc22 WHERE t_kc22.AMOUNT <= 1613.81) | css |
CREATE TABLE flight_stop (
flight_id int,
stop_number int,
stop_days text,
stop_airport text,
arrival_time int,
arrival_airline text,
arrival_flight_number int,
departure_time int,
departure_airline text,
departure_flight_number int,
stop_time int
)
CREATE TABLE aircraft (
... | SELECT DISTINCT flight.flight_id FROM airport_service AS AIRPORT_SERVICE_0, airport_service AS AIRPORT_SERVICE_1, city AS CITY_0, city AS CITY_1, flight WHERE CITY_0.city_code = AIRPORT_SERVICE_0.city_code AND CITY_0.city_name = 'ST. PETERSBURG' AND CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = ... | atis |
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 MED_CLINIC_ID FROM t_kc21 WHERE PERSON_NM = '彭德佑' AND MED_CLINIC_ID IN (SELECT MED_CLINIC_ID FROM t_kc22 WHERE AMOUNT > 438.17) | css |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.