context
stringlengths
11
9.12k
question
stringlengths
0
1.06k
SQL
stringlengths
2
4.44k
source
stringclasses
28 values
CREATE TABLE table_name_66 ( to_par VARCHAR, place VARCHAR )
What was the To par of the golfer that placed t5?
SELECT to_par FROM table_name_66 WHERE place = "t5"
sql_create_context
CREATE TABLE table_name_69 ( carburetor VARCHAR, engine VARCHAR )
Tell me the carburetor for engine of 250-1v i-6
SELECT carburetor FROM table_name_69 WHERE engine = "250-1v i-6"
sql_create_context
CREATE TABLE person_info ( CSD text, CSRQ time, GJDM text, GJMC text, JGDM text, JGMC text, MZDM text, MZMC text, RYBH text, XBDM number, XBMC text, XLDM text, XLMC text, XM text, ZYLBDM text, ZYMC text ) CREATE TABLE jybgb ( BBCJBW text, BBDM tex...
看看之前患者97868786有哪些异常反应
SELECT * 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_info.RYBH = '...
css
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...
找出检测指标结果定量单位与检测指标名称和检验指标记录59123486254是一样的并且检测指标结果定量大于其的检验指标记录都是哪些呀?
SELECT * FROM jyjgzbb WHERE JCZBMC = (SELECT JCZBMC FROM jyjgzbb WHERE JYZBLSH = '59123486254') AND JCZBJGDW = (SELECT JCZBJGDW FROM jyjgzbb WHERE JYZBLSH = '59123486254') AND JCZBJGDL > (SELECT JCZBJGDL FROM jyjgzbb WHERE JYZBLSH = '59123486254')
css
CREATE TABLE table_287159_1 ( brightest_star VARCHAR, meaning VARCHAR )
What is the brightest star of the constellation that means archer?
SELECT brightest_star FROM table_287159_1 WHERE meaning = "archer"
sql_create_context
CREATE TABLE table_29612224_1 ( colors VARCHAR, location VARCHAR )
What are the team colors from Tolono, Illinois?
SELECT colors FROM table_29612224_1 WHERE location = "Tolono, Illinois"
sql_create_context
CREATE TABLE candidate ( Candidate_ID int, People_ID int, Poll_Source text, Date text, Support_rate real, Consider_rate real, Oppose_rate real, Unsure_rate real ) CREATE TABLE people ( People_ID int, Sex text, Name text, Date_of_Birth text, Height real, Weight re...
Scatter plot to show consider rate on x axis and oppose_rate on y axis.
SELECT Consider_rate, Oppose_rate FROM candidate
nvbench
CREATE TABLE chartevents ( row_id number, subject_id number, hadm_id number, icustay_id number, itemid number, charttime time, valuenum number, valueuom text ) CREATE TABLE d_labitems ( row_id number, itemid number, label text ) CREATE TABLE diagnoses_icd ( row_id numbe...
until 2104, what are the top four most frequent diagnoses that patients were given within 2 months after receiving a interruption vena cava.
SELECT d_icd_diagnoses.short_title FROM d_icd_diagnoses WHERE d_icd_diagnoses.icd9_code IN (SELECT t3.icd9_code FROM (SELECT t2.icd9_code, 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 = admissi...
mimic_iii
CREATE TABLE labevents ( row_id number, subject_id number, hadm_id number, itemid number, charttime time, valuenum number, valueuom text ) CREATE TABLE icustays ( row_id number, subject_id number, hadm_id number, icustay_id number, first_careunit text, last_careunit ...
what was the yearly minimum intake of amiodarone mg/hr of patient 22782?
SELECT MIN(inputevents_cv.amount) FROM inputevents_cv WHERE inputevents_cv.icustay_id IN (SELECT icustays.icustay_id FROM icustays WHERE icustays.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 22782)) AND inputevents_cv.itemid IN (SELECT d_items.itemid FROM d_items WHERE d_items.lab...
mimic_iii
CREATE TABLE table_name_75 ( over_total_tax_revenue__in__percentage_ VARCHAR, stamp_duty_reserve_tax VARCHAR, year VARCHAR )
What is the Total Tax Revenue that has an n.a. Stamp Duty Reserve Tax in the years 1995-96?
SELECT over_total_tax_revenue__in__percentage_ FROM table_name_75 WHERE stamp_duty_reserve_tax = "n.a." AND year = "1995-96"
sql_create_context
CREATE TABLE PostTypes ( Id number, Name text ) CREATE TABLE PostFeedback ( Id number, PostId number, IsAnonymous boolean, VoteTypeId number, CreationDate time ) CREATE TABLE PostHistoryTypes ( Id number, Name text ) CREATE TABLE PostNoticeTypes ( Id number, ClassId number...
questions tagged 'food-safety' from this year.
SELECT Title, q.Id, Score FROM Posts AS q INNER JOIN PostTags ON q.Id = PostTags.PostId INNER JOIN Tags ON PostTags.TagId = Tags.Id WHERE Tags.TagName = 'modal-verbs' AND q.PostTypeId = 1 ORDER BY q.Id
sede
CREATE TABLE table_23188 ( "Rank" real, "Mountain Peak" text, "Mountain Range" text, "Elevation" text, "Prominence" text, "Isolation" text )
What's the isolation of the mountain peak with an elevation of 2705.793 = 8,875feet 2705m?
SELECT "Isolation" FROM table_23188 WHERE "Elevation" = '2705.793 = 8,875feet 2705m'
wikisql
CREATE TABLE table_name_90 ( home_team VARCHAR, away_team VARCHAR )
What was the Home team when Farnborough Town was the Away team?
SELECT home_team FROM table_name_90 WHERE away_team = "farnborough town"
sql_create_context
CREATE TABLE table_21900 ( "Year(s)" real, "Final television commentator" text, "Radio commentator" text, "Spokesperson" text, "Semi-final television commentator" text, "Semi-final second television commentator" text )
In how many years was Tom Fleming the final television commentator?
SELECT COUNT("Year(s)") FROM table_21900 WHERE "Final television commentator" = 'Tom Fleming'
wikisql
CREATE TABLE table_name_72 ( events INTEGER, top_10 VARCHAR, cuts_made VARCHAR, top_25 VARCHAR )
what is the highest events when the cuts made is less than 34, the top-25 is less than 5 and the top-10 is more than 1?
SELECT MAX(events) FROM table_name_72 WHERE cuts_made < 34 AND top_25 < 5 AND top_10 > 1
sql_create_context
CREATE TABLE table_name_99 ( rank INTEGER, total VARCHAR, nation VARCHAR )
What is the highest rank when the metal total is 1 and the nation is the United Kingdom?
SELECT MAX(rank) FROM table_name_99 WHERE total = 1 AND nation = "united kingdom"
sql_create_context
CREATE TABLE table_2829 ( "Game" real, "Date" text, "Team" text, "Score" text, "High points" text, "High rebounds" text, "High assists" text, "Location Attendance" text, "Record" text )
Who has the high assists when 50-26 is the record?
SELECT "High assists" FROM table_2829 WHERE "Record" = '50-26'
wikisql
CREATE TABLE table_train_61 ( "id" int, "white_blood_cell_count_wbc" int, "in_another_study" bool, "systolic_blood_pressure_sbp" int, "trauma" bool, "temperature" float, "anc" int, "hypotension" bool, "heart_rate" int, "paco2" float, "gastrointestinal_disease" bool, "burn...
anc < 500 / mm3
SELECT * FROM table_train_61 WHERE anc < 500
criteria2sql
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...
号码是33964912的病人在医院6431931入院诊断的时候所患的疾病名称不含有咽炎的医疗就诊记录都什么编号啊?
SELECT qtb.MED_CLINIC_ID FROM qtb WHERE qtb.PERSON_ID = '33964912' AND qtb.MED_SER_ORG_NO = '6431931' AND NOT qtb.IN_DIAG_DIS_NM LIKE '%咽炎%' UNION SELECT gyb.MED_CLINIC_ID FROM gyb WHERE gyb.PERSON_ID = '33964912' AND gyb.MED_SER_ORG_NO = '6431931' AND NOT gyb.IN_DIAG_DIS_NM LIKE '%咽炎%' UNION SELECT zyb.MED_CLINIC_ID F...
css
CREATE TABLE journalist ( Nationality VARCHAR )
Show the different nationalities and the number of journalists of each nationality.
SELECT Nationality, COUNT(*) FROM journalist GROUP BY Nationality
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 job_history ( EMPLOYEE_ID decimal(6,0), START_DATE date, END_DATE date, JOB_ID varchar(10), DEPARTMENT_ID decimal(4,0) ) CREATE TABLE...
For those employees who do not work in departments with managers that have ids between 100 and 200, find first_name and department_id , and visualize them by a bar chart, list X from low to high order.
SELECT FIRST_NAME, DEPARTMENT_ID 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 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...
姓名为葛虹颖的投保人花费了多少次的整数金额在住院期间?
SELECT COUNT(*) FROM gwyjzb WHERE gwyjzb.PERSON_NM = '葛虹颖' AND gwyjzb.CLINIC_TYPE = '住院' AND MOD(gwyjzb.MED_AMOUT, 1) = 0 UNION SELECT COUNT(*) FROM fgwyjzb WHERE fgwyjzb.PERSON_NM = '葛虹颖' AND fgwyjzb.CLINIC_TYPE = '住院' AND MOD(fgwyjzb.MED_AMOUT, 1) = 0
css
CREATE TABLE table_name_68 ( venue VARCHAR, score VARCHAR )
What is the Venue, when the Score is 56-4?
SELECT venue FROM table_name_68 WHERE score = "56-4"
sql_create_context
CREATE TABLE table_72094 ( "District" text, "Total amount of trees" real, "Prevailing types, %" text, "Amount of old trees" text, "Amount of trees, that require replacement" text )
What is the district when prevailing types, % is acer negundo 30.22 tilia 18.6 poplar 15.23?
SELECT "District" FROM table_72094 WHERE "Prevailing types, %" = 'Acer negundo — 30.22 Tilia — 18.6 Poplar — 15.23'
wikisql
CREATE TABLE table_5165 ( "Round" real, "Pick #" real, "Overall" real, "Name" text, "Position" text, "College" text )
What position is drafted from Grambling?
SELECT "Position" FROM table_5165 WHERE "College" = 'grambling'
wikisql
CREATE TABLE table_name_97 ( score VARCHAR, partner VARCHAR )
What was hayley ericksen's score?
SELECT score FROM table_name_97 WHERE partner = "hayley ericksen"
sql_create_context
CREATE TABLE patients ( row_id number, subject_id number, gender text, dob time, dod time ) CREATE TABLE d_icd_procedures ( row_id number, icd9_code text, short_title text, long_title text ) CREATE TABLE labevents ( row_id number, subject_id number, hadm_id number, ...
what cost does a procedure called inject/inf thrombo agent cost?
SELECT DISTINCT cost.cost FROM cost WHERE cost.event_type = 'procedures_icd' AND cost.event_id IN (SELECT procedures_icd.row_id FROM procedures_icd WHERE procedures_icd.icd9_code = (SELECT d_icd_procedures.icd9_code FROM d_icd_procedures WHERE d_icd_procedures.short_title = 'inject/inf thrombo agent'))
mimic_iii
CREATE TABLE table_50051 ( "Venue" text, "Span" text, "Matches" text, "Lost" text, "Tied" text )
What venue had a tie?
SELECT "Tied" FROM table_50051 WHERE "Venue" = 'venue'
wikisql
CREATE TABLE table_name_39 ( year VARCHAR, outcome VARCHAR, opponent VARCHAR )
What year was the match against filippo volandri where xavier malisse was runner-up?
SELECT year FROM table_name_39 WHERE outcome = "runner-up" AND opponent = "filippo volandri"
sql_create_context
CREATE TABLE table_name_10 ( driver VARCHAR, tyre VARCHAR, entrant VARCHAR )
Who is the driver when the tyre is p and the entrant is officine alfieri maserati?
SELECT driver FROM table_name_10 WHERE tyre = "p" AND entrant = "officine alfieri maserati"
sql_create_context
CREATE TABLE table_1027 ( "Player" text, "Position" text, "Games started" text, "Hometown" text, "Height" text, "Weight" real, "Class" text, "Previous experience" text )
Where is George W. Gregory from?
SELECT "Hometown" FROM table_1027 WHERE "Player" = 'George W. Gregory'
wikisql
CREATE TABLE table_45987 ( "Gatchaman" text, "Battle of the Planets" text, "G-Force" text, "Eagle Riders" text, "OVA (Harmony Gold Dub)" text, "Rank" text, "Bird Uniform" text, "Weapon" text, "Mecha" text, "Japanese voice actor" text, "Voice actor (BOTP)" text, "Voice act...
Which weapon was used when the Battle of the Planets was Jason?
SELECT "Weapon" FROM table_45987 WHERE "Battle of the Planets" = 'jason'
wikisql
CREATE TABLE table_65443 ( "Rank" real, "Player" text, "County" text, "Tally" text, "Total" real, "Matches" real, "Average" real )
What is the total when matches is less than 3, and rank is smaller than 2?
SELECT MIN("Total") FROM table_65443 WHERE "Matches" < '3' AND "Rank" < '2'
wikisql
CREATE TABLE table_19304764_2 ( degree_diploma VARCHAR, discipline VARCHAR )
Name the degree for otorhinolaryngology
SELECT degree_diploma FROM table_19304764_2 WHERE discipline = "Otorhinolaryngology"
sql_create_context
CREATE TABLE table_204_455 ( id number, "rd." number, "grand prix" text, "date" text, "location" text, "pole position" text, "fastest lap" text, "winning driver" text, "constructor" text, "report" text )
who had the fastest lap at the german grand prix ?
SELECT "fastest lap" FROM table_204_455 WHERE "grand prix" = 'german grand prix'
squall
CREATE TABLE table_16338 ( "Model" text, "RU" real, "Max processors" text, "Processor frequency" text, "Max memory" text, "Max disk capacity" text, "GA Date" text )
What max processor has a maximum memory of 256 gb?
SELECT "Max processors" FROM table_16338 WHERE "Max memory" = '256 GB'
wikisql
CREATE TABLE table_3006 ( "District" text, "Vacator" text, "Reason for change" text, "Successor" text, "Date successor seated" text )
When was successor George E. Harris (R) seated?
SELECT "Date successor seated" FROM table_3006 WHERE "Successor" = 'George E. Harris (R)'
wikisql
CREATE TABLE table_42569 ( "Date" text, "Home captain" text, "Away captain" text, "Venue" text, "Result" text )
Who was the Away Captain when the Home Captain was Joe Darling at Melbourne Cricket Ground?
SELECT "Away captain" FROM table_42569 WHERE "Venue" = 'melbourne cricket ground' AND "Home captain" = 'joe darling'
wikisql
CREATE TABLE lab ( labid number, patientunitstayid number, labname text, labresult number, labresulttime time ) CREATE TABLE patient ( uniquepid text, patienthealthsystemstayid number, patientunitstayid number, gender text, age text, ethnicity text, hospitalid number, ...
give me the five top diagnoses that had the highest two year mortality rate?
SELECT t4.diagnosisname FROM (SELECT t3.diagnosisname, DENSE_RANK() OVER (ORDER BY t3.c1 DESC) AS c2 FROM (SELECT t2.diagnosisname, 100 - SUM(CASE WHEN patient.hospitaldischargestatus = 'alive' THEN 1 WHEN STRFTIME('%j', patient.hospitaldischargetime) - STRFTIME('%j', t2.diagnosistime) > 2 * 365 THEN 1 ELSE 0 END) * 10...
eicu
CREATE TABLE table_name_83 ( attendance INTEGER, date VARCHAR )
What was the attendance on september 29?
SELECT MAX(attendance) FROM table_name_83 WHERE date = "september 29"
sql_create_context
CREATE TABLE table_name_77 ( finished VARCHAR, celebrity VARCHAR )
What rank did Myleene Klass finish?
SELECT finished FROM table_name_77 WHERE celebrity = "myleene klass"
sql_create_context
CREATE TABLE table_40589 ( "Result" text, "Record" text, "Opponent" text, "Method" text, "Date" text, "Round" real, "Location" text, "Notes" text )
What is Notes, when Date is 2007?
SELECT "Notes" FROM table_40589 WHERE "Date" = '2007'
wikisql
CREATE TABLE table_46222 ( "Model Name" text, "Engine" text, "Top Speed" text, "No. of Gears" real, "Electrics" text )
Which Electrics has an Engine of 175cc, bhp (kw), and a Model Name of d10 sports & bushman?
SELECT "Electrics" FROM table_46222 WHERE "Engine" = '175cc, bhp (kw)' AND "Model Name" = 'd10 sports & bushman'
wikisql
CREATE TABLE table_39150 ( "Date" text, "Race" text, "Distance" text, "Venue" text, "Radio" text )
What is the distance of the Sam's town 250 race?
SELECT "Distance" FROM table_39150 WHERE "Race" = 'sam''s town 250'
wikisql
CREATE TABLE table_name_53 ( wavelength VARCHAR, frequency__mhz_ VARCHAR )
What is the Wavelength of Frequency (MHz) 14.050 14.150?
SELECT wavelength FROM table_name_53 WHERE frequency__mhz_ = "14.050–14.150"
sql_create_context
CREATE TABLE table_4323 ( "Date" text, "Location" text, "Surface" text, "Opponent in the final" text, "Score in the final" text )
Name the score for moscow, ussr 15 february 1971
SELECT "Score in the final" FROM table_4323 WHERE "Location" = 'moscow, ussr' AND "Date" = '15 february 1971'
wikisql
CREATE TABLE table_36310 ( "Round" real, "Pick" real, "Player" text, "Position" text, "School" text )
Which school picked a back in round 16, after pick 89?
SELECT "School" FROM table_36310 WHERE "Pick" > '89' AND "Position" = 'back' AND "Round" = '16'
wikisql
CREATE TABLE Events ( Event_ID INTEGER, Service_ID INTEGER, Event_Details VARCHAR(255) ) CREATE TABLE Participants ( Participant_ID INTEGER, Participant_Type_Code CHAR(15), Participant_Details VARCHAR(255) ) CREATE TABLE Services ( Service_ID INTEGER, Service_Type_Code CHAR(15) ) CREA...
Compare how many events by different event details using a bar chart, and rank x-axis from low to high order.
SELECT Event_Details, COUNT(Event_Details) FROM Events GROUP BY Event_Details ORDER BY Event_Details
nvbench
CREATE TABLE course_tags_count ( course_id int, clear_grading int, pop_quiz int, group_projects int, inspirational int, long_lectures int, extra_credit int, few_tests int, good_feedback int, tough_tests int, heavy_papers int, cares_for_students int, heavy_assignments ...
Which courses would be beneficial to take before taking CMBIOL 681 ?
SELECT DISTINCT advisory_requirement FROM course WHERE department = 'CMBIOL' AND number = 681
advising
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, ...
在2000年12月21日到2008年1月25日期间5823598这个医疗机构的消耗的统筹金额是多少?
SELECT SUM(t_kc24.OVE_PAY) FROM gwyjzb JOIN t_kc24 ON gwyjzb.MED_CLINIC_ID = t_kc24.MED_CLINIC_ID WHERE gwyjzb.MED_SER_ORG_NO = '5823598' AND t_kc24.CLINIC_SLT_DATE BETWEEN '2000-12-21' AND '2008-01-25' UNION SELECT SUM(t_kc24.OVE_PAY) FROM fgwyjzb JOIN t_kc24 ON fgwyjzb.MED_CLINIC_ID = t_kc24.MED_CLINIC_ID WHERE fgwyj...
css
CREATE TABLE table_37863 ( "Local Government Area" text, "Principal town" text, "Land Area (km\u00b2)" real, "Population 2011 census" real, "Density" real )
What is the lowest density of a town with a 13,708 2011 population census ?
SELECT MIN("Density") FROM table_37863 WHERE "Population 2011 census" = '13,708'
wikisql
CREATE TABLE Comments ( Id number, PostId number, Score number, Text text, CreationDate time, UserDisplayName text, UserId number, ContentLicense text ) CREATE TABLE ReviewRejectionReasons ( Id number, Name text, Description text, PostTypeId number ) CREATE TABLE Badges...
Top C# users in Israel.
WITH USER_BY_TAG AS (SELECT ROW_NUMBER() OVER (ORDER BY COUNT(*) DESC) AS Rank, u.Id AS "user_link", COUNT(*) AS UpVotes, u.Reputation AS Reputation FROM Tags AS t INNER JOIN PostTags AS pt ON pt.TagId = t.Id INNER JOIN Posts AS p ON p.ParentId = pt.PostId INNER JOIN Votes AS v ON v.PostId = p.Id AND VoteTypeId = 2 INN...
sede
CREATE TABLE table_51371 ( "Week" real, "Date" text, "Opponent" text, "Result" text, "Attendance" text )
What opponent has an attendance of 20,456?
SELECT "Opponent" FROM table_51371 WHERE "Attendance" = '20,456'
wikisql
CREATE TABLE table_name_38 ( date_s__administered VARCHAR, meg_whitman VARCHAR )
When did Meg Whitman get 60%?
SELECT date_s__administered FROM table_name_38 WHERE meg_whitman = "60%"
sql_create_context
CREATE TABLE table_203_412 ( id number, "school" text, "conference" text, "record (conference)" text, "head coach" text, "cws appearances" text, "cws best finish" text, "cws record" text )
what are the number of schools with more than 2 cws appearances ?
SELECT COUNT("school") FROM table_203_412 WHERE "cws appearances" > 2
squall
CREATE TABLE table_59617 ( "Combined" text, "50 yard Freestyle" text, "100 yard Freestyle" text, "200 yard Freestyle" text, "500 yard Freestyle" text, "100 yard Backstroke" text, "100 yard Butterfly" text )
What 100 yard Butterfly has a 100 yard Freestyle of cody miller (palo verde)?
SELECT "100 yard Butterfly" FROM table_59617 WHERE "100 yard Freestyle" = 'cody miller (palo verde)'
wikisql
CREATE TABLE table_name_18 ( points INTEGER, rank VARCHAR )
What is the lowest points for 36th rank?
SELECT MIN(points) FROM table_name_18 WHERE rank = "36th"
sql_create_context
CREATE TABLE table_2040 ( "Province" text, "Arabs 2001" real, "% 2001" text, "Arabs 2011" real, "% 2011" text )
If the province is Nunavut, what is the Arabs 2011 amount?
SELECT "Arabs 2011" FROM table_2040 WHERE "Province" = 'Nunavut'
wikisql
CREATE TABLE cost ( row_id number, subject_id number, hadm_id number, event_type text, event_id number, chargetime time, cost number ) CREATE TABLE chartevents ( row_id number, subject_id number, hadm_id number, icustay_id number, itemid number, charttime time, v...
count the number of patients who were tested since 1 year ago for bilirubin, total, body fluid.
SELECT COUNT(DISTINCT admissions.subject_id) FROM admissions WHERE admissions.hadm_id IN (SELECT labevents.hadm_id FROM labevents WHERE labevents.itemid IN (SELECT d_labitems.itemid FROM d_labitems WHERE d_labitems.label = 'bilirubin, total, body fluid') AND DATETIME(labevents.charttime) >= DATETIME(CURRENT_TIME(), '-1...
mimic_iii
CREATE TABLE table_51032 ( "Home team" text, "Home team score" text, "Away team" text, "Away team score" text, "Ground" text, "Crowd" real, "Date" text, "Time" text )
When Essendon scored 8.14 (62), what was the Home team score?
SELECT "Home team score" FROM table_51032 WHERE "Away team score" = '8.14 (62)' AND "Away team" = 'essendon'
wikisql
CREATE TABLE table_203_9 ( id number, "state" text, "last execution date" text, "name" text, "crime" text, "method" text )
which state had an execution done by the method of lethal injection and occurred in december of 2005 ?
SELECT "state" FROM table_203_9 WHERE "last execution date" = '5 december 2005' AND "method" = 'lethal injection'
squall
CREATE TABLE table_55034 ( "Outcome" text, "Date" text, "Surface" text, "Opponent" text, "Score" text )
Which date has a Opponent of juan m naco, and a Score of 6 2, 4 6, 7 6 (7 3)?
SELECT "Date" FROM table_55034 WHERE "Opponent" = 'juan mónaco' AND "Score" = '6–2, 4–6, 7–6 (7–3)'
wikisql
CREATE TABLE table_name_91 ( worst_dancer_s_ VARCHAR, dance VARCHAR )
What's the worst dance of jive dancer(s)?
SELECT worst_dancer_s_ FROM table_name_91 WHERE dance = "jive"
sql_create_context
CREATE TABLE table_2343740_1 ( original_air_date VARCHAR, episode_number VARCHAR )
On what date did episode 2 air?
SELECT original_air_date FROM table_2343740_1 WHERE episode_number = 2
sql_create_context
CREATE TABLE locations ( LOCATION_ID decimal(4,0), STREET_ADDRESS varchar(40), POSTAL_CODE varchar(12), CITY varchar(30), STATE_PROVINCE varchar(25), COUNTRY_ID varchar(2) ) CREATE TABLE employees ( EMPLOYEE_ID decimal(6,0), FIRST_NAME varchar(20), LAST_NAME varchar(25), EMAIL v...
For all employees who have the letters D or S in their first name, a bar chart shows the distribution of hire_date and the sum of employee_id bin hire_date by weekday.
SELECT HIRE_DATE, SUM(EMPLOYEE_ID) FROM employees WHERE FIRST_NAME LIKE '%D%' OR FIRST_NAME LIKE '%S%'
nvbench
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 those employees who was hired before 2002-06-21, show me about the change of salary over hire_date in a line chart.
SELECT HIRE_DATE, SALARY FROM employees WHERE HIRE_DATE < '2002-06-21'
nvbench
CREATE TABLE table_name_1 ( score VARCHAR, player VARCHAR )
What is Tiger Woods's score?
SELECT score FROM table_name_1 WHERE player = "tiger woods"
sql_create_context
CREATE TABLE Student ( StuID INTEGER, LName VARCHAR(12), Fname VARCHAR(12), Age INTEGER, Sex VARCHAR(1), Major INTEGER, Advisor INTEGER, city_code VARCHAR(3) ) CREATE TABLE Allergy_Type ( Allergy VARCHAR(20), AllergyType VARCHAR(20) ) CREATE TABLE Has_Allergy ( StuID INTEGE...
What are the allergy types and how many allergies correspond to each one, and could you sort in desc by the Y?
SELECT AllergyType, COUNT(*) FROM Allergy_Type GROUP BY AllergyType ORDER BY COUNT(*) DESC
nvbench
CREATE TABLE table_12834315_2 ( fire_control VARCHAR, name VARCHAR )
What is the fire control for the sporter target
SELECT fire_control FROM table_12834315_2 WHERE name = "Sporter Target"
sql_create_context
CREATE TABLE table_name_75 ( bronze INTEGER, total INTEGER )
What nation has the most bronze medals with over 11 total medals?
SELECT MAX(bronze) FROM table_name_75 WHERE total > 11
sql_create_context
CREATE TABLE table_203_497 ( id number, "rank" number, "nation" text, "gold" number, "silver" number, "bronze" number, "total" number )
what is the difference between the nation with the most medals and the nation with the least amount of medals ?
SELECT MAX("total") - MIN("total") FROM table_203_497
squall
CREATE TABLE demographic ( subject_id text, hadm_id text, name text, marital_status text, age text, dob text, gender text, language text, religion text, admission_type text, days_stay text, insurance text, ethnicity text, expire_flag text, admission_location t...
how many patients whose admission type is urgent and drug code is inte75i?
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE demographic.admission_type = "URGENT" AND prescriptions.formulary_drug_cd = "INTE75I"
mimicsql_data
CREATE TABLE station ( id INTEGER, name TEXT, lat NUMERIC, long NUMERIC, dock_count INTEGER, city TEXT, installation_date TEXT ) CREATE TABLE weather ( date TEXT, max_temperature_f INTEGER, mean_temperature_f INTEGER, min_temperature_f INTEGER, max_dew_point_f INTEGER, ...
What are the id and name of the stations that have ever had more than 12 bikes available? Plot them as a bar chart, list in descending by the bars.
SELECT name, id FROM station AS T1 JOIN status AS T2 ON T1.id = T2.station_id WHERE T2.bikes_available > 12 ORDER BY name DESC
nvbench
CREATE TABLE table_60652 ( "Mission" text, "Location" text, "Type" text, "Head of Mission" text, "Position" text, "List" text )
what is the location when the type is embassy and the head of mission is jos manuel castillo?
SELECT "Location" FROM table_60652 WHERE "Type" = 'embassy' AND "Head of Mission" = 'josé manuel castillo'
wikisql
CREATE TABLE table_name_59 ( result VARCHAR, competition VARCHAR )
What was the result of the 1948 og competition?
SELECT result FROM table_name_59 WHERE competition = "1948 og"
sql_create_context
CREATE TABLE jobs ( job_id int, job_title varchar, description varchar, requirement varchar, city varchar, state varchar, country varchar, zip int ) CREATE TABLE ta ( campus_job_id int, student_id int, location varchar ) CREATE TABLE course_prerequisite ( pre_course_id ...
How many courses are not taught by a professor on their own ?
SELECT COUNT(DISTINCT course_offering.course_id) FROM course, course_offering, offering_instructor AS OFFERING_INSTRUCTOR_0, offering_instructor AS OFFERING_INSTRUCTOR_1, offering_instructor AS OFFERING_INSTRUCTOR_2 WHERE course.course_id = course_offering.course_id AND course.department = 'EECS' AND OFFERING_INSTRUCTO...
advising
CREATE TABLE table_204_70 ( id number, "pick #" number, "nfl team" text, "player" text, "position" text, "college" text )
karl farmer played the same position as jay chesley . what position was it ?
SELECT "position" FROM table_204_70 WHERE "player" = 'karl farmer'
squall
CREATE TABLE table_1828 ( "Year" real, "Tournaments played" real, "Cuts made*" real, "Wins" real, "2nd" real, "3rd" real, "Top 10s" real, "Best finish" text, "Earnings ( $ )" text, "Money list rank" text, "Scoring average" text, "Scoring rank" text )
Name the scoring average for best finsih being t35
SELECT "Scoring average" FROM table_1828 WHERE "Best finish" = 'T35'
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...
how many patients whose admission location is transfer from hosp/extram and procedure icd9 code is 45?
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.admission_location = "TRANSFER FROM HOSP/EXTRAM" AND procedures.icd9_code = "45"
mimicsql_data
CREATE TABLE table_43410 ( "Game" real, "Date" text, "Team" text, "Score" text, "High points" text, "High rebounds" text, "High assists" text, "Location Attendance" text, "Record" text )
What is the High assists for march 25?
SELECT "High assists" FROM table_43410 WHERE "Date" = 'march 25'
wikisql
CREATE TABLE table_204_273 ( id number, "date" text, "opponent" text, "venue" text, "result" text, "scorers" text )
what was the total number of matches played by the san jose earthquakes in the 1979 season ?
SELECT COUNT(*) FROM table_204_273 WHERE "date" = 1979
squall
CREATE TABLE table_17026 ( "Ships name" text, "Date entered service" text, "Date withdrawn" text, "Tonnage" real, "Type of Ship" text )
what is the maximum tonnage where date entered service is 25 march 1986
SELECT MAX("Tonnage") FROM table_17026 WHERE "Date entered service" = '25 March 1986'
wikisql
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...
When it comes to classes , which one 's the hardest ?
SELECT DISTINCT course.name, course.number, program_course.workload FROM course, program_course WHERE course.department = 'EECS' AND program_course.course_id = course.course_id AND program_course.workload = (SELECT MAX(PROGRAM_COURSEalias1.workload) FROM course AS COURSEalias1, program_course AS PROGRAM_COURSEalias1 WH...
advising
CREATE TABLE table_name_59 ( score INTEGER, to_par VARCHAR )
Which Score has a To Par of 1?
SELECT MIN(score) FROM table_name_59 WHERE to_par = "–1"
sql_create_context
CREATE TABLE PendingFlags ( Id number, FlagTypeId number, PostId number, CreationDate time, CloseReasonTypeId number, CloseAsOffTopicReasonTypeId number, DuplicateOfQuestionId number, BelongsOnBaseHostAddress text ) CREATE TABLE Badges ( Id number, UserId number, Name text, ...
Unanswered questions favorited by high-rep users.
SELECT p.Id AS "post_link", p.Score, p.CommentCount, p.CreationDate FROM Posts AS p, Users AS u, Votes AS v WHERE v.VoteTypeId = 5 AND v.PostId = p.Id AND v.UserId = u.Id AND u.Reputation >= '##MinRep##' AND p.AnswerCount = 0 AND p.ClosedDate IS NULL GROUP BY p.Id, p.Score, p.CommentCount, p.CreationDate ORDER BY p.Cre...
sede
CREATE TABLE table_name_51 ( date VARCHAR, rank__number VARCHAR )
WHAT DATE HAD 6 RANK?
SELECT date FROM table_name_51 WHERE rank__number = "6"
sql_create_context
CREATE TABLE table_name_27 ( division VARCHAR, position VARCHAR )
In what division did they place 4th?
SELECT division FROM table_name_27 WHERE position = "4th"
sql_create_context
CREATE TABLE table_60526 ( "County" text, "Per capita income" text, "Median household income" text, "Median family income" text, "Population" real, "Number of households" real )
How many households have yadkin as the county?
SELECT "Number of households" FROM table_60526 WHERE "County" = 'yadkin'
wikisql
CREATE TABLE table_name_5 ( bronze INTEGER, nation VARCHAR, total VARCHAR )
What is the highest bronze total for east germany with under 3 total medals?
SELECT MAX(bronze) FROM table_name_5 WHERE nation = "east germany" AND total < 3
sql_create_context
CREATE TABLE student ( ID varchar(5), name varchar(20), dept_name varchar(20), tot_cred numeric(3,0) ) CREATE TABLE teaches ( ID varchar(5), course_id varchar(8), sec_id varchar(8), semester varchar(6), year numeric(4,0) ) CREATE TABLE takes ( ID varchar(5), course_id varch...
Find the average of credits of courses that have more than one prerequisite for each title with a bar chart, and display X in descending order.
SELECT title, AVG(credits) FROM course AS T1 JOIN prereq AS T2 ON T1.course_id = T2.course_id GROUP BY title ORDER BY title DESC
nvbench
CREATE TABLE table_39016 ( "Start month" text, "End month" text, "Cover" text, "Spine" text, "Indicia" text, "Masthead" text, "Number of issues" real )
Which Indicia has anEnd month in feb-75?
SELECT "Indicia" FROM table_39016 WHERE "End month" = 'feb-75'
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 are diagnosed with acute nephritis nec and treated with iv drug route?
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.short_title = "Acute nephritis NEC" AND prescriptions.route = "IV"
mimicsql_data
CREATE TABLE table_25593 ( "Stage" real, "Winner" text, "General classification" text, "Mountains classification" text, "Points classification" text, "Sprints classification" text, "Team classification" text )
If the winner is Michael Albasini, what is the mountains classification name?
SELECT "Mountains classification" FROM table_25593 WHERE "Winner" = 'Michael Albasini'
wikisql
CREATE TABLE table_204_110 ( id number, "year" number, "champion" text, "city" text, "llws" text, "record" text )
which city was champion in 1957 , monterrey or el campo ?
SELECT "city" FROM table_204_110 WHERE "year" = 1957
squall
CREATE TABLE table_name_15 ( opponents VARCHAR, partner VARCHAR, surface VARCHAR )
Which Opponents have a Partner of irina-camelia begu, and a Surface of hard?
SELECT opponents FROM table_name_15 WHERE partner = "irina-camelia begu" AND surface = "hard"
sql_create_context
CREATE TABLE table_name_48 ( home_team VARCHAR, venue VARCHAR )
What's the Home teams Venue near Victoria Park?
SELECT home_team FROM table_name_48 WHERE venue = "victoria park"
sql_create_context
CREATE TABLE table_65024 ( "Rank" real, "Athletes" text, "Country" text, "Time" text, "Notes" text )
What is the rank if the person with a time of 1:40.626?
SELECT SUM("Rank") FROM table_65024 WHERE "Time" = '1:40.626'
wikisql
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...
医疗机构9229187一一年的十一月十一号直到一四年一月五号未就业人员在就诊方面的花费医疗费总额达到3685.16元以上的就诊记录数量
SELECT COUNT(*) FROM t_kc21 WHERE MED_SER_ORG_NO = '9229187' AND IN_HOSP_DATE BETWEEN '2011-11-11' AND '2014-01-05' AND INSURED_STS = '未就业' AND MED_AMOUT >= 3685.16
css
CREATE TABLE table_name_60 ( area VARCHAR, hangul_chosongul VARCHAR )
What is the area for the province having Hangul of ?
SELECT area FROM table_name_60 WHERE hangul_chosongul = "경기도"
sql_create_context
CREATE TABLE table_name_63 ( born VARCHAR, current_club VARCHAR )
Where was the player whose Current Club Elfsborg born?
SELECT born FROM table_name_63 WHERE current_club = "elfsborg"
sql_create_context