instruction
stringlengths
151
7.46k
output
stringlengths
2
4.44k
source
stringclasses
26 values
CREATE TABLE table_name_29 ( mls_team VARCHAR, affiliation VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which MLS tea, drafted a player affilaited with the university of california?
SELECT mls_team FROM table_name_29 WHERE affiliation = "university of california"
sql_create_context
CREATE TABLE table_name_96 ( grid INTEGER, laps VARCHAR, points VARCHAR, driver VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Tell me the least Grid with points more than 11 and drivers being s bastien bourdais with laps less than 67
SELECT MIN(grid) FROM table_name_96 WHERE points > 11 AND driver = "sébastien bourdais" AND laps < 67
sql_create_context
CREATE TABLE table_22699 ( "Album#" text, "English Title" text, "Chinese (Traditional)" text, "Chinese (Simplified)" text, "Release date" text, "Label" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Name the label for traditional chinese
SELECT "Label" FROM table_22699 WHERE "Chinese (Traditional)" = '情歌沒有告訴你'
wikisql
CREATE TABLE table_28211103_1 ( winner VARCHAR, st_kilda_score VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- How many winners have st kilda score at 14.11.95?
SELECT COUNT(winner) FROM table_28211103_1 WHERE st_kilda_score = "14.11.95"
sql_create_context
CREATE TABLE table_60915 ( "Year" text, "Venue" text, "Winner" text, "Runner-up" text, "Score" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What runner-up has 2008 as the year?
SELECT "Runner-up" FROM table_60915 WHERE "Year" = '2008'
wikisql
CREATE TABLE table_1252 ( "No. in series" text, "No. Disc" real, "Title" text, "Directed by" text, "Written by" text, "Original air date" text, "Length (minutes)" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Name the total number of length...
SELECT COUNT("Length (minutes)") FROM table_1252 WHERE "No. in series" = '17'
wikisql
CREATE TABLE student_record ( student_id int, course_id int, semester int, grade varchar, how varchar, transfer_source varchar, earn_credit varchar, repeat_term varchar, test_id varchar ) CREATE TABLE program ( program_id int, name varchar, college varchar, introduct...
SELECT DISTINCT course.department, course.name, course.number, semester.semester FROM course, course_offering, semester WHERE ((semester.semester = 'FA' AND semester.year = 2016) OR (semester.semester = 'WN' AND semester.year = 2017)) AND course.course_id = course_offering.course_id AND course.department = 'EECS' AND c...
advising
CREATE TABLE table_41491 ( "Tournament" text, "Wins" real, "Top-5" real, "Top-10" real, "Top-25" real, "Events" real, "Cuts made" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the average Top-5, when Tournament is U.S. Open, and whe...
SELECT AVG("Top-5") FROM table_41491 WHERE "Tournament" = 'u.s. open' AND "Cuts made" > '10'
wikisql
CREATE TABLE jobs ( JOB_ID varchar(10), JOB_TITLE varchar(35), MIN_SALARY decimal(6,0), MAX_SALARY decimal(6,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 locations ( LOCAT...
SELECT JOB_ID, AVG(MANAGER_ID) FROM employees WHERE FIRST_NAME LIKE '%D%' OR FIRST_NAME LIKE '%S%' GROUP BY JOB_ID ORDER BY AVG(MANAGER_ID)
nvbench
CREATE TABLE Participants_in_Events ( Event_ID INTEGER, Participant_ID INTEGER ) 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) ) CREATE TABLE Eve...
SELECT Participant_Type_Code, COUNT(Participant_Type_Code) FROM Participants GROUP BY Participant_Type_Code ORDER BY Participant_Type_Code DESC
nvbench
CREATE TABLE departments ( DEPARTMENT_ID decimal(4,0), DEPARTMENT_NAME varchar(30), MANAGER_ID decimal(6,0), LOCATION_ID decimal(4,0) ) CREATE TABLE locations ( LOCATION_ID decimal(4,0), STREET_ADDRESS varchar(40), POSTAL_CODE varchar(12), CITY varchar(30), STATE_PROVINCE varchar(25...
SELECT HIRE_DATE, SUM(DEPARTMENT_ID) FROM employees WHERE NOT EMPLOYEE_ID IN (SELECT EMPLOYEE_ID FROM job_history) ORDER BY SUM(DEPARTMENT_ID) DESC
nvbench
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, ...
SELECT SUM(CASE WHEN patient.hospitaldischargestatus = 'alive' THEN 1 WHEN STRFTIME('%j', patient.hospitaldischargetime) - STRFTIME('%j', t4.diagnosistime) > 5 * 365 THEN 1 ELSE 0 END) * 100 / COUNT(*) FROM (SELECT t2.uniquepid, t2.diagnosistime FROM (SELECT t1.uniquepid, t1.diagnosistime FROM (SELECT patient.uniquepid...
eicu
CREATE TABLE table_63557 ( "Player" text, "Country" text, "Year(s) won" text, "Total" real, "To par" text, "Finish" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- how many times is the player jim furyk?
SELECT COUNT("Total") FROM table_63557 WHERE "Player" = 'jim furyk'
wikisql
CREATE TABLE table_26237 ( "Rank by Average" real, "Place" real, "Couple" text, "Total Points Earned" real, "Number of Dances" real, "Average" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- How many averages were listed for the couple who had 12...
SELECT COUNT("Average") FROM table_26237 WHERE "Number of Dances" = '12'
wikisql
CREATE TABLE table_38078 ( "Player" text, "Touchdowns" real, "Extra points" real, "Field goals" real, "Points" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- How many Extra points have Touchdowns larger than 2, and Field goals larger than 0?
SELECT COUNT("Extra points") FROM table_38078 WHERE "Touchdowns" > '2' AND "Field goals" > '0'
wikisql
CREATE TABLE table_62590 ( "Medal" text, "Name" text, "Games" text, "Sport" text, "Event" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- At what Games did the competitor win a Silver medal in the light heavyweight event?
SELECT "Games" FROM table_62590 WHERE "Medal" = 'silver' AND "Event" = 'light heavyweight'
wikisql
CREATE TABLE table_64858 ( "School" text, "Location" text, "Mascot" text, "Enrollment" real, "IHSAA Class" text, "IHSAA Football Class" text, "# / County" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which IHSAA Football Class has a Locati...
SELECT "IHSAA Football Class" FROM table_64858 WHERE "Location" = 'wabash' AND "School" = 'wabash'
wikisql
CREATE TABLE prescriptions ( subject_id text, hadm_id text, icustay_id text, drug_type text, drug text, formulary_drug_cd text, route text, drug_dose text ) CREATE TABLE lab ( subject_id text, hadm_id text, itemid text, charttime text, flag text, value_unit text,...
SELECT demographic.gender FROM demographic WHERE demographic.subject_id = "3343"
mimicsql_data
CREATE TABLE table_4073 ( "Category" text, "Player" text, "Team" text, "Games played" real, "Totals" text, "Average" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the total listed when the average is 0.667 and the category is 3-pt field...
SELECT "Totals" FROM table_4073 WHERE "Average" = '0.667' AND "Category" = '3-pt field goal percentage'
wikisql
CREATE TABLE teachers ( lastname text, firstname text, classroom number ) CREATE TABLE list ( lastname text, firstname text, grade number, classroom number ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Find the last names of teachers teaching i...
SELECT lastname FROM teachers WHERE classroom = 109
spider
CREATE TABLE table_name_26 ( male VARCHAR, female VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Who is the male partner for amy winehouse?
SELECT male FROM table_name_26 WHERE female = "amy winehouse"
sql_create_context
CREATE TABLE procedures ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) 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 ) ...
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE demographic.ethnicity = "HISPANIC OR LATINO" AND diagnoses.icd9_code = "42741"
mimicsql_data
CREATE TABLE table_5867 ( "Pick #" text, "Player" text, "Position" text, "Nationality" text, "NHL team" text, "College/junior/club team" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the Pick # for brent meeke?
SELECT "Pick #" FROM table_5867 WHERE "Player" = 'brent meeke'
wikisql
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...
SELECT AVG(jyjgzbb.JCZBJGDL), MIN(jyjgzbb.JCZBJGDL), MAX(jyjgzbb.JCZBJGDL) FROM mzjzjlb JOIN jybgb JOIN jyjgzbb ON mzjzjlb.YLJGDM = jybgb.YLJGDM_MZJZJLB AND mzjzjlb.JZLSH = jybgb.JZLSH_MZJZJLB AND jybgb.YLJGDM = jyjgzbb.YLJGDM AND jybgb.BGDH = jyjgzbb.BGDH WHERE mzjzjlb.JZZDSM = '矽肺(硅肺)Ⅲ期' AND jyjgzbb.JCZBDM = '586304'
css
CREATE TABLE table_46068 ( "Tie no" text, "Home team" text, "Score" text, "Away team" text, "Date" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the away team for the tie no. 29?
SELECT "Away team" FROM table_46068 WHERE "Tie no" = '29'
wikisql
CREATE TABLE Students_in_Detention ( student_id INTEGER, detention_id INTEGER, incident_id INTEGER ) CREATE TABLE Ref_Address_Types ( address_type_code VARCHAR(15), address_type_description VARCHAR(80) ) CREATE TABLE Student_Addresses ( student_id INTEGER, address_id INTEGER, date_addr...
SELECT date_address_to, SUM(monthly_rental) FROM Student_Addresses ORDER BY monthly_rental DESC
nvbench
CREATE TABLE table_204_336 ( id number, "operators" text, "named trains" text, "destination" text, "year begun" text, "year discontinued" number ) -- Using valid SQLite, answer the following questions for the tables provided above. -- which train ran for the longest time ?
SELECT "named trains" FROM table_204_336 ORDER BY "year discontinued" - "year begun" DESC LIMIT 1
squall
CREATE TABLE table_62626 ( "Year" real, "Winner" text, "Finalist" text, "Result" text, "City" text, "Stadium" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What was the city where Hallescher FC won in 2008?
SELECT "City" FROM table_62626 WHERE "Winner" = 'hallescher fc' AND "Year" = '2008'
wikisql
CREATE TABLE table_56510 ( "Home team" text, "Home team score" text, "Away team" text, "Away team score" text, "Venue" text, "Crowd" real, "Date" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What was the score when Collingwood was playing ...
SELECT "Away team score" FROM table_56510 WHERE "Away team" = 'collingwood'
wikisql
CREATE TABLE table_name_1 ( country VARCHAR, of_1 VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What country has OF-1 Locotenent?
SELECT country FROM table_name_1 WHERE of_1 = "locotenent"
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...
SELECT wdmzjzjlb.ZYZDBM, wdmzjzjlb.ZYZDMC 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 person_info.XM = '杨纳兰' UNION SELECT bdmzjzjlb.ZYZDBM, bdmzjzjlb.ZYZDMC FROM person_info JOIN...
css
CREATE TABLE table_name_10 ( position VARCHAR, height VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Name the position with height of 2.09
SELECT position FROM table_name_10 WHERE height = 2.09
sql_create_context
CREATE TABLE table_5588 ( "Game" real, "February" real, "Opponent" text, "Score" text, "Record" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the February number of the game with the Vancouver Canucks as the opponent and a game number great...
SELECT COUNT("February") FROM table_5588 WHERE "Opponent" = 'vancouver canucks' AND "Game" > '55'
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 medication ( medi...
SELECT COUNT(*) FROM lab WHERE lab.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '032-21820')) AND lab.labname = 'lpm o2' AND DATETIME(lab.labresulttime, 'start of year') = D...
eicu
CREATE TABLE table_name_41 ( points INTEGER, team VARCHAR, wins VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Name the Points which has a Team of sportivo luque o, and Wins larger than 1?
SELECT MIN(points) FROM table_name_41 WHERE team = "sportivo luqueño" AND wins > 1
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 mzjzjlb ( HXPLC number, HZXM ...
SELECT jybgb.SHRGH, jybgb.SHRXM FROM jybgb WHERE jybgb.BGDH = '19700369409'
css
CREATE TABLE table_16547 ( "Engine" text, "Power, continuous" text, "Critical altitude This is the highest altitude at which the engine can achieve its full continuous power rating. Above this altitude, power falls off with height as with a naturally aspirated engine . See Supercharger#Altitude effects for ...
SELECT "Compression ratio" FROM table_16547 WHERE "Engine" = 'Wasp Jr. T1B2'
wikisql
CREATE TABLE allergy ( allergyid number, patientunitstayid number, drugname text, allergyname text, allergytime time ) CREATE TABLE vitalperiodic ( vitalperiodicid number, patientunitstayid number, temperature number, sao2 number, heartrate number, respiration number, sy...
SELECT COUNT(*) FROM microlab WHERE microlab.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '025-28600' AND NOT patient.hospitaldischargetime IS NULL ORDER BY patient.hospital...
eicu
CREATE TABLE table_name_85 ( finish VARCHAR, laps VARCHAR, year VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What was the finish with less than 200 laps in 1953?
SELECT finish FROM table_name_85 WHERE laps < 200 AND year = "1953"
sql_create_context
CREATE TABLE table_14625 ( "Name" text, "Country" text, "Type" text, "Moving from" text, "Transfer window" text, "Ends" real, "Transfer fee" text, "Source" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the transfer window of the...
SELECT "Transfer window" FROM table_14625 WHERE "Source" = 'leeds united' AND "Moving from" = 'motherwell'
wikisql
CREATE TABLE d_labitems ( row_id number, itemid number, label text ) CREATE TABLE icustays ( row_id number, subject_id number, hadm_id number, icustay_id number, first_careunit text, last_careunit text, first_wardid number, last_wardid number, intime time, outtime ti...
SELECT admissions.admission_type FROM admissions WHERE admissions.subject_id = 25696 AND DATETIME(admissions.admittime, 'start of year') = DATETIME(CURRENT_TIME(), 'start of year', '-1 year') ORDER BY admissions.admittime LIMIT 1
mimic_iii
CREATE TABLE table_65527 ( "Country" text, "Builder" text, "Location" text, "Ship" text, "Class / type" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Who was the builder of Brage from Norway?
SELECT "Builder" FROM table_65527 WHERE "Country" = 'norway' AND "Ship" = 'brage'
wikisql
CREATE TABLE table_38889 ( "Date" text, "City" text, "Opponent" text, "Results\u00b9" text, "Type of game" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What was the type of game with a 1:6 result?
SELECT "Type of game" FROM table_38889 WHERE "Results\u00b9" = '1:6'
wikisql
CREATE TABLE table_58994 ( "Driver" text, "Race 1" real, "Race 2" text, "Race 3" text, "Points" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What driver has points less than 17?
SELECT "Driver" FROM table_58994 WHERE "Points" < '17'
wikisql
CREATE TABLE table_name_4 ( date VARCHAR, venue VARCHAR, competition VARCHAR, score VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- When did a Competition of friendly, and a Score of 2 1, and a Venue of philadelphia , pennsylvania occur?
SELECT date FROM table_name_4 WHERE competition = "friendly" AND score = "2–1" AND venue = "philadelphia , pennsylvania"
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 ...
SELECT * FROM person_info JOIN hz_info JOIN mzjzjlb JOIN jybgb JOIN jyjgzbb ON person_info.RYBH = hz_info.RYBH AND hz_info.YLJGDM = mzjzjlb.YLJGDM AND hz_info.KH = mzjzjlb.KH AND hz_info.KLX = mzjzjlb.KLX AND mzjzjlb.YLJGDM = jybgb.YLJGDM_MZJZJLB AND mzjzjlb.JZLSH = jybgb.JZLSH_MZJZJLB AND jybgb.YLJGDM = jyjgzbb.YLJGDM...
css
CREATE TABLE dual_carrier ( main_airline varchar, low_flight_number int, high_flight_number int, dual_airline varchar, service_name text ) CREATE TABLE class_of_service ( booking_class varchar, rank int, class_description text ) CREATE TABLE airport_service ( city_code varchar, ...
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, fare, flight, flight_fare WHERE (CITY_0.city_code = AIRPORT_SERVICE_0.city_code AND CITY_0.city_name = 'DENVER' AND CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1....
atis
CREATE TABLE Has_amenity ( dormid INTEGER, amenid INTEGER ) CREATE TABLE Lives_in ( stuid INTEGER, dormid INTEGER, room_number INTEGER ) CREATE TABLE Student ( StuID INTEGER, LName VARCHAR(12), Fname VARCHAR(12), Age INTEGER, Sex VARCHAR(1), Major INTEGER, Advisor INTEG...
SELECT city_code, AVG(Age) FROM Student GROUP BY city_code ORDER BY AVG(Age) DESC
nvbench
CREATE TABLE hz_info ( KH text, KLX number, RYBH text, YLJGDM text, person_info_CSD text, person_info_CSRQ time, person_info_GJDM text, person_info_GJMC text, person_info_JGDM text, person_info_JGMC text, person_info_MZDM text, person_info_MZMC text, person_info_XBDM ...
SELECT (SELECT COUNT(*) FROM hz_info JOIN mzjzjlb ON hz_info.YLJGDM = mzjzjlb.YLJGDM AND hz_info.KH = mzjzjlb.KH AND hz_info.KLX = mzjzjlb.KLX WHERE hz_info.person_info_XM = '韦英秀' AND mzjzjlb.JZKSRQ BETWEEN '2018-10-01' AND '2020-08-23') + (SELECT COUNT(*) FROM hz_info JOIN zyjzjlb ON hz_info.YLJGDM = zyjzjlb.YLJGDM AN...
css
CREATE TABLE table_50340 ( "League" text, "Season" text, "Name" text, "Place" real, "Record" text, "Head Coach" text, "Points" text, "Rebounds" text, "Assists" text, "Steals" text, "Turnover" text ) -- Using valid SQLite, answer the following questions for the tables provid...
SELECT "Rebounds" FROM table_50340 WHERE "Name" = 'pom baskets jena'
wikisql
CREATE TABLE table_name_64 ( crowd INTEGER, away_team VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What was the crowd population for Footscray as an away team?
SELECT MAX(crowd) FROM table_name_64 WHERE away_team = "footscray"
sql_create_context
CREATE TABLE medication ( medicationid number, patientunitstayid number, drugname text, dosage text, routeadmin text, drugstarttime time, drugstoptime time ) CREATE TABLE allergy ( allergyid number, patientunitstayid number, drugname text, allergyname text, allergytime t...
SELECT COUNT(DISTINCT patient.uniquepid) FROM patient WHERE DATETIME(patient.hospitaladmittime) >= DATETIME(CURRENT_TIME(), '-1 year')
eicu
CREATE TABLE Apartments ( apt_id INTEGER, building_id INTEGER, apt_type_code CHAR(15), apt_number CHAR(10), bathroom_count INTEGER, bedroom_count INTEGER, room_count CHAR(5) ) CREATE TABLE Apartment_Bookings ( apt_booking_id INTEGER, apt_id INTEGER, guest_id INTEGER, booking...
SELECT apt_type_code, MIN(room_count) FROM Apartments GROUP BY apt_type_code ORDER BY MIN(room_count) DESC
nvbench
CREATE TABLE table_211791_1 ( nato_us_dod_code VARCHAR, nato_reporting_name VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Name the nato/ us dod code for sabbot
SELECT nato_us_dod_code FROM table_211791_1 WHERE nato_reporting_name = "SABBOT"
sql_create_context
CREATE TABLE table_name_17 ( date VARCHAR, goal VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Tell me the date for goal of 5
SELECT date FROM table_name_17 WHERE goal = 5
sql_create_context
CREATE TABLE table_45362 ( "Res." text, "Record" text, "Opponent" text, "Method" text, "Event" text, "Round" real, "Location" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is Res., when Event is 'KOTC 11 - Domination'?
SELECT "Res." FROM table_45362 WHERE "Event" = 'kotc 11 - domination'
wikisql
CREATE TABLE table_204_321 ( id number, "community" text, "currency" text, "region" text, "target date" number, "notes" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- what is the only community in south asia ?
SELECT "community" FROM table_204_321 WHERE "region" = 'south asia'
squall
CREATE TABLE t_kc21_t_kc22 ( MED_CLINIC_ID text, MED_EXP_DET_ID number ) 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, H...
SELECT * FROM t_kc21 WHERE t_kc21.PERSON_ID = '18039764' AND t_kc21.MED_SER_ORG_NO = '6690866' AND NOT t_kc21.MED_ORG_DEPT_NM LIKE '%营养%'
css
CREATE TABLE greatermanchestercrime ( crimeid text, crimets time, location text, lsoa text, type text, outcome text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which neighborhood/area has the highest burglary rate?
SELECT location FROM greatermanchestercrime WHERE type = "Burglary" GROUP BY location ORDER BY COUNT(*) DESC LIMIT 1
greatermanchestercrime
CREATE TABLE table_42348 ( "Tournament" text, "Wins" real, "Top-5" real, "Top-10" real, "Top-25" real, "Events" real, "Cuts made" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the highest Top-5 that has 18 or more events with a Top-...
SELECT MAX("Top-5") FROM table_42348 WHERE "Events" > '18' AND "Top-25" = '23'
wikisql
CREATE TABLE treatment ( treatmentid number, patientunitstayid number, treatmentname text, treatmenttime time ) CREATE TABLE cost ( costid number, uniquepid text, patienthealthsystemstayid number, eventtype text, eventid number, chargetime time, cost number ) CREATE TABLE p...
SELECT COUNT(DISTINCT t1.uniquepid) FROM (SELECT patient.uniquepid, diagnosis.diagnosistime FROM diagnosis JOIN patient ON diagnosis.patientunitstayid = patient.patientunitstayid WHERE diagnosis.diagnosisname = 's/p cabg < 7 days') AS t1 JOIN (SELECT patient.uniquepid, diagnosis.diagnosistime FROM diagnosis JOIN patien...
eicu
CREATE TABLE table_name_21 ( name VARCHAR, time VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Who had a time of 56.07?
SELECT name FROM table_name_21 WHERE time = 56.07
sql_create_context
CREATE TABLE table_203_512 ( id number, "release date" text, "album" text, "catalog number" text, "chart position" number, "notes" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- niji iro no sneaker was released on march 5 , 1991 ; which single w...
SELECT "album" FROM table_203_512 WHERE "release date" = (SELECT "release date" FROM table_203_512 WHERE "album" = 'niji-iro no sneaker') - 1
squall
CREATE TABLE table_71547 ( "Date" text, "Winner" text, "Score" text, "Location" text, "Series" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the Location, when the Score is 35-31?
SELECT "Location" FROM table_71547 WHERE "Score" = '35-31'
wikisql
CREATE TABLE table_24237 ( "Name" text, "Municipal status" text, "Census division" text, "Population (2011)" real, "Population (2006)" real, "Change (%)" text, "Area (km\u00b2)" text, "Population density" text ) -- Using valid SQLite, answer the following questions for the tables provi...
SELECT "Census division" FROM table_24237 WHERE "Name" = 'Kenora'
wikisql
CREATE TABLE table_name_34 ( nationality VARCHAR, player VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is Pat Burke's Nationality?
SELECT nationality FROM table_name_34 WHERE player = "pat burke"
sql_create_context
CREATE TABLE table_name_79 ( attendance VARCHAR, opponent VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What was the attendance when the Cincinnati Bengals were the opponents?
SELECT attendance FROM table_name_79 WHERE opponent = "cincinnati bengals"
sql_create_context
CREATE TABLE diagnoses ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) 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 ) C...
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE demographic.age < "79" AND prescriptions.route = "NEB"
mimicsql_data
CREATE TABLE table_15887683_19 ( language VARCHAR, television_service VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- In what laguage was Contotv 5?
SELECT language FROM table_15887683_19 WHERE television_service = "ContoTV 5"
sql_create_context
CREATE TABLE microlab ( microlabid number, patientunitstayid number, culturesite text, organism text, culturetakentime time ) CREATE TABLE allergy ( allergyid number, patientunitstayid number, drugname text, allergyname text, allergytime time ) CREATE TABLE treatment ( trea...
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 = 'antiviral therapy - ganciclovir' AND STR...
eicu
CREATE TABLE route ( train_id int, station_id int ) CREATE TABLE station ( id int, network_name text, services text, local_authority text ) CREATE TABLE weekly_weather ( station_id int, day_of_week text, high_temperature int, low_temperature int, precipitation real, win...
SELECT name, COUNT(name) FROM train GROUP BY name ORDER BY name
nvbench
CREATE TABLE lab ( subject_id text, hadm_id text, itemid text, charttime text, flag text, value_unit text, label text, fluid text ) CREATE TABLE prescriptions ( subject_id text, hadm_id text, icustay_id text, drug_type text, drug text, formulary_drug_cd text, ...
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 = "Anorexia" AND prescriptions.route = "NEB"
mimicsql_data
CREATE TABLE table_name_55 ( country VARCHAR, to_par VARCHAR, score VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which country has -9 to par with a Score of 70-69-68=207?
SELECT country FROM table_name_55 WHERE to_par = "-9" AND score = 70 - 69 - 68 = 207
sql_create_context
CREATE TABLE lab ( subject_id text, hadm_id text, itemid text, charttime text, flag text, value_unit text, label text, fluid text ) CREATE TABLE prescriptions ( subject_id text, hadm_id text, icustay_id text, drug_type text, drug text, formulary_drug_cd text, ...
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.discharge_location = "SNF" AND lab.label = "Blood"
mimicsql_data
CREATE TABLE table_19976 ( "No." real, "English name" text, "Bulgarian name" text, "Bulgarian name ( Transliteration )" text, "Old Bulgarian Names" text, "Old Bulgarian name (Transliteration)" text, "Old Bulgarian name - Meaning" text ) -- Using valid SQLite, answer the following questions...
SELECT "Old Bulgarian Names" FROM table_19976 WHERE "Bulgarian name ( Transliteration )" = 'Yuni'
wikisql
CREATE TABLE diagnoses_icd ( row_id number, subject_id number, hadm_id number, icd9_code text, charttime time ) CREATE TABLE d_labitems ( row_id number, itemid number, label text ) CREATE TABLE chartevents ( row_id number, subject_id number, hadm_id number, icustay_id n...
SELECT DISTINCT cost.cost FROM cost WHERE cost.event_type = 'prescriptions' AND cost.event_id IN (SELECT prescriptions.row_id FROM prescriptions WHERE prescriptions.drug = 'dorzolamide 2% ophth. soln.')
mimic_iii
CREATE TABLE medication ( medicationid number, patientunitstayid number, drugname text, dosage text, routeadmin text, drugstarttime time, drugstoptime time ) CREATE TABLE treatment ( treatmentid number, patientunitstayid number, treatmentname text, treatmenttime time ) CREA...
SELECT COUNT(*) > 0 FROM treatment WHERE treatment.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.uniquepid = '030-52395' AND patient.hospitalid <> (SELECT DISTINCT patient.hospitalid FROM patient WHERE patient.uniquepid = '030-52395' AND patient.hospitaldischargetime IS NULL)) AND tr...
eicu
CREATE TABLE table_60593 ( "Name" text, "Circuit" text, "Date" text, "Winning driver" text, "Winning constructor" text, "Report" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What Winning driver has a Winning constructor of sunbeam?
SELECT "Winning driver" FROM table_60593 WHERE "Winning constructor" = 'sunbeam'
wikisql
CREATE TABLE t_kc21 ( CLINIC_ID text, CLINIC_TYPE text, COMP_ID text, DATA_ID text, DIFF_PLACE_FLG number, FERTILITY_STS number, FLX_MED_ORG_ID text, HOSP_LEV number, HOSP_STS number, IDENTITY_CARD text, INPT_AREA_BED text, INSURED_IDENTITY number, INSURED_STS text, ...
SELECT t_kc21.MED_CLINIC_ID FROM t_kc21 WHERE t_kc21.PERSON_NM = '戚阳曜' AND t_kc21.MED_SER_ORG_NO = '8055901' AND NOT t_kc21.IN_DIAG_DIS_NM LIKE '%胃溃疡%'
css
CREATE TABLE airline ( airline_code varchar, airline_name text, note text ) CREATE TABLE aircraft ( aircraft_code varchar, aircraft_description varchar, manufacturer varchar, basic_type varchar, engines int, propulsion varchar, wide_body varchar, wing_span int, length in...
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, date_day, days, flight WHERE (CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'SAN FRANCISCO' AND date_day.day_number = 24 AND date_day.month_number = 5...
atis
CREATE TABLE labevents ( row_id number, subject_id number, hadm_id number, itemid number, charttime time, valuenum number, valueuom text ) CREATE TABLE inputevents_cv ( row_id number, subject_id number, hadm_id number, icustay_id number, charttime time, itemid number...
SELECT AVG(chartevents.valuenum) FROM chartevents WHERE chartevents.icustay_id IN (SELECT icustays.icustay_id FROM icustays WHERE icustays.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 13054 AND admissions.dischtime IS NULL)) AND chartevents.itemid IN (SELECT d_items.itemid FROM d_...
mimic_iii
CREATE TABLE lab ( labid number, patientunitstayid number, labname text, labresult number, labresulttime time ) CREATE TABLE allergy ( allergyid number, patientunitstayid number, drugname text, allergyname text, allergytime time ) CREATE TABLE diagnosis ( diagnosisid number...
SELECT COUNT(*) > 0 FROM intakeoutput WHERE intakeoutput.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '030-52395')) AND intakeoutput.cellpath LIKE '%output%' AND intakeoutpu...
eicu
CREATE TABLE table_name_85 ( circuit VARCHAR, feature_winner VARCHAR, country VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which circuit was in Great Britain with Ireland as the winner?
SELECT circuit FROM table_name_85 WHERE feature_winner = "ireland" AND country = "great britain"
sql_create_context
CREATE TABLE table_name_25 ( successes INTEGER, failures VARCHAR, launches VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the greatest successes that have failures greater than 1 and launches less than 28?
SELECT MAX(successes) FROM table_name_25 WHERE failures > 1 AND launches < 28
sql_create_context
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, ...
SELECT procedures.icd9_code FROM procedures WHERE procedures.subject_id = "3623"
mimicsql_data
CREATE TABLE procedures ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) CREATE TABLE diagnoses ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) CREATE TABLE lab ( subject_id text, hadm_id text, ...
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.dod_year <= "2126.0" AND lab.itemid = "51025"
mimicsql_data
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,...
(SELECT SOC_SRT_DIRE_NM FROM t_kc22 WHERE MED_CLINIC_ID = '95798100815') INTERSECT (SELECT SOC_SRT_DIRE_NM FROM t_kc22 WHERE MED_CLINIC_ID = '30692716658')
css
CREATE TABLE table_name_41 ( round VARCHAR, date VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which round happened on 10 april 2007?
SELECT round FROM table_name_41 WHERE date = "10 april 2007"
sql_create_context
CREATE TABLE table_name_37 ( outcome VARCHAR, opponent VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the outcome with marina erakovic as opponent?
SELECT outcome FROM table_name_37 WHERE opponent = "marina erakovic"
sql_create_context
CREATE TABLE table_name_23 ( license VARCHAR, release_date VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which licence has a release date of 2009-08?
SELECT license FROM table_name_23 WHERE release_date = "2009-08"
sql_create_context
CREATE TABLE table_19787093_1 ( till_mathura INTEGER, till_aligarh VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- If the till aligarh is 150, what the mac till mathura?
SELECT MAX(till_mathura) FROM table_19787093_1 WHERE till_aligarh = 150
sql_create_context
CREATE TABLE table_21481509_4 ( COUnT VARCHAR, r1b1a2__r_m269_ VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- How many n are listed for 0.6% r1b1a2 (r-m269)?
SELECT COUnT AS n FROM table_21481509_4 WHERE r1b1a2__r_m269_ = "0.6%"
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 hz_info JOIN mzjzjlb ON hz_info.YLJGDM = mzjzjlb.YLJGDM AND hz_info.KH = mzjzjlb.KH AND hz_info.KLX = mzjzjlb.KLX WHERE hz_info.person_info_XM = '吴鹏天' AND hz_info.YLJGDM = '3862887' AND NOT mzjzjlb.JZZDSM LIKE '%缺血%'
css
CREATE TABLE table_name_97 ( held_every VARCHAR, sport VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- How often is the cricket competition held?
SELECT held_every FROM table_name_97 WHERE sport = "cricket"
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 ...
SELECT jybgb.BGDH FROM person_info JOIN hz_info JOIN mzjzjlb JOIN jybgb 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 mzjzjlb.JZLSH = jybgb.JZLSH_MZJZJLB ...
css
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...
SELECT mzjzjlb.JZLSH FROM hz_info JOIN mzjzjlb JOIN person_info_hz_info JOIN person_info ON hz_info.YLJGDM = mzjzjlb.YLJGDM AND hz_info.KH = mzjzjlb.KH AND hz_info.KLX = mzjzjlb.KLX AND person_info_hz_info.KH = hz_info.KH AND person_info_hz_info.KLX = hz_info.KLX AND person_info_hz_info.YLJGDM = hz_info.YLJGDM AND pers...
css
CREATE TABLE table_25252080_3 ( november_3 VARCHAR, june_10_11 VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is shown for november 3 when june 10-11 is june 10, 1964?
SELECT november_3 FROM table_25252080_3 WHERE june_10_11 = "June 10, 1964"
sql_create_context
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 jyjgzbb.JCFF FROM hz_info JOIN wdmzjzjlb JOIN jybgb JOIN jyjgzbb ON 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 = jyjgzbb.YLJGDM AND jybgb.BGDH = jyjgzbb.BGDH...
css
CREATE TABLE table_53978 ( "Home team" text, "Home team score" text, "Away team" text, "Away team score" text, "Venue" text, "Crowd" real, "Date" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- On what date did the home team score 5.8 (38)?
SELECT "Date" FROM table_53978 WHERE "Home team score" = '5.8 (38)'
wikisql
CREATE TABLE table_name_83 ( year VARCHAR, category VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- How many years was Reasons to be Pretty nominated for best play?
SELECT COUNT(year) FROM table_name_83 WHERE category = "best play"
sql_create_context