instruction
stringlengths
151
7.46k
output
stringlengths
2
4.44k
source
stringclasses
26 values
CREATE TABLE table_name_2 ( entrant VARCHAR, year VARCHAR, chassis VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Who used Eurobrun er189b after 1989?
SELECT entrant FROM table_name_2 WHERE year > 1989 AND chassis = "eurobrun er189b"
sql_create_context
CREATE TABLE table_204_84 ( id number, "no" number, "peak" text, "location" text, "elevation (m)" number, "prominence (m)" number, "col height (m)" number, "col location" text, "parent" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- ...
SELECT "peak" FROM table_204_84 WHERE "peak" IN ('mont blanc', 'monte rosa') ORDER BY "elevation (m)" DESC LIMIT 1
squall
CREATE TABLE zyjzjlb ( CYBQDM text, CYBQMC text, CYCWH text, CYKSDM text, CYKSMC text, CYSJ time, CYZTDM number, HZXM text, JZKSDM text, JZKSMC text, JZLSH text, KH text, KLX number, MZBMLX number, MZJZLSH text, MZZDBM text, MZZDMC text, MZZYZDZZBM...
SELECT * FROM hz_info JOIN wdmzjzjlb ON hz_info.YLJGDM = wdmzjzjlb.YLJGDM AND hz_info.KH = wdmzjzjlb.KH AND hz_info.KLX = wdmzjzjlb.KLX WHERE hz_info.RYBH = '81533659' AND hz_info.YLJGDM = '4316976' AND wdmzjzjlb.JZZDSM LIKE '%相%' UNION SELECT * FROM hz_info JOIN bdmzjzjlb ON hz_info.YLJGDM = bdmzjzjlb.YLJGDM AND hz_in...
css
CREATE TABLE table_27550 ( "Week" real, "Date" text, "Kickoff" text, "Opponent" text, "Final score" text, "Team record" text, "Game site" text, "Attendance" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What was the final score of the g...
SELECT "Final score" FROM table_27550 WHERE "Attendance" = '7523'
wikisql
CREATE TABLE table_66874 ( "Region" text, "Date" text, "Label" text, "Format" text, "Catalog" text, "Note" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Name the catalog for alfa records and cd format
SELECT "Catalog" FROM table_66874 WHERE "Label" = 'alfa records' AND "Format" = 'cd'
wikisql
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 jyjgzbb.JCZBJGDL, jyjgzbb.JCZBJGDW FROM person_info JOIN hz_info JOIN mzjzjlb JOIN jybgb JOIN jyjgzbb JOIN jybgb_jyjgzbb ON person_info.RYBH = hz_info.RYBH AND hz_info.YLJGDM = mzjzjlb.YLJGDM AND hz_info.KH = mzjzjlb.KH AND hz_info.KLX = mzjzjlb.KLX AND mzjzjlb.YLJGDM = jybgb.YLJGDM_MZJZJLB AND mzjzjlb.JZLSH = j...
css
CREATE TABLE table_name_41 ( record VARCHAR, week VARCHAR, kickoff VARCHAR, game_site VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which Record has a Kickoff of 12:00pm cst, and a Game site of arrowhead stadium, and a Week of 15?
SELECT record FROM table_name_41 WHERE kickoff = "12:00pm cst" AND game_site = "arrowhead stadium" AND week = "15"
sql_create_context
CREATE TABLE table_58327 ( "Date" text, "Tournament" text, "Winning score" text, "Margin of victory" text, "Runner(s)-up" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What was the winning score on May 3, 1998?
SELECT "Winning score" FROM table_58327 WHERE "Date" = 'may 3, 1998'
wikisql
CREATE TABLE gwyjzb ( 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 gwyjzb.OUT_DIAG_DIS_CD, AVG(gwyjzb.PERSON_AGE) FROM gwyjzb WHERE gwyjzb.MED_SER_ORG_NO = '4553560' GROUP BY gwyjzb.OUT_DIAG_DIS_CD UNION SELECT fgwyjzb.OUT_DIAG_DIS_CD, AVG(fgwyjzb.PERSON_AGE) FROM fgwyjzb WHERE fgwyjzb.MED_SER_ORG_NO = '4553560' GROUP BY fgwyjzb.OUT_DIAG_DIS_CD
css
CREATE TABLE table_14188 ( "Constituency number" text, "Name" text, "Reserved for ( SC / ST /None)" text, "District" text, "Number of electorates (2009)" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the Constituency number for Pandhana?
SELECT "Constituency number" FROM table_14188 WHERE "Name" = 'pandhana'
wikisql
CREATE TABLE table_name_83 ( result VARCHAR, award VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Name the result for the bafta tv awards
SELECT result FROM table_name_83 WHERE award = "bafta tv awards"
sql_create_context
CREATE TABLE t_kc21_t_kc22 ( MED_CLINIC_ID text, MED_EXP_DET_ID number ) 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, C...
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_NM = '周兰若' AND t_kc21.CLINIC_TYPE = '门诊' AND t_kc22.STA_DATE BETWEEN '2010-11-15' AND '2020-06-07' AND t_kc22.MED_INV_IT...
css
CREATE TABLE exhibition ( Exhibition_ID int, Year int, Theme text, Artist_ID int, Ticket_Price real ) CREATE TABLE artist ( Artist_ID int, Name text, Country text, Year_Join int, Age int ) CREATE TABLE exhibition_record ( Exhibition_ID int, Date text, Attendance int...
SELECT Year, COUNT(Year) FROM exhibition WHERE Ticket_Price < 15 GROUP BY Theme ORDER BY COUNT(Year) DESC
nvbench
CREATE TABLE table_name_10 ( purse VARCHAR, year VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the Purse listed for the Year of 1998?
SELECT purse FROM table_name_10 WHERE year = "1998"
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 jyjgzbb.JCZBJGDL, jyjgzbb.JCZBJGDW 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 = jy...
css
CREATE TABLE table_20899 ( "Pick #" real, "CFL Team" text, "Player" text, "Position" text, "College" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Who picked dimitri tsoumpas?
SELECT "CFL Team" FROM table_20899 WHERE "Player" = 'Dimitri Tsoumpas'
wikisql
CREATE TABLE CloseReasonTypes ( Id number, Name text, Description text ) CREATE TABLE PostTags ( PostId number, TagId number ) CREATE TABLE ReviewTaskTypes ( Id number, Name text, Description text ) CREATE TABLE PostLinks ( Id number, CreationDate time, PostId number, ...
SELECT date1 AS creationDate, AVG(diff1) AS avgDaysToClose FROM (SELECT DATEDIFF(day, d.CreationDate, ClosedDate) AS "diff1", FORMAT(d.CreationDate, 'yy-MM') AS "date1", FORMAT(d.ClosedDate, 'yy-MM') AS "date2", (d.Id) AS id FROM Posts AS d LEFT JOIN PostHistory AS ph ON ph.PostId = d.Id LEFT JOIN PostLinks AS pl ON pl...
sede
CREATE TABLE table_name_5 ( week VARCHAR, date VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Tell me the number of weeks for bye
SELECT COUNT(week) FROM table_name_5 WHERE date = "bye"
sql_create_context
CREATE TABLE diagnosis ( diagnosisid number, patientunitstayid number, diagnosisname text, diagnosistime time, icd9code text ) CREATE TABLE allergy ( allergyid number, patientunitstayid number, drugname text, allergyname text, allergytime time ) CREATE TABLE vitalperiodic ( ...
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 DATETIME(treatment.treatmenttime) <= DATETIME(CURRENT_TIME(), '-3 yea...
eicu
CREATE TABLE table_31904 ( "Round" text, "Match" text, "Name" text, "Team 1" text, "!!Team 2" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Name the team 1 for round 3
SELECT "Team 1" FROM table_31904 WHERE "Round" = '3'
wikisql
CREATE TABLE PostFeedback ( Id number, PostId number, IsAnonymous boolean, VoteTypeId number, CreationDate time ) CREATE TABLE CloseReasonTypes ( Id number, Name text, Description text ) CREATE TABLE ReviewTaskResults ( Id number, ReviewTaskId number, ReviewTaskResultTypeId...
SELECT TIME_TO_STR(CreationDate, '%Y') AS year, COUNT(Id) AS total FROM Posts WHERE PostTypeId = 1 GROUP BY TIME_TO_STR(CreationDate, '%Y') ORDER BY TIME_TO_STR(CreationDate, '%Y')
sede
CREATE TABLE genres ( name VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- List all different genre types.
SELECT DISTINCT name FROM genres
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 t_kc22.MED_CLINIC_ID FROM t_kc22 WHERE t_kc22.t_kc21_PERSON_NM = '魏阳舒' AND t_kc22.MED_CLINIC_ID IN (SELECT t_kc22.MED_CLINIC_ID FROM t_kc22 WHERE t_kc22.AMOUNT >= 6027.88)
css
CREATE TABLE table_63834 ( "Rank" real, "Attendance" real, "Visiting Team" text, "Date" text, "Result" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the Rank of the game with an Attendance of 93,039?
SELECT COUNT("Rank") FROM table_63834 WHERE "Attendance" = '93,039'
wikisql
CREATE TABLE table_train_192 ( "id" int, "hemoglobin_a1c_hba1c" float, "renal_disease" bool, "diabetic" string, "fasting_plasma_glucose" int, "NOUSE" float ) -- Using valid SQLite, answer the following questions for the tables provided above. -- patients with type ii diabetes
SELECT * FROM table_train_192 WHERE diabetic = 'ii'
criteria2sql
CREATE TABLE PostLinks ( Id number, CreationDate time, PostId number, RelatedPostId number, LinkTypeId number ) CREATE TABLE CloseReasonTypes ( Id number, Name text, Description text ) CREATE TABLE SuggestedEdits ( Id number, PostId number, CreationDate time, ApprovalDa...
SELECT c.Id AS "comment_link", c.UserId AS "user_link", c.CreationDate, c.Text, q.Id AS "post_link" FROM Comments AS c JOIN Posts AS q ON c.PostId = q.Id WHERE q.Tags LIKE '%<##tagName##>%' ORDER BY c.Id DESC LIMIT 500
sede
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 facility_code, COUNT(facility_code) FROM Apartment_Facilities AS T1 JOIN Apartments AS T2 ON T1.apt_id = T2.apt_id WHERE T2.bedroom_count > 4 GROUP BY facility_code ORDER BY facility_code DESC
nvbench
CREATE TABLE table_2595 ( "Year" text, "Day" text, "Date" text, "Driver" text, "Team" text, "Manufacturer" text, "Laps" text, "Miles (km)" text, "Race Time" text, "Average Speed (mph)" text, "Report" text ) -- Using valid SQLite, answer the following questions for the table...
SELECT "Manufacturer" FROM table_2595 WHERE "Average Speed (mph)" = '126.259'
wikisql
CREATE TABLE wrestler ( Wrestler_ID int, Name text, Reign text, Days_held text, Location text, Event text ) CREATE TABLE Elimination ( Elimination_ID text, Wrestler_ID text, Team text, Eliminated_By text, Elimination_Move text, Time text ) -- Using valid SQLite, answer...
SELECT Team, COUNT(Team) FROM Elimination GROUP BY Team ORDER BY COUNT(Team) DESC
nvbench
CREATE TABLE comment_instructor ( instructor_id int, student_id int, score int, comment_text varchar ) CREATE TABLE semester ( semester_id int, semester varchar, year int ) CREATE TABLE instructor ( instructor_id int, name varchar, uniqname varchar ) CREATE TABLE program_cours...
SELECT COUNT(*) > 0 FROM course, course_offering, semester WHERE course_offering.start_time < '12:00:00' AND course_offering.start_time >= '08:00:00' AND course.course_id = course_offering.course_id AND course.department = 'CMPLXSYS' AND course.number = 391 AND semester.semester = 'WN' AND semester.semester_id = course...
advising
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 lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.ethnicity = "HISPANIC/LATINO - PUERTO RICAN" AND lab.itemid = "50967"
mimicsql_data
CREATE TABLE table_15515 ( "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 the method of the match with a 3-4 record?
SELECT "Method" FROM table_15515 WHERE "Record" = '3-4'
wikisql
CREATE TABLE table_64929 ( "Event" text, "Date" text, "Location" text, "Winning skip" text, "Runner-up skip" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What's the location of the National event?
SELECT "Location" FROM table_64929 WHERE "Event" = 'the national'
wikisql
CREATE TABLE table_name_39 ( championship VARCHAR, circuit VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which championship had a Circuit of le mans?
SELECT championship FROM table_name_39 WHERE circuit = "le mans"
sql_create_context
CREATE TABLE demographic ( subject_id text, hadm_id text, name text, marital_status text, age text, dob text, gender text, language text, religion text, admission_type text, days_stay text, insurance text, ethnicity text, expire_flag text, admission_location t...
SELECT demographic.age, demographic.expire_flag FROM demographic WHERE demographic.name = "Alice Nixon"
mimicsql_data
CREATE TABLE table_27393 ( "Language" text, "Padilla Municipality" real, "Tomina Municipality" real, "Sopachuy Municipality" real, "Villa Alcal\u00e1 Municipality" real, "El Villar Municipality" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Nam...
SELECT COUNT("Tomina Municipality") FROM table_27393 WHERE "Villa Alcal\u00e1 Municipality" = '176'
wikisql
CREATE TABLE table_204_473 ( id number, "pos" text, "no" number, "driver" text, "constructor" text, "laps" number, "time/retired" text, "grid" number, "points" number ) -- Using valid SQLite, answer the following questions for the tables provided above. -- what are the number of t...
SELECT COUNT(*) FROM table_204_473 WHERE "constructor" = 'ferrari'
squall
CREATE TABLE table_train_219 ( "id" int, "hematocrit_hct" float, "fasting_plasma_glucose" int, "hba1c" float, "urine_protein" int, "iothalamate_clearance" int, "NOUSE" float ) -- Using valid SQLite, answer the following questions for the tables provided above. -- hba1c < 10 %
SELECT * FROM table_train_219 WHERE hba1c < 10
criteria2sql
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(DISTINCT patient.patienthealthsystemstayid) FROM patient WHERE patient.uniquepid = '030-41709' AND STRFTIME('%y', patient.hospitaladmittime) >= '2104'
eicu
CREATE TABLE table_11495 ( "Date" text, "Opponent" text, "Home/Away" text, "Field" text, "Result" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the date of the game away against Pride?
SELECT "Date" FROM table_11495 WHERE "Opponent" = 'pride' AND "Home/Away" = 'away'
wikisql
CREATE TABLE church ( Church_ID int, Name text, Organized_by text, Open_Date int, Continuation_of text ) CREATE TABLE people ( People_ID int, Name text, Country text, Is_Male text, Age int ) CREATE TABLE wedding ( Church_ID int, Male_ID int, Female_ID int, Year ...
SELECT Country, COUNT(Country) FROM people WHERE Age < (SELECT AVG(Age) FROM people) GROUP BY Country ORDER BY Country DESC
nvbench
CREATE TABLE table_44365 ( "Place" text, "Player" text, "Country" text, "Score" text, "To par" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What was the score of united states player wally armstrong when he had a To par of +1
SELECT "Score" FROM table_44365 WHERE "Country" = 'united states' AND "To par" = '+1' AND "Player" = 'wally armstrong'
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 FROM t_kc21 JOIN t_kc22 ON t_kc21.MED_CLINIC_ID = t_kc22.MED_CLINIC_ID WHERE t_kc21.IN_DIAG_DIS_CD = 'H72.575'
css
CREATE TABLE table_6409 ( "Feature" text, "GT Force" text, "Driving Force EX" text, "Driving Force Pro" text, "Driving Force GT" text, "G25 Racing Wheel" text, "G27 Racing Wheel" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Feature of gear...
SELECT "Driving Force GT" FROM table_6409 WHERE "Feature" = 'gear stick'
wikisql
CREATE TABLE table_41810 ( "Year" real, "Income" real, "Expenditure" real, "Surplus(Deficit)" text, "% GDP" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which Year has an Expenditure smaller than 41.3, and a % GDP of x, and an Income larger than 3...
SELECT SUM("Year") FROM table_41810 WHERE "Expenditure" < '41.3' AND "% GDP" = 'x' AND "Income" > '34.4'
wikisql
CREATE TABLE table_13985 ( "Club" text, "Wins" real, "Losses" real, "Draws" real, "Against" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Cobden has more than 1487 against and what average of losses?
SELECT AVG("Losses") FROM table_13985 WHERE "Club" = 'cobden' AND "Against" > '1487'
wikisql
CREATE TABLE table_13463790_2 ( height__ft_ VARCHAR, name VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- what's the height (ft) with name being 52-54 lime street
SELECT height__ft_ FROM table_13463790_2 WHERE name = "52-54 Lime Street"
sql_create_context
CREATE TABLE program_requirement ( program_id int, category varchar, min_credit int, additional_req varchar ) CREATE TABLE course ( course_id int, name varchar, department varchar, number varchar, credits varchar, advisory_requirement varchar, enforced_requirement varchar, ...
SELECT DISTINCT course.department, course.name, course.number FROM course, course_offering, semester WHERE course.course_id = course_offering.course_id AND course.department = 'EECS' AND semester.semester = 'WN' AND semester.semester_id = course_offering.semester AND semester.year = 2016 ORDER BY course.department
advising
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 prescriptions.formulary_drug_cd, prescriptions.route FROM prescriptions WHERE prescriptions.drug = "NS (Mini Bag Plus)"
mimicsql_data
CREATE TABLE labevents ( row_id number, subject_id number, hadm_id number, itemid number, charttime time, valuenum number, valueuom text ) CREATE TABLE outputevents ( row_id number, subject_id number, hadm_id number, icustay_id number, charttime time, itemid number, ...
SELECT d_items.label FROM d_items WHERE d_items.itemid IN (SELECT outputevents.itemid FROM outputevents WHERE outputevents.icustay_id IN (SELECT icustays.icustay_id FROM icustays WHERE icustays.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 31854)) AND DATETIME(outputevents.charttim...
mimic_iii
CREATE TABLE table_name_73 ( goals_for INTEGER, tied INTEGER ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What's the least amount of goals for a game that had a tied bigger than 15?
SELECT MIN(goals_for) FROM table_name_73 WHERE tied > 15
sql_create_context
CREATE TABLE table_name_3 ( number_of_bearers_2009 INTEGER, number_of_bearers_1971 VARCHAR, etymology VARCHAR, rank VARCHAR, type VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the sum of number of bearers in 2009 for a rank above 1, a ty...
SELECT SUM(number_of_bearers_2009) FROM table_name_3 WHERE rank > 1 AND type = "patronymic" AND etymology = "son of christian" AND number_of_bearers_1971 > 45.984
sql_create_context
CREATE TABLE table_22582 ( "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 "Avg. Finish" FROM table_22582 WHERE "Winnings" = '$1,400'
wikisql
CREATE TABLE table_16744 ( "Race Name" text, "Circuit" text, "Date" text, "Winning driver" text, "Constructor" text, "Report" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Did the I Brazilian Grand Prix have a report?
SELECT "Report" FROM table_16744 WHERE "Race Name" = 'I Brazilian Grand Prix'
wikisql
CREATE TABLE table_name_29 ( yards INTEGER, player VARCHAR, long VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Tell me the sum of yards for jason campbell and long less than 23
SELECT SUM(yards) FROM table_name_29 WHERE player = "jason campbell" AND long < 23
sql_create_context
CREATE TABLE diagnoses ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) CREATE TABLE demographic ( subject_id text, hadm_id text, name text, marital_status text, age text, dob text, gender text, language text, religion text, ...
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.admission_location = "EMERGENCY ROOM ADMIT" AND procedures.short_title = "Arthrocentesis"
mimicsql_data
CREATE TABLE table_25127 ( "Series #" real, "Season #" real, "Episode title" text, "Written by" text, "Directed by" text, "U.S. viewers (millions)" text, "Original air date" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Who is the written b...
SELECT "Written by" FROM table_25127 WHERE "Directed by" = 'Mark Worthington'
wikisql
CREATE TABLE table_26815674_1 ( wins VARCHAR, final_placing VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- When 24th is the final placing how many wins are there?
SELECT COUNT(wins) FROM table_26815674_1 WHERE final_placing = "24th"
sql_create_context
CREATE TABLE dorm ( dormid number, dorm_name text, student_capacity number, gender text ) CREATE TABLE student ( stuid number, lname text, fname text, age number, sex text, major number, advisor number, city_code text ) CREATE TABLE has_amenity ( dormid number, ...
SELECT COUNT(*) FROM dorm
spider
CREATE TABLE table_2581397_3 ( race VARCHAR, weight__kg_ VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- List the weight for 56.5 kilograms.
SELECT race FROM table_2581397_3 WHERE weight__kg_ = "56.5"
sql_create_context
CREATE TABLE PostHistoryTypes ( Id number, Name text ) CREATE TABLE ReviewTaskResults ( Id number, ReviewTaskId number, ReviewTaskResultTypeId number, CreationDate time, RejectionReasonId number, Comment text ) CREATE TABLE SuggestedEditVotes ( Id number, SuggestedEditId number...
SELECT 'site://u/' + CAST(u.Id AS TEXT) + '|' + u.DisplayName AS "user", u.Reputation, COUNT(p.Id) AS "post_count" FROM Users AS u LEFT JOIN Posts AS p ON (p.OwnerUserId = u.Id AND p.PostTypeId IN (1, 2)) WHERE u.Reputation > 15 GROUP BY u.Id, u.DisplayName, u.Reputation HAVING COUNT(p.Id) <= '##maxPosts:INT?10##' ORDE...
sede
CREATE TABLE table_1341423_40 ( first_elected INTEGER, results VARCHAR, district VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- what is the earliest first elected with the results re-elected in the district south carolina 3?
SELECT MAX(first_elected) FROM table_1341423_40 WHERE results = "Re-elected" AND district = "South Carolina 3"
sql_create_context
CREATE TABLE outputevents ( row_id number, subject_id number, hadm_id number, icustay_id number, charttime time, itemid number, value number ) CREATE TABLE patients ( row_id number, subject_id number, gender text, dob time, dod time ) CREATE TABLE procedures_icd ( r...
SELECT MIN(t1.c1) FROM (SELECT SUM(cost.cost) AS c1 FROM cost WHERE cost.hadm_id IN (SELECT prescriptions.hadm_id FROM prescriptions WHERE prescriptions.drug = 'hydroxyzine hcl') AND DATETIME(cost.chargetime) <= DATETIME(CURRENT_TIME(), '-3 year') GROUP BY cost.hadm_id) AS t1
mimic_iii
CREATE TABLE countries ( COUNTRY_ID varchar(2), COUNTRY_NAME varchar(40), REGION_ID decimal(10,0) ) CREATE TABLE regions ( REGION_ID decimal(5,0), REGION_NAME varchar(25) ) CREATE TABLE employees ( EMPLOYEE_ID decimal(6,0), FIRST_NAME varchar(20), LAST_NAME varchar(25), EMAIL varch...
SELECT HIRE_DATE, AVG(SALARY) FROM employees WHERE HIRE_DATE < '2002-06-21'
nvbench
CREATE TABLE table_64483 ( "interval name" text, "size (steps)" real, "size (cents)" real, "just ratio" text, "just (cents)" real, "error" text, "audio" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- what is the value of the audio with a jus...
SELECT "audio" FROM table_64483 WHERE "just ratio" = '21:20'
wikisql
CREATE TABLE jyjgzbb ( BGDH text, BGRQ time, CKZFWDX text, CKZFWSX number, CKZFWXX number, JCFF text, JCRGH text, JCRXM text, JCXMMC text, JCZBDM text, JCZBJGDL number, JCZBJGDW text, JCZBJGDX text, JCZBMC text, JLDW text, JYRQ time, JYZBLSH text, ...
SELECT jybgb.JYSQJGMC, jybgb.JYJGMC FROM jybgb WHERE jybgb.BGDH = '05899581944'
css
CREATE TABLE Manufacturers ( Code INTEGER, Name VARCHAR(255), Headquarter VARCHAR(255), Founder VARCHAR(255), Revenue REAL ) CREATE TABLE Products ( Code INTEGER, Name VARCHAR(255), Price DECIMAL, Manufacturer INTEGER ) -- Using valid SQLite, answer the following questions for the...
SELECT Founder, SUM(Price) FROM Products AS T1 JOIN Manufacturers AS T2 ON T1.Manufacturer = T2.Code GROUP BY Founder ORDER BY SUM(Price) DESC
nvbench
CREATE TABLE table_39683 ( "Storm name" text, "Dates active" text, "Max 1-min wind mph (km/h)" text, "Min. press. ( mbar )" text, "Damage (millions USD )" text, "Deaths" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- what date did the irwin stor...
SELECT "Dates active" FROM table_39683 WHERE "Storm name" = 'irwin'
wikisql
CREATE TABLE table_17080 ( "Player" text, "Position" text, "School" text, "Hometown" text, "College" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which school is in the hometown of Aledo, Texas?
SELECT "School" FROM table_17080 WHERE "Hometown" = 'Aledo, Texas'
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 t_kc22 WHERE t_kc22.t_kc21_MED_SER_ORG_NO = '2892777' GROUP BY t_kc22.SOC_SRT_DIRE_CD ORDER BY SUM(t_kc22.AMOUNT) DESC LIMIT 22
css
CREATE TABLE table_72430 ( "District" text, "Incumbent" text, "Party" text, "First elected" real, "Result" text, "Candidates" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- what's the district with candidates being harry lane englebright (r) uno...
SELECT "District" FROM table_72430 WHERE "Candidates" = 'Harry Lane Englebright (R) Unopposed'
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...
SELECT TIME_TO_STR(CreationDate, '%h') AS hour, CAST(SUM(AnswerCount) AS FLOAT) / COUNT(AnswerCount) AS avgAnswers FROM Posts WHERE PostTypeId = 1 GROUP BY TIME_TO_STR(CreationDate, '%h') ORDER BY hour
sede
CREATE TABLE diagnoses ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) CREATE TABLE demographic ( subject_id text, hadm_id text, name text, marital_status text, age text, dob text, gender text, language text, religion text, ...
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE demographic.expire_flag = "1" AND diagnoses.icd9_code = "317"
mimicsql_data
CREATE TABLE table_204_671 ( id number, "airing\ndate" text, "english title\n(chinese title)" text, "number of episodes" number, "main cast" text, "theme song (t)\nsub-theme song (st)" text, "genre" text, "notes" text, "official website" text ) -- Using valid SQLite, answer the fol...
SELECT COUNT(*) FROM table_204_671 WHERE "genre" = 'modern drama'
squall
CREATE TABLE table_27788 ( "Stage" real, "Winner" text, "General Classification" text, "Mountains Classification" text, "Sprint Classification" text, "Young Rider Classification" text, "Team Classification" text, "Aggressive Rider" text ) -- Using valid SQLite, answer the following que...
SELECT "Aggressive Rider" FROM table_27788 WHERE "Winner" = 'Luis León Sánchez'
wikisql
CREATE TABLE table_203_660 ( id number, "county" text, "obama%" text, "obama#" number, "mccain%" text, "mccain#" number, "total" number ) -- Using valid SQLite, answer the following questions for the tables provided above. -- what is the difference between the obama # and mccain # in bent...
SELECT ABS("obama#" - "mccain#") FROM table_203_660 WHERE "county" = 'benton'
squall
CREATE TABLE table_204_765 ( id number, "year" number, "location" text, "gold" text, "silver" text, "bronze" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- desideria ampon won the bronze medal the same year as who else ?
SELECT "bronze" FROM table_204_765 WHERE "bronze" <> 'desideria ampon' AND "year" = (SELECT "year" FROM table_204_765 WHERE "bronze" = 'desideria ampon')
squall
CREATE TABLE table_203_131 ( id number, "pos." number, "car #" number, "driver" text, "make" text, "team" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- who placed first in the race ?
SELECT "driver" FROM table_203_131 WHERE "pos." = 1
squall
CREATE TABLE table_name_75 ( wysiwyg_editor VARCHAR, image_attachment VARCHAR, calendar VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which WYSIWYG Editor has an Image attachment of yes, and a Calendar of plugin?
SELECT wysiwyg_editor FROM table_name_75 WHERE image_attachment = "yes" AND calendar = "plugin"
sql_create_context
CREATE TABLE table_7192 ( "Outcome" text, "Date" real, "Tournament" text, "Surface" text, "Partner" text, "Opponents in the final" text, "Score in the final" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What Opponents in the final had a ma...
SELECT "Opponents in the final" FROM table_7192 WHERE "Date" = '1984' AND "Score in the final" = '7–6, 6–1'
wikisql
CREATE TABLE table_32473 ( "Name" text, "Release date" text, "RTM build" text, "Current version" text, "Status support" text, "License" text, "Based on (kernel)" text, "Supported architectures" text, "OS type" text ) -- Using valid SQLite, answer the following questions for the tab...
SELECT "RTM build" FROM table_32473 WHERE "Name" = 'windows home server 2011'
wikisql
CREATE TABLE food_service ( meal_code text, meal_number int, compartment text, meal_description varchar ) CREATE TABLE flight_stop ( flight_id int, stop_number int, stop_days text, stop_airport text, arrival_time int, arrival_airline text, arrival_flight_number int, depa...
SELECT DISTINCT FLIGHT_0.flight_id FROM aircraft, airport_service AS AIRPORT_SERVICE_0, airport_service AS AIRPORT_SERVICE_1, airport_service AS AIRPORT_SERVICE_2, airport_service AS AIRPORT_SERVICE_3, city AS CITY_0, city AS CITY_1, city AS CITY_2, city AS CITY_3, date_day, days, equipment_sequence AS EQUIPMENT_SEQUEN...
atis
CREATE TABLE book_club ( book_club_id int, Year int, Author_or_Editor text, Book_Title text, Publisher text, Category text, Result text ) CREATE TABLE culture_company ( Company_name text, Type text, Incorporated_in text, Group_Equity_Shareholding real, book_club_id text,...
SELECT Category, COUNT(*) FROM book_club GROUP BY Category
nvbench
CREATE TABLE table_48348 ( "Year" real, "Award" text, "Category" text, "Nomination" text, "Result" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which award was won when the nomination was Senses Around?
SELECT "Award" FROM table_48348 WHERE "Result" = 'won' AND "Nomination" = 'senses around'
wikisql
CREATE TABLE table_9165 ( "Place" text, "Player" text, "Country" text, "Score" text, "To par" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What was the score of Bernhard Langer after 3 rounds?
SELECT "Score" FROM table_9165 WHERE "Player" = 'bernhard langer'
wikisql
CREATE TABLE table_name_3 ( chassis VARCHAR, entrant VARCHAR, driver VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- what is the chassis when the entrant is mild seven renault f1 team and the driver is jarno trulli?
SELECT chassis FROM table_name_3 WHERE entrant = "mild seven renault f1 team" AND driver = "jarno trulli"
sql_create_context
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.PERSON_NM, t_kc21.PERSON_SEX, t_kc21.PERSON_AGE, t_kc21.IDENTITY_CARD FROM t_kc21 WHERE t_kc21.MED_CLINIC_ID = '67596445659'
css
CREATE TABLE table_8918 ( "Place" text, "Player" text, "Country" text, "Score" text, "To par" text, "Money ( $ )" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which To par has a Score of 67-72-71-75=285?
SELECT "To par" FROM table_8918 WHERE "Score" = '67-72-71-75=285'
wikisql
CREATE TABLE table_name_81 ( format VARCHAR, region VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What was the format for the region of europe?
SELECT format FROM table_name_81 WHERE region = "europe"
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...
SELECT * FROM t_kc21 WHERE t_kc21.PERSON_NM = '姜云英' AND t_kc21.MED_SER_ORG_NO = '4714216' AND NOT t_kc21.MED_ORG_DEPT_NM LIKE '%放射治疗%'
css
CREATE TABLE jybgb_jyjgzbb ( JYZBLSH number, YLJGDM text, jyjgzbb_id number ) CREATE TABLE hz_info ( KH text, KLX number, RYBH text, YLJGDM text ) CREATE TABLE mzjzjlb ( HXPLC number, HZXM text, JLSJ time, JZJSSJ time, JZKSBM text, JZKSMC text, JZKSRQ time, ...
SELECT jybgb.JZLSH FROM jybgb WHERE jybgb.BGDH = '60691424102'
css
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 FROM t_kc22 WHERE t_kc21_t_kc22.MED_CLINIC_ID IN (SELECT t_kc21.MED_CLINIC_ID FROM t_kc21 WHERE t_kc21.PERSON_ID = '92724967' AND t_kc21.MED_SER_ORG_NO = '4295408' AND t_kc21.IN_HOSP_DATE BETWEEN '2010-12-27' AND '2021-12-06')
css
CREATE TABLE table_name_1 ( location_attendance VARCHAR, record VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the location/attendance of the game with a 3-1 record?
SELECT location_attendance FROM table_name_1 WHERE record = "3-1"
sql_create_context
CREATE TABLE cost ( costid number, uniquepid text, patienthealthsystemstayid number, eventtype text, eventid number, chargetime time, cost number ) CREATE TABLE allergy ( allergyid number, patientunitstayid number, drugname text, allergyname text, allergytime time ) CRE...
SELECT t1.treatmentname FROM (SELECT treatment.treatmentname, COUNT(treatment.treatmenttime) AS c1 FROM treatment WHERE treatment.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid ...
eicu
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 AVG(MED_AMOUT) FROM t_kc21 WHERE MED_ORG_DEPT_NM = '胃肠外科' AND IN_HOSP_DATE BETWEEN '2003-02-04' AND '2018-10-15' AND IN_DIAG_DIS_NM = '腔隙性脑梗死' AND CLINIC_TYPE = '住院'
css
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, insurance text, language text, marital_status text, ethnicity text, age number ) CREATE ...
SELECT COUNT(*) FROM outputevents WHERE outputevents.icustay_id IN (SELECT icustays.icustay_id FROM icustays WHERE icustays.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 71558)) AND outputevents.itemid IN (SELECT d_items.itemid FROM d_items WHERE d_items.label = 'duodenostomy tube'...
mimic_iii
CREATE TABLE table_name_71 ( date INTEGER, catalog VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the total number of Dates during which the Catalog nebbc003 was given?
SELECT SUM(date) FROM table_name_71 WHERE catalog = "nebbc003"
sql_create_context
CREATE TABLE table_50662 ( "Team 1" text, "Agg." text, "Team 2" text, "1st leg" text, "2nd leg" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- WHAT TEAM 1 HAS A 1st leg of 1 1, and a 2nd leg of 1 3?
SELECT "Team 1" FROM table_50662 WHERE "1st leg" = '1–1' AND "2nd leg" = '1–3'
wikisql
CREATE TABLE jybgb_jyjgzbb ( JYZBLSH number, YLJGDM text, jyjgzbb_id number ) CREATE TABLE hz_info ( KH text, KLX number, RYBH text, YLJGDM text ) CREATE TABLE jybgb ( BBCJBW text, BBDM text, BBMC text, BBZT number, BGDH text, BGJGDM text, BGJGMC text, BGRGH...
SELECT jybgb.BGJGDM, jybgb.BGJGMC FROM jybgb WHERE jybgb.BGDH = '36272042053'
css
CREATE TABLE table_name_51 ( hpfs VARCHAR, refs VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which HPFS has a no for ReFS?
SELECT hpfs FROM table_name_51 WHERE refs = "no"
sql_create_context