context stringlengths 11 9.12k | question stringlengths 0 1.06k | SQL stringlengths 2 4.44k | source stringclasses 28
values |
|---|---|---|---|
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 ... | 患者56570950在二零零七年十月九日之后有哪些门诊就诊的检验报告单?列出门诊就诊流水号 | 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 = '56570950' AND NOT mzjzjlb.JZLSH IN (SELECT JZLSH FROM jybgb WHERE BGRQ <= '2007-10-09') | css |
CREATE TABLE table_name_53 (
proto_austronesian VARCHAR,
proto_polynesian VARCHAR
) | What is the Proto-Austronesian word for the Proto-Polynesian word *tui? | SELECT proto_austronesian FROM table_name_53 WHERE proto_polynesian = "*tui" | 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 hz_info (
KH text,
KLX number... | 住院主要诊断在住院就诊99580652501中的编码类型、编码列表、名称列表均为什么? | SELECT zyjzjlb.ZYBMLX, zyjzjlb.ZYZDBM, zyjzjlb.ZYZDMC FROM zyjzjlb WHERE zyjzjlb.JZLSH = '99580652501' | css |
CREATE TABLE table_55135 (
"Year" real,
"Award" text,
"Category" text,
"Nominated work" text,
"Result" text
) | Which award show had the category of best supporting actress? | SELECT "Award" FROM table_55135 WHERE "Category" = 'best supporting actress' | wikisql |
CREATE TABLE table_11734041_16 (
height_in_ft VARCHAR,
no_s_ VARCHAR,
years_for_rockets VARCHAR
) | What is the height in ft for number 42 for the rockets in 1993-94? | SELECT height_in_ft FROM table_11734041_16 WHERE no_s_ = "42" AND years_for_rockets = "1993-94" | sql_create_context |
CREATE TABLE table_30283 (
"Stage" real,
"Winner" text,
"General classification \u017b\u00f3\u0142ta koszulka" text,
"Mountains classification Klasyfikacja g\u00f3rska" text,
"Intermediate Sprints Classification Klasyfikacja najaktywniejszych" text,
"Points classification Klasyfikacja punktowa" ... | Which teams classification winners had a general classification winner of Allan Davis? | SELECT "Teams classification" FROM table_30283 WHERE "General classification \u017b\u00f3\u0142ta koszulka" = 'Allan Davis' | wikisql |
CREATE TABLE table_6967 (
"Date" text,
"Time" text,
"Home" text,
"Away" text,
"Score" text,
"Ground" text
) | What is the Away with a Score that is 46-82? | SELECT "Away" FROM table_6967 WHERE "Score" = '46-82' | wikisql |
CREATE TABLE table_62774 (
"Tournament" text,
"1987" text,
"1988" text,
"1989" text,
"1990" text,
"1991" text,
"1992" text,
"1993" text,
"1994" text,
"1995" text,
"1996" text,
"1997" text
) | What is 1995 Grand Slam Tournament if 1996 is also grand slam tournaments? | SELECT "1990" FROM table_62774 WHERE "1996" = 'grand slam tournaments' | wikisql |
CREATE TABLE table_train_259 (
"id" int,
"systolic_blood_pressure_sbp" int,
"hiv_infection" bool,
"hemoglobin_a1c_hba1c" float,
"hearing_problem" bool,
"heart_disease" bool,
"high_blood_pressure" bool,
"diabetic" string,
"immune_deficiency_disorder" bool,
"visual_impairment" bool... | uncorrected visual or hearing problem | SELECT * FROM table_train_259 WHERE visual_impairment = 1 OR hearing_problem = 1 | criteria2sql |
CREATE TABLE lab (
subject_id text,
hadm_id text,
itemid text,
charttime text,
flag text,
value_unit text,
label text,
fluid text
)
CREATE TABLE demographic (
subject_id text,
hadm_id text,
name text,
marital_status text,
age text,
dob text,
gender text,
... | count the number of patients whose admission type is emergency and admission year is less than 2163? | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.admission_type = "EMERGENCY" AND demographic.admityear < "2163" | mimicsql_data |
CREATE TABLE table_1177 (
"Province" text,
"Swimsuit" text,
"Evening Gown" text,
"Interview" text,
"Average" text
) | Which province got a swimsuit score of 8.43 | SELECT "Province" FROM table_1177 WHERE "Swimsuit" = '8.43' | wikisql |
CREATE TABLE table_name_23 (
authority VARCHAR,
name VARCHAR
) | Which Authority is set for Hauturu School? | SELECT authority FROM table_name_23 WHERE name = "hauturu school" | sql_create_context |
CREATE TABLE table_name_2 (
base VARCHAR,
name VARCHAR
) | Which Base has a Name of .44 wcf? | SELECT base FROM table_name_2 WHERE name = ".44 wcf" | sql_create_context |
CREATE TABLE repair (
repair_ID int,
name text,
Launch_Date text,
Notes text
)
CREATE TABLE repair_assignment (
technician_id int,
repair_ID int,
Machine_ID int
)
CREATE TABLE machine (
Machine_ID int,
Making_Year int,
Class text,
Team text,
Machine_series text,
val... | List the name of technicians whose team is not 'NYY', and count them by a bar chart, rank x axis in ascending order. | SELECT Name, COUNT(Name) FROM technician WHERE Team <> "NYY" GROUP BY Name ORDER BY Name | nvbench |
CREATE TABLE table_79837 (
"Estimate" real,
"Name" text,
"Nat." text,
"Ship Type" text,
"Principal victims" text,
"Date" text
) | What is the nationality of the ship when the principle victims are civilians? | SELECT "Nat." FROM table_79837 WHERE "Principal victims" = 'civilians' | wikisql |
CREATE TABLE diagnoses_icd (
row_id number,
subject_id number,
hadm_id number,
icd9_code text,
charttime time
)
CREATE TABLE d_labitems (
row_id number,
itemid number,
label text
)
CREATE TABLE admissions (
row_id number,
subject_id number,
hadm_id number,
admittime tim... | what was the name of the drug that until 57 months ago patient 72107 was last prescribed? | SELECT prescriptions.drug FROM prescriptions WHERE prescriptions.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 72107) AND DATETIME(prescriptions.startdate) <= DATETIME(CURRENT_TIME(), '-57 month') ORDER BY prescriptions.startdate DESC LIMIT 1 | mimic_iii |
CREATE TABLE table_40380 (
"Index" text,
"Name" text,
"Song" text,
"Group Song" text,
"Score" text
) | What is Score, when Song is ? | SELECT "Score" FROM table_40380 WHERE "Song" = '第九夜' | wikisql |
CREATE TABLE lab (
subject_id text,
hadm_id text,
itemid text,
charttime text,
flag text,
value_unit text,
label text,
fluid text
)
CREATE TABLE diagnoses (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE demographic (... | provide the number of patients whose admission type is elective and item id is 51256. | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.admission_type = "ELECTIVE" AND lab.itemid = "51256" | mimicsql_data |
CREATE TABLE table_name_38 (
tournament VARCHAR
) | Which Tournament was played in NH in 2011? | SELECT tournament FROM table_name_38 WHERE 2011 = "nh" | sql_create_context |
CREATE TABLE table_23184 (
"Institution" text,
"Location" text,
"Nickname" text,
"Founded" real,
"Type" text,
"Enrollment" real,
"Joined" real
) | In how many different years did schools located in Logan Township, Pennsylvania join the Conference? | SELECT COUNT("Joined") FROM table_23184 WHERE "Location" = 'Logan Township, Pennsylvania' | wikisql |
CREATE TABLE table_37947 (
"Tournament" text,
"1998" text,
"1999" text,
"2000" text,
"2001" text,
"2002" text,
"2003" text,
"2004" text,
"2005" text,
"2006" text,
"2007" text,
"2008" text,
"2009" text,
"2010" text,
"2011" text
) | Which tournament's 2001 and 2006s were a? | SELECT "Tournament" FROM table_37947 WHERE "2001" = 'a' AND "2006" = 'a' | wikisql |
CREATE TABLE musical (
Musical_ID int,
Name text,
Year int,
Award text,
Category text,
Nominee text,
Result text
)
CREATE TABLE actor (
Actor_ID int,
Name text,
Musical_ID int,
Character text,
Duration text,
age int
) | Who are the nominees who were nominated for either of the Bob Fosse or Cleavant Derricks awards, and count them by a pie chart | SELECT Nominee, COUNT(Nominee) FROM musical WHERE Award = "Tony Award" OR Award = "Cleavant Derricks" GROUP BY Nominee | nvbench |
CREATE TABLE table_20181270_3 (
landesliga_nord VARCHAR,
landesliga_mitte VARCHAR
) | Name the landesliga nord for freier tus regensburg | SELECT landesliga_nord FROM table_20181270_3 WHERE landesliga_mitte = "Freier TuS Regensburg" | sql_create_context |
CREATE TABLE ship (
Ship_ID int,
Name text,
Type text,
Nationality text,
Tonnage int
)
CREATE TABLE mission (
Mission_ID int,
Ship_ID int,
Code text,
Launched_Year int,
Location text,
Speed_knots int,
Fate text
) | Show me the comparison of the total number of every ship type with a bar graph, and display in desc by the Y-axis. | SELECT Type, COUNT(Type) FROM ship GROUP BY Type ORDER BY COUNT(Type) DESC | nvbench |
CREATE TABLE table_68230 (
"Date" text,
"Opponent" text,
"Score" text,
"Loss" text,
"Record" text
) | Which record has a Loss of eichhorn (8-5)? | SELECT "Record" FROM table_68230 WHERE "Loss" = 'eichhorn (8-5)' | wikisql |
CREATE TABLE labevents (
row_id number,
subject_id number,
hadm_id number,
itemid number,
charttime time,
valuenum number,
valueuom text
)
CREATE TABLE d_icd_diagnoses (
row_id number,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE diagnoses_icd (
row_... | what was the top three diagnosis with the highest four year mortality rate? | SELECT d_icd_diagnoses.short_title FROM d_icd_diagnoses WHERE d_icd_diagnoses.icd9_code IN (SELECT t4.icd9_code FROM (SELECT t3.icd9_code, DENSE_RANK() OVER (ORDER BY t3.c1 DESC) AS c2 FROM (SELECT t2.icd9_code, 100 - SUM(CASE WHEN patients.dod IS NULL THEN 1 WHEN STRFTIME('%j', patients.dod) - STRFTIME('%j', t2.chartt... | mimic_iii |
CREATE TABLE instructor (
instructor_id int,
name varchar,
uniqname varchar
)
CREATE TABLE requirement (
requirement_id int,
requirement varchar,
college varchar
)
CREATE TABLE program_course (
program_id int,
course_id int,
workload int,
category varchar
)
CREATE TABLE course... | Do all of Prof. James Kosinski 's classes meet on Friday ? | SELECT COUNT(*) = 0 FROM course INNER JOIN course_offering ON course.course_id = course_offering.course_id INNER JOIN offering_instructor ON offering_instructor.offering_id = course_offering.offering_id INNER JOIN instructor ON offering_instructor.instructor_id = instructor.instructor_id WHERE course_offering.friday = ... | advising |
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... | count the number of patients whose admission location is transfer from hosp/extram and primary disease is squamous cell carcinoma oral tongue/sda? | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.admission_location = "TRANSFER FROM HOSP/EXTRAM" AND demographic.diagnosis = "SQUAMOUS CELL CARCINOMA ORAL TONGUE/SDA" | mimicsql_data |
CREATE TABLE table_name_91 (
driver VARCHAR,
team VARCHAR,
points VARCHAR
) | Which driver earned 32 points from the Andretti Green team? | SELECT driver FROM table_name_91 WHERE team = "andretti green" AND points = "32" | 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 demographic (
subject_id text,
hadm_id text,
name text,
marital_status text,
age text,
dob text,
gender text,
... | give me the number of patients whose age is less than 89 and days of hospital stay is greater than 34? | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.age < "89" AND demographic.days_stay > "34" | mimicsql_data |
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... | how many of the patients aged below 89 received drug via pb route? | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE demographic.age < "89" AND prescriptions.route = "PB" | mimicsql_data |
CREATE TABLE table_204_738 (
id number,
"season" number,
"level" text,
"division" text,
"section" text,
"position" text,
"movements" text
) | jow many seasons with the number of division 4 | SELECT COUNT("season") FROM table_204_738 WHERE "division" = 4 | squall |
CREATE TABLE lab (
labid number,
patientunitstayid number,
labname text,
labresult number,
labresulttime time
)
CREATE TABLE microlab (
microlabid number,
patientunitstayid number,
culturesite text,
organism text,
culturetakentime time
)
CREATE TABLE patient (
uniquepid tex... | what was the number of hospitalized patients? | SELECT COUNT(DISTINCT patient.uniquepid) FROM patient WHERE patient.hospitaldischargetime IS NULL | eicu |
CREATE TABLE table_name_99 (
year INTEGER,
engine VARCHAR,
points VARCHAR
) | What is the earliest year that had under 26 points and a toyota v8 engine? | SELECT MIN(year) FROM table_name_99 WHERE engine = "toyota v8" AND points < 26 | sql_create_context |
CREATE TABLE table_35263 (
"Nation" text,
"Gold" real,
"Silver" real,
"Bronze" real,
"Total" real
) | Bronze of 22 has what average silver? | SELECT AVG("Silver") FROM table_35263 WHERE "Bronze" = '22' | wikisql |
CREATE TABLE PostsWithDeleted (
Id number,
PostTypeId number,
AcceptedAnswerId number,
ParentId number,
CreationDate time,
DeletionDate time,
Score number,
ViewCount number,
Body text,
OwnerUserId number,
OwnerDisplayName text,
LastEditorUserId number,
LastEditorDispl... | Top posts with tag html (test). | SELECT Posts.Id AS "post_link", ViewCount, AnswerCount, FavoriteCount, Tags, Score FROM Posts WHERE ClosedDate IS NULL AND Tags LIKE '%maven%' ORDER BY ViewCount DESC LIMIT 500 | sede |
CREATE TABLE table_name_28 (
series VARCHAR,
director VARCHAR,
production_num VARCHAR
) | What series was directed by Frank Tashlin and has the production number, 8053? | SELECT series FROM table_name_28 WHERE director = "frank tashlin" AND production_num = "8053" | sql_create_context |
CREATE TABLE appointment (
appointmentid number,
patient number,
prepnurse number,
physician number,
start time,
end time,
examinationroom text
)
CREATE TABLE block (
blockfloor number,
blockcode number
)
CREATE TABLE procedures (
code number,
name text,
cost number
)
... | Which physician was trained in the procedure that costs the most. | SELECT T1.name FROM physician AS T1 JOIN trained_in AS T2 ON T1.employeeid = T2.physician JOIN procedures AS T3 ON T3.code = T2.treatment ORDER BY T3.cost DESC LIMIT 1 | spider |
CREATE TABLE table_30041 (
"Episode No." real,
"Series No." real,
"Episode" text,
"Director" text,
"Writer(s)" text,
"Original airdate" text,
"Viewers (millions)" text
) | Who was the writer of the episode title 'Divine Intervention'? | SELECT "Writer(s)" FROM table_30041 WHERE "Episode" = 'Divine Intervention' | wikisql |
CREATE TABLE patients (
row_id number,
subject_id number,
gender text,
dob time,
dod time
)
CREATE TABLE prescriptions (
row_id number,
subject_id number,
hadm_id number,
startdate time,
enddate time,
drug text,
dose_val_rx text,
dose_unit_rx text,
route text
)
... | how many times do patient 51858's urine out foley come out on this month/30. | SELECT COUNT(*) FROM outputevents WHERE outputevents.icustay_id IN (SELECT icustays.icustay_id FROM icustays WHERE icustays.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 51858)) AND outputevents.itemid IN (SELECT d_items.itemid FROM d_items WHERE d_items.label = 'urine out foley' A... | mimic_iii |
CREATE TABLE Votes (
Id number,
PostId number,
VoteTypeId number,
UserId number,
CreationDate time,
BountyAmount number
)
CREATE TABLE PostNoticeTypes (
Id number,
ClassId number,
Name text,
Body text,
IsHidden boolean,
Predefined boolean,
PostNoticeDurationId number... | What is the distribution of views for users?. | SELECT nested.view_bins, COUNT(nested.view_bins) AS COUNT FROM (SELECT ROUND(Views / 100, 2) * 100 AS view_bins FROM Users) AS nested GROUP BY nested.view_bins ORDER BY nested.view_bins | sede |
CREATE TABLE PostTags (
PostId number,
TagId number
)
CREATE TABLE PostsWithDeleted (
Id number,
PostTypeId number,
AcceptedAnswerId number,
ParentId number,
CreationDate time,
DeletionDate time,
Score number,
ViewCount number,
Body text,
OwnerUserId number,
OwnerDis... | with improved sort. Of the top 40 tags, how many do I have a score of 15 in?
Need 15 score, or better, in at least 20 of the top 40 tags, to get the badge. | WITH tags40 AS (SELECT TagId, COUNT(*) AS postCount FROM PostTags GROUP BY TagId ORDER BY COUNT(*) DESC LIMIT 40), answers AS (SELECT Score, ParentId FROM Posts WHERE CommunityOwnedDate IS NULL AND PostTypeId = 2 AND OwnerUserId = '##userid##') SELECT * FROM answers AS a INNER JOIN PostTags AS pt ON pt.PostId = a.Paren... | sede |
CREATE TABLE table_32572 (
"Home team" text,
"Home team score" text,
"Away team" text,
"Away team score" text,
"Venue" text,
"Crowd" real,
"Date" text
) | What was South Melbourne's home team score? | SELECT "Home team score" FROM table_32572 WHERE "Home team" = 'south melbourne' | wikisql |
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
) | For those records from the products and each product's manufacturer, a bar chart shows the distribution of headquarter and the sum of price , and group by attribute headquarter. | SELECT Headquarter, SUM(Price) FROM Products AS T1 JOIN Manufacturers AS T2 ON T1.Manufacturer = T2.Code GROUP BY Headquarter | nvbench |
CREATE TABLE lab (
labid number,
patientunitstayid number,
labname text,
labresult number,
labresulttime time
)
CREATE TABLE treatment (
treatmentid number,
patientunitstayid number,
treatmentname text,
treatmenttime time
)
CREATE TABLE diagnosis (
diagnosisid number,
patie... | indicate the monthly maximum dose of volume (ml) milrinone that patient 007-4322 has received since 1038 days ago. | SELECT MAX(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 = '007-4322')) AND intakeoutput.celllabel = 'volume... | eicu |
CREATE TABLE requirement (
requirement_id int,
requirement varchar,
college varchar
)
CREATE TABLE semester (
semester_id int,
semester varchar,
year int
)
CREATE TABLE program_requirement (
program_id int,
category varchar,
min_credit int,
additional_req varchar
)
CREATE TABL... | What courses are useful precursors to GERMAN 127 ? | SELECT DISTINCT advisory_requirement FROM course WHERE department = 'GERMAN' AND number = 127 | advising |
CREATE TABLE table_39757 (
"Office" text,
"Democratic ticket" text,
"Republican ticket" text,
"Law Preservation ticket" text,
"Socialist ticket" text,
"Socialist Labor ticket" text
) | Who's the Socialist Labor ticket with a Republican ticket of cuthbert w. pound? | SELECT "Socialist Labor ticket" FROM table_39757 WHERE "Republican ticket" = 'cuthbert w. pound' | wikisql |
CREATE TABLE table_32846 (
"Home team" text,
"Home team score" text,
"Away team" text,
"Away team score" text,
"Venue" text,
"Crowd" real,
"Date" text
) | At what venue did the home team score 12.19 (91)? | SELECT "Venue" FROM table_32846 WHERE "Home team score" = '12.19 (91)' | wikisql |
CREATE TABLE table_26362472_1 (
election_date VARCHAR,
province VARCHAR
) | What are the election date for elections held in the province of Albacete? | SELECT election_date FROM table_26362472_1 WHERE province = "Albacete" | 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 mzjzjlb (
HXPLC number,
HZXM ... | 在03年3月23日到15年11月12日之间病患55566777的洋地黄情况是怎么样的? | SELECT * FROM hz_info JOIN mzjzjlb JOIN jybgb JOIN jyjgzbb JOIN jybgb_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 = jybgb_jyjgzbb.YLJGDM AND jybgb.BGDH = jyjgzbb.BG... | 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_CLINIC_ID text,
MED_DIRE_CD tex... | 算算医院9301014全部诊疗记录中不同科室统筹基金的开销和全部医疗费用的平均比值 | SELECT t_kc24.t_kc21_MED_ORG_DEPT_NM, AVG(t_kc24.OVE_PAY) FROM t_kc24 WHERE t_kc24.t_kc21_MED_SER_ORG_NO = '9301014' GROUP BY t_kc24.t_kc21_MED_ORG_DEPT_NM | css |
CREATE TABLE Tags (
Id number,
TagName text,
Count number,
ExcerptPostId number,
WikiPostId number
)
CREATE TABLE Posts (
Id number,
PostTypeId number,
AcceptedAnswerId number,
ParentId number,
CreationDate time,
DeletionDate time,
Score number,
ViewCount number,
... | Users with greatest fraction of CW answers. | SELECT COUNT(*), SUM(CASE WHEN CommunityOwnedDate IS NULL THEN 0 ELSE 1 END), OwnerUserId FROM Posts GROUP BY OwnerUserId | sede |
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... | what is gender and primary disease of subject id 1121? | SELECT demographic.gender, demographic.diagnosis FROM demographic WHERE demographic.subject_id = "1121" | mimicsql_data |
CREATE TABLE lab (
labid number,
patientunitstayid number,
labname text,
labresult number,
labresulttime time
)
CREATE TABLE treatment (
treatmentid number,
patientunitstayid number,
treatmentname text,
treatmenttime time
)
CREATE TABLE cost (
costid number,
uniquepid text,... | when did the last time patient 012-4131 had the minimum respiration on 11/24/this year? | SELECT vitalperiodic.observationtime FROM vitalperiodic WHERE vitalperiodic.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '012-4131')) AND NOT vitalperiodic.respiration IS NU... | eicu |
CREATE TABLE table_5142 (
"County" text,
"Per capita income" text,
"Median household income" text,
"Median family income" text,
"Population" real,
"Number of households" real
) | What is the most households with a median household income of $54,086 with less than 231,236 in population? | SELECT MAX("Number of households") FROM table_5142 WHERE "Median household income" = '$54,086' AND "Population" < '231,236' | wikisql |
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 procedures_icd (
row_id number,
su... | how many patients have received a ck-mb index test since 2101? | SELECT COUNT(DISTINCT admissions.subject_id) FROM admissions WHERE admissions.hadm_id IN (SELECT labevents.hadm_id FROM labevents WHERE labevents.itemid IN (SELECT d_labitems.itemid FROM d_labitems WHERE d_labitems.label = 'ck-mb index') AND STRFTIME('%y', labevents.charttime) >= '2101') | mimic_iii |
CREATE TABLE table_204_871 (
id number,
"ano" text,
"title" text,
"role" text,
"channel" text,
"notes" text
) | what was the last year the tv show lynch aired ? | SELECT MAX("ano") FROM table_204_871 | squall |
CREATE TABLE table_27405 (
"Language" text,
"Sorata Municipality" text,
"Guanay Municipality" text,
"Tacacoma Municipality" text,
"Quiabaya Municipality" text,
"Combaya Municipality" text,
"Tipuani Municipality" text,
"Mapiri Municipality" text,
"Teoponte Municipality" text
) | What is the number for the guanay municipality when combaya municipality is 0? | SELECT "Guanay Municipality" FROM table_27405 WHERE "Combaya Municipality" = '0' | wikisql |
CREATE TABLE table_28498999_6 (
player VARCHAR,
points VARCHAR
) | what is the person there the numbers is 2343 | SELECT player FROM table_28498999_6 WHERE points = 2343 | sql_create_context |
CREATE TABLE table_19534677_1 (
volume_line VARCHAR,
_number VARCHAR
) | Name the volume line for number 8 | SELECT volume_line FROM table_19534677_1 WHERE _number = 8 | sql_create_context |
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... | how many patients have received aortocor bypas-1 cor art within 2 months after having previously received cont inv mec ven <96 hrs? | SELECT COUNT(DISTINCT t1.subject_id) FROM (SELECT admissions.subject_id, procedures_icd.charttime FROM procedures_icd JOIN admissions ON procedures_icd.hadm_id = admissions.hadm_id WHERE procedures_icd.icd9_code = (SELECT d_icd_procedures.icd9_code FROM d_icd_procedures WHERE d_icd_procedures.short_title = 'cont inv me... | mimic_iii |
CREATE TABLE t_kc21_t_kc22 (
MED_CLINIC_ID text,
MED_EXP_DET_ID number
)
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 ... | 查询在08年5月23日到09年6月8日期间,手术量排第一的科室和排倒数第一的科室差多少场手术 | SELECT (SELECT COUNT(*) FROM t_kc22 WHERE t_kc22.STA_DATE BETWEEN '2008-05-23' AND '2009-06-08' AND t_kc22.MED_INV_ITEM_TYPE = '手术费' GROUP BY t_kc22.MED_ORG_DEPT_CD ORDER BY COUNT(*) DESC LIMIT 1) - (SELECT COUNT(*) FROM t_kc22 WHERE t_kc22.STA_DATE BETWEEN '2008-05-23' AND '2009-06-08' AND t_kc22.MED_INV_ITEM_TYPE = '... | css |
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... | what is the drug patient 002-44624 was prescribed for the first time during the last hospital visit via j tube route? | 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 = '002-44624' AND NOT patient.hospitaldischargetime IS NULL ORDER BY p... | eicu |
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... | 在医院9155074中,根据入院诊断疾病编码查出不同疾病的平均患者年龄是多少 | SELECT qtb.IN_DIAG_DIS_CD, AVG(qtb.PERSON_AGE) FROM qtb WHERE qtb.MED_SER_ORG_NO = '9155074' GROUP BY qtb.IN_DIAG_DIS_CD UNION SELECT gyb.IN_DIAG_DIS_CD, AVG(gyb.PERSON_AGE) FROM gyb WHERE gyb.MED_SER_ORG_NO = '9155074' GROUP BY gyb.IN_DIAG_DIS_CD UNION SELECT zyb.IN_DIAG_DIS_CD, AVG(zyb.PERSON_AGE) FROM zyb WHERE zyb.... | css |
CREATE TABLE table_name_99 (
year INTEGER,
game VARCHAR
) | What is the lowest year for the game called The Elder Scrolls v: Skyrim? | SELECT MIN(year) FROM table_name_99 WHERE game = "the elder scrolls v: skyrim" | sql_create_context |
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,... | 从2019年4月10日开始到2019年4月22日结束的这段时间患者86828604被开出盐酸帕罗西汀片统共有多少次? | SELECT COUNT(*) 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 = '86828604' AND t_kc22.STA_DATE BETWEEN '2019-04-10' AND '2019-04-22' AND t_kc22.SOC_SRT_DIRE_NM = '盐酸帕罗西汀片' | css |
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 zyjzjlb (
CYBQDM text,
CYBQMC... | 在07年4月18日到19年9月17日期间,06584736的患者找了多少医生看病 | SELECT COUNT(mzjzjlb.ZZYSGH) 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 = '06584736' AND mzjzjlb.JZKSRQ BETWEEN '2007-04-18' AND '2019-09-17' | css |
CREATE TABLE CloseAsOffTopicReasonTypes (
Id number,
IsUniversal boolean,
InputTitle text,
MarkdownInputGuidance text,
MarkdownPostOwnerGuidance text,
MarkdownPrivilegedUserGuidance text,
MarkdownConcensusDescription text,
CreationDate time,
CreationModeratorId number,
ApprovalDa... | questions tagged qt over the years. | SELECT YEAR(CreationDate) AS "year", SUM(CASE WHEN PostHistoryTypeId = 3 THEN 1 ELSE 0 END) AS InitialTags, SUM(CASE WHEN PostHistoryTypeId = 6 THEN 1 ELSE 0 END) AS EditedTags, SUM(1) AS TotalQuestionsWithTag FROM PostHistory WHERE PostHistoryTypeId IN (3, 6) AND 'text' LIKE '%<##tag##>%' GROUP BY YEAR(CreationDate) | sede |
CREATE TABLE ENROLL (
CLASS_CODE varchar(5),
STU_NUM int,
ENROLL_GRADE varchar(50)
)
CREATE TABLE STUDENT (
STU_NUM int,
STU_LNAME varchar(15),
STU_FNAME varchar(15),
STU_INIT varchar(1),
STU_DOB datetime,
STU_HRS int,
STU_CLASS varchar(2),
STU_GPA float(8),
STU_TRANSFER... | how many sections does each course has?, and could you list x axis in descending order? | SELECT CRS_CODE, COUNT(*) FROM CLASS GROUP BY CRS_CODE ORDER BY CRS_CODE DESC | nvbench |
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
)
... | count the number of patients whose year of death is less than or equal to 2168 and procedure icd9 code is 14? | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.dod_year <= "2168.0" AND procedures.icd9_code = "14" | mimicsql_data |
CREATE TABLE trip (
id INTEGER,
duration INTEGER,
start_date TEXT,
start_station_name TEXT,
start_station_id INTEGER,
end_date TEXT,
end_station_name TEXT,
end_station_id INTEGER,
bike_id INTEGER,
subscription_type TEXT,
zip_code INTEGER
)
CREATE TABLE station (
id INTEG... | For those dates that have the 5 highest cloud cover rates, please bin the date into weekdays interval and compute their total cloud cover, and show total number in descending order. | SELECT date, SUM(cloud_cover) FROM weather ORDER BY SUM(cloud_cover) DESC | nvbench |
CREATE TABLE lab (
labid number,
patientunitstayid number,
labname text,
labresult number,
labresulttime time
)
CREATE TABLE treatment (
treatmentid number,
patientunitstayid number,
treatmentname text,
treatmenttime time
)
CREATE TABLE cost (
costid number,
uniquepid text,... | when was the first time in 01/this year that patient 018-99743 was prescribed mupirocin 2 % oint 1 g syringe and albuterol/ipratropium at the same time? | SELECT t1.drugstarttime FROM (SELECT patient.uniquepid, medication.drugstarttime FROM medication JOIN patient ON medication.patientunitstayid = patient.patientunitstayid WHERE medication.drugname = 'mupirocin 2 % oint 1 g syringe' AND patient.uniquepid = '018-99743' AND DATETIME(medication.drugstarttime, 'start of year... | eicu |
CREATE TABLE treatment (
treatmentid number,
patientunitstayid number,
treatmentname text,
treatmenttime time
)
CREATE TABLE intakeoutput (
intakeoutputid number,
patientunitstayid number,
cellpath text,
celllabel text,
cellvaluenumeric number,
intakeoutputtime time
)
CREATE TA... | what are the three most frequently prescribed drugs? | SELECT t1.drugname FROM (SELECT medication.drugname, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM medication GROUP BY medication.drugname) AS t1 WHERE t1.c1 <= 3 | eicu |
CREATE TABLE table_9570 (
"Year" real,
"Character" text,
"Title" text,
"Author" text,
"Artist" text,
"Imprint" text
) | what is the average year when the title is baka to test to sh kanj ? | SELECT AVG("Year") FROM table_9570 WHERE "Title" = 'baka to test to shōkanjū' | wikisql |
CREATE TABLE table_69948 (
"Title" text,
"Entered chart (UK)" text,
"Peak position (UK)" real,
"Weeks on Chart (UK)" real,
"Sent to CBeebies Album" text
) | How many weeks did the single that entered the charts 14 september 2002 stay on the charts ? | SELECT COUNT("Weeks on Chart (UK)") FROM table_69948 WHERE "Entered chart (UK)" = '14 september 2002' | wikisql |
CREATE TABLE table_16201038_4 (
at_opponents_venue VARCHAR,
last_5_meetings VARCHAR,
at_neutral_site VARCHAR
) | What is the record at the opponent's venue against the team for which the record for the last 5 meetings is mu, 4-1 and the record at the neutral site is tied, 0-0? | SELECT at_opponents_venue FROM table_16201038_4 WHERE last_5_meetings = "MU, 4-1" AND at_neutral_site = "Tied, 0-0" | sql_create_context |
CREATE TABLE table_name_58 (
round VARCHAR,
player VARCHAR
) | In which round was Jerry Butler chosen? | SELECT round FROM table_name_58 WHERE player = "jerry butler" | sql_create_context |
CREATE TABLE gyb (
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... | 把医院5188854在二零一零年七月六号到二零二一年六月二十一号期间所有非异地结算的医疗就诊记录列出来 | SELECT * FROM qtb WHERE qtb.MED_SER_ORG_NO = '5188854' AND qtb.IN_HOSP_DATE BETWEEN '2010-07-06' AND '2021-06-21' UNION SELECT * FROM gyb WHERE gyb.MED_SER_ORG_NO = '5188854' AND gyb.IN_HOSP_DATE BETWEEN '2010-07-06' AND '2021-06-21' UNION SELECT * FROM zyb WHERE zyb.MED_SER_ORG_NO = '5188854' AND zyb.IN_HOSP_DATE BETW... | css |
CREATE TABLE table_203_548 (
id number,
"rank" number,
"nation" text,
"gold" number,
"silver" number,
"bronze" number,
"total" number
) | what is the number of total gold medals awarded ? | SELECT SUM("gold") FROM table_203_548 | squall |
CREATE TABLE table_51469 (
"Date" text,
"Opponent" text,
"Score" text,
"Loss" text,
"Attendance" real,
"Record" text
) | Who lost to moyer (9 4)? | SELECT "Opponent" FROM table_51469 WHERE "Loss" = 'moyer (9–4)' | wikisql |
CREATE TABLE table_name_56 (
prize VARCHAR,
season VARCHAR
) | What is Prize, when Season is '2'? | SELECT prize FROM table_name_56 WHERE season = "2" | sql_create_context |
CREATE TABLE table_76816 (
"1976" text,
"1977" text,
"1978" text,
"1979" text,
"1980" text
) | what is 1980 when 1978 is 2.3? | SELECT "1980" FROM table_76816 WHERE "1978" = '2.3' | wikisql |
CREATE TABLE table_23308178_9 (
attendance VARCHAR,
record VARCHAR
) | How many times was there a record of 49-15-11? | SELECT COUNT(attendance) FROM table_23308178_9 WHERE record = "49-15-11" | 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 procedures (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE diagnoses (
... | what is the number of patients whose insurance is private and year of birth is less than 2152? | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.insurance = "Private" AND demographic.dob_year < "2152" | mimicsql_data |
CREATE TABLE Faculty (
FacID INTEGER,
Lname VARCHAR(15),
Fname VARCHAR(15),
Rank VARCHAR(15),
Sex VARCHAR(1),
Phone INTEGER,
Room VARCHAR(5),
Building VARCHAR(13)
)
CREATE TABLE Participates_in (
stuid INTEGER,
actid INTEGER
)
CREATE TABLE Activity (
actid INTEGER,
acti... | How many faculty members do we have for each faculty rank Show bar chart, I want to list in asc by the Y. | SELECT Rank, COUNT(*) FROM Faculty GROUP BY Rank ORDER BY COUNT(*) | nvbench |
CREATE TABLE table_name_95 (
album VARCHAR,
length VARCHAR
) | what album is 4:30 long | SELECT album FROM table_name_95 WHERE length = "4:30" | sql_create_context |
CREATE TABLE table_24773 (
"Candidate (Party)" text,
"Amount raised ( PHP )" text,
"Amount spent ( PHP )" text,
"Votes" real,
"Spent per vote ( PHP )" text,
"Spent per voter ( PHP )" text
) | What was spent per voter when total amount spent was 210,280,000? | SELECT "Spent per voter ( PHP )" FROM table_24773 WHERE "Amount spent ( PHP )" = '210,280,000' | wikisql |
CREATE TABLE table_204_94 (
id number,
"outcome" text,
"date" text,
"tournament" text,
"surface" text,
"partnering" text,
"opponent in the final" text,
"score in the final" text
) | what is the partnering name above chanelle scheepers ? | SELECT "partnering" FROM table_204_94 WHERE id = (SELECT id FROM table_204_94 WHERE "partnering" = 'chanelle scheepers') - 1 | squall |
CREATE TABLE table_name_9 (
score VARCHAR,
visitor VARCHAR
) | What was the score of the game against Milwaukee? | SELECT score FROM table_name_9 WHERE visitor = "milwaukee" | sql_create_context |
CREATE TABLE table_72318 (
"No. in series" real,
"No. in season" real,
"Title" text,
"Directed by" text,
"Written by" text,
"Original air date" text,
"U.S. viewers (millions)" text
) | How many millions of U.S. viewers watched the episode directed by Rob Bailey and written by Pam Veasey? | SELECT "U.S. viewers (millions)" FROM table_72318 WHERE "Directed by" = 'Rob Bailey' AND "Written by" = 'Pam Veasey' | wikisql |
CREATE TABLE actor (
Actor_ID int,
Name text,
Musical_ID int,
Character text,
Duration text,
age int
)
CREATE TABLE musical (
Musical_ID int,
Name text,
Year int,
Award text,
Category text,
Nominee text,
Result text
) | Show the musical nominee with award 'Bob Fosse' or 'Cleavant Derricks', and count them by a bar chart, display by the x-axis in asc please. | SELECT Nominee, COUNT(Nominee) FROM musical WHERE Award = "Tony Award" OR Award = "Cleavant Derricks" GROUP BY Nominee ORDER BY Nominee | nvbench |
CREATE TABLE table_66697 (
"Name" text,
"Gender" text,
"Area" text,
"Authority" text,
"Decile" real
) | What is the smallest decile with an Area of otumoetai? | SELECT MIN("Decile") FROM table_66697 WHERE "Area" = 'otumoetai' | wikisql |
CREATE TABLE basketball_match (
Team_ID int,
School_ID int,
Team_Name text,
ACC_Regular_Season text,
ACC_Percent text,
ACC_Home text,
ACC_Road text,
All_Games text,
All_Games_Percent int,
All_Home text,
All_Road text,
All_Neutral text
)
CREATE TABLE university (
Scho... | What is the relationship between School_ID and All_Games_Percent , and group by attribute All_Neutral? | SELECT School_ID, All_Games_Percent FROM basketball_match GROUP BY All_Neutral | nvbench |
CREATE TABLE offering_instructor (
offering_instructor_id int,
offering_id int,
instructor_id int
)
CREATE TABLE instructor (
instructor_id int,
name varchar,
uniqname varchar
)
CREATE TABLE program_course (
program_id int,
course_id int,
workload int,
category varchar
)
CREAT... | I am looking for any 500 -level courses in the Fall or Winter term . | SELECT DISTINCT course.department, course.name, course.number, semester.semester FROM course, course_offering, semester WHERE ((semester.semester = 'FA' AND semester.year = 2016) OR (semester.semester = 'WN' AND semester.year = 2017)) AND course.course_id = course_offering.course_id AND course.department = 'department0... | advising |
CREATE TABLE diagnosis (
diagnosisid number,
patientunitstayid number,
diagnosisname text,
diagnosistime time,
icd9code text
)
CREATE TABLE microlab (
microlabid number,
patientunitstayid number,
culturesite text,
organism text,
culturetakentime time
)
CREATE TABLE vitalperiodi... | what is patient 030-47098's average value of cortisol until 29 months ago? | SELECT AVG(lab.labresult) FROM lab WHERE lab.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '030-47098')) AND lab.labname = 'cortisol' AND DATETIME(lab.labresulttime) <= DATET... | eicu |
CREATE TABLE table_name_17 (
date VARCHAR,
circuit VARCHAR,
winning_constructor VARCHAR
) | In the circuit of Madonie, what was the date that had the winning constructor Bugatti? | SELECT date FROM table_name_17 WHERE circuit = "madonie" AND winning_constructor = "bugatti" | sql_create_context |
CREATE TABLE table_name_25 (
date VARCHAR,
week VARCHAR
) | What day did they play on week 4? | SELECT date FROM table_name_25 WHERE week = 4 | 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 hz_info (
KH text,
KLX number... | 病患云鸿运在2009-07-30之前做过的检验报告在哪些门诊,列出这些门诊就诊的流水编码 | SELECT mzjzjlb.JZLSH FROM person_info JOIN hz_info JOIN mzjzjlb JOIN person_info_hz_info ON person_info.RYBH = person_info_hz_info.RYBH AND hz_info.YLJGDM = mzjzjlb.YLJGDM AND hz_info.KH = mzjzjlb.KH AND hz_info.KLX = mzjzjlb.KLX AND person_info_hz_info.KH = hz_info.KH AND person_info_hz_info.KLX = hz_info.KLX AND pers... | css |
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 ... | 列出患者吴兰若的检验报告单日期在2008年7月26日之后所对应的门诊就诊的流水号 | SELECT mzjzjlb.JZLSH FROM person_info JOIN hz_info JOIN mzjzjlb JOIN hz_info_mzjzjlb ON person_info.RYBH = hz_info.RYBH AND hz_info.YLJGDM = hz_info_mzjzjlb.YLJGDM AND hz_info.KH = mzjzjlb.KH AND hz_info.KLX = mzjzjlb.KLX AND hz_info_mzjzjlb.JZLSH = mzjzjlb.JZLSH AND hz_info_mzjzjlb.YLJGDM = hz_info_mzjzjlb.YLJGDM AND ... | css |
CREATE TABLE table_34769 (
"Title" text,
"Translation" text,
"Lyricist" text,
"Composer" text,
"Duration" text
) | Which title has a translation in it of 1000 lies? | SELECT "Title" FROM table_34769 WHERE "Translation" = '1000 lies' | wikisql |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.