context stringlengths 11 9.12k | question stringlengths 0 1.06k | SQL stringlengths 2 4.44k | source stringclasses 28
values |
|---|---|---|---|
CREATE TABLE table_4598 (
"Round" real,
"Overall" real,
"Player" text,
"Position" text,
"College" text
) | What is the highest overall number for a player from Kentucky State? | SELECT MAX("Overall") FROM table_4598 WHERE "College" = 'kentucky state' | wikisql |
CREATE TABLE jybgb (
YLJGDM text,
YLJGDM_MZJZJLB text,
YLJGDM_ZYJZJLB text,
BGDH text,
BGRQ time,
JYLX number,
JZLSH text,
JZLSH_MZJZJLB text,
JZLSH_ZYJZJLB text,
JZLX number,
KSBM text,
KSMC text,
SQRGH text,
SQRXM text,
BGRGH text,
BGRXM text,
SHRGH ... | 病患76177334在08年7月12日到09年7月19日内的全部检测结果指标记录的检查员为39427347的检验指标流水号是多少? | (SELECT jyjgzbb.JYZBLSH 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.BGDH WHERE h... | css |
CREATE TABLE cost (
row_id number,
subject_id number,
hadm_id number,
event_type text,
event_id number,
chargetime time,
cost number
)
CREATE TABLE d_labitems (
row_id number,
itemid number,
label text
)
CREATE TABLE diagnoses_icd (
row_id number,
subject_id number,
... | what is the minimum hospital cost for a patient suffering from acute pain due to trauma until 2 years ago? | SELECT MIN(t1.c1) FROM (SELECT SUM(cost.cost) AS c1 FROM cost WHERE cost.hadm_id IN (SELECT diagnoses_icd.hadm_id FROM diagnoses_icd WHERE diagnoses_icd.icd9_code = (SELECT d_icd_diagnoses.icd9_code FROM d_icd_diagnoses WHERE d_icd_diagnoses.short_title = 'acute pain due to trauma')) AND DATETIME(cost.chargetime) <= DA... | mimic_iii |
CREATE TABLE table_name_33 (
laps INTEGER,
bike VARCHAR,
time VARCHAR
) | What is the sum of laps of the honda cbr1000rr bike, which has a time of +16.569? | SELECT SUM(laps) FROM table_name_33 WHERE bike = "honda cbr1000rr" AND time = "+16.569" | sql_create_context |
CREATE TABLE PostNoticeTypes (
Id number,
ClassId number,
Name text,
Body text,
IsHidden boolean,
Predefined boolean,
PostNoticeDurationId number
)
CREATE TABLE Votes (
Id number,
PostId number,
VoteTypeId number,
UserId number,
CreationDate time,
BountyAmount number... | Most recent 100 HNQ (Hot Network Questions). | SELECT PostId AS "post_link", CreationDate AS "entering_the_list_on" FROM PostHistory WHERE PostHistoryTypeId = 52 ORDER BY CreationDate DESC LIMIT 100 | sede |
CREATE TABLE table_31638 (
"Aircraft" text,
"Origin" text,
"Type" text,
"Versions" text,
"In service" text
) | How many T-260 EU aircrafts are currently in service? | SELECT "In service" FROM table_31638 WHERE "Versions" = 't-260 eu' | wikisql |
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,
... | 之前,患者戚玉树做的检查有哪些? | SELECT t_kc22.SOC_SRT_DIRE_CD, t_kc22.SOC_SRT_DIRE_NM 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.MED_INV_ITEM_TYPE = '检查费' | css |
CREATE TABLE instructor (
instructor_id int,
name varchar,
uniqname varchar
)
CREATE TABLE course (
course_id int,
name varchar,
department varchar,
number varchar,
credits varchar,
advisory_requirement varchar,
enforced_requirement varchar,
description varchar,
num_seme... | When Manuel Simon took ASIANLAN 551 , who taught the class ? | SELECT DISTINCT instructor.name FROM instructor INNER JOIN offering_instructor ON offering_instructor.instructor_id = instructor.instructor_id INNER JOIN student_record ON student_record.offering_id = offering_instructor.offering_id INNER JOIN student ON student.student_id = student_record.student_id INNER JOIN course_... | advising |
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... | 医疗就诊89369801982中药品245988在三大目录类别里面应该算哪一类 | SELECT t_kc22.DIRE_TYPE 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 = '89369801982' AND t_kc22.SOC_SRT_DIRE_CD = '245988' | css |
CREATE TABLE Tryout (
pID numeric(5,0),
cName varchar(20),
pPos varchar(8),
decision varchar(3)
)
CREATE TABLE College (
cName varchar(20),
state varchar(2),
enr numeric(5,0)
)
CREATE TABLE Player (
pID numeric(5,0),
pName varchar(20),
yCard varchar(3),
HS numeric(5,0)
) | Compare the smallest enrollment of schools in each state using a bar chart, and order cName in desc order. | SELECT cName, MIN(enr) FROM College GROUP BY state ORDER BY cName DESC | nvbench |
CREATE TABLE table_31457 (
"Station" text,
"Metlink code" text,
"Line(s)" text,
"Service(s)" text,
"Serves" text,
"km from Wellington" text,
"Fare zone(s)" text,
"Opened" text
) | what is the name of the station where the metlink code is mata? | SELECT "Station" FROM table_31457 WHERE "Metlink code" = 'MATA' | wikisql |
CREATE TABLE table_15572443_1 (
district VARCHAR,
election_date VARCHAR
) | Name the number of districts for december 1799 | SELECT COUNT(district) FROM table_15572443_1 WHERE election_date = "December 1799" | 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,... | what is primary disease and discharge time of subject id 26746? | SELECT demographic.diagnosis, demographic.dischtime FROM demographic WHERE demographic.subject_id = "26746" | mimicsql_data |
CREATE TABLE table_78381 (
"Season" text,
"1st Division" text,
"Relegated" text,
"2nd Division" text,
"Promoted" text
) | What is the 1st division when the 2nd division is national league? | SELECT "1st Division" FROM table_78381 WHERE "2nd Division" = 'national league' | wikisql |
CREATE TABLE table_62017 (
"Outcome" text,
"Edition" real,
"Round" text,
"Opponent Team" text,
"Surface" text,
"Opponent" text,
"Score" text
) | What is Round, when Opponent Team is Slovakia, when Outcome is Loser, and when Edition is greater than 2010? | SELECT "Round" FROM table_62017 WHERE "Opponent Team" = 'slovakia' AND "Outcome" = 'loser' AND "Edition" > '2010' | wikisql |
CREATE TABLE table_name_27 (
score VARCHAR,
tournament VARCHAR,
opponent_in_the_final VARCHAR
) | What was the score for alcoba a when the opponent was in the final of xinyun han? | SELECT score FROM table_name_27 WHERE tournament = "alcobaça" AND opponent_in_the_final = "xinyun han" | sql_create_context |
CREATE TABLE t_kc22 (
MED_EXP_DET_ID text,
OVERALL_CD_ORG text,
OVERALL_CD_PERSON text,
MED_CLINIC_ID text,
MED_EXP_BILL_ID text,
SOC_SRT_DIRE_CD text,
SOC_SRT_DIRE_NM text,
DIRE_TYPE number,
CHA_ITEM_LEV number,
MED_INV_ITEM_TYPE text,
MED_DIRE_CD text,
MED_DIRE_NM text,... | 从二00四年八月八日到二0一九年九月三日这段时间内,患者75340002开出的药品有多少是自费金额高于8808.11元的 | SELECT COUNT(*) FROM t_kc21 JOIN t_kc22 ON t_kc21.MED_CLINIC_ID = t_kc22.MED_CLINIC_ID WHERE t_kc21.PERSON_ID = '75340002' AND t_kc22.STA_DATE BETWEEN '2004-08-08' AND '2019-09-03' AND t_kc22.SELF_PAY_AMO > 8808.11 | css |
CREATE TABLE publication_keyword (
kid int,
pid int
)
CREATE TABLE domain_author (
aid int,
did int
)
CREATE TABLE writes (
aid int,
pid int
)
CREATE TABLE domain_conference (
cid int,
did int
)
CREATE TABLE conference (
cid int,
homepage varchar,
name varchar
)
CREATE T... | return me the paper after 2000 with the most citations . | SELECT title FROM publication WHERE year > 2000 ORDER BY citation_num DESC LIMIT 1 | academic |
CREATE TABLE table_name_78 (
Id VARCHAR
) | what is 1955 when 1961 is n/a? | SELECT 1955 FROM table_name_78 WHERE 1961 = "n/a" | sql_create_context |
CREATE TABLE table_name_18 (
attendance INTEGER,
week VARCHAR
) | What is the smallest attendance in week 5? | SELECT MIN(attendance) FROM table_name_18 WHERE week = 5 | 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
) | Return a bar chart on what is the total revenue of each manufacturer?, rank by the Name in asc. | SELECT Name, SUM(Revenue) FROM Manufacturers GROUP BY Name ORDER BY Name | nvbench |
CREATE TABLE table_name_91 (
resolution VARCHAR,
dish VARCHAR
) | Name the resolution with dish of 8126 | SELECT resolution FROM table_name_91 WHERE dish = "8126" | sql_create_context |
CREATE TABLE table_name_77 (
country VARCHAR,
score VARCHAR
) | The score of 73-71-70=214 belongs to what country? | SELECT country FROM table_name_77 WHERE score = 73 - 71 - 70 = 214 | sql_create_context |
CREATE TABLE table_2900 (
"No. in series" real,
"No. in season" real,
"Title" text,
"Directed by" text,
"Written by" text,
"Original air date" text,
"U.S. viewers (millions)" text
) | What's the series number of the episode directed by Skipp Sudduth? | SELECT "No. in series" FROM table_2900 WHERE "Directed by" = 'Skipp Sudduth' | 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 prescription... | get me patient 61500's hospial admission time since 2105. | SELECT admissions.admittime FROM admissions WHERE admissions.subject_id = 61500 AND STRFTIME('%y', admissions.admittime) >= '2105' | mimic_iii |
CREATE TABLE table_name_65 (
álbum VARCHAR,
year VARCHAR
) | What lbum was in the year 1996? | SELECT álbum FROM table_name_65 WHERE year = 1996 | sql_create_context |
CREATE TABLE table_name_95 (
score VARCHAR,
date VARCHAR
) | What was the score of the March 14 game? | SELECT score FROM table_name_95 WHERE date = "march 14" | sql_create_context |
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 ... | until 2103, what are the top five most common procedures? | SELECT d_icd_procedures.short_title FROM d_icd_procedures WHERE d_icd_procedures.icd9_code IN (SELECT t1.icd9_code FROM (SELECT procedures_icd.icd9_code, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM procedures_icd WHERE STRFTIME('%y', procedures_icd.charttime) <= '2103' GROUP BY procedures_icd.icd9_code) AS t1... | mimic_iii |
CREATE TABLE table_46394 (
"Rank" real,
"Player" text,
"Club(s)" text,
"Year(s)" text,
"U-17 Caps" real
) | What rank is the team that has a player named Isco Alarc n? | SELECT "Rank" FROM table_46394 WHERE "Player" = 'isco alarcón' | 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
)
... | count the number of patients whose discharge location is home health care and diagnoses long title is other abnormal blood chemistry? | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE demographic.discharge_location = "HOME HEALTH CARE" AND diagnoses.long_title = "Other abnormal blood chemistry" | mimicsql_data |
CREATE TABLE club (
Club_ID int,
name text,
Region text,
Start_year text
)
CREATE TABLE competition (
Competition_ID int,
Year real,
Competition_type text,
Country text
)
CREATE TABLE club_rank (
Rank real,
Club_ID int,
Gold real,
Silver real,
Bronze real,
Total... | List the positions of players whose average number of points scored by that position is larger than 20, give me a bar chart showing the number of different positions, and I want to list by the Y in descending. | SELECT Position, COUNT(Position) FROM player GROUP BY Position HAVING AVG(Points) >= 20 ORDER BY COUNT(Position) DESC | 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... | 名为奚芳蕤的患者过去有过什么异常情况么? | SELECT * FROM person_info JOIN hz_info JOIN mzjzjlb JOIN zyjybgb 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 = zyjybgb.YLJGDM_MZJZJLB AND mzjzjlb.JZLSH = zyjybgb.JZLSH_MZJZJLB AND zyjybgb.YLJGDM = jyjgzb... | css |
CREATE TABLE table_2572788_1 (
town_city VARCHAR,
station VARCHAR
) | In what city or town is Stratford (limited service)? | SELECT town_city FROM table_2572788_1 WHERE station = "Stratford (Limited service)" | sql_create_context |
CREATE TABLE table_2676980_4 (
participating_parties VARCHAR,
registered_voters VARCHAR
) | What is the number of participating parties when registered voters totaled 643629? | SELECT COUNT(participating_parties) FROM table_2676980_4 WHERE registered_voters = 643629 | sql_create_context |
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 locations (
LOCATION_ID decimal(4,0),
STREET_ADDRESS varchar(40),
POSTAL_CODE varchar(12),
CITY varchar(30),
STATE_PROVINCE varchar(... | 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 time. | SELECT HIRE_DATE, SUM(DEPARTMENT_ID) FROM employees WHERE FIRST_NAME LIKE '%D%' OR FIRST_NAME LIKE '%S%' | nvbench |
CREATE TABLE t_kc24 (
MED_SAFE_PAY_ID text,
OVERALL_CD_ORG text,
OVERALL_CD_PERSON text,
MED_CLINIC_ID text,
REF_SLT_FLG number,
CLINIC_SLT_DATE time,
COMP_ID text,
PERSON_ID text,
FLX_MED_ORG_ID text,
INSU_TYPE text,
MED_AMOUT number,
PER_ACC_PAY number,
OVE_PAY numb... | 患者61218284被开出过药品2524-6在哪几家医院? | SELECT MED_SER_ORG_NO FROM t_kc21 WHERE PERSON_ID = '61218284' AND MED_CLINIC_ID IN (SELECT MED_CLINIC_ID FROM t_kc22 WHERE SOC_SRT_DIRE_CD = '2524-6') | css |
CREATE TABLE microbiologyevents (
row_id number,
subject_id number,
hadm_id number,
charttime time,
spec_type_desc text,
org_name text
)
CREATE TABLE labevents (
row_id number,
subject_id number,
hadm_id number,
itemid number,
charttime time,
valuenum number,
valueuo... | when was the first time that the arterial bp [systolic] of patient 21079 was measured / taken? | SELECT chartevents.charttime 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 = 21079)) AND chartevents.itemid IN (SELECT d_items.itemid FROM d_items WHERE d_items.label = 'arterial... | mimic_iii |
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,
... | 患者93292938的自付比例低于0.34的药品量在2005年2月13日到2020年12月30日之间有多少? | SELECT COUNT(*) FROM t_kc21 JOIN t_kc22 ON t_kc21.MED_CLINIC_ID = t_kc22.MED_CLINIC_ID WHERE t_kc21.PERSON_ID = '93292938' AND t_kc22.STA_DATE BETWEEN '2005-02-13' AND '2020-12-30' AND t_kc22.SELF_PAY_PRO < 0.34 | css |
CREATE TABLE table_61820 (
"Rank" real,
"Gold" real,
"Silver" real,
"Bronze" real,
"Total" real
) | What's the bronze medal count when the silver is less than 3 and the gold is 1? | SELECT SUM("Bronze") FROM table_61820 WHERE "Gold" = '1' AND "Silver" < '3' | wikisql |
CREATE TABLE demographic (
subject_id text,
hadm_id text,
name text,
marital_status text,
age text,
dob text,
gender text,
language text,
religion text,
admission_type text,
days_stay text,
insurance text,
ethnicity text,
expire_flag text,
admission_location t... | count the number of patients whose age is less than 50 and diagnoses long title is persistent postoperative fistula? | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE demographic.age < "50" AND diagnoses.long_title = "Persistent postoperative fistula" | mimicsql_data |
CREATE TABLE table_5358 (
"English" text,
"Italian" text,
"French" text,
"German" text,
"Russian" text,
"Spanish" text
) | what is the english word for cavallo | SELECT "English" FROM table_5358 WHERE "Italian" = 'cavallo' | wikisql |
CREATE TABLE table_66941 (
"Game" real,
"Date" text,
"Location" text,
"Time" text,
"Attendance" real
) | what is the location of game 4? | SELECT "Location" FROM table_66941 WHERE "Game" = '4' | wikisql |
CREATE TABLE table_name_63 (
score VARCHAR,
team_1 VARCHAR
) | What was the score of the match where paris sg (d1) was team 1? | SELECT score FROM table_name_63 WHERE team_1 = "paris sg (d1)" | sql_create_context |
CREATE TABLE table_25326 (
"Game" real,
"Date" text,
"Opponent" text,
"Result" text,
"Cowboys points" real,
"Opponents" real,
"Record" text
) | Name the number of record for 12 cowboys points | SELECT COUNT("Record") FROM table_25326 WHERE "Cowboys points" = '12' | wikisql |
CREATE TABLE table_name_93 (
organization VARCHAR,
finish VARCHAR
) | Which organization has a Finish of 4th? | SELECT organization FROM table_name_93 WHERE finish = "4th" | 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... | 把医院4560557全部医疗就诊的记录里民政补助的金额比上全部的医疗费用额度的最大比值参照不同的科室编号和不同的入院诊断疾病的编号列一下,并且把结果从大到小排出来 | SELECT gwyjzb.MED_ORG_DEPT_CD, gwyjzb.IN_DIAG_DIS_NM, MAX(t_kc24.CIVIL_SUBSIDY) FROM gwyjzb JOIN t_kc24 ON gwyjzb.MED_CLINIC_ID = t_kc24.MED_CLINIC_ID WHERE gwyjzb.MED_SER_ORG_NO = '4560557' GROUP BY gwyjzb.MED_ORG_DEPT_CD, gwyjzb.IN_DIAG_DIS_NM ORDER BY MAX(t_kc24.CIVIL_SUBSIDY / t_kc24.MED_AMOUT) DESC UNION SELECT fg... | css |
CREATE TABLE table_6244 (
"Windows" text,
"Mac OS X" text,
"Linux" text,
"Other Unix" text,
"AmigaOS" text,
"Android" text,
"Windows Mobile" text
) | Which Android has anOther Unix of unknown? | SELECT "Android" FROM table_6244 WHERE "Other Unix" = 'unknown' | wikisql |
CREATE TABLE table_12633 (
"Golden Rivers" text,
"Wins" real,
"Byes" real,
"Losses" real,
"Draws" real,
"Against" real
) | What was the lowest draw when the against was larger than 2638? | SELECT MIN("Draws") FROM table_12633 WHERE "Against" > '2638' | wikisql |
CREATE TABLE jybgb_jyjgzbb (
JYZBLSH number,
YLJGDM text,
jyjgzbb_id number
)
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,
... | 查询7241145医疗机构从08年7月10日到12年10月17日开过多少检验报告 | SELECT COUNT(*) FROM jybgb WHERE jybgb.YLJGDM = '7241145' AND jybgb.BGRQ BETWEEN '2008-07-10' AND '2012-10-17' | css |
CREATE TABLE table_name_2 (
party VARCHAR,
end_date VARCHAR
) | Name the party with end date of 22 november 1980 | SELECT party FROM table_name_2 WHERE end_date = "22 november 1980" | sql_create_context |
CREATE TABLE table_name_11 (
frequency VARCHAR,
part_number_s_ VARCHAR
) | What is Frequency, when Part Number(s) is au80610006240aa? | SELECT frequency FROM table_name_11 WHERE part_number_s_ = "au80610006240aa" | sql_create_context |
CREATE TABLE table_56516 (
"Home team" text,
"Home team score" text,
"Away team" text,
"Away team score" text,
"Venue" text,
"Crowd" real,
"Date" text
) | If the home team playing is hawthorn and there are more than 13,000 people in the crowd, what did the away team score? | SELECT "Away team score" FROM table_56516 WHERE "Crowd" > '13,000' AND "Home team" = 'hawthorn' | wikisql |
CREATE TABLE table_49812 (
"Date From" text,
"Date To" text,
"Pos." text,
"Name" text,
"Moving To" text
) | What is Date From, when Moving To is 'Birmingham City'? | SELECT "Date From" FROM table_49812 WHERE "Moving To" = 'birmingham city' | wikisql |
CREATE TABLE table_name_24 (
score VARCHAR,
date VARCHAR
) | What was the score of the game on May 26? | SELECT score FROM table_name_24 WHERE date = "may 26" | sql_create_context |
CREATE TABLE table_34490 (
"Week 1 Sept 2" text,
"Week 2 Sept 7" text,
"Week 3 Sept 14" text,
"Week 5 Sept 28" text,
"Week 6 Oct 5" text,
"Week 7 Oct 12" text,
"Week 10 Nov 2" text,
"Week 13 Nov 23" text,
"Week 14 Nov 30" text,
"Week 15 Dec 7" text,
"Week 16 (Final) Jan 9" te... | Which Week 2 Sept 7 has a Week 7 Oct 12 of ball state (7-0)? | SELECT "Week 2 Sept 7" FROM table_34490 WHERE "Week 7 Oct 12" = 'ball state (7-0)' | 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... | 从00年八月二十六日到一一年三月二日,医疗机构2367774给患者任秀竹做过多少次检查 | 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 '2000-08-26' AND '2011-03-02' AND t_kc21.MED_SER_ORG_NO = '2367774' AND t_kc22.MED_INV_ITEM... | css |
CREATE TABLE class_of_service (
booking_class varchar,
rank int,
class_description text
)
CREATE TABLE airport (
airport_code varchar,
airport_name text,
airport_location text,
state_code varchar,
country_name varchar,
time_zone_code varchar,
minimum_connect_time int
)
CREATE T... | i'd like a flight on AA from NEWARK to NASHVILLE | 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 = 'NASHVILLE' AND CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'NEW... | atis |
CREATE TABLE table_name_50 (
producer_s_ VARCHAR,
director_s_ VARCHAR
) | Which producer did Daniel Cormack direct? | SELECT producer_s_ FROM table_name_50 WHERE director_s_ = "daniel cormack" | sql_create_context |
CREATE TABLE table_17288869_7 (
date VARCHAR,
high_rebounds VARCHAR
) | On what day did Dirk Nowitzki (14) have a high rebound? | SELECT date FROM table_17288869_7 WHERE high_rebounds = "Dirk Nowitzki (14)" | sql_create_context |
CREATE TABLE procedures (
code number,
name text,
cost number
)
CREATE TABLE nurse (
employeeid number,
name text,
position text,
registered boolean,
ssn number
)
CREATE TABLE room (
roomnumber number,
roomtype text,
blockfloor number,
blockcode number,
unavailable ... | What is the name of the nurse has the most appointments? | SELECT T1.name FROM nurse AS T1 JOIN appointment AS T2 ON T1.employeeid = T2.prepnurse GROUP BY T1.employeeid ORDER BY COUNT(*) DESC LIMIT 1 | spider |
CREATE TABLE college (
cname text,
state text,
enr number
)
CREATE TABLE player (
pid number,
pname text,
ycard text,
hs number
)
CREATE TABLE tryout (
pid number,
cname text,
ppos text,
decision text
) | What is the count of states with college students playing in the mid position but not as goalies? | SELECT COUNT(*) FROM (SELECT T1.state FROM college AS T1 JOIN tryout AS T2 ON T1.cname = T2.cname WHERE T2.ppos = 'mid' EXCEPT SELECT T1.state FROM college AS T1 JOIN tryout AS T2 ON T1.cname = T2.cname WHERE T2.ppos = 'goalie') | spider |
CREATE TABLE table_3516 (
"Episode #" text,
"Season Episode #" text,
"Title" text,
"Directed by" text,
"Written by" text,
"Original air date" text,
"Prod. code" text
) | What is the number of titles written by Charleen Easton? | SELECT COUNT("Title") FROM table_3516 WHERE "Written by" = 'Charleen Easton' | wikisql |
CREATE TABLE treatment (
treatmentid number,
patientunitstayid number,
treatmentname text,
treatmenttime time
)
CREATE TABLE allergy (
allergyid number,
patientunitstayid number,
drugname text,
allergyname text,
allergytime time
)
CREATE TABLE diagnosis (
diagnosisid number,
... | what were the five most commonly ordered microbiology tests for patients who previously received a insulin - sliding scale administration during the same month since 2105? | SELECT t3.culturesite FROM (SELECT t2.culturesite, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM (SELECT patient.uniquepid, treatment.treatmenttime FROM treatment JOIN patient ON treatment.patientunitstayid = patient.patientunitstayid WHERE treatment.treatmentname = 'insulin - sliding scale administration' AND ... | eicu |
CREATE TABLE table_38482 (
"Year" real,
"Domestic passengers" real,
"International passengers" real,
"Total passengers" real,
"Change" text
) | what total number of passengers is domestic and larger than 2,803,907 and a year after 1999? | SELECT COUNT("Total passengers") FROM table_38482 WHERE "Domestic passengers" = '2,803,907' AND "Year" > '1999' | wikisql |
CREATE TABLE table_name_17 (
record VARCHAR,
location_attendance VARCHAR
) | What is Record, when Location Attendance is 'TD Banknorth Garden 18,624'? | SELECT record FROM table_name_17 WHERE location_attendance = "td banknorth garden 18,624" | sql_create_context |
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 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, return a line chart about the change of manager_id over hire_date , and show X-axis from high to low order. | SELECT HIRE_DATE, MANAGER_ID FROM employees WHERE NOT EMPLOYEE_ID IN (SELECT EMPLOYEE_ID FROM job_history) ORDER BY HIRE_DATE DESC | nvbench |
CREATE TABLE table_50665 (
"Opposing Team" text,
"Against" real,
"Date" text,
"Venue" text,
"Status" text
) | Sum of cuyo selection as the opposing team? | SELECT SUM("Against") FROM table_50665 WHERE "Opposing Team" = 'cuyo selection' | wikisql |
CREATE TABLE table_1333612_1 (
native_american VARCHAR,
whites VARCHAR
) | how many native american with whites being 1.0% | SELECT COUNT(native_american) FROM table_1333612_1 WHERE whites = "1.0%" | sql_create_context |
CREATE TABLE table_name_86 (
first_elected INTEGER,
incumbent VARCHAR
) | When was the earliest incumbent dave reichert was first elected? | SELECT MIN(first_elected) FROM table_name_86 WHERE incumbent = "dave reichert" | sql_create_context |
CREATE TABLE medication (
medicationid number,
patientunitstayid number,
drugname text,
dosage text,
routeadmin text,
drugstarttime time,
drugstoptime time
)
CREATE TABLE microlab (
microlabid number,
patientunitstayid number,
culturesite text,
organism text,
culturetake... | what's the four year survival rate of a person diagnosed with s/p thoracotomy - decortication? | SELECT SUM(CASE WHEN patient.hospitaldischargestatus = 'alive' THEN 1 WHEN STRFTIME('%j', patient.hospitaldischargetime) - STRFTIME('%j', t2.diagnosistime) > 4 * 365 THEN 1 ELSE 0 END) * 100 / COUNT(*) FROM (SELECT t1.uniquepid, t1.diagnosistime FROM (SELECT patient.uniquepid, diagnosis.diagnosistime FROM diagnosis JOI... | eicu |
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 (
subject_id text,
hadm_id text,
icustay_id text,
drug_type text,
drug text,
formulary_drug_cd text,
... | what is the date of death of patient name kelly gallardo? | SELECT demographic.dod FROM demographic WHERE demographic.name = "Kelly Gallardo" | mimicsql_data |
CREATE TABLE table_204_489 (
id number,
"rank" number,
"name" text,
"height" text,
"floors" number,
"year" number,
"notes" text
) | which building has the most floors according to this chart ? | SELECT "name" FROM table_204_489 ORDER BY "floors" DESC LIMIT 1 | squall |
CREATE TABLE table_204_604 (
id number,
"year" number,
"date" text,
"driver" text,
"team" text,
"manufacturer" text,
"race distance\nlaps" number,
"race distance\nmiles (km)" text,
"race time" text,
"average speed\n(mph)" number,
"report" text
) | how many laps did matt kenset complete on february 26 , 2006 . | SELECT "race distance\nlaps" FROM table_204_604 WHERE "date" = 'february 26' | squall |
CREATE TABLE table_18977 (
"Game" real,
"Date" text,
"Team" text,
"Score" text,
"High points" text,
"High rebounds" text,
"High assists" text,
"Location Attendance" text,
"Series" text
) | What was the series count at on May 23? | SELECT "Series" FROM table_18977 WHERE "Date" = 'May 23' | wikisql |
CREATE TABLE table_64937 (
"Player" text,
"Int'l Debut" text,
"Year" text,
"Cross Code Debut" text,
"Date" text
) | What is Bev Risman's Cross Code Debut? | SELECT "Cross Code Debut" FROM table_64937 WHERE "Player" = 'bev risman' | wikisql |
CREATE TABLE table_26681728_1 (
rank_final INTEGER,
score_final VARCHAR
) | What was the maximum rank-final value for a score of 14.975? | SELECT MAX(rank_final) FROM table_26681728_1 WHERE score_final = "14.975" | sql_create_context |
CREATE TABLE table_77624 (
"Home team" text,
"Home team score" text,
"Away team" text,
"Away team score" text,
"Venue" text,
"Crowd" real,
"Date" text
) | When the Home team scored 14.14 (98), what did the Away Team score? | SELECT "Away team score" FROM table_77624 WHERE "Home team score" = '14.14 (98)' | wikisql |
CREATE TABLE table_45340 (
"Date" text,
"Venue" text,
"Score" text,
"Result" text,
"Competition" text
) | what is the venue when the date is 16 january 1996? | SELECT "Venue" FROM table_45340 WHERE "Date" = '16 january 1996' | wikisql |
CREATE TABLE table_793 (
"District" text,
"Incumbent" text,
"Party" text,
"First elected" text,
"Result" text,
"Candidates" text
) | What was the winning party when the incumbent was richard s. whaley? | SELECT "Party" FROM table_793 WHERE "Incumbent" = 'Richard S. Whaley' | wikisql |
CREATE TABLE table_64606 (
"Rank" real,
"Athletes" text,
"Country" text,
"Time" text,
"Notes" text
) | What are the notes for the time at 3:19.167? | SELECT "Notes" FROM table_64606 WHERE "Time" = '3:19.167' | wikisql |
CREATE TABLE advisor (
s_ID varchar(5),
i_ID varchar(5)
)
CREATE TABLE instructor (
ID varchar(5),
name varchar(20),
dept_name varchar(20),
salary numeric(8,2)
)
CREATE TABLE classroom (
building varchar(15),
room_number varchar(7),
capacity numeric(4,0)
)
CREATE TABLE prereq (
... | Bar chart of minimal salary from each dept name, and list in descending by the X-axis please. | SELECT dept_name, MIN(salary) FROM instructor GROUP BY dept_name ORDER BY dept_name DESC | nvbench |
CREATE TABLE table_name_41 (
year INTEGER,
attendance VARCHAR
) | When was the earliest year when the attendance was 77,254? | SELECT MIN(year) FROM table_name_41 WHERE attendance = 77 OFFSET 254 | sql_create_context |
CREATE TABLE table_72859 (
"1st throw" real,
"2nd throw" real,
"3rd throw" text,
"Equation" text,
"Result" real
) | What is the result when the 3rd throw is not 8? | SELECT MIN("Result") FROM table_72859 WHERE "3rd throw" = 'not 8' | wikisql |
CREATE TABLE table_name_94 (
erp_w INTEGER,
call_sign VARCHAR
) | What is the highest ERP W of the translator with a call sign of w284av? | SELECT MAX(erp_w) FROM table_name_94 WHERE call_sign = "w284av" | sql_create_context |
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... | what is minimum age of patients whose gender is m and discharge location is left against medical advi? | SELECT MIN(demographic.age) FROM demographic WHERE demographic.gender = "M" AND demographic.discharge_location = "LEFT AGAINST MEDICAL ADVI" | mimicsql_data |
CREATE TABLE allergy (
allergyid number,
patientunitstayid number,
drugname text,
allergyname text,
allergytime time
)
CREATE TABLE lab (
labid number,
patientunitstayid number,
labname text,
labresult number,
labresulttime time
)
CREATE TABLE microlab (
microlabid number,
... | what was the daily minimum amount of urine given to patient 013-28507 in their current hospital encounter? | SELECT MIN(intakeoutput.cellvaluenumeric) FROM intakeoutput WHERE intakeoutput.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '013-28507' AND patient.hospitaldischargetime IS ... | eicu |
CREATE TABLE PostTags (
PostId number,
TagId number
)
CREATE TABLE CloseReasonTypes (
Id number,
Name text,
Description text
)
CREATE TABLE ReviewTaskStates (
Id number,
Name text,
Description text
)
CREATE TABLE CloseAsOffTopicReasonTypes (
Id number,
IsUniversal boolean,
... | Posts that start with a lower case letter. | SELECT p.CreationDate, CASE WHEN (2 = p.PostTypeId) THEN 'Answer' ELSE 'Question' END AS PostType, p.Score, CASE WHEN (2 = p.PostTypeId) THEN t.Title ELSE p.Title END AS QuestionTitle, p.Body, p.Id AS "post_link" FROM Posts AS p LEFT OUTER JOIN Posts AS t ON (p.ParentId = t.Id) WHERE 1 = 1 AND p.CreationDate >= DATEADD... | sede |
CREATE TABLE table_27155243_4 (
written_by VARCHAR,
episode__number VARCHAR
) | How many items appear in the written by column in episode 3? | SELECT COUNT(written_by) FROM table_27155243_4 WHERE episode__number = 3 | sql_create_context |
CREATE TABLE table_13762472_5 (
high_points VARCHAR,
record VARCHAR
) | Who had the high point total when the team was 24-17? | SELECT high_points FROM table_13762472_5 WHERE record = "24-17" | sql_create_context |
CREATE TABLE table_1277350_1 (
sunday_sōl__sun_ VARCHAR,
friday_venus__venus_ VARCHAR
) | what's the sunday s l (sun) with friday venus (venus) being vernes | SELECT sunday_sōl__sun_ FROM table_1277350_1 WHERE friday_venus__venus_ = "vernes" | sql_create_context |
CREATE TABLE Purchases (
purchase_transaction_id INTEGER,
purchase_details VARCHAR(255)
)
CREATE TABLE Sales (
sales_transaction_id INTEGER,
sales_details VARCHAR(255)
)
CREATE TABLE Ref_Transaction_Types (
transaction_type_code VARCHAR(10),
transaction_type_description VARCHAR(80)
)
CREATE T... | Bin all date of transactions into the weekday interval, and sum the share count of each bin Return the result using a bar chart, list in descending by the y axis please. | SELECT date_of_transaction, SUM(share_count) FROM Transactions ORDER BY SUM(share_count) DESC | nvbench |
CREATE TABLE table_name_72 (
away_team VARCHAR,
venue VARCHAR
) | What is the name of the away team with glenferrie oval venue? | SELECT away_team FROM table_name_72 WHERE venue = "glenferrie oval" | sql_create_context |
CREATE TABLE procedures (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE diagnoses (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE lab (
subject_id text,
hadm_id text,
... | provide the number of patients whose drug code is ambi5? | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE prescriptions.formulary_drug_cd = "AMBI5" | mimicsql_data |
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 type is elective and diagnoses icd9 code is 70703? | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE demographic.admission_type = "ELECTIVE" AND diagnoses.icd9_code = "70703" | mimicsql_data |
CREATE TABLE table_name_89 (
elevator VARCHAR,
elector VARCHAR,
elevated VARCHAR,
nationality VARCHAR
) | Which Elevator has Elevated of april 12, 1281, a Nationality of french, and an Elector of jean cholet? | SELECT elevator FROM table_name_89 WHERE elevated = "april 12, 1281" AND nationality = "french" AND elector = "jean cholet" | sql_create_context |
CREATE TABLE table_name_28 (
first_year_aired VARCHAR,
prize VARCHAR
) | What was the first year that had a prize of 50,000? | SELECT first_year_aired FROM table_name_28 WHERE prize = "50,000" | 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, return a bar chart about the distribution of name and the sum of price , and group by attribute name, and order y axis in descending order. | SELECT T1.Name, T1.Price FROM Products AS T1 JOIN Manufacturers AS T2 ON T1.Manufacturer = T2.Code GROUP BY T1.Name ORDER BY T1.Price DESC | nvbench |
CREATE TABLE table_77853 (
"Building" text,
"Height" text,
"Floors" real,
"Year" real,
"Status" text
) | What is the status of the building with more than 28 floor and a year of 2013? | SELECT "Status" FROM table_77853 WHERE "Floors" > '28' AND "Year" = '2013' | wikisql |
CREATE TABLE table_17497 (
".308 Winchester cartridge type" text,
"100 m group (mm)" text,
"100 m group ( MOA )" text,
"300 m group (mm)" text,
"300 m group ( MOA )" text
) | What are all the .308 Winchester cartridge types with 38 for the 300 m group (mm) | SELECT ".308 Winchester cartridge type" FROM table_17497 WHERE "300 m group (mm)" = '38' | wikisql |
CREATE TABLE lab (
subject_id text,
hadm_id text,
itemid text,
charttime text,
flag text,
value_unit text,
label text,
fluid text
)
CREATE TABLE procedures (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE prescription... | provide the number of patients whose year of death is less than or equal to 2179 and drug code is meth10sy? | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE demographic.dod_year <= "2179.0" AND prescriptions.formulary_drug_cd = "METH10SY" | mimicsql_data |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.