instruction
stringlengths
151
7.46k
output
stringlengths
2
4.44k
source
stringclasses
26 values
CREATE TABLE table_35915 ( "Date" text, "Venue" text, "Score" text, "Result" text, "Competition" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What date was the game played at the venue of Hrazdan Stadium, Yerevan, Armenia?
SELECT "Date" FROM table_35915 WHERE "Venue" = 'hrazdan stadium, yerevan, armenia'
wikisql
CREATE TABLE employees ( EMPLOYEE_ID decimal(6,0), FIRST_NAME varchar(20), LAST_NAME varchar(25), EMAIL varchar(25), PHONE_NUMBER varchar(20), HIRE_DATE date, JOB_ID varchar(10), SALARY decimal(8,2), COMMISSION_PCT decimal(2,2), MANAGER_ID decimal(6,0), DEPARTMENT_ID decimal(...
SELECT HIRE_DATE, SUM(SALARY) FROM employees WHERE SALARY BETWEEN 8000 AND 12000 AND COMMISSION_PCT <> "null" OR DEPARTMENT_ID <> 40 ORDER BY SUM(SALARY)
nvbench
CREATE TABLE table_32251 ( "Season" real, "Series" text, "Team" text, "Races" text, "Wins" text, "Poles" text, "Podiums" text, "Points" text, "Final Placing" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which races have #2 podiums?...
SELECT "Races" FROM table_32251 WHERE "Podiums" = '2'
wikisql
CREATE TABLE table_21436373_4 ( stadium VARCHAR, type_of_record VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What was the stadium that had the regular season game?
SELECT stadium FROM table_21436373_4 WHERE type_of_record = "Regular season game"
sql_create_context
CREATE TABLE table_name_8 ( location VARCHAR, opponent VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Where did they play against Clemson?
SELECT location FROM table_name_8 WHERE opponent = "clemson"
sql_create_context
CREATE TABLE table_63717 ( "Rank" text, "Nation" text, "Gold" real, "Silver" real, "Bronze" real, "Total" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the most silver won by Norway?
SELECT MAX("Silver") FROM table_63717 WHERE "Nation" = 'norway'
wikisql
CREATE TABLE employees ( EMPLOYEE_ID decimal(6,0), FIRST_NAME varchar(20), LAST_NAME varchar(25), EMAIL varchar(25), PHONE_NUMBER varchar(20), HIRE_DATE date, JOB_ID varchar(10), SALARY decimal(8,2), COMMISSION_PCT decimal(2,2), MANAGER_ID decimal(6,0), DEPARTMENT_ID decimal(...
SELECT HIRE_DATE, AVG(MANAGER_ID) FROM employees WHERE NOT EMPLOYEE_ID IN (SELECT EMPLOYEE_ID FROM job_history) ORDER BY AVG(MANAGER_ID)
nvbench
CREATE TABLE table_28769 ( "Season #" real, "Series #" real, "Episode title" text, "Original air date" text, "Nick prod. #" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the lowest Nick production number?
SELECT MIN("Nick prod. #") FROM table_28769
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...
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE diagnoses.icd9_code = "V1581" AND prescriptions.route = "PO/NG"
mimicsql_data
CREATE TABLE table_69439 ( "Engine" text, "Displacement" text, "Power" text, "Torque" text, "Year" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- How powerful is the model before 1999?
SELECT "Power" FROM table_69439 WHERE "Year" < '1999'
wikisql
CREATE TABLE table_name_53 ( total_foreign_born__1000_ INTEGER, born_in_a_non_eu_state__1000_ VARCHAR, total_population__1000_ VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the highest Total Foreign-born (1000) from a non EU state (1000) of 685 ...
SELECT MAX(total_foreign_born__1000_) FROM table_name_53 WHERE born_in_a_non_eu_state__1000_ = 685 AND total_population__1000_ > 10 OFFSET 666
sql_create_context
CREATE TABLE table_46636 ( "Model Number" text, "Frequency" text, "L2-Cache" text, "Front Side Bus" text, "Multiplier" text, "Voltage" text, "Socket" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the Frequency for Model Number c3 85...
SELECT "Frequency" FROM table_46636 WHERE "Model Number" = 'c3 850'
wikisql
CREATE TABLE table_40847 ( "Rank" real, "Name" text, "Years" text, "Matches" real, "Goals" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the average rank for players with under 205 matches and under 100 goals?
SELECT AVG("Rank") FROM table_40847 WHERE "Matches" < '205' AND "Goals" < '100'
wikisql
CREATE TABLE cost ( row_id number, subject_id number, hadm_id number, event_type text, event_id number, chargetime time, cost number ) CREATE TABLE diagnoses_icd ( row_id number, subject_id number, hadm_id number, icd9_code text, charttime time ) CREATE TABLE chartevent...
SELECT t3.drug FROM (SELECT t2.drug, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM (SELECT admissions.subject_id, diagnoses_icd.charttime FROM diagnoses_icd JOIN admissions ON diagnoses_icd.hadm_id = admissions.hadm_id WHERE diagnoses_icd.icd9_code = (SELECT d_icd_diagnoses.icd9_code FROM d_icd_diagnoses WHERE ...
mimic_iii
CREATE TABLE appellations ( No INTEGER, Appelation TEXT, County TEXT, State TEXT, Area TEXT, isAVA TEXT ) CREATE TABLE wine ( No INTEGER, Grape TEXT, Winery TEXT, Appelation TEXT, State TEXT, Name TEXT, Year INTEGER, Price INTEGER, Score INTEGER, Cases IN...
SELECT Year, MAX(Price) FROM wine GROUP BY Year
nvbench
CREATE TABLE table_name_63 ( points INTEGER, engine VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What are the average points for an engine of ford zetec-r v8?
SELECT AVG(points) FROM table_name_63 WHERE engine = "ford zetec-r v8"
sql_create_context
CREATE TABLE table_69102 ( "Date" text, "Opponent" text, "Score" text, "Loss" text, "Attendance" text, "Record" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which score has an Attendance of 31,178?
SELECT "Score" FROM table_69102 WHERE "Attendance" = '31,178'
wikisql
CREATE TABLE table_11244302_1 ( air_date VARCHAR, share VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which air date had an 11 share
SELECT air_date FROM table_11244302_1 WHERE share = 11
sql_create_context
CREATE TABLE ftxmzjzjlb ( 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, MZZYZD...
SELECT * FROM hz_info JOIN txmzjzjlb JOIN jybgb JOIN jyjgzbb 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 AND jybgb.YLJGDM = jyjgzbb.YLJGDM AND jybgb.BGDH = jyjgzbb.BGDH WHERE hz_i...
css
CREATE TABLE table_name_97 ( league_cup INTEGER, name VARCHAR, premier_league VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the highest league cup of danny collins, who has more than 1 premier league?
SELECT MAX(league_cup) FROM table_name_97 WHERE name = "danny collins" AND premier_league > 1
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 procedures ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) CREATE TABLE prescription...
SELECT demographic.days_stay, demographic.admission_location FROM demographic WHERE demographic.subject_id = "65759"
mimicsql_data
CREATE TABLE table_71505 ( "Member countries" text, "Population" text, "Area (km\u00b2)" text, "GDP (billion US$)" text, "GDP per capita (US$)" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the population of the nation that has a GDP per ca...
SELECT "Population" FROM table_71505 WHERE "GDP per capita (US$)" = '11,929'
wikisql
CREATE TABLE CloseReasonTypes ( Id number, Name text, Description text ) CREATE TABLE PostHistory ( Id number, PostHistoryTypeId number, PostId number, RevisionGUID other, CreationDate time, UserId number, UserDisplayName text, Comment text, Text text, ContentLicense...
SELECT MAX(CreationDate) FROM Votes AS v WHERE VoteTypeId = 6 AND NOT UserId IS NULL
sede
CREATE TABLE table_55107 ( "Team" text, "City/Area" text, "Arena" text, "Capacity" text, "Last season" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the last season that the Scottish Rocks played?
SELECT "Last season" FROM table_55107 WHERE "Team" = 'scottish rocks'
wikisql
CREATE TABLE table_12699 ( "Res." text, "Record" text, "Opponent" text, "Method" text, "Event" text, "Round" real, "Time" text, "Location" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is Res., when Round is greater than 2, and whe...
SELECT "Res." FROM table_12699 WHERE "Round" > '2' AND "Event" = 'midwest cage championships 25: inferno'
wikisql
CREATE TABLE table_name_87 ( round INTEGER, position VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What round on average was a defensive tackle selected?
SELECT AVG(round) FROM table_name_87 WHERE position = "defensive tackle"
sql_create_context
CREATE TABLE table_name_92 ( label VARCHAR, chinese__simplified_ VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is 's Label?
SELECT label FROM table_name_92 WHERE chinese__simplified_ = "你 朋友"
sql_create_context
CREATE TABLE table_43919 ( "Rank" real, "Name" text, "Period" text, "Games" real, "Goals" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the name of the person with more than 299 games during the 1995 07 period?
SELECT "Name" FROM table_43919 WHERE "Games" > '299' AND "Period" = '1995–07'
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 mzjzjlb.JZZDBM, mzjzjlb.JZZDSM 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.RYBH = '71329181'
css
CREATE TABLE table_204_234 ( id number, "round" text, "100 yd (91 m)" text, "80 yd (73 m)" text, "60 yd (55 m)" text, "50 yd (46 m)" text, "40 yd (37 m)" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- who shot the most at 91 m
SELECT "round" FROM table_204_234 ORDER BY "100 yd (91 m)" DESC LIMIT 1
squall
CREATE TABLE table_25101 ( "District" text, "Vacator" text, "Reason for change" text, "Successor" text, "Date successor seated" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Name the district for rep. warren r. davis died during previous congress
SELECT "District" FROM table_25101 WHERE "Reason for change" = 'Rep. Warren R. Davis died during previous congress'
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_kc22.SOC_SRT_DIRE_CD, t_kc22.SOC_SRT_DIRE_NM, t_kc22.UNIVALENT FROM t_kc22 WHERE t_kc22.MED_CLINIC_ID IN (SELECT t_kc21.MED_CLINIC_ID FROM t_kc21 WHERE t_kc21.PERSON_NM = '卫祺祥' AND t_kc21.MED_SER_ORG_NO = '1070682') ORDER BY t_kc22.UNIVALENT DESC LIMIT 1
css
CREATE TABLE table_name_41 ( stadium VARCHAR, date VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the Stadium held on november 29?
SELECT stadium FROM table_name_41 WHERE date = "november 29"
sql_create_context
CREATE TABLE table_72838 ( "Year" real, "Starts" real, "Wins" real, "Top 5" real, "Top 10" real, "Poles" real, "Avg. Start" text, "Avg. Finish" text, "Winnings" text, "Position" text, "Team(s)" text ) -- Using valid SQLite, answer the following questions for the tables prov...
SELECT "Poles" FROM table_72838 WHERE "Position" = '25th'
wikisql
CREATE TABLE table_51534 ( "Game" real, "Date" text, "Team" text, "Score" text, "High points" text, "High rebounds" text, "High assists" text, "Location Attendance" text, "Record" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Who ha...
SELECT "High rebounds" FROM table_51534 WHERE "High assists" = 'a. johnson (6)'
wikisql
CREATE TABLE table_39533 ( "Game" real, "Date" text, "Opponent" text, "Score" text, "Series" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which Opponent has a Score of 2 6?
SELECT "Opponent" FROM table_39533 WHERE "Score" = '2–6'
wikisql
CREATE TABLE table_name_72 ( date VARCHAR, opponent VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- When was there a game against the Indianapolis colts?
SELECT date FROM table_name_72 WHERE opponent = "indianapolis colts"
sql_create_context
CREATE TABLE table_name_72 ( pos INTEGER, car__number VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which Pos has a Car # of 33?
SELECT SUM(pos) FROM table_name_72 WHERE car__number = 33
sql_create_context
CREATE TABLE ROLES ( role_name VARCHAR, role_description VARCHAR, role_code VARCHAR ) CREATE TABLE Employees ( role_code VARCHAR, employee_name VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the role name and role description for employe...
SELECT T2.role_name, T2.role_description FROM Employees AS T1 JOIN ROLES AS T2 ON T1.role_code = T2.role_code WHERE T1.employee_name = "Ebba"
sql_create_context
CREATE TABLE table_name_70 ( set_3 VARCHAR, set_2 VARCHAR, set_1 VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the Set 3 when the Set 2 is 21 25, and a Set 1 is 25 21?
SELECT set_3 FROM table_name_70 WHERE set_2 = "21–25" AND set_1 = "25–21"
sql_create_context
CREATE TABLE table_13301516_1 ( us_viewers__millions_ VARCHAR, no_in_series VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- How many millions of U.S. viewers watched episode 185?
SELECT us_viewers__millions_ FROM table_13301516_1 WHERE no_in_series = 185
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...
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE demographic.gender = "M" AND diagnoses.long_title = "Seroma complicating a procedure"
mimicsql_data
CREATE TABLE inputevents_cv ( row_id number, subject_id number, hadm_id number, icustay_id number, charttime time, itemid number, amount number ) CREATE TABLE chartevents ( row_id number, subject_id number, hadm_id number, icustay_id number, itemid number, charttime ...
SELECT 24 * (STRFTIME('%j', CURRENT_TIME()) - STRFTIME('%j', inputevents_cv.charttime)) FROM inputevents_cv WHERE inputevents_cv.icustay_id IN (SELECT icustays.icustay_id FROM icustays WHERE icustays.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 20898) AND icustays.outtime IS NULL)...
mimic_iii
CREATE TABLE table_name_93 ( country VARCHAR, year VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is Country, when Year is '1994'?
SELECT country FROM table_name_93 WHERE year = 1994
sql_create_context
CREATE TABLE table_204_561 ( id number, "fence" number, "name" text, "jockey" text, "age" number, "handicap (st-lb)" text, "starting price" text, "fate" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- which jockey is before tm jones
SELECT "jockey" FROM table_204_561 WHERE id = (SELECT id FROM table_204_561 WHERE "jockey" = 'tm jones') - 1
squall
CREATE TABLE course_prerequisite ( pre_course_id int, course_id int ) CREATE TABLE program_requirement ( program_id int, category varchar, min_credit int, additional_req varchar ) CREATE TABLE area ( course_id int, area varchar ) CREATE TABLE comment_instructor ( instructor_id int...
SELECT DISTINCT course.department, course.name, course.number FROM course, course_offering, program_course, semester WHERE course.course_id = course_offering.course_id AND course.credits = 3 AND program_course.category LIKE '%ULCS%' AND program_course.course_id = course.course_id AND semester.semester = 'Winter' AND se...
advising
CREATE TABLE allergy ( allergyid number, patientunitstayid number, drugname text, allergyname text, allergytime time ) CREATE TABLE microlab ( microlabid number, patientunitstayid number, culturesite text, organism text, culturetakentime time ) CREATE TABLE medication ( med...
SELECT treatment.treatmentname FROM treatment WHERE treatment.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '015-15167')) AND STRFTIME('%y', treatment.treatmenttime) = '2100'...
eicu
CREATE TABLE table_21865 ( "Official Name" text, "Status" text, "Area km 2" text, "Population" real, "Census Ranking" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the name of the place with 582.20 square km area?
SELECT "Official Name" FROM table_21865 WHERE "Area km 2" = '582.20'
wikisql
CREATE TABLE table_name_19 ( object_type VARCHAR, ngc_number VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which Object type has a NGC number of 2787?
SELECT object_type FROM table_name_19 WHERE ngc_number = 2787
sql_create_context
CREATE TABLE table_32852 ( "Date" real, "Sport" text, "Winner" text, "Score" text, "Loser" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What sport was played before 2006 with a loser of france b?
SELECT "Sport" FROM table_32852 WHERE "Date" < '2006' AND "Loser" = 'france b'
wikisql
CREATE TABLE table_name_37 ( steal_intercept_ball VARCHAR, sliding_tackle VARCHAR, dump_tackle VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which steal/intercept ball has no for both the sliding tackle and dump tackle?
SELECT steal_intercept_ball FROM table_name_37 WHERE sliding_tackle = "no" AND dump_tackle = "no"
sql_create_context
CREATE TABLE table_30133_1 ( export_volume_of_goods_and_services__percent_change_ VARCHAR, gdp_at_current_prices__usd_billions_ VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- How many export volume of goods and services values are associated with GDP at curr...
SELECT COUNT(export_volume_of_goods_and_services__percent_change_) FROM table_30133_1 WHERE gdp_at_current_prices__usd_billions_ = "161.340"
sql_create_context
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 COURSE ( CRS_CODE varchar(10), DEPT_CODE varchar(10), CRS_DESCRIPTION varchar(35), CRS_CREDIT float(8) ) CREATE...
SELECT EMP_DOB, COUNT(EMP_DOB) FROM EMPLOYEE AS T1 JOIN CLASS AS T2 ON T1.EMP_NUM = T2.PROF_NUM WHERE CRS_CODE = "ACCT-211" ORDER BY COUNT(EMP_DOB) DESC
nvbench
CREATE TABLE table_23152 ( "LGA Name" text, "Area (km 2 )" real, "Census 2006 population" real, "Administrative capital" text, "Postal Code" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the LGA name where the 2006 census population is bigg...
SELECT "LGA Name" FROM table_23152 WHERE "Census 2006 population" > '425208.9417698913' AND "Administrative capital" = 'Port Harcourt'
wikisql
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...
SELECT t_kc22.SOC_SRT_DIRE_CD, t_kc22.SOC_SRT_DIRE_NM FROM gwyjzb JOIN t_kc22 ON gwyjzb.MED_CLINIC_ID = t_kc22.MED_CLINIC_ID WHERE gwyjzb.PERSON_ID = '20027341' GROUP BY t_kc22.SOC_SRT_DIRE_CD ORDER BY COUNT(*) DESC UNION SELECT t_kc22.SOC_SRT_DIRE_CD, t_kc22.SOC_SRT_DIRE_NM FROM fgwyjzb JOIN t_kc22 ON fgwyjzb.MED_CLIN...
css
CREATE TABLE table_42510 ( "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. -- Who was the home team for tie number 16?
SELECT "Home team" FROM table_42510 WHERE "Tie no" = '16'
wikisql
CREATE TABLE table_name_54 ( isbn VARCHAR, japanese_title VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the ISBN of Japanese Title of (kiri no h monsha)?
SELECT isbn FROM table_name_54 WHERE japanese_title = "霧の訪問者 (kiri no hōmonsha)"
sql_create_context
CREATE TABLE ReviewRejectionReasons ( Id number, Name text, Description text, PostTypeId number ) CREATE TABLE Comments ( Id number, PostId number, Score number, Text text, CreationDate time, UserDisplayName text, UserId number, ContentLicense text ) CREATE TABLE Posts ...
SELECT q.AnswerCount AS "Nb Answers", q.Id AS "post_link", u.Id AS "user_link" FROM Posts AS q INNER JOIN Users AS u ON u.Id = q.OwnerUserId WHERE q.PostTypeId = 1 ORDER BY q.AnswerCount DESC, u.Id
sede
CREATE TABLE Assessment_Notes ( notes_id INTEGER, student_id INTEGER, teacher_id INTEGER, date_of_notes DATETIME, text_of_notes VARCHAR(255), other_details VARCHAR(255) ) CREATE TABLE Ref_Detention_Type ( detention_type_code VARCHAR(10), detention_type_description VARCHAR(80) ) CREATE ...
SELECT student_id, monthly_rental FROM Student_Addresses GROUP BY other_details ORDER BY monthly_rental 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, ...
SELECT zyjzjlb.JZLSH FROM person_info JOIN hz_info JOIN zyjzjlb ON person_info.RYBH = hz_info.RYBH AND hz_info.YLJGDM = zyjzjlb.YLJGDM AND hz_info.KH = zyjzjlb.KH AND hz_info.KLX = zyjzjlb.KLX WHERE person_info.XM = '沈清涵' AND NOT zyjzjlb.JZLSH IN (SELECT jybgb.JZLSH FROM jybgb WHERE jybgb.BGRQ <= '2010-11-18')
css
CREATE TABLE code_description ( code varchar, description text ) CREATE TABLE city ( city_code varchar, city_name varchar, state_code varchar, country_name varchar, time_zone_code varchar ) CREATE TABLE flight_stop ( flight_id int, stop_number int, stop_days text, stop_airp...
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 = 'MONTREAL' AND date_day.day_number = 26 AND date_day.month_number = 7 AND ...
atis
CREATE TABLE table_204_835 ( id number, "rank" number, "lane" number, "name" text, "nationality" text, "time" text, "notes" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- did austria or russia rank higher ?
SELECT "nationality" FROM table_204_835 WHERE "nationality" IN ('austria', 'russia') ORDER BY id LIMIT 1
squall
CREATE TABLE table_37504 ( "Date" text, "Tournament" text, "Location" text, "Winner" text, "Score" text, "1st prize ( $ )" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What date was the Monsanto open located in Florida?
SELECT "Date" FROM table_37504 WHERE "Location" = 'florida' AND "Tournament" = 'monsanto open'
wikisql
CREATE TABLE table_260938_1 ( base_10 VARCHAR, shortscale_comparison VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Name the base 10 for shortscale comparison for billion
SELECT base_10 FROM table_260938_1 WHERE shortscale_comparison = "Billion"
sql_create_context
CREATE TABLE table_test_20 ( "id" int, "ejection_fraction_ef" int, "anemia" bool, "gender" string, "bleeding" int, "systolic_blood_pressure_sbp" int, "left_main_coronary_artery_stenosis" int, "hemoglobin_a1c_hba1c" float, "renal_disease" bool, "creatinine_clearance_cl" float, ...
SELECT * FROM table_test_20 WHERE renal_disease = 1 OR ((gender = 'male' AND prior_creatinine > 2.5) OR (gender = 'female' AND prior_creatinine > 2))
criteria2sql
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 jyjgzbb.JYZBLSH FROM hz_info JOIN mzjzjlb JOIN jybgb JOIN jyjgzbb JOIN jybgb_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 = jybgb_jyjgzbb.YLJGDM AND jybgb.BGD...
css
CREATE TABLE table_name_38 ( drawn INTEGER, lost VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the lowest drawn for entries with a lost of 13?
SELECT MIN(drawn) FROM table_name_38 WHERE lost = 13
sql_create_context
CREATE TABLE patients ( row_id number, subject_id number, gender text, dob time, dod time ) CREATE TABLE d_icd_procedures ( row_id number, icd9_code text, short_title text, long_title text ) CREATE TABLE labevents ( row_id number, subject_id number, hadm_id number, ...
SELECT d_icd_procedures.short_title FROM d_icd_procedures WHERE d_icd_procedures.icd9_code IN (SELECT t3.icd9_code FROM (SELECT t2.icd9_code, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM (SELECT admissions.subject_id, procedures_icd.charttime FROM procedures_icd JOIN admissions ON procedures_icd.hadm_id = admi...
mimic_iii
CREATE TABLE table_41924 ( "Rank" real, "Name" text, "Team" text, "Games" real, "Points" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the sum of Rank, when Name is Will Solomon, and when Games is greater than 21?
SELECT SUM("Rank") FROM table_41924 WHERE "Name" = 'will solomon' AND "Games" > '21'
wikisql
CREATE TABLE table_74229 ( "Series no." real, "Season no." real, "Title" text, "Directed by" text, "Written by" text, "Original air date" text, "Production code" real, "U.S. viewers (millions)" text ) -- Using valid SQLite, answer the following questions for the tables provided above. ...
SELECT "Directed by" FROM table_74229 WHERE "Title" = 'Home Is Where the Hospital Is'
wikisql
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 COUNT(*) FROM (SELECT jybgb.KSBM FROM mzjzjlb JOIN jybgb ON mzjzjlb.YLJGDM = jybgb.YLJGDM_MZJZJLB AND mzjzjlb.JZLSH = jybgb.JZLSH_MZJZJLB WHERE mzjzjlb.YLJGDM = '4198073' AND jybgb.BGRQ BETWEEN '2005-01-17' AND '2012-01-10' GROUP BY jybgb.KSBM HAVING COUNT(*) <= 30) AS T
css
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...
SELECT COUNT(*) FROM (SELECT MED_ORG_DEPT_CD FROM t_kc21 WHERE MED_SER_ORG_NO = '3731061' GROUP BY MED_ORG_DEPT_CD HAVING MAX(IN_HOSP_DAYS) < 8) AS T
css
CREATE TABLE table_38836 ( "Distance" text, "Time" text, "Date" text, "Location" text, "Notes" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What's the location when the notes area is notes?
SELECT "Location" FROM table_38836 WHERE "Notes" = 'notes'
wikisql
CREATE TABLE table_name_49 ( score VARCHAR, date VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What was the score for the game on December 20?
SELECT score FROM table_name_49 WHERE date = "december 20"
sql_create_context
CREATE TABLE table_5418 ( "Game" real, "December" real, "Opponent" text, "Score" text, "Record" text, "Points" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which Opponent has a Score of 4 5 ot?
SELECT "Opponent" FROM table_5418 WHERE "Score" = '4–5 ot'
wikisql
CREATE TABLE table_78861 ( "Week" real, "Event" text, "Air Date" text, "Winning team" text, "Winners club" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which Week has an Air Date of august 30, 2008?
SELECT "Week" FROM table_78861 WHERE "Air Date" = 'august 30, 2008'
wikisql
CREATE TABLE table_name_54 ( year_built VARCHAR, current_status VARCHAR, boat_builder VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What year did J. Jones, trearddur bay build a boat with a current status of tbsc?
SELECT year_built FROM table_name_54 WHERE current_status = "tbsc" AND boat_builder = "j. jones, trearddur bay"
sql_create_context
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...
SELECT COUNT(*) FROM gwyjzb WHERE gwyjzb.MED_SER_ORG_NO = '5999145' AND gwyjzb.IN_HOSP_DATE BETWEEN '2017-08-23' AND '2021-09-16' AND gwyjzb.INSU_TYPE = '儿童' UNION SELECT COUNT(*) FROM fgwyjzb WHERE fgwyjzb.MED_SER_ORG_NO = '5999145' AND fgwyjzb.IN_HOSP_DATE BETWEEN '2017-08-23' AND '2021-09-16' AND fgwyjzb.INSU_TYPE =...
css
CREATE TABLE table_46337 ( "Date" text, "Visitor" text, "Score" text, "Home" text, "Decision" text, "Record" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Who made the decision when toronto was the home team?
SELECT "Decision" FROM table_46337 WHERE "Home" = 'toronto'
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 demographic ( subject_id text, hadm_id text, name text, marital_status text, age text, dob te...
SELECT demographic.gender, diagnoses.short_title FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE demographic.subject_id = "2560"
mimicsql_data
CREATE TABLE table_19103 ( "Club" text, "Played" text, "Won" text, "Drawn" text, "Lost" text, "Points for" text, "Points against" text, "Tries for" text, "Tries against" text, "Try bonus" text, "Losing bonus" text, "Points" text ) -- Using valid SQLite, answer the follo...
SELECT "Losing bonus" FROM table_19103 WHERE "Points" = '24'
wikisql
CREATE TABLE t_kc21_t_kc22 ( MED_CLINIC_ID text, MED_EXP_DET_ID number ) 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 ...
SELECT t_kc22.SOC_SRT_DIRE_CD, t_kc22.SOC_SRT_DIRE_NM 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_NM = '曹烨磊' AND t_kc22.MED_INV_ITEM_TYPE = '治疗费'
css
CREATE TABLE area ( course_id int, area varchar ) CREATE TABLE requirement ( requirement_id int, requirement varchar, college varchar ) CREATE TABLE ta ( campus_job_id int, student_id int, location varchar ) CREATE TABLE program ( program_id int, name varchar, college varc...
SELECT COUNT(*) FROM course, course_offering, semester WHERE course.course_id = course_offering.course_id AND course.department = 'HUMGEN' AND course.number = 821 AND semester.semester = 'FA' AND semester.semester_id = course_offering.semester AND semester.year = 2016
advising
CREATE TABLE faculty ( facid number, lname text, fname text, rank text, sex text, phone number, room text, building text ) CREATE TABLE student ( stuid number, lname text, fname text, age number, sex text, major number, advisor number, city_code text ) C...
SELECT T2.building FROM course AS T1 JOIN faculty AS T2 ON T1.instructor = T2.facid GROUP BY T1.instructor ORDER BY COUNT(*) DESC LIMIT 1
spider
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...
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.discharge_location = "HOME" AND demographic.diagnosis = "PNEUMONIA"
mimicsql_data
CREATE TABLE bdmzjzjlb ( CYBQDM text, CYBQMC text, CYCWH text, CYKSDM text, CYKSMC text, CYSJ time, CYZTDM number, HZXM text, JZKSDM text, JZKSMC text, JZLSH number, KH text, KLX number, MZBMLX number, MZJZLSH text, MZZDBM text, MZZDMC text, MZZYZD...
SELECT wdmzjzjlb.JZLSH 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 = '水幼安' AND NOT wdmzjzjlb.JZLSH IN (SELECT jybgb.JZLSH FROM jybgb WHERE jybgb.BGRQ >= '2004-09-0...
css
CREATE TABLE table_19354 ( "Team" text, "Average" text, "Points" real, "Played" real, "1987-88" text, "1988-89" text, "1989-90" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- How many points in 87/88 for racing de c rdoba?
SELECT "1987-88" FROM table_19354 WHERE "Team" = 'Racing de Córdoba'
wikisql
CREATE TABLE table_17505751_5 ( Champions VARCHAR, position VARCHAR, league VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- In the Champions league is the forward position smaller than 6.0
SELECT COUNT(Champions) AS league FROM table_17505751_5 WHERE position = "Forward" AND league < 6.0
sql_create_context
CREATE TABLE table_name_27 ( prominence__m_ VARCHAR, elevation__m_ VARCHAR, country VARCHAR, col__m_ VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the total prominence number in m of ethiopia, which has a col in m of 1728 and an elevation le...
SELECT COUNT(prominence__m_) FROM table_name_27 WHERE country = "ethiopia" AND col__m_ = 1728 AND elevation__m_ < 3 OFFSET 358
sql_create_context
CREATE TABLE swimmer ( ID int, name text, Nationality text, meter_100 real, meter_200 text, meter_300 text, meter_400 text, meter_500 text, meter_600 text, meter_700 text, Time text ) CREATE TABLE stadium ( ID int, name text, Capacity int, City text, Coun...
SELECT meter_200, AVG(ID) FROM swimmer GROUP BY meter_200 ORDER BY meter_200 DESC
nvbench
CREATE TABLE Customers ( customer_id INTEGER, payment_method_code VARCHAR(10), customer_code VARCHAR(20), customer_name VARCHAR(80), customer_address VARCHAR(255), customer_phone VARCHAR(80), customer_email VARCHAR(80) ) CREATE TABLE Suppliers ( supplier_id INTEGER, supplier_name VA...
SELECT product_type_code, MAX(product_price) FROM Products GROUP BY product_type_code ORDER BY MAX(product_price) DESC
nvbench
CREATE TABLE table_20686 ( "Year" real, "Starts" real, "Wins" real, "Top 10" real, "Avg. Start" text, "Avg. Finish" text, "Winnings" text, "Position" text, "Team(s)" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- How many years did h...
SELECT COUNT("Winnings") FROM table_20686 WHERE "Avg. Finish" = '29.2'
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...
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.ethnicity = "HISPANIC/LATINO - PUERTO RICAN" AND demographic.days_stay > "17"
mimicsql_data
CREATE TABLE player ( Player_ID int, name text, Position text, Club_ID int, Apps real, Tries real, Goals text, Points real ) CREATE TABLE club_rank ( Rank real, Club_ID int, Gold real, Silver real, Bronze real, Total real ) CREATE TABLE club ( Club_ID int, ...
SELECT Competition_type, COUNT(Competition_type) FROM competition GROUP BY Competition_type ORDER BY COUNT(Competition_type)
nvbench
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 diagnoses ( ...
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.ethnicity = "WHITE" AND lab.label = "Total Protein, Pleural"
mimicsql_data
CREATE TABLE table_1341598_36 ( district VARCHAR, incumbent VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- where is the district where the incumbent is del latta?
SELECT district FROM table_1341598_36 WHERE incumbent = "Del Latta"
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 procedures ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) CREATE TABLE diagnoses ( ...
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.dod_year <= "2133.0" AND procedures.icd9_code = "3950"
mimicsql_data
CREATE TABLE table_43250 ( "Tournament" text, "2000" text, "2001" text, "2002" text, "2003" text, "2004" text, "2005" text, "2006" text, "2007" text, "2008" text, "2009" text, "2010" text, "2011" text, "2012" text ) -- Using valid SQLite, answer the following qu...
SELECT "Tournament" FROM table_43250 WHERE "2001" = '1r' AND "2011" = 'a'
wikisql
CREATE TABLE table_53655 ( "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 smallest crowd at junction oval?
SELECT MIN("Crowd") FROM table_53655 WHERE "Venue" = 'junction oval'
wikisql
CREATE TABLE table_11677691_4 ( player VARCHAR, college VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which player went to the college Southern California?
SELECT player FROM table_11677691_4 WHERE college = "Southern California"
sql_create_context