context stringlengths 11 9.12k | question stringlengths 0 1.06k | SQL stringlengths 2 4.44k | source stringclasses 28
values |
|---|---|---|---|
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... | 编号10110310的参保人自04.7.21起,到08.6.22止,所有开出的药品中,单一药品最大购买次数有多少次 | 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 = '10110310' AND t_kc22.STA_DATE BETWEEN '2004-07-21' AND '2008-06-22' GROUP BY t_kc22.SOC_SRT_DIRE_CD ORDER BY COUNT(*) DESC L... | css |
CREATE TABLE table_204_17 (
id number,
"region" text,
"date" text,
"format" text,
"version(s)" text,
"label" text
) | what was the first country to get the radio ad ? | SELECT "region" FROM table_204_17 ORDER BY "date" LIMIT 1 | squall |
CREATE TABLE Rooms (
roomName VARCHAR,
basePrice VARCHAR
) | Which room has cheapest base price? List the room's name and the base price. | SELECT roomName, basePrice FROM Rooms ORDER BY basePrice LIMIT 1 | sql_create_context |
CREATE TABLE Rooms (
roomName VARCHAR,
maxOccupancy VARCHAR
) | Find the name of the room with the maximum occupancy. | SELECT roomName FROM Rooms ORDER BY maxOccupancy DESC LIMIT 1 | sql_create_context |
CREATE TABLE table_name_25 (
all_amendments_cosponsored INTEGER,
amendments_originally_cosponsored VARCHAR,
all_bills_sponsored VARCHAR
) | What is the highest number of amendments cosponsored associated with 53 amendments originally cosponsored and over 54 bills sponsored? | SELECT MAX(all_amendments_cosponsored) FROM table_name_25 WHERE amendments_originally_cosponsored = 53 AND all_bills_sponsored > 54 | sql_create_context |
CREATE TABLE table_203_397 (
id number,
"series" text,
"launch date" text,
"finale date" text,
"days" number,
"housemates" number,
"winner" text,
"main presenter" text,
"grand prize" text,
"liveshow\naudience\nmillions" number
) | largest number of housemates was during season ... | SELECT MAX("housemates") FROM table_203_397 | squall |
CREATE TABLE table_73963 (
"Member countries" text,
"Population" text,
"Area (km\u00b2)" text,
"GDP (billion US$)" text,
"GDP per capita (US$)" text,
"Languages" text
) | Name the area for german | SELECT "Area (km\u00b2)" FROM table_73963 WHERE "Languages" = 'German' | wikisql |
CREATE TABLE txmzjzjlb (
HXPLC number,
HZXM text,
JLSJ time,
JZJSSJ time,
JZKSBM text,
JZKSMC text,
JZKSRQ time,
JZLSH number,
JZZDBM text,
JZZDSM text,
JZZTDM number,
JZZTMC text,
KH text,
KLX number,
MJZH text,
ML number,
MZZYZDZZBM text,
MZZYZDZ... | 哪些病人被门诊诊断为牙体缺损,查一下他们的籍贯代码和名称并算出相应人数 | SELECT person_info.JGDM, person_info.JGMC, COUNT(person_info.RYBH) FROM person_info JOIN hz_info JOIN txmzjzjlb ON person_info.RYBH = hz_info.RYBH AND hz_info.YLJGDM = txmzjzjlb.YLJGDM AND hz_info.KH = txmzjzjlb.KH AND hz_info.KLX = txmzjzjlb.KLX WHERE txmzjzjlb.JZZDSM = '牙体缺损' GROUP BY person_info.JGDM UNION SELECT pe... | css |
CREATE TABLE table_27462209_1 (
written_by VARCHAR,
prod_code VARCHAR
) | Name who wrote the production code 322 | SELECT written_by FROM table_27462209_1 WHERE prod_code = 322 | 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 lab (
subject_id text,
hadm_id text,
itemid text,
charttime text,
flag text,
value_unit text,... | how many patients stayed in hospital for more than 23 days and were prescribed the drug ondasetron odt? | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE demographic.days_stay > "23" AND prescriptions.drug = "Ondansetron ODT" | mimicsql_data |
CREATE TABLE table_36374 (
"Week" real,
"Date" text,
"Opponent" text,
"Result" text,
"Record" text,
"Game Site" text,
"Attendance" real
) | Opponent of at boston patriots, and a Week larger than 3 had what average attendance? | SELECT AVG("Attendance") FROM table_36374 WHERE "Opponent" = 'at boston patriots' AND "Week" > '3' | 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... | what is average age of patients whose admission type is emergency and year of death is less than 2155? | SELECT AVG(demographic.age) FROM demographic WHERE demographic.admission_type = "EMERGENCY" AND demographic.dod_year < "2155.0" | mimicsql_data |
CREATE TABLE regions (
REGION_ID decimal(5,0),
REGION_NAME varchar(25)
)
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_SALA... | For those employees whose salary is in the range of 8000 and 12000 and commission is not null or department number does not equal to 40, find hire_date and the sum of employee_id bin hire_date by time, and visualize them by a bar chart, display by the y axis in descending please. | SELECT HIRE_DATE, SUM(EMPLOYEE_ID) FROM employees WHERE SALARY BETWEEN 8000 AND 12000 AND COMMISSION_PCT <> "null" OR DEPARTMENT_ID <> 40 ORDER BY SUM(EMPLOYEE_ID) DESC | nvbench |
CREATE TABLE table_46307 (
"Game" real,
"Date" text,
"Team" text,
"Score" text,
"High points" text,
"High rebounds" text,
"High assists" text,
"Location Attendance" text,
"Record" text
) | What was the total score where Toronto was played? | SELECT SUM("Game") FROM table_46307 WHERE "Team" = 'toronto' | wikisql |
CREATE TABLE table_73212 (
"Shareholder" text,
"s A share" real,
"s B share" real,
"Percent of capital" text,
"Percent of votes" text
) | What shareholder has 3.63 percent of capital? | SELECT "Shareholder" FROM table_73212 WHERE "Percent of capital" = '3.63' | wikisql |
CREATE TABLE market (
Market_ID int,
Country text,
Number_cities int
)
CREATE TABLE film (
Film_ID int,
Title text,
Studio text,
Director text,
Gross_in_dollar int
)
CREATE TABLE film_market_estimation (
Estimation_ID int,
Low_Estimate real,
High_Estimate real,
Film_ID ... | How many films for each type? Return a bar chart. | SELECT Type, COUNT(Type) FROM film AS T1 JOIN film_market_estimation AS T2 ON T1.Film_ID = T2.Film_ID GROUP BY Type | nvbench |
CREATE TABLE table_16609 (
"Wicket" text,
"Runs" text,
"Batting partners" text,
"Batting team" text,
"Fielding team" text,
"Venue" text,
"Season" text
) | What is the batting team where the runs are 276? | SELECT "Batting team" FROM table_16609 WHERE "Runs" = '276' | wikisql |
CREATE TABLE outputevents (
row_id number,
subject_id number,
hadm_id number,
icustay_id number,
charttime time,
itemid number,
value number
)
CREATE TABLE cost (
row_id number,
subject_id number,
hadm_id number,
event_type text,
event_id number,
chargetime time,
... | what number of patients have received a packed cell transfusion within 2 months after having been diagnosed with chr ischemic hrt dis nec? | 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 = 'chr ischemic hrt d... | mimic_iii |
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 * FROM person_info JOIN hz_info JOIN mzjzjlb JOIN jybgb JOIN jyjgzbb JOIN mzjzjlb_jybgb 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 = mzjzjlb_jybgb.YLJGDM_MZJZJLB AND mzjzjlb.JZLSH = jybgb.JZLSH_MZJZJLB AND jy... | css |
CREATE TABLE party (
Party_ID int,
Year real,
Party text,
Governor text,
Lieutenant_Governor text,
Comptroller text,
Attorney_General text,
US_Senate text
)
CREATE TABLE election (
Election_ID int,
Counties_Represented text,
District int,
Delegate text,
Party int,
... | Find the number of the parties associated with the delegates from district 1 or 2 Who served as comptrollers of the parties?, and sort in asc by the X. | SELECT Comptroller, COUNT(Comptroller) FROM election AS T1 JOIN party AS T2 ON T1.Party = T2.Party_ID WHERE T1.District = 1 OR T1.District = 2 GROUP BY Comptroller ORDER BY Comptroller | nvbench |
CREATE TABLE table_4654 (
"Race Name" text,
"Circuit" text,
"City/Location" text,
"Date" text,
"Pole position" text,
"Winning driver" text,
"Winning team" text,
"Report" text
) | For the race held at the Cleveland Burke Lakefront Airport circuit, with winning driver Emerson Fittipaldi and pole position Michael Andretti, what was the winning team? | SELECT "Winning team" FROM table_4654 WHERE "Winning driver" = 'emerson fittipaldi' AND "Pole position" = 'michael andretti' AND "Circuit" = 'cleveland burke lakefront airport' | wikisql |
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,
... | 奚雅逸患者被门诊诊断为疾病S71.943时的检测指标976587的结果定量及其单位分别是都是多少? | SELECT jyjgzbb.JCZBJGDL, jyjgzbb.JCZBJGDW FROM person_info JOIN hz_info JOIN mzjzjlb JOIN jybgb JOIN jyjgzbb JOIN jybgb_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 = j... | css |
CREATE TABLE PostNoticeTypes (
Id number,
ClassId number,
Name text,
Body text,
IsHidden boolean,
Predefined boolean,
PostNoticeDurationId number
)
CREATE TABLE ReviewTasks (
Id number,
ReviewTaskTypeId number,
CreationDate time,
DeletionDate time,
ReviewTaskStateId numb... | Search post based on tag and keyword with answers. Limited the results to the posts with check answer | SELECT p.Id AS "post_link", p.Id, p.Title, p.CommentCount, p.Body, c.Text, p.ViewCount, a.Score FROM Posts AS p LEFT JOIN Comments AS c ON p.Id = c.PostId INNER JOIN Posts AS a ON a.ParentId = p.Id WHERE p.PostTypeId = 1 OR p.PostTypeId = 2 AND p.Tags = '%##tagname##%' AND p.Title LIKE '%##keyword##%' ORDER BY ViewCoun... | sede |
CREATE TABLE table_1341738_6 (
candidates VARCHAR,
incumbent VARCHAR
) | Who were the candidates in the election that featured incumbent don edwards? | SELECT candidates FROM table_1341738_6 WHERE incumbent = "Don Edwards" | 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_CLINIC_ID text,
MED_DIRE_CD tex... | 能知道患者韦宜然在2011.9.2到2012.12.4这段时间,2066190这个医疗机构给他做的检查次数是多少吗 | SELECT COUNT(*) FROM t_kc21 JOIN t_kc22 ON t_kc21.MED_CLINIC_ID = t_kc22.MED_CLINIC_ID WHERE t_kc21.PERSON_NM = '韦宜然' AND t_kc22.STA_DATE BETWEEN '2011-09-02' AND '2012-12-04' AND t_kc21.MED_SER_ORG_NO = '2066190' AND t_kc22.MED_INV_ITEM_TYPE = '检查费' | css |
CREATE TABLE table_72676 (
"Round" text,
"Race" real,
"Circuit" text,
"Date" text,
"Pole Position" text,
"Fastest Lap" text,
"Winning driver" text,
"Winning team" text
) | What is the highest race number in the Phillip Island circuit with James Winslow as the winning driver and pole position? | SELECT MAX("Race") FROM table_72676 WHERE "Circuit" = 'Phillip Island' AND "Winning driver" = 'James Winslow' AND "Pole Position" = 'James Winslow' | wikisql |
CREATE TABLE PostFeedback (
Id number,
PostId number,
IsAnonymous boolean,
VoteTypeId number,
CreationDate time
)
CREATE TABLE SuggestedEdits (
Id number,
PostId number,
CreationDate time,
ApprovalDate time,
RejectionDate time,
OwnerUserId number,
Comment text,
Text ... | Search my comments by text. | SELECT PostId AS "post_link", Text, Score FROM Comments WHERE UserId = '##UserId##' AND Text LIKE '%##Search##%' ORDER BY CreationDate DESC | sede |
CREATE TABLE table_58418 (
"Name" text,
"Dates active" text,
"Windspeeds" text,
"Pressure" text,
"Deaths" text
) | When was there 204 deaths? | SELECT "Dates active" FROM table_58418 WHERE "Deaths" = '204' | wikisql |
CREATE TABLE table_204_760 (
id number,
"year" number,
"competition" text,
"venue" text,
"position" text,
"event" text,
"notes" text
) | which of each game in 2007 was in the 2nd position ? | SELECT "competition" FROM table_204_760 WHERE "year" = 2007 AND "position" = 2 | squall |
CREATE TABLE d_items (
row_id number,
itemid number,
label text,
linksto 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 labevents (
row_id number,
... | give me the top four most frequent treatments that patients took within the same month after receiving packed cell transfusion until 1 year ago. | SELECT d_icd_procedures.short_title FROM d_icd_procedures WHERE d_icd_procedures.icd9_code IN (SELECT t3.icd9_code FROM (SELECT t2.icd9_code, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM (SELECT admissions.subject_id, procedures_icd.charttime FROM procedures_icd JOIN admissions ON procedures_icd.hadm_id = admi... | mimic_iii |
CREATE TABLE table_name_31 (
results¹ VARCHAR,
date VARCHAR
) | What were the results on September 7? | SELECT results¹ FROM table_name_31 WHERE date = "september 7" | sql_create_context |
CREATE TABLE table_16710971_2 (
falcons_points VARCHAR,
record VARCHAR
) | How many points did the Falcons score when the record was 4-4? | SELECT falcons_points FROM table_16710971_2 WHERE record = "4-4" | sql_create_context |
CREATE TABLE table_15201 (
"Tournament" text,
"2007" text,
"2008" text,
"2009" text,
"2010" text,
"2011" text,
"2012" text
) | Name the tournament for 2012 grand slam tournaments | SELECT "Tournament" FROM table_15201 WHERE "2012" = 'grand slam tournaments' | 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,... | what is gender and procedure icd9 code of subject id 2560? | SELECT demographic.gender, procedures.icd9_code FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.subject_id = "2560" | mimicsql_data |
CREATE TABLE table_39104 (
"Rank" text,
"Nation" text,
"Gold" real,
"Silver" real,
"Bronze" real,
"Total" real
) | What is the smallest number of total medals for Georgia with 0 silver and 1 bronze? | SELECT MIN("Total") FROM table_39104 WHERE "Silver" > '0' AND "Nation" = 'georgia' AND "Bronze" < '1' | wikisql |
CREATE TABLE table_name_68 (
surface VARCHAR,
year VARCHAR
) | What was the surface in 1996? | SELECT surface FROM table_name_68 WHERE year = 1996 | 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 diagnoses (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
C... | tell me the diagnoses icd9 code days for which patient troy friedman was hospitalized. | SELECT demographic.days_stay, diagnoses.icd9_code FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE demographic.name = "Troy Friedman" | mimicsql_data |
CREATE TABLE zyjybgb (
BBCJBW text,
BBDM text,
BBMC text,
BBZT number,
BGDH number,
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,
... | 在2001年9月2日到2009年7月11日期间,为患者43339704检测指标557689的医务人员工号及姓名分别是什么? | SELECT jyjgzbb.JCRGH, jyjgzbb.JCRXM FROM hz_info JOIN mzjzjlb JOIN zyjybgb JOIN jyjgzbb ON hz_info.YLJGDM = mzjzjlb.YLJGDM AND hz_info.KH = mzjzjlb.KH AND hz_info.KLX = mzjzjlb.KLX AND mzjzjlb.YLJGDM = zyjybgb.YLJGDM_MZJZJLB AND mzjzjlb.JZLSH = zyjybgb.JZLSH_MZJZJLB AND zyjybgb.YLJGDM = jyjgzbb.YLJGDM AND zyjybgb.BGDH ... | css |
CREATE TABLE table_17160 (
"Suburb" text,
"Population (in 2008)" real,
"Median age (in 2006)" text,
"Mean household size (in 2006)" text,
"Area (km\u00b2)" text,
"Density (/km\u00b2)" real,
"Date first settled as a suburb" real,
"Gazetted as a Division Name" text
) | What is the density in Garran? | SELECT MIN("Density (/km\u00b2)") FROM table_17160 WHERE "Suburb" = 'Garran' | 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 procedures (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE prescription... | specify the lab test abnormal status of patient jerry deberry | SELECT lab.flag FROM demographic INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.name = "Jerry Deberry" | mimicsql_data |
CREATE TABLE table_78808 (
"Geelong DFL" text,
"Wins" real,
"Byes" real,
"Losses" real,
"Draws" real,
"Against" real
) | What is the total number of losses where the byes were greater than 0? | SELECT COUNT("Losses") FROM table_78808 WHERE "Byes" > '0' | wikisql |
CREATE TABLE intakeoutput (
intakeoutputid number,
patientunitstayid number,
cellpath text,
celllabel text,
cellvaluenumeric number,
intakeoutputtime time
)
CREATE TABLE diagnosis (
diagnosisid number,
patientunitstayid number,
diagnosisname text,
diagnosistime time,
icd9cod... | for patients who were prescribed azithromycin 500 mg iv solr, what were the five most commonly prescribed drugs at the same time? | SELECT t3.drugname FROM (SELECT t2.drugname, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM (SELECT patient.uniquepid, medication.drugstarttime FROM medication JOIN patient ON medication.patientunitstayid = patient.patientunitstayid WHERE medication.drugname = 'azithromycin 500 mg iv solr') AS t1 JOIN (SELECT pa... | eicu |
CREATE TABLE PostTypes (
Id number,
Name text
)
CREATE TABLE TagSynonyms (
Id number,
SourceTagName text,
TargetTagName text,
CreationDate time,
OwnerUserId number,
AutoRenameCount number,
LastAutoRename time,
Score number,
ApprovedByUserId number,
ApprovalDate time
)
C... | Upvoted posts for UserId with certain tag. Load all posts a certain user upvoted and filter by tag (tag1) | SELECT COUNT(*) FROM Users AS u FULL OUTER JOIN Posts AS p ON p.OwnerUserId = u.Id FULL OUTER JOIN PostTags AS pt ON pt.PostId = p.Id FULL OUTER JOIN Tags AS t ON t.Id = pt.TagId WHERE u.Id = '##UserId##' AND t.TagName IN ('##Tag1:string##') | sede |
CREATE TABLE table_28043 (
"Series no." real,
"No. in season" real,
"Title" text,
"Written by" text,
"Directed by" text,
"Original air date" text,
"U.S. viewers (millions)" text
) | Who was the writer for season 14? | SELECT "Written by" FROM table_28043 WHERE "No. in season" = '14' | wikisql |
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 date_day (
... | i need a flight from KANSAS CITY to CHICAGO that leaves wednesday and arrives in CHICAGO around 7pm | 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, date_day, days, flight WHERE (((flight.arrival_time <= 1930 AND flight.arrival_time >= 1830) AND date_day.day_number = 23 AND date_day.month_number = 4 AND date_day.year = 19... | atis |
CREATE TABLE table_8613 (
"Peak" text,
"Location" text,
"Height (m)" real,
"Prominence (m)" real,
"Col (m)" real
) | What is the smallest col where height is less than 4,274 and peak is Triglav and prominence is less than 2,052? | SELECT MIN("Col (m)") FROM table_8613 WHERE "Height (m)" < '4,274' AND "Peak" = 'triglav' AND "Prominence (m)" < '2,052' | wikisql |
CREATE TABLE table_9664 (
"Tie no" text,
"Home team" text,
"Score" text,
"Away team" text,
"Date" text
) | Which Date has a Home team of rochdale? | SELECT "Date" FROM table_9664 WHERE "Home team" = 'rochdale' | 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 procedures (
... | provide the number of patients whose admission year is less than 2170 and drug name is atorvastatin? | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE demographic.admityear < "2170" AND prescriptions.drug = "Atorvastatin" | mimicsql_data |
CREATE TABLE table_76421 (
"Date" text,
"Opponent" text,
"Score" text,
"Result" text,
"Record" text
) | What was the Result on July 24? | SELECT "Result" FROM table_76421 WHERE "Date" = 'july 24' | wikisql |
CREATE TABLE diagnoses (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE lab (
subject_id text,
hadm_id text,
itemid text,
charttime text,
flag text,
value_unit text,
label text,
fluid text
)
CREATE TABLE demographic (... | get me the number of female patients who had elective hospital admission. | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.gender = "F" AND demographic.admission_type = "ELECTIVE" | mimicsql_data |
CREATE TABLE table_74168 (
"Game" real,
"Date" text,
"Team" text,
"Score" text,
"High points" text,
"High rebounds" text,
"High assists" text,
"Location Attendance" text,
"Record" text
) | What game number is the Washington team. | SELECT COUNT("Game") FROM table_74168 WHERE "Team" = 'Washington' | wikisql |
CREATE TABLE table_name_73 (
examples VARCHAR,
american VARCHAR,
semi_closed_initial_unstressed_vowels VARCHAR
) | What is the example for the American of , , and a Semi-closed initial unstressed vowels of y / /? | SELECT examples FROM table_name_73 WHERE american = "ɪ, ə" AND semi_closed_initial_unstressed_vowels = "y /ɨ/" | sql_create_context |
CREATE TABLE table_name_34 (
type VARCHAR,
moving_from VARCHAR,
ends VARCHAR,
transfer_window VARCHAR
) | What is the type of the player who ended in 2013, had a summer transfer window, and moved from kalmar ff? | SELECT type FROM table_name_34 WHERE ends = 2013 AND transfer_window = "summer" AND moving_from = "kalmar ff" | sql_create_context |
CREATE TABLE table_17768 (
"Day: (see Irregularities )" text,
"Sunday S\u014dl (Sun)" text,
"Monday Luna (Moon)" text,
"Tuesday Mars (Mars)" text,
"Wednesday Mercurius (Mercury)" text,
"Thursday Iuppiter (Jupiter)" text,
"Friday Venus (Venus)" text,
"Saturday Saturnus ( Saturn)" text
) | what's the sunday s l (sun) with friday venus (venus) being vernes | SELECT "Sunday S\u014dl (Sun)" FROM table_17768 WHERE "Friday Venus (Venus)" = 'vernes' | wikisql |
CREATE TABLE table_14342480_6 (
starter VARCHAR,
position VARCHAR
) | Name the starter for position being left end | SELECT starter FROM table_14342480_6 WHERE position = "Left end" | 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... | what number of patients with diagnoses titled acq coagul factor had drug route neb? | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE diagnoses.short_title = "Acq coagul factor defic" AND prescriptions.route = "NEB" | mimicsql_data |
CREATE TABLE table_name_53 (
team__number1 VARCHAR
) | What is the 1st leg when team number 1 is CSU SIBIU? | SELECT 1 AS st_leg FROM table_name_53 WHERE team__number1 = "csu sibiu" | sql_create_context |
CREATE TABLE table_1574968_1 (
creator VARCHAR,
viewer VARCHAR
) | Who is the creator when the view happens to gddm, afp viewer? | SELECT creator FROM table_1574968_1 WHERE viewer = "GDDM, AFP viewer" | sql_create_context |
CREATE TABLE table_name_2 (
fastest_lap VARCHAR,
constructor VARCHAR,
race VARCHAR
) | What was the fastest lap time at the British Grand Prix with Mercedes as the constructor? | SELECT fastest_lap FROM table_name_2 WHERE constructor = "mercedes" AND race = "british grand prix" | sql_create_context |
CREATE TABLE table_10960039_1 (
pick__number VARCHAR,
player VARCHAR
) | What is player Alexis Bwenge's pick number? | SELECT pick__number FROM table_10960039_1 WHERE player = "Alexis Bwenge" | sql_create_context |
CREATE TABLE table_43389 (
"Player" text,
"Club" text,
"League" real,
"FA Cup" real,
"FA Trophy" real,
"League Cup" real,
"Total" real
) | What is the average total with 1 FA cup and more than 0 FA trophies? | SELECT AVG("Total") FROM table_43389 WHERE "FA Cup" = '1' AND "FA Trophy" > '0' | wikisql |
CREATE TABLE table_name_91 (
current_name VARCHAR,
year_first_opened INTEGER
) | What ride opened after 2011? | SELECT current_name FROM table_name_91 WHERE year_first_opened > 2011 | 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_CLINIC_ID text,
MED_DIRE_CD tex... | 列出医院4553560中根据出院诊断疾病编码,不同疾病的平均患者年龄是多大? | SELECT qtb.OUT_DIAG_DIS_CD, AVG(qtb.PERSON_AGE) FROM qtb WHERE qtb.MED_SER_ORG_NO = '4553560' GROUP BY qtb.OUT_DIAG_DIS_CD UNION SELECT gyb.OUT_DIAG_DIS_CD, AVG(gyb.PERSON_AGE) FROM gyb WHERE gyb.MED_SER_ORG_NO = '4553560' GROUP BY gyb.OUT_DIAG_DIS_CD UNION SELECT zyb.OUT_DIAG_DIS_CD, AVG(zyb.PERSON_AGE) FROM zyb WHERE... | css |
CREATE TABLE procedures (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE diagnoses (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE demographic (
subject_id text,
hadm_id t... | among patients tested for ascites, how many of them had icd9 code 99859? | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE diagnoses.icd9_code = "99859" AND lab.fluid = "Ascites" | mimicsql_data |
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,
... | 陈玲玲这个病人在07年4月17到14年6月22日买过多少次西药 | SELECT COUNT(*) FROM gwyjzb JOIN t_kc22 ON gwyjzb.MED_CLINIC_ID = t_kc22.MED_CLINIC_ID WHERE gwyjzb.PERSON_NM = '陈玲玲' AND t_kc22.STA_DATE BETWEEN '2007-04-17' AND '2014-06-22' AND t_kc22.MED_INV_ITEM_TYPE = '西药费' UNION SELECT COUNT(*) FROM fgwyjzb JOIN t_kc22 ON fgwyjzb.MED_CLINIC_ID = t_kc22.MED_CLINIC_ID WHERE fgwyjz... | css |
CREATE TABLE film (
Film_ID int,
Rank_in_series int,
Number_in_season int,
Title text,
Directed_by text,
Original_air_date text,
Production_code text
)
CREATE TABLE cinema (
Cinema_ID int,
Name text,
Openning_year int,
Capacity int,
Location text
)
CREATE TABLE schedule... | Create a bar chart showing the total number across location, could you sort Location from low to high order? | SELECT Location, COUNT(*) FROM cinema GROUP BY Location ORDER BY Location | nvbench |
CREATE TABLE Parts (
part_id INTEGER,
part_name VARCHAR(255),
chargeable_yn VARCHAR(1),
chargeable_amount VARCHAR(20),
other_part_details VARCHAR(255)
)
CREATE TABLE Staff (
staff_id INTEGER,
staff_name VARCHAR(255),
gender VARCHAR(1),
other_staff_details VARCHAR(255)
)
CREATE TABL... | How many assets does each maintenance contract contain? List the number and the contract id. Plot them as scatter chart. | SELECT COUNT(*), T1.maintenance_contract_id FROM Maintenance_Contracts AS T1 JOIN Assets AS T2 ON T1.maintenance_contract_id = T2.maintenance_contract_id GROUP BY T1.maintenance_contract_id | nvbench |
CREATE TABLE inventory (
inventory_id MEDIUMINT UNSIGNED,
film_id SMALLINT UNSIGNED,
store_id TINYINT UNSIGNED,
last_update TIMESTAMP
)
CREATE TABLE film_actor (
actor_id SMALLINT UNSIGNED,
film_id SMALLINT UNSIGNED,
last_update TIMESTAMP
)
CREATE TABLE customer (
customer_id SMALLINT ... | How many films are there in each category? List the genre name and the count with a bar chart. | SELECT name, COUNT(*) FROM film_category AS T1 JOIN category AS T2 ON T1.category_id = T2.category_id GROUP BY T1.category_id | nvbench |
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,
... | what are the three most frequently ordered procedures in patients with age 60 or above this year? | SELECT t1.treatmentname FROM (SELECT treatment.treatmentname, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM treatment WHERE treatment.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.age >= 60) AND DATETIME(treatment.treatmenttime, 'start of year') = DATETIME(CURRENT_TIME(), 'st... | eicu |
CREATE TABLE table_48822 (
"Year" real,
"Team" text,
"Co-Drivers" text,
"Class" text,
"Laps" real,
"Pos." text,
"Class Pos." text
) | What is the class of car that is earlier than 2005 and has a class position of 2nd? | SELECT "Class" FROM table_48822 WHERE "Year" < '2005' AND "Class Pos." = '2nd' | wikisql |
CREATE TABLE intakeoutput (
intakeoutputid number,
patientunitstayid number,
cellpath text,
celllabel text,
cellvaluenumeric number,
intakeoutputtime time
)
CREATE TABLE allergy (
allergyid number,
patientunitstayid number,
drugname text,
allergyname text,
allergytime time
)... | how many hours have elapsed since the first time that patient 032-9230 stayed in their current hospital visit in ward 1068? | SELECT 24 * (STRFTIME('%j', CURRENT_TIME()) - STRFTIME('%j', patient.unitadmittime)) FROM patient WHERE patient.uniquepid = '032-9230' AND patient.wardid = 1068 AND patient.hospitaldischargetime IS NULL ORDER BY patient.unitadmittime LIMIT 1 | eicu |
CREATE TABLE table_32708 (
"Week" real,
"Date" text,
"Opponent" text,
"Result" text,
"Record" text,
"Attendance" text
) | Who was the opponent for week 6? | SELECT "Opponent" FROM table_32708 WHERE "Week" = '6' | 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... | what is the number of patients with chemistry lab test category who had thoracentesis procedure? | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE procedures.long_title = "Thoracentesis" AND lab."CATEGORY" = "Chemistry" | mimicsql_data |
CREATE TABLE table_35203 (
"Year" real,
"Class" text,
"Team" text,
"Points" real,
"Wins" real
) | How many points are there later than 1992? | SELECT COUNT("Points") FROM table_35203 WHERE "Year" > '1992' | wikisql |
CREATE TABLE table_name_71 (
place VARCHAR,
country VARCHAR,
money___$__ VARCHAR,
score VARCHAR
) | Where did the player place who is from the United States, who made more than $216, and whose score was 74-70-71-69=284? | SELECT place FROM table_name_71 WHERE country = "united states" AND money___$__ > 216 AND score = 74 - 70 - 71 - 69 = 284 | sql_create_context |
CREATE TABLE table_5711 (
"District" real,
"Name" text,
"Party" text,
"Home city/town" text,
"First elected" real
) | Which First elected is the highest one that has a Party of dem, and a District larger than 24, and a Home city/town of berlin? | SELECT MAX("First elected") FROM table_5711 WHERE "Party" = 'dem' AND "District" > '24' AND "Home city/town" = 'berlin' | wikisql |
CREATE TABLE TagSynonyms (
Id number,
SourceTagName text,
TargetTagName text,
CreationDate time,
OwnerUserId number,
AutoRenameCount number,
LastAutoRename time,
Score number,
ApprovedByUserId number,
ApprovalDate time
)
CREATE TABLE PostHistoryTypes (
Id number,
Name te... | Soft [self-learning] questions without MathJax. | SELECT Score, Id AS "post_link", CreationDate, Tags FROM Posts WHERE PostTypeId = 1 AND Tags LIKE '%<self-learning>%' AND (Tags LIKE '%<advice>%' OR Tags LIKE '%<soft-question>%' OR Tags LIKE '%<big-list>%' OR Tags LIKE '%<education>%' OR Tags LIKE '%<teaching>%' OR Tags = '<self-learning>' OR (NOT Body LIKE '%$%' AND ... | sede |
CREATE TABLE mzjzjlb (
YLJGDM text,
JZLSH text,
KH text,
KLX number,
MJZH text,
HZXM text,
NLS number,
NLY number,
ZSEBZ number,
JZZTDM number,
JZZTMC text,
JZJSSJ time,
TXBZ number,
ZZBZ number,
WDBZ number,
JZKSBM text,
JZKSMC text,
JZKSRQ time,
... | 门诊就诊08031682316中这个病人的身高、体重的数据是什么?体温、收缩压、舒张压、心率、呼吸频率、脉率的详细数据是怎样的 | SELECT SG, TZ, TW, SSY, SZY, XL, HXPLC, ML FROM mzjzjlb WHERE JZLSH = '08031682316' | css |
CREATE TABLE table_924 (
"RNA Segment (Gene)" real,
"Size ( s base pair )" real,
"Protein" text,
"Molecular weight kDa" text,
"Location" text,
"Copies per particle" text,
"Function" text
) | How many copoes per particle are created in the segment that forms inner shell of the core? | SELECT "Copies per particle" FROM table_924 WHERE "Location" = 'Forms inner shell of the core' | 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 demographic (
subject_id text,
hadm_id text,
name text,
marital_status text,
age text,
dob te... | what is language and death status of subject id 3623? | SELECT demographic.language, demographic.expire_flag FROM demographic WHERE demographic.subject_id = "3623" | mimicsql_data |
CREATE TABLE table_56178 (
"Name" text,
"Location" text,
"Elevation + Height" text,
"Delivery" text,
"Purpose" text,
"Yield" text
) | What was the locaction of the Evans test blast? | SELECT "Location" FROM table_56178 WHERE "Name" = 'evans' | wikisql |
CREATE TABLE table_38092 (
"7:00" text,
"7:30" text,
"8:00" text,
"8:30" text,
"9:00" text,
"9:30" text,
"10:00" text,
"10:30" text
) | What is the 8:00 feature with a 7:00 feature Air Farce? | SELECT "8:00" FROM table_38092 WHERE "7:00" = 'air farce' | wikisql |
CREATE TABLE player (
pid number,
pname text,
ycard text,
hs number
)
CREATE TABLE college (
cname text,
state text,
enr number
)
CREATE TABLE tryout (
pid number,
cname text,
ppos text,
decision text
) | What is the number of colleges with a student population greater than 15000? | SELECT COUNT(*) FROM college WHERE enr > 15000 | spider |
CREATE TABLE table_203_865 (
id number,
"place" number,
"athlete" text,
"nation" text,
"best mark" text,
"throw 1" number,
"throw 2" number,
"throw 3" number,
"throw 4" number,
"throw 5" number,
"throw 6" number
) | who was the only athlete to throw more than 18 meters ? | SELECT "athlete" FROM table_203_865 WHERE "best mark" > 18 | squall |
CREATE TABLE table_train_76 (
"id" int,
"mini_mental_state_examination_mmse" int,
"language" string,
"csf" int,
"rosen_modified_hachinski_ischemic_score" int,
"ad" bool,
"age" float,
"NOUSE" float
) | modified hachinski score >= 4 | SELECT * FROM table_train_76 WHERE rosen_modified_hachinski_ischemic_score >= 4 | criteria2sql |
CREATE TABLE table_6097 (
"Date" text,
"Visitor" text,
"Score" text,
"Home" text,
"Decision" text,
"Attendance" real,
"Series" text
) | Who recorded the decision when philadelphia was away? | SELECT "Decision" FROM table_6097 WHERE "Visitor" = 'philadelphia' | wikisql |
CREATE TABLE table_name_13 (
Local VARCHAR,
local_position VARCHAR,
mission VARCHAR
) | What is the local mission that has ambassador as the local position, and a mission of suriname? | SELECT Local AS mission FROM table_name_13 WHERE local_position = "ambassador" AND mission = "suriname" | sql_create_context |
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,
... | has there been any organism found during the last nasopharynx microbiology test of patient 031-4987 in 11/last year? | SELECT COUNT(*) > 0 FROM microlab WHERE microlab.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '031-4987')) AND microlab.culturesite = 'nasopharynx' AND DATETIME(microlab.cul... | eicu |
CREATE TABLE table_name_25 (
japanese_voice_actor VARCHAR,
eagle_riders VARCHAR
) | Who is the Japanese voice actor of Eagle Rider Ollie Keeawani? | SELECT japanese_voice_actor FROM table_name_25 WHERE eagle_riders = "ollie keeawani" | sql_create_context |
CREATE TABLE microbiologyevents (
row_id number,
subject_id number,
hadm_id number,
charttime time,
spec_type_desc text,
org_name text
)
CREATE TABLE d_icd_procedures (
row_id number,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE d_labitems (
row_id numbe... | tell me the difference of patient 594's amount of po2 measured at 2105-05-20 04:34:00 compared to the value measured at 2105-05-15 19:03:00? | SELECT (SELECT labevents.valuenum FROM labevents WHERE labevents.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 594) AND labevents.itemid IN (SELECT d_labitems.itemid FROM d_labitems WHERE d_labitems.label = 'po2') AND labevents.charttime = '2105-05-20 04:34:00') - (SELECT labevents... | mimic_iii |
CREATE TABLE Apartment_Facilities (
apt_id VARCHAR,
facility_code VARCHAR
)
CREATE TABLE Apartments (
room_count INTEGER,
apt_id VARCHAR
) | Show the total number of rooms of all apartments with facility code 'Gym'. | SELECT SUM(T2.room_count) FROM Apartment_Facilities AS T1 JOIN Apartments AS T2 ON T1.apt_id = T2.apt_id WHERE T1.facility_code = "Gym" | sql_create_context |
CREATE TABLE table_23999 (
"Name" text,
"Completions" real,
"Attempts" real,
"Completion %" text,
"Yards" real,
"Touchdowns" real,
"Interceptions" real,
"QB Rating" text
) | How many touchdowns were there with QB rating of 66.6? | SELECT "Touchdowns" FROM table_23999 WHERE "QB Rating" = '66.6' | wikisql |
CREATE TABLE table_77716 (
"Player" text,
"Position" text,
"Date of Birth (Age)" text,
"Caps" real,
"Club/province" text
) | Which player has a Position of fly-half, and a Caps of 3? | SELECT "Player" FROM table_77716 WHERE "Position" = 'fly-half' AND "Caps" = '3' | wikisql |
CREATE TABLE table_55813 (
"Locomotive" text,
"Serial No" text,
"Entered service" text,
"Gauge" text,
"Livery" text
) | What is the livery on the locomotive with a serial number 83-1011? | SELECT "Livery" FROM table_55813 WHERE "Serial No" = '83-1011' | 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 prescriptions (
subject_id text,
hadm_id... | what is subject name and discharge location of subject id 2560? | SELECT demographic.name, demographic.discharge_location FROM demographic WHERE demographic.subject_id = "2560" | mimicsql_data |
CREATE TABLE table_59633 (
"Round" text,
"Date" text,
"Event" text,
"Circuit" text,
"Winning Driver" text,
"Winning Team" text
) | Who was the winning team on July 13? | SELECT "Winning Team" FROM table_59633 WHERE "Date" = 'july 13' | wikisql |
CREATE TABLE t_kc22 (
AMOUNT number,
CHA_ITEM_LEV number,
DATA_ID text,
DIRE_TYPE number,
DOSE_FORM text,
DOSE_UNIT text,
EACH_DOSAGE text,
EXP_OCC_DATE time,
FLX_MED_ORG_ID text,
FXBZ number,
HOSP_DOC_CD text,
HOSP_DOC_NM text,
MED_CLINIC_ID text,
MED_DIRE_CD tex... | 郑英武在看病的时候开的药都不少于2518.38元有几次,医疗记录上的就诊编号是多少? | SELECT gwyjzb.MED_CLINIC_ID FROM gwyjzb WHERE gwyjzb.PERSON_NM = '郑英武' AND NOT gwyjzb.MED_CLINIC_ID IN (SELECT t_kc22.MED_CLINIC_ID FROM t_kc22 WHERE t_kc22.AMOUNT < 2518.38) UNION SELECT fgwyjzb.MED_CLINIC_ID FROM fgwyjzb WHERE fgwyjzb.PERSON_NM = '郑英武' AND NOT fgwyjzb.MED_CLINIC_ID IN (SELECT t_kc22.MED_CLINIC_ID FRO... | css |
CREATE TABLE table_29031 (
"No. in series" real,
"Title" text,
"Directed by" text,
"Written by" text,
"Original air date" text,
"Production code" text,
"U.S. viewers (millions)" text
) | What is the production code for the number 5 series ? | SELECT "Production code" FROM table_29031 WHERE "No. in series" = '5' | wikisql |
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... | 列出在2007-12-26到2017-05-25期间,患者华歌韵所有检验结果指标记录的检测人为尤弘业的检验指标流水号是多少? | SELECT jyjgzbb.JYZBLSH 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 = ... | css |
CREATE TABLE table_name_58 (
lost INTEGER,
points VARCHAR,
played VARCHAR
) | What is the highest number of losses with 23 points and 22 plays? | SELECT MAX(lost) FROM table_name_58 WHERE points = 23 AND played > 22 | sql_create_context |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.