context
stringlengths
11
9.12k
question
stringlengths
0
1.06k
SQL
stringlengths
2
4.44k
source
stringclasses
28 values
CREATE TABLE table_203_190 ( id number, "name" text, "type" text, "circle" text, "bench" text, "formed" number, "notes" text )
what is the total number of states ?
SELECT COUNT("name") FROM table_203_190
squall
CREATE TABLE table_26129220_2 ( party VARCHAR, district VARCHAR )
What is the party for district 27?
SELECT party FROM table_26129220_2 WHERE district = 27
sql_create_context
CREATE TABLE table_72064 ( "Date" text, "Time" text, "Competition" text, "Opponent" text, "Ground" text, "Score" text )
What kind of competition was it at San Siro at 18:30 GMT?
SELECT "Competition" FROM table_72064 WHERE "Ground" = 'san siro' AND "Time" = '18:30 gmt'
wikisql
CREATE TABLE table_18600760_7 ( geo_id INTEGER, longitude VARCHAR )
If the longitude is -97.473110, what is the minimum geo id?
SELECT MIN(geo_id) FROM table_18600760_7 WHERE longitude = "-97.473110"
sql_create_context
CREATE TABLE table_name_30 ( played INTEGER, points_1 VARCHAR, goals_against VARCHAR )
What is the highest played when there was less than 74 goals against and points 1 of 36 2?
SELECT MAX(played) FROM table_name_30 WHERE points_1 = "36 2" AND goals_against < 74
sql_create_context
CREATE TABLE table_name_42 ( round INTEGER, overall VARCHAR )
Overall of 62 is what average round?
SELECT AVG(round) FROM table_name_42 WHERE overall = 62
sql_create_context
CREATE TABLE activity ( actid number, activity_name text ) CREATE TABLE participates_in ( stuid number, actid number ) CREATE TABLE student ( stuid number, lname text, fname text, age number, sex text, major number, advisor number, city_code text ) CREATE TABLE faculty...
Which students are advised by Michael Goodrich? Give me their first and last names.
SELECT T2.fname, T2.lname FROM faculty AS T1 JOIN student AS T2 ON T1.facid = T2.advisor WHERE T1.fname = "Michael" AND T1.lname = "Goodrich"
spider
CREATE TABLE table_1341453_40 ( incumbent VARCHAR, first_elected VARCHAR )
How many incumbents were first elected in 1984?
SELECT COUNT(incumbent) FROM table_1341453_40 WHERE first_elected = "1984"
sql_create_context
CREATE TABLE table_name_86 ( partner VARCHAR, year VARCHAR, score_in_the_final VARCHAR )
Who was the partner where the score was 2 6, 3 6 and happened after 2007?
SELECT partner FROM table_name_86 WHERE year > 2007 AND score_in_the_final = "2–6, 3–6"
sql_create_context
CREATE TABLE table_76360 ( "Date" text, "Name of ship" text, "Flag" text, "Tonnage" real, "Fate" text )
How did the ship named proletarij finish its service?
SELECT "Fate" FROM table_76360 WHERE "Name of ship" = 'proletarij'
wikisql
CREATE TABLE qtb ( CLINIC_ID text, COMP_ID text, DATA_ID text, DIFF_PLACE_FLG number, FERTILITY_STS number, FLX_MED_ORG_ID text, HOSP_LEV number, HOSP_STS number, IDENTITY_CARD text, INPT_AREA_BED text, INSURED_IDENTITY number, INSURED_STS text, INSU_TYPE text, IN...
查一下编号为63645719的病患在7473839这个医院的出院诊断结果,出院诊断医生要姓柏
SELECT qtb.OUT_DIAG_DIS_CD, qtb.OUT_DIAG_DIS_NM FROM qtb WHERE qtb.PERSON_ID = '63645719' AND qtb.MED_SER_ORG_NO = '7473839' AND qtb.OUT_DIAG_DOC_NM LIKE '柏%' UNION SELECT gyb.OUT_DIAG_DIS_CD, gyb.OUT_DIAG_DIS_NM FROM gyb WHERE gyb.PERSON_ID = '63645719' AND gyb.MED_SER_ORG_NO = '7473839' AND gyb.OUT_DIAG_DOC_NM LIKE '...
css
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 ...
在2020年11月21日之前患者郎灵韵都在什么门诊就诊记录中有对应的检验报告单?在门诊就诊的流水号都是啥?
SELECT mzjzjlb.JZLSH FROM person_info JOIN hz_info JOIN mzjzjlb ON person_info.RYBH = hz_info.RYBH AND hz_info.YLJGDM = mzjzjlb.YLJGDM AND hz_info.KH = mzjzjlb.KH AND hz_info.KLX = mzjzjlb.KLX WHERE person_info.XM = '郎灵韵' AND NOT mzjzjlb.JZLSH IN (SELECT zyjybgb.JZLSH FROM zyjybgb WHERE zyjybgb.BGRQ >= '2020-11-21' UNI...
css
CREATE TABLE table_66975 ( "Driver" text, "Team" text, "Laps" real, "Time/Retired" text, "Grid" real, "Points" real )
What is Oriol Servia's average Grid on races with more than 43 laps?
SELECT AVG("Grid") FROM table_66975 WHERE "Laps" > '43' AND "Driver" = 'oriol servia'
wikisql
CREATE TABLE table_19807 ( "#" real, "Episode" text, "Writer" text, "Director" text, "Original air date" text, "Viewing figure" text )
What is the original air date of the episode directed by Paul Marcus?
SELECT "Original air date" FROM table_19807 WHERE "Director" = 'Paul Marcus'
wikisql
CREATE TABLE table_68283 ( "Representative" text, "Title" text, "Presentation of credentials" text, "Termination of mission" text, "Appointed by" text )
Name the title with representative edward h. strobel
SELECT "Title" FROM table_68283 WHERE "Representative" = 'edward h. strobel'
wikisql
CREATE TABLE table_18299148_1 ( city VARCHAR, resolution VARCHAR )
Which city has a resolution that is negotiated exile in Austria?
SELECT city FROM table_18299148_1 WHERE resolution = "Negotiated exile in Austria"
sql_create_context
CREATE TABLE table_name_74 ( gold INTEGER, nation VARCHAR, silver VARCHAR )
What is the sum of the gold medals of the total nation, which has more than 19 silver medals?
SELECT SUM(gold) FROM table_name_74 WHERE nation = "total" AND silver > 19
sql_create_context
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...
自09年9月13日起,截止到15年11月11日,查询医疗机构1782032处理过多少次新生儿门诊
SELECT COUNT(*) FROM zzmzjzjlb WHERE zzmzjzjlb.YLJGDM = '1782032' AND zzmzjzjlb.JZKSRQ BETWEEN '2009-09-13' AND '2015-11-11' AND zzmzjzjlb.ZSEBZ > 0 UNION SELECT COUNT(*) FROM fzzmzjzjlb WHERE fzzmzjzjlb.YLJGDM = '1782032' AND fzzmzjzjlb.JZKSRQ BETWEEN '2009-09-13' AND '2015-11-11' AND fzzmzjzjlb.ZSEBZ > 0
css
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 procedures ( ...
what is admission time and procedure icd9 code of subject id 2560?
SELECT demographic.admittime, procedures.icd9_code FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.subject_id = "2560"
mimicsql_data
CREATE TABLE table_14807 ( "Date" text, "Tournament" text, "Winning score" text, "Margin of victory" text, "Runner(s)-up" text )
Name the margin of victory for jonas blixt
SELECT "Margin of victory" FROM table_14807 WHERE "Runner(s)-up" = 'jonas blixt'
wikisql
CREATE TABLE table_30829 ( "DrumSet Name" text, "Product Line" text, "Years Available" text, "Drum Module" text, "KickDrum Pad" text, "Snare Pad" text, "Tom-Tom Pads" text, "Hi-HatPad/ Controller" text, "CrashandRide CymbalPads" text, "DrumStand (oftenoptional)" text )
in the drum module td-5 what are the tom-tom pads
SELECT "Tom-Tom Pads" FROM table_30829 WHERE "Drum Module" = 'TD-5'
wikisql
CREATE TABLE table_22299 ( "Player" text, "FCSL Team" text, "Years Played" text, "Year Drafted" real, "Round" text, "MLB Team" text )
When toronto blue jays are the mlb team who are the fscl team?
SELECT "FCSL Team" FROM table_22299 WHERE "MLB Team" = 'Toronto Blue Jays'
wikisql
CREATE TABLE table_23950611_2 ( rank__all__2012 VARCHAR, name VARCHAR )
What was the Forbers rank (all companies) in 2012 for cenovus energy?
SELECT rank__all__2012 FROM table_23950611_2 WHERE name = "Cenovus Energy"
sql_create_context
CREATE TABLE table_65751 ( "Frequency" text, "Call sign" text, "Format" text, "Owner" text, "Notes" text )
What is the Format of FM 100.5 Licensed to Hope?
SELECT "Format" FROM table_65751 WHERE "Notes" = 'licensed to hope' AND "Frequency" = 'fm 100.5'
wikisql
CREATE TABLE table_name_61 ( colors VARCHAR, school VARCHAR )
What Colors has a School of sesser high school?
SELECT colors FROM table_name_61 WHERE school = "sesser high school"
sql_create_context
CREATE TABLE services ( service_id number, service_type_code text ) CREATE TABLE participants ( participant_id number, participant_type_code text, participant_details text ) CREATE TABLE participants_in_events ( event_id number, participant_id number ) CREATE TABLE events ( event_id n...
List the service id and details for the events.
SELECT service_id, event_details FROM events
spider
CREATE TABLE table_name_46 ( date VARCHAR, race VARCHAR, class VARCHAR )
On which date was the Dodge Dealers Grand Prix GTS class race?
SELECT date FROM table_name_46 WHERE race = "dodge dealers grand prix" AND class = "gts"
sql_create_context
CREATE TABLE table_19954 ( "Episode No." text, "Episode Title" text, "UK Broadcast Date" text, "Presenter" text, "Details of Journey" text, "Countries Visited" text )
What are the details of the journey for the episode titled 'Zambezi Express'?
SELECT "Details of Journey" FROM table_19954 WHERE "Episode Title" = 'Zambezi Express'
wikisql
CREATE TABLE table_name_33 ( gold INTEGER, silver VARCHAR, edition VARCHAR )
What is the lowest VIII Edition Gold with a Silver of 4?
SELECT MIN(gold) FROM table_name_33 WHERE silver = 4 AND edition = "viii"
sql_create_context
CREATE TABLE table_66953 ( "Year" real, "Division" text, "League" text, "Regular Season" text, "Playoffs" text, "Open Cup" text )
What was the average year that the Nashville Metros did not qualify for the Playoffs, did not qualify for the Open Cup, and had the Regular Season 7th, Southeast?
SELECT AVG("Year") FROM table_66953 WHERE "Playoffs" = 'did not qualify' AND "Open Cup" = 'did not qualify' AND "Regular Season" = '7th, southeast'
wikisql
CREATE TABLE table_15352382_1 ( won VARCHAR, against VARCHAR )
if Against is 20 how much is Won?
SELECT won FROM table_15352382_1 WHERE against = 20
sql_create_context
CREATE TABLE fires ( fire_year number, discovery_date number, discovery_doy number, discovery_time text, stat_cause_code number, stat_cause_descr text, cont_date text, cont_doy text, cont_time text, fire_size number, fire_size_class text, latitude number, longitude nu...
What enrity is reponsible for managing the land at the point of origin of the most wildfires?
SELECT owner_descr FROM fires GROUP BY owner_descr ORDER BY COUNT(*) DESC LIMIT 1
uswildfires
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...
在2011年9月10日到2017年11月8日内医院2816651科室涉及医疗费总额低于6027.82元有多少?
SELECT COUNT(*) FROM (SELECT t_kc21.MED_ORG_DEPT_CD FROM t_kc21 JOIN t_kc24 ON t_kc21.MED_CLINIC_ID = t_kc24.MED_CLINIC_ID WHERE t_kc21.MED_SER_ORG_NO = '2816651' AND t_kc24.CLINIC_SLT_DATE BETWEEN '2011-09-10' AND '2017-11-08' GROUP BY t_kc21.MED_ORG_DEPT_CD HAVING SUM(t_kc24.MED_AMOUT) < 6027.82) AS T
css
CREATE TABLE table_151 ( "Rank" real, "English title" text, "Chinese title" text, "Average" real, "Peak" real, "Premiere" real, "Finale" real, "HK viewers" text )
what's the premiere with hk viewers of 2.09 million
SELECT "Premiere" FROM table_151 WHERE "HK viewers" = '2.09 million'
wikisql
CREATE TABLE city ( city_code varchar, city_name varchar, state_code varchar, country_name varchar, time_zone_code varchar ) CREATE TABLE ground_service ( city_code text, airport_code text, transport_type text, ground_fare int ) CREATE TABLE dual_carrier ( main_airline varchar,...
i would like a flight from NASHVILLE to ST. LOUIS that arrives in ST. LOUIS around 6pm and is nonstop
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 (((flight.arrival_time <= 1830 AND flight.arrival_time >= 1730) AND CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'ST. LOUIS' AND flight....
atis
CREATE TABLE PostNotices ( Id number, PostId number, PostNoticeTypeId number, CreationDate time, DeletionDate time, ExpiryDate time, Body text, OwnerUserId number, DeletionUserId number ) CREATE TABLE TagSynonyms ( Id number, SourceTagName text, TargetTagName text, C...
Top 50 Biggest Favorite Lists. Shows the top 50 post favoriters, so that you can browse all those favorites.
SELECT Id AS "user_link", (SELECT COUNT(*) FROM Votes WHERE VoteTypeId = 5 AND UserId = Users.Id) AS Favorites FROM Users ORDER BY Favorites DESC LIMIT 50
sede
CREATE TABLE table_name_59 ( roll INTEGER, area VARCHAR )
What is the roll of the school in Oakura?
SELECT SUM(roll) FROM table_name_59 WHERE area = "oakura"
sql_create_context
CREATE TABLE table_name_73 ( original_airdate VARCHAR, nightly_rank VARCHAR, viewers__millions_ VARCHAR )
Original airdate for #6 with 1.246 viewers?
SELECT original_airdate FROM table_name_73 WHERE nightly_rank = "#6" AND viewers__millions_ = 1.246
sql_create_context
CREATE TABLE table_name_27 ( grade VARCHAR, priority_entry_rights_to_derby VARCHAR )
What is the Grade that has Turf 1600m?
SELECT grade FROM table_name_27 WHERE priority_entry_rights_to_derby = "turf 1600m"
sql_create_context
CREATE TABLE table_69541 ( "Date" text, "Opponent" text, "Score" text, "Loss" text, "Record" text )
Who was the opponent with a Loss of Leal (1 4)?
SELECT "Opponent" FROM table_69541 WHERE "Loss" = 'leal (1–4)'
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...
从2017-09-06到2021-12-14,医疗机构6088792的头颈肿瘤外科有多少处理的住院就诊数?
SELECT COUNT(*) FROM zyjzjlb WHERE zyjzjlb.YLJGDM = '6088792' AND zyjzjlb.JZKSMC = '头颈肿瘤科' AND zyjzjlb.RYDJSJ BETWEEN '2017-09-06' AND '2021-12-14'
css
CREATE TABLE procedures ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) CREATE TABLE demographic ( subject_id text, hadm_id text, name text, marital_status text, age text, dob text, gender text, language text, religion text, ...
how many patients of hispanic, or latino/puerto rican ethnicity are diagnosed with icd9 code 51889?
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE demographic.ethnicity = "HISPANIC/LATINO - PUERTO RICAN" AND diagnoses.icd9_code = "51889"
mimicsql_data
CREATE TABLE mzjzjlb ( HXPLC number, HZXM text, JLSJ time, JZJSSJ time, JZKSBM text, JZKSMC text, JZKSRQ time, JZLSH text, JZZDBM text, JZZDSM text, JZZTDM number, JZZTMC text, KH text, KLX number, MJZH text, ML number, MZZYZDZZBM text, MZZYZDZZMC ...
患者名字是陈清心往常有过哪些异常的情况吗?
SELECT * FROM person_info JOIN hz_info JOIN mzjzjlb JOIN jybgb JOIN jyjgzbb JOIN jybgb_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 = jybgb.YLJGDM_MZJZJLB AND mzjzjlb.JZLSH = jybgb.JZLSH_MZJZJLB AND jybgb.YLJG...
css
CREATE TABLE table_test_23 ( "id" int, "previous_mi" bool, "anemia" bool, "left_ventricular_ejection_fraction_lvef" int, "tolerate_gadolinium_contrast_media" bool, "renal_disease" bool, "creatinine_clearance_cl" float, "estimated_glomerular_filtration_rate_egfr" int, "tolerate_magnet...
anemia ( hb < 8.5 mg / dl ) , thrombocytopenia ( < 100000 / ul )
SELECT * FROM table_test_23 WHERE anemia = 1 OR hb < 8.5 OR thrombocytopenia = 1 OR platelet_count < 100000
criteria2sql
CREATE TABLE table_name_68 ( conceded INTEGER, position VARCHAR, wins VARCHAR )
What is the average conceded number of the team with a position lower than 8 and more than 2 wins?
SELECT AVG(conceded) FROM table_name_68 WHERE position > 8 AND wins > 2
sql_create_context
CREATE TABLE table_34467 ( "Outcome" text, "Date" text, "Championship" text, "Surface" text, "Opponent in the final" text, "Score in the final" text )
Which opponent was a runner-up on 2 march 1998?
SELECT "Opponent in the final" FROM table_34467 WHERE "Outcome" = 'runner-up' AND "Date" = '2 march 1998'
wikisql
CREATE TABLE sqlite_sequence ( name text, seq text ) CREATE TABLE customers ( id number, first_name text, last_name text, company text, address text, city text, state text, country text, postal_code text, phone text, fax text, email text, support_rep_id numbe...
List the name of all tracks in the playlists of Movies.
SELECT T1.name FROM tracks AS T1 JOIN playlist_tracks AS T2 ON T1.id = T2.track_id JOIN playlists AS T3 ON T3.id = T2.playlist_id WHERE T3.name = "Movies"
spider
CREATE TABLE table_name_85 ( year INTEGER, notes VARCHAR, competition VARCHAR )
What is the earliest year the world junior championships has 1500 m notes?
SELECT MIN(year) FROM table_name_85 WHERE notes = "1500 m" AND competition = "world junior championships"
sql_create_context
CREATE TABLE table_40299 ( "Week" real, "Date" text, "Opponent" text, "Result" text, "Attendance" real )
Total weeks of 49,980 attendance?
SELECT SUM("Week") FROM table_40299 WHERE "Attendance" = '49,980'
wikisql
CREATE TABLE table_name_96 ( points INTEGER, against INTEGER )
What is the sum of the points of all teams that had against scores less than 14?
SELECT SUM(points) FROM table_name_96 WHERE against < 14
sql_create_context
CREATE TABLE table_202_191 ( id number, "party" text, "votes" number, "%" number, "seats" number, "+/-" number )
name the top three parties ?
SELECT "party" FROM table_202_191 ORDER BY "votes" DESC LIMIT 3
squall
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 demographic ( subject_id text, hadm_id text, name text, marital_status text, age text, dob te...
how many patients whose diagnoses short title is bmi less than 19,adult and drug type is additive?
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 = "BMI less than 19,adult" AND prescriptions.drug_type = "ADDITIVE"
mimicsql_data
CREATE TABLE Products ( Code INTEGER, Name VARCHAR(255), Price DECIMAL, Manufacturer INTEGER ) CREATE TABLE Manufacturers ( Code INTEGER, Name VARCHAR(255), Headquarter VARCHAR(255), Founder VARCHAR(255), Revenue REAL )
Give me a bar chart with the headquarters and revenues for manufacturers, sorted by revenue descending.
SELECT Headquarter, Revenue FROM Manufacturers ORDER BY Revenue DESC
nvbench
CREATE TABLE table_14017 ( "Place" text, "Player" text, "Country" text, "Score" real, "To par" text )
What to par has 65 as the score?
SELECT "To par" FROM table_14017 WHERE "Score" = '65'
wikisql
CREATE TABLE table_name_94 ( agg VARCHAR, team_2 VARCHAR )
What is the agg when team 2 was Cementarnica?
SELECT agg FROM table_name_94 WHERE team_2 = "cementarnica"
sql_create_context
CREATE TABLE table_name_12 ( report VARCHAR, score VARCHAR, set_1 VARCHAR )
What is the Report with a Score of 3 1, and Set 1 is 19 25?
SELECT report FROM table_name_12 WHERE score = "3–1" AND set_1 = "19–25"
sql_create_context
CREATE TABLE activity ( actid number, activity_name text ) CREATE TABLE participates_in ( stuid number, actid number ) CREATE TABLE faculty_participates_in ( facid number, actid number ) CREATE TABLE student ( stuid number, lname text, fname text, age number, sex text, ...
Show all the faculty ranks and the number of students advised by each rank.
SELECT T1.rank, COUNT(*) FROM faculty AS T1 JOIN student AS T2 ON T1.facid = T2.advisor GROUP BY T1.rank
spider
CREATE TABLE table_203_731 ( id number, "pos." text, "city" text, "population\n(ab)" number, "surface\n(km2)" number, "density\n(ab/km2)" number, "altitude\n(mslm)" number )
which city had the least amount of surface area ?
SELECT "city" FROM table_203_731 ORDER BY "surface\n(km2)" LIMIT 1
squall
CREATE TABLE table_41037 ( "Round" real, "Pick #" real, "Player" text, "Position" text, "College" text )
What is the sum pick # of the player from round 4?
SELECT SUM("Pick #") FROM table_41037 WHERE "Round" = '4'
wikisql
CREATE TABLE table_name_1 ( venue VARCHAR, score VARCHAR )
What venue had a Score of 120-108?
SELECT venue FROM table_name_1 WHERE score = "120-108"
sql_create_context
CREATE TABLE appellations ( No INTEGER, Appelation TEXT, County TEXT, State TEXT, Area TEXT, isAVA TEXT ) CREATE TABLE grapes ( ID INTEGER, Grape TEXT, Color TEXT ) CREATE TABLE wine ( No INTEGER, Grape TEXT, Winery TEXT, Appelation TEXT, State TEXT, Name TE...
Compare the number of winery of the wines whose price is bigger than 100, I want to show by the y axis from high to low.
SELECT Winery, COUNT(Winery) FROM wine WHERE Price > 100 GROUP BY Winery ORDER BY COUNT(Winery) DESC
nvbench
CREATE TABLE table_4404 ( "Res." text, "Record" text, "Opponent" text, "Method" text, "Event" text, "Round" real, "Time" text, "Location" text )
What was the record at WEC 24?
SELECT "Record" FROM table_4404 WHERE "Event" = 'wec 24'
wikisql
CREATE TABLE table_name_67 ( time VARCHAR, score VARCHAR )
What was the time when the score was 0 3?
SELECT time FROM table_name_67 WHERE score = "0–3"
sql_create_context
CREATE TABLE student ( student_id int, lastname varchar, firstname varchar, program_id int, declare_major varchar, total_credit int, total_gpa float, entered_as varchar, admit_term int, predicted_graduation_semester int, degree varchar, minor varchar, internship varch...
Is 542 available to undergrads ?
SELECT DISTINCT advisory_requirement, enforced_requirement, name FROM course WHERE department = 'EECS' AND number = 542
advising
CREATE TABLE table_53904 ( "Date" text, "Opponent" text, "Score" text, "Loss" text, "Attendance" text, "Record" text )
Name the date for Loss of schilling (5 2)
SELECT "Date" FROM table_53904 WHERE "Loss" = 'schilling (5–2)'
wikisql
CREATE TABLE chartevents ( row_id number, subject_id number, hadm_id number, icustay_id number, itemid number, charttime time, valuenum number, valueuom text ) CREATE TABLE d_icd_diagnoses ( row_id number, icd9_code text, short_title text, long_title text ) CREATE TABLE...
what were the three most frequently diagnosed diagnoses for patients who had been diagnosed with preterm nec 2000-2499g before within the same month, since 5 years ago?
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, diagnoses_icd.charttime FROM diagnoses_icd JOIN admissions ON diagnoses_icd.hadm_id = admissions...
mimic_iii
CREATE TABLE table_name_84 ( tonnage___grt__ INTEGER, date VARCHAR, ship_name VARCHAR )
Which tonnage has a Date of 26 september 1940, and a Ship Name of ashantian?
SELECT MIN(tonnage___grt__) FROM table_name_84 WHERE date = "26 september 1940" AND ship_name = "ashantian"
sql_create_context
CREATE TABLE patient ( uniquepid text, patienthealthsystemstayid number, patientunitstayid number, gender text, age text, ethnicity text, hospitalid number, wardid number, admissionheight number, admissionweight number, dischargeweight number, hospitaladmittime time, ...
during this year, patient 031-17228 visited an er?
SELECT COUNT(*) > 0 FROM patient WHERE patient.uniquepid = '031-17228' AND patient.hospitaladmitsource = 'emergency department' AND DATETIME(patient.unitadmittime, 'start of year') = DATETIME(CURRENT_TIME(), 'start of year', '-0 year')
eicu
CREATE TABLE table_57378 ( "Channel" real, "Video" text, "Aspect" text, "PSIP Short Name" text, "Programming" text )
What is the Aspect of Channel 26.5?
SELECT "Aspect" FROM table_57378 WHERE "Channel" = '26.5'
wikisql
CREATE TABLE table_59072 ( "WEEKDAYS" text, "5:55" text, "10:00" text, "15:00" text, "16:00" text, "17:30" text, "18:00" text, "19:15" text, "19:26" text, "20:00" text, "20:30" text, "21:00" text, "21:30" text, "22:00" text, "23:00" text )
What show comes on at 21:00 when Dot Above I comes on at 20:00?
SELECT "21:00" FROM table_59072 WHERE "20:00" = 'dot above i'
wikisql
CREATE TABLE table_name_75 ( year VARCHAR, guernsey_record VARCHAR )
What year was the Guernsey record of 2-3-12 set?
SELECT year FROM table_name_75 WHERE guernsey_record = "2-3-12"
sql_create_context
CREATE TABLE regions ( REGION_ID decimal(5,0), REGION_NAME varchar(25) ) CREATE TABLE countries ( COUNTRY_ID varchar(2), COUNTRY_NAME varchar(40), REGION_ID decimal(10,0) ) CREATE TABLE job_history ( EMPLOYEE_ID decimal(6,0), START_DATE date, END_DATE date, JOB_ID varchar(10), ...
Show me manager_id by last name in a histogram, could you show MANAGER_ID in descending order please?
SELECT LAST_NAME, MANAGER_ID FROM employees ORDER BY MANAGER_ID DESC
nvbench
CREATE TABLE table_13300 ( "Week" real, "Date" text, "Opponent" text, "Result" text, "Attendance" real )
What is the highest week with a w 33-14 result?
SELECT MAX("Week") FROM table_13300 WHERE "Result" = 'w 33-14'
wikisql
CREATE TABLE jyjgzbb ( BGDH text, BGRQ time, CKZFWDX text, CKZFWSX number, CKZFWXX number, JCFF text, JCRGH text, JCRXM text, JCXMMC text, JCZBDM text, JCZBJGDL number, JCZBJGDW text, JCZBJGDX text, JCZBMC text, JLDW text, JYRQ time, JYZBLSH text, ...
医疗机构5267326超过27天的住院天数的人有多少?
SELECT COUNT(person_info.RYBH) 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.YLJGD...
css
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...
what are the three most commonly ordered procedures for patients who previously received therapeutic antibacterials - clindamycin within 2 months?
SELECT t3.treatmentname FROM (SELECT t2.treatmentname, 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 = 'therapeutic antibacterials - clindamycin...
eicu
CREATE TABLE table_79248 ( "School" text, "Location" text, "Mascot" text, "# / County" text, "Enrollment" real, "IHSAA Class /Football/Soccer" text, "Year joined" real, "Previous Conference" text, "Year Left" real, "Conference Joined" text )
What is the average enrollment that has hot dogs as the mascot, with a year joined later than 1926?
SELECT AVG("Enrollment") FROM table_79248 WHERE "Mascot" = 'hot dogs' AND "Year joined" > '1926'
wikisql
CREATE TABLE table_name_29 ( city VARCHAR, abbr VARCHAR )
In which city is MUB located?
SELECT city FROM table_name_29 WHERE abbr = "mub"
sql_create_context
CREATE TABLE Theme_Parks ( Theme_Park_ID INTEGER, Theme_Park_Details VARCHAR(255) ) CREATE TABLE Locations ( Location_ID INTEGER, Location_Name VARCHAR(255), Address VARCHAR(255), Other_Details VARCHAR(255) ) CREATE TABLE Tourist_Attraction_Features ( Tourist_Attraction_ID INTEGER, Fea...
List all the possible ways to get to attractions, together with the number of attractions accessible by these methods in a bar chart.
SELECT How_to_Get_There, COUNT(*) FROM Tourist_Attractions GROUP BY How_to_Get_There
nvbench
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,...
民政补助金额在医疗就诊87724131785为多少?
SELECT CIVIL_SUBSIDY FROM t_kc24 WHERE MED_CLINIC_ID = '87724131785'
css
CREATE TABLE procedures ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) CREATE TABLE demographic ( subject_id text, hadm_id text, name text, marital_status text, age text, dob text, gender text, language text, religion text, ...
what is the number of patients whose primary disease is syncope;telemetry?
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.diagnosis = "SYNCOPE;TELEMETRY"
mimicsql_data
CREATE TABLE outputevents ( row_id number, subject_id number, hadm_id number, icustay_id number, charttime time, itemid number, value number ) CREATE TABLE procedures_icd ( row_id number, subject_id number, hadm_id number, icd9_code text, charttime time ) CREATE TABLE c...
how many patients have received a vaccination nec procedure two times the previous year?
SELECT COUNT(DISTINCT t1.subject_id) FROM (SELECT admissions.subject_id, COUNT(*) AS c1 FROM procedures_icd JOIN admissions ON procedures_icd.hadm_id = admissions.hadm_id WHERE procedures_icd.icd9_code = (SELECT d_icd_procedures.icd9_code FROM d_icd_procedures WHERE d_icd_procedures.short_title = 'vaccination nec') AND...
mimic_iii
CREATE TABLE table_61012 ( "2006" real, "2007" real, "2008" real, "2009" real, "2010" real )
How many 2007s have 0.2 as a 2006, with a 2010 less than 0.1?
SELECT SUM("2007") FROM table_61012 WHERE "2006" = '0.2' AND "2010" < '0.1'
wikisql
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, ...
what is the number of patients whose insurance is private and with hospital stay above 6 days?
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.insurance = "Private" AND demographic.days_stay > "6"
mimicsql_data
CREATE TABLE club_rank ( rank number, club_id number, gold number, silver number, bronze number, total number ) CREATE TABLE club ( club_id number, name text, region text, start_year text ) CREATE TABLE player ( player_id number, name text, position text, club_i...
What is the number of players who have points less than 30 for each position?
SELECT COUNT(*), position FROM player WHERE points < 30 GROUP BY position
spider
CREATE TABLE table_28325 ( "Series No." real, "Episode No." real, "Title" text, "Directed by" text, "Written by" text, "Original air date" text, "U.S. viewers (millions)" text )
What episode number in the season had 1.05 million U.S. viewers?
SELECT MAX("Episode No.") FROM table_28325 WHERE "U.S. viewers (millions)" = '1.05'
wikisql
CREATE TABLE table_66015 ( "Title" text, "Time" text, "Writer(s)" text, "Performer(s)" text, "Producer(s)" text, "Recorded at" text )
Who performed the song recorded at the Cabin in the Woods Studio with a Time of 3:16?
SELECT "Performer(s)" FROM table_66015 WHERE "Recorded at" = 'the cabin in the woods studio' AND "Time" = '3:16'
wikisql
CREATE TABLE diagnosis ( diagnosisid number, patientunitstayid number, diagnosisname text, diagnosistime time, icd9code text ) CREATE TABLE microlab ( microlabid number, patientunitstayid number, culturesite text, organism text, culturetakentime time ) CREATE TABLE cost ( c...
how many methylprednisolone 125 mg inj prescriptions took place until 1 year ago?
SELECT COUNT(*) FROM medication WHERE medication.drugname = 'methylprednisolone 125 mg inj' AND DATETIME(medication.drugstarttime) <= DATETIME(CURRENT_TIME(), '-1 year')
eicu
CREATE TABLE table_name_12 ( drawn INTEGER, against VARCHAR, lost VARCHAR, points VARCHAR )
What is the highest Drawn when the lost is 7 and the points are more than 4, and the against is less than 22?
SELECT MAX(drawn) FROM table_name_12 WHERE lost = 7 AND points > 4 AND against < 22
sql_create_context
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, ...
1031443这个医疗机构在04年1月3日到2021年7月10日期间它的患者平均住院时间是多久?
SELECT AVG(gwyjzb.IN_HOSP_DAYS) FROM gwyjzb WHERE gwyjzb.MED_SER_ORG_NO = '1031443' AND gwyjzb.IN_HOSP_DATE BETWEEN '2004-01-03' AND '2021-07-10' UNION SELECT AVG(fgwyjzb.IN_HOSP_DAYS) FROM fgwyjzb WHERE fgwyjzb.MED_SER_ORG_NO = '1031443' AND fgwyjzb.IN_HOSP_DATE BETWEEN '2004-01-03' AND '2021-07-10'
css
CREATE TABLE table_78991 ( "Model" text, "Chassis" real, "Engine" real, "Year From" real, "Year To" real )
Which Year To has an Engine of 119.972, and a Chassis smaller than 129.067?
SELECT MIN("Year To") FROM table_78991 WHERE "Engine" = '119.972' AND "Chassis" < '129.067'
wikisql
CREATE TABLE table_5112 ( "Series Ep." text, "Episode" real, "Segment A" text, "Segment B" text, "Segment C" text, "Segment D" text )
What is the highest episode of Wood Flutes segment c?
SELECT MAX("Episode") FROM table_5112 WHERE "Segment C" = 'wood flutes'
wikisql
CREATE TABLE table_name_16 ( second VARCHAR, nation VARCHAR )
Which Second has a Nation of latvia?
SELECT second FROM table_name_16 WHERE nation = "latvia"
sql_create_context
CREATE TABLE table_2187333_1 ( year VARCHAR, team_s_ VARCHAR, poles VARCHAR )
Name the year for #16 roush racing for poles less than smaller 1.0
SELECT year FROM table_2187333_1 WHERE team_s_ = "#16 Roush Racing" AND poles < 1.0
sql_create_context
CREATE TABLE demographic ( subject_id text, hadm_id text, name text, marital_status text, age text, dob text, gender text, language text, religion text, admission_type text, days_stay text, insurance text, ethnicity text, expire_flag text, admission_location t...
what is drug type and drug dose of drug name amaryl?
SELECT prescriptions.drug_type, prescriptions.drug_dose FROM prescriptions WHERE prescriptions.drug = "Amaryl"
mimicsql_data
CREATE TABLE table_203_591 ( id number, "high school" text, "join\nyear" text, "from" text, "left" text, "league left to" text )
how many schools left in 1960 ?
SELECT COUNT("high school") FROM table_203_591 WHERE "left" = 1960
squall
CREATE TABLE table_train_276 ( "id" int, "hbv" bool, "systolic_blood_pressure_sbp" int, "hiv_infection" bool, "hcv" bool, "diastolic_blood_pressure_dbp" int, "body_mass_index_bmi" float, "hypertension" bool, "NOUSE" float )
history of human immunodeficiency virus ( hiv ) antibody positive
SELECT * FROM table_train_276 WHERE hiv_infection = 1
criteria2sql
CREATE TABLE table_28677723_9 ( total INTEGER, style VARCHAR )
What is the smallest total score for the Pasodoble style?
SELECT MIN(total) FROM table_28677723_9 WHERE style = "Pasodoble"
sql_create_context
CREATE TABLE jyjgzbb ( BGDH text, BGRQ time, CKZFWDX text, CKZFWSX number, CKZFWXX number, JCFF text, JCRGH text, JCRXM text, JCXMMC text, JCZBDM text, JCZBJGDL number, JCZBJGDW text, JCZBJGDX text, JCZBMC text, JLDW text, JYRQ time, JYZBLSH text, ...
之前患者孔梦菡发生过哪些异常情况
SELECT * FROM person_info JOIN hz_info JOIN wdmzjzjlb JOIN jybgb JOIN jyjgzbb ON person_info.RYBH = hz_info.RYBH AND hz_info.YLJGDM = wdmzjzjlb.YLJGDM AND hz_info.KH = wdmzjzjlb.KH AND hz_info.KLX = wdmzjzjlb.KLX AND wdmzjzjlb.YLJGDM = jybgb.YLJGDM_MZJZJLB AND wdmzjzjlb.JZLSH = jybgb.JZLSH_MZJZJLB AND jybgb.YLJGDM = jy...
css
CREATE TABLE table_14100 ( "Engine" text, "Displacement" text, "Years" text, "Usage" text, "Power" text )
What is the usage for the f136e engline?
SELECT "Usage" FROM table_14100 WHERE "Engine" = 'f136e'
wikisql
CREATE TABLE table_1341472_45 ( first_elected VARCHAR, incumbent VARCHAR )
What year was Larry combest elected
SELECT first_elected FROM table_1341472_45 WHERE incumbent = "Larry Combest"
sql_create_context