context stringlengths 11 9.12k | question stringlengths 0 1.06k | SQL stringlengths 2 4.44k | source stringclasses 28
values |
|---|---|---|---|
CREATE TABLE hz_info (
KH text,
KLX number,
RYBH text,
YLJGDM text
)
CREATE TABLE mzjzjlb (
HXPLC number,
HZXM text,
JLSJ time,
JZJSSJ time,
JZKSBM text,
JZKSMC text,
JZKSRQ time,
JZLSH text,
JZZDBM text,
JZZDSM text,
JZZTDM number,
JZZTMC text,
KH te... | 整理下患者姜淑华在二零零四年七月三十日到二零二零年十一月二十六日内所有检验结果指标记录的检测人为17450031的检验指标流水号好嘛 | SELECT jyjgzbb.JYZBLSH 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_i... | css |
CREATE TABLE treatment (
treatmentid number,
patientunitstayid number,
treatmentname text,
treatmenttime time
)
CREATE TABLE cost (
costid number,
uniquepid text,
patienthealthsystemstayid number,
eventtype text,
eventid number,
chargetime time,
cost number
)
CREATE TABLE m... | what were the first outputs of patient 027-62948 until 1285 days ago? | 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 = '027-62948')) AND intakeoutput.cellpath LIKE '%output%' AND D... | eicu |
CREATE TABLE table_name_37 (
Id VARCHAR
) | Which 2002 has a 2013 of 2 4? | SELECT 2002 FROM table_name_37 WHERE 2013 = "2–4" | 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 Tags (
Id number,
TagName text,
C... | Number of questions including deleted ones. | SELECT COUNT(*) FROM Posts WHERE (PostTypeId = 1) | sede |
CREATE TABLE table_203_102 (
id number,
"event" text,
"performance" text,
"athlete" text,
"nation" text,
"place" text,
"date" text
) | in 2008 in track and field events how long did it take for dayron robles to run the 110 m hurdles when he broke the world record . | SELECT "performance" FROM table_203_102 WHERE "athlete" = 'dayron robles' AND "event" = '110 m hurdles' | squall |
CREATE TABLE table_57120 (
"Driver" text,
"Constructor" text,
"Laps" real,
"Time/Retired" text,
"Grid" real
) | What is the average grid when the laps are smaller than 14 and Reine Wisell is the driver? | SELECT AVG("Grid") FROM table_57120 WHERE "Laps" < '14' AND "Driver" = 'reine wisell' | wikisql |
CREATE TABLE county_public_safety (
Police_force VARCHAR,
LOCATION VARCHAR
) | Show the police force shared by counties with location on the east and west. | SELECT Police_force FROM county_public_safety WHERE LOCATION = "East" INTERSECT SELECT Police_force FROM county_public_safety WHERE LOCATION = "West" | sql_create_context |
CREATE TABLE table_55284 (
"Home team" text,
"Home team score" text,
"Away team" text,
"Away team score" text,
"Venue" text,
"Crowd" real,
"Date" text
) | What was the away team at mcg? | SELECT "Away team" FROM table_55284 WHERE "Venue" = 'mcg' | wikisql |
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 int,
weight int,
capacity int,
pay_load int,
cruising_speed int,
range_... | show me all flights from ATLANTA to SAN FRANCISCO which leave the day after tomorrow after 1700 o'clock pm | 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 ((date_day.day_number = 20 AND date_day.month_number = 1 AND date_day.year = 1991 AND days.day_name = date_day.day_name AND flight.departure_time... | atis |
CREATE TABLE table_name_73 (
lead VARCHAR,
skip VARCHAR
) | Which Lead has a Skip of mike mcewen? | SELECT lead FROM table_name_73 WHERE skip = "mike mcewen" | sql_create_context |
CREATE TABLE table_78874 (
"Team" text,
"Average" real,
"Points" real,
"Played" real,
"1989-90" text,
"1990-91" text,
"1991-1992" real
) | How much 1991-1992 has a 1989-90 of 36, and an Average of 0.8250000000000001? | SELECT COUNT("1991-1992") FROM table_78874 WHERE "1989-90" = '36' AND "Average" = '0.8250000000000001' | wikisql |
CREATE TABLE customer (
cust_ID varchar(3),
cust_name varchar(20),
acc_type char(1),
acc_bal int,
no_of_loans int,
credit_score int,
branch_ID int,
state varchar(20)
)
CREATE TABLE loan (
loan_ID varchar(3),
loan_type varchar(15),
cust_ID varchar(3),
branch_ID varchar(3)... | What are the names of the different bank branches, and what are their total loan amounts. Show bar chart. | SELECT bname, SUM(amount) FROM bank AS T1 JOIN loan AS T2 ON T1.branch_ID = T2.branch_ID GROUP BY T1.bname | nvbench |
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... | 在17年10月30日到18年12月8日期间,列出金宏茂患者所有检验结果指标记录中用的什么检测方法? | SELECT jyjgzbb.JCFF FROM person_info JOIN hz_info JOIN mzjzjlb JOIN jybgb JOIN jyjgzbb JOIN person_info_hz_info ON person_info.RYBH = person_info_hz_info.RYBH AND hz_info.YLJGDM = mzjzjlb.YLJGDM AND hz_info.KH = mzjzjlb.KH AND hz_info.KLX = mzjzjlb.KLX AND mzjzjlb.YLJGDM = jybgb.YLJGDM_MZJZJLB AND mzjzjlb.JZLSH = jybgb... | css |
CREATE TABLE exhibition_record (
exhibition_id number,
date text,
attendance number
)
CREATE TABLE artist (
artist_id number,
name text,
country text,
year_join number,
age number
)
CREATE TABLE exhibition (
exhibition_id number,
year number,
theme text,
artist_id numbe... | Show all artist name, age, and country ordered by the yeared they joined. | SELECT name, age, country FROM artist ORDER BY year_join | spider |
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 year of death is less than or equal to 2112 and drug code is kcl40/1000d5ns? | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE demographic.dod_year <= "2112.0" AND prescriptions.formulary_drug_cd = "KCL40/1000D5NS" | mimicsql_data |
CREATE TABLE table_41897 (
"Ballarat FL" text,
"Wins" real,
"Byes" real,
"Losses" real,
"Draws" real,
"Against" real
) | What is the losses average when the against is greater than 1255 and wins is 0 and the draws less than 0? | SELECT AVG("Losses") FROM table_41897 WHERE "Against" > '1255' AND "Wins" = '0' AND "Draws" < '0' | wikisql |
CREATE TABLE medication (
medicationid number,
patientunitstayid number,
drugname text,
dosage text,
routeadmin text,
drugstarttime time,
drugstoptime time
)
CREATE TABLE intakeoutput (
intakeoutputid number,
patientunitstayid number,
cellpath text,
celllabel text,
cellv... | what was the 'output' patient 033-3992 got today for the first time? | 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 = '033-3992')) AND intakeoutput.cellpath LIKE '%output%' AND DA... | eicu |
CREATE TABLE table_2850912_3 (
nationality VARCHAR,
player VARCHAR
) | What is Robert Dirk's nationality? | SELECT nationality FROM table_2850912_3 WHERE player = "Robert Dirk" | sql_create_context |
CREATE TABLE person_info_hz_info (
RYBH text,
KH number,
KLX number,
YLJGDM number
)
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,
J... | 名叫王清妍的病人有哪些检验报告单的报告日期在零四年六月十九日之后?这些报告单所对应的门诊就诊的流水号是什么 | SELECT mzjzjlb.JZLSH FROM person_info JOIN hz_info JOIN mzjzjlb JOIN person_info_hz_info ON person_info.RYBH = person_info_hz_info.RYBH AND hz_info.YLJGDM = mzjzjlb.YLJGDM AND hz_info.KH = mzjzjlb.KH AND hz_info.KLX = mzjzjlb.KLX AND person_info_hz_info.KH = hz_info.KH AND person_info_hz_info.KLX = hz_info.KLX AND pers... | css |
CREATE TABLE 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 prescriptions... | tell me the admission type and diagnoses icd9 code for patient anna johnson. | SELECT demographic.admission_type, diagnoses.icd9_code FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE demographic.name = "Anna Johnson" | mimicsql_data |
CREATE TABLE table_204_448 (
id number,
"team" text,
"winners" number,
"runners-up" number,
"years won" text,
"years runner-up" text
) | what is the name of the last team on this chart ? | SELECT "team" FROM table_204_448 ORDER BY id DESC LIMIT 1 | squall |
CREATE TABLE PostHistoryTypes (
Id number,
Name text
)
CREATE TABLE Votes (
Id number,
PostId number,
VoteTypeId number,
UserId number,
CreationDate time,
BountyAmount number
)
CREATE TABLE PostNoticeTypes (
Id number,
ClassId number,
Name text,
Body text,
IsHidden ... | Progress towards Popular Question, Notable Question, and Famous Question. | SELECT Id AS "post_link", ViewCount, CAST(CAST(CAST(ViewCount AS FLOAT) / 10 AS INT) AS TEXT(5)) + '%' AS Popular, CAST(CAST(CAST(ViewCount AS FLOAT) / 25 AS INT) AS TEXT(5)) + '%' AS Notable, CAST(CAST(CAST(ViewCount AS FLOAT) / 100 AS INT) AS TEXT(5)) + '%' AS Famous FROM Posts WHERE PostTypeId = 1 AND OwnerUserId = ... | sede |
CREATE TABLE table_name_52 (
game VARCHAR,
attendance VARCHAR
) | How many games have an Attendance of 19,190? | SELECT COUNT(game) FROM table_name_52 WHERE attendance = 19 OFFSET 190 | sql_create_context |
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 patient 018-86978's height for the first time in 08/this year? | SELECT patient.admissionheight FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '018-86978') AND NOT patient.admissionheight IS NULL AND DATETIME(patient.unitadmittime, 'start of year') = DATETIME(CURRENT_TIME(), 'start of year', '-... | eicu |
CREATE TABLE table_62817 (
"Game" real,
"Date" text,
"Opponent" text,
"Venue" text,
"Result" text,
"Attendance" real
) | Which Result has a Venue of away, and a Game smaller than 43, and an Opponent of bournemouth? | SELECT "Result" FROM table_62817 WHERE "Venue" = 'away' AND "Game" < '43' AND "Opponent" = 'bournemouth' | wikisql |
CREATE TABLE table_44283 (
"College code" text,
"Faculty name" text,
"Designation" text,
"Qualification" text,
"Department" text,
"Experience" text
) | What is the designation for the m.tech (e.c.e) qualification? | SELECT "Designation" FROM table_44283 WHERE "Qualification" = 'm.tech (e.c.e)' | wikisql |
CREATE TABLE month (
month_number int,
month_name text
)
CREATE TABLE compartment_class (
compartment varchar,
class_type varchar
)
CREATE TABLE state (
state_code text,
state_name text,
country_name text
)
CREATE TABLE dual_carrier (
main_airline varchar,
low_flight_number int,
... | what flights go from BOSTON to ATLANTA | 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 = 'BOSTON' AND CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'ATLANTA... | atis |
CREATE TABLE table_name_84 (
total_points INTEGER,
artist VARCHAR,
place VARCHAR
) | What is the lowest total points Karine Tr cy has with a less than 12 place? | SELECT MIN(total_points) FROM table_name_84 WHERE artist = "karine trécy" AND place < 12 | sql_create_context |
CREATE TABLE table_name_46 (
attendance INTEGER,
week VARCHAR
) | What is the lowest attendance for week 11? | SELECT MIN(attendance) FROM table_name_46 WHERE week = 11 | sql_create_context |
CREATE TABLE table_29743928_3 (
assists INTEGER,
country VARCHAR
) | How many is the high assist total for players from panama? | SELECT MAX(assists) FROM table_29743928_3 WHERE country = "Panama" | sql_create_context |
CREATE TABLE table_16581695_2 (
written_by VARCHAR,
no_in_series VARCHAR
) | Who was the writer of the episode number in series 4? | SELECT written_by FROM table_16581695_2 WHERE no_in_series = "4" | sql_create_context |
CREATE TABLE restriction (
restriction_code text,
advance_purchase int,
stopovers text,
saturday_stay_required text,
minimum_stay int,
maximum_stay int,
application text,
no_discounts text
)
CREATE TABLE flight_fare (
flight_id int,
fare_id int
)
CREATE TABLE date_day (
mon... | i need a listing of flights from ST. PETERSBURG FLORIDA to TACOMA WASHINGTON leaving tomorrow and i would like to have a stopover in MILWAUKEE please | SELECT DISTINCT flight.flight_id FROM airport_service AS AIRPORT_SERVICE_0, airport_service AS AIRPORT_SERVICE_1, airport_service AS AIRPORT_SERVICE_2, city AS CITY_0, city AS CITY_1, city AS CITY_2, date_day, days, flight, flight_stop, state AS STATE_0, state AS STATE_1 WHERE ((CITY_2.city_code = AIRPORT_SERVICE_2.cit... | atis |
CREATE TABLE table_11863 (
"Home team" text,
"Home team score" text,
"Away team" text,
"Away team score" text,
"Venue" text,
"Crowd" real,
"Date" text
) | When was the game at Princes Park? | SELECT "Date" FROM table_11863 WHERE "Venue" = 'princes park' | wikisql |
CREATE TABLE table_10477224_1 (
sepal_width VARCHAR,
sepal_length VARCHAR,
petal_width VARCHAR
) | Name the sepal width when sepal length is 6.5 and petal width is 2.2 | SELECT sepal_width FROM table_10477224_1 WHERE sepal_length = "6.5" AND petal_width = "2.2" | sql_create_context |
CREATE TABLE table_3810 (
"Sd" real,
"Rk" real,
"Player" text,
"Points" real,
"Points defending" real,
"Points won" real,
"New points" real,
"Status" text
) | What are the maximum points defended when points won are smaller than 720.0? | SELECT MAX("Points defending") FROM table_3810 WHERE "Points won" < '720.0' | wikisql |
CREATE TABLE SuggestedEdits (
Id number,
PostId number,
CreationDate time,
ApprovalDate time,
RejectionDate time,
OwnerUserId number,
Comment text,
Text text,
Title text,
Tags text,
RevisionGUID other
)
CREATE TABLE PostNotices (
Id number,
PostId number,
PostNot... | Worst questions that weren't deleted (yet). | SELECT Score, Id AS "post_link", Body FROM Posts WHERE PostTypeId = 1 AND Score < 0 ORDER BY Score LIMIT 1000 | sede |
CREATE TABLE diagnoses_icd (
row_id number,
subject_id number,
hadm_id number,
icd9_code text,
charttime time
)
CREATE TABLE chartevents (
row_id number,
subject_id number,
hadm_id number,
icustay_id number,
itemid number,
charttime time,
valuenum number,
valueuom te... | what is the name of the diagnosis of patient 59049 first was received during the previous year? | SELECT d_icd_diagnoses.short_title FROM d_icd_diagnoses WHERE d_icd_diagnoses.icd9_code IN (SELECT diagnoses_icd.icd9_code FROM diagnoses_icd WHERE diagnoses_icd.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 59049) AND DATETIME(diagnoses_icd.charttime, 'start of year') = DATETIME(C... | mimic_iii |
CREATE TABLE program_course (
program_id int,
course_id int,
workload int,
category varchar
)
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,
g... | After taking what courses can I take BA 415 ? | SELECT DISTINCT COURSE_0.department, COURSE_0.name, COURSE_0.number FROM course AS COURSE_0, course AS COURSE_1, course_prerequisite WHERE COURSE_0.course_id = course_prerequisite.pre_course_id AND NOT COURSE_0.course_id IN (SELECT STUDENT_RECORDalias0.course_id FROM student_record AS STUDENT_RECORDalias0 WHERE STUDENT... | advising |
CREATE TABLE table_61640 (
"Tie no" text,
"Home team" text,
"Score" text,
"Away team" text,
"Date" text
) | What is Tie no, when Home Team is 'Hull City'? | SELECT "Tie no" FROM table_61640 WHERE "Home team" = 'hull city' | wikisql |
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 procedures_icd (
row_id number,
subject_id number,
hadm_id number,
icd9_code text,
charttime t... | what is the name of patient 27465's first intake on the last icu visit? | SELECT d_items.label FROM d_items WHERE d_items.itemid IN (SELECT inputevents_cv.itemid 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 = 27465) AND NOT icustays.outtime IS N... | mimic_iii |
CREATE TABLE table_38664 (
"District" text,
"Incumbent" text,
"Party" text,
"Elected" real,
"Status" text
) | Which incumbent was in the 24th district? | SELECT "Incumbent" FROM table_38664 WHERE "District" = '24th' | wikisql |
CREATE TABLE table_11052 (
"Home team" text,
"Home team score" text,
"Away team" text,
"Away team score" text,
"Venue" text,
"Crowd" real,
"Date" text
) | How many people in the crowd with Away team of geelong? | SELECT COUNT("Crowd") FROM table_11052 WHERE "Away team" = 'geelong' | wikisql |
CREATE TABLE PostHistoryTypes (
Id number,
Name text
)
CREATE TABLE SuggestedEditVotes (
Id number,
SuggestedEditId number,
UserId number,
VoteTypeId number,
CreationDate time,
TargetUserId number,
TargetRepChange number
)
CREATE TABLE ReviewRejectionReasons (
Id number,
Na... | Percentage of the total rep of users with 'monica' substring (only active in the last 2 months). | WITH Raw AS (SELECT OwnerUserId AS UserId FROM Posts WHERE CreationDate > DATEADD(d, -60, CURRENT_TIMESTAMP()) AND OwnerUserId > 0 UNION SELECT UserId FROM Comments WHERE CreationDate > DATEADD(d, -60, CURRENT_TIMESTAMP()) AND UserId > 0), Raw2 AS (SELECT UserId FROM Raw GROUP BY UserId), Raw3 AS (SELECT SUM(Users.Repu... | sede |
CREATE TABLE table_1542 (
"Rank" real,
"Company" text,
"Headquarters" text,
"Industry" text,
"Sales (billion $)" text,
"Profits (billion $)" text,
"Assets (billion $)" text,
"Market Value (billion $)" text
) | Which company has a market value of 147.4? | SELECT "Company" FROM table_1542 WHERE "Market Value (billion $)" = '147.4' | 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... | 郎颖初这位参保人从0三年十二月九日到一二年一月十日,门诊开出的西药总共有多少金额 | SELECT SUM(t_kc22.AMOUNT) FROM gwyjzb JOIN t_kc22 ON gwyjzb.MED_CLINIC_ID = t_kc22.MED_CLINIC_ID WHERE gwyjzb.PERSON_NM = '郎颖初' AND gwyjzb.CLINIC_TYPE = '门诊' AND t_kc22.STA_DATE BETWEEN '2003-12-09' AND '2012-01-10' AND t_kc22.MED_INV_ITEM_TYPE = '西药费' UNION SELECT SUM(t_kc22.AMOUNT) FROM fgwyjzb JOIN t_kc22 ON fgwyjzb... | css |
CREATE TABLE table_66284 (
"Heat" real,
"Lane" real,
"Name" text,
"Nationality" text,
"Time" text
) | What is the lowest heat number for a swimmer with a time of 2:34.94? | SELECT MIN("Heat") FROM table_66284 WHERE "Time" = '2:34.94' | wikisql |
CREATE TABLE table_54337 (
"Driver" text,
"Team" text,
"Laps" real,
"Time/Retired" text,
"Grid" text,
"Points" real
) | Which driver had a time off course? | SELECT "Driver" FROM table_54337 WHERE "Time/Retired" = 'off course' | wikisql |
CREATE TABLE microlab (
microlabid number,
patientunitstayid number,
culturesite text,
organism text,
culturetakentime time
)
CREATE TABLE vitalperiodic (
vitalperiodicid number,
patientunitstayid number,
temperature number,
sao2 number,
heartrate number,
respiration number,... | what is the cost of a drug, lisinopril 20 mg po tabs? | SELECT DISTINCT cost.cost FROM cost WHERE cost.eventtype = 'medication' AND cost.eventid IN (SELECT medication.medicationid FROM medication WHERE medication.drugname = 'lisinopril 20 mg po tabs') | eicu |
CREATE TABLE table_69207 (
"Year" real,
"Total Region" real,
"Rockhampton" real,
"Livingstone" real,
"Fitzroy" real,
"Mt Morgan" real
) | How many people in the total region when there are more than 6,406 in Fitzroy, 27,017 in Livinstonge, and less than 58,382 in Rochhampton? | SELECT COUNT("Total Region") FROM table_69207 WHERE "Fitzroy" > '6,406' AND "Livingstone" = '27,017' AND "Rockhampton" < '58,382' | 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,
... | what is the discharge location of Edward Castillo? | SELECT demographic.discharge_location FROM demographic WHERE demographic.name = "Edward Castillo" | mimicsql_data |
CREATE TABLE table_435 (
"Series #" real,
"Season #" real,
"Episode title" text,
"Writer(s)" text,
"Director" text,
"U.S. viewers (millions)" text,
"Original air date" text
) | How many episodes had 9.90 million viewers? | SELECT COUNT("Episode title") FROM table_435 WHERE "U.S. viewers (millions)" = '9.90' | wikisql |
CREATE TABLE table_name_58 (
date VARCHAR,
surface VARCHAR,
opponent_in_the_final VARCHAR
) | On what date did the match against Flavio Cipolla, played on a clay surface, occur? | SELECT date FROM table_name_58 WHERE surface = "clay" AND opponent_in_the_final = "flavio cipolla" | sql_create_context |
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 microlab (
microl... | this year was there any microbiology test result for patient 025-19271? | 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 = '025-19271')) AND DATETIME(microlab.culturetakentime, 'start of year') = DATETI... | eicu |
CREATE TABLE table_46969 (
"Municipality" text,
"Population" real,
"Inhabitants per km\u00b2" real,
"Area (in km\u00b2)" real,
"Markatal" real,
"Island" text,
"Region" text
) | What is the highest Markatal, when Municipality is Leirv k, and when Inhabitants Per Km is greater than 79? | SELECT MAX("Markatal") FROM table_46969 WHERE "Municipality" = 'leirvík' AND "Inhabitants per km\u00b2" > '79' | wikisql |
CREATE TABLE table_204_136 (
id number,
"year" number,
"final" text,
"semi" text
) | what are the number of times france is listed on this chart ? | SELECT COUNT(*) FROM table_204_136 WHERE "final" = 'france' | squall |
CREATE TABLE table_9839 (
"Date" text,
"Tournament" text,
"Winning score" text,
"Margin of victory" text,
"Runner(s)-up" text
) | When was the Jamaica Classic Tournament? | SELECT "Date" FROM table_9839 WHERE "Tournament" = 'the jamaica classic' | wikisql |
CREATE TABLE course_offering (
offering_id int,
course_id int,
semester int,
section_number int,
start_time time,
end_time time,
monday varchar,
tuesday varchar,
wednesday varchar,
thursday varchar,
friday varchar,
saturday varchar,
sunday varchar,
has_final_proje... | Do I need to take any classes before taking MACROMOL 536 ? | SELECT DISTINCT COURSE_0.department, COURSE_0.name, COURSE_0.number FROM course AS COURSE_0, course AS COURSE_1, course_prerequisite WHERE COURSE_0.course_id = course_prerequisite.pre_course_id AND NOT COURSE_0.course_id IN (SELECT STUDENT_RECORDalias0.course_id FROM student_record AS STUDENT_RECORDalias0 WHERE STUDENT... | advising |
CREATE TABLE airport_aircraft (
Aircraft_ID VARCHAR,
Airport_ID VARCHAR
)
CREATE TABLE aircraft (
Aircraft_ID VARCHAR,
Aircraft VARCHAR
)
CREATE TABLE airport (
Total_Passengers INTEGER,
Airport_ID VARCHAR
) | What is the average total number of passengers of airports that are associated with aircraft 'Robinson R-22'? | SELECT AVG(T3.Total_Passengers) FROM aircraft AS T1 JOIN airport_aircraft AS T2 ON T1.Aircraft_ID = T2.Aircraft_ID JOIN airport AS T3 ON T2.Airport_ID = T3.Airport_ID WHERE T1.Aircraft = "Robinson R-22" | sql_create_context |
CREATE TABLE table_15062 (
"Tournament" text,
"2007" text,
"2008" text,
"2009" text,
"Career Win-Loss" text
) | What is the value in 2008 for the US Open? | SELECT "2008" FROM table_15062 WHERE "Tournament" = 'us open' | wikisql |
CREATE TABLE table_name_57 (
grid VARCHAR,
time_retired VARCHAR
) | What is the grid value which has Time/Retired value of accident? | SELECT grid FROM table_name_57 WHERE time_retired = "accident" | sql_create_context |
CREATE TABLE table_name_81 (
result VARCHAR,
score VARCHAR
) | WHAT IS THE RESULT WITH A SCORE OF 70-73? | SELECT result FROM table_name_81 WHERE score = "70-73" | sql_create_context |
CREATE TABLE table_name_32 (
game INTEGER,
november VARCHAR
) | Which Game has a November of 22? | SELECT SUM(game) FROM table_name_32 WHERE november = 22 | sql_create_context |
CREATE TABLE table_76253 (
"Round" real,
"Pick" real,
"Overall" real,
"Name" text,
"Position" text,
"College" text
) | What pick did George Rosso get drafted when the overall was less than 296? | SELECT COUNT("Pick") FROM table_76253 WHERE "Name" = 'george rosso' AND "Overall" < '296' | wikisql |
CREATE TABLE addresses (
address_id number,
line_1 text,
line_2 text,
city text,
zip_postcode text,
state_province_county text,
country text
)
CREATE TABLE courses (
course_id text,
course_name text,
course_description text,
other_details text
)
CREATE TABLE people_addresse... | Find distinct cities of address of students? | SELECT DISTINCT T1.city FROM addresses AS T1 JOIN people_addresses AS T2 ON T1.address_id = T2.address_id JOIN students AS T3 ON T2.person_id = T3.student_id | spider |
CREATE TABLE Customers (
Customer_ID VARCHAR(100),
Address_ID INTEGER,
Customer_Name VARCHAR(255),
Customer_Phone VARCHAR(255),
Customer_Email_Address VARCHAR(255),
Other_Details VARCHAR(255)
)
CREATE TABLE Customer_Orders (
Order_ID INTEGER,
Customer_ID INTEGER,
Store_ID INTEGER,
... | Bar chart of the number of planned delivery date from each planned delivery date, display from high to low by the y-axis. | SELECT Planned_Delivery_Date, COUNT(Planned_Delivery_Date) FROM Bookings ORDER BY COUNT(Planned_Delivery_Date) DESC | nvbench |
CREATE TABLE table_45430 (
"Date" text,
"H/A/N" text,
"Opponent" text,
"Score" text,
"Record" text
) | What is Record, when Opponent is San Francisco Warriors? | SELECT "Record" FROM table_45430 WHERE "Opponent" = 'san francisco warriors' | wikisql |
CREATE TABLE Staff (
staff_id INTEGER,
gender VARCHAR(1),
first_name VARCHAR(80),
last_name VARCHAR(80),
email_address VARCHAR(255),
phone_number VARCHAR(80)
)
CREATE TABLE Customers (
customer_id INTEGER,
customer_type_code VARCHAR(20),
address_line_1 VARCHAR(80),
address_line_... | Bar graph to show the average of product price from different product category code, and I want to display by the Y-axis in ascending. | SELECT product_category_code, AVG(product_price) FROM Products GROUP BY product_category_code ORDER BY AVG(product_price) | nvbench |
CREATE TABLE table_4854 (
"Week" real,
"Opponent" text,
"Result" text,
"Stadium" text,
"Record" text,
"Attenmdance" text
) | What was the team's record after week 7 with 28,161 attending? | SELECT "Record" FROM table_4854 WHERE "Week" > '7' AND "Attenmdance" = '28,161' | wikisql |
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... | until 42 months ago, list the daily average heartrate of patient 015-67291. | SELECT AVG(vitalperiodic.heartrate) FROM vitalperiodic WHERE vitalperiodic.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '015-67291')) AND NOT vitalperiodic.heartrate IS NULL... | eicu |
CREATE TABLE mzb (
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... | 这位邹鹏举的患者在13年9月4日到19年6月28日期间医保的消费金额有多少 | SELECT SUM(t_kc24.PER_ACC_PAY) FROM qtb JOIN t_kc24 ON qtb.MED_CLINIC_ID = t_kc24.MED_CLINIC_ID WHERE qtb.PERSON_NM = '邹鹏举' AND t_kc24.CLINIC_SLT_DATE BETWEEN '2013-09-04' AND '2019-06-28' UNION SELECT SUM(t_kc24.PER_ACC_PAY) FROM gyb JOIN t_kc24 ON gyb.MED_CLINIC_ID = t_kc24.MED_CLINIC_ID WHERE gyb.PERSON_NM = '邹鹏举' A... | css |
CREATE TABLE table_2468961_4 (
title VARCHAR,
written_by VARCHAR,
no_in_series VARCHAR
) | What was the title of the episode written by Julia Newton in series 48? | SELECT title FROM table_2468961_4 WHERE written_by = "Julia Newton" AND no_in_series = 48 | 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, a bar chart shows the distribution of hire_date and the average of manager_id bin hire_date by time, and order by the Y in asc. | SELECT HIRE_DATE, AVG(MANAGER_ID) FROM employees WHERE SALARY BETWEEN 8000 AND 12000 AND COMMISSION_PCT <> "null" OR DEPARTMENT_ID <> 40 ORDER BY AVG(MANAGER_ID) | nvbench |
CREATE TABLE table_name_46 (
opponent VARCHAR,
date VARCHAR
) | Name the opponent for 10-04-2007 | SELECT opponent FROM table_name_46 WHERE date = "10-04-2007" | sql_create_context |
CREATE TABLE table_27141 (
"Player" text,
"Minutes" real,
"Field Goals" real,
"Rebounds" real,
"Assists" real,
"Steals" real,
"Blocks" real,
"Points" real
) | How many assists did the player who had 121 rebounds have? | SELECT MAX("Assists") FROM table_27141 WHERE "Rebounds" = '121' | 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 demographic (
subject_id text,
hadm_id text,
name text,
marital_status text,
age text,
dob text,
gender text,
... | Count the number of patients with diagnosis icd9 code 5570 and with drug type base. | 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.icd9_code = "5570" AND prescriptions.drug_type = "BASE" | mimicsql_data |
CREATE TABLE table_name_33 (
visitor VARCHAR,
home VARCHAR
) | what team was the visitor in the chicago game | SELECT visitor FROM table_name_33 WHERE home = "chicago" | sql_create_context |
CREATE TABLE table_31919 (
"Outcome" text,
"Year" real,
"Championship" text,
"Opponent in the final" text,
"Score (l) = score in legs, (s) = score in sets." text
) | Tell me the championship for runner-up outcome of 2010 | SELECT "Championship" FROM table_31919 WHERE "Outcome" = 'runner-up' AND "Year" = '2010' | wikisql |
CREATE TABLE diagnoses_icd (
row_id number,
subject_id number,
hadm_id number,
icd9_code text,
charttime time
)
CREATE TABLE microbiologyevents (
row_id number,
subject_id number,
hadm_id number,
charttime time,
spec_type_desc text,
org_name text
)
CREATE TABLE patients (
... | what is patient 15754's yearly minimum level of protein, total since 2105? | SELECT MIN(labevents.valuenum) FROM labevents WHERE labevents.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 15754) AND labevents.itemid IN (SELECT d_labitems.itemid FROM d_labitems WHERE d_labitems.label = 'protein, total') AND STRFTIME('%y', labevents.charttime) >= '2105' GROUP BY... | mimic_iii |
CREATE TABLE transfers (
row_id number,
subject_id number,
hadm_id number,
icustay_id number,
eventtype text,
careunit text,
wardid number,
intime time,
outtime time
)
CREATE TABLE d_items (
row_id number,
itemid number,
label text,
linksto text
)
CREATE TABLE chart... | how many days has passed since the last time patient 15447 has had lactated ringers intake on the current intensive care unit visit? | SELECT 1 * (STRFTIME('%j', CURRENT_TIME()) - STRFTIME('%j', inputevents_cv.charttime)) 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 = 15447) AND icustays.outtime IS NULL) ... | mimic_iii |
CREATE TABLE Invoice_Line_Items (
order_item_id INTEGER,
invoice_number INTEGER,
product_id INTEGER,
product_title VARCHAR(80),
product_quantity VARCHAR(50),
product_price DECIMAL(19,4),
derived_product_cost DECIMAL(19,4),
derived_vat_payable DECIMAL(19,4),
derived_total_cost DECIMAL... | Show the number of accounts for each customer in a bar chart grouping by customer's last name, and rank x-axis in descending order. | SELECT customer_last_name, COUNT(*) FROM Accounts AS T1 JOIN Customers AS T2 ON T1.customer_id = T2.customer_id GROUP BY T1.customer_id ORDER BY customer_last_name DESC | nvbench |
CREATE TABLE table_69150 (
"Rank" real,
"Lane" real,
"Name" text,
"Nationality" text,
"Time" real
) | for the rank more than 1 and nationality of netherlands, what is the lane? | SELECT AVG("Lane") FROM table_69150 WHERE "Nationality" = 'netherlands' AND "Rank" > '1' | wikisql |
CREATE TABLE table_61304 (
"Team" text,
"2003\u201304 Pts" text,
"2004\u201305 Pts" text,
"2005\u201306 Pts" real,
"Total Pts" real,
"Total Pld" real
) | Which Total Pld has a Total Pts smaller than 153, and a 2004 05 Pts of 43, and a 2005 06 Pts smaller than 49? | SELECT MIN("Total Pld") FROM table_61304 WHERE "Total Pts" < '153' AND "2004\u201305 Pts" = '43' AND "2005\u201306 Pts" < '49' | wikisql |
CREATE TABLE area (
course_id int,
area varchar
)
CREATE TABLE program (
program_id int,
name varchar,
college varchar,
introduction varchar
)
CREATE TABLE ta (
campus_job_id int,
student_id int,
location varchar
)
CREATE TABLE course (
course_id int,
name varchar,
dep... | For Appl of Radiation , are there any advisory prerequisites ? | SELECT DISTINCT advisory_requirement FROM course WHERE name LIKE '%Appl of Radiation%' | advising |
CREATE TABLE table_name_62 (
code__iata_icao_ VARCHAR
) | What was the value in 2010 for the airport coded OTP/LROP? | SELECT MAX(2010) FROM table_name_62 WHERE code__iata_icao_ = "otp/lrop" | sql_create_context |
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,
... | 在08年1月31日到11年3月15日这三年里,患者58099146有什么检验结果指标记录中的仪器编号以及名称? | SELECT jyjgzbb.YQBH, jyjgzbb.YQMC FROM hz_info JOIN zzmzjzjlb JOIN jybgb JOIN jyjgzbb ON hz_info.YLJGDM = zzmzjzjlb.YLJGDM AND hz_info.KH = zzmzjzjlb.KH AND hz_info.KLX = zzmzjzjlb.KLX AND zzmzjzjlb.YLJGDM = jybgb.YLJGDM_MZJZJLB AND zzmzjzjlb.JZLSH = jybgb.JZLSH_MZJZJLB AND jybgb.YLJGDM = jyjgzbb.YLJGDM AND jybgb.BGDH ... | css |
CREATE TABLE table_name_33 (
record VARCHAR,
year VARCHAR,
finish VARCHAR
) | Which Record has a Year larger than 1974, and a Finish of 3rd? | SELECT record FROM table_name_33 WHERE year > 1974 AND finish = "3rd" | sql_create_context |
CREATE TABLE fires (
fire_year number,
discovery_date number,
discovery_doy number,
discovery_time text,
stat_cause_code number,
stat_cause_descr text,
cont_date text,
cont_doy text,
cont_time text,
fire_size number,
fire_size_class text,
latitude number,
longitude nu... | How many distinct cause of the fire descriptions are there in the database? | SELECT COUNT(DISTINCT stat_cause_descr) FROM fires | uswildfires |
CREATE TABLE table_1146 (
"Week" real,
"Date" text,
"Opponent" text,
"Result" text,
"Record" text,
"Game Site" text,
"Attendance" real
) | Name the record when attendance 42827 | SELECT "Record" FROM table_1146 WHERE "Attendance" = '42827' | wikisql |
CREATE TABLE table_42025 (
"Rank" real,
"Name" text,
"Team" text,
"Games" real,
"Points" real
) | What is the lowest value for Points, when Games is greater than 34, and when Name is Andrew Panko? | SELECT MIN("Points") FROM table_42025 WHERE "Games" > '34' AND "Name" = 'andrew panko' | 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 procedures (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
... | give me the number of patients whose admission year is less than 2121 and diagnoses short title is constipation nos? | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE demographic.admityear < "2121" AND diagnoses.short_title = "Constipation NOS" | mimicsql_data |
CREATE TABLE flight_stop (
flight_id int,
stop_number int,
stop_days text,
stop_airport text,
arrival_time int,
arrival_airline text,
arrival_flight_number int,
departure_time int,
departure_airline text,
departure_flight_number int,
stop_time int
)
CREATE TABLE aircraft (
... | what are the flights from ORLANDO to KANSAS CITY | 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 = 'ORLANDO' AND CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'KANSAS... | atis |
CREATE TABLE diagnoses (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
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
)
C... | when was patient morgan mcgee discharged? also specify his primary disease | SELECT demographic.diagnosis, demographic.dischtime FROM demographic WHERE demographic.name = "Morgan Mcgee" | mimicsql_data |
CREATE TABLE t_kc21 (
CLINIC_ID text,
CLINIC_TYPE text,
COMP_ID text,
DATA_ID text,
DIFF_PLACE_FLG number,
FERTILITY_STS number,
FLX_MED_ORG_ID text,
HOSP_LEV number,
HOSP_STS number,
IDENTITY_CARD text,
INPT_AREA_BED text,
INSURED_IDENTITY number,
INSURED_STS text,
... | 2605232这个医院的患者82924837,列出某次施姓医生为其开出的出院诊断结果 | SELECT t_kc21.OUT_DIAG_DIS_CD, t_kc21.OUT_DIAG_DIS_NM FROM t_kc21 WHERE t_kc21.PERSON_ID = '82924837' AND t_kc21.MED_SER_ORG_NO = '2605232' AND t_kc21.OUT_DIAG_DOC_NM LIKE '施%' | css |
CREATE TABLE table_61233 (
"Ship" text,
"Hull Number" text,
"Laid down" text,
"Launched" text,
"Commissioned" text
) | What is Launched, when Commissioned is '25 July 1998'? | SELECT "Launched" FROM table_61233 WHERE "Commissioned" = '25 july 1998' | wikisql |
CREATE TABLE COURSE (
CRS_CODE varchar(10),
DEPT_CODE varchar(10),
CRS_DESCRIPTION varchar(35),
CRS_CREDIT float(8)
)
CREATE TABLE PROFESSOR (
EMP_NUM int,
DEPT_CODE varchar(10),
PROF_OFFICE varchar(50),
PROF_EXTENSION varchar(4),
PROF_HIGH_DEGREE varchar(5)
)
CREATE TABLE DEPARTME... | A bar chart about how many departments are in each school? | SELECT SCHOOL_CODE, COUNT(DISTINCT DEPT_NAME) FROM DEPARTMENT | nvbench |
CREATE TABLE trip (
id INTEGER,
duration INTEGER,
start_date TEXT,
start_station_name TEXT,
start_station_id INTEGER,
end_date TEXT,
end_station_name TEXT,
end_station_id INTEGER,
bike_id INTEGER,
subscription_type TEXT,
zip_code INTEGER
)
CREATE TABLE station (
id INTEG... | Give me the number of the dates when the max temperature was higher than 85. | SELECT date, COUNT(date) FROM weather WHERE max_temperature_f > 85 | nvbench |
CREATE TABLE diagnoses_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,
d... | in their first hospital encounter what was the first time of patient 25628's microbiology test? | SELECT microbiologyevents.charttime FROM microbiologyevents WHERE microbiologyevents.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 25628 AND NOT admissions.dischtime IS NULL ORDER BY admissions.admittime LIMIT 1) ORDER BY microbiologyevents.charttime LIMIT 1 | mimic_iii |
CREATE TABLE table_name_18 (
population VARCHAR,
median_family_income VARCHAR
) | What Population has a Median family income of $38,044? | SELECT population FROM table_name_18 WHERE median_family_income = "$38,044" | sql_create_context |
CREATE TABLE table_21112 (
"Rank" real,
"Company" text,
"Headquarters" text,
"Industry" text,
"Sales (billion $)" text,
"Profits (billion $)" text,
"Assets (billion $)" text,
"Market Value (billion $)" text
) | What are the profits (in billions) of the company with a market value of 172.9 billion? | SELECT "Profits (billion $)" FROM table_21112 WHERE "Market Value (billion $)" = '172.9' | wikisql |
CREATE TABLE table_name_38 (
Id VARCHAR
) | What is the 2009 when 2012 is Year-End Championship? | SELECT 2009 FROM table_name_38 WHERE 2012 = "year-end championship" | sql_create_context |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.