context stringlengths 11 9.12k | question stringlengths 0 1.06k | SQL stringlengths 2 4.44k | source stringclasses 28
values |
|---|---|---|---|
CREATE TABLE Reservations (
Code INTEGER,
Room TEXT,
CheckIn TEXT,
CheckOut TEXT,
Rate REAL,
LastName TEXT,
FirstName TEXT,
Adults INTEGER,
Kids INTEGER
)
CREATE TABLE Rooms (
RoomId TEXT,
roomName TEXT,
beds INTEGER,
bedType TEXT,
maxOccupancy INTEGER,
baseP... | Visualize a bar chart for how many rooms cost more than 120, for each different decor?, and list by the names in ascending. | SELECT decor, COUNT(*) FROM Rooms WHERE basePrice > 120 GROUP BY decor ORDER BY decor | nvbench |
CREATE TABLE table_4687 (
"Home team" text,
"Home team score" text,
"Away team" text,
"Away team score" text,
"Venue" text,
"Crowd" real,
"Date" text
) | What is the highest attendance when the home team scores 10.12 (72)? | SELECT MAX("Crowd") FROM table_4687 WHERE "Home team score" = '10.12 (72)' | 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 procedure short title of subject name thomas nazario? | SELECT procedures.short_title FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.name = "Thomas Nazario" | mimicsql_data |
CREATE TABLE COURSES (
Id VARCHAR
) | How many courses are there in total? | SELECT COUNT(*) FROM COURSES | sql_create_context |
CREATE TABLE table_204_476 (
id number,
"name" text,
"date built" number,
"builder" text,
"works no." number,
"wheels" text,
"cylinders" text,
"notes" text,
"withdrawn" number
) | were there more with inside or outside cylinders ? | SELECT "cylinders" FROM table_204_476 WHERE "cylinders" IN ('inside', 'outside') GROUP BY "cylinders" ORDER BY COUNT(*) DESC LIMIT 1 | squall |
CREATE TABLE chartevents (
row_id number,
subject_id number,
hadm_id number,
icustay_id number,
itemid number,
charttime time,
valuenum number,
valueuom text
)
CREATE TABLE d_items (
row_id number,
itemid number,
label text,
linksto text
)
CREATE TABLE procedures_icd (
... | tell me the price of a procedure called endoscop dilate pylorus? | SELECT DISTINCT cost.cost FROM cost WHERE cost.event_type = 'procedures_icd' AND cost.event_id IN (SELECT procedures_icd.row_id FROM procedures_icd WHERE procedures_icd.icd9_code = (SELECT d_icd_procedures.icd9_code FROM d_icd_procedures WHERE d_icd_procedures.short_title = 'endoscop dilate pylorus')) | mimic_iii |
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.SOC_SRT_DIRE_CD, t_kc22.SOC_SRT_DIRE_NM FROM t_kc22 WHERE t_kc22.t_kc21_PERSON_NM = '陶乐贤' AND t_kc22.MED_INV_ITEM_TYPE = '检查费' | 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... | 查一下37519458这个病人的就诊记录中,有哪几次医疗记录中被开出过3819.76元以上的药品?列出医疗就诊编号 | SELECT t_kc21.MED_CLINIC_ID FROM t_kc21 WHERE t_kc21.PERSON_ID = '37519458' AND t_kc21.MED_CLINIC_ID IN (SELECT t_kc21_t_kc22.MED_CLINIC_ID FROM t_kc22 WHERE t_kc22.AMOUNT > 3819.76) | css |
CREATE TABLE table_40308 (
"Date" text,
"Result" text,
"Opponent" text,
"Location" text,
"Method" text,
"Round" real,
"Record" text
) | Which highest Round has a Result of loss? | SELECT MAX("Round") FROM table_40308 WHERE "Result" = 'loss' | wikisql |
CREATE TABLE table_72616 (
"Week" real,
"Date" text,
"Opponent" text,
"Result" text,
"Record" text,
"Game Site" text,
"Attendance" real
) | When it is October 18, 1981 where is the game site? | SELECT "Game Site" FROM table_72616 WHERE "Date" = 'October 18, 1981' | wikisql |
CREATE TABLE Customer_Policies (
Policy_ID INTEGER,
Customer_ID INTEGER,
Policy_Type_Code CHAR(15),
Start_Date DATE,
End_Date DATE
)
CREATE TABLE Claims (
Claim_ID INTEGER,
Policy_ID INTEGER,
Date_Claim_Made DATE,
Date_Claim_Settled DATE,
Amount_Claimed INTEGER,
Amount_Settl... | Please use a bar chart to show the average amount of payment by each payment method code, rank x-axis from low to high order. | SELECT Payment_Method_Code, AVG(Amount_Payment) FROM Payments GROUP BY Payment_Method_Code ORDER BY Payment_Method_Code | nvbench |
CREATE TABLE table_72178 (
"District" text,
"Vacator" text,
"Reason for change" text,
"Successor" text,
"Date successor seated" text
) | What was the district when the reason for change was died January 1, 1974? | SELECT "District" FROM table_72178 WHERE "Reason for change" = 'Died January 1, 1974' | wikisql |
CREATE TABLE patients (
row_id number,
subject_id number,
gender text,
dob time,
dod time
)
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,... | what is the total minimum cost of a hospital that includes a drug called d5lr during the last year? | SELECT MIN(t1.c1) FROM (SELECT SUM(cost.cost) AS c1 FROM cost WHERE cost.hadm_id IN (SELECT prescriptions.hadm_id FROM prescriptions WHERE prescriptions.drug = 'd5lr') AND DATETIME(cost.chargetime, 'start of year') = DATETIME(CURRENT_TIME(), 'start of year', '-1 year') GROUP BY cost.hadm_id) AS t1 | mimic_iii |
CREATE TABLE table_70089 (
"Project" text,
"Year" text,
"Location" text,
"Capacity" real,
"Suites" text,
"Architect" text,
"Cost" text
) | What is the average capacity for 150 suites? | SELECT AVG("Capacity") FROM table_70089 WHERE "Suites" = '150' | wikisql |
CREATE TABLE table_name_88 (
mintage VARCHAR,
weight VARCHAR,
theme VARCHAR
) | What is the Mintage of the 12.61 g Weight Ruby-Throated Hummingbird? | SELECT COUNT(mintage) FROM table_name_88 WHERE weight = "12.61 g" AND theme = "ruby-throated hummingbird" | sql_create_context |
CREATE TABLE table_26631 (
"Name" text,
"Deceased Spouse" text,
"Cause of Death" text,
"Date of Spouses Death" text,
"Length of Marriage" text,
"Children Together" text,
"Current Marital Status" text
) | Name the decease spouse for carol deluise | SELECT "Deceased Spouse" FROM table_26631 WHERE "Name" = 'Carol DeLuise' | wikisql |
CREATE TABLE jobs (
JOB_ID varchar(10),
JOB_TITLE varchar(35),
MIN_SALARY decimal(6,0),
MAX_SALARY decimal(6,0)
)
CREATE TABLE locations (
LOCATION_ID decimal(4,0),
STREET_ADDRESS varchar(40),
POSTAL_CODE varchar(12),
CITY varchar(30),
STATE_PROVINCE varchar(25),
COUNTRY_ID varc... | List department id and their salaries with a scatter plot. | SELECT T1.SALARY, T1.DEPARTMENT_ID FROM employees AS T1 JOIN departments AS T2 ON T1.DEPARTMENT_ID = T2.DEPARTMENT_ID WHERE T1.EMPLOYEE_ID = T2.MANAGER_ID | nvbench |
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... | tell me the name of an output that patient 017-45919 has last had today? | SELECT intakeoutput.celllabel FROM intakeoutput WHERE intakeoutput.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '017-45919')) AND intakeoutput.cellpath LIKE '%output%' AND D... | eicu |
CREATE TABLE table_53053 (
"Date" text,
"Visitor" text,
"Score" text,
"Home" text,
"Decision" text,
"Attendance" real,
"Series" text
) | What was the series score on april 17 with minnesota at home? | SELECT "Series" FROM table_53053 WHERE "Home" = 'minnesota' AND "Date" = 'april 17' | wikisql |
CREATE TABLE ReviewTasks (
Id number,
ReviewTaskTypeId number,
CreationDate time,
DeletionDate time,
ReviewTaskStateId number,
PostId number,
SuggestedEditId number,
CompletedByReviewTaskId number
)
CREATE TABLE VoteTypes (
Id number,
Name text
)
CREATE TABLE PostLinks (
Id... | iOS Developers ('About me' contains '%iOS%'). | SELECT Id, DisplayName, Reputation, Location, WebsiteUrl, REPLACE(REPLACE(AboutMe, CHAR(13), ''), CHAR(10), '') AS AboutMe FROM Users WHERE AboutMe LIKE '%iOS%' ORDER BY Reputation DESC | sede |
CREATE TABLE t_kc24 (
MED_SAFE_PAY_ID text,
OVERALL_CD_ORG text,
OVERALL_CD_PERSON text,
MED_CLINIC_ID text,
REF_SLT_FLG number,
CLINIC_SLT_DATE time,
COMP_ID text,
PERSON_ID text,
FLX_MED_ORG_ID text,
INSU_TYPE text,
MED_AMOUT number,
PER_ACC_PAY number,
OVE_PAY numb... | 在医院9935119中从2004年7月29号到2012年6月20号这段日子里入院诊断的疾病与出院诊断的疾病有多少次不同结果? | SELECT (SELECT COUNT(*) FROM t_kc21 WHERE MED_SER_ORG_NO = '9935119' AND IN_HOSP_DATE BETWEEN '2004-07-29' AND '2012-06-20') - (SELECT COUNT(*) FROM t_kc21 WHERE MED_SER_ORG_NO = '9935119' AND IN_HOSP_DATE BETWEEN '2004-07-29' AND '2012-06-20' AND IN_DIAG_DIS_CD = OUT_DIAG_DIS_CD) | css |
CREATE TABLE table_60510 (
"Position" real,
"Team" text,
"Played" real,
"Drawn" real,
"Lost" real,
"Goals For" real,
"Goals Against" real,
"Goal Difference" text,
"Points 1" text
) | What is the total number of Lost, when Played is less than 34? | SELECT COUNT("Lost") FROM table_60510 WHERE "Played" < '34' | wikisql |
CREATE TABLE table_name_54 (
trainer VARCHAR,
time VARCHAR,
jockey VARCHAR
) | What Trainer had Jockey William Jenkins in a race with Time of 1:44.80? | SELECT trainer FROM table_name_54 WHERE time = "1:44.80" AND jockey = "william jenkins" | sql_create_context |
CREATE TABLE table_name_25 (
year_born VARCHAR,
position VARCHAR,
current_club VARCHAR
) | What year was the Guard who currently plays for the Memphis Grizzlies born? | SELECT year_born FROM table_name_25 WHERE position = "guard" AND current_club = "memphis grizzlies" | sql_create_context |
CREATE TABLE table_8869 (
"Name" text,
"Nationality" text,
"Position" text,
"Crewe Alexandra career" text,
"Appearances" real,
"Goals" real
) | What is the number of goals when the position is DF, the nationality is England, and the Crewe Alexandra career is 1948 1951? | SELECT COUNT("Goals") FROM table_8869 WHERE "Position" = 'df' AND "Nationality" = 'england' AND "Crewe Alexandra career" = '1948–1951' | wikisql |
CREATE TABLE table_67893 (
"Rank" text,
"Nation" text,
"Gold" real,
"Silver" real,
"Bronze" real,
"Total" real
) | What average Total has a Rank of 3 and a Bronze award larger than 3? | SELECT AVG("Total") FROM table_67893 WHERE "Rank" = '3' AND "Bronze" > '3' | 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... | 医疗机构6235721非本地的病人有多少 | SELECT COUNT(qtb.PERSON_ID) FROM qtb WHERE qtb.MED_SER_ORG_NO = '6235721' AND qtb.REMOTE_SETTLE_FLG = '异地1' OR qtb.REMOTE_SETTLE_FLG = '异地2' UNION SELECT COUNT(gyb.PERSON_ID) FROM gyb WHERE gyb.MED_SER_ORG_NO = '6235721' AND gyb.REMOTE_SETTLE_FLG = '异地1' OR gyb.REMOTE_SETTLE_FLG = '异地2' UNION SELECT COUNT(zyb.PERSON_ID... | css |
CREATE TABLE table_39605 (
"Year" real,
"Championship" text,
"54 Holes" text,
"Winning Score" text,
"Margin" text,
"Runner(s)-up" text
) | Which championship has a 5 shot lead for 54 holes? | SELECT "Championship" FROM table_39605 WHERE "54 Holes" = '5 shot lead' | wikisql |
CREATE TABLE table_38199 (
"Round # (Overall)" text,
"NFL Team" text,
"Player" text,
"Position" text,
"College" text
) | WHich team draft the player who went to college in Washington? | SELECT "NFL Team" FROM table_38199 WHERE "College" = 'washington' | wikisql |
CREATE TABLE table_name_4 (
record VARCHAR,
home VARCHAR,
date VARCHAR
) | What is Record, when Home is 'New York Rangers', and when Date is 'April 17'? | SELECT record FROM table_name_4 WHERE home = "new york rangers" AND date = "april 17" | sql_create_context |
CREATE TABLE table_19503 (
"Week" real,
"Opponent" text,
"Result" text,
"Stadium" text,
"Record" text,
"Attendance" real
) | Find the least value of attendance? | SELECT MIN("Attendance") FROM table_19503 | 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,
... | how many times was patient 031-3507 on mechanical ventilation - tidal volume 6-10 ml/kg in 2103? | SELECT COUNT(*) FROM treatment WHERE treatment.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '031-3507')) AND treatment.treatmentname = 'mechanical ventilation - tidal volume... | eicu |
CREATE TABLE medication (
medicationid number,
patientunitstayid number,
drugname text,
dosage text,
routeadmin text,
drugstarttime time,
drugstoptime time
)
CREATE TABLE patient (
uniquepid text,
patienthealthsystemstayid number,
patientunitstayid number,
gender text,
a... | what is the number of patients who had a implantation of heart pacemaker - temporary procedure since 6 years ago? | SELECT COUNT(DISTINCT patient.uniquepid) FROM patient WHERE patient.patientunitstayid IN (SELECT treatment.patientunitstayid FROM treatment WHERE treatment.treatmentname = 'implantation of heart pacemaker - temporary' AND DATETIME(treatment.treatmenttime) >= DATETIME(CURRENT_TIME(), '-6 year')) | eicu |
CREATE TABLE employees (
EMPLOYEE_ID decimal(6,0),
FIRST_NAME varchar(20),
LAST_NAME varchar(25),
EMAIL varchar(25),
PHONE_NUMBER varchar(20),
HIRE_DATE date,
JOB_ID varchar(10),
SALARY decimal(8,2),
COMMISSION_PCT decimal(2,2),
MANAGER_ID decimal(6,0),
DEPARTMENT_ID decimal(... | For those employees who do not work in departments with managers that have ids between 100 and 200, return a bar chart about the distribution of hire_date and the average of department_id bin hire_date by weekday. | SELECT HIRE_DATE, AVG(DEPARTMENT_ID) FROM employees WHERE NOT DEPARTMENT_ID IN (SELECT DEPARTMENT_ID FROM departments WHERE MANAGER_ID BETWEEN 100 AND 200) | nvbench |
CREATE TABLE table_25362 (
"R" real,
"Player" text,
"Scottish Premier League" real,
"Scottish Cup" real,
"Scottish League Cup" real,
"Champions League (qualifying)" real,
"Europa League" real,
"Total" real
) | Name the max total for aiden mcgeady | SELECT MAX("Total") FROM table_25362 WHERE "Player" = 'Aiden McGeady' | 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,
... | 哪些工号及姓名的医务人员在患者沈云梦就诊过程中为他检测地高辛的,时间是从0二年二月六日到0四年五月十二日 | SELECT jyjgzbb.JCRGH, jyjgzbb.JCRXM 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 jy... | css |
CREATE TABLE gwyjzb (
CLINIC_ID text,
CLINIC_TYPE text,
COMP_ID text,
DATA_ID text,
DIFF_PLACE_FLG number,
FERTILITY_STS number,
FLX_MED_ORG_ID text,
HOSP_LEV number,
HOSP_STS number,
IDENTITY_CARD text,
INPT_AREA_BED text,
INSURED_IDENTITY number,
INSURED_STS text,
... | 编码为48885255的病患不少于7137.7元的药物在哪几次医疗记录中被开出?列出医疗就诊号码都是什么? | SELECT gwyjzb.MED_CLINIC_ID FROM gwyjzb WHERE gwyjzb.PERSON_ID = '48885255' AND NOT gwyjzb.MED_CLINIC_ID IN (SELECT t_kc22.MED_CLINIC_ID FROM t_kc22 WHERE t_kc22.AMOUNT < 7137.7) UNION SELECT fgwyjzb.MED_CLINIC_ID FROM fgwyjzb WHERE fgwyjzb.PERSON_ID = '48885255' AND NOT fgwyjzb.MED_CLINIC_ID IN (SELECT t_kc22.MED_CLIN... | css |
CREATE TABLE table_19001916_2 (
entities VARCHAR,
supply_point VARCHAR
) | What are the electric companies drawing power from Itaipu? | SELECT entities FROM table_19001916_2 WHERE supply_point = "Itaipu" | sql_create_context |
CREATE TABLE table_32946 (
"Home team" text,
"Home team score" text,
"Away team" text,
"Away team score" text,
"Venue" text,
"Crowd" real,
"Date" text
) | Which home team has an Away team of fitzroy? | SELECT "Home team" FROM table_32946 WHERE "Away team" = 'fitzroy' | 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... | how many patients whose primary disease is upper gi bleed and year of birth is less than 2112? | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.diagnosis = "UPPER GI BLEED" AND demographic.dob_year < "2112" | mimicsql_data |
CREATE TABLE Block (
BlockFloor INTEGER,
BlockCode INTEGER
)
CREATE TABLE Undergoes (
Patient INTEGER,
Procedures INTEGER,
Stay INTEGER,
DateUndergoes DATETIME,
Physician INTEGER,
AssistingNurse INTEGER
)
CREATE TABLE Physician (
EmployeeID INTEGER,
Name VARCHAR(30),
Positi... | List the number of the name of physicians who took some appointment, and display by the X-axis from low to high please. | SELECT Name, COUNT(Name) FROM Appointment AS T1 JOIN Physician AS T2 ON T1.Physician = T2.EmployeeID GROUP BY Name ORDER BY Name | nvbench |
CREATE TABLE table_43981 (
"Nat." text,
"Name" text,
"Moving to" text,
"Type" text,
"Transfer window" text,
"Transfer fee" text
) | What is the transfer window for Christian Nerlinger? | SELECT "Transfer window" FROM table_43981 WHERE "Name" = 'christian nerlinger' | 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... | count the number of patients who had other percutaneous procedures on biliary tract and were hospitalized for more than 5 days. | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.days_stay > "5" AND procedures.long_title = "Other percutaneous procedures on biliary tract" | mimicsql_data |
CREATE TABLE table_name_94 (
us_cham_rank INTEGER,
next_highest_spender VARCHAR,
year VARCHAR
) | Which US Cham Rank is the lowest one that has a Next Highest Spender of national assn of realtors, and a Year smaller than 2012? | SELECT MIN(us_cham_rank) FROM table_name_94 WHERE next_highest_spender = "national assn of realtors" AND year < 2012 | sql_create_context |
CREATE TABLE table_14256 (
"Model number" text,
"sSpec number" text,
"Cores" real,
"Frequency" text,
"Turbo" text,
"L2 cache" text,
"L3 cache" text,
"GPU model" text,
"GPU frequency" text,
"Socket" text,
"I/O bus" text,
"Release date" text,
"Part number(s)" text,
... | what is the gpu frequency when the part number is cw8064701470702? | SELECT "GPU frequency" FROM table_14256 WHERE "Part number(s)" = 'cw8064701470702' | wikisql |
CREATE TABLE hz_info (
KH text,
KLX number,
RYBH text,
YLJGDM text
)
CREATE TABLE person_info (
CSD text,
CSRQ time,
GJDM text,
GJMC text,
JGDM text,
JGMC text,
MZDM text,
MZMC text,
RYBH text,
XBDM number,
XBMC text,
XLDM text,
XLMC text,
XM text... | 患者苏晓莉检验下肢的各项指标结果如何? | SELECT * FROM person_info JOIN hz_info JOIN mzjzjlb 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 = jyjgzbb.jybgb_YLJGDM_MZJZJLB AND mzjzjlb.JZLSH = jyjgzbb.jybgb_JZLSH_MZJZJLB WHERE person_info.XM = '苏晓莉'... | 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... | 号码是40176918的病人在2002年8月23日到2002年12月5日期间所使用的药品其编码、名称、数量、单价、金额都是什么? | SELECT t_kc22.SOC_SRT_DIRE_CD, t_kc22.SOC_SRT_DIRE_NM, t_kc22.QTY, t_kc22.UNIVALENT, t_kc22.AMOUNT FROM t_kc22 WHERE t_kc22.t_kc21_PERSON_ID = '40176918' AND t_kc22.t_kc21_IN_HOSP_DATE BETWEEN '2002-08-23' AND '2002-12-05' | css |
CREATE TABLE table_27734577_13 (
team VARCHAR,
high_assists VARCHAR
) | What team was the opponent when josh smith (8) had the high assists? | SELECT team FROM table_27734577_13 WHERE high_assists = "Josh Smith (8)" | sql_create_context |
CREATE TABLE employees (
EMPLOYEE_ID decimal(6,0),
FIRST_NAME varchar(20),
LAST_NAME varchar(25),
EMAIL varchar(25),
PHONE_NUMBER varchar(20),
HIRE_DATE date,
JOB_ID varchar(10),
SALARY decimal(8,2),
COMMISSION_PCT decimal(2,2),
MANAGER_ID decimal(6,0),
DEPARTMENT_ID decimal(... | 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, visualize a scatter chart about the correlation between employee_id and department_id . | SELECT EMPLOYEE_ID, DEPARTMENT_ID FROM employees WHERE SALARY BETWEEN 8000 AND 12000 AND COMMISSION_PCT <> "null" OR DEPARTMENT_ID <> 40 | nvbench |
CREATE TABLE table_73787 (
"Series #" real,
"Title" text,
"Directed by" text,
"Written by" text,
"Original air date" text,
"Viewers (in millions)" text
) | What is the original air date of 'Powerless'? | SELECT "Original air date" FROM table_73787 WHERE "Title" = 'Powerless' | wikisql |
CREATE TABLE table_name_5 (
title VARCHAR,
time VARCHAR
) | What title runs for 3:22? | SELECT title FROM table_name_5 WHERE time = "3:22" | sql_create_context |
CREATE TABLE appellations (
No INTEGER,
Appelation TEXT,
County TEXT,
State TEXT,
Area TEXT,
isAVA TEXT
)
CREATE TABLE grapes (
ID INTEGER,
Grape TEXT,
Color TEXT
)
CREATE TABLE wine (
No INTEGER,
Grape TEXT,
Winery TEXT,
Appelation TEXT,
State TEXT,
Name TE... | Compare the average of maximum price of wines each year, bin the year into the weekday interval and draw a bar chart, could you list from low to high by the Y-axis? | SELECT Year, AVG(MAX(Price)) FROM wine ORDER BY AVG(MAX(Price)) | nvbench |
CREATE TABLE ground_service (
city_code text,
airport_code text,
transport_type text,
ground_fare int
)
CREATE TABLE code_description (
code varchar,
description text
)
CREATE TABLE food_service (
meal_code text,
meal_number int,
compartment text,
meal_description varchar
)
CR... | show me all flights out of BOSTON on 6 20 that have BUSINESS class | SELECT DISTINCT flight.flight_id FROM airport_service, city, date_day, days, fare, fare_basis, flight, flight_fare WHERE (date_day.day_number = 20 AND date_day.month_number = 6 AND date_day.year = 1991 AND days.day_name = date_day.day_name AND fare_basis.class_type = 'BUSINESS' AND fare.fare_basis_code = fare_basis.far... | atis |
CREATE TABLE table_203_513 (
id number,
"no." number,
"date" text,
"home team" text,
"visiting team" text,
"goals" text,
"score" text,
"result" text,
"venue" text,
"competition" text
) | how many times was helsinki olympic stadium the venue ? | SELECT COUNT(DISTINCT "date") FROM table_203_513 WHERE "venue" = 'helsinki olympic stadium' | squall |
CREATE TABLE table_name_66 (
power VARCHAR,
name VARCHAR
) | What is the power of 1.9 diesel? | SELECT power FROM table_name_66 WHERE name = "1.9 diesel" | sql_create_context |
CREATE TABLE zyjzjlb (
CYBQDM text,
CYBQMC text,
CYCWH text,
CYKSDM text,
CYKSMC text,
CYSJ time,
CYZTDM number,
HZXM text,
JZKSDM text,
JZKSMC text,
JZLSH text,
KH text,
KLX number,
MZBMLX number,
MZJZLSH text,
MZZDBM text,
MZZDMC text,
MZZYZDZZBM... | 在04年8月25日到2016年7月12日内病患彭天瑞曾在医院就诊的次数有几次? | SELECT (SELECT COUNT(*) FROM person_info JOIN hz_info JOIN zzmzjzjlb ON person_info.RYBH = hz_info.RYBH AND hz_info.YLJGDM = zzmzjzjlb.YLJGDM AND hz_info.KH = zzmzjzjlb.KH AND hz_info.KLX = zzmzjzjlb.KLX WHERE person_info.XM = '彭天瑞' AND zzmzjzjlb.JZKSRQ BETWEEN '2004-08-25' AND '2016-07-12' UNION SELECT COUNT(*) FROM p... | css |
CREATE TABLE table_48143 (
"Season" text,
"GP\u2013GS" text,
"Comp\u2013Att" text,
"Pct." text,
"Yards" text,
"Long" text,
"Avg/G" text
) | What is the number of completions and attempts taken in 2009? | SELECT "Comp\u2013Att" FROM table_48143 WHERE "Season" = '2009' | wikisql |
CREATE TABLE table_1859269_1 (
round VARCHAR,
new_entries_this_round VARCHAR
) | If new entries this round is 65, what is the round? | SELECT COUNT(round) FROM table_1859269_1 WHERE new_entries_this_round = "65" | sql_create_context |
CREATE TABLE table_24549 (
"District" text,
"Headquarters" text,
"Area (km\u00b2)" real,
"Population (2011)" real,
"Division" text
) | If the district is Chittorgarh, what is the area? | SELECT "Area (km\u00b2)" FROM table_24549 WHERE "District" = 'Chittorgarh' | wikisql |
CREATE TABLE table_16652 (
"Season" text,
"Group A Winner" text,
"Group B Winner" text,
"Group C Winner" text,
"Group D Winner" text
) | What is the number of group b winner for francavilla? | SELECT COUNT("Group B Winner") FROM table_16652 WHERE "Group C Winner" = 'Francavilla' | wikisql |
CREATE TABLE bdmzjzjlb (
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... | 那些被门诊诊断为持久的妄想性障碍的人他们的补体C4的检查结果的参考值范围下限和上限具体是多少呢? | SELECT jyjgzbb.CKZFWXX, jyjgzbb.CKZFWSX FROM wdmzjzjlb JOIN jybgb JOIN jyjgzbb ON wdmzjzjlb.YLJGDM = jybgb.YLJGDM_MZJZJLB AND wdmzjzjlb.JZLSH = jybgb.JZLSH_MZJZJLB AND jybgb.YLJGDM = jyjgzbb.YLJGDM AND jybgb.BGDH = jyjgzbb.BGDH WHERE wdmzjzjlb.JZZDSM = '持久的妄想性障碍' AND jyjgzbb.JCZBMC = '补体C4' UNION SELECT jyjgzbb.CKZFWXX... | css |
CREATE TABLE table_21691 (
"Athlete" text,
"Event" text,
"Round of 32" text,
"Round of 16" text,
"Quarterfinals" text,
"Semifinals" text
) | How did Hamza Kramou fare in the semifinals? | SELECT "Semifinals" FROM table_21691 WHERE "Athlete" = 'Hamza Kramou' | wikisql |
CREATE TABLE table_74800 (
"Home team" text,
"Home team score" text,
"Away team" text,
"Away team score" text,
"Venue" text,
"Crowd" real,
"Date" text
) | Which match where Hawthorn was the away team had the largest crowd? | SELECT MAX("Crowd") FROM table_74800 WHERE "Away team" = 'hawthorn' | wikisql |
CREATE TABLE procedures (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE lab (
subject_id text,
hadm_id text,
itemid text,
charttime text,
flag text,
value_unit text,
label text,
fluid text
)
CREATE TABLE diagnoses (
... | calculate the total number of patients who had endosc remove bile stone | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE procedures.short_title = "Endosc remove bile stone" | mimicsql_data |
CREATE TABLE table_204_646 (
id number,
"location" text,
"region" text,
"coordinates\n(links to map & photo sources)" text,
"population" number,
"elevation" number
) | what is the total number of regions ? | SELECT COUNT("region") FROM table_204_646 | squall |
CREATE TABLE table_203_839 (
id number,
"station" text,
"type" text,
"latitude" text,
"longitude" text,
"el. (m)" number,
"opened" number,
"closed" number,
"coordinates" text
) | elevation difference in mount montezuma , chile and mount brukkaros , namibia | SELECT (SELECT "el. (m)" FROM table_203_839 WHERE "station" = 'mount montezuma, chile') - (SELECT "el. (m)" FROM table_203_839 WHERE "station" = 'mount brukkaros, namibia') | squall |
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 lab (
subject_id text,
hadm_id text,
... | tell me the route of administration and name of drug with pheny100l drug code. | SELECT prescriptions.drug, prescriptions.route FROM prescriptions WHERE prescriptions.formulary_drug_cd = "PHENY100L" | mimicsql_data |
CREATE TABLE vitalperiodic (
vitalperiodicid number,
patientunitstayid number,
temperature number,
sao2 number,
heartrate number,
respiration number,
systemicsystolic number,
systemicdiastolic number,
systemicmean number,
observationtime time
)
CREATE TABLE treatment (
treat... | how much does it cost for a diagnosis of vascular insufficiency of intestine - due to arterial embolus? | SELECT DISTINCT cost.cost FROM cost WHERE cost.eventtype = 'diagnosis' AND cost.eventid IN (SELECT diagnosis.diagnosisid FROM diagnosis WHERE diagnosis.diagnosisname = 'vascular insufficiency of intestine - due to arterial embolus') | eicu |
CREATE TABLE artwork (
Name VARCHAR
) | List the name of artworks in ascending alphabetical order. | SELECT Name FROM artwork ORDER BY Name | sql_create_context |
CREATE TABLE table_17702 (
"Rank in Nyagatare Sectors, 2012" real,
"Sector" text,
"Area in sqkm" real,
"Population August 15, 2012" real,
"Population, August 15, 2002" real,
"Population Change 2002-2012 (%)" text,
"Population Density 2012 (km 2 )" real
) | What is the population density for 2012 for Gatunda sector? | SELECT MIN("Population Density 2012 (km 2 )") FROM table_17702 WHERE "Sector" = 'Gatunda' | wikisql |
CREATE TABLE table_3341 (
"Settlement" text,
"Cyrillic Name" text,
"Type" text,
"Population (2011)" real,
"Largest ethnic group (2002)" text,
"Dominant religion (2002)" text
) | how many times is the cyrillic name ? | SELECT COUNT("Dominant religion (2002)") FROM table_3341 WHERE "Cyrillic Name" = 'Сибач' | wikisql |
CREATE TABLE table_name_4 (
goal_difference INTEGER,
goals_against VARCHAR,
losses VARCHAR
) | What is the average goal difference with 51 goals scored against and less than 17 losses? | SELECT AVG(goal_difference) FROM table_name_4 WHERE goals_against = 51 AND losses < 17 | sql_create_context |
CREATE TABLE table_name_97 (
lomavren VARCHAR,
hindi VARCHAR
) | What Lomavren word has the same meaning as the Hindi word do? | SELECT lomavren FROM table_name_97 WHERE hindi = "do" | sql_create_context |
CREATE TABLE table_name_27 (
sport VARCHAR,
date VARCHAR
) | What sport was played on November 14, 2009? | SELECT sport FROM table_name_27 WHERE date = "november 14, 2009" | sql_create_context |
CREATE TABLE table_17959 (
"Year" real,
"Points" text,
"Rebounds" text,
"Assists" text,
"Steals" text,
"Blocks" text
) | Who are the blockers where points are scored by Zach Randolph (24)? | SELECT "Blocks" FROM table_17959 WHERE "Points" = 'Zach Randolph (24)' | wikisql |
CREATE TABLE table_19730892_1 (
fa_cup_apps VARCHAR,
name VARCHAR
) | Name the fa cup apps for arthur morton | SELECT fa_cup_apps FROM table_19730892_1 WHERE name = "Arthur Morton" | sql_create_context |
CREATE TABLE table_name_66 (
competition VARCHAR,
res VARCHAR
) | WHAT COMPETITION HAS MARIAN SANDU? | SELECT competition FROM table_name_66 WHERE res = "marian sandu" | sql_create_context |
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... | 投保人号码74833853在10年1月28日到18年12月30日这段时间里门诊西药费总共花费多少钱? | SELECT SUM(t_kc22.AMOUNT) FROM t_kc22 JOIN mzb ON mzb.MED_ORG_DEPT_CD = t_kc22.MED_CLINIC_ID WHERE mzb.PERSON_NM = '74833853' AND t_kc22.STA_DATE BETWEEN '2010-01-28' AND '2018-12-30' AND t_kc22.MED_INV_ITEM_TYPE = '西药费' | css |
CREATE TABLE people (
People_ID int,
Age int,
Name text,
Nationality text,
Graduation_College text
)
CREATE TABLE employment (
Company_ID int,
People_ID int,
Year_working int
)
CREATE TABLE company (
Company_ID real,
Name text,
Headquarters text,
Industry text,
Sale... | What is the number of companies for each headquarter? Visualize by bar chart, show from low to high by the bar. | SELECT Headquarters, COUNT(Headquarters) FROM company GROUP BY Headquarters ORDER BY Headquarters | nvbench |
CREATE TABLE table_name_32 (
purse___us$__ VARCHAR,
race VARCHAR
) | What was the Illinois Derby purse? | SELECT purse___us$__ FROM table_name_32 WHERE race = "illinois derby" | sql_create_context |
CREATE TABLE table_name_85 (
origin_of_programming VARCHAR,
network VARCHAR
) | Which country has the banglavision Network? | SELECT origin_of_programming FROM table_name_85 WHERE network = "banglavision" | sql_create_context |
CREATE TABLE area (
course_id int,
area varchar
)
CREATE TABLE program_requirement (
program_id int,
category varchar,
min_credit int,
additional_req varchar
)
CREATE TABLE course_tags_count (
course_id int,
clear_grading int,
pop_quiz int,
group_projects int,
inspirational... | Show me any courses that cover parts of Contemporary Social Southeast Asia and Utilization of Nursing Advanced Practice . | SELECT DISTINCT course.department, course.name, course.number FROM course INNER JOIN area ON course.course_id = area.course_id WHERE (area.area LIKE '%Contemporary Social Southeast Asia%' OR course.description LIKE '%Contemporary Social Southeast Asia%' OR course.name LIKE '%Contemporary Social Southeast Asia%') AND (a... | advising |
CREATE TABLE PostTags (
PostId number,
TagId number
)
CREATE TABLE ReviewTaskStates (
Id number,
Name text,
Description text
)
CREATE TABLE Tags (
Id number,
TagName text,
Count number,
ExcerptPostId number,
WikiPostId number
)
CREATE TABLE SuggestedEdits (
Id number,
... | Edits the most non-owned posts, network-wide. | WITH Raw AS (SELECT DISTINCT Users.AccountId, PostHistory.PostId FROM PostHistory, Posts, Users WHERE PostHistory.PostId = Posts.Id AND PostHistoryTypeId IN (4, 5, 6) AND Posts.OwnerUserId != PostHistory.UserId AND PostHistory.UserId = Users.Id) SELECT AccountId, COUNT(*) AS N FROM Raw GROUP BY AccountId ORDER BY N DES... | sede |
CREATE TABLE table_63608 (
"Place" text,
"Player" text,
"Country" text,
"Score" text,
"To par" text,
"Money ( \u00a3 )" text
) | Which Score has a Money ( ) of 90,400, and a Country of south africa, and a Player of thomas aiken? Question 1 | SELECT "Score" FROM table_63608 WHERE "Money ( \u00a3 )" = '90,400' AND "Country" = 'south africa' AND "Player" = 'thomas aiken' | wikisql |
CREATE TABLE table_30121046_1 (
poor_law_union VARCHAR,
townland VARCHAR
) | What is the poor law union of the Lackenagobidane townland? | SELECT poor_law_union FROM table_30121046_1 WHERE townland = "Lackenagobidane" | sql_create_context |
CREATE TABLE table_67898 (
"Rank" real,
"Nation" text,
"Gold" real,
"Silver" real,
"Bronze" real,
"Total" real
) | What is the average gold that has a total of 2 and more than 1 bronze. | SELECT AVG("Gold") FROM table_67898 WHERE "Total" = '2' AND "Bronze" > '1' | wikisql |
CREATE TABLE table_5758 (
"Week" real,
"Date" text,
"Opponent" text,
"Result" text,
"Attendance" real
) | What Week had an Attendance smaller than 22,333? | SELECT COUNT("Week") FROM table_5758 WHERE "Attendance" < '22,333' | wikisql |
CREATE TABLE TRANSACTIONS (
transaction_id VARCHAR
)
CREATE TABLE Transactions_Lots (
lot_id VARCHAR,
transaction_id VARCHAR
) | Show the average amount of transactions for different lots, ordered by average amount of transactions. | SELECT T2.lot_id, AVG(amount_of_transaction) FROM TRANSACTIONS AS T1 JOIN Transactions_Lots AS T2 ON T1.transaction_id = T2.transaction_id GROUP BY T2.lot_id ORDER BY AVG(amount_of_transaction) | sql_create_context |
CREATE TABLE table_55205 (
"Year" real,
"Category" text,
"Character" text,
"For The Show" text,
"Result" text
) | What are the results for years after 2007? | SELECT "Result" FROM table_55205 WHERE "Year" > '2007' | wikisql |
CREATE TABLE table_19930660_3 (
episode VARCHAR,
rufus_guest VARCHAR
) | Which episodes have Chris Addison as Rufus's guest? | SELECT episode FROM table_19930660_3 WHERE rufus_guest = "Chris Addison" | sql_create_context |
CREATE TABLE table_49282 (
"Rank" text,
"Company" text,
"Headquarters" text,
"Industry" text,
"Sales (billion $)" real,
"Profits (billion $)" real,
"Assets (billion $)" real,
"Market Value (billion $)" real
) | What is Rank, when Headquarters is United Kingdom, and when Sales (billion $) is 370.9? | SELECT "Rank" FROM table_49282 WHERE "Headquarters" = 'united kingdom' AND "Sales (billion $)" = '370.9' | wikisql |
CREATE TABLE month (
month_number int,
month_name text
)
CREATE TABLE airport_service (
city_code varchar,
airport_code varchar,
miles_distant int,
direction varchar,
minutes_distant int
)
CREATE TABLE aircraft (
aircraft_code varchar,
aircraft_description varchar,
manufacturer... | what afternoon flights are available from DENVER to SAN FRANCISCO on WEDNESDAY | 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, days, flight WHERE ((CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'SAN FRANCISCO' AND days.day_name = 'WEDNESDAY' AND flight.flight_days = days.days_... | atis |
CREATE TABLE table_name_59 (
date VARCHAR,
record VARCHAR
) | What day is the team 17 24 5? | SELECT date FROM table_name_59 WHERE record = "17–24–5" | sql_create_context |
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 CloseAsOffTopicReasonTypes (
Id number,
... | All votes from one user. | SELECT Votes.Id, Votes.PostId, Votes.VoteTypeId, Votes.UserId, Votes.CreationDate, Posts.Title FROM Votes, Posts WHERE Votes.PostId = Posts.Id AND UserId = '##UserId##' ORDER BY CreationDate DESC | sede |
CREATE TABLE table_204_19 (
id number,
"university" text,
"winner" number,
"runner-up" number,
"years won" text,
"years runner-up" text
) | who won the last championship recorded on this table ? | SELECT "university" FROM table_204_19 ORDER BY "years won" DESC LIMIT 1 | squall |
CREATE TABLE table_27702 (
"Date of Issue" text,
"Theme" text,
"Denomination" text,
"Design" text,
"Illustration" text,
"Quantity" text,
"Printing Process" text,
"Paper Type" text,
"First Day Cover Cancellation" text
) | How many time is the theme rotary international : 100 years in canada? | SELECT COUNT("Printing Process") FROM table_27702 WHERE "Theme" = 'Rotary International : 100 Years in Canada' | wikisql |
CREATE TABLE hz_info (
KH text,
KLX number,
RYBH text,
YLJGDM text
)
CREATE TABLE hz_info_zyjzjlb (
JZLSH number,
YLJGDM number,
zyjzjlb_id number
)
CREATE TABLE mzjzjlb (
HXPLC number,
HZXM text,
JLSJ time,
JZJSSJ time,
JZKSBM text,
JZKSMC text,
JZKSRQ time,
... | 病患36963389检测丙戊酸在2012年2月7日起到2019年5月3日结束的医务人员工号及姓名分别是什么? | SELECT jyjgzbb.JCRGH, jyjgzbb.JCRXM FROM hz_info JOIN mzjzjlb JOIN jybgb JOIN jyjgzbb ON hz_info.YLJGDM = mzjzjlb.YLJGDM AND hz_info.KH = mzjzjlb.KH AND hz_info.KLX = mzjzjlb.KLX AND mzjzjlb.YLJGDM = jybgb.YLJGDM_MZJZJLB AND mzjzjlb.JZLSH = jybgb.JZLSH_MZJZJLB AND jybgb.YLJGDM = jyjgzbb.YLJGDM AND jybgb.BGDH = jyjgzbb.... | css |
CREATE TABLE table_name_93 (
division_record VARCHAR,
school VARCHAR
) | For the Delmar school what is the division record? | SELECT division_record FROM table_name_93 WHERE school = "delmar" | sql_create_context |
CREATE TABLE allergy (
allergyid number,
patientunitstayid number,
drugname text,
allergyname text,
allergytime time
)
CREATE TABLE cost (
costid number,
uniquepid text,
patienthealthsystemstayid number,
eventtype text,
eventid number,
chargetime time,
cost number
)
CRE... | what was the total amount of the output that patient 013-38992 had had on this month/31? | SELECT SUM(intakeoutput.cellvaluenumeric) FROM intakeoutput WHERE intakeoutput.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '013-38992')) AND intakeoutput.cellpath LIKE '%ou... | eicu |
CREATE TABLE table_name_31 (
ngc_number INTEGER,
object_type VARCHAR,
right_ascension___j2000__ VARCHAR
) | I want the sum of NGC number for spiral galaxy and right acension of 08h14m40.4s | SELECT SUM(ngc_number) FROM table_name_31 WHERE object_type = "spiral galaxy" AND right_ascension___j2000__ = "08h14m40.4s" | sql_create_context |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.