context stringlengths 11 9.12k | question stringlengths 0 1.06k | SQL stringlengths 2 4.44k | source stringclasses 28
values |
|---|---|---|---|
CREATE TABLE table_name_30 (
year__ceremony_ VARCHAR,
result VARCHAR,
actor_actress VARCHAR
) | What year was holly hunter a nominee? | SELECT year__ceremony_ FROM table_name_30 WHERE result = "nominee" AND actor_actress = "holly hunter" | sql_create_context |
CREATE TABLE demographic (
subject_id text,
hadm_id text,
name text,
marital_status text,
age text,
dob text,
gender text,
language text,
religion text,
admission_type text,
days_stay text,
insurance text,
ethnicity text,
expire_flag text,
admission_location t... | list the number of patients under the age of 81 whose drug route is ivpca. | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE demographic.age < "81" AND prescriptions.route = "IVPCA" | mimicsql_data |
CREATE TABLE table_203_636 (
id number,
"#" number,
"date" text,
"winner" text,
"score" text,
"location" text,
"notes" text
) | at which location has the east west game been played the most ? | SELECT "location" FROM table_203_636 GROUP BY "location" ORDER BY COUNT(*) DESC LIMIT 1 | squall |
CREATE TABLE table_1341586_19 (
result VARCHAR,
candidates VARCHAR
) | what's the result with candidates being billy tauzin (d) unopposed | SELECT result FROM table_1341586_19 WHERE candidates = "Billy Tauzin (D) Unopposed" | sql_create_context |
CREATE TABLE table_67667 (
"Team" text,
"Games Played" real,
"Wins" real,
"Losses" real,
"Ties" real,
"Goals For" real,
"Goals Against" real
) | How many times has the Cornwall HC team, that has scored more than 18 goals, lost ? | SELECT COUNT("Losses") FROM table_67667 WHERE "Team" = 'cornwall hc' AND "Goals For" > '18' | wikisql |
CREATE TABLE program_course (
program_id int,
course_id int,
workload int,
category varchar
)
CREATE TABLE student_record (
student_id int,
course_id int,
semester int,
grade varchar,
how varchar,
transfer_source varchar,
earn_credit varchar,
repeat_term varchar,
tes... | In the Fall or Winter term are there 500 -level courses ? | SELECT DISTINCT course.department, course.name, course.number, semester.semester FROM course, course_offering, semester WHERE ((semester.semester = 'FA' AND semester.year = 2016) OR (semester.semester = 'WN' AND semester.year = 2017)) AND course.course_id = course_offering.course_id AND course.department = 'department0... | advising |
CREATE TABLE ReviewTaskStates (
Id number,
Name text,
Description text
)
CREATE TABLE Votes (
Id number,
PostId number,
VoteTypeId number,
UserId number,
CreationDate time,
BountyAmount number
)
CREATE TABLE VoteTypes (
Id number,
Name text
)
CREATE TABLE Tags (
Id num... | Number of questions and answers by year. | SELECT YEAR(p.CreationDate) AS Year, COUNT(CASE WHEN PostTypeId = 1 THEN p.Id ELSE NULL END) AS Questions, COUNT(CASE WHEN PostTypeId = 2 THEN p.Id ELSE NULL END) AS Answers FROM Posts AS p WHERE PostTypeId IN (1, 2) GROUP BY YEAR(p.CreationDate) | sede |
CREATE TABLE table_1342233_24 (
district VARCHAR,
incumbent VARCHAR
) | Which district is jamie l. whitten from? | SELECT district FROM table_1342233_24 WHERE incumbent = "Jamie L. Whitten" | sql_create_context |
CREATE TABLE table_37506 (
"Year" real,
"Division" real,
"League" text,
"Regular Season" text,
"Playoffs" text
) | What is the total number of years that have divisions greater than 4? | SELECT COUNT("Year") FROM table_37506 WHERE "Division" > '4' | wikisql |
CREATE TABLE table_65596 (
"Rank" real,
"Lane" real,
"Name" text,
"Nationality" text,
"Time" text
) | Who has rank 5? | SELECT "Name" FROM table_65596 WHERE "Rank" = '5' | wikisql |
CREATE TABLE table_28243323_1 (
club_name VARCHAR,
writer_composer VARCHAR
) | Name the team that has a song writer named larry spokes. | SELECT club_name FROM table_28243323_1 WHERE writer_composer = "Larry Spokes" | sql_create_context |
CREATE TABLE table_46933 (
"Place" text,
"Player" text,
"Country" text,
"Score" text,
"To par" text
) | What is the country that the player is from with +3 to par and score of 74-73=147? | SELECT "Country" FROM table_46933 WHERE "To par" = '+3' AND "Score" = '74-73=147' | wikisql |
CREATE TABLE table_name_55 (
declination___j2000__ VARCHAR,
right_ascension___j2000__ VARCHAR,
constellation VARCHAR,
apparent_magnitude VARCHAR
) | Tell me the declination for consellaion of ophiuchus and apparent magnitude less than 8.6 with right ascension of 16h47m14.5s | SELECT declination___j2000__ FROM table_name_55 WHERE constellation = "ophiuchus" AND apparent_magnitude < 8.6 AND right_ascension___j2000__ = "16h47m14.5s" | sql_create_context |
CREATE TABLE table_80449 (
"Race" text,
"Dist (f)" real,
"Course" text,
"Class" text,
"Prize (\u00a3K)" real,
"Odds" text,
"Runners" real,
"Placing" real,
"Margin" text,
"Time" text,
"Jockey" text,
"Trainer" text
) | Name the runners for longchamp | SELECT "Runners" FROM table_80449 WHERE "Course" = 'longchamp' | wikisql |
CREATE TABLE table_37713 (
"Score" text,
"Opposition" text,
"Venue" text,
"City" text,
"Year" real
) | What was the score for 1911? | SELECT "Score" FROM table_37713 WHERE "Year" = '1911' | 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... | Among patients admitted before 2148, how many of them had pressure ulcer, buttock? | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE demographic.admityear < "2148" AND diagnoses.long_title = "Pressure ulcer, buttock" | mimicsql_data |
CREATE TABLE table_70196 (
"Call sign" text,
"Frequency MHz" real,
"City of license" text,
"ERP W" real,
"Class" text,
"FCC info" text
) | Which city has frequency under 106.5MHz and a callsign of w218ck? | SELECT "City of license" FROM table_70196 WHERE "Frequency MHz" < '106.5' AND "Call sign" = 'w218ck' | wikisql |
CREATE TABLE prescriptions (
subject_id text,
hadm_id text,
icustay_id text,
drug_type text,
drug text,
formulary_drug_cd text,
route text,
drug_dose text
)
CREATE TABLE lab (
subject_id text,
hadm_id text,
itemid text,
charttime text,
flag text,
value_unit text,... | how many of the patients with icd9 code 9229 were discharged for long term care hospital? | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.discharge_location = "LONG TERM CARE HOSPITAL" AND procedures.icd9_code = "9229" | mimicsql_data |
CREATE TABLE table_73444 (
"County" text,
"Population" real,
"Unemployment Rate" text,
"Market Income Per Capita" text,
"Poverty Rate" text,
"Status" text
) | What is the status of the county that has a 17.3% poverty rate? | SELECT "Status" FROM table_73444 WHERE "Poverty Rate" = '17.3%' | wikisql |
CREATE TABLE time_zone (
time_zone_code text,
time_zone_name text,
hours_from_gmt int
)
CREATE TABLE food_service (
meal_code text,
meal_number int,
compartment text,
meal_description varchar
)
CREATE TABLE state (
state_code text,
state_name text,
country_name text
)
CREATE T... | what is the last flight from DALLAS to BOSTON | 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 = 'BOSTON... | atis |
CREATE TABLE countries (
COUNTRY_ID varchar(2),
COUNTRY_NAME varchar(40),
REGION_ID decimal(10,0)
)
CREATE TABLE jobs (
JOB_ID varchar(10),
JOB_TITLE varchar(35),
MIN_SALARY decimal(6,0),
MAX_SALARY decimal(6,0)
)
CREATE TABLE employees (
EMPLOYEE_ID decimal(6,0),
FIRST_NAME varcha... | For those employees who did not have any job in the past, find hire_date and the sum of employee_id bin hire_date by time, and visualize them by a bar chart, and rank in asc by the sum employee id please. | SELECT HIRE_DATE, SUM(EMPLOYEE_ID) FROM employees WHERE NOT EMPLOYEE_ID IN (SELECT EMPLOYEE_ID FROM job_history) ORDER BY SUM(EMPLOYEE_ID) | nvbench |
CREATE TABLE table_79660 (
"Date" text,
"Tournament" text,
"Surface" text,
"Opponent in final" text,
"Score" text,
"Prize Money" text
) | What is the score of the hard court Ramat Hasharon tournament? | SELECT "Score" FROM table_79660 WHERE "Surface" = 'hard' AND "Tournament" = 'ramat hasharon' | wikisql |
CREATE TABLE table_23182 (
"Institution" text,
"Location" text,
"Nickname" text,
"Founded" real,
"Type" text,
"Enrollment" real,
"Joined" real
) | Where is the school whose students are nicknamed Panthers located? | SELECT "Location" FROM table_23182 WHERE "Nickname" = 'Panthers' | wikisql |
CREATE TABLE artist (
Artist_ID int,
Name text,
Country text,
Year_Join int,
Age int
)
CREATE TABLE exhibition_record (
Exhibition_ID int,
Date text,
Attendance int
)
CREATE TABLE exhibition (
Exhibition_ID int,
Year int,
Theme text,
Artist_ID int,
Ticket_Price real... | Find those themes and years for all exhibitions with ticket prices lower than 15, group by themes, count year, and the x-axis is Year, show from low to high by the y-axis. | SELECT Year, COUNT(Year) FROM exhibition WHERE Ticket_Price < 15 GROUP BY Theme ORDER BY COUNT(Year) | nvbench |
CREATE TABLE table_name_80 (
lane VARCHAR,
heat VARCHAR,
name VARCHAR
) | What lane is David Carry in heat 1? | SELECT COUNT(lane) FROM table_name_80 WHERE heat = 1 AND name = "david carry" | sql_create_context |
CREATE TABLE student (
student_id int,
lastname varchar,
firstname varchar,
program_id int,
declare_major varchar,
total_credit int,
total_gpa float,
entered_as varchar,
admit_term int,
predicted_graduation_semester int,
degree varchar,
minor varchar,
internship varch... | Recommend human computer interaction courses which are easier than HISTORY 195 . | SELECT DISTINCT course.department, course.name, course.number, program_course.workload FROM course INNER JOIN area ON course.course_id = area.course_id INNER JOIN program_course ON program_course.course_id = course.course_id WHERE area.area LIKE '%human computer interaction%' AND program_course.workload < (SELECT MIN(P... | advising |
CREATE TABLE record (
ID int,
Result text,
Swimmer_ID int,
Event_ID int
)
CREATE TABLE event (
ID int,
Name text,
Stadium_ID int,
Year text
)
CREATE TABLE swimmer (
ID int,
name text,
Nationality text,
meter_100 real,
meter_200 text,
meter_300 text,
meter_40... | Visualize a bar chart about the distribution of name and ID . | SELECT name, ID FROM swimmer | nvbench |
CREATE TABLE t_kc21 (
MED_CLINIC_ID text,
OVERALL_CD_ORG text,
OVERALL_CD_PERSON text,
COMP_ID text,
PERSON_ID text,
PERSON_NM text,
IDENTITY_CARD text,
SOC_SRT_CARD text,
PERSON_SEX number,
PERSON_AGE number,
IN_HOSP_DATE time,
OUT_HOSP_DATE time,
DIFF_PLACE_FLG numb... | 在哪几家医院为患者吕宏达开出过药品盐酸阿米替林片(薄膜)? | SELECT MED_SER_ORG_NO FROM t_kc21 WHERE PERSON_NM = '吕宏达' AND MED_CLINIC_ID IN (SELECT MED_CLINIC_ID FROM t_kc22 WHERE SOC_SRT_DIRE_NM = '盐酸阿米替林片(薄膜)') | css |
CREATE TABLE table_49829 (
"Rider" text,
"Manufacturer" text,
"Laps" real,
"Time/Retired" text,
"Grid" real
) | Which Manufacturer has a Laps of 21, a Grid larger than 16, and a Rider of akira ry ? | SELECT "Manufacturer" FROM table_49829 WHERE "Laps" = '21' AND "Grid" > '16' AND "Rider" = 'akira ryō' | wikisql |
CREATE TABLE person_info (
RYBH text,
XBDM number,
XBMC text,
XM text,
CSRQ time,
CSD text,
MZDM text,
MZMC text,
GJDM text,
GJMC text,
JGDM text,
JGMC text,
XLDM text,
XLMC text,
ZYLBDM text,
ZYMC text
)
CREATE TABLE jyjgzbb (
JYZBLSH text,
YLJGD... | 在编码为5841169的医院中列出患者马幼安门诊诊断名称包含后的门诊就诊记录啊? | SELECT * FROM person_info JOIN hz_info JOIN mzjzjlb 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 WHERE person_info.XM = '马幼安' AND hz_info.YLJGDM = '5841169' AND mzjzjlb.JZZDSM LIKE '%后%' | css |
CREATE TABLE table_36261 (
"Week" real,
"Date" text,
"Opponent" text,
"Result" text,
"Venue" text,
"Attendance" real
) | Date of october 10, 1965 had what lowest attendance? | SELECT MIN("Attendance") FROM table_36261 WHERE "Date" = 'october 10, 1965' | wikisql |
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 diagn... | for patients who received spinal struct repair nec until 3 years ago, what are the top four most frequent specimens tested afterwards within 2 months? | SELECT t3.spec_type_desc FROM (SELECT t2.spec_type_desc, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM (SELECT admissions.subject_id, procedures_icd.charttime FROM procedures_icd JOIN admissions ON procedures_icd.hadm_id = admissions.hadm_id WHERE procedures_icd.icd9_code = (SELECT d_icd_procedures.icd9_code FR... | mimic_iii |
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,
... | 住院进行就诊的44315858644出院时科室代码和名称都是什么啊? | SELECT wdmzjzjlb.CYKSDM, wdmzjzjlb.CYKSMC FROM wdmzjzjlb WHERE wdmzjzjlb.JZLSH = '44315858644' UNION SELECT bdmzjzjlb.CYKSDM, bdmzjzjlb.CYKSMC FROM bdmzjzjlb WHERE bdmzjzjlb.JZLSH = '44315858644' | css |
CREATE TABLE table_203_459 (
id number,
"township" text,
"fips" number,
"population\ncenter" text,
"population" number,
"population\ndensity\n/km2 (/sq mi)" text,
"land area\nkm2 (sq mi)" text,
"water area\nkm2 (sq mi)" text,
"water %" text,
"geographic coordinates" text
) | how many townships have no water area ? | SELECT COUNT("township") FROM table_203_459 WHERE "water area\nkm2 (sq mi)" = 0 | squall |
CREATE TABLE table_76763 (
"Name" text,
"Years" text,
"Regular season" real,
"Playoffs" real,
"Total" real
) | what is the years when playoffs is 115? | SELECT "Years" FROM table_76763 WHERE "Playoffs" = '115' | wikisql |
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... | 在医院6644206患者何明煦出院诊断疾病名称包含迟滞的医疗就诊记录编号是什么? | SELECT qtb.MED_CLINIC_ID FROM qtb WHERE qtb.PERSON_NM = '何明煦' AND qtb.MED_SER_ORG_NO = '6644206' AND qtb.OUT_DIAG_DIS_NM LIKE '%迟滞%' UNION SELECT gyb.MED_CLINIC_ID FROM gyb WHERE gyb.PERSON_NM = '何明煦' AND gyb.MED_SER_ORG_NO = '6644206' AND gyb.OUT_DIAG_DIS_NM LIKE '%迟滞%' UNION SELECT zyb.MED_CLINIC_ID FROM zyb WHERE zy... | css |
CREATE TABLE job_history (
EMPLOYEE_ID decimal(6,0),
START_DATE date,
END_DATE date,
JOB_ID varchar(10),
DEPARTMENT_ID decimal(4,0)
)
CREATE TABLE jobs (
JOB_ID varchar(10),
JOB_TITLE varchar(35),
MIN_SALARY decimal(6,0),
MAX_SALARY decimal(6,0)
)
CREATE TABLE regions (
REGION_... | For those employees who do not work in departments with managers that have ids between 100 and 200, show me about the distribution of first_name and salary in a bar chart, could you sort by the names in asc? | SELECT FIRST_NAME, SALARY FROM employees WHERE NOT DEPARTMENT_ID IN (SELECT DEPARTMENT_ID FROM departments WHERE MANAGER_ID BETWEEN 100 AND 200) ORDER BY FIRST_NAME | nvbench |
CREATE TABLE table_name_26 (
pick VARCHAR,
player VARCHAR
) | What pick was roger holdinsky? | SELECT pick FROM table_name_26 WHERE player = "roger holdinsky" | sql_create_context |
CREATE TABLE table_name_27 (
opponent VARCHAR,
result VARCHAR
) | When the result was l 13-7 ot, who was the opponent? | SELECT opponent FROM table_name_27 WHERE result = "l 13-7 ot" | sql_create_context |
CREATE TABLE table_65524 (
"Country" text,
"Builder" text,
"Location" text,
"Ship" text,
"Class / type" text
) | What country was the Pegasus, build by Royal Dockyard, from? | SELECT "Country" FROM table_65524 WHERE "Builder" = 'royal dockyard' AND "Ship" = 'pegasus' | wikisql |
CREATE TABLE aircraft (
Aircraft_ID int,
Order_Year int,
Manufacturer text,
Model text,
Fleet_Series text,
Powertrain text,
Fuel_Propulsion text
)
CREATE TABLE pilot (
Pilot_ID int,
Pilot_name text,
Rank int,
Age int,
Nationality text,
Position text,
Join_Year in... | Can you draw a bar chart to show the number of positions of the pilots? | SELECT Position, COUNT(Position) FROM pilot GROUP BY Position | nvbench |
CREATE TABLE dorm_amenity (
amenid number,
amenity_name text
)
CREATE TABLE has_amenity (
dormid number,
amenid number
)
CREATE TABLE student (
stuid number,
lname text,
fname text,
age number,
sex text,
major number,
advisor number,
city_code text
)
CREATE TABLE lives... | What are the names of the all-female dorms? | SELECT dorm_name FROM dorm WHERE gender = 'F' | spider |
CREATE TABLE regions (
REGION_ID decimal(5,0),
REGION_NAME varchar(25)
)
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),
CO... | For all employees who have the letters D or S in their first name, visualize a bar chart about the distribution of hire_date and the sum of department_id bin hire_date by weekday, and display by the y-axis from high to low. | SELECT HIRE_DATE, SUM(DEPARTMENT_ID) FROM employees WHERE FIRST_NAME LIKE '%D%' OR FIRST_NAME LIKE '%S%' ORDER BY SUM(DEPARTMENT_ID) DESC | nvbench |
CREATE TABLE review (
a_id integer,
u_id integer,
i_id integer,
rating integer,
rank integer
)
CREATE TABLE item (
i_id integer,
title varchar(20)
)
CREATE TABLE useracct (
u_id integer,
name varchar(128)
)
CREATE TABLE trust (
source_u_id integer,
target_u_id integer,
... | For each user, return the name and the average rating of reviews given by them. Plot them as pie chart. | SELECT name, AVG(T2.rating) FROM useracct AS T1 JOIN review AS T2 ON T1.u_id = T2.u_id GROUP BY T2.u_id | nvbench |
CREATE TABLE table_name_28 (
college VARCHAR,
player VARCHAR
) | What college did john sullivan attend? | SELECT college FROM table_name_28 WHERE player = "john sullivan" | sql_create_context |
CREATE TABLE table_2897457_2 (
nhl_team VARCHAR,
player VARCHAR
) | What NHL team picked richard borgo? | SELECT nhl_team FROM table_2897457_2 WHERE player = "Richard Borgo" | sql_create_context |
CREATE TABLE table_name_6 (
erp_w INTEGER,
call_sign VARCHAR
) | What is the lowest ERP W of w223bp? | SELECT MIN(erp_w) FROM table_name_6 WHERE call_sign = "w223bp" | sql_create_context |
CREATE TABLE table_name_79 (
position VARCHAR,
overall VARCHAR,
player VARCHAR
) | Which position did David Nugent play with an overall small than 187? | SELECT position FROM table_name_79 WHERE overall > 187 AND player = "david nugent" | sql_create_context |
CREATE TABLE table_name_57 (
year INTEGER,
category VARCHAR,
nominated_for VARCHAR
) | Name the year that Birds of a feather category for most popular actress was nominated | SELECT AVG(year) FROM table_name_57 WHERE category = "most popular actress" AND nominated_for = "birds of a feather" | sql_create_context |
CREATE TABLE prescriptions (
subject_id text,
hadm_id text,
icustay_id text,
drug_type text,
drug text,
formulary_drug_cd text,
route text,
drug_dose text
)
CREATE TABLE procedures (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
... | what is average age of patients whose admission type is emergency and primary disease is bladder cancer/sda? | SELECT AVG(demographic.age) FROM demographic WHERE demographic.admission_type = "EMERGENCY" AND demographic.diagnosis = "BLADDER CANCER/SDA" | mimicsql_data |
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,... | 编码是71680261632和54695034661的两位患者在治疗中使用的名字相同的药品?具体的名称是啥?花了多少钱以及对应的医疗就诊ID是啥啊? | SELECT t_kc22.SOC_SRT_DIRE_NM, t_kc22.AMOUNT, t_kc21.MED_CLINIC_ID FROM t_kc22 JOIN t_kc21_t_kc22 JOIN t_kc21 ON t_kc21_t_kc22.MED_EXP_DET_ID = t_kc22.MED_EXP_DET_ID AND t_kc21_t_kc22.MED_CLINIC_ID = t_kc21.MED_CLINIC_ID WHERE t_kc21.MED_CLINIC_ID = '71680261632' OR t_kc21_t_kc22.MED_CLINIC_ID = '54695034661' AND t_kc2... | css |
CREATE TABLE table_name_5 (
satellite VARCHAR,
launch_site VARCHAR
) | Which satellite was launched from Vandenberg? | SELECT satellite FROM table_name_5 WHERE launch_site = "vandenberg" | sql_create_context |
CREATE TABLE table_3058 (
"Name of Award" text,
"Name of Film" text,
"Language" text,
"Awardee(s)" text,
"Cash Prize" text
) | Name the awardees for best special effects | SELECT "Awardee(s)" FROM table_3058 WHERE "Name of Award" = 'Best Special Effects' | wikisql |
CREATE TABLE Posts (
Id number,
PostTypeId number,
AcceptedAnswerId number,
ParentId number,
CreationDate time,
DeletionDate time,
Score number,
ViewCount number,
Body text,
OwnerUserId number,
OwnerDisplayName text,
LastEditorUserId number,
LastEditorDisplayName text... | Count questions not answered per tag count. | SELECT x.total, COUNT(x.Id), CAST(COUNT(x.Id) AS FLOAT) / (SELECT COUNT(Q.Id) FROM Posts AS Q WHERE Q.AnswerCount = 0 AND Q.PostTypeId = 1) FROM (SELECT Q.Id, COUNT(PT.TagId) AS total FROM Posts AS Q INNER JOIN PostTags AS PT ON Q.Id = PT.PostId WHERE Q.AnswerCount = 0 AND Q.PostTypeId = 1 GROUP BY Q.Id) AS x GROUP BY ... | sede |
CREATE TABLE table_78975 (
"Lexton Plains" text,
"Wins" real,
"Byes" real,
"Losses" real,
"Draws" real,
"Against" real
) | What is the most wins with 0 byes? | SELECT MAX("Wins") FROM table_78975 WHERE "Byes" > '0' | wikisql |
CREATE TABLE table_name_92 (
to_par VARCHAR,
score VARCHAR,
player VARCHAR
) | What is Tom Kite with a Score of 68's To Par? | SELECT to_par FROM table_name_92 WHERE score = 68 AND player = "tom kite" | sql_create_context |
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 status (
station_i... | What are the dates in which the mean sea level pressure was between 303 and 31, and count them by a bar chart, and order y axis in descending order please. | SELECT date, COUNT(date) FROM weather WHERE mean_sea_level_pressure_inches BETWEEN 30.3 AND 31 ORDER BY COUNT(date) DESC | nvbench |
CREATE TABLE table_203_611 (
id number,
"player" text,
"hr" number,
"date reached 500 hr" text,
"team" text,
"seasons played" text
) | which boston red sox player got the most career home runs ? | SELECT "player" FROM table_203_611 WHERE "team" = 'boston red sox' ORDER BY "hr" DESC LIMIT 1 | squall |
CREATE TABLE table_24033 (
"Ep." real,
"Season" real,
"Title" text,
"Directed by" text,
"Written by" text,
"Original air date" text,
"Prod. Code" text
) | When 'jobless' is the title who are the writers? | SELECT "Written by" FROM table_24033 WHERE "Title" = 'Jobless' | wikisql |
CREATE TABLE table_40448 (
"Draw" real,
"Artist" text,
"Song" text,
"Result" text,
"Place" real
) | What is the name of Aleko Berdzenishvili's song? | SELECT "Song" FROM table_40448 WHERE "Artist" = 'aleko berdzenishvili' | wikisql |
CREATE TABLE table_12422 (
"Constituency number" text,
"Name" text,
"Reserved for ( SC / ST /None)" text,
"District" text,
"Number of electorates (2009)" real
) | Name the District which has a Reserved for ( SC / ST /None) of sc? | SELECT "District" FROM table_12422 WHERE "Reserved for ( SC / ST /None)" = 'sc' | wikisql |
CREATE TABLE admissions (
row_id number,
subject_id number,
hadm_id number,
admittime time,
dischtime time,
admission_type text,
admission_location text,
discharge_location text,
insurance text,
language text,
marital_status text,
ethnicity text,
age number
)
CREATE ... | what was the last height of patient 728 until 32 months ago. | SELECT chartevents.valuenum FROM chartevents WHERE chartevents.icustay_id IN (SELECT icustays.icustay_id FROM icustays WHERE icustays.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 728)) AND chartevents.itemid IN (SELECT d_items.itemid FROM d_items WHERE d_items.label = 'admit ht' A... | mimic_iii |
CREATE TABLE table_45302 (
"Place" text,
"Player" text,
"Country" text,
"Score" text,
"To par" text,
"Money ( $ )" text
) | What country is Jack Nicklaus from? | SELECT "Country" FROM table_45302 WHERE "Player" = 'jack nicklaus' | wikisql |
CREATE TABLE table_train_180 (
"id" int,
"gender" string,
"pregnancy_or_lactation" bool,
"systolic_blood_pressure_sbp" int,
"hemoglobin_a1c_hba1c" float,
"diabetic" string,
"post_load_glucose" int,
"diastolic_blood_pressure_dbp" int,
"impaired_glucose_tolerance" bool,
"fasting_gl... | fasting glucose of 100 _ 125 mg / dl ( impaired fasting glucose tolerance ) and / or 2 _ hour post _ load glucose of 140 _ 199 mg / dl ( impaired glucose tolerance ) | SELECT * FROM table_train_180 WHERE fasting_glucose >= 100 AND fasting_glucose <= 125 OR impaired_glucose_tolerance = 1 OR (post_load_glucose >= 140 AND post_load_glucose <= 199) OR impaired_glucose_tolerance = 1 | criteria2sql |
CREATE TABLE writes (
paperid int,
authorid int
)
CREATE TABLE paper (
paperid int,
title varchar,
venueid int,
year int,
numciting int,
numcitedby int,
journalid int
)
CREATE TABLE field (
fieldid int
)
CREATE TABLE venue (
venueid int,
venuename varchar
)
CREATE TAB... | What has ras bodik published ? | SELECT DISTINCT writes.paperid FROM author, writes WHERE author.authorname = 'ras bodik' AND writes.authorid = author.authorid | scholar |
CREATE TABLE table_train_268 (
"id" int,
"basal_rate" float,
"systolic_blood_pressure_sbp" int,
"renal_disease" bool,
"major_illness" bool,
"creatinine_clearance_cl" float,
"injury_to_body" bool,
"diastolic_blood_pressure_dbp" int,
"injury_to_limb" bool,
"hypertension" bool,
... | a recent injury to body or limb | SELECT * FROM table_train_268 WHERE injury_to_body = 1 OR injury_to_limb = 1 | criteria2sql |
CREATE TABLE table_203_228 (
id number,
"#" number,
"title" text,
"songwriters" text,
"producer(s)" text,
"performer (s)" text
) | who produced the track no main topic ? | SELECT "producer(s)" FROM table_203_228 WHERE "title" = '"no main topic"' | squall |
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 countries (
COUNTRY_ID varchar(2),
COUNTRY_NAME varchar(40),
REGION_ID decimal(10,0)
)
CREATE T... | For all employees who have the letters D or S in their first name, give me the comparison about the sum of employee_id over the hire_date bin hire_date by time. | SELECT HIRE_DATE, SUM(EMPLOYEE_ID) FROM employees WHERE FIRST_NAME LIKE '%D%' OR FIRST_NAME LIKE '%S%' | nvbench |
CREATE TABLE Courses (
course_id INTEGER,
author_id INTEGER,
subject_id INTEGER,
course_name VARCHAR(120),
course_description VARCHAR(255)
)
CREATE TABLE Subjects (
subject_id INTEGER,
subject_name VARCHAR(120)
)
CREATE TABLE Student_Tests_Taken (
registration_id INTEGER,
date_test... | Find the latest logon date of the students whose family name is 'Jaskolski' or 'Langosh', and count them by a bar chart | SELECT date_of_latest_logon, COUNT(date_of_latest_logon) FROM Students WHERE family_name = "Jaskolski" OR family_name = "Langosh" | nvbench |
CREATE TABLE table_name_32 (
february VARCHAR,
game VARCHAR,
opponent VARCHAR,
record VARCHAR
) | How many Februarys have montreal canadiens as the opponent, and 18-25-10 as the record, with a game greater than 53? | SELECT COUNT(february) FROM table_name_32 WHERE opponent = "montreal canadiens" AND record = "18-25-10" AND game > 53 | sql_create_context |
CREATE TABLE table_name_86 (
location VARCHAR,
size VARCHAR
) | What location was the campus that has a size of 245 acres? | SELECT location FROM table_name_86 WHERE size = "245 acres" | sql_create_context |
CREATE TABLE zyjzjlb (
YLJGDM text,
JZLSH text,
MZJZLSH text,
KH text,
KLX number,
HZXM text,
WDBZ number,
RYDJSJ time,
RYTJDM number,
RYTJMC text,
JZKSDM text,
JZKSMC text,
RZBQDM text,
RZBQMC text,
RYCWH text,
CYKSDM text,
CYKSMC text,
CYBQDM tex... | 在编号为19545678298住院就诊中,出院科室的名称是什么?对应的代码是什么 | SELECT CYKSDM, CYKSMC FROM zyjzjlb WHERE JZLSH = '19545678298' | css |
CREATE TABLE zyjzjlb (
YLJGDM text,
JZLSH text,
MZJZLSH text,
KH text,
KLX number,
HZXM text,
WDBZ number,
RYDJSJ time,
RYTJDM number,
RYTJMC text,
JZKSDM text,
JZKSMC text,
RZBQDM text,
RZBQMC text,
RYCWH text,
CYKSDM text,
CYKSMC text,
CYBQDM tex... | 患者65531997在01年7月20日到15年10月22日,是找的哪些工号及姓名的医务人员检测指标116352的 | (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_32973 (
"Year" real,
"Sportsperson" text,
"Nation of birth" text,
"Team" text,
"Competition , federation , or league" text,
"Sport" text
) | What team has a year listed of 2008? | SELECT "Team" FROM table_32973 WHERE "Year" = '2008' | wikisql |
CREATE TABLE table_23851574_2 (
name VARCHAR,
nationality_sponsors VARCHAR
) | Which telescopes were sponsored by or originated in Belgium? | SELECT name FROM table_23851574_2 WHERE nationality_sponsors = "Belgium" | sql_create_context |
CREATE TABLE prescriptions (
subject_id text,
hadm_id text,
icustay_id text,
drug_type text,
drug text,
formulary_drug_cd text,
route text,
drug_dose text
)
CREATE TABLE lab (
subject_id text,
hadm_id text,
itemid text,
charttime text,
flag text,
value_unit text,... | Give me the number of male patients who had an endoscopic sphincterotomy and papillotomy procedure. | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.gender = "M" AND procedures.long_title = "Endoscopic sphincterotomy and papillotomy" | mimicsql_data |
CREATE TABLE table_44923 (
"Technology" text,
"Moving Parts" text,
"Room Temperature" text,
"Flammable" text,
"Toxic Materials" text,
"In production" text,
"Rare metals" text
) | What are the moving parts of lead-acid? | SELECT "Moving Parts" FROM table_44923 WHERE "Technology" = 'lead-acid' | wikisql |
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... | 4213631这个编号的医院在00年4月5日到06年10月29日内总共花费不超过690.96元的医疗费一共有几个科室? | SELECT COUNT(*) FROM (SELECT gwyjzb.MED_ORG_DEPT_CD FROM gwyjzb JOIN t_kc24 ON gwyjzb.MED_CLINIC_ID = t_kc24.MED_CLINIC_ID WHERE gwyjzb.MED_SER_ORG_NO = '4213631' AND t_kc24.CLINIC_SLT_DATE BETWEEN '2000-04-05' AND '2006-10-29' GROUP BY gwyjzb.MED_ORG_DEPT_CD HAVING SUM(t_kc24.MED_AMOUT) <= 690.96 UNION SELECT fgwyjzb.... | css |
CREATE TABLE patient (
uniquepid text,
patienthealthsystemstayid number,
patientunitstayid number,
gender text,
age text,
ethnicity text,
hospitalid number,
wardid number,
admissionheight number,
admissionweight number,
dischargeweight number,
hospitaladmittime time,
... | what was the age of patient 022-158213 in their last hospital encounter? | SELECT patient.age FROM patient WHERE patient.uniquepid = '022-158213' AND NOT patient.hospitaldischargetime IS NULL ORDER BY patient.hospitaladmittime DESC LIMIT 1 | eicu |
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 Badges (
Id number,
UserId number,
Name text,
... | Average time to Answer a question. | SELECT p1.Id AS "AnsID", p1.ParentId AS "QuestionId", p1.CreationDate AS "AnsCreationdate", p2.CreationDate AS "QuestionCreationdate", CAST((JULIANDAY(CreationDate) - JULIANDAY(p2.CreationDate)) * 1440.0 AS INT) AS Time_Difference FROM Posts AS p1 JOIN Posts AS p2 ON p1.ParentId = p2.Id WHERE p1.PostTypeId = 2 AND p1.P... | sede |
CREATE TABLE table_14556 (
"Opponent" text,
"OVERALL" text,
"HOME" text,
"AWAY" text,
"PLYFF" text
) | Which home team has a playoff record of (0-0) and played La Crosse Spartans? | SELECT "HOME" FROM table_14556 WHERE "PLYFF" = '(0-0)' AND "Opponent" = 'la crosse spartans' | 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,
... | how many patients of white russian ethnicty are diagnosed with unspecified septicemia? | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE demographic.ethnicity = "WHITE - RUSSIAN" AND diagnoses.long_title = "Unspecified septicemia" | mimicsql_data |
CREATE TABLE table_name_83 (
film_title_used_in_nomination VARCHAR,
primary_language_s_ VARCHAR
) | What is Film Title Used In Nomination, when Primary Language(s) is 'Azerbaijani, Russian'? | SELECT film_title_used_in_nomination FROM table_name_83 WHERE primary_language_s_ = "azerbaijani, russian" | sql_create_context |
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... | 在2000年5月5日到2012年9月12日这段时间医疗机构3061264的总金额和统筹总金额各自是多少? | SELECT SUM(t_kc24.MED_AMOUT), SUM(t_kc24.OVE_PAY) FROM qtb JOIN t_kc24 ON qtb.MED_CLINIC_ID = t_kc24.MED_CLINIC_ID WHERE qtb.MED_SER_ORG_NO = '3061264' AND t_kc24.CLINIC_SLT_DATE BETWEEN '2000-05-05' AND '2012-09-12' UNION SELECT SUM(t_kc24.MED_AMOUT), SUM(t_kc24.OVE_PAY) FROM gyb JOIN t_kc24 ON gyb.MED_CLINIC_ID = t_k... | css |
CREATE TABLE table_44104 (
"Date" text,
"Name" text,
"Nationality" text,
"Tonnage (GRT)" real,
"Fate" text
) | What is the date of attack of the Circe Shell Ship? | SELECT "Date" FROM table_44104 WHERE "Name" = 'circe shell' | wikisql |
CREATE TABLE table_train_278 (
"id" int,
"gender" string,
"supine" bool,
"systolic_blood_pressure_sbp" int,
"hemoglobin_a1c_hba1c" float,
"estimated_glomerular_filtration_rate_egfr" int,
"diastolic_blood_pressure_dbp" int,
"serum_creatinine" float,
"bilirubin" float,
"NOUSE" floa... | estimated gfr ( by modified diet in renal disease ) < 45 ml / min / 1.73 m2 ( within 2 weeks of planned cmr ) | SELECT * FROM table_train_278 WHERE estimated_glomerular_filtration_rate_egfr < 45 | criteria2sql |
CREATE TABLE table_2112766_1 (
episode VARCHAR,
viewers__in_millions_ VARCHAR
) | how many episode have 8.4 millions viewer. | SELECT COUNT(episode) FROM table_2112766_1 WHERE viewers__in_millions_ = "8.4" | sql_create_context |
CREATE TABLE writes (
paperid int,
authorid int
)
CREATE TABLE paperfield (
fieldid int,
paperid int
)
CREATE TABLE journal (
journalid int,
journalname varchar
)
CREATE TABLE keyphrase (
keyphraseid int,
keyphrasename varchar
)
CREATE TABLE venue (
venueid int,
venuename var... | what conferences are related to sensor fusion | SELECT DISTINCT paper.venueid FROM keyphrase, paper, paperkeyphrase WHERE keyphrase.keyphrasename = 'sensor fusion' AND paperkeyphrase.keyphraseid = keyphrase.keyphraseid AND paper.paperid = paperkeyphrase.paperid | scholar |
CREATE TABLE comment_instructor (
instructor_id int,
student_id int,
score int,
comment_text varchar
)
CREATE TABLE course_prerequisite (
pre_course_id int,
course_id int
)
CREATE TABLE jobs (
job_id int,
job_title varchar,
description varchar,
requirement varchar,
city var... | Name the PATH classes offered in Fall term . | SELECT DISTINCT course.department, course.name, course.number FROM course INNER JOIN course_offering ON course.course_id = course_offering.course_id INNER JOIN semester ON semester.semester_id = course_offering.semester WHERE course.department = 'PATH' AND semester.semester = 'Fall' | advising |
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 were the top three frequently prescribed drugs that were prescribed to patients within the same month after they were prescribed with acetaminophen (tylenol) tab 650 mg until 3 years ago? | 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 = 'acetaminophen (tylenol) tab 650 mg' AND DATETIME(me... | eicu |
CREATE TABLE table_name_55 (
location_attendance VARCHAR,
high_assists VARCHAR
) | Where did Ben Gordon (8) have the high assists? | SELECT location_attendance FROM table_name_55 WHERE high_assists = "ben gordon (8)" | sql_create_context |
CREATE TABLE table_6713 (
"Season" text,
"Competition" text,
"Round" text,
"Opponent" text,
"Home" text,
"Away" text,
"Agg." text
) | Which Away has an Opponent of slavia prague? | SELECT "Away" FROM table_6713 WHERE "Opponent" = 'slavia prague' | 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,
... | 在一三年一月八日到二一年四月二十七日之内27285110患者以前在医院就诊过几回? | 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 = '27285110' AND mzjzjlb.JZKSRQ BETWEEN '2013-01-08' AND '2021-04-27') + (SELECT COUNT(*) FROM hz_info JOIN wdmzjzjlb ON hz_info.YLJGDM = wdmzjzjlb.YLJGDM AND... | 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,
... | 列出病患蒋丹彤去6374436医院做入院诊断的疾病结果中包含粥样的医疗就诊记录的编码 | SELECT gwyjzb.MED_CLINIC_ID FROM gwyjzb WHERE gwyjzb.PERSON_NM = '蒋丹彤' AND gwyjzb.MED_SER_ORG_NO = '6374436' AND gwyjzb.IN_DIAG_DIS_NM LIKE '%粥样%' UNION SELECT fgwyjzb.MED_CLINIC_ID FROM fgwyjzb WHERE fgwyjzb.PERSON_NM = '蒋丹彤' AND fgwyjzb.MED_SER_ORG_NO = '6374436' AND fgwyjzb.IN_DIAG_DIS_NM LIKE '%粥样%' | css |
CREATE TABLE table_name_84 (
capacity VARCHAR,
model_engine VARCHAR
) | Name the capacity for the engine of 2.0 duratorq | SELECT capacity FROM table_name_84 WHERE model_engine = "2.0 duratorq" | sql_create_context |
CREATE TABLE table_5168 (
"Res." text,
"Record" text,
"Opponent" text,
"Method" text,
"Event" text,
"Round" real,
"Location" text
) | Which opponent had a round of more than 1 and an even of PFP: ring of fire? | SELECT "Opponent" FROM table_5168 WHERE "Round" > '1' AND "Event" = 'pfp: ring of fire' | wikisql |
CREATE TABLE prescriptions (
subject_id text,
hadm_id text,
icustay_id text,
drug_type text,
drug text,
formulary_drug_cd text,
route text,
drug_dose text
)
CREATE TABLE lab (
subject_id text,
hadm_id text,
itemid text,
charttime text,
flag text,
value_unit text,... | how many asian patients died in or before 2154? | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.ethnicity = "ASIAN" AND demographic.dod_year <= "2154.0" | mimicsql_data |
CREATE TABLE mzjzjlb (
HXPLC number,
HZXM text,
JLSJ time,
JZJSSJ time,
JZKSBM text,
JZKSMC text,
JZKSRQ time,
JZLSH text,
JZZDBM text,
JZZDSM text,
JZZTDM number,
JZZTMC text,
KH text,
KLX number,
MJZH text,
ML number,
MZZYZDZZBM text,
MZZYZDZZMC ... | 在04年9月6日到12年2月8日期间的门诊就诊中有多少医院2106089的科室开出了超出24张检验报告单? | SELECT COUNT(*) FROM (SELECT jybgb.KSBM FROM mzjzjlb JOIN jybgb JOIN hz_info_mzjzjlb ON hz_info_mzjzjlb.YLJGDM = jybgb.YLJGDM_MZJZJLB AND mzjzjlb.JZLSH = jybgb.JZLSH_MZJZJLB AND hz_info_mzjzjlb.JZLSH = mzjzjlb.JZLSH AND hz_info_mzjzjlb.YLJGDM = hz_info_mzjzjlb.YLJGDM AND hz_info_mzjzjlb.JZLSH = mzjzjlb.JZLSH AND hz_inf... | css |
CREATE TABLE table_name_30 (
extra VARCHAR,
result VARCHAR,
year VARCHAR
) | Which extra resulted in 2nd before 2005? | SELECT extra FROM table_name_30 WHERE result = "2nd" AND year < 2005 | sql_create_context |
CREATE TABLE table_78497 (
"Home team" text,
"Home team score" text,
"Away team" text,
"Away team score" text,
"Venue" text,
"Crowd" real,
"Date" text
) | How many people witnessed their home team score 13.15 (93)? | SELECT MAX("Crowd") FROM table_78497 WHERE "Home team score" = '13.15 (93)' | wikisql |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.