context
stringlengths
11
9.12k
question
stringlengths
0
1.06k
SQL
stringlengths
2
4.44k
source
stringclasses
28 values
CREATE TABLE table_26124171_1 ( team VARCHAR, series VARCHAR )
How many teams were in the series championnat de france formula renault 2.0?
SELECT team FROM table_26124171_1 WHERE series = "Championnat de France Formula Renault 2.0"
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 ...
is patient 25696's urea nitrogen last measured on the last hospital visit greater than second to last measured on the last hospital visit?
SELECT (SELECT labevents.valuenum FROM labevents WHERE labevents.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 25696 AND NOT admissions.dischtime IS NULL ORDER BY admissions.admittime DESC LIMIT 1) AND labevents.itemid IN (SELECT d_labitems.itemid FROM d_labitems WHERE d_labitems.l...
mimic_iii
CREATE TABLE table_24549777_1 ( player VARCHAR )
How man 3-dart averages did gary anderson have?
SELECT COUNT(3 AS _dart_average) FROM table_24549777_1 WHERE player = "Gary Anderson"
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...
列出医院0629805接诊67921466这位患者住院期间的就诊记录里,出院科室名字包括化疗的所有记录
SELECT * FROM hz_info JOIN zyjzjlb JOIN person_info_hz_info JOIN person_info ON hz_info.YLJGDM = zyjzjlb.YLJGDM AND hz_info.KH = zyjzjlb.KH AND hz_info.KLX = zyjzjlb.KLX AND person_info_hz_info.KH = hz_info.KH AND person_info_hz_info.KLX = hz_info.KLX AND person_info_hz_info.YLJGDM = hz_info.YLJGDM AND person_info_hz_i...
css
CREATE TABLE table_30120556_1 ( area__acres__ VARCHAR, civil_parish VARCHAR, townland VARCHAR )
What is the area of the civil parish kilworth and townland monadrishane?
SELECT area__acres__ FROM table_30120556_1 WHERE civil_parish = "Kilworth" AND townland = "Monadrishane"
sql_create_context
CREATE TABLE table_61421 ( "Name" text, "Street address" text, "Years as tallest" text, "Height ft ( m )" text, "Floors" real )
WHAT IS THE NAME WITH 01.0 10 light street?
SELECT "Name" FROM table_61421 WHERE "Street address" = '01.0 10 light street'
wikisql
CREATE TABLE table_61734 ( "Result" text, "Record" text, "Opponent" text, "Method" text, "Location" text )
What is the location when KO is the method, the result is a win, and the record is 2-0?
SELECT "Location" FROM table_61734 WHERE "Method" = 'ko' AND "Result" = 'win' AND "Record" = '2-0'
wikisql
CREATE TABLE region ( Region_id int, Region_code text, Region_name text ) CREATE TABLE affected_region ( Region_id int, Storm_ID int, Number_city_affected real ) CREATE TABLE storm ( Storm_ID int, Name text, Dates_active text, Max_speed int, Damage_millions_USD real, Nu...
For all storms with at least 1 death, show me the name and the total number of deaths with a bar chart, order by the bar in descending.
SELECT Name, Number_Deaths FROM storm WHERE Number_Deaths >= 1 ORDER BY Name DESC
nvbench
CREATE TABLE table_28307 ( "Branding" text, "Callsign" text, "Frequency" text, "Power (kW)" text, "Location" text )
What bran is the callsign dytc-fm?
SELECT "Branding" FROM table_28307 WHERE "Callsign" = 'DYTC-FM'
wikisql
CREATE TABLE table_2453243_5 ( written_by VARCHAR, no_in_series VARCHAR )
Who write episode number 48 in the series?
SELECT written_by FROM table_2453243_5 WHERE no_in_series = "48"
sql_create_context
CREATE TABLE departments ( DEPARTMENT_ID decimal(4,0), DEPARTMENT_NAME varchar(30), MANAGER_ID decimal(6,0), LOCATION_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(25...
For those employees who do not work in departments with managers that have ids between 100 and 200, show me about the distribution of job_id and commission_pct in a bar chart, and order in asc by the y axis.
SELECT JOB_ID, COMMISSION_PCT FROM employees WHERE NOT DEPARTMENT_ID IN (SELECT DEPARTMENT_ID FROM departments WHERE MANAGER_ID BETWEEN 100 AND 200) ORDER BY COMMISSION_PCT
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...
从03年5月9日到08年7月26日,医院5071294一共有多少住院医疗记录
SELECT COUNT(*) FROM t_kc21 WHERE MED_SER_ORG_NO = '5071294' AND IN_HOSP_DATE BETWEEN '2003-05-09' AND '2008-07-26' AND CLINIC_TYPE = '住院'
css
CREATE TABLE fgwyjzb ( CLINIC_ID text, CLINIC_TYPE text, COMP_ID text, DATA_ID text, DIFF_PLACE_FLG number, FERTILITY_STS number, FLX_MED_ORG_ID text, HOSP_LEV number, HOSP_STS number, IDENTITY_CARD text, INPT_AREA_BED text, INSURED_IDENTITY number, INSURED_STS text, ...
在医院6149241中,根据入院诊断疾病名称把不同疾病患者的平均年龄列一下
SELECT gwyjzb.IN_DIAG_DIS_NM, AVG(gwyjzb.PERSON_AGE) FROM gwyjzb WHERE gwyjzb.MED_SER_ORG_NO = '6149241' GROUP BY gwyjzb.IN_DIAG_DIS_NM UNION SELECT fgwyjzb.IN_DIAG_DIS_NM, AVG(fgwyjzb.PERSON_AGE) FROM fgwyjzb WHERE fgwyjzb.MED_SER_ORG_NO = '6149241' GROUP BY fgwyjzb.IN_DIAG_DIS_NM
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 departments ( DEPARTMENT_ID decimal(4,0), DEPARTMENT_NAME varchar(30), MANAGER_ID decimal(6,0), LOCATION_ID decimal(4,0) ) CREATE TABLE...
For those employees who was hired before 2002-06-21, draw a bar chart about the distribution of job_id and the average of employee_id , and group by attribute job_id, and show Y-axis in descending order.
SELECT JOB_ID, AVG(EMPLOYEE_ID) FROM employees WHERE HIRE_DATE < '2002-06-21' GROUP BY JOB_ID ORDER BY AVG(EMPLOYEE_ID) DESC
nvbench
CREATE TABLE table_4413 ( "Country" text, "Sales (X1000)" text, "No. of stores" real, "Sales area (m\u00b2)" real, "Sales per area" text, "Average store size (m\u00b2)" real )
What is the smallest sales area (m ) that has 4,094/m and more than 2 stores?
SELECT MIN("Sales area (m\u00b2)") FROM table_4413 WHERE "Sales per area" = '€4,094/m²' AND "No. of stores" > '2'
wikisql
CREATE TABLE table_41561 ( "Branch" text, "Address" text, "Neighborhood" text, "First branch opened" real, "Current branch opened" real )
What is the highest Current Branch Opened, when Neighborhood is W. Portland Park?
SELECT MAX("Current branch opened") FROM table_41561 WHERE "Neighborhood" = 'w. portland park'
wikisql
CREATE TABLE demographic ( subject_id text, hadm_id text, name text, marital_status text, age text, dob text, gender text, language text, religion text, admission_type text, days_stay text, insurance text, ethnicity text, expire_flag text, admission_location t...
what is the maximum age of patients primarily diagnosed with posterior communicating aneurysm/sda before the admission year 2203?
SELECT MAX(demographic.age) FROM demographic WHERE demographic.diagnosis = "POSTERIOR COMMUNICATING ANEURYSM/SDA" AND demographic.admityear >= "2203"
mimicsql_data
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...
在检验报告单09624967019上写明的所有检验指标的代码以及名称、结果定性、结果定量单位、结果定量、参考值范围下限与上限分别帮我列出来?
SELECT jyjgzbb.JCZBDM, jyjgzbb.JCZBMC, jyjgzbb.JCZBJGDX, jyjgzbb.JCZBJGDL, jyjgzbb.JCZBJGDW, jyjgzbb.CKZFWXX, jyjgzbb.CKZFWSX FROM jyjgzbb WHERE jyjgzbb.BGDH = '09624967019'
css
CREATE TABLE table_4590 ( "Home team" text, "Home team score" text, "Away team" text, "Away team score" text, "Venue" text, "Crowd" real, "Date" text )
On what Date is there a Home team score of 8.15 (63)?
SELECT "Date" FROM table_4590 WHERE "Home team score" = '8.15 (63)'
wikisql
CREATE TABLE semester ( semester_id int, semester varchar, year int ) CREATE TABLE gsi ( course_offering_id int, student_id int ) CREATE TABLE ta ( campus_job_id int, student_id int, location varchar ) CREATE TABLE comment_instructor ( instructor_id int, student_id int, sc...
What 300 -level classes do you have available for the Spring or Summer term ?
SELECT DISTINCT course.department, course.name, course.number, semester.semester FROM course, course_offering, semester WHERE course.course_id = course_offering.course_id AND course.department = 'EECS' AND course.number BETWEEN 300 AND 300 + 100 AND semester.semester IN ('SP', 'SS', 'SU') AND semester.semester_id = cou...
advising
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, ...
列出在医院0621051中患者04455332门诊诊断名称包含形式的门诊有什么就诊记录?
SELECT * FROM hz_info JOIN txmzjzjlb ON hz_info.YLJGDM = txmzjzjlb.YLJGDM AND hz_info.KH = txmzjzjlb.KH AND hz_info.KLX = txmzjzjlb.KLX WHERE hz_info.RYBH = '04455332' AND hz_info.YLJGDM = '0621051' AND txmzjzjlb.JZZDSM LIKE '%形式%' UNION SELECT * FROM hz_info JOIN ftxmzjzjlb ON hz_info.YLJGDM = ftxmzjzjlb.YLJGDM AND hz...
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, ...
团伙成员75834844最常去的医院排序提供一下
SELECT gwyjzb.MED_SER_ORG_NO FROM gwyjzb WHERE gwyjzb.PERSON_ID = '75834844' GROUP BY gwyjzb.MED_SER_ORG_NO ORDER BY COUNT(*) DESC UNION SELECT fgwyjzb.MED_SER_ORG_NO FROM fgwyjzb WHERE fgwyjzb.PERSON_ID = '75834844' GROUP BY fgwyjzb.MED_SER_ORG_NO ORDER BY COUNT(*) DESC
css
CREATE TABLE table_54764 ( "Home team" text, "Home team score" text, "Away team" text, "Away team score" text, "Venue" text, "Crowd" real, "Date" text )
What was the attendance when Essendon played as the home team?
SELECT COUNT("Crowd") FROM table_54764 WHERE "Home team" = 'essendon'
wikisql
CREATE TABLE College ( cName varchar(20), state varchar(2), enr numeric(5,0) ) CREATE TABLE Tryout ( pID numeric(5,0), cName varchar(20), pPos varchar(8), decision varchar(3) ) CREATE TABLE Player ( pID numeric(5,0), pName varchar(20), yCard varchar(3), HS numeric(5,0) )
Return a bar chart on what is the state and enrollment of the colleges where have any students who got accepted in the tryout decision.
SELECT state, enr FROM College AS T1 JOIN Tryout AS T2 ON T1.cName = T2.cName WHERE T2.decision = 'yes'
nvbench
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 total cars did chevrolet manufacture ?
SELECT COUNT(*) FROM table_204_604 WHERE "manufacturer" = 'chevrolet'
squall
CREATE TABLE table_13038 ( "Average population (x 1000)" real, "Live births" text, "Deaths" text, "Natural change" text, "Crude birth rate (per 1000)" real, "Crude death rate (per 1000)" real, "Natural change (per 1000)" real )
What is the highest crude death rate when deaths are 3 433 and average population is greater than 298?
SELECT MAX("Crude death rate (per 1000)") FROM table_13038 WHERE "Deaths" = '3 433' AND "Average population (x 1000)" > '298'
wikisql
CREATE TABLE table_57174 ( "Player" text, "Height" text, "School" text, "Hometown" text, "College" text )
How tall is nerlens noel?
SELECT "Height" FROM table_57174 WHERE "Player" = 'nerlens noel'
wikisql
CREATE TABLE table_77332 ( "C/W 15+" real, "Oblast\\Age" text, "15 to 17" real, "18 to 19" real, "20 to 24" real, "25 to 29" real, "30 to 34" real, "35 to 39" real, "40 to 44" real, "45 to 49" real, "50 to 54" real, "55 to 59" real, "60 to 64" real, "65 to 69" rea...
What is the number of 40 to 44 when the 50 to 54 is less than 4,184, and the 15 to 17 is less than 3?
SELECT COUNT("40 to 44") FROM table_77332 WHERE "50 to 54" < '4,184' AND "15 to 17" < '3'
wikisql
CREATE TABLE table_name_63 ( director_s_ VARCHAR, recipient VARCHAR )
Who directed the film that Avie Luthra received an award for?
SELECT director_s_ FROM table_name_63 WHERE recipient = "avie luthra"
sql_create_context
CREATE TABLE table_56904 ( "Home team" text, "Home team score" text, "Away team" text, "Away team score" text, "Venue" text, "Crowd" real, "Date" text )
What is the home score with a crowd larger than 25,603?
SELECT "Home team score" FROM table_56904 WHERE "Crowd" > '25,603'
wikisql
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...
患者19618355在二零一一年六月三十日以前的检验报告单是在哪些住院就诊的?列出住院就诊流水号
SELECT zyjzjlb.JZLSH FROM hz_info JOIN zyjzjlb JOIN hz_info_zyjzjlb ON hz_info.YLJGDM = hz_info_zyjzjlb.YLJGDM AND hz_info.KH = zyjzjlb.KH AND hz_info.KLX = zyjzjlb.KLX AND hz_info_zyjzjlb.JZLSH = zyjzjlb.JZLSH AND hz_info_zyjzjlb.YLJGDM = hz_info_zyjzjlb.YLJGDM AND hz_info_zyjzjlb.JZLSH = zyjzjlb.JZLSH AND hz_info_zyj...
css
CREATE TABLE table_name_34 ( Id VARCHAR )
What 2006 has q2 as the 2007?
SELECT 2006 FROM table_name_34 WHERE 2007 = "q2"
sql_create_context
CREATE TABLE diagnoses_icd ( row_id number, subject_id number, hadm_id number, icd9_code text, charttime time ) CREATE TABLE d_items ( row_id number, itemid number, label text, linksto text ) CREATE TABLE labevents ( row_id number, subject_id number, hadm_id number, ...
what were the three most frequent drugs prescribed to patients with an age 60 or above after they had been diagnosed with adv eff arom analgsc nec during a year before within 2 months?
SELECT t3.drug FROM (SELECT t2.drug, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM (SELECT admissions.subject_id, diagnoses_icd.charttime FROM diagnoses_icd JOIN admissions ON diagnoses_icd.hadm_id = admissions.hadm_id WHERE diagnoses_icd.icd9_code = (SELECT d_icd_diagnoses.icd9_code FROM d_icd_diagnoses WHERE ...
mimic_iii
CREATE TABLE table_43908 ( "Date" text, "Home team" text, "Score" text, "Away team" text, "Venue" text, "Crowd" real, "Box Score" text, "Report" text )
What was the score of the game which featured the gold coast blaze as the away team and the adelaide 36ers as the home team?
SELECT "Score" FROM table_43908 WHERE "Away team" = 'gold coast blaze' AND "Home team" = 'adelaide 36ers'
wikisql
CREATE TABLE table_name_72 ( year VARCHAR, status VARCHAR )
In what year is the status of won?
SELECT year FROM table_name_72 WHERE status = "won"
sql_create_context
CREATE TABLE table_70144 ( "Year" text, "Starts" real, "Cuts made" real, "Wins" real, "Top 10" real, "Top 25" real, "Earnings (\u20ac)" real, "Money list rank" real )
What is the sum of number of wins that have earnings of more than ( )2,864,342 and money list rank of 3?
SELECT SUM("Wins") FROM table_70144 WHERE "Earnings (\u20ac)" > '2,864,342' AND "Money list rank" = '3'
wikisql
CREATE TABLE allergy ( allergyid number, patientunitstayid number, drugname text, allergyname text, allergytime time ) CREATE TABLE treatment ( treatmentid number, patientunitstayid number, treatmentname text, treatmenttime time ) CREATE TABLE patient ( uniquepid text, pati...
what is the number of patients admitted to hospital since 2103?
SELECT COUNT(DISTINCT patient.uniquepid) FROM patient WHERE STRFTIME('%y', patient.hospitaladmittime) >= '2103'
eicu
CREATE TABLE table_44649 ( "Round" real, "Pick" real, "Overall" real, "Name" text, "Position" text, "College" text )
what is the highest round when the overall is less than 17?
SELECT MAX("Round") FROM table_44649 WHERE "Overall" < '17'
wikisql
CREATE TABLE jybgb ( BBCJBW text, BBDM text, BBMC text, BBZT number, BGDH text, BGJGDM text, BGJGMC text, BGRGH text, BGRQ time, BGRXM text, BGSJ time, CJRQ time, JSBBRQSJ time, JSBBSJ time, JYBBH text, JYJGMC text, JYJSGH text, JYJSQM text, JY...
20284523病人所有检验结果指标记录的检测员为李雅健的检验指标流水号是多少就在01年7月11日到2014年11月2日之间?
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 hz...
css
CREATE TABLE table_name_40 ( hometown VARCHAR, name VARCHAR )
What is Hasan Shah's hometown?
SELECT hometown FROM table_name_40 WHERE name = "hasan shah"
sql_create_context
CREATE TABLE diagnosis ( diagnosisid number, patientunitstayid number, diagnosisname text, diagnosistime time, icd9code text ) CREATE TABLE intakeoutput ( intakeoutputid number, patientunitstayid number, cellpath text, celllabel text, cellvaluenumeric number, intakeoutputtim...
list the top three most common drugs that patients are prescribed with during the same month after being diagnosed with hypocalcemia - due to rhabdomyolysis until 2 years ago.
SELECT t3.drugname FROM (SELECT t2.drugname, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM (SELECT patient.uniquepid, diagnosis.diagnosistime FROM diagnosis JOIN patient ON diagnosis.patientunitstayid = patient.patientunitstayid WHERE diagnosis.diagnosisname = 'hypocalcemia - due to rhabdomyolysis' AND DATETIME...
eicu
CREATE TABLE table_73538 ( "Date" text, "Opponent" text, "Location" text, "Irish Points" real, "Opp. Points" real, "Record" text )
what is the record where the opponent is central connecticut?
SELECT "Record" FROM table_73538 WHERE "Opponent" = 'Central Connecticut'
wikisql
CREATE TABLE table_29595 ( "Game" real, "Date" text, "Opponent" text, "Score" text, "First Star" text, "Decision" text, "Location" text, "Attendance" real, "Record" text, "Points" real )
What was the October 22 record?
SELECT "Record" FROM table_29595 WHERE "Date" = 'October 22'
wikisql
CREATE TABLE table_name_35 ( school VARCHAR, mascot VARCHAR )
Which School has a Mascot of squires?
SELECT school FROM table_name_35 WHERE mascot = "squires"
sql_create_context
CREATE TABLE table_name_95 ( attendance VARCHAR, week INTEGER )
What's the attendance when the week was more than 16?
SELECT attendance FROM table_name_95 WHERE week > 16
sql_create_context
CREATE TABLE diagnosis ( diagnosisid number, patientunitstayid number, diagnosisname text, diagnosistime time, icd9code text ) CREATE TABLE treatment ( treatmentid number, patientunitstayid number, treatmentname text, treatmenttime time ) CREATE TABLE allergy ( allergyid number...
did levaquin, dextrose 50 % in water (d50w) iv syringe, or d50 during this hospital encounter be prescribed to patient 018-20179?
SELECT COUNT(*) > 0 FROM medication WHERE medication.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '018-20179' AND patient.hospitaldischargetime IS NULL)) AND medication.drug...
eicu
CREATE TABLE jobs ( job_id int, job_title varchar, description varchar, requirement varchar, city varchar, state varchar, country varchar, zip int ) CREATE TABLE gsi ( course_offering_id int, student_id int ) CREATE TABLE area ( course_id int, area varchar ) CREATE TAB...
At what times is 473 taught during the Summer terms ?
SELECT DISTINCT course_offering.end_time, course_offering.friday, course_offering.monday, course_offering.saturday, course_offering.start_time, course_offering.sunday, course_offering.thursday, course_offering.tuesday, course_offering.wednesday FROM course, course_offering, semester WHERE course.course_id = course_offe...
advising
CREATE TABLE table_name_55 ( time VARCHAR, writer_s_ VARCHAR )
What is the time of songs that have the writer Aaron Schroeder and Wally Gold?
SELECT time FROM table_name_55 WHERE writer_s_ = "aaron schroeder and wally gold"
sql_create_context
CREATE TABLE table_32996 ( "Date" text, "Ship" text, "Nationality" text, "Tonnage" real, "Fate" text )
What was the tonnage of the Great Britain ship Batna?
SELECT "Tonnage" FROM table_32996 WHERE "Nationality" = 'great britain' AND "Ship" = 'batna'
wikisql
CREATE TABLE table_6919 ( "Season" text, "Games" real, "Lost" real, "Tied" real, "Points" real, "Goals for" real, "Goals against" real, "Coach" text )
What is the most points when the goals against are 354 and games less than 82?
SELECT MAX("Points") FROM table_6919 WHERE "Goals against" = '354' AND "Games" < '82'
wikisql
CREATE TABLE table_name_91 ( constructor VARCHAR, race_name VARCHAR )
Which constructor has a race called I News of the World Trophy?
SELECT constructor FROM table_name_91 WHERE race_name = "i news of the world trophy"
sql_create_context
CREATE TABLE table_24865763_2 ( rnd INTEGER, gt2_winning_team VARCHAR )
What was the maximum round where Marc Lieb Richard Lietz was on the GT2 Winning Team?
SELECT MAX(rnd) FROM table_24865763_2 WHERE gt2_winning_team = "Marc Lieb Richard Lietz"
sql_create_context
CREATE TABLE table_name_42 ( mintage INTEGER, year VARCHAR, theme VARCHAR )
What is the MIntage after 2006 of the Ruby-Throated Hummingbird Theme coin?
SELECT MAX(mintage) FROM table_name_42 WHERE year > 2006 AND theme = "ruby-throated hummingbird"
sql_create_context
CREATE TABLE table_1577 ( "Constituency" text, "Electorate" real, "Votes" real, "Turnout" text, "Yes" real, "No" real, "Spoilt" real, "Percent Yes" text )
Name the least yes for dublin south
SELECT MIN("Yes") FROM table_1577 WHERE "Constituency" = 'Dublin South'
wikisql
CREATE TABLE table_18209 ( "District" text, "Incumbent" text, "Party" text, "First elected" real, "Result" text, "Candidates" text )
how many candidates with party being democratic and dbeingtrict being new york5
SELECT COUNT("Candidates") FROM table_18209 WHERE "Party" = 'Democratic' AND "District" = 'New York5'
wikisql
CREATE TABLE table_11734041_16 ( height_in_ft VARCHAR, years_for_rockets VARCHAR )
What is the height in ft for the rockets from 1973-78?
SELECT height_in_ft FROM table_11734041_16 WHERE years_for_rockets = "1973-78"
sql_create_context
CREATE TABLE table_29729 ( "Game" real, "Date" text, "Team" text, "Score" text, "High points" text, "High rebounds" text, "High assists" text, "Location Attendance" text, "Record" text )
Name the high rebounds for charlotte
SELECT "High rebounds" FROM table_29729 WHERE "Team" = 'Charlotte'
wikisql
CREATE TABLE table_51557 ( "Date" text, "Opponent" text, "Score" text, "Loss" text, "Record" text, "Arena" text )
Who was the opponent at the Staples Center?
SELECT "Opponent" FROM table_51557 WHERE "Arena" = 'staples center'
wikisql
CREATE TABLE table_50722 ( "Rank" real, "Club" text, "Winners" real, "Runners-up" real, "Third" real )
Which club has 1 runners-up with 0 winners and 2 third place earned?
SELECT "Club" FROM table_50722 WHERE "Runners-up" = '1' AND "Winners" = '0' AND "Third" = '2'
wikisql
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 job_history ( EMPLOYEE_ID decimal(6,0), START_DATE date, END_DATE date, JOB_ID varchar(10), ...
For those employees who did not have any job in the past, return a bar chart about the distribution of hire_date and the sum of salary bin hire_date by weekday.
SELECT HIRE_DATE, SUM(SALARY) FROM employees WHERE NOT EMPLOYEE_ID IN (SELECT EMPLOYEE_ID FROM job_history)
nvbench
CREATE TABLE table_2668336_17 ( district VARCHAR, first_elected VARCHAR )
First elected in 1807 1817 in what district?
SELECT district FROM table_2668336_17 WHERE first_elected = "1807 1817"
sql_create_context
CREATE TABLE driver ( Driver_ID int, Name text, Party text, Home_city text, Age int ) CREATE TABLE school_bus ( School_ID int, Driver_ID int, Years_Working int, If_full_time bool ) CREATE TABLE school ( School_ID int, Grade text, School text, Location text, Type...
Show the type of school and the number of buses for each type in a bar chart, show by the Type in ascending.
SELECT Type, COUNT(*) FROM school_bus AS T1 JOIN school AS T2 ON T1.School_ID = T2.School_ID GROUP BY T2.Type ORDER BY Type
nvbench
CREATE TABLE table_78933 ( "Home (1st leg)" text, "Home (2nd leg)" text, "1st Leg" text, "2nd leg" text, "Aggregate" text )
What was the aggregate score that had a 1-2 second leg score?
SELECT "Aggregate" FROM table_78933 WHERE "2nd leg" = '1-2'
wikisql
CREATE TABLE customers ( customer_id number, customer_first_name text, customer_last_name text, customer_address text, customer_phone text, customer_email text, other_customer_details text ) CREATE TABLE accounts ( account_id number, customer_id number, account_name text, ot...
What are the different card type codes?
SELECT DISTINCT card_type_code FROM customers_cards
spider
CREATE TABLE table_name_28 ( type VARCHAR, moving_to VARCHAR )
what is the type movinig to alianza atl tico?
SELECT type FROM table_name_28 WHERE moving_to = "alianza atlético"
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 maximum age of patients whose gender is m and insurance is self pay?
SELECT MAX(demographic.age) FROM demographic WHERE demographic.gender = "M" AND demographic.insurance = "Self Pay"
mimicsql_data
CREATE TABLE cost ( costid number, uniquepid text, patienthealthsystemstayid number, eventtype text, eventid number, chargetime time, cost number ) CREATE TABLE diagnosis ( diagnosisid number, patientunitstayid number, diagnosisname text, diagnosistime time, icd9code tex...
tell me the drug that was prescribed to patient 029-7028 for the last time in their first hospital encounter?
SELECT medication.drugname FROM medication WHERE medication.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '029-7028' AND NOT patient.hospitaldischargetime IS NULL ORDER BY pa...
eicu
CREATE TABLE table_28031 ( "Player" text, "Position" text, "Starter" text, "Touchdowns" real, "Extra points" real, "Field goals" real, "Points" real )
How many maximum points did Curtis scored?
SELECT MAX("Points") FROM table_28031 WHERE "Player" = 'Curtis'
wikisql
CREATE TABLE table_204_772 ( id number, "team" text, "county" text, "wins" number, "years won" number )
what team comes before confey
SELECT "team" FROM table_204_772 WHERE id = (SELECT id FROM table_204_772 WHERE "team" = 'confey') - 1
squall
CREATE TABLE table_name_29 ( year INTEGER, partner VARCHAR, score VARCHAR )
what is the most recent year gardnar mulloy played as a partner and score was 12 10, 8 10, 12 10, 6 2?
SELECT MAX(year) FROM table_name_29 WHERE partner = "gardnar mulloy" AND score = "12–10, 8–10, 12–10, 6–2"
sql_create_context
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 ...
45721416246的检验报告单检验申请机构的名称是什么,检验机构的名称是什么
SELECT jybgb.JYSQJGMC, jybgb.JYJGMC FROM jybgb WHERE jybgb.BGDH = '45721416246'
css
CREATE TABLE table_71510 ( "Date" text, "Visiting Team" text, "Final Score" text, "Host Team" text, "Stadium" text )
At what stadium was the final score 31-28?
SELECT "Stadium" FROM table_71510 WHERE "Final Score" = '31-28'
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...
Questions answered before they were asked.
SELECT a.Id AS "post_link" FROM Posts AS q JOIN Posts AS a ON a.ParentId = q.Id WHERE q.CreationDate > a.CreationDate ORDER BY a.CreationDate DESC
sede
CREATE TABLE table_203_303 ( id number, "tribunal" text, "number of autos da fe" number, "executions in persona" number, "executions in effigie" number, "penanced" number, "total" number )
what was the only tribunal to pronounce zero sentences ?
SELECT "tribunal" FROM table_203_303 WHERE "total" = 0
squall
CREATE TABLE table_28001 ( "Episode #" real, "The W\u00f8rd" text, "Guest" text, "Introductory phrase" text, "Original airdate" text, "Production code" real )
How many introductory phrases are there with 'the w rd' is 'unrequited gov'?
SELECT COUNT("Introductory phrase") FROM table_28001 WHERE "The W\u00f8rd" = 'Unrequited Gov'
wikisql
CREATE TABLE diagnoses ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) CREATE TABLE procedures ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) CREATE TABLE lab ( subject_id text, hadm_id text, ...
what is the number of patients whose days of hospital stay is greater than 1 and diagnoses icd9 code is 3970?
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE demographic.days_stay > "1" AND diagnoses.icd9_code = "3970"
mimicsql_data
CREATE TABLE lab ( labid number, patientunitstayid number, labname text, labresult number, labresulttime time ) CREATE TABLE intakeoutput ( intakeoutputid number, patientunitstayid number, cellpath text, celllabel text, cellvaluenumeric number, intakeoutputtime time ) CREAT...
what was the total of the suprapubic urine output that patient 028-34632 had on the first icu visit?
SELECT SUM(intakeoutput.cellvaluenumeric) FROM intakeoutput WHERE intakeoutput.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '028-34632') AND NOT patient.unitdischargetime IS...
eicu
CREATE TABLE table_40750 ( "Tie no" text, "Home team" text, "Score" text, "Away team" text, "Date" text, "Attendance" real )
What was the Away Team of Blackpool's Home game?
SELECT "Away team" FROM table_40750 WHERE "Home team" = 'blackpool'
wikisql
CREATE TABLE table_24864 ( "No. in series" real, "Title" text, "Directed by" text, "Written by" text, "Original air date" text, "Production code" text )
Who wrote when the original airdate is April 5, 1987?
SELECT "Written by" FROM table_24864 WHERE "Original air date" = 'April 5, 1987'
wikisql
CREATE TABLE table_33293 ( "Home team" text, "Home team score" text, "Away team" text, "Away team score" text, "Venue" text, "Crowd" real, "Date" text )
At what venue did the match where the home team scored 8.6 (54) take place?
SELECT "Venue" FROM table_33293 WHERE "Home team score" = '8.6 (54)'
wikisql
CREATE TABLE microbiologyevents ( row_id number, subject_id number, hadm_id number, charttime time, spec_type_desc text, org_name text ) CREATE TABLE admissions ( row_id number, subject_id number, hadm_id number, admittime time, dischtime time, admission_type text, a...
is there any history of microbiology test results for patient 61751's bile during the last month?
SELECT COUNT(*) > 0 FROM microbiologyevents WHERE microbiologyevents.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 61751) AND microbiologyevents.spec_type_desc = 'bile' AND DATETIME(microbiologyevents.charttime, 'start of month') = DATETIME(CURRENT_TIME(), 'start of month', '-1 mon...
mimic_iii
CREATE TABLE table_58771 ( "Res." text, "Record" text, "Opponent" text, "Method" text, "Round" real, "Time" text, "Location" text )
What is Method, when Time is '3:20'?
SELECT "Method" FROM table_58771 WHERE "Time" = '3:20'
wikisql
CREATE TABLE table_27692 ( "Country" text, "Contestant" text, "Age" real, "Height (cm)" real, "Height (ft)" text, "Hometown" text )
What is the number of contestants who are 5'7' and exactly 26 years of age?
SELECT COUNT("Contestant") FROM table_27692 WHERE "Height (ft)" = '5''7' AND "Age" = '26'
wikisql
CREATE TABLE table_50881 ( "Rider" text, "Manufacturer" text, "Laps" real, "Time" text, "Grid" real )
What Rider has a Grid of 21?
SELECT "Rider" FROM table_50881 WHERE "Grid" = '21'
wikisql
CREATE TABLE table_9325 ( "Articulatory class" text, "Non- stop" text, "Plain stop" text, "Aspirated stop" text, "\"Muddy\" voice" text )
If the Plain stop is , what is the Non- stop?
SELECT "Non- stop" FROM table_9325 WHERE "Plain stop" = 'ㄷ'
wikisql
CREATE TABLE demographic ( subject_id text, hadm_id text, name text, marital_status text, age text, dob text, gender text, language text, religion text, admission_type text, days_stay text, insurance text, ethnicity text, expire_flag text, admission_location t...
find the number of patients on additive type drug prescription who have diagnoses icd9 code 78791.
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 = "78791" AND prescriptions.drug_type = "ADDITIVE"
mimicsql_data
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, ...
病人任阳焱在门诊诊断为2型糖尿病的检测指标983934的结果定量和单位是多少啊?
SELECT jyjgzbb.JCZBJGDL, jyjgzbb.JCZBJGDW 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 = jy...
css
CREATE TABLE table_name_26 ( position VARCHAR, overall VARCHAR )
WHAT POSITION IS 273?
SELECT position FROM table_name_26 WHERE overall = 273
sql_create_context
CREATE TABLE table_name_12 ( secretary VARCHAR, social_ao VARCHAR )
What Secretary has a Social AO of lieke de boer?
SELECT secretary FROM table_name_12 WHERE social_ao = "lieke de boer"
sql_create_context
CREATE TABLE table_name_84 ( year VARCHAR, points INTEGER )
What is the year that has points larger than 20?
SELECT COUNT(year) FROM table_name_84 WHERE points > 20
sql_create_context
CREATE TABLE d_labitems ( row_id number, itemid number, label text ) CREATE TABLE patients ( row_id number, subject_id number, gender text, dob time, dod time ) CREATE TABLE inputevents_cv ( row_id number, subject_id number, hadm_id number, icustay_id number, chartt...
has patient 20441 ever had a arterial bp [diastolic] of greater than 73.0 when they came to the hospital first time?
SELECT COUNT(*) > 0 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 = 20441 AND NOT admissions.dischtime IS NULL ORDER BY admissions.admittime LIMIT 1)) AND chartevents.itemid IN (...
mimic_iii
CREATE TABLE diagnoses ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) CREATE TABLE demographic ( subject_id text, hadm_id text, name text, marital_status text, age text, dob text, gender text, language text, religion text, ...
provide the number of patients whose lab test name is potassium, urine and lab test result is abnormal.
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE lab.flag = "abnormal" AND lab.label = "Potassium, Urine"
mimicsql_data
CREATE TABLE shop ( Shop_ID int, Address text, Num_of_staff text, Score real, Open_Year text ) CREATE TABLE member ( Member_ID int, Name text, Membership_card text, Age int, Time_of_purchase int, Level_of_membership int, Address text ) CREATE TABLE happy_hour ( HH_I...
Find the address and staff number of the shops that do not have any happy hour. Visualize by bar chart.
SELECT Address, Num_of_staff FROM shop WHERE NOT Shop_ID IN (SELECT Shop_ID FROM happy_hour)
nvbench
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, ...
indicate the daily maximum amount of heartrate for patient 002-4486 on the first icu visit.
SELECT MAX(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 = '002-4486') AND NOT patient.unitdischargetime IS NULL...
eicu
CREATE TABLE table_63644 ( "Model number" text, "sSpec number" text, "Frequency" text, "Turbo" text, "Cores" real, "L2 cache" text, "L3 cache" text, "I/O bus" text, "Mult." text, "Memory" text, "Voltage" text, "Socket" text, "Release date" text, "Part number(s)" t...
What's the release price of a processor that has a frequency of 3.2 ghz and 1 6.4 gt/s qpi I/O?
SELECT "Release price ( USD )" FROM table_63644 WHERE "Frequency" = '3.2 ghz' AND "I/O bus" = '1 × 6.4 gt/s qpi'
wikisql
CREATE TABLE table_49047 ( "Source Version" text, "Target Version" text, "Last Release" text, "License" text, "Website" text )
What is Website, when License is Apache License 2.0?
SELECT "Website" FROM table_49047 WHERE "License" = 'apache license 2.0'
wikisql
CREATE TABLE diagnoses ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) CREATE TABLE lab ( subject_id text, hadm_id text, itemid text, charttime text, flag text, value_unit text, label text, fluid text ) CREATE TABLE prescriptions...
Count the number of inpatient hospital admission patients who have neoplasm of uncertain behavior of other lymphatic and hematopoietic tissues/bone marrow transplant as their primary disease.
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.admission_location = "TRANSFER FROM HOSP/EXTRAM" AND demographic.diagnosis = "NEOPLASM OF UNCERTAIN BEHAVIOR OF OTHER LYMPHATIC AND HEMATOPOIETIC TISSUES\BONE MARROW TRANSPLANT"
mimicsql_data
CREATE TABLE table_204_547 ( id number, "rank" number, "lane" number, "name" text, "nationality" text, "time" number, "notes" text )
how many competitors competed in the semifinal 2 ?
SELECT COUNT("name") FROM table_204_547
squall
CREATE TABLE hz_info ( KH text, KLX number, RYBH text, YLJGDM text ) CREATE TABLE mzjzjlb_jybgb ( YLJGDM_MZJZJLB text, BGDH number, YLJGDM number ) CREATE TABLE zyjzjlb ( CYBQDM text, CYBQMC text, CYCWH text, CYKSDM text, CYKSMC text, CYSJ time, CYZTDM number, ...
患者36425103在门诊诊断为由于使用阿片类药引起的精神病性障碍的触珠蛋白的结果定量还有单位都是多少呢?
SELECT jyjgzbb.JCZBJGDL, jyjgzbb.JCZBJGDW FROM hz_info JOIN mzjzjlb JOIN jybgb JOIN jyjgzbb JOIN mzjzjlb_jybgb ON hz_info.YLJGDM = mzjzjlb.YLJGDM AND hz_info.KH = mzjzjlb.KH AND hz_info.KLX = mzjzjlb.KLX AND mzjzjlb.YLJGDM = mzjzjlb_jybgb.YLJGDM_MZJZJLB AND mzjzjlb.JZLSH = jybgb.JZLSH_MZJZJLB AND jybgb.YLJGDM = jyjgzbb...
css
CREATE TABLE hz_info_mzjzjlb ( JZLSH number, YLJGDM number, mzjzjlb_id number ) CREATE TABLE jybgb ( BBCJBW text, BBDM text, BBMC text, BBZT number, BGDH text, BGJGDM text, BGJGMC text, BGRGH text, BGRQ time, BGRXM text, BGSJ time, CJRQ time, JSBBRQSJ tim...
列出首诊医生和其他接诊医生的工号,以09772478615门诊就诊那些医生为主
SELECT mzjzjlb.ZZYSGH, mzjzjlb.QTJZYSGH FROM mzjzjlb WHERE mzjzjlb.JZLSH = '09772478615'
css