instruction
stringlengths
151
7.46k
output
stringlengths
2
4.44k
source
stringclasses
26 values
CREATE TABLE table_19630743_2 ( no VARCHAR, runner_s__up VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the total number of John Merrick as a runner up?
SELECT COUNT(no) FROM table_19630743_2 WHERE runner_s__up = "John Merrick"
sql_create_context
CREATE TABLE table_203_61 ( id number, "rank" number, "nation" text, "gold" number, "silver" number, "bronze" number, "total" number ) -- Using valid SQLite, answer the following questions for the tables provided above. -- which 4 countries were scored last , with only 1 bronze medal each...
SELECT "nation" FROM table_203_61 ORDER BY "rank" DESC LIMIT 4
squall
CREATE TABLE Marketing_Regions ( Marketing_Region_Code CHAR(15), Marketing_Region_Name VARCHAR(255), Marketing_Region_Descriptrion VARCHAR(255), Other_Details VARCHAR(255) ) CREATE TABLE Bookings_Services ( Order_ID INTEGER, Product_ID INTEGER ) CREATE TABLE Bookings ( Booking_ID INTEGER, ...
SELECT Planned_Delivery_Date, COUNT(Planned_Delivery_Date) FROM Bookings ORDER BY Planned_Delivery_Date DESC
nvbench
CREATE TABLE SuggestedEdits ( Id number, PostId number, CreationDate time, ApprovalDate time, RejectionDate time, OwnerUserId number, Comment text, Text text, Title text, Tags text, RevisionGUID other ) CREATE TABLE Users ( Id number, Reputation number, CreationD...
SELECT Score, CASE WHEN ClosedDate IS NULL THEN 'Y' ELSE 'Er' END AS "closed?", Id AS "post_link" FROM Posts WHERE PostTypeId = 1 AND (NOT ClosedDate IS NULL OR Score < -3) ORDER BY Score LIMIT 500
sede
CREATE TABLE company ( main_industry VARCHAR, market_value INTEGER ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Show all main industry and total market value in each industry.
SELECT main_industry, SUM(market_value) FROM company GROUP BY main_industry
sql_create_context
CREATE TABLE zyjzjlb ( YLJGDM text, JZLSH text, MZJZLSH text, KH text, KLX number, HZXM text, WDBZ number, RYDJSJ time, RYTJDM number, RYTJMC text, JZKSDM text, JZKSMC text, RZBQDM text, RZBQMC text, RYCWH text, CYKSDM text, CYKSMC text, CYBQDM tex...
SELECT SBBM, YQBH, YQMC FROM jyjgzbb WHERE JYZBLSH = '08849932571'
css
CREATE TABLE mzjzjlb ( HXPLC number, HZXM text, JLSJ time, JZJSSJ time, JZKSBM text, JZKSMC text, JZKSRQ time, JZLSH text, JZZDBM text, JZZDSM text, JZZTDM number, JZZTMC text, KH text, KLX number, MJZH text, ML number, MZZYZDZZBM text, MZZYZDZZMC ...
SELECT jybgb.JZLSH FROM jybgb WHERE jybgb.BGDH = '39027691440'
css
CREATE TABLE table_20065 ( "Name" text, "Year" real, "Landfall" text, "NHC Advisory Number" text, "V(mph)" real, "R(miles)" real, "Saffir-Simpson Category" real, "CHI" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the maximum nu...
SELECT MAX("Saffir-Simpson Category") FROM table_20065
wikisql
CREATE TABLE table_80207 ( "Name" text, "Period" text, "League" real, "FA Cup" real, "League Cup" real, "Other" real, "Total" real, "Apps" real, "Goal Ratio" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What's the lowest Total that...
SELECT MIN("Total") FROM table_80207 WHERE "FA Cup" > '10' AND "Name" = 'arthur chandler' AND "League Cup" > '0'
wikisql
CREATE TABLE code_description ( code varchar, description text ) CREATE TABLE food_service ( meal_code text, meal_number int, compartment text, meal_description varchar ) CREATE TABLE dual_carrier ( main_airline varchar, low_flight_number int, high_flight_number int, dual_airli...
SELECT DISTINCT fare_basis_code FROM fare_basis WHERE fare_basis_code = 'FN'
atis
CREATE TABLE university ( School_ID int, School text, Location text, Founded real, Affiliation text, Enrollment real, Nickname text, Primary_conference text ) CREATE TABLE basketball_match ( Team_ID int, School_ID int, Team_Name text, ACC_Regular_Season text, ACC_Per...
SELECT All_Neutral, All_Games_Percent FROM basketball_match ORDER BY All_Neutral DESC
nvbench
CREATE TABLE table_17024 ( "Ships name" text, "Date entered service" text, "Date withdrawn" text, "Tonnage" real, "Type of Ship" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- what's the date entered service with ships name koningin wilhelmina
SELECT "Date entered service" FROM table_17024 WHERE "Ships name" = 'Koningin Wilhelmina'
wikisql
CREATE TABLE table_59973 ( "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 is the team that played away team watford?
SELECT "Home team" FROM table_59973 WHERE "Away team" = 'watford'
wikisql
CREATE TABLE table_21501511_1 ( order__number VARCHAR, week__number VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What order did Lambert perform in the top 11?
SELECT order__number FROM table_21501511_1 WHERE week__number = "Top 11"
sql_create_context
CREATE TABLE table_train_51 ( "id" int, "active_infection" bool, "procalcitonin" int, "oliguria" bool, "receiving_vasopressor" bool, "metabolic_acidosis" bool, "colonized_with_a_multi_drug_resistant_organism" bool, "hypoperfusion" bool, "central_venous_oxygen_saturation_scvo2" int, ...
SELECT * FROM table_train_51 WHERE hypoperfusion = 1 OR lactate > 2 OR central_venous_oxygen_saturation_scvo2 < 70 OR central_venous_oxygen_saturation_scvo2 > 85 OR metabolic_acidosis = 1 OR oliguria = 1 OR venous_to_arterial_co2_gap_dco2 > 6
criteria2sql
CREATE TABLE Products ( Code INTEGER, Name VARCHAR(255), Price DECIMAL, Manufacturer INTEGER ) CREATE TABLE Manufacturers ( Code INTEGER, Name VARCHAR(255), Headquarter VARCHAR(255), Founder VARCHAR(255), Revenue REAL ) -- Using valid SQLite, answer the following questions for the...
SELECT T1.Code, T1.Manufacturer FROM Products AS T1 JOIN Manufacturers AS T2 ON T1.Manufacturer = T2.Code
nvbench
CREATE TABLE table_70186 ( "Week" real, "Issue Date" text, "Artist" text, "Single" text, "Download" text, "Title" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the title of the July 2 song that is downloaded as Crazy Frog?
SELECT "Title" FROM table_70186 WHERE "Download" = 'crazy frog' AND "Issue Date" = 'july 2'
wikisql
CREATE TABLE table_18703133_6 ( wins VARCHAR, points VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- How many wins have 24 points?
SELECT wins FROM table_18703133_6 WHERE points = 24
sql_create_context
CREATE TABLE table_17274 ( "Series #" real, "Season #" real, "Title" text, "Directed by" text, "Written by" text, "Musical guest and song" text, "Original air date" text, "Production code" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- W...
SELECT MIN("Season #") FROM table_17274 WHERE "Production code" = 'K1505'
wikisql
CREATE TABLE table_71906 ( "Year" real, "Men's singles" text, "Women's singles" text, "Men's doubles" text, "Women's doubles" text, "Mixed doubles" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Who played in the Mixed Doubles when Zhu Lin playe...
SELECT "Mixed doubles" FROM table_71906 WHERE "Women's singles" = 'zhu lin'
wikisql
CREATE TABLE table_name_16 ( transfer_window VARCHAR, name VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the transfer period for habarugira?
SELECT transfer_window FROM table_name_16 WHERE name = "habarugira"
sql_create_context
CREATE TABLE Products ( Code INTEGER, Name VARCHAR(255), Price DECIMAL, Manufacturer INTEGER ) CREATE TABLE Manufacturers ( Code INTEGER, Name VARCHAR(255), Headquarter VARCHAR(255), Founder VARCHAR(255), Revenue REAL ) -- Using valid SQLite, answer the following questions for the...
SELECT T1.Name, T1.Price FROM Products AS T1 JOIN Manufacturers AS T2 ON T1.Manufacturer = T2.Code GROUP BY Headquarter, T1.Name ORDER BY T1.Name DESC
nvbench
CREATE TABLE offering_instructor ( offering_instructor_id int, offering_id int, instructor_id int ) CREATE TABLE comment_instructor ( instructor_id int, student_id int, score int, comment_text varchar ) CREATE TABLE gsi ( course_offering_id int, student_id int ) CREATE TABLE cours...
SELECT DISTINCT course.department, course.name, course.number FROM course, course_offering, program_course, semester WHERE course_offering.end_time <= '12:00:00' AND course.course_id = course_offering.course_id AND program_course.category LIKE '%ULCS%' AND program_course.course_id = course.course_id AND semester.semest...
advising
CREATE TABLE Products ( Code INTEGER, Name VARCHAR(255), Price DECIMAL, Manufacturer INTEGER ) CREATE TABLE Manufacturers ( Code INTEGER, Name VARCHAR(255), Headquarter VARCHAR(255), Founder VARCHAR(255), Revenue REAL ) -- Using valid SQLite, answer the following questions for the...
SELECT T1.Name, T1.Code FROM Products AS T1 JOIN Manufacturers AS T2 ON T1.Manufacturer = T2.Code GROUP BY T1.Name ORDER BY T1.Name
nvbench
CREATE TABLE table_name_42 ( kk___5 VARCHAR, kk___1 VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is KK - 5 if KK - 1 is 1,067?
SELECT kk___5 FROM table_name_42 WHERE kk___1 = "1,067"
sql_create_context
CREATE TABLE t_kc21 ( MED_CLINIC_ID text, OVERALL_CD_ORG text, OVERALL_CD_PERSON text, COMP_ID text, PERSON_ID text, PERSON_NM text, IDENTITY_CARD text, SOC_SRT_CARD text, PERSON_SEX number, PERSON_AGE number, IN_HOSP_DATE time, OUT_HOSP_DATE time, DIFF_PLACE_FLG numb...
SELECT DIRE_TYPE FROM t_kc22 WHERE MED_CLINIC_ID = '55518683967' AND SOC_SRT_DIRE_CD = '679983-a'
css
CREATE TABLE table_11460 ( "Tournament" text, "2006" text, "2007" text, "2008" text, "2009" text, "2010" text, "2011" text, "2012" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the 2012 value with an A value in 2007 and A value ...
SELECT "2012" FROM table_11460 WHERE "2007" = 'a' AND "2010" = 'a' AND "Tournament" = 'canada masters'
wikisql
CREATE TABLE table_74260 ( "Year" real, "Round" real, "Winner" text, "Hawthorn score" text, "St Kilda score" text, "Attendance" real, "Venue" text, "Silk-Miller Medallist" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Who is the winner ...
SELECT "Winner" FROM table_74260 WHERE "St Kilda score" = '13.10.88'
wikisql
CREATE TABLE course_prerequisite ( pre_course_id int, course_id int ) CREATE TABLE jobs ( job_id int, job_title varchar, description varchar, requirement varchar, city varchar, state varchar, country varchar, zip int ) CREATE TABLE comment_instructor ( instructor_id int, ...
SELECT DISTINCT course.department, course.name, course.number FROM course, program, program_course WHERE course.department LIKE '%NEAREAST%' AND program_course.category LIKE '%MDE%' AND program_course.course_id = course.course_id AND program.name LIKE '%CS-LSA%' AND program.program_id = program_course.program_id
advising
CREATE TABLE table_28201906_1 ( drawn INTEGER ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the lowest number of drawn games by a team?
SELECT MIN(drawn) FROM table_28201906_1
sql_create_context
CREATE TABLE table_name_87 ( opponent VARCHAR, attendance VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Who was the opponent with attendance at 64,002?
SELECT opponent FROM table_name_87 WHERE attendance = "64,002"
sql_create_context
CREATE TABLE table_35022 ( "Game" real, "March" real, "Opponent" text, "Score" text, "Record" text, "Points" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Points smaller than 96, and a Record of 43 16 8 belongs to what game?
SELECT "Game" FROM table_35022 WHERE "Points" < '96' AND "Record" = '43–16–8'
wikisql
CREATE TABLE match ( Match_ID int, Date text, Venue text, Score text, Result text, Competition text ) CREATE TABLE hosting_city ( Year int, Match_ID int, Host_City text ) CREATE TABLE city ( City_ID int, City text, Hanzi text, Hanyu_Pinyin text, Regional_Populat...
SELECT Competition, COUNT(*) FROM match GROUP BY Competition ORDER BY COUNT(*)
nvbench
CREATE TABLE table_40613 ( "Name" text, "Novelty" text, "Status" text, "Authors" text, "Location" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is Name, when Location is Tanzania, and when Novelty is Gen Nov?
SELECT "Name" FROM table_40613 WHERE "Location" = 'tanzania' AND "Novelty" = 'gen nov'
wikisql
CREATE TABLE table_name_35 ( release_date VARCHAR, director VARCHAR, title VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- When was Tree Cornered Tweety, directed by Friz Freleng, released?
SELECT release_date FROM table_name_35 WHERE director = "friz freleng" AND title = "tree cornered tweety"
sql_create_context
CREATE TABLE table_name_67 ( opponent VARCHAR, score VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Who did they lose to 3-17?
SELECT opponent FROM table_name_67 WHERE score = "3-17"
sql_create_context
CREATE TABLE d_items ( row_id number, itemid number, label text, linksto text ) CREATE TABLE admissions ( row_id number, subject_id number, hadm_id number, admittime time, dischtime time, admission_type text, admission_location text, discharge_location text, insuranc...
SELECT COUNT(*) > 0 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 = 739)) AND chartevents.itemid IN (SELECT d_items.itemid FROM d_items WHERE d_items.label = 'arterial bp mean' A...
mimic_iii
CREATE TABLE table_40393 ( "Couple" text, "Style" text, "Music" text, "Choreographer(s)" text, "Results" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Who was the choreographer for the dance style of Jazz?
SELECT "Choreographer(s)" FROM table_40393 WHERE "Style" = 'jazz'
wikisql
CREATE TABLE t_kc21 ( MED_CLINIC_ID text, OVERALL_CD_ORG text, OVERALL_CD_PERSON text, COMP_ID text, PERSON_ID text, PERSON_NM text, IDENTITY_CARD text, SOC_SRT_CARD text, PERSON_SEX number, PERSON_AGE number, IN_HOSP_DATE time, OUT_HOSP_DATE time, DIFF_PLACE_FLG numb...
SELECT OUT_DIAG_DIS_CD, OUT_DIAG_DIS_NM FROM t_kc21 WHERE PERSON_NM = '葛映波' AND MED_CLINIC_ID IN (SELECT MED_CLINIC_ID FROM t_kc24 WHERE MED_AMOUT >= 6981.35)
css
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 ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) CREATE TABLE prescriptions...
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.dob_year < "2087" AND lab.fluid = "Other Body Fluid"
mimicsql_data
CREATE TABLE table_204_448 ( id number, "team" text, "winners" number, "runners-up" number, "years won" text, "years runner-up" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- what 's the total of wins does the manchester united have ?
SELECT "winners" FROM table_204_448 WHERE "team" = 'manchester united'
squall
CREATE TABLE table_2821 ( "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. -- Name th...
SELECT "High rebounds" FROM table_2821 WHERE "Record" = '10-19'
wikisql
CREATE TABLE table_name_26 ( week VARCHAR, attendance VARCHAR, opponent VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What week is the opponent the Indianapolis Colts with an attendance of 68,932?
SELECT COUNT(week) FROM table_name_26 WHERE attendance = "68,932" AND opponent = "indianapolis colts"
sql_create_context
CREATE TABLE course_offering ( offering_id int, course_id int, semester int, section_number int, start_time time, end_time time, monday varchar, tuesday varchar, wednesday varchar, thursday varchar, friday varchar, saturday varchar, sunday varchar, has_final_proje...
SELECT DISTINCT COURSE_0.department, COURSE_0.name, COURSE_0.number FROM course AS COURSE_0, course AS COURSE_1, course_prerequisite WHERE COURSE_0.course_id = course_prerequisite.pre_course_id AND NOT COURSE_0.course_id IN (SELECT STUDENT_RECORDalias0.course_id FROM student_record AS STUDENT_RECORDalias0 WHERE STUDENT...
advising
CREATE TABLE Financial_Transactions ( transaction_id INTEGER, account_id INTEGER, invoice_number INTEGER, transaction_type VARCHAR(15), transaction_date DATETIME, transaction_amount DECIMAL(19,4), transaction_comment VARCHAR(255), other_transaction_details VARCHAR(255) ) CREATE TABLE Or...
SELECT invoice_number, COUNT(*) FROM Financial_Transactions GROUP BY invoice_number
nvbench
CREATE TABLE table_9437 ( "Institution" text, "Location" text, "Founded" real, "Affiliation" text, "Enrollment" real, "Team Nickname" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- what is the average enrollment when the team nickname is wolveri...
SELECT AVG("Enrollment") FROM table_9437 WHERE "Team Nickname" = 'wolverines' AND "Founded" > '1817'
wikisql
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 PostHi...
SELECT COUNT(*) FROM Posts WHERE Posts.ViewCount > 100000 AND Posts.ViewCount < 500000
sede
CREATE TABLE table_44681 ( "Game" real, "Date" text, "Opponent" text, "Score" text, "Location" text, "Attendance" real, "Record" text, "Points" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the total number of Game, when Attenda...
SELECT COUNT("Game") FROM table_44681 WHERE "Attendance" = '18,568'
wikisql
CREATE TABLE table_27873 ( "Settlement" text, "Cyrillic Name Other Names" text, "Type" text, "Population (2011)" real, "Largest ethnic group (2002)" text, "Dominant religion (2002)" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- How many entries...
SELECT COUNT("Type") FROM table_27873 WHERE "Cyrillic Name Other Names" = 'Падина (Slovak: Padina)'
wikisql
CREATE TABLE labevents ( row_id number, subject_id number, hadm_id number, itemid number, charttime time, valuenum number, valueuom text ) CREATE TABLE prescriptions ( row_id number, subject_id number, hadm_id number, startdate time, enddate time, drug text, dose...
SELECT COUNT(*) FROM prescriptions WHERE prescriptions.drug = 'acetaminophen-caff-butalbital' AND DATETIME(prescriptions.startdate) >= DATETIME(CURRENT_TIME(), '-5 year')
mimic_iii
CREATE TABLE Participants_in_Events ( Event_ID INTEGER, Participant_ID INTEGER ) CREATE TABLE Services ( Service_ID INTEGER, Service_Type_Code CHAR(15) ) CREATE TABLE Participants ( Participant_ID INTEGER, Participant_Type_Code CHAR(15), Participant_Details VARCHAR(255) ) CREATE TABLE Eve...
SELECT Event_Details, COUNT(Event_Details) FROM Events AS T1 JOIN Services AS T2 ON T1.Service_ID = T2.Service_ID WHERE T2.Service_Type_Code = 'Marriage' GROUP BY Event_Details ORDER BY COUNT(Event_Details) DESC
nvbench
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 diagnoses ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) C...
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 = "Hematoma complic proc" AND prescriptions.route = "BUCCAL"
mimicsql_data
CREATE TABLE jybgb ( YLJGDM text, YLJGDM_MZJZJLB text, YLJGDM_ZYJZJLB text, BGDH text, BGRQ time, JYLX number, JZLSH text, JZLSH_MZJZJLB text, JZLSH_ZYJZJLB text, JZLX number, KSBM text, KSMC text, SQRGH text, SQRXM text, BGRGH text, BGRXM text, SHRGH ...
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 = '2型糖尿病' AND jyjgzbb.JCZBMC = '游离甲状腺素'
css
CREATE TABLE intakeoutput ( intakeoutputid number, patientunitstayid number, cellpath text, celllabel text, cellvaluenumeric number, intakeoutputtime time ) CREATE TABLE treatment ( treatmentid number, patientunitstayid number, treatmentname text, treatmenttime time ) CREATE TA...
SELECT intakeoutput.celllabel FROM intakeoutput WHERE intakeoutput.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '027-151154')) AND intakeoutput.cellpath LIKE '%intake%' AND ...
eicu
CREATE TABLE table_name_70 ( week VARCHAR, tournament VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- In what Week is the Rome Tournament?
SELECT week FROM table_name_70 WHERE tournament = "rome"
sql_create_context
CREATE TABLE table_name_42 ( mountains_classification VARCHAR, general_classification VARCHAR, stage VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which Mountains classification has a General classification of egoi mart nez, and a Stage of 9?
SELECT mountains_classification FROM table_name_42 WHERE general_classification = "egoi martínez" AND stage = "9"
sql_create_context
CREATE TABLE table_18904831_7 ( high_points VARCHAR, location VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What were the high points for the game played at the MCI Center?
SELECT COUNT(high_points) FROM table_18904831_7 WHERE location = "MCI Center"
sql_create_context
CREATE TABLE table_61968 ( "Position" real, "Number" real, "Name" text, "Team" text, "Points" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Who had 1344 points?
SELECT "Name" FROM table_61968 WHERE "Points" = '1344'
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 JCXMMC, JCZBDM, JCZBMC, JCFF FROM jyjgzbb WHERE JYZBLSH = '79035647042'
css
CREATE TABLE table_52512 ( "MLB season" text, "Team season" text, "League" text, "Division" text, "Finish" text, "Wins" text, "Losses" text, "Win %" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which division of the Brewers had a 5th p...
SELECT "Division" FROM table_52512 WHERE "Finish" = '5th' AND "Losses" = '87'
wikisql
CREATE TABLE table_33694 ( "Week" real, "Date" text, "Opponent" text, "Result" text, "TV Time" text, "Attendance" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What was the average attendance when the opponent was at Philadelphia Eagles and the...
SELECT AVG("Attendance") FROM table_33694 WHERE "Week" > '6' AND "Opponent" = 'at philadelphia eagles'
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 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 jyb...
css
CREATE TABLE table_28857 ( "District" text, "Incumbent" text, "Party" text, "First elected" text, "Result" text, "Candidates" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Who was the incumbent when the candidates were John banks (am) 52.2% sam...
SELECT "Incumbent" FROM table_28857 WHERE "Candidates" = 'John Banks (AM) 52.2% Samuel Power (J) 47.8%'
wikisql
CREATE TABLE table_name_62 ( score VARCHAR, money___$__ VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What's the score for $22,500?
SELECT score FROM table_name_62 WHERE money___$__ = "22,500"
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.BBCJBW FROM person_info JOIN hz_info JOIN mzjzjlb JOIN jybgb JOIN hz_info_mzjzjlb ON person_info.RYBH = hz_info.RYBH AND hz_info.YLJGDM = hz_info_mzjzjlb.YLJGDM AND hz_info.KH = mzjzjlb.KH AND hz_info.KLX = mzjzjlb.KLX AND hz_info_mzjzjlb.YLJGDM = jybgb.YLJGDM_MZJZJLB AND mzjzjlb.JZLSH = jybgb.JZLSH_MZJZJL...
css
CREATE TABLE user ( uid int, user_id varchar, name varchar ) CREATE TABLE neighborhood ( id int, business_id varchar, neighborhood_name varchar ) CREATE TABLE category ( id int, business_id varchar, category_name varchar ) CREATE TABLE tip ( tip_id int, business_id varchar...
SELECT neighborhood.neighborhood_name FROM business, category AS CATEGORY_0, category AS CATEGORY_1, neighborhood WHERE business.city = 'Madison' AND business.rating < 2.5 AND CATEGORY_0.business_id = business.business_id AND CATEGORY_0.category_name = 'Italian' AND CATEGORY_1.business_id = business.business_id AND CAT...
yelp
CREATE TABLE table_70105 ( "Year" text, "Men's singles" text, "Women's singles" text, "Men's doubles" text, "Women's doubles" text, "Mixed doubles" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Who won Mixed Doubles the year that Marija Ulitina...
SELECT "Mixed doubles" FROM table_70105 WHERE "Women's singles" = 'marija ulitina'
wikisql
CREATE TABLE table_name_33 ( lineup VARCHAR, match VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What was her place in the lineup on match 2?
SELECT lineup FROM table_name_33 WHERE match = "2"
sql_create_context
CREATE TABLE table_42642 ( "Date" text, "Tournament" text, "Location" text, "Home team" text, "Score" text, "Away team" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What was the location of the home game for Japan?
SELECT "Location" FROM table_42642 WHERE "Home team" = 'japan'
wikisql
CREATE TABLE table_204_652 ( id number, "title" text, "year" number, "director" text, "country" text, "genre" text, "notes" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- how many crime thrillers were released in this category in this year ?...
SELECT COUNT(*) FROM table_204_652 WHERE "genre" = 'crime thriller'
squall
CREATE TABLE table_26218 ( "Song 1 title" text, "Artist 1" text, "Song 2 title" text, "Artist 2" text, "Mix artist" text, "Guitar part?" text, "Level" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which level has wale as artist 1?
SELECT "Level" FROM table_26218 WHERE "Artist 1" = 'Wale'
wikisql
CREATE TABLE table_1341453_32 ( party VARCHAR, incumbent VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the party of the district incumbent Jim Saxton?
SELECT party FROM table_1341453_32 WHERE incumbent = "Jim Saxton"
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 diagnoses ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) CREATE TABLE prescriptions...
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.discharge_location = "HOME HEALTH CARE" AND procedures.short_title = "Hemodialysis"
mimicsql_data
CREATE TABLE list ( lastname text, firstname text, grade number, classroom number ) CREATE TABLE teachers ( lastname text, firstname text, classroom number ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Find the first names of the teachers that ...
SELECT DISTINCT T2.firstname FROM list AS T1 JOIN teachers AS T2 ON T1.classroom = T2.classroom WHERE grade = 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 lab ( subject_id text, hadm_id text, itemid text, charttime text, flag text, value_unit text,...
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.admission_location = "TRANSFER FROM HOSP/EXTRAM" AND procedures.long_title = "Excision or destruction of other lesion or tissue of heart, endovascular approach"
mimicsql_data
CREATE TABLE table_name_58 ( grid INTEGER, constructor VARCHAR, laps VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- When the laps are 31 and the constructor was honda, what's the sum of all grid values?
SELECT SUM(grid) FROM table_name_58 WHERE constructor = "honda" AND laps = 31
sql_create_context
CREATE TABLE table_name_6 ( score VARCHAR, tie_no VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What was the score for a no. 21 tie?
SELECT score FROM table_name_6 WHERE tie_no = "21"
sql_create_context
CREATE TABLE table_41122 ( "Stage (Winner)" text, "General Classification" text, "Young Classification" text, "Mountains Classification" text, "Sprint Classification" text, "Team Classification" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Who...
SELECT "Stage (Winner)" FROM table_41122 WHERE "Sprint Classification" = 'mark cavendish' AND "Team Classification" = 'garmin-chipotle-h30' AND "Young Classification" = 'mark cavendish'
wikisql
CREATE TABLE table_12043148_2 ( glos_ VARCHAR, _wilts VARCHAR, bristol_ VARCHAR, _somerset VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- what is the glos & wilts where the bristol & somerset is lansdown?
SELECT glos_ & _wilts FROM table_12043148_2 WHERE bristol_ & _somerset = "Lansdown"
sql_create_context
CREATE TABLE basketball_match ( Team_ID int, School_ID int, Team_Name text, ACC_Regular_Season text, ACC_Percent text, ACC_Home text, ACC_Road text, All_Games text, All_Games_Percent int, All_Home text, All_Road text, All_Neutral text ) CREATE TABLE university ( Scho...
SELECT Team_Name, Team_ID FROM basketball_match
nvbench
CREATE TABLE table_19061741_1 ( status VARCHAR, name VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- When nel rapiz is the name what is the status?
SELECT status FROM table_19061741_1 WHERE name = "Nel Rapiz"
sql_create_context
CREATE TABLE table_54806 ( "Frequency" text, "Call sign" text, "Name" text, "Format" text, "Owner" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which owner has the call sign of KDSU?
SELECT "Name" FROM table_54806 WHERE "Call sign" = 'kdsu'
wikisql
CREATE TABLE table_69936 ( "Res." text, "Record" text, "Opponent" text, "Method" text, "Event" text, "Round" text, "Time" text, "Location" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which record has tko (strikes) as the method, and d...
SELECT "Record" FROM table_69936 WHERE "Method" = 'tko (strikes)' AND "Opponent" = 'daan kooiman'
wikisql
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 COUNT(*) > 0 FROM diagnosis WHERE diagnosis.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '011-20295')) AND diagnosis.diagnosisname = 'seizures - new onset' AND DATETI...
eicu
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 COUNT(*) FROM zyjzjlb JOIN hz_info_zyjzjlb JOIN hz_info ON hz_info_zyjzjlb.JZLSH = zyjzjlb.JZLSH AND hz_info_zyjzjlb.YLJGDM = hz_info_zyjzjlb.YLJGDM AND hz_info_zyjzjlb.JZLSH = zyjzjlb.JZLSH AND hz_info_zyjzjlb.zyjzjlb_id = zyjzjlb.zyjzjlb_id AND hz_info_zyjzjlb.YLJGDM = hz_info.YLJGDM WHERE hz_info.YLJGDM = '64...
css
CREATE TABLE table_28348757_6 ( written_by VARCHAR, production_code VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Who wrote the episode with the code xle05012?
SELECT written_by FROM table_28348757_6 WHERE production_code = "XLE05012"
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 lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.religion = "CHRISTIAN SCIENTIST" AND lab.itemid = "50811"
mimicsql_data
CREATE TABLE musical ( Musical_ID int, Name text, Year int, Award text, Category text, Nominee text, Result text ) CREATE TABLE actor ( Actor_ID int, Name text, Musical_ID int, Character text, Duration text, age int ) -- Using valid SQLite, answer the following que...
SELECT Duration, COUNT(Duration) FROM actor GROUP BY Duration ORDER BY Duration
nvbench
CREATE TABLE table_17246160_1 ( wins VARCHAR, series VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- How many wins did the player have in the Formula BMW World Final?
SELECT wins FROM table_17246160_1 WHERE series = "Formula BMW World Final"
sql_create_context
CREATE TABLE jobs ( job_id int, job_title varchar, description varchar, requirement varchar, city varchar, state varchar, country varchar, zip int ) CREATE TABLE course_tags_count ( course_id int, clear_grading int, pop_quiz int, group_projects int, inspirational int...
SELECT DISTINCT course_offering.end_time, course_offering.section_number, course_offering.start_time FROM course, course_offering, semester WHERE course_offering.start_time > '11:00' AND course.course_id = course_offering.course_id AND course.department = 'ECON' AND course.number = 183 AND semester.semester = 'WN' AND ...
advising
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 lab ( labid numb...
SELECT vitalperiodic.observationtime FROM vitalperiodic WHERE vitalperiodic.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '035-2205')) AND NOT vitalperiodic.sao2 IS NULL AND ...
eicu
CREATE TABLE table_23871 ( "Game" real, "Date" text, "Opponent" text, "Result" text, "Tar Heels points" real, "Opponents" real, "Record" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- How many results finished in a loss?
SELECT COUNT("Tar Heels points") FROM table_23871 WHERE "Result" = 'Loss'
wikisql
CREATE TABLE table_204_173 ( id number, "rank" number, "group" text, "name" text, "nationality" text, "2.05" text, "2.15" text, "2.19" text, "2.23" text, "2.26" text, "result" text, "notes" text ) -- Using valid SQLite, answer the following questions for the tables prov...
SELECT "name" FROM table_204_173 WHERE id = (SELECT id FROM table_204_173 WHERE "name" = 'niki palli') + 1
squall
CREATE TABLE d_items ( row_id number, itemid number, label text, linksto text ) CREATE TABLE d_icd_diagnoses ( row_id number, icd9_code text, short_title text, long_title text ) CREATE TABLE chartevents ( row_id number, subject_id number, hadm_id number, icustay_id numb...
SELECT d_icd_diagnoses.short_title FROM d_icd_diagnoses WHERE d_icd_diagnoses.icd9_code IN (SELECT t3.icd9_code FROM (SELECT t2.icd9_code, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM (SELECT admissions.subject_id, diagnoses_icd.charttime FROM diagnoses_icd JOIN admissions ON diagnoses_icd.hadm_id = admissions...
mimic_iii
CREATE TABLE 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 procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.dob_year < "2056" AND procedures.icd9_code = "8321"
mimicsql_data
CREATE TABLE table_31983 ( "Week" real, "Date" text, "Opponent" text, "Result" text, "Attendance" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Tell me the date with week of 13
SELECT "Date" FROM table_31983 WHERE "Week" = '13'
wikisql
CREATE TABLE table_19120 ( "#" real, "Sanskrit \u0938\u0902\u0938\u094d\u0915\u0943\u0924\u092e\u094d" text, "Tamil \u0ba4\u0bae\u0bbf\u0bb4\u0bcd" text, "Telugu \u0c24\u0c46\u0c32\u0c41\u0c17\u0c41" text, "Kannada \u0c95\u0ca8\u0ccd\u0ca8\u0ca1" text, "Malayalam \u0d2e\u0d32\u0d2f\u0d3e\u0d33\u...
SELECT "Malayalam \u0d2e\u0d32\u0d2f\u0d3e\u0d33\u0d02" FROM table_19120 WHERE "#" = '10'
wikisql
CREATE TABLE table_45576 ( "Place" text, "Player" text, "Country" text, "Score" text, "To par" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is Score, when To Par is greater than 7, when Place is 'T4', and when Player is 'Bob Rosburg'?
SELECT "Score" FROM table_45576 WHERE "To par" > '7' AND "Place" = 't4' AND "Player" = 'bob rosburg'
wikisql
CREATE TABLE table_80342 ( "Region" text, "Date" text, "Label" text, "Format" text, "Catalog" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the region of the Alfa Records release with catalog ALCA-282?
SELECT "Region" FROM table_80342 WHERE "Label" = 'alfa records' AND "Catalog" = 'alca-282'
wikisql
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 WHERE demographic.age < "49" AND demographic.days_stay > "3"
mimicsql_data