instruction
stringlengths
151
7.46k
output
stringlengths
2
4.44k
source
stringclasses
26 values
CREATE TABLE table_29155 ( "No. in series" real, "No. in season" real, "Title" text, "Directed by" text, "Written by" text, "Original air date" text, "U.S. viewers (million)" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- How many episodes w...
SELECT COUNT("Directed by") FROM table_29155 WHERE "Written by" = 'Alison McDonald'
wikisql
CREATE TABLE hz_info_mzjzjlb ( JZLSH number, YLJGDM number, mzjzjlb_id number ) 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 ...
SELECT mzjzjlb.ZZYSGH, mzjzjlb.QTJZYSGH FROM mzjzjlb WHERE mzjzjlb.JZLSH = '20851648462'
css
CREATE TABLE table_name_96 ( date VARCHAR, site VARCHAR, attendance VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What date was the game at Dowdy-Ficklen stadium Greenville, NC, with 27,321 in attendance?
SELECT date FROM table_name_96 WHERE site = "dowdy-ficklen stadium • greenville, nc" AND attendance = "27,321"
sql_create_context
CREATE TABLE table_17472 ( "Year" real, "Division" text, "League" text, "Regular Season" text, "Playoffs" text, "Open Cup" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What open cups where played in 2002
SELECT "Open Cup" FROM table_17472 WHERE "Year" = '2002'
wikisql
CREATE TABLE table_24348134_3 ( tournament_winner VARCHAR, regular_season_winner VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- List the number of tournament winners when iona , siena & niagara won in the regular season.
SELECT COUNT(tournament_winner) FROM table_24348134_3 WHERE regular_season_winner = "Iona , Siena & Niagara"
sql_create_context
CREATE TABLE table_1281200_1 ( phase VARCHAR, new_entries_this_round VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- The new entries this round was shown to be 12, in which phase would you find this?
SELECT phase FROM table_1281200_1 WHERE new_entries_this_round = "12"
sql_create_context
CREATE TABLE table_41918 ( "Series" text, "Host" text, "Launch date" text, "Finale date" text, "Days" real, "Winner" text, "Prize" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is Series, when Winner is Jetmir Salaj?
SELECT "Series" FROM table_41918 WHERE "Winner" = 'jetmir salaj'
wikisql
CREATE TABLE table_70589 ( "Matches" real, "Wickets" real, "Runs" real, "Average" real, "Career" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Name the least average with wickets more than 265 and career of 1888/89-1913/14 and matches more than 51
SELECT MIN("Average") FROM table_70589 WHERE "Wickets" > '265' AND "Career" = '1888/89-1913/14' AND "Matches" > '51'
wikisql
CREATE TABLE weather ( date text, max_temperature_f number, mean_temperature_f number, min_temperature_f number, max_dew_point_f number, mean_dew_point_f number, min_dew_point_f number, max_humidity number, mean_humidity number, min_humidity number, max_sea_level_pressure_inc...
SELECT date FROM weather WHERE mean_sea_level_pressure_inches BETWEEN 30.3 AND 31
spider
CREATE TABLE table_name_53 ( medal VARCHAR, event VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What medal was won in the men's 5000 m event?
SELECT medal FROM table_name_53 WHERE event = "men's 5000 m"
sql_create_context
CREATE TABLE procedures ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) CREATE TABLE lab ( subject_id text, hadm_id text, itemid text, charttime text, flag text, value_unit text, label text, fluid text ) CREATE TABLE prescription...
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE procedures.long_title = "Open reduction of fracture with internal fixation, femur" AND lab."CATEGORY" = "Hematology"
mimicsql_data
CREATE TABLE lab ( labid number, patientunitstayid number, labname text, labresult number, labresulttime time ) CREATE TABLE treatment ( treatmentid number, patientunitstayid number, treatmentname text, treatmenttime time ) CREATE TABLE cost ( costid number, uniquepid text,...
SELECT COUNT(*) > 0 FROM medication WHERE medication.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '006-36108')) AND medication.drugname IN ('lorazepam', 'fentanyl inj 50 mcg...
eicu
CREATE TABLE table_78865 ( "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. -- minehead has what tie number?
SELECT "Tie no" FROM table_78865 WHERE "Home team" = 'minehead'
wikisql
CREATE TABLE d_labitems ( row_id number, itemid number, label text ) CREATE TABLE procedures_icd ( row_id number, subject_id number, hadm_id number, icd9_code text, charttime time ) CREATE TABLE admissions ( row_id number, subject_id number, hadm_id number, admittime ti...
SELECT COUNT(DISTINCT admissions.subject_id) FROM admissions WHERE admissions.hadm_id IN (SELECT diagnoses_icd.hadm_id FROM diagnoses_icd WHERE diagnoses_icd.icd9_code = (SELECT d_icd_diagnoses.icd9_code FROM d_icd_diagnoses WHERE d_icd_diagnoses.short_title = 'long-term use steroids') AND STRFTIME('%y', diagnoses_icd....
mimic_iii
CREATE TABLE table_name_30 ( constructor VARCHAR, driver VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Who constructed pedro diniz's car?
SELECT constructor FROM table_name_30 WHERE driver = "pedro diniz"
sql_create_context
CREATE TABLE table_50751 ( "2010 ARWU Rankings" text, "2010 QS World Rankings" text, "2010 QS Asian Rankings" text, "2010 eduniversal Rankings" text, "2009 QS Asian Rankings: Int\u2019l faculty review" text, "2009 QS Asian Rankings: Int\u2019l student review" real, "2000 Singapore \u201cAsia...
SELECT SUM("2009 QS Asian Rankings: Int\u2019l student review") FROM table_50751 WHERE "2010 QS Asian Rankings" = 'none'
wikisql
CREATE TABLE table_name_33 ( year INTEGER, movie VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What's the average year a Rangam movie came out?
SELECT AVG(year) FROM table_name_33 WHERE movie = "rangam"
sql_create_context
CREATE TABLE table_61761 ( "7:30 am" text, "8:00 am" text, "9:00 am" text, "11:00 am" text, "noon" text, "12:30 pm" text, "1:00 pm" text, "1:30 pm" text, "2:00 pm" text, "3:00 pm" text, "3:30 pm" text, "5:00 pm" text, "6:30 pm" text ) -- Using valid SQLite, answer t...
SELECT "7:30 am" FROM table_61761 WHERE "11:00 am" = 'the view'
wikisql
CREATE TABLE table_name_79 ( high_points VARCHAR, location_attendance VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the highest number of points of the game in Conseco fieldhouse 7,134?
SELECT high_points FROM table_name_79 WHERE location_attendance = "conseco fieldhouse 7,134"
sql_create_context
CREATE TABLE table_1672804_2 ( region VARCHAR, name_of_city VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the region where Iquitos is located?
SELECT region FROM table_1672804_2 WHERE name_of_city = "Iquitos"
sql_create_context
CREATE TABLE table_39051 ( "Unit" text, "Russian" text, "Translation" text, "Ratio" text, "Cubic inches (exact)" text, "Metric value" text, "Imperial" text, "US Customary" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the transl...
SELECT "Translation" FROM table_39051 WHERE "Unit" = 'chetvert'
wikisql
CREATE TABLE d_icd_diagnoses ( row_id number, icd9_code text, short_title text, long_title text ) CREATE TABLE icustays ( row_id number, subject_id number, hadm_id number, icustay_id number, first_careunit text, last_careunit text, first_wardid number, last_wardid number...
SELECT MIN(labevents.valuenum) FROM labevents WHERE labevents.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 20801) AND labevents.itemid IN (SELECT d_labitems.itemid FROM d_labitems WHERE d_labitems.label = 'potassium, whole blood') AND STRFTIME('%y-%m', labevents.charttime) = '2102...
mimic_iii
CREATE TABLE table_68817 ( "Club" text, "District" text, "Area/Province" text, "Stadium" text, "First Season" text, "Last Title" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Name the last time for club of newell's old boys
SELECT "Last Title" FROM table_68817 WHERE "Club" = 'newell''s old boys'
wikisql
CREATE TABLE table_27715173_12 ( high_rebounds VARCHAR, game VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Who was the high rebounder on game 1?
SELECT high_rebounds FROM table_27715173_12 WHERE game = 1
sql_create_context
CREATE TABLE table_27206 ( "Player" text, "Games Played" real, "Rebounds" real, "Assists" real, "Steals" real, "Blocks" real, "Points" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What are the numbers of steals associated with players havi...
SELECT "Steals" FROM table_27206 WHERE "Blocks" = '3'
wikisql
CREATE TABLE table_76783 ( "Rank" real, "Amusement park corporations" text, "Country" text, "2008" text, "2009" text, "2010" text, "2011" real, "2012" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- In the United States the 2011 attendanc...
SELECT "2008" FROM table_76783 WHERE "2011" > '30,800,000' AND "Country" = 'united states'
wikisql
CREATE TABLE table_33941 ( "Rank" text, "Gold" real, "Silver" real, "Bronze" real, "Total" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the average Bronze when silver is more than 2, and rank is 2, and gold more than 2
SELECT AVG("Bronze") FROM table_33941 WHERE "Silver" > '2' AND "Rank" = '2' AND "Gold" > '2'
wikisql
CREATE TABLE compartment_class ( compartment varchar, class_type varchar ) CREATE TABLE flight_leg ( flight_id int, leg_number int, leg_flight int ) CREATE TABLE dual_carrier ( main_airline varchar, low_flight_number int, high_flight_number int, dual_airline varchar, service_na...
SELECT DISTINCT airline.airline_code FROM airline, airport_service AS AIRPORT_SERVICE_0, airport_service AS AIRPORT_SERVICE_1, city AS CITY_0, city AS CITY_1, flight WHERE CITY_0.city_code = AIRPORT_SERVICE_0.city_code AND CITY_0.city_name = 'PHILADELPHIA' AND CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.c...
atis
CREATE TABLE table_63480 ( "District" real, "Incumbent" text, "2008 Status" text, "Democratic" text, "Republican" text, "Green" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Who was the Democratic when then Incumbent was Christopher Shays?
SELECT "Democratic" FROM table_63480 WHERE "Incumbent" = 'christopher shays'
wikisql
CREATE TABLE days ( days_code varchar, day_name varchar ) CREATE TABLE flight_leg ( flight_id int, leg_number int, leg_flight int ) CREATE TABLE code_description ( code varchar, description text ) CREATE TABLE state ( state_code text, state_name text, country_name text ) CREA...
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, flight WHERE CITY_0.city_code = AIRPORT_SERVICE_0.city_code AND CITY_0.city_name = 'DALLAS' AND CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'BALTIMO...
atis
CREATE TABLE section ( course_id text, sec_id text, semester text, year number, building text, room_number text, time_slot_id text ) CREATE TABLE teaches ( id text, course_id text, sec_id text, semester text, year number ) CREATE TABLE instructor ( id text, name...
SELECT dept_name, building FROM department ORDER BY budget DESC LIMIT 1
spider
CREATE TABLE table_27547668_3 ( viewers VARCHAR, _number VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- How many people watched episode number 13?
SELECT viewers FROM table_27547668_3 WHERE _number = 13
sql_create_context
CREATE TABLE table_15555661_2 ( area__km²_ VARCHAR, ecozone VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- How large is the Boreal Shield in km2?
SELECT COUNT(area__km²_) FROM table_15555661_2 WHERE ecozone = "Boreal Shield"
sql_create_context
CREATE TABLE table_name_12 ( home_team VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- How many points did North Melbourne score?
SELECT home_team AS score FROM table_name_12 WHERE home_team = "north melbourne"
sql_create_context
CREATE TABLE treatment ( treatmentid number, patientunitstayid number, treatmentname text, treatmenttime time ) CREATE TABLE allergy ( allergyid number, patientunitstayid number, drugname text, allergyname text, allergytime time ) CREATE TABLE lab ( labid number, patientuni...
SELECT DISTINCT cost.cost FROM cost WHERE cost.eventtype = 'medication' AND cost.eventid IN (SELECT medication.medicationid FROM medication WHERE medication.drugname = 'nitroglycerin 50 mg in d5w 250 ml r')
eicu
CREATE TABLE club ( clubdesc VARCHAR, clubname VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the description of the club named 'Tennis Club'?
SELECT clubdesc FROM club WHERE clubname = "Tennis Club"
sql_create_context
CREATE TABLE Posts ( Id number, PostTypeId number, AcceptedAnswerId number, ParentId number, CreationDate time, DeletionDate time, Score number, ViewCount number, Body text, OwnerUserId number, OwnerDisplayName text, LastEditorUserId number, LastEditorDisplayName text...
SELECT DISTINCT t2.TagName AS Other FROM Tags AS t INNER JOIN PostTags AS pt ON t.Id = pt.TagId INNER JOIN PostTags AS pt2 ON pt.PostId = pt2.PostId INNER JOIN Tags AS t2 ON pt2.TagId = t2.Id WHERE t.TagName = 'MySQL'
sede
CREATE TABLE laptimes ( driverid VARCHAR, milliseconds VARCHAR ) CREATE TABLE drivers ( forename VARCHAR, surname VARCHAR, driverid VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What are the forename and surname of the driver who has the smalle...
SELECT T1.forename, T1.surname FROM drivers AS T1 JOIN laptimes AS T2 ON T1.driverid = T2.driverid ORDER BY T2.milliseconds LIMIT 1
sql_create_context
CREATE TABLE student ( student_id int, lastname varchar, firstname varchar, program_id int, declare_major varchar, total_credit int, total_gpa float, entered_as varchar, admit_term int, predicted_graduation_semester int, degree varchar, minor varchar, internship varch...
SELECT DISTINCT course.department, course.name, course.number FROM course INNER JOIN area ON course.course_id = area.course_id INNER JOIN program_course ON program_course.course_id = course.course_id WHERE (area.area LIKE '%Eval Fin Perfmc%' OR course.description LIKE '%Eval Fin Perfmc%' OR course.name LIKE '%Eval Fin ...
advising
CREATE TABLE table_1618358_1 ( over_gdp__in__percentage_ VARCHAR, stamp_duty_reserve_tax VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- When the stamp duty reserve tax is 3,669 what is the percentage over gdp?
SELECT over_gdp__in__percentage_ FROM table_1618358_1 WHERE stamp_duty_reserve_tax = "3,669"
sql_create_context
CREATE TABLE table_79980 ( "Ship" text, "Launched" real, "Location" text, "Speed" text, "Fate" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the average launch date of the vmv-1 vessel in Germany?
SELECT AVG("Launched") FROM table_79980 WHERE "Location" = 'germany' AND "Ship" = 'vmv-1'
wikisql
CREATE TABLE table_train_110 ( "id" int, "cholesterol" float, "body_weight" float, "creatinine_clearance_cl" float, "triglyceride_tg" float, "age" float, "NOUSE" float ) -- Using valid SQLite, answer the following questions for the tables provided above. -- high triglycerides ( > 3.5 mmol...
SELECT * FROM table_train_110 WHERE triglyceride_tg > 3.5
criteria2sql
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(DISTINCT t1.uniquepid) FROM (SELECT patient.uniquepid, treatment.treatmenttime, patient.patienthealthsystemstayid FROM treatment JOIN patient ON treatment.patientunitstayid = patient.patientunitstayid WHERE treatment.treatmentname = 'mechanical ventilation' AND DATETIME(treatment.treatmenttime, 'start of y...
eicu
CREATE TABLE table_5145 ( "Rider" text, "Manufacturer" text, "Laps" real, "Time/Retired" text, "Grid" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the lowest grid with rider casey stoner and laps that are smaller than 27?
SELECT MIN("Grid") FROM table_5145 WHERE "Rider" = 'casey stoner' AND "Laps" < '27'
wikisql
CREATE TABLE table_40048 ( "City" text, "Country" text, "IATA" text, "ICAO" text, "Airport" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the Airport when France was the country, and Montpellier was the city?
SELECT "Airport" FROM table_40048 WHERE "Country" = 'france' AND "City" = 'montpellier'
wikisql
CREATE TABLE table_11232 ( "Season" real, "Season Premiere" text, "Season Finale" text, "TV Season" text, "Rank" text, "Viewers (in millions)" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What was the 2008-2009 season finale?
SELECT "Season Finale" FROM table_11232 WHERE "TV Season" = '2008-2009'
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 LAST_NAME, COMMISSION_PCT FROM employees WHERE NOT DEPARTMENT_ID IN (SELECT DEPARTMENT_ID FROM departments WHERE MANAGER_ID BETWEEN 100 AND 200)
nvbench
CREATE TABLE table_217 ( "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. -- How many winners did I Dessau Autobahnspinne have?
SELECT COUNT("Winning driver") FROM table_217 WHERE "Race Name" = 'I Dessau Autobahnspinne'
wikisql
CREATE TABLE table_56023 ( "NGC number" real, "Object type" text, "Constellation" text, "Right ascension ( J2000 )" text, "Declination ( J2000 )" text, "Apparent magnitude" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Tell me the declination w...
SELECT "Declination ( J2000 )" FROM table_56023 WHERE "Apparent magnitude" > '10.4' AND "NGC number" = '5112'
wikisql
CREATE TABLE table_name_59 ( year INTEGER, start INTEGER ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Name the most year with start more than 2
SELECT MAX(year) FROM table_name_59 WHERE start > 2
sql_create_context
CREATE TABLE table_name_43 ( refs VARCHAR, ntfs VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which ReFS has yes v3.0 for NTFS?
SELECT refs FROM table_name_43 WHERE ntfs = "yes v3.0"
sql_create_context
CREATE TABLE table_name_62 ( decile VARCHAR, area VARCHAR, authority VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which decile has an Area of welcome bay, and an Authority of state?
SELECT decile FROM table_name_62 WHERE area = "welcome bay" AND authority = "state"
sql_create_context
CREATE TABLE table_2293510_1 ( region___nuts_2006_ VARCHAR, ppp__million_€_ VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Where is the PPP 23164 million ?
SELECT region___nuts_2006_ FROM table_2293510_1 WHERE ppp__million_€_ = 23164
sql_create_context
CREATE TABLE table_name_82 ( score VARCHAR, date VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the score of the match on October 5, 1990?
SELECT score FROM table_name_82 WHERE date = "october 5, 1990"
sql_create_context
CREATE TABLE treatment ( treatmentid number, patientunitstayid number, treatmentname text, treatmenttime time ) CREATE TABLE intakeoutput ( intakeoutputid number, patientunitstayid number, cellpath text, celllabel text, cellvaluenumeric number, intakeoutputtime time ) CREATE TA...
SELECT COUNT(DISTINCT patient.uniquepid) FROM patient WHERE patient.patientunitstayid IN (SELECT diagnosis.patientunitstayid FROM diagnosis WHERE diagnosis.diagnosisname = 'hypotension')
eicu
CREATE TABLE procedures_icd ( row_id number, subject_id number, hadm_id number, icd9_code text, charttime time ) CREATE TABLE inputevents_cv ( row_id number, subject_id number, hadm_id number, icustay_id number, charttime time, itemid number, amount number ) CREATE TABL...
SELECT d_items.label FROM d_items WHERE d_items.itemid IN (SELECT t1.itemid FROM (SELECT outputevents.itemid, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM outputevents WHERE DATETIME(outputevents.charttime, 'start of year') = DATETIME(CURRENT_TIME(), 'start of year', '-1 year') GROUP BY outputevents.itemid) AS...
mimic_iii
CREATE TABLE table_name_82 ( chassis VARCHAR, entrant VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What kind of Chassis supports an Equipe Gordini Entrant?
SELECT chassis FROM table_name_82 WHERE entrant = "equipe gordini"
sql_create_context
CREATE TABLE table_42151 ( "Location" text, "Aircraft" text, "Tail number" text, "Aircraft damage" text, "Fatalities" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What location had 25/25 fatalities?
SELECT "Location" FROM table_42151 WHERE "Fatalities" = '25/25'
wikisql
CREATE TABLE table_61810 ( "Tournament" text, "2009" text, "2010" text, "2011" text, "2012" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is 2012, when 2009 is 'A'?
SELECT "2012" FROM table_61810 WHERE "2009" = 'a'
wikisql
CREATE TABLE player ( pid number, pname text, ycard text, hs number ) CREATE TABLE tryout ( pid number, cname text, ppos text, decision text ) CREATE TABLE college ( cname text, state text, enr number ) -- Using valid SQLite, answer the following questions for the tables ...
SELECT T1.pname, T1.hs FROM player AS T1 JOIN tryout AS T2 ON T1.pid = T2.pid WHERE T2.decision = 'yes'
spider
CREATE TABLE table_name_21 ( date VARCHAR, rockets_score VARCHAR, game VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which Date has a Rockets score of 94, and a Game of 66?
SELECT date FROM table_name_21 WHERE rockets_score = 94 AND game = 66
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 All_Neutral, School_ID FROM basketball_match
nvbench
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.dob_year < "2180" AND lab.label = "Phosphate, Urine"
mimicsql_data
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.diagnosis = "ABDOMINAL PAIN" AND demographic.age < "59"
mimicsql_data
CREATE TABLE table_66674 ( "Rank" real, "Rowers" text, "Country" text, "Time" text, "Notes" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the Rank of the Rowers with a Time of 7:30.92?
SELECT SUM("Rank") FROM table_66674 WHERE "Time" = '7:30.92'
wikisql
CREATE TABLE table_56454 ( "Power Plant" text, "Producer" text, "Location" text, "State" text, "Total Capacity (MWe)" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What company is known as the producer at the kethanur location?
SELECT "Producer" FROM table_56454 WHERE "Location" = 'kethanur'
wikisql
CREATE TABLE t_kc22 ( MED_EXP_DET_ID text, OVERALL_CD_ORG text, OVERALL_CD_PERSON text, MED_CLINIC_ID text, MED_EXP_BILL_ID text, SOC_SRT_DIRE_CD text, SOC_SRT_DIRE_NM text, DIRE_TYPE number, CHA_ITEM_LEV number, MED_INV_ITEM_TYPE text, MED_DIRE_CD text, MED_DIRE_NM text,...
SELECT * FROM t_kc21 WHERE MED_SER_ORG_NO = '4469722' AND IN_HOSP_DATE BETWEEN '2006-11-15' AND '2007-07-28' AND PERSON_NM LIKE '卫%'
css
CREATE TABLE table_27614707_1 ( original_artist VARCHAR, theme VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Who was the original artist of the Top 12 Men theme?
SELECT original_artist FROM table_27614707_1 WHERE theme = "Top 12 Men"
sql_create_context
CREATE TABLE table_23898 ( "Central-Southern Calabrian" text, "Phonetic Greek" text, "Italian" text, "French" text, "English" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the Italian word for the English word 'otter'?
SELECT "Italian" FROM table_23898 WHERE "English" = 'otter'
wikisql
CREATE TABLE table_27372 ( "Pick #" real, "NFL Team" text, "Player" text, "Position" text, "College" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Name the total number for nfl team for ellis gardner
SELECT COUNT("NFL Team") FROM table_27372 WHERE "Player" = 'Ellis Gardner'
wikisql
CREATE TABLE table_name_9 ( to_par VARCHAR, place VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the To par of the 4 Place Player?
SELECT to_par FROM table_name_9 WHERE place = "4"
sql_create_context
CREATE TABLE table_30484 ( "Parent unit" text, "Geschwader Base" text, "Unit (Gruppe/Staffel)" text, "Aircraft Type" text, "Commanding Officer" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Name the parent unit for josef priller
SELECT "Parent unit" FROM table_30484 WHERE "Commanding Officer" = 'Josef Priller'
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.QTY, t_kc22.UNIVALENT, t_kc22.AMOUNT FROM t_kc21 JOIN t_kc22 JOIN t_kc21_t_kc22 ON t_kc21.MED_CLINIC_ID = t_kc21_t_kc22.MED_CLINIC_ID AND t_kc21_t_kc22.MED_EXP_DET_ID = t_kc22.MED_EXP_DET_ID WHERE t_kc21.PERSON_ID = '46674930' AND t_kc21.IN_HOSP_DATE BETWEEN...
css
CREATE TABLE transfers ( row_id number, subject_id number, hadm_id number, icustay_id number, eventtype text, careunit text, wardid number, intime time, outtime time ) CREATE TABLE inputevents_cv ( row_id number, subject_id number, hadm_id number, icustay_id number, ...
SELECT AVG(labevents.valuenum) FROM labevents WHERE labevents.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 76005) AND labevents.itemid IN (SELECT d_labitems.itemid FROM d_labitems WHERE d_labitems.label = 'rapamycin') AND DATETIME(labevents.charttime) >= DATETIME(CURRENT_TIME(), '...
mimic_iii
CREATE TABLE table_1831262_2 ( sesamin VARCHAR, secoisolariciresinol VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- what is the total number of sesamin were secoisolariciresinol is 240?
SELECT sesamin FROM table_1831262_2 WHERE secoisolariciresinol = 240
sql_create_context
CREATE TABLE flight_fare ( flight_id int, fare_id int ) CREATE TABLE date_day ( month_number int, day_number int, year int, day_name varchar ) CREATE TABLE airport_service ( city_code varchar, airport_code varchar, miles_distant int, direction varchar, minutes_distant int )...
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 = 'PITTSBURGH' AND date_day.day_number = 7 AND date_day.month_number = 7 AND...
atis
CREATE TABLE table_225100_4 ( successor VARCHAR, district VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Who is the successor when florida territory at-large is the district?
SELECT successor FROM table_225100_4 WHERE district = "Florida Territory At-large"
sql_create_context
CREATE TABLE medication ( medicationid number, patientunitstayid number, drugname text, dosage text, routeadmin text, drugstarttime time, drugstoptime time ) CREATE TABLE cost ( costid number, uniquepid text, patienthealthsystemstayid number, eventtype text, eventid numb...
SELECT medication.drugname FROM medication WHERE medication.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '009-9534')) AND medication.routeadmin = 'nebulization' AND STRFTIME...
eicu
CREATE TABLE time_interval ( period text, begin_time int, end_time int ) CREATE TABLE flight_leg ( flight_id int, leg_number int, leg_flight int ) CREATE TABLE airline ( airline_code varchar, airline_name text, note text ) CREATE TABLE ground_service ( city_code text, 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 = 'TAMPA' AND date_day.day_number = 25 AND date_day.month_number = 6 AND da...
atis
CREATE TABLE diagnoses ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) CREATE TABLE lab ( subject_id text, hadm_id text, itemid text, charttime text, flag text, value_unit text, label text, fluid text ) CREATE TABLE procedures ( ...
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.dob_year < "2121" AND lab.fluid = "Other Body Fluid"
mimicsql_data
CREATE TABLE lab ( subject_id text, hadm_id text, itemid text, charttime text, flag text, value_unit text, label text, fluid text ) CREATE TABLE demographic ( subject_id text, hadm_id text, name text, marital_status text, age text, dob text, gender text, ...
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.dob_year < "2060" AND lab.fluid = "Urine"
mimicsql_data
CREATE TABLE t_kc22 ( MED_EXP_DET_ID text, OVERALL_CD_ORG text, OVERALL_CD_PERSON text, MED_CLINIC_ID text, MED_EXP_BILL_ID text, SOC_SRT_DIRE_CD text, SOC_SRT_DIRE_NM text, DIRE_TYPE number, CHA_ITEM_LEV number, MED_INV_ITEM_TYPE text, MED_DIRE_CD text, MED_DIRE_NM text,...
SELECT COUNT(*) FROM t_kc21 JOIN t_kc22 ON t_kc21.MED_CLINIC_ID = t_kc22.MED_CLINIC_ID WHERE t_kc21.PERSON_ID = '15314573' AND t_kc22.STA_DATE BETWEEN '2004-04-10' AND '2021-08-16' AND t_kc22.MED_INV_ITEM_TYPE = '西药费'
css
CREATE TABLE table_name_92 ( poles VARCHAR, bike VARCHAR, podiums VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- How many Poles have a Bike of honda rc212v, and Podiums smaller than 0?
SELECT COUNT(poles) FROM table_name_92 WHERE bike = "honda rc212v" AND podiums < 0
sql_create_context
CREATE TABLE table_name_70 ( venue VARCHAR, away_team VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Where did Richmond play as an away team?
SELECT venue FROM table_name_70 WHERE away_team = "richmond"
sql_create_context
CREATE TABLE table_45676 ( "City" text, "Country" text, "IATA" text, "ICAO" text, "Airport" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What country has an ICAO of ypph?
SELECT "Country" FROM table_45676 WHERE "ICAO" = 'ypph'
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 SUM(CASE WHEN patient.hospitaldischargestatus = 'alive' THEN 1 WHEN STRFTIME('%j', patient.hospitaldischargetime) - STRFTIME('%j', t4.diagnosistime) > 1 * 365 THEN 1 ELSE 0 END) * 100 / COUNT(*) FROM (SELECT t2.uniquepid, t2.diagnosistime FROM (SELECT t1.uniquepid, t1.diagnosistime FROM (SELECT patient.uniquepid...
eicu
CREATE TABLE region ( region_name VARCHAR, region_id VARCHAR ) CREATE TABLE affected_region ( region_id VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Show the region name with at least two storms.
SELECT T1.region_name FROM region AS T1 JOIN affected_region AS T2 ON T1.region_id = T2.region_id GROUP BY T1.region_id HAVING COUNT(*) >= 2
sql_create_context
CREATE TABLE people ( People_ID int, Name text, Height real, Weight real, Date_of_Birth text ) CREATE TABLE entrepreneur ( Entrepreneur_ID int, People_ID int, Company text, Money_Requested real, Investor text ) -- Using valid SQLite, answer the following questions for the tabl...
SELECT Date_of_Birth, COUNT(Date_of_Birth) FROM entrepreneur AS T1 JOIN people AS T2 ON T1.People_ID = T2.People_ID WHERE T1.Investor = "Simon Woodroffe" OR T1.Investor = "Peter Jones"
nvbench
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 admissions.marital_status FROM admissions WHERE admissions.subject_id = 40707 AND admissions.dischtime IS NULL
mimic_iii
CREATE TABLE table_79371 ( "Brand" text, "Product Name" text, "Focal Length" text, "35mm EFL and equivalent aperture" text, "Max. aperture" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the maximum aperture of the lens(es) with a focal leng...
SELECT "Max. aperture" FROM table_79371 WHERE "Focal Length" = '20mm'
wikisql
CREATE TABLE Participants ( Participant_ID INTEGER, Participant_Type_Code CHAR(15), Participant_Details VARCHAR(255) ) CREATE TABLE Participants_in_Events ( Event_ID INTEGER, Participant_ID INTEGER ) CREATE TABLE Events ( Event_ID INTEGER, Service_ID INTEGER, Event_Details VARCHAR(255)...
SELECT T1.Participant_Type_Code, AVG(COUNT(*)) FROM Participants AS T1 JOIN Participants_in_Events AS T2 ON T1.Participant_ID = T2.Participant_ID GROUP BY T1.Participant_Type_Code ORDER BY AVG(COUNT(*))
nvbench
CREATE TABLE table_27666856_3 ( date_of_appointment VARCHAR, date_of_vacancy VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Name the date of appointment for 26 may 2011
SELECT COUNT(date_of_appointment) FROM table_27666856_3 WHERE date_of_vacancy = "26 May 2011"
sql_create_context
CREATE TABLE table_49146 ( "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 was the lowest round number at the UFC 16 even...
SELECT MIN("Round") FROM table_49146 WHERE "Event" = 'ufc 16' AND "Record" = '19-1-1'
wikisql
CREATE TABLE lab ( subject_id text, hadm_id text, itemid text, charttime text, flag text, value_unit text, label text, fluid text ) CREATE TABLE demographic ( subject_id text, hadm_id text, name text, marital_status text, age text, dob text, gender text, ...
SELECT demographic.insurance FROM demographic WHERE demographic.subject_id = "2560"
mimicsql_data
CREATE TABLE table_24100843_1 ( processor VARCHAR, model__list_ VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Whats the processor for p9xxx?
SELECT processor FROM table_24100843_1 WHERE model__list_ = "P9xxx"
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 procedures ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) ...
SELECT demographic.marital_status FROM demographic WHERE demographic.name = "Brian Brock"
mimicsql_data
CREATE TABLE farm_competition ( Hosts VARCHAR, Theme VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What are the hosts of competitions whose theme is not 'Aliens'?
SELECT Hosts FROM farm_competition WHERE Theme <> 'Aliens'
sql_create_context
CREATE TABLE table_203_743 ( id number, "version" text, "date" text, "development cycle" text, "size (in kb)" number, "download" text, "notes" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- what is the last version of the 16 bit cello to be ...
SELECT "version" FROM table_203_743 WHERE "development cycle" = 'beta' ORDER BY id DESC LIMIT 1
squall
CREATE TABLE table_29785324_5 ( lok_sabha VARCHAR, constituency_no VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- How many Lok Sabha are in the one with 216 constituents?
SELECT lok_sabha FROM table_29785324_5 WHERE constituency_no = 216
sql_create_context
CREATE TABLE table_203_8 ( id number, "player" text, "rec." number, "yards" number, "avg." number, "td's" number, "long" number ) -- Using valid SQLite, answer the following questions for the tables provided above. -- how many players scored a greater number of touchdowns than anthony hin...
SELECT COUNT("player") FROM table_203_8 WHERE "td's" > (SELECT "td's" FROM table_203_8 WHERE "player" = 'anthony hines')
squall