context
stringlengths
11
9.12k
question
stringlengths
0
1.06k
SQL
stringlengths
2
4.44k
source
stringclasses
28 values
CREATE TABLE table_57163 ( "Entrant" text, "Constructor" text, "Chassis" text, "Driver" text, "Rounds" text )
Which of the entrants had Luigi Fagioli as a driver?
SELECT "Entrant" FROM table_57163 WHERE "Driver" = 'luigi fagioli'
wikisql
CREATE TABLE table_36396 ( "Race" text, "Length" text, "Class" text, "Circuit" text, "Date" text )
What is the class of the Charlotte Camel gt 500 race?
SELECT "Class" FROM table_36396 WHERE "Race" = 'charlotte camel gt 500'
wikisql
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...
列出患者65243829所有检验报告单的审核日期在在18年7月3日到20年2月16日内是哪天?
SELECT jybgb.SHSJ FROM hz_info JOIN txmzjzjlb JOIN jybgb ON hz_info.YLJGDM = txmzjzjlb.YLJGDM AND hz_info.KH = txmzjzjlb.KH AND hz_info.KLX = txmzjzjlb.KLX AND txmzjzjlb.YLJGDM = jybgb.YLJGDM_MZJZJLB AND txmzjzjlb.JZLSH = jybgb.JZLSH_MZJZJLB WHERE hz_info.RYBH = '65243829' AND jybgb.BGRQ BETWEEN '2018-07-03' AND '2020-...
css
CREATE TABLE table_203_228 ( id number, "#" number, "title" text, "songwriters" text, "producer(s)" text, "performer (s)" text )
how many tracks in word ... life have only lord finesse as a producer ?
SELECT COUNT("title") FROM table_203_228 WHERE "producer(s)" = 'lord finesse'
squall
CREATE TABLE table_22736523_1 ( theme VARCHAR, song_choice VARCHAR )
If Crazy In Love is the song choice, what is the theme?
SELECT theme FROM table_22736523_1 WHERE song_choice = "Crazy In Love"
sql_create_context
CREATE TABLE table_30772 ( "Year" text, "Candidates" real, "Total votes" real, "Average votes per candidate" real, "% of total vote" text, "Average % of vote per candidate" text, "Saved Deposits" real, "Number of MPs" real )
In what year was 1.35% the average vote per candidate?
SELECT "Year" FROM table_30772 WHERE "Average % of vote per candidate" = '1.35'
wikisql
CREATE TABLE table_name_19 ( quantity_preserved VARCHAR, serial_numbers VARCHAR )
What is the quantity preserved for the serial number of mallet and simple articulated locomotives?
SELECT quantity_preserved FROM table_name_19 WHERE serial_numbers = "mallet and simple articulated locomotives"
sql_create_context
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, itemid text, charttime text, flag text, value_unit text, label text, fluid text ) CREATE TABLE prescription...
provide the number of patients admitted in hospital before the year 2133 who have lab test item id 51132.
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.admityear < "2133" AND lab.itemid = "51132"
mimicsql_data
CREATE TABLE table_70734 ( "Model" text, "Build date" text, "Total produced" real, "Wheel arrangement" text, "Prime mover" text, "Power output" text )
What is the build date when total produced is 2?
SELECT "Build date" FROM table_70734 WHERE "Total produced" = '2'
wikisql
CREATE TABLE table_name_2 ( venue VARCHAR, competition VARCHAR, date VARCHAR )
In what stadium was the friendly match on 2 June 1992 played in?
SELECT venue FROM table_name_2 WHERE competition = "friendly match" AND date = "2 june 1992"
sql_create_context
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...
从03年7月12日到2018年11月19日,病患葛曼妮医保的医疗费总额是多少?
SELECT SUM(t_kc24.MED_AMOUT) FROM t_kc21 JOIN t_kc24 JOIN t_kc21_t_kc24 ON t_kc21.MED_CLINIC_ID = t_kc21_t_kc24.MED_CLINIC_ID AND t_kc21_t_kc24.MED_SAFE_PAY_ID = t_kc24.MED_SAFE_PAY_ID WHERE t_kc21.PERSON_NM = '葛曼妮' AND t_kc24.CLINIC_SLT_DATE BETWEEN '2003-07-12' AND '2018-11-19'
css
CREATE TABLE table_11020 ( "Year" real, "Award" text, "Category" text, "Work" text, "Result" text )
What type of award is the theatre world award?
SELECT "Award" FROM table_11020 WHERE "Category" = 'theatre world award'
wikisql
CREATE TABLE table_name_71 ( selection INTEGER, college VARCHAR )
Which Selection has a College of texas a&m?
SELECT SUM(selection) FROM table_name_71 WHERE college = "texas a&m"
sql_create_context
CREATE TABLE table_name_37 ( assists INTEGER, league VARCHAR, goals VARCHAR )
In the WCHL League, what is the last Assists with less than 65 Goals?
SELECT MIN(assists) FROM table_name_37 WHERE league = "wchl" AND goals < 65
sql_create_context
CREATE TABLE table_name_46 ( grid INTEGER, rider VARCHAR )
How many grids did Shinichi Nakatomi ride in?
SELECT SUM(grid) FROM table_name_46 WHERE rider = "shinichi nakatomi"
sql_create_context
CREATE TABLE table_57562 ( "Res." text, "Record" text, "Opponent" text, "Method" text, "Event" text, "Round" text, "Time" text, "Location" text )
What location is Jimmy Smith fighting in?
SELECT "Location" FROM table_57562 WHERE "Opponent" = 'jimmy smith'
wikisql
CREATE TABLE table_22757733_4 ( party VARCHAR, runner_up_a VARCHAR )
which was k. annamalai s party a?
SELECT party AS a FROM table_22757733_4 WHERE runner_up_a = "K. Annamalai"
sql_create_context
CREATE TABLE table_21854 ( "Episode" real, "Original title" text, "Directed by" text, "Written by" text, "Original airdate" text, "Duration" text, "Viewership" text )
How many episodes of 30 minutes were written by John Sullivan?
SELECT COUNT("Duration") FROM table_21854 WHERE "Written by" = 'John Sullivan'
wikisql
CREATE TABLE table_20226 ( "Date" text, "Cover model" text, "Centerfold model" text, "Interview subject" text, "20 Questions" text, "Pictorials" text )
Who was featured in 20 questions on 4-03?
SELECT "20 Questions" FROM table_20226 WHERE "Date" = '4-03'
wikisql
CREATE TABLE table_name_24 ( total VARCHAR, player VARCHAR )
What is the total number for Seve Ballesteros?
SELECT COUNT(total) FROM table_name_24 WHERE player = "seve ballesteros"
sql_create_context
CREATE TABLE ENROLL ( CLASS_CODE varchar(5), STU_NUM int, ENROLL_GRADE varchar(50) ) CREATE TABLE CLASS ( CLASS_CODE varchar(5), CRS_CODE varchar(10), CLASS_SECTION varchar(2), CLASS_TIME varchar(20), CLASS_ROOM varchar(8), PROF_NUM int ) CREATE TABLE STUDENT ( STU_NUM int, ...
What is the lowest student GPA for every department? Return a bar chart, show in asc by the y axis.
SELECT DEPT_CODE, MIN(STU_GPA) FROM STUDENT GROUP BY DEPT_CODE ORDER BY MIN(STU_GPA)
nvbench
CREATE TABLE table_26060884_2 ( vehicle_theft VARCHAR, forcible_rape VARCHAR )
How many vehicle thefts data were recorded if forcible rape is 1232?
SELECT COUNT(vehicle_theft) FROM table_26060884_2 WHERE forcible_rape = 1232
sql_create_context
CREATE TABLE table_name_91 ( sr_number VARCHAR, lb VARCHAR, sc_number VARCHAR )
what is the s.r. number when lb&sc number is 34?
SELECT sr_number FROM table_name_91 WHERE lb & sc_number = 34
sql_create_context
CREATE TABLE table_name_93 ( high_assists VARCHAR, date VARCHAR )
What is High Assists, when Date is 'March 10'?
SELECT high_assists FROM table_name_93 WHERE date = "march 10"
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 regions ( REGION_ID decimal(5,0), REGION_NAME varchar(25) ) CREATE TABLE jobs ( JOB_ID varchar(10), JOB_TITLE varchar(35), MIN_SALARY...
For those employees whose salary is in the range of 8000 and 12000 and commission is not null or department number does not equal to 40, give me the comparison about the average of manager_id over the hire_date bin hire_date by time by a bar chart.
SELECT HIRE_DATE, AVG(MANAGER_ID) FROM employees WHERE SALARY BETWEEN 8000 AND 12000 AND COMMISSION_PCT <> "null" OR DEPARTMENT_ID <> 40
nvbench
CREATE TABLE diagnosis ( diagnosisid number, patientunitstayid number, diagnosisname text, diagnosistime time, icd9code text ) CREATE TABLE cost ( costid number, uniquepid text, patienthealthsystemstayid number, eventtype text, eventid number, chargetime time, cost numbe...
so, what was the last systemicdiastolic of patient 022-187132 on the current icu visit?
SELECT vitalperiodic.systemicdiastolic FROM vitalperiodic WHERE vitalperiodic.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '022-187132') AND patient.unitdischargetime IS NUL...
eicu
CREATE TABLE table_name_45 ( label VARCHAR, year VARCHAR )
Which label's year is 1993?
SELECT label FROM table_name_45 WHERE year = "1993"
sql_create_context
CREATE TABLE Maintenance_Contracts ( maintenance_contract_id INTEGER, maintenance_contract_company_id INTEGER, contract_start_date DATETIME, contract_end_date DATETIME, other_contract_details VARCHAR(255) ) CREATE TABLE Maintenance_Engineers ( engineer_id INTEGER, company_id INTEGER, fi...
A stacked bar chart showing the number of engineers for different skill description The x-axis is skill description and group by other deteails, I want to show y axis from low to high order.
SELECT skill_description, COUNT(skill_description) FROM Maintenance_Engineers AS T1 JOIN Engineer_Skills AS T2 ON T1.engineer_id = T2.engineer_id JOIN Skills AS T3 ON T2.skill_id = T3.skill_id GROUP BY other_details, skill_description ORDER BY COUNT(skill_description)
nvbench
CREATE TABLE table_69210 ( "State" text, "Preliminaries" real, "Interview" real, "Swimsuit" real, "Evening Gown" real, "Average" real )
What is the total swimsuit with Preliminaries smaller than 8.27?
SELECT SUM("Swimsuit") FROM table_69210 WHERE "Preliminaries" < '8.27'
wikisql
CREATE TABLE location ( restaurant_id int, house_number int, street_name varchar, city_name varchar ) CREATE TABLE restaurant ( id int, name varchar, food_type varchar, city_name varchar, rating "decimal ) CREATE TABLE geographic ( city_name varchar, county varchar, reg...
give me a good french restaurant in the yosemite and mono lake area ?
SELECT location.house_number, restaurant.name FROM geographic, location, restaurant WHERE geographic.region = 'yosemite and mono lake area' AND restaurant.city_name = geographic.city_name AND restaurant.food_type = 'french' AND restaurant.id = location.restaurant_id AND restaurant.rating > 2.5
restaurants
CREATE TABLE wdmzjzjlb ( HXPLC number, HZXM text, JLSJ time, JZJSSJ time, JZKSBM text, JZKSMC text, JZKSRQ time, JZLSH number, JZZDBM text, JZZDSM text, JZZTDM number, JZZTMC text, KH text, KLX number, MJZH text, ML number, MZZYZDZZBM text, MZZYZDZ...
哪些人被门诊诊断为慢性龈炎?并列举出这些的患者的籍贯代码、名称以及相应人数
SELECT person_info.JGDM, person_info.JGMC, COUNT(person_info.RYBH) FROM person_info JOIN hz_info JOIN wdmzjzjlb 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 WHERE wdmzjzjlb.JZZDSM = '慢性龈炎' GROUP BY person_info.JGDM UNION SELECT pe...
css
CREATE TABLE hz_info ( KH text, KLX number, RYBH text, YLJGDM text ) 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...
有多少医生在2001年12月6日到2019年12月13日期间给39252424号患者看过病?
SELECT COUNT(txmzjzjlb.ZZYSGH) 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 = '39252424' AND txmzjzjlb.JZKSRQ BETWEEN '2001-12-06' AND '2019-12-13' UNION SELECT COUNT(ftxmzjzjlb.ZZYSGH) FROM hz_info JOIN ftxmzjzjlb ON h...
css
CREATE TABLE table_201400_2 ( kannada_name_ಕನ್ನಡ VARCHAR, tamil_name_தமிழ் VARCHAR )
what is kannada name of tamil name anusham
SELECT kannada_name_ಕನ್ನಡ FROM table_201400_2 WHERE tamil_name_தமிழ் = "Anusham அனுஷம்"
sql_create_context
CREATE TABLE table_27734577_13 ( series VARCHAR, high_rebounds VARCHAR )
What is the series number when al horford (10) had the high rebounds?
SELECT series FROM table_27734577_13 WHERE high_rebounds = "Al Horford (10)"
sql_create_context
CREATE TABLE table_name_67 ( score VARCHAR, to_par VARCHAR, country VARCHAR )
Which Score has a To par of +1 in sweden?
SELECT score FROM table_name_67 WHERE to_par = "+1" AND country = "sweden"
sql_create_context
CREATE TABLE treatment ( treatmentid number, patientunitstayid number, treatmentname text, treatmenttime time ) CREATE TABLE microlab ( microlabid number, patientunitstayid number, culturesite text, organism text, culturetakentime time ) CREATE TABLE cost ( costid number, u...
did patient 033-4763 receive a anticonvulsants - valproate operation in another hospital during this year?
SELECT COUNT(*) > 0 FROM treatment WHERE treatment.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.uniquepid = '033-4763' AND patient.hospitalid <> (SELECT DISTINCT patient.hospitalid FROM patient WHERE patient.uniquepid = '033-4763' AND patient.hospitaldischargetime IS NULL)) AND trea...
eicu
CREATE TABLE jyjgzbb ( JYZBLSH text, YLJGDM text, BGDH text, BGRQ time, JYRQ time, JCRGH text, JCRXM text, SHRGH text, SHRXM text, JCXMMC text, JCZBDM text, JCFF text, JCZBMC text, JCZBJGDX text, JCZBJGDL number, JCZBJGDW text, SBBM text, YQBH text...
医生21581460的门诊量在2002年10月1日到2016年7月5日内总共有多少人?
SELECT COUNT(*) FROM mzjzjlb WHERE ZZYSGH = '21581460' AND JZKSRQ BETWEEN '2002-10-01' AND '2016-07-05'
css
CREATE TABLE table_56018 ( "Name" text, "Bodyweight" real, "Snatch" real, "Clean & jerk" real, "Total (kg)" real )
What is the total associated with a Clean & jerk of 135, and a Snatch of 115?
SELECT "Total (kg)" FROM table_56018 WHERE "Clean & jerk" = '135' AND "Snatch" = '115'
wikisql
CREATE TABLE table_24212 ( "Competition" text, "Round" text, "Opponent" text, "Result" text, "Score" text, "Home/Away" text, "Venue" text, "Attendance" real, "Date" text )
how many venues were played on in round 1
SELECT COUNT("Venue") FROM table_24212 WHERE "Round" = '1'
wikisql
CREATE TABLE table_75576 ( "Week" real, "Date" text, "Opponent" text, "Result" text, "Venue" text, "Attendance" real )
How many people attended the game on September 19, 1976?
SELECT COUNT("Attendance") FROM table_75576 WHERE "Date" = 'september 19, 1976'
wikisql
CREATE TABLE table_name_68 ( home_team VARCHAR, away_team VARCHAR, tie_no VARCHAR, date VARCHAR )
Who was the home team on 4 February 1987 when Luton Town was away team and there was no replay?
SELECT home_team FROM table_name_68 WHERE tie_no = "replay" AND date = "4 february 1987" AND away_team = "luton town"
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 demographic ( subject_id text, hadm_id text, name text, marital_status text, age text, dob te...
what is the number of patients born before the year 2152 and with drug route pb?
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE demographic.dob_year < "2152" AND prescriptions.route = "PB"
mimicsql_data
CREATE TABLE t_kc22 ( AMOUNT number, CHA_ITEM_LEV number, DATA_ID text, DIRE_TYPE number, DOSE_FORM text, DOSE_UNIT text, EACH_DOSAGE text, EXP_OCC_DATE time, FLX_MED_ORG_ID text, FXBZ number, HOSP_DOC_CD text, HOSP_DOC_NM text, MED_CLINIC_ID text, MED_DIRE_CD tex...
花费的医疗费总额不少于1973.76元的次数在患者72169223的医疗记录有多少,其有什么编号的病是入院诊断出来的,叫啥名?
SELECT t_kc24.t_kc21_IN_DIAG_DIS_CD, t_kc24.t_kc21_IN_DIAG_DIS_NM FROM t_kc24 WHERE t_kc24.t_kc21_PERSON_ID = '72169223' AND t_kc24.MED_CLINIC_ID IN (SELECT t_kc24.MED_CLINIC_ID FROM t_kc24 WHERE t_kc24.MED_AMOUT >= 1973.76)
css
CREATE TABLE table_34085 ( "Date" text, "Opponent" text, "Result" text, "Score" text, "Record" text, "Streak" text )
What was the Record of the game with a Score of 118 105?
SELECT "Record" FROM table_34085 WHERE "Score" = '118–105'
wikisql
CREATE TABLE table_name_1 ( name VARCHAR, lane VARCHAR, nationality VARCHAR )
Who was from Great Britain in lanes under number 3?
SELECT name FROM table_name_1 WHERE lane < 3 AND nationality = "great britain"
sql_create_context
CREATE TABLE table_1449176_1 ( rank VARCHAR, area__km_2__ VARCHAR )
What rank is the common with an area of 47.3 km^2?
SELECT rank FROM table_1449176_1 WHERE area__km_2__ = "47.3"
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...
从2000年9月28日到2007年1月25日这段时间内患者奚霞辉所有检验结果指标记录中的仪器编号以及名称都是啥?
SELECT jyjgzbb.YQBH, jyjgzbb.YQMC 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.BG...
css
CREATE TABLE course_prerequisite ( pre_course_id int, course_id int ) CREATE TABLE jobs ( job_id int, job_title varchar, description varchar, requirement varchar, city varchar, state varchar, country varchar, zip int ) CREATE TABLE area ( course_id int, area varchar ) ...
On Mondays and Wednesdays , can I take 398 ?
SELECT COUNT(*) > 0 FROM course, course_offering, semester WHERE course_offering.friday = 'N' AND course_offering.monday = 'Y' AND course_offering.thursday = 'N' AND course_offering.tuesday = 'N' AND course_offering.wednesday = 'Y' AND course.course_id = course_offering.course_id AND course.department = 'EECS' AND cour...
advising
CREATE TABLE table_name_95 ( pick VARCHAR, college VARCHAR )
How many picks went to College of Letran?
SELECT COUNT(pick) FROM table_name_95 WHERE college = "letran"
sql_create_context
CREATE TABLE station ( id int, network_name text, services text, local_authority text ) CREATE TABLE route ( train_id int, station_id int ) CREATE TABLE train ( id int, train_number int, name text, origin text, destination text, time text, interval text ) CREATE TA...
Find times of trains that run through stations for the local authority Chiltern, compare the total number of different times, I want to rank by the X from high to low.
SELECT time, COUNT(time) FROM station AS t1 JOIN route AS t2 ON t1.id = t2.station_id JOIN train AS t3 ON t2.train_id = t3.id WHERE t1.local_authority = "Chiltern" GROUP BY time ORDER BY time DESC
nvbench
CREATE TABLE table_24183 ( "Model" text, "Years" text, "Type/code" text, "Transmission" text, "max. power" text, "Torque" text, "0-km/h (mph) (sec)" text, "top speed" text )
What is the s7 4.0 tfsi quattro engine torque?
SELECT "Torque" FROM table_24183 WHERE "Model" = 'S7 4.0 TFSI quattro'
wikisql
CREATE TABLE people ( People_ID int, Sex text, Name text, Date_of_Birth text, Height real, Weight real ) 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 re...
Visualize a bar chart about the distribution of Sex and the sum of Height , and group by attribute Sex, show in ascending by the bars.
SELECT Sex, SUM(Height) FROM people GROUP BY Sex ORDER BY Sex
nvbench
CREATE TABLE table_name_3 ( year VARCHAR, nominee VARCHAR )
In what year was Martin Sheen nominated?
SELECT year FROM table_name_3 WHERE nominee = "martin sheen"
sql_create_context
CREATE TABLE table_77255 ( "Rider" text, "Manufacturer" text, "Laps" real, "Time/Retired" text, "Grid" real )
Who is the rider with less than 15 laps, more than 32 grids, and an accident time/retired?
SELECT "Rider" FROM table_77255 WHERE "Laps" < '15' AND "Grid" > '32' AND "Time/Retired" = 'accident'
wikisql
CREATE TABLE table_71193 ( "Player" text, "Position" text, "Previous Club" text, "Apps" real, "Tries" real, "Goals" text, "Points" real )
With 0 Goals and less than 1 Tries, what is Matt James position?
SELECT "Position" FROM table_71193 WHERE "Goals" = '0' AND "Tries" < '1' AND "Player" = 'matt james'
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 patient ( ...
what is the three most common procedure given to patients aged 50s until 2104?
SELECT t1.treatmentname FROM (SELECT treatment.treatmentname, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM treatment WHERE treatment.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.age BETWEEN 50 AND 59) AND STRFTIME('%y', treatment.treatmenttime) <= '2104' GROUP BY treatment....
eicu
CREATE TABLE PostFeedback ( Id number, PostId number, IsAnonymous boolean, VoteTypeId number, CreationDate time ) CREATE TABLE VoteTypes ( Id number, Name text ) CREATE TABLE SuggestedEdits ( Id number, PostId number, CreationDate time, ApprovalDate time, RejectionDate ...
My most insufficient-rep voted posts.
SELECT Id AS "post_link", Score, (SELECT COUNT(Id) FROM PostFeedback AS v WHERE p.Id = v.PostId AND v.VoteTypeId = 2) AS Upmods, (SELECT COUNT(Id) FROM PostFeedback AS v WHERE p.Id = v.PostId AND v.VoteTypeId = 3) AS Downmods FROM Posts AS p WHERE p.OwnerUserId = '##UserId##' ORDER BY (SELECT COUNT(Id) FROM PostFeedbac...
sede
CREATE TABLE table_name_13 ( class VARCHAR, wins VARCHAR, points VARCHAR )
What class has over 0 wins and 42 points?
SELECT class FROM table_name_13 WHERE wins > 0 AND points = 42
sql_create_context
CREATE TABLE ReviewTaskResultTypes ( Id number, Name text, Description text ) CREATE TABLE Posts ( Id number, PostTypeId number, AcceptedAnswerId number, ParentId number, CreationDate time, DeletionDate time, Score number, ViewCount number, Body text, OwnerUserId num...
Count the Number of Questions with No Answer Post.
SELECT COUNT(Id) AS "Number of Questions WITH No Answer Post" FROM Posts WHERE AnswerCount = 0
sede
CREATE TABLE table_71069 ( "Stage" text, "Date" text, "Course" text, "Distance" text, "Winner" text, "Race Leader" text )
Which date has a Stage of 12?
SELECT "Date" FROM table_71069 WHERE "Stage" = '12'
wikisql
CREATE TABLE table_name_5 ( matches INTEGER, average VARCHAR, goals VARCHAR, team VARCHAR )
For players with fewer than 41 goals for CA Osasuna and averages under 1.06, what is the average number of matches?
SELECT AVG(matches) FROM table_name_5 WHERE goals < 41 AND team = "ca osasuna" AND average < 1.06
sql_create_context
CREATE TABLE table_65857 ( "Year (Ceremony)" text, "Actor/Actress" text, "Category" text, "Film title used in nomination" text, "Result" text )
What year was holly hunter a nominee?
SELECT "Year (Ceremony)" FROM table_65857 WHERE "Result" = 'nominee' AND "Actor/Actress" = 'holly hunter'
wikisql
CREATE TABLE d_items ( row_id number, itemid number, label text, linksto text ) 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, insuranc...
when did the first test of patient 72364 happen since 07/2105?
SELECT labevents.charttime FROM labevents WHERE labevents.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 72364) AND STRFTIME('%y-%m', labevents.charttime) >= '2105-07' ORDER BY labevents.charttime LIMIT 1
mimic_iii
CREATE TABLE intakeoutput ( intakeoutputid number, patientunitstayid number, cellpath text, celllabel text, cellvaluenumeric number, intakeoutputtime time ) CREATE TABLE treatment ( treatmentid number, patientunitstayid number, treatmentname text, treatmenttime time ) CREATE TA...
until 4 years ago, when did patient 035-17122 receive a procedure for the first time?
SELECT treatment.treatmenttime FROM treatment WHERE treatment.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '035-17122')) AND DATETIME(treatment.treatmenttime) <= DATETIME(CU...
eicu
CREATE TABLE body_builder ( body_builder_id number, people_id number, snatch number, clean_jerk number, total number ) CREATE TABLE people ( people_id number, name text, height number, weight number, birth_date text, birth_place text )
How many body builders are there?
SELECT COUNT(*) FROM body_builder
spider
CREATE TABLE table_name_43 ( bronze VARCHAR, total VARCHAR, gold VARCHAR )
How many bronze had a total less than 4 and gold bigger than 1?
SELECT COUNT(bronze) FROM table_name_43 WHERE total < 4 AND gold > 1
sql_create_context
CREATE TABLE table_71031 ( "Place" text, "Player" text, "Country" text, "Score" text, "To par" text, "Money ( $ )" real )
What was the Money ($) amount for Cary Middlecoff?
SELECT "Money ( $ )" FROM table_71031 WHERE "Player" = 'cary middlecoff'
wikisql
CREATE TABLE table_name_41 ( talent__female_ VARCHAR, year VARCHAR )
Who is the female talent in 1999?
SELECT talent__female_ FROM table_name_41 WHERE year = 1999
sql_create_context
CREATE TABLE table_name_18 ( fatalities VARCHAR, aircraft VARCHAR )
How many fatalities occurred for the Ju-52 aircraft?
SELECT fatalities FROM table_name_18 WHERE aircraft = "ju-52"
sql_create_context
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...
在2000年2月19日到2009年9月5日这段时间里,参保人40751656内门诊西药费一共花多少钱?
SELECT SUM(t_kc22.AMOUNT) FROM t_kc21 JOIN t_kc22 JOIN t_kc21_t_kc22 ON t_kc21.MED_CLINIC_ID = t_kc21_t_kc22.MED_CLINIC_ID AND t_kc21_t_kc22.MED_EXP_DET_ID = t_kc22.MED_EXP_DET_ID WHERE t_kc21.PERSON_ID = '40751656' AND t_kc21.CLINIC_TYPE = '门诊' AND t_kc22.STA_DATE BETWEEN '2000-02-19' AND '2009-09-05' AND t_kc22.MED_I...
css
CREATE TABLE table_name_46 ( type VARCHAR, built VARCHAR )
Which type of locomotive was built in 1923?
SELECT type FROM table_name_46 WHERE built = 1923
sql_create_context
CREATE TABLE table_25287007_2 ( november_3 VARCHAR, august_21_22 VARCHAR )
During November 3 where august 21-22 is august 21, 2017?
SELECT november_3 FROM table_25287007_2 WHERE august_21_22 = "August 21, 2017"
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 ...
名叫彭书萱的病人在被门诊诊断为疾病U20.085的时候茶碱的结果定量及其单位都是什么?
SELECT jyjgzbb.JCZBJGDL, jyjgzbb.JCZBJGDW FROM person_info JOIN hz_info JOIN mzjzjlb JOIN jybgb JOIN jyjgzbb JOIN person_info_hz_info ON person_info.RYBH = person_info_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...
css
CREATE TABLE table_202_135 ( id number, "series" number, "year" text, "rank" text, "average audience share" text )
which year -lrb- s -rrb- received the lowest rank in the ratings ?
SELECT "year" FROM table_202_135 ORDER BY "rank" DESC LIMIT 1
squall
CREATE TABLE table_19394 ( "No. in series" real, "Title" text, "Directed by" text, "Written by" text, "Original air date" text, "Production code" real )
What was the airdate of the episode that was directed by giancarlo volpe and written by is john o'bryan?
SELECT "Original air date" FROM table_19394 WHERE "Directed by" = 'Giancarlo Volpe' AND "Written by" = 'John O''Bryan'
wikisql
CREATE TABLE table_52287 ( "NGC number" real, "Object type" text, "Constellation" text, "Right ascension ( J2000 )" text, "Declination ( J2000 )" text )
Which Object type has a Constellation of cancer?
SELECT "Object type" FROM table_52287 WHERE "Constellation" = 'cancer'
wikisql
CREATE TABLE table_19405 ( "Nation" text, "Total wins" real, "Team wins" real, "Individual wins" real, "Individual winners" real )
what is the value for minimum total wins
SELECT MIN("Total wins") FROM table_19405
wikisql
CREATE TABLE PostNotices ( Id number, PostId number, PostNoticeTypeId number, CreationDate time, DeletionDate time, ExpiryDate time, Body text, OwnerUserId number, DeletionUserId number ) CREATE TABLE CloseReasonTypes ( Id number, Name text, Description text ) CREATE TA...
Favorite questions asked since 1 Jan 2013.
SELECT Id AS "post_link", CreationDate, FavoriteCount FROM Posts WHERE PostTypeId = 1 AND TIME_TO_STR(CreationDate, '%Y') >= 2013 AND FavoriteCount >= 25 ORDER BY CreationDate DESC
sede
CREATE TABLE table_name_99 ( category VARCHAR, year VARCHAR, nominated_work VARCHAR )
What categories had a Nominated work of yerma before 1992?
SELECT category FROM table_name_99 WHERE year < 1992 AND nominated_work = "yerma"
sql_create_context
CREATE TABLE table_27969432_4 ( directed_by VARCHAR, production VARCHAR )
Who directed the episode whose production code is 2m5901?
SELECT directed_by FROM table_27969432_4 WHERE production = "2M5901"
sql_create_context
CREATE TABLE Statements ( Statement_ID INTEGER, Statement_Details VARCHAR(255) ) CREATE TABLE Accounts ( Account_ID INTEGER, Statement_ID INTEGER, Account_Details VARCHAR(255) ) CREATE TABLE Documents_with_Expenses ( Document_ID INTEGER, Budget_Type_Code CHAR(15), Document_Details VARC...
List document type codes and the number of documents in each code Visualize by bar chart, and rank by the Document_Type_Code in ascending please.
SELECT Document_Type_Code, COUNT(*) FROM Documents GROUP BY Document_Type_Code ORDER BY Document_Type_Code
nvbench
CREATE TABLE table_name_69 ( away VARCHAR, ground VARCHAR, time VARCHAR )
With the Ground of Humber College North at 12:00, what was the Away?
SELECT away FROM table_name_69 WHERE ground = "humber college north" AND time = "12:00"
sql_create_context
CREATE TABLE table_name_38 ( crowd INTEGER, venue VARCHAR )
In the Western Oval venue, what is the average crowd?
SELECT AVG(crowd) FROM table_name_38 WHERE venue = "western oval"
sql_create_context
CREATE TABLE table_41650 ( "Year" text, "Starts" real, "Cuts Made" real, "Wins" real, "Top 10" real, "Top 25" real, "Earnings (\u20ac)" real, "Money list rank" text )
What is the money list rank when the starts are less than 30, earnings are larger than 8,689, and the ranking is 2 in the top 25?
SELECT "Money list rank" FROM table_41650 WHERE "Starts" < '30' AND "Earnings (\u20ac)" > '8,689' AND "Top 25" = '2'
wikisql
CREATE TABLE t_kc24 ( ACCOUNT_DASH_DATE time, ACCOUNT_DASH_FLG number, CASH_PAY number, CIVIL_SUBSIDY number, CKC102 number, CLINIC_ID text, CLINIC_SLT_DATE time, COMP_ID text, COM_ACC_PAY number, COM_PAY number, DATA_ID text, ENT_ACC_PAY number, ENT_PAY number, F...
列出医疗费总额与医疗就诊70966424211相同的医疗就诊记录的ID、人员ID、公民身份号码、人员姓名、人员性别、人员年龄有什么?
SELECT qtb.MED_CLINIC_ID, qtb.PERSON_ID, qtb.PERSON_NM, qtb.IDENTITY_CARD, qtb.PERSON_SEX, qtb.PERSON_AGE FROM qtb JOIN t_kc24 ON qtb.MED_CLINIC_ID = t_kc24.MED_CLINIC_ID WHERE t_kc24.MED_AMOUT = (SELECT t_kc24.MED_AMOUT FROM t_kc24 WHERE t_kc24.MED_CLINIC_ID = '70966424211') UNION SELECT gyb.MED_CLINIC_ID, gyb.PERSON_...
css
CREATE TABLE table_41613 ( "Name" text, "Subdivisions" text, "Area (km\u00b2)" real, "Population (1 July 2005 est.)" real, "Population density (per km\u00b2)" real, "Capital" text )
What is the lowest Population (1 July 2005 est.), when Population density (per km ) is 0?
SELECT MIN("Population (1 July 2005 est.)") FROM table_41613 WHERE "Population density (per km\u00b2)" = '0'
wikisql
CREATE TABLE table_name_57 ( pick__number INTEGER, college VARCHAR )
What was the highest pick for Penn State?
SELECT MAX(pick__number) FROM table_name_57 WHERE college = "penn state"
sql_create_context
CREATE TABLE county ( County_Id int, County_name text, Population real, Zip_code text ) CREATE TABLE party ( Party_ID int, Year real, Party text, Governor text, Lieutenant_Governor text, Comptroller text, Attorney_General text, US_Senate text ) CREATE TABLE election ( ...
Which committees have delegates from the Democratic party, and count them by a bar chart, and display from high to low by the total number.
SELECT Committee, COUNT(Committee) FROM election AS T1 JOIN party AS T2 ON T1.Party = T2.Party_ID WHERE T2.Party = "Democratic" GROUP BY Committee ORDER BY COUNT(Committee) DESC
nvbench
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, ...
病号21701297在2000年5月29日到2009年5月18日内期间所有检验结果指标记录中使用的仪器编号还有名称都叫什么
SELECT jyjgzbb.YQBH, jyjgzbb.YQMC 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.BG...
css
CREATE TABLE table_204_543 ( id number, "national team" text, "title(s)\nrepresented" text, "first\nworn" number, "number\nof stars" number, "notes" text )
what is the number of stars italy has ?
SELECT "number\nof stars" FROM table_204_543 WHERE "national team" = 'italy'
squall
CREATE TABLE table_51022 ( "Game" real, "Date" text, "Team" text, "Score" text, "Location Attendance" text, "Record" text )
For the game with team of @ Chicago, what was the final score?
SELECT "Score" FROM table_51022 WHERE "Team" = '@ chicago'
wikisql
CREATE TABLE table_75492 ( "Record" text, "Team" text, "Season" text, "League" text, "Number" real )
What team has 2000-01 as the season?
SELECT "Team" FROM table_75492 WHERE "Season" = '2000-01'
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...
Give the primary disease and admission time of Jennifer Fulgham.
SELECT demographic.diagnosis, demographic.admittime FROM demographic WHERE demographic.name = "Jennifer Fulgham"
mimicsql_data
CREATE TABLE table_name_63 ( rank VARCHAR, wins VARCHAR, country VARCHAR )
What is the player from Australia's rank with more than 16 wins?
SELECT COUNT(rank) FROM table_name_63 WHERE wins > 16 AND country = "australia"
sql_create_context
CREATE TABLE table_67329 ( "Outcome" text, "Tournament" text, "Surface" text, "Partner" text, "Opponents" text, "Score" text )
What was the score in Volkswagen Challenger tournament?
SELECT "Score" FROM table_67329 WHERE "Tournament" = 'volkswagen challenger'
wikisql
CREATE TABLE table_name_40 ( date VARCHAR, attendance VARCHAR )
When was the attendance 65,806?
SELECT date FROM table_name_40 WHERE attendance = "65,806"
sql_create_context
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 TagSynonyms ( Id number, SourceTagName text, Ta...
AWL #1 Example Sentence Expert.
SELECT * FROM Posts WHERE (Id LIKE 23569441)
sede
CREATE TABLE table_70438 ( "Date" text, "Visitor" text, "Score" text, "Home" text, "Record" text )
When has winnipeg jets with a Score of 4 6?
SELECT "Date" FROM table_70438 WHERE "Home" = 'winnipeg jets' AND "Score" = '4–6'
wikisql
CREATE TABLE vitalperiodic ( vitalperiodicid number, patientunitstayid number, temperature number, sao2 number, heartrate number, respiration number, systemicsystolic number, systemicdiastolic number, systemicmean number, observationtime time ) CREATE TABLE patient ( uniquep...
what was patient 010-16627's monthly minimum value of body weight until 30 months ago?
SELECT MIN(patient.admissionweight) FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '010-16627') AND NOT patient.admissionweight IS NULL AND DATETIME(patient.unitadmittime) <= DATETIME(CURRENT_TIME(), '-30 month') GROUP BY STRFTIME...
eicu
CREATE TABLE table_name_91 ( points INTEGER, score VARCHAR, game VARCHAR )
Which Points have a Score of 4 1, and a Game smaller than 39?
SELECT SUM(points) FROM table_name_91 WHERE score = "4–1" AND game < 39
sql_create_context