context stringlengths 11 9.12k | question stringlengths 0 1.06k | SQL stringlengths 2 4.44k | source stringclasses 28
values |
|---|---|---|---|
CREATE TABLE d_items (
row_id number,
itemid number,
label text,
linksto text
)
CREATE TABLE diagnoses_icd (
row_id number,
subject_id number,
hadm_id number,
icd9_code text,
charttime time
)
CREATE TABLE cost (
row_id number,
subject_id number,
hadm_id number,
even... | how many patients have been given a swab, r/o gc test until 2104? | SELECT COUNT(DISTINCT admissions.subject_id) FROM admissions WHERE admissions.hadm_id IN (SELECT microbiologyevents.hadm_id FROM microbiologyevents WHERE microbiologyevents.spec_type_desc = 'swab, r/o gc' AND STRFTIME('%y', microbiologyevents.charttime) <= '2104') | mimic_iii |
CREATE TABLE diagnoses (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE demographic (
subject_id text,
hadm_id text,
name text,
marital_status text,
age text,
dob text,
gender text,
language text,
religion text,
... | find the number of patients who had emergency room hospital admission along with other and unspecified coronary arteriography. | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.admission_location = "EMERGENCY ROOM ADMIT" AND procedures.short_title = "Coronary arteriogram NEC" | mimicsql_data |
CREATE TABLE Participates_in (
stuid INTEGER,
actid INTEGER
)
CREATE TABLE Faculty_Participates_in (
FacID INTEGER,
actid INTEGER
)
CREATE TABLE Student (
StuID INTEGER,
LName VARCHAR(12),
Fname VARCHAR(12),
Age INTEGER,
Sex VARCHAR(1),
Major INTEGER,
Advisor INTEGER,
c... | How many faculty members participate in each activity? Return the activity names and the number of faculty members Show bar chart, and display x-axis from high to low order. | SELECT activity_name, COUNT(*) FROM Activity AS T1 JOIN Faculty_Participates_in AS T2 ON T1.actid = T2.actid GROUP BY T1.actid ORDER BY activity_name DESC | nvbench |
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... | 自二零零一年九月四日开始,截止到二零零五年十一月二十八日,看看病人80429036到医院看病的次数是多少 | SELECT (SELECT COUNT(*) 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 = '80429036' AND mzjzjlb.JZKSRQ BETWEEN '2001-09-04' AND '2005-11-28') + (SELECT COUNT(*) FROM hz_info JOIN zyjzjlb JOIN hz_info_zyjzjlb ON hz_info.YLJGDM = h... | css |
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... | provide the number of patients whose diagnoses icd9 code is v1272 and lab test fluid is ascites? | 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 = "V1272" AND lab.fluid = "Ascites" | mimicsql_data |
CREATE TABLE table_56082 (
"Fund" text,
"Manager" text,
"Fund Period" text,
"Fund Return" text,
"Market return" text
) | Who is the manager for FMC Corporation pension fund? | SELECT "Manager" FROM table_56082 WHERE "Fund" = 'fmc corporation pension fund' | wikisql |
CREATE TABLE table_17827 (
"Colt model no." text,
"Name" text,
"Stock" text,
"Fire control" text,
"Rear sight" text,
"Forward assist" text,
"Case deflector" text,
"Barrel length" text,
"Barrel profile" text,
"Barrel twist" text,
"Hand guards" text,
"Bayonet Lug" text,
... | What is the fire control for the sporter target | SELECT "Fire control" FROM table_17827 WHERE "Name" = 'Sporter Target' | wikisql |
CREATE TABLE train (
train_id number,
name text,
time text,
service text
)
CREATE TABLE station (
station_id number,
name text,
annual_entry_exit number,
annual_interchanges number,
total_passengers number,
location text,
main_services text,
number_of_platforms number
)
... | Show the names and total passengers for all train stations not in London. | SELECT name, total_passengers FROM station WHERE location <> 'London' | spider |
CREATE TABLE table_5279 (
"Rider" text,
"Bike" text,
"Laps" real,
"Time" text,
"Grid" real
) | What grid has an average time of +22.505 and laps larger than 23? | SELECT AVG("Grid") FROM table_5279 WHERE "Time" = '+22.505' AND "Laps" > '23' | wikisql |
CREATE TABLE table_name_52 (
result VARCHAR,
date VARCHAR
) | what is the result when the date is august 24, 1997? | SELECT result FROM table_name_52 WHERE date = "august 24, 1997" | 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,
... | how many patients of white ethnicity are suggested with drug route ivpca? | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE demographic.ethnicity = "WHITE" AND prescriptions.route = "IVPCA" | mimicsql_data |
CREATE TABLE table_204_899 (
id number,
"event" text,
"date" text,
"area" text,
"tornadoes" number,
"casualties" text,
"notes" text
) | what number of tornadoes occurred in 1965 ? | SELECT COUNT(*) FROM table_204_899 WHERE "date" = 1965 | squall |
CREATE TABLE table_78018 (
"Rank" real,
"Player" text,
"Club" text,
"Country" text,
"Titles" real,
"Seasons" text
) | How many rankings are associated with giuseppe meazza holding over 3 titles? | SELECT COUNT("Rank") FROM table_78018 WHERE "Player" = 'giuseppe meazza' AND "Titles" > '3' | wikisql |
CREATE TABLE diagnoses (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE demographic (
subject_id text,
hadm_id text,
name text,
marital_status text,
age text,
dob text,
gender text,
language text,
religion text,
... | how many patients whose diagnoses long title is postinflammatory pulmonary fibrosis and lab test category is blood gas? | 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.long_title = "Postinflammatory pulmonary fibrosis" AND lab."CATEGORY" = "Blood Gas" | mimicsql_data |
CREATE TABLE table_37344 (
"Date" text,
"Host" text,
"Agg." text,
"Visitor" text,
"Ground" text,
"Attendance" real,
"Tournament" text
) | Who is the visitor of the match on July 29? | SELECT "Visitor" FROM table_37344 WHERE "Date" = 'july 29' | wikisql |
CREATE TABLE hz_info (
KH text,
KLX number,
RYBH text,
YLJGDM text
)
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,... | 患者39436080954在门诊就诊时其就诊状态代码是多少叫什么名称? | SELECT wdmzjzjlb.JZZTDM, wdmzjzjlb.JZZTMC FROM wdmzjzjlb WHERE wdmzjzjlb.JZLSH = '39436080954' UNION SELECT bdmzjzjlb.JZZTDM, bdmzjzjlb.JZZTMC FROM bdmzjzjlb WHERE bdmzjzjlb.JZLSH = '39436080954' | css |
CREATE TABLE table_78948 (
"Place" text,
"Player" text,
"Country" text,
"Score" text,
"To par" text
) | What did Taiwan score? | SELECT "Score" FROM table_78948 WHERE "Country" = 'taiwan' | 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 the drug type for the drug code sw100mlg? | SELECT prescriptions.drug_type FROM prescriptions WHERE prescriptions.formulary_drug_cd = "SW100MLG" | mimicsql_data |
CREATE TABLE table_204_522 (
id number,
"boat #" text,
"name" text,
"builder" text,
"laid down" text,
"launched" text,
"completed" text,
"fate" text
) | when was a boat launched immediately before ha-206 ? | SELECT "name" FROM table_204_522 WHERE "launched" < (SELECT "launched" FROM table_204_522 WHERE "name" = 'ha-206') ORDER BY "launched" DESC LIMIT 1 | squall |
CREATE TABLE departments (
DEPARTMENT_ID decimal(4,0),
DEPARTMENT_NAME varchar(30),
MANAGER_ID decimal(6,0),
LOCATION_ID decimal(4,0)
)
CREATE TABLE countries (
COUNTRY_ID varchar(2),
COUNTRY_NAME varchar(40),
REGION_ID decimal(10,0)
)
CREATE TABLE employees (
EMPLOYEE_ID decimal(6,0),... | For those employees who did not have any job in the past, a bar chart shows the distribution of hire_date and the amount of hire_date bin hire_date by weekday, show by the y axis from low to high. | SELECT HIRE_DATE, COUNT(HIRE_DATE) FROM employees WHERE NOT EMPLOYEE_ID IN (SELECT EMPLOYEE_ID FROM job_history) ORDER BY COUNT(HIRE_DATE) | nvbench |
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, draw a bar chart about the distribution of founder and the average of code , and group by attribute founder, order in desc by the total number please. | SELECT T2.Founder, T1.Code FROM Products AS T1 JOIN Manufacturers AS T2 ON T1.Manufacturer = T2.Code GROUP BY T2.Founder ORDER BY T1.Code DESC | nvbench |
CREATE TABLE table_24115349_4 (
coakley__percentage VARCHAR,
kennedy__percentage VARCHAR
) | What was the percentage of votes for coakley when kennedy won 1.6% | SELECT coakley__percentage FROM table_24115349_4 WHERE kennedy__percentage = "1.6%" | sql_create_context |
CREATE TABLE table_65407 (
"Date" text,
"Internet Explorer" text,
"Chrome" text,
"Firefox" text,
"Safari" text
) | What was the percentage of firefox was chrome was 23.90% | SELECT "Firefox" FROM table_65407 WHERE "Chrome" = '23.90%' | wikisql |
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 medication (
medication... | indicate the daily average amount of sao2 for patient 015-180 in the last hospital visit. | SELECT AVG(vitalperiodic.sao2) FROM vitalperiodic WHERE vitalperiodic.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '015-180' AND NOT patient.hospitaldischargetime IS NULL OR... | eicu |
CREATE TABLE table_12834 (
"2013" text,
"2012" text,
"2011" text,
"2010" text,
"2009" text,
"2008" text,
"2007" text
) | What 2009 has 52-75 as the 2010? | SELECT "2009" FROM table_12834 WHERE "2010" = '52-75' | wikisql |
CREATE TABLE microlab (
microlabid number,
patientunitstayid number,
culturesite text,
organism text,
culturetakentime time
)
CREATE TABLE patient (
uniquepid text,
patienthealthsystemstayid number,
patientunitstayid number,
gender text,
age text,
ethnicity text,
hospita... | what were the four most frequent prescription drugs for patients who were also prescribed keppra at the same time until 2103? | 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 = 'keppra' AND STRFTIME('%y', medication.drugstarttime... | eicu |
CREATE TABLE treatment (
treatmentid number,
patientunitstayid number,
treatmentname text,
treatmenttime time
)
CREATE TABLE patient (
uniquepid text,
patienthealthsystemstayid number,
patientunitstayid number,
gender text,
age text,
ethnicity text,
hospitalid number,
wa... | what's the name of the specimen test that patient 031-3355 first received in this month? | SELECT microlab.culturesite FROM microlab WHERE microlab.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '031-3355')) AND DATETIME(microlab.culturetakentime, 'start of month') ... | eicu |
CREATE TABLE airport_service (
city_code varchar,
airport_code varchar,
miles_distant int,
direction varchar,
minutes_distant int
)
CREATE TABLE airport (
airport_code varchar,
airport_name text,
airport_location text,
state_code varchar,
country_name varchar,
time_zone_code... | how much is a FIRST class round trip from ATLANTA to SAN FRANCISCO | SELECT DISTINCT fare.fare_id FROM airport_service AS AIRPORT_SERVICE_0, airport_service AS AIRPORT_SERVICE_1, city AS CITY_0, city AS CITY_1, fare, fare_basis, flight, flight_fare WHERE (CITY_0.city_code = AIRPORT_SERVICE_0.city_code AND CITY_0.city_name = 'ATLANTA' AND CITY_1.city_code = AIRPORT_SERVICE_1.city_code AN... | atis |
CREATE TABLE cost (
costid number,
uniquepid text,
patienthealthsystemstayid number,
eventtype text,
eventid number,
chargetime time,
cost number
)
CREATE TABLE diagnosis (
diagnosisid number,
patientunitstayid number,
diagnosisname text,
diagnosistime time,
icd9code tex... | whats the cost to get a malignancy - lymphoma diagnosis. | SELECT DISTINCT cost.cost FROM cost WHERE cost.eventtype = 'diagnosis' AND cost.eventid IN (SELECT diagnosis.diagnosisid FROM diagnosis WHERE diagnosis.diagnosisname = 'malignancy - lymphoma') | eicu |
CREATE TABLE table_68092 (
"Name" text,
"Position" text,
"Club career" text,
"League apps" real,
"League goals" real,
"Total apps" real,
"Total goals" real
) | What was the club career for players in positions of DF, fewer than 18 total goals, fewer than 129 league appearances, and more than 7 league goals? | SELECT "Club career" FROM table_68092 WHERE "Position" = 'df' AND "Total goals" < '18' AND "League apps" < '129' AND "League goals" > '7' | wikisql |
CREATE TABLE table_name_84 (
crowd INTEGER,
home_team VARCHAR
) | What is the average amount of spectators when Essendon played as the home team? | SELECT AVG(crowd) FROM table_name_84 WHERE home_team = "essendon" | sql_create_context |
CREATE TABLE SuggestedEditVotes (
Id number,
SuggestedEditId number,
UserId number,
VoteTypeId number,
CreationDate time,
TargetUserId number,
TargetRepChange number
)
CREATE TABLE PostLinks (
Id number,
CreationDate time,
PostId number,
RelatedPostId number,
LinkTypeId ... | Total number of users grouped by location. | SELECT COUNT(Id) FROM Users WHERE Location = 'India' | sede |
CREATE TABLE procedures_icd (
row_id number,
subject_id number,
hadm_id number,
icd9_code text,
charttime time
)
CREATE TABLE admissions (
row_id number,
subject_id number,
hadm_id number,
admittime time,
dischtime time,
admission_type text,
admission_location text,
... | tell me how many doses of tpn d15.0 patient 20441 had consumed on 02/25/this year. | SELECT SUM(inputevents_cv.amount) FROM inputevents_cv WHERE inputevents_cv.icustay_id IN (SELECT icustays.icustay_id FROM icustays WHERE icustays.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 20441)) AND inputevents_cv.itemid IN (SELECT d_items.itemid FROM d_items WHERE d_items.lab... | mimic_iii |
CREATE TABLE microlab (
microlabid number,
patientunitstayid number,
culturesite text,
organism text,
culturetakentime time
)
CREATE TABLE medication (
medicationid number,
patientunitstayid number,
drugname text,
dosage text,
routeadmin text,
drugstarttime time,
drugsto... | when was the first time that patient 030-54262 has the maximum heartrate value until 1105 days ago. | 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 = '030-54262')) AND NOT vitalperiodic.heartrate IS NUL... | eicu |
CREATE TABLE person_info_hz_info (
RYBH text,
KH number,
KLX number,
YLJGDM number
)
CREATE TABLE person_info (
CSD text,
CSRQ time,
GJDM text,
GJMC text,
JGDM text,
JGMC text,
MZDM text,
MZMC text,
RYBH text,
XBDM number,
XBMC text,
XLDM text,
XLMC t... | 列出患者90180222的检验报告单日期在2021年6月7日之后的所对应的住院就诊的流水号 | SELECT zyjzjlb.JZLSH FROM hz_info JOIN zyjzjlb JOIN person_info_hz_info JOIN person_info ON hz_info.YLJGDM = zyjzjlb.YLJGDM AND hz_info.KH = zyjzjlb.KH AND hz_info.KLX = zyjzjlb.KLX AND person_info_hz_info.KH = hz_info.KH AND person_info_hz_info.KLX = hz_info.KLX AND person_info_hz_info.YLJGDM = hz_info.YLJGDM AND pers... | css |
CREATE TABLE table_name_62 (
college_junior_club_team__league_ VARCHAR,
position VARCHAR,
player VARCHAR
) | What is the college/junior/club team (league) of left wing Ondrej Roman? | SELECT college_junior_club_team__league_ FROM table_name_62 WHERE position = "left wing" AND player = "ondrej roman" | sql_create_context |
CREATE TABLE table_15950 (
"Pick" real,
"Player" text,
"Position" text,
"Nationality" text,
"NHL team" text,
"College/junior/club team" text
) | NHL team player San Jose Sharks is United States nationally. | SELECT "Player" FROM table_15950 WHERE "NHL team" = 'San Jose Sharks' AND "Nationality" = 'United States' | wikisql |
CREATE TABLE table_49460 (
"Rider" text,
"Manufacturer" text,
"Laps" real,
"Time" text,
"Grid" real
) | How long did it take for the rider of a Yamaha with a grid less than 8 and laps less than 23? | SELECT "Time" FROM table_49460 WHERE "Manufacturer" = 'yamaha' AND "Grid" < '8' AND "Laps" < '23' | wikisql |
CREATE TABLE procedures (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE demographic (
subject_id text,
hadm_id text,
name text,
marital_status text,
age text,
dob text,
gender text,
language text,
religion text,
... | which patients have procedure icd9 code 12? | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE procedures.icd9_code = "12" | mimicsql_data |
CREATE TABLE table_name_36 (
stadium VARCHAR,
date VARCHAR
) | In what stadium was the game on August 22, 2008 played? | SELECT stadium FROM table_name_36 WHERE date = "august 22, 2008" | sql_create_context |
CREATE TABLE table_3257 (
"Information" text,
"James E. Holmes" text,
"Reidsville" text,
"Rockingham County" text,
"Western Rockingham Middle School" text
) | Name the james e. holmes for joe baez | SELECT "James E. Holmes" FROM table_3257 WHERE "Rockingham County" = 'Joe Baez' | 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_DIRE_CD text,
MED_DIRE_NM text,... | 患者凤高翰在10年5月21日到19年8月3日这段时间内,自付比例低于0.48的药品数量是多少 | 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_NM = '凤高翰' AND t_kc22.STA_DATE BETWEEN '2010-05-21' AND '2019-08-03' AND t_kc22.SELF_PAY_PRO < 0.48 | css |
CREATE TABLE table_name_21 (
score VARCHAR,
opponent VARCHAR
) | What was the score in the tournament against Ekaterina Makarova? | SELECT score FROM table_name_21 WHERE opponent = "ekaterina makarova" | sql_create_context |
CREATE TABLE table_14724369_1 (
no_in_series INTEGER,
production_code VARCHAR
) | What is the first number in series that had the production code 1ACX03? | SELECT MAX(no_in_series) FROM table_14724369_1 WHERE production_code = "1ACX03" | sql_create_context |
CREATE TABLE table_name_48 (
high_rebounds VARCHAR,
team VARCHAR
) | What is the highest number of rebounds of the san antonio spurs? | SELECT high_rebounds FROM table_name_48 WHERE team = "san antonio spurs" | 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... | 通过医疗记录中显示的病患28753994购买了多少次价格都不超过3093.86元的药品?对应的是什么就诊编号? | SELECT t_kc22.MED_CLINIC_ID FROM t_kc22 WHERE t_kc22.t_kc21_PERSON_ID = '28753994' AND NOT t_kc22.MED_CLINIC_ID IN (SELECT t_kc22.MED_CLINIC_ID FROM t_kc22 WHERE t_kc22.AMOUNT > 3093.86) | css |
CREATE TABLE table_9011 (
"Game" real,
"Date" text,
"Team" text,
"Score" text,
"High points" text,
"High assists" text,
"Location Attendance" text,
"Record" text
) | What is Record, when High Points is 'Ray Allen (27)'? | SELECT "Record" FROM table_9011 WHERE "High points" = 'ray allen (27)' | wikisql |
CREATE TABLE table_203_61 (
id number,
"rank" number,
"nation" text,
"gold" number,
"silver" number,
"bronze" number,
"total" number
) | which nation won the same amount og golds as ghana ? | SELECT "nation" FROM table_203_61 WHERE "nation" <> 'ghana' AND "gold" = (SELECT "gold" FROM table_203_61 WHERE "nation" = 'ghana') | squall |
CREATE TABLE airline (
airline_code varchar,
airline_name text,
note text
)
CREATE TABLE aircraft (
aircraft_code varchar,
aircraft_description varchar,
manufacturer varchar,
basic_type varchar,
engines int,
propulsion varchar,
wide_body varchar,
wing_span int,
length in... | show afternoon flights from DALLAS to SAN FRANCISCO | SELECT DISTINCT flight.flight_id FROM airport_service AS AIRPORT_SERVICE_0, airport_service AS AIRPORT_SERVICE_1, city AS CITY_0, city AS CITY_1, flight WHERE (CITY_0.city_code = AIRPORT_SERVICE_0.city_code AND CITY_0.city_name = 'DALLAS' AND CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'SAN FR... | atis |
CREATE TABLE table_1921_1 (
branches_involved VARCHAR,
location VARCHAR
) | What is every branch involved in Afghanistan? | SELECT branches_involved FROM table_1921_1 WHERE location = "Afghanistan" | sql_create_context |
CREATE TABLE fielding_outfield (
player_id TEXT,
year INTEGER,
stint INTEGER,
glf NUMERIC,
gcf NUMERIC,
grf NUMERIC
)
CREATE TABLE player_award (
player_id TEXT,
award_id TEXT,
year INTEGER,
league_id TEXT,
tie TEXT,
notes TEXT
)
CREATE TABLE pitching (
player_id TE... | For each year, bin the year into day of the week interval, and return the total number of times the team Boston Red Stockings won in the postseasons using a line chart, show by the x-axis in ascending. | SELECT year, SUM(COUNT(*)) FROM postseason AS T1 JOIN team AS T2 ON T1.team_id_winner = T2.team_id_br WHERE T2.name = 'Boston Red Stockings' ORDER BY year | nvbench |
CREATE TABLE university (
school_id VARCHAR,
founded VARCHAR
)
CREATE TABLE basketball_match (
team_name VARCHAR,
ACC_Regular_Season VARCHAR,
school_id VARCHAR
) | What is the team name and acc regular season score of the school that was founded for the longest time? | SELECT t2.team_name, t2.ACC_Regular_Season FROM university AS t1 JOIN basketball_match AS t2 ON t1.school_id = t2.school_id ORDER BY t1.founded LIMIT 1 | sql_create_context |
CREATE TABLE Manufacturers (
Code INTEGER,
Name VARCHAR(255),
Headquarter VARCHAR(255),
Founder VARCHAR(255),
Revenue REAL
)
CREATE TABLE Products (
Code INTEGER,
Name VARCHAR(255),
Price DECIMAL,
Manufacturer INTEGER
) | For those records from the products and each product's manufacturer, draw a bar chart about the distribution of headquarter and the sum of code , and group by attribute headquarter, list by the sum code in ascending. | SELECT T2.Headquarter, T1.Code FROM Products AS T1 JOIN Manufacturers AS T2 ON T1.Manufacturer = T2.Code GROUP BY T2.Headquarter ORDER BY T1.Code | nvbench |
CREATE TABLE table_name_27 (
spike VARCHAR,
name VARCHAR
) | What kind of Spike has a Name of mia jerkov category:articles with hcards? | SELECT spike FROM table_name_27 WHERE name = "mia jerkov category:articles with hcards" | sql_create_context |
CREATE TABLE jyjgzbb (
JYZBLSH text,
YLJGDM text,
BGDH text,
BGRQ time,
JYRQ time,
JCRGH text,
JCRXM text,
SHRGH text,
SHRXM text,
JCXMMC text,
JCZBDM text,
JCFF text,
JCZBMC text,
JCZBJGDX text,
JCZBJGDL number,
JCZBJGDW text,
SBBM text,
YQBH text... | 门诊给水晓凡这个患者诊断为糖尿病,看看游离前列腺特异性抗原的检测结果定量还有单位 | SELECT jyjgzbb.JCZBJGDL, jyjgzbb.JCZBJGDW 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 ... | css |
CREATE TABLE table_1656555_1 (
ordained_bishop VARCHAR,
ordained_priest VARCHAR
) | What date was the person ordained as a priest in December 1838 ordained as a bishop? | SELECT ordained_bishop FROM table_1656555_1 WHERE ordained_priest = "December 1838" | sql_create_context |
CREATE TABLE customer (
cust_id text,
cust_name text,
acc_type text,
acc_bal number,
no_of_loans number,
credit_score number,
branch_id number,
state text
)
CREATE TABLE bank (
branch_id number,
bname text,
no_of_customers number,
city text,
state text
)
CREATE TABL... | What are the names of customers with credit score less than the average credit score across customers? | SELECT cust_name FROM customer WHERE credit_score < (SELECT AVG(credit_score) FROM customer) | spider |
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,
... | 在医院0879465中编码为06717706的病患出院科室名称包含运动的住院就诊记录分别是那几个? | SELECT * FROM hz_info JOIN zyjzjlb ON hz_info.YLJGDM = zyjzjlb.YLJGDM AND hz_info.KH = zyjzjlb.KH AND hz_info.KLX = zyjzjlb.KLX WHERE hz_info.RYBH = '06717706' AND hz_info.YLJGDM = '0879465' AND zyjzjlb.CYKSMC LIKE '%运动%' | css |
CREATE TABLE hz_info (
KH text,
KLX number,
RYBH text,
YLJGDM text
)
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,
K... | 患者43179204有哪些检验报告的结果指标全部正常?看看这些检验报告的单号 | SELECT jybgb.BGDH FROM hz_info JOIN wdmzjzjlb JOIN jybgb ON hz_info.YLJGDM = wdmzjzjlb.YLJGDM AND hz_info.KH = wdmzjzjlb.KH AND hz_info.KLX = wdmzjzjlb.KLX AND wdmzjzjlb.YLJGDM = jybgb.YLJGDM_MZJZJLB AND wdmzjzjlb.JZLSH = jybgb.JZLSH_MZJZJLB WHERE hz_info.RYBH = '43179204' AND NOT jybgb.BGDH IN (SELECT jyjgzbb.BGDH FRO... | css |
CREATE TABLE table_27704187_11 (
high_rebounds VARCHAR,
date VARCHAR
) | Who had the high rebounds on april 8? | SELECT high_rebounds FROM table_27704187_11 WHERE date = "April 8" | sql_create_context |
CREATE TABLE table_53757 (
"Team 1" text,
"Agg." text,
"Team 2" text,
"1st leg" text,
"2nd leg" text
) | What was the 2nd leg where the team 2 was budoni (sardinia)? | SELECT "2nd leg" FROM table_53757 WHERE "Team 2" = 'budoni (sardinia)' | wikisql |
CREATE TABLE table_48623 (
"Team 1" text,
"Agg." text,
"Team 2" text,
"1st leg" text,
"2nd leg" text
) | What is the 2nd leg score for the match with a team 2 of Werder Bremen? | SELECT "2nd leg" FROM table_48623 WHERE "Team 2" = 'werder bremen' | wikisql |
CREATE TABLE table_6319 (
"Competition" text,
"Played" real,
"Blackpool" real,
"Draw" real,
"Preston North End" real
) | Which Blackpool is the highest one that has a Draw larger than 18? | SELECT MAX("Blackpool") FROM table_6319 WHERE "Draw" > '18' | wikisql |
CREATE TABLE table_70956 (
"President" text,
"Elected" real,
"Took office" text,
"Left office" text,
"Party" text
) | What president was elected in 2010? | SELECT "President" FROM table_70956 WHERE "Elected" = '2010' | 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 prescriptions... | where was stephanie suchan admitted? | SELECT demographic.admission_location FROM demographic WHERE demographic.name = "Stephanie Suchan" | mimicsql_data |
CREATE TABLE table_203_476 (
id number,
"no." number,
"title (latin)" text,
"title (english translation)" text,
"subject" text,
"date" text
) | what is the next title listed after sacra propediem ? | SELECT "title (latin)" FROM table_203_476 WHERE id = (SELECT id FROM table_203_476 WHERE "title (latin)" = 'sacra propediem') + 1 | squall |
CREATE TABLE DEPARTMENT (
DEPT_CODE varchar(10),
DEPT_NAME varchar(30),
SCHOOL_CODE varchar(8),
EMP_NUM int,
DEPT_ADDRESS varchar(20),
DEPT_EXTENSION varchar(4)
)
CREATE TABLE CLASS (
CLASS_CODE varchar(5),
CRS_CODE varchar(10),
CLASS_SECTION varchar(2),
CLASS_TIME varchar(20),
... | A bar chart about how many classes are held in each department?, and sort from low to high by the Y-axis. | SELECT DEPT_CODE, COUNT(*) FROM CLASS AS T1 JOIN COURSE AS T2 ON T1.CRS_CODE = T2.CRS_CODE GROUP BY DEPT_CODE ORDER BY COUNT(*) | nvbench |
CREATE TABLE airport (
airport_id number,
airport_name text,
total_passengers number,
%_change_2007 text,
international_passengers number,
domestic_passengers number,
transit_passengers number,
aircraft_movements number,
freight_metric_tonnes number
)
CREATE TABLE aircraft (
air... | What is the name of the aircraft that has won an award the most? | SELECT T1.aircraft FROM aircraft AS T1 JOIN match AS T2 ON T1.aircraft_id = T2.winning_aircraft GROUP BY T2.winning_aircraft ORDER BY COUNT(*) DESC LIMIT 1 | spider |
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,
... | 请提供编号67339780这位参保人住院金额里是整数金额的次数 | SELECT COUNT(*) FROM gwyjzb WHERE gwyjzb.PERSON_ID = '67339780' AND gwyjzb.CLINIC_TYPE = '住院' AND MOD(gwyjzb.MED_AMOUT, 1) = 0 UNION SELECT COUNT(*) FROM fgwyjzb WHERE fgwyjzb.PERSON_ID = '67339780' AND fgwyjzb.CLINIC_TYPE = '住院' AND MOD(fgwyjzb.MED_AMOUT, 1) = 0 | css |
CREATE TABLE captain (
Captain_ID int,
Name text,
Ship_ID int,
age text,
Class text,
Rank text
)
CREATE TABLE Ship (
Ship_ID int,
Name text,
Type text,
Built_Year real,
Class text,
Flag text
) | Plot how many class by grouped by class as a bar graph, and display by the X-axis in descending. | SELECT Class, COUNT(Class) FROM captain GROUP BY Class ORDER BY Class DESC | nvbench |
CREATE TABLE table_60344 (
"Nationality" text,
"Position" text,
"Bolton Wanderers career" text,
"Apps" real,
"Total" real,
"Goals" text
) | Which Bolton Wanderers career has 293 Apps? | SELECT "Bolton Wanderers career" FROM table_60344 WHERE "Apps" = '293' | wikisql |
CREATE TABLE table_53992 (
"Title" text,
"Directed by" text,
"Written by" text,
"Original air date" text,
"Production code" text
) | What is the title of the episode with production code ad1c07? | SELECT "Title" FROM table_53992 WHERE "Production code" = 'ad1c07' | wikisql |
CREATE TABLE PostNotices (
Id number,
PostId number,
PostNoticeTypeId number,
CreationDate time,
DeletionDate time,
ExpiryDate time,
Body text,
OwnerUserId number,
DeletionUserId number
)
CREATE TABLE Comments (
Id number,
PostId number,
Score number,
Text text,
... | Top users of [tag] with positively received and non-closed posts. | SELECT Users.Id AS "user_link", SUM(P.Score) AS "total_score" FROM Users LEFT JOIN Posts AS P ON P.OwnerUserId = Users.Id WHERE P.Tags LIKE '%<' + @tag + '>%' OR (P.PostTypeId = @answer AND EXISTS(SELECT * FROM Posts AS Parent WHERE Parent.PostTypeId = @question AND Parent.Id = P.ParentId AND Parent.Tags LIKE '%<' + @t... | sede |
CREATE TABLE table_1518 (
"Edition" text,
"Round" text,
"Date" text,
"Partnering" text,
"Against" text,
"Surface" text,
"Opponents" text,
"W/L" text,
"Result" text
) | What is the name of the round against the opponents jesse huta galung peter wessels? | SELECT "Round" FROM table_1518 WHERE "Opponents" = 'Jesse Huta Galung Peter Wessels' | wikisql |
CREATE TABLE table_name_96 (
away_team VARCHAR,
home_team VARCHAR
) | What was the away team that played Fitzroy? | SELECT away_team FROM table_name_96 WHERE home_team = "fitzroy" | sql_create_context |
CREATE TABLE table_10646 (
"Tournament" text,
"Winner" text,
"Runner-up" text,
"Score" text,
"Third Place" text
) | Name the score for henri leconte and runner-up of michael stich | SELECT "Score" FROM table_10646 WHERE "Third Place" = 'henri leconte' AND "Runner-up" = 'michael stich' | wikisql |
CREATE TABLE table_61143 (
"Year" real,
"Winner" text,
"Sport" text,
"Hometown" text,
"College" text
) | Who is the winner who attended college at Connecticut and is from North Syracuse, NY? | SELECT "Winner" FROM table_61143 WHERE "College" = 'connecticut' AND "Hometown" = 'north syracuse, ny' | wikisql |
CREATE TABLE PendingFlags (
Id number,
FlagTypeId number,
PostId number,
CreationDate time,
CloseReasonTypeId number,
CloseAsOffTopicReasonTypeId number,
DuplicateOfQuestionId number,
BelongsOnBaseHostAddress text
)
CREATE TABLE PostsWithDeleted (
Id number,
PostTypeId number,
... | Find user info all users in Paris. | SELECT Id AS "id_link", DisplayName, Reputation, WebsiteUrl, Location, AboutMe, Views, UpVotes, DownVotes, EmailHash, Age, AccountId FROM Users WHERE LOWER(Location) LIKE '%paris%' ORDER BY Reputation DESC | sede |
CREATE TABLE table_name_10 (
nationality VARCHAR,
round VARCHAR,
player VARCHAR
) | Can you tell me the Nationality that has the Round smaller than 5, and the Player of bruce affleck? | SELECT nationality FROM table_name_10 WHERE round < 5 AND player = "bruce affleck" | sql_create_context |
CREATE TABLE table_name_13 (
january INTEGER,
opponent VARCHAR,
points VARCHAR
) | Which January is the lowest one that has an Opponent of florida panthers, and Points smaller than 59? | SELECT MIN(january) FROM table_name_13 WHERE opponent = "florida panthers" AND points < 59 | sql_create_context |
CREATE TABLE course_tags_count (
course_id int,
clear_grading int,
pop_quiz int,
group_projects int,
inspirational int,
long_lectures int,
extra_credit int,
few_tests int,
good_feedback int,
tough_tests int,
heavy_papers int,
cares_for_students int,
heavy_assignments ... | Is it true , Prof. Lindsay Bona always sets exams for her classes ? | 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.has_exams = 'N' AN... | advising |
CREATE TABLE table_8691 (
"Place" text,
"Player" text,
"Country" text,
"Score" text,
"To par" real,
"Money ( $ )" real
) | What is Player, when Money ( $ ) is less than 387, and when Score is '73-76-74-72=295'? | SELECT "Player" FROM table_8691 WHERE "Money ( $ )" < '387' AND "Score" = '73-76-74-72=295' | wikisql |
CREATE TABLE table_40208 (
"Driver" text,
"Team" text,
"Laps" real,
"Time/Retired" text,
"Grid" real
) | What are the lowest laps Alex Tagliani did for the Forsythe Racing team? | SELECT MIN("Laps") FROM table_40208 WHERE "Team" = 'forsythe racing' AND "Driver" = 'alex tagliani' | wikisql |
CREATE TABLE table_name_39 (
grid INTEGER,
driver VARCHAR
) | Which Grid did Alain Prost drive on? | SELECT SUM(grid) FROM table_name_39 WHERE driver = "alain prost" | sql_create_context |
CREATE TABLE table_7789 (
"Home team" text,
"Home team score" text,
"Away team" text,
"Away team score" text,
"Ground" text,
"Crowd" real,
"Date" text
) | What is the lowest crowd of the west coast home team? | SELECT MIN("Crowd") FROM table_7789 WHERE "Home team" = 'west coast' | wikisql |
CREATE TABLE table_57263 (
"Home team" text,
"Home team score" text,
"Away team" text,
"Away team score" text,
"Venue" text,
"Crowd" real,
"Date" text
) | What is the name of the venue where home team st kilda played? | SELECT "Venue" FROM table_57263 WHERE "Home team" = 'st kilda' | wikisql |
CREATE TABLE airport_service (
city_code varchar,
airport_code varchar,
miles_distant int,
direction varchar,
minutes_distant int
)
CREATE TABLE airline (
airline_code varchar,
airline_name text,
note text
)
CREATE TABLE time_interval (
period text,
begin_time int,
end_time... | is there ground transportation in BOS from the airport | SELECT DISTINCT ground_service.transport_type FROM airport, ground_service WHERE airport.airport_code = 'BOS' AND ground_service.airport_code = airport.airport_code | atis |
CREATE TABLE table_51970 (
"Component" text,
"Integrated" text,
"Allied-Related" text,
"Allied-Unrelated" text,
"Holding" text
) | What component has an integrated of one? | SELECT "Component" FROM table_51970 WHERE "Integrated" = 'one' | wikisql |
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,
... | 医疗就诊23814417831入院被确诊的是哪种疾病,疾病的编号是什么 | SELECT gwyjzb.IN_DIAG_DIS_CD, gwyjzb.IN_DIAG_DIS_NM FROM gwyjzb WHERE gwyjzb.MED_CLINIC_ID = '23814417831' UNION SELECT fgwyjzb.IN_DIAG_DIS_CD, fgwyjzb.IN_DIAG_DIS_NM FROM fgwyjzb WHERE fgwyjzb.MED_CLINIC_ID = '23814417831' | css |
CREATE TABLE table_name_91 (
weight VARCHAR,
name_v_t_e VARCHAR
) | What is the weight for the v t e of ivko goci category:articles with hcards? | SELECT weight FROM table_name_91 WHERE name_v_t_e = "živko gocić category:articles with hcards" | sql_create_context |
CREATE TABLE table_204_552 (
id number,
"rank" number,
"cyclist" text,
"team" text,
"laps\ndown" number,
"notes" text
) | who was the top ranked competitor in this race ? | SELECT "cyclist" FROM table_204_552 WHERE "rank" = 1 | squall |
CREATE TABLE microlab (
microlabid number,
patientunitstayid number,
culturesite text,
organism text,
culturetakentime time
)
CREATE TABLE medication (
medicationid number,
patientunitstayid number,
drugname text,
dosage text,
routeadmin text,
drugstarttime time,
drugsto... | what was patient 006-81423's first diagnosis of acute renal failure time in the last hospital encounter? | SELECT diagnosis.diagnosistime FROM diagnosis WHERE diagnosis.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '006-81423' AND NOT patient.hospitaldischargetime IS NULL ORDER BY... | eicu |
CREATE TABLE table_13755296_1 (
title VARCHAR,
teleplay_by VARCHAR
) | What's the title of the episode written by David Simon? | SELECT title FROM table_13755296_1 WHERE teleplay_by = "David Simon" | sql_create_context |
CREATE TABLE locations (
LOCATION_ID decimal(4,0),
STREET_ADDRESS varchar(40),
POSTAL_CODE varchar(12),
CITY varchar(30),
STATE_PROVINCE varchar(25),
COUNTRY_ID varchar(2)
)
CREATE TABLE departments (
DEPARTMENT_ID decimal(4,0),
DEPARTMENT_NAME varchar(30),
MANAGER_ID decimal(6,0),
... | Bin the hire date into the day of week interval, and then calculate the average salary of employees in each day for a bar chart, note that just select those employees without the letter M in their first name. | SELECT HIRE_DATE, AVG(SALARY) FROM employees WHERE NOT FIRST_NAME LIKE '%M%' | nvbench |
CREATE TABLE table_47339 (
"Party" text,
"Previous council" real,
"Staying councillors" real,
"Seats up for election" real,
"Election result" real,
"New council" real
) | Which Seats up for election have an Election result larger than 8, and Staying councillors of 24? | SELECT MAX("Seats up for election") FROM table_47339 WHERE "Election result" > '8' AND "Staying councillors" = '24' | 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... | Find the number of patients born before the year 2097 with their lab test name as reticulocyte count, manual | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.dob_year < "2097" AND lab.label = "Reticulocyte Count, Manual" | mimicsql_data |
CREATE TABLE table_27700375_6 (
game VARCHAR,
high_rebounds VARCHAR
) | In how many games were the high rebounds made by Derrick Favors (8)? | SELECT COUNT(game) FROM table_27700375_6 WHERE high_rebounds = "Derrick Favors (8)" | sql_create_context |
CREATE TABLE table_24938621_2 (
title VARCHAR,
production_code VARCHAR
) | What is the title of the episode with production code 3x5402? | SELECT title FROM table_24938621_2 WHERE production_code = "3X5402" | sql_create_context |
CREATE TABLE allergy (
allergyid number,
patientunitstayid number,
drugname text,
allergyname text,
allergytime time
)
CREATE TABLE treatment (
treatmentid number,
patientunitstayid number,
treatmentname text,
treatmenttime time
)
CREATE TABLE microlab (
microlabid number,
... | did patient 005-69150 since 4 years ago receive the diagnosis of chest wall trauma? | SELECT COUNT(*) > 0 FROM diagnosis WHERE diagnosis.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '005-69150')) AND diagnosis.diagnosisname = 'chest wall trauma' AND DATETIME(... | 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(... | Visualize a bar chart for simply displaying the email address of the employee and the corresponding employee id. | SELECT EMAIL, EMPLOYEE_ID FROM employees | nvbench |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.