instruction
stringlengths
151
7.46k
output
stringlengths
2
4.44k
source
stringclasses
26 values
CREATE TABLE table_name_97 ( studio VARCHAR, director VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which Studio has a Director of oliver stone?
SELECT studio FROM table_name_97 WHERE director = "oliver stone"
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 MAX(demographic.age) FROM demographic WHERE demographic.admission_type = "EMERGENCY" AND demographic.days_stay = "2"
mimicsql_data
CREATE TABLE mzjzjlb ( YLJGDM text, JZLSH text, KH text, KLX number, MJZH text, HZXM text, NLS number, NLY number, ZSEBZ number, JZZTDM number, JZZTMC text, JZJSSJ time, TXBZ number, ZZBZ number, WDBZ number, JZKSBM text, JZKSMC text, JZKSRQ time, ...
(SELECT jyjgzbb.JYZBLSH FROM person_info JOIN hz_info JOIN mzjzjlb JOIN jybgb JOIN jyjgzbb ON person_info.RYBH = hz_info.RYBH AND hz_info.YLJGDM = mzjzjlb.YLJGDM AND hz_info.KH = mzjzjlb.KH AND hz_info.KLX = mzjzjlb.KLX AND mzjzjlb.YLJGDM = jybgb.YLJGDM_MZJZJLB AND mzjzjlb.JZLSH = jybgb.JZLSH_MZJZJLB AND jybgb.YLJGDM =...
css
CREATE TABLE game ( stadium_id int, id int, Season int, Date text, Home_team text, Away_team text, Score text, Competition text ) CREATE TABLE injury_accident ( game_id int, id int, Player text, Injury text, Number_of_matches text, Source text ) CREATE TABLE sta...
SELECT Season, COUNT(Season) FROM game ORDER BY Season DESC
nvbench
CREATE TABLE table_12010 ( "Channel" real, "Video" text, "Aspect" text, "PSIP Short Name" text, "Programming" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the short name for a channelgreater than 63.4?
SELECT "PSIP Short Name" FROM table_12010 WHERE "Channel" > '63.4'
wikisql
CREATE TABLE table_203_367 ( id number, "year" text, "driver" text, "constructor" text, "location" text, "report" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- what is the total number of years the event was not held ?
SELECT ABS("year" - "year") FROM table_203_367 WHERE "report" = 'not held'
squall
CREATE TABLE table_29837 ( "Game" real, "Date" text, "Team" text, "Score" text, "High points" text, "High rebounds" text, "High assists" text, "Location Attendance" text, "Record" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- who ha...
SELECT "High points" FROM table_29837 WHERE "Date" = 'March 27'
wikisql
CREATE TABLE table_name_3 ( tournament VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which Tournament has a 2007 of 19 4?
SELECT tournament FROM table_name_3 WHERE 2007 = "19–4"
sql_create_context
CREATE TABLE table_name_46 ( record VARCHAR, date VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What was their record on February 24?
SELECT record FROM table_name_46 WHERE date = "february 24"
sql_create_context
CREATE TABLE jybgb ( BBCJBW text, BBDM text, BBMC text, BBZT number, BGDH text, BGJGDM text, BGJGMC text, BGRGH text, BGRQ time, BGRXM text, BGSJ time, CJRQ time, JSBBRQSJ time, JSBBSJ time, JYBBH text, JYJGMC text, JYJSGH text, JYJSQM text, JY...
SELECT jybgb.KSBM, jybgb.KSMC FROM person_info JOIN hz_info JOIN mzjzjlb JOIN jybgb JOIN person_info_hz_info ON person_info.RYBH = person_info_hz_info.RYBH AND hz_info.YLJGDM = mzjzjlb.YLJGDM AND hz_info.KH = mzjzjlb.KH AND hz_info.KLX = mzjzjlb.KLX AND mzjzjlb.YLJGDM = jybgb.YLJGDM_MZJZJLB AND mzjzjlb.JZLSH = jybgb.JZ...
css
CREATE TABLE table_name_52 ( model VARCHAR, gcm__kg__technical_capacity VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which Model has the GCM (kg) Technical Capacity of 42000?
SELECT model FROM table_name_52 WHERE gcm__kg__technical_capacity = "42000"
sql_create_context
CREATE TABLE hz_info ( KH text, KLX number, YLJGDM text, RYBH text ) CREATE TABLE mzjzjlb ( YLJGDM text, JZLSH text, KH text, KLX number, MJZH text, HZXM text, NLS number, NLY number, ZSEBZ number, JZZTDM number, JZZTMC text, JZJSSJ time, TXBZ number,...
SELECT MZZYZDZZBM FROM zyjzjlb WHERE JZLSH = '22762045493'
css
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 procedures.short_title, lab."CATEGORY" FROM procedures INNER JOIN lab ON procedures.hadm_id = lab.hadm_id WHERE procedures.subject_id = "2110"
mimicsql_data
CREATE TABLE table_70093 ( "Value" text, "Khmer" real, "Word Form" text, "UNGEGN" text, "ALA-LC" text, "Notes" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the UNGEGN, when the Khmer is greater than ?
SELECT "UNGEGN" FROM table_70093 WHERE "Khmer" > '១០០០០០០០០'
wikisql
CREATE TABLE table_28686 ( "No. in series" real, "No. in season" real, "Title" text, "Directed by" text, "Written by" text, "Original air date" text, "Production code" real, "U.S. viewers (million)" text ) -- Using valid SQLite, answer the following questions for the tables provided ab...
SELECT COUNT("Production code") FROM table_28686 WHERE "Title" = 'High Top Fade-Out'
wikisql
CREATE TABLE table_42939 ( "Team" text, "Match" real, "Points" real, "Draw" real, "Lost" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- How few losses were the least number of losses and points higher than 23?
SELECT MIN("Lost") FROM table_42939 WHERE "Points" > '23'
wikisql
CREATE TABLE table_21326205_2 ( stage VARCHAR, rally_leader VARCHAR, name VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- In which special stage named Tempo 2 was S bastien Loeb the leader?
SELECT stage FROM table_21326205_2 WHERE rally_leader = "Sébastien Loeb" AND name = "Tempo 2"
sql_create_context
CREATE TABLE zzmzjzjlb ( HXPLC number, HZXM text, JLSJ time, JZJSSJ time, JZKSBM text, JZKSMC text, JZKSRQ time, JZLSH number, JZZDBM text, JZZDSM text, JZZTDM number, JZZTMC text, KH text, KLX number, MJZH text, ML number, MZZYZDZZBM text, MZZYZDZ...
SELECT (SELECT COUNT(*) FROM person_info JOIN hz_info JOIN zzmzjzjlb ON person_info.RYBH = hz_info.RYBH AND hz_info.YLJGDM = zzmzjzjlb.YLJGDM AND hz_info.KH = zzmzjzjlb.KH AND hz_info.KLX = zzmzjzjlb.KLX WHERE person_info.XM = '水光耀' AND zzmzjzjlb.JZKSRQ BETWEEN '2005-01-09' AND '2013-08-02' UNION SELECT COUNT(*) FROM p...
css
CREATE TABLE treatment ( treatmentid number, patientunitstayid number, treatmentname text, treatmenttime time ) CREATE TABLE patient ( uniquepid text, patienthealthsystemstayid number, patientunitstayid number, gender text, age text, ethnicity text, hospitalid number, wa...
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 = '006-14121')) AND vitalperiodic.heartrate < 121.0 AN...
eicu
CREATE TABLE table_45016 ( "Event" text, "Score" real, "Name" text, "Nation" text, "Games" text, "Date" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which event had a score of over 673 points?
SELECT "Event" FROM table_45016 WHERE "Score" > '673'
wikisql
CREATE TABLE table_23977 ( "Model Type" text, "Model Designation" text, "Engine" text, "Wheelbase (mm/inch)" text, "GVW (kg/ton)" text, "Axle Ratio" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What type of engine does the model with model des...
SELECT "Engine" FROM table_23977 WHERE "Model Designation" = '97F00'
wikisql
CREATE TABLE microbiologyevents ( row_id number, subject_id number, hadm_id number, charttime time, spec_type_desc text, org_name text ) CREATE TABLE icustays ( row_id number, subject_id number, hadm_id number, icustay_id number, first_careunit text, last_careunit text, ...
SELECT patients.gender FROM patients WHERE patients.subject_id = 53443
mimic_iii
CREATE TABLE table_name_71 ( Id VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which 2009 had a 2011 of SF?
SELECT 2009 FROM table_name_71 WHERE 2011 = "sf"
sql_create_context
CREATE TABLE table_name_14 ( region VARCHAR, name VARCHAR, area__km_2__ VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What was the region for Malartic with 159.31 km2?
SELECT COUNT(region) FROM table_name_14 WHERE name = "malartic" AND area__km_2__ < 159.31
sql_create_context
CREATE TABLE procedures ( 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 demographic.diagnosis, procedures.short_title FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.subject_id = "9258"
mimicsql_data
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.gender = "M" AND diagnoses.long_title = "Hyposmolality and/or hyponatremia"
mimicsql_data
CREATE TABLE table_27892955_1 ( title VARCHAR, us_viewers__million_ VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the name of the episode that had 2.02 million u.s. viewers?
SELECT title FROM table_27892955_1 WHERE us_viewers__million_ = "2.02"
sql_create_context
CREATE TABLE prescriptions ( row_id number, subject_id number, hadm_id number, startdate time, enddate time, drug text, dose_val_rx text, dose_unit_rx text, route text ) CREATE TABLE d_icd_diagnoses ( row_id number, icd9_code text, short_title text, long_title text )...
SELECT COUNT(*) > 0 FROM microbiologyevents WHERE microbiologyevents.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 61683) AND microbiologyevents.spec_type_desc = 'tissue' AND NOT microbiologyevents.org_name IS NULL AND DATETIME(microbiologyevents.charttime, 'start of year') = DATET...
mimic_iii
CREATE TABLE table_203_465 ( id number, "name" text, "population (2002 census)" number, "population (2007 estimation)" number, "population (2011 census)" number, "area (km2)" number, "density (pop/km2)" number ) -- Using valid SQLite, answer the following questions for the tables provided ...
SELECT "name" FROM table_203_465 ORDER BY "population (2007 estimation)" LIMIT 1
squall
CREATE TABLE flight_leg ( flight_id int, leg_number int, leg_flight int ) CREATE TABLE flight_fare ( flight_id int, fare_id int ) CREATE TABLE airline ( airline_code varchar, airline_name text, note text ) CREATE TABLE dual_carrier ( main_airline varchar, low_flight_number 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, state WHERE ((date_day.day_number = 26 AND date_day.month_number = 7 AND date_day.year = 1991 AND days.day_name = date_day.day_name AND flight.departu...
atis
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 locations ( LOCATION_ID decimal(4,0), STREET_ADDRESS varchar(40), POSTAL_CODE varchar(12), CITY ...
SELECT HIRE_DATE, AVG(DEPARTMENT_ID) FROM employees WHERE HIRE_DATE < '2002-06-21' ORDER BY AVG(DEPARTMENT_ID) DESC
nvbench
CREATE TABLE claims_documents ( claim_id number, document_type_code text, created_by_staff_id number, created_date number ) CREATE TABLE policies ( policy_id number, customer_id number, policy_type_code text, start_date time, end_date time ) CREATE TABLE claims_processing_stages ( ...
SELECT t3.customer_details FROM claim_headers AS t1 JOIN policies AS t2 ON t1.policy_id = t2.policy_id JOIN customers AS t3 ON t2.customer_id = t3.customer_id WHERE t1.amount_claimed = (SELECT MAX(amount_claimed) FROM claim_headers)
spider
CREATE TABLE time_interval ( period text, begin_time int, end_time int ) CREATE TABLE restriction ( restriction_code text, advance_purchase int, stopovers text, saturday_stay_required text, minimum_stay int, maximum_stay int, application text, no_discounts text ) CREATE TAB...
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 = 'TORONTO' AND CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'PHILAD...
atis
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 diagnoses_icd ( row_id number, subject_id number, hadm_id number, icd9_code tex...
SELECT chartevents.charttime 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 = 10855) AND icustays.outtime IS NULL) AND chartevents.itemid IN (SELECT d_items.itemid FROM d_items WH...
mimic_iii
CREATE TABLE table_54639 ( "Rd #" real, "Pick #" real, "Player" text, "Team (League)" text, "Reg GP" real, "Pl GP" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the largest Rd# for a PI GP greater than 0 and a Reg GP less than 62?
SELECT MAX("Rd #") FROM table_54639 WHERE "Pl GP" > '0' AND "Reg GP" < '62'
wikisql
CREATE TABLE table_55325 ( "Outcome" text, "Date" text, "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 is the tournament on February ...
SELECT "Tournament" FROM table_55325 WHERE "Date" = 'february 17, 2002'
wikisql
CREATE TABLE medication ( medicationid number, patientunitstayid number, drugname text, dosage text, routeadmin text, drugstarttime time, drugstoptime time ) CREATE TABLE allergy ( allergyid number, patientunitstayid number, drugname text, allergyname text, allergytime t...
SELECT intakeoutput.intakeoutputtime FROM intakeoutput WHERE intakeoutput.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '009-9534')) AND intakeoutput.cellpath LIKE '%output%'...
eicu
CREATE TABLE table_60993 ( "Season" text, "LKF Cup" text, "Regional Competitions" text, "Europe" text, "Head Coach" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- WHAT IS THE LKF CUP WITH euroleague group stage AND bbl elite division finalist?
SELECT "LKF Cup" FROM table_60993 WHERE "Europe" = 'euroleague group stage' AND "Regional Competitions" = 'bbl elite division finalist'
wikisql
CREATE TABLE gas_station ( Station_ID int, Open_Year int, Location text, Manager_Name text, Vice_Manager_Name text, Representative_Name text ) CREATE TABLE company ( Company_ID int, Rank int, Company text, Headquarters text, Main_Industry text, Sales_billion real, Pr...
SELECT Headquarters, COUNT(Headquarters) FROM company GROUP BY Headquarters ORDER BY COUNT(Headquarters)
nvbench
CREATE TABLE table_47928 ( "Date" text, "Tournament" text, "Surface" text, "Opponent in the final" text, "Score" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What day was the score for tournament of alcoba a 6 3, 2 6, 7 5?
SELECT "Date" FROM table_47928 WHERE "Tournament" = 'alcobaça' AND "Score" = '6–3, 2–6, 7–5'
wikisql
CREATE TABLE intakeoutput ( intakeoutputid number, patientunitstayid number, cellpath text, celllabel text, cellvaluenumeric number, intakeoutputtime time ) CREATE TABLE microlab ( microlabid number, patientunitstayid number, culturesite text, organism text, culturetakentime...
SELECT MIN(intakeoutput.cellvaluenumeric) FROM intakeoutput WHERE intakeoutput.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '030-42006')) AND intakeoutput.celllabel = 'enter...
eicu
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 jybgb.BGDH FROM person_info JOIN hz_info JOIN mzjzjlb JOIN jybgb ON person_info.RYBH = hz_info.RYBH AND hz_info.YLJGDM = mzjzjlb.YLJGDM AND hz_info.KH = mzjzjlb.KH AND hz_info.KLX = mzjzjlb.KLX AND mzjzjlb.YLJGDM = jybgb.YLJGDM_MZJZJLB AND mzjzjlb.JZLSH = jybgb.JZLSH_MZJZJLB WHERE person_info.XM = '曹诗蕾' AND jyb...
css
CREATE TABLE table_name_42 ( record VARCHAR, date VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What was the record on February 2?
SELECT record FROM table_name_42 WHERE date = "february 2"
sql_create_context
CREATE TABLE table_39447 ( "PRINT NAME" text, "NICKNAME" text, "NUMBER OF COLORS" text, "FRAMED SIZE" text, "DATE COMPLETED" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What was the frame size in 08/87?
SELECT "FRAMED SIZE" FROM table_39447 WHERE "DATE COMPLETED" = '08/87'
wikisql
CREATE TABLE table_31348 ( "Country" text, "Alternante title" text, "TV Network(s)" text, "Series premiere" text, "Series finale" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What was the premiere date for the episode whose alternate title was mi ...
SELECT "Series premiere" FROM table_31348 WHERE "Alternante title" = 'Miłość i przeznaczenie'
wikisql
CREATE TABLE table_76325 ( "Episode" text, "First broadcast" text, "Graeme's guest" text, "Jeremy's guest" text, "Votes (%)" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is Jeremy's Guest, when First Broadcast is '20 March 1998'?
SELECT "Jeremy's guest" FROM table_76325 WHERE "First broadcast" = '20 march 1998'
wikisql
CREATE TABLE table_name_81 ( away_team VARCHAR, venue VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Who was the away team at junction oval?
SELECT away_team FROM table_name_81 WHERE venue = "junction oval"
sql_create_context
CREATE TABLE table_72912 ( "Country" text, "Preliminary" text, "Interview" text, "Swimsuit" text, "Evening Gown" text, "Average" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What country had a swimsuit score of 8.788?
SELECT "Country" FROM table_72912 WHERE "Swimsuit" = '8.788'
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 INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.admission_type = "EMERGENCY" AND procedures.long_title = "Drug detoxification"
mimicsql_data
CREATE TABLE table_name_27 ( laps INTEGER, time_retired VARCHAR, grid VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What was the average amount of laps for competitors with a grid that was more than 11 and a Time/Retired of +28.108?
SELECT AVG(laps) FROM table_name_27 WHERE time_retired = "+28.108" AND grid > 11
sql_create_context
CREATE TABLE hz_info ( KH text, KLX number, YLJGDM text, RYBH text ) CREATE TABLE person_info ( RYBH text, XBDM number, XBMC text, XM text, CSRQ time, CSD text, MZDM text, MZMC text, GJDM text, GJMC text, JGDM text, JGMC text, XLDM text, XLMC 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 track ( name VARCHAR, LOCATION VARCHAR, seating VARCHAR, year_opened VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the name, location and seating for the most recently opened track?
SELECT name, LOCATION, seating FROM track ORDER BY year_opened DESC LIMIT 1
sql_create_context
CREATE TABLE table_test_16 ( "id" int, "left_ventricular_ejection_fraction_lvef" int, "systolic_blood_pressure_sbp" int, "severe_hypertension" bool, "adrenaline" bool, "stroke" bool, "renal_disease" bool, "severe_uncontrolled_arterial_hypertension" bool, "hepatic_disease" bool, "...
SELECT * FROM table_test_16 WHERE temperature < 35
criteria2sql
CREATE TABLE table_name_7 ( sales VARCHAR, peak_position VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Name the sales with peak position of #24
SELECT sales FROM table_name_7 WHERE peak_position = "#24"
sql_create_context
CREATE TABLE table_21620 ( "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 t...
SELECT "Team" FROM table_21620 WHERE "Date" = 'November 5'
wikisql
CREATE TABLE table_22929 ( "\u2116" real, "#" real, "Title" text, "Directed by" text, "Written by" text, "Original air date" text, "Production code" text, "U.S. viewers (millions)" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- How many ...
SELECT "U.S. viewers (millions)" FROM table_22929 WHERE "#" = '6'
wikisql
CREATE TABLE table_55773 ( "Home team" text, "Home team score" text, "Away team" text, "Away team score" text, "Venue" text, "Crowd" real, "Date" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- How many people attended the game at Junction Ov...
SELECT "Crowd" FROM table_55773 WHERE "Venue" = 'junction oval'
wikisql
CREATE TABLE table_18500 ( "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. -- how many party with candidates being charles edward bennett (d) unoppose...
SELECT COUNT("Party") FROM table_18500 WHERE "Candidates" = 'Charles Edward Bennett (D) Unopposed'
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.JCRGH, jyjgzbb.JCRXM FROM hz_info JOIN zzmzjzjlb JOIN jybgb JOIN jyjgzbb ON hz_info.YLJGDM = zzmzjzjlb.YLJGDM AND hz_info.KH = zzmzjzjlb.KH AND hz_info.KLX = zzmzjzjlb.KLX AND zzmzjzjlb.YLJGDM = jybgb.YLJGDM_MZJZJLB AND zzmzjzjlb.JZLSH = jybgb.JZLSH_MZJZJLB AND jybgb.YLJGDM = jyjgzbb.YLJGDM AND jybgb.BGD...
css
CREATE TABLE table_2226817_12 ( original_air_date VARCHAR, production_code VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- when was the episode premiere if the production code is 11.19?
SELECT COUNT(original_air_date) FROM table_2226817_12 WHERE production_code = "11.19"
sql_create_context
CREATE TABLE hz_info ( KH text, KLX number, YLJGDM text, RYBH text ) 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, ...
(SELECT jybgb.BGDH FROM person_info JOIN hz_info JOIN mzjzjlb JOIN jybgb ON person_info.RYBH = hz_info.RYBH AND hz_info.YLJGDM = mzjzjlb.YLJGDM AND hz_info.KH = mzjzjlb.KH AND hz_info.KLX = mzjzjlb.KLX AND mzjzjlb.YLJGDM = jybgb.YLJGDM_MZJZJLB AND mzjzjlb.JZLSH = jybgb.JZLSH_MZJZJLB WHERE person_info.XM = '赵星波' AND jyb...
css
CREATE TABLE table_76305 ( "Year" real, "Title" text, "Billboard Hot 100" text, "Album" text, "Label" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the total years for roots and branches?
SELECT SUM("Year") FROM table_76305 WHERE "Album" = 'roots and branches'
wikisql
CREATE TABLE course ( course_id int, name varchar, department varchar, number varchar, credits varchar, advisory_requirement varchar, enforced_requirement varchar, description varchar, num_semesters int, num_enrolled int, has_discussion varchar, has_lab varchar, has_p...
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 CHARACTERISTICS ( characteristic_id VARCHAR, characteristic_name VARCHAR ) CREATE TABLE products ( product_id VARCHAR, color_code VARCHAR ) CREATE TABLE product_characteristics ( product_id VARCHAR, characteristic_id VARCHAR ) CREATE TABLE ref_colors ( color_code VARCHAR, ...
SELECT COUNT(*) FROM products AS t1 JOIN product_characteristics AS t2 ON t1.product_id = t2.product_id JOIN CHARACTERISTICS AS t3 ON t2.characteristic_id = t3.characteristic_id JOIN ref_colors AS t4 ON t1.color_code = t4.color_code WHERE t4.color_description = "red" AND t3.characteristic_name = "slow"
sql_create_context
CREATE TABLE table_204_371 ( id number, "team" text, "competition" text, "category" text, "appearances\nstart" number, "appearances\nsub" number, "goals" number, "team record" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- did japan have...
SELECT "competition" FROM table_204_371 WHERE "competition" IN ('2013 eaff east asian cup', '2007 fifa u-17 world cup') ORDER BY "appearances\nstart" DESC LIMIT 1
squall
CREATE TABLE table_1802522_4 ( vacator VARCHAR, district VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Name the vacator for tennessee 1st
SELECT vacator FROM table_1802522_4 WHERE district = "Tennessee 1st"
sql_create_context
CREATE TABLE table_70252 ( "Pair No." real, "Comedian:1" text, "Comedian:II" text, "Tansen(Singers)" text, "Place(Result)" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Who is the singer that has Comedian; II of Preeti Amin?
SELECT "Tansen(Singers)" FROM table_70252 WHERE "Comedian:II" = 'preeti amin'
wikisql
CREATE TABLE demographic ( subject_id text, hadm_id text, name text, marital_status text, age text, dob text, gender text, language text, religion text, admission_type text, days_stay text, insurance text, ethnicity text, expire_flag text, admission_location t...
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE diagnoses.short_title = "Chr syst/diastl hrt fail" AND prescriptions.route = "LEFT EYE"
mimicsql_data
CREATE TABLE table_name_88 ( total VARCHAR, rank VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the total of the ranks that did not participate?
SELECT total FROM table_name_88 WHERE rank = "did not participate"
sql_create_context
CREATE TABLE lab ( labid number, patientunitstayid number, labname text, labresult number, labresulttime time ) CREATE TABLE vitalperiodic ( vitalperiodicid number, patientunitstayid number, temperature number, sao2 number, heartrate number, respiration number, systemics...
SELECT COUNT(*) > 0 FROM microlab WHERE microlab.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '031-9128')) AND microlab.culturesite = 'sputum, tracheal specimen' AND STRFTIM...
eicu
CREATE TABLE table_10337 ( "Week" real, "Date" text, "Opponent" text, "Result" text, "Game site" text, "Attendance" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What was the result of the game prior to week 9 with an attendance of 49,970?
SELECT "Result" FROM table_10337 WHERE "Week" < '9' AND "Attendance" = '49,970'
wikisql
CREATE TABLE days ( days_code varchar, day_name varchar ) CREATE TABLE airline ( airline_code varchar, airline_name text, note text ) CREATE TABLE time_zone ( time_zone_code text, time_zone_name text, hours_from_gmt int ) CREATE TABLE time_interval ( period text, begin_time in...
SELECT DISTINCT FLIGHT_0.flight_id FROM 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 AS DATE_DAY_0, date_day AS DATE_DAY_1, date_day AS DATE...
atis
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.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 phone ( Name text, Phone_ID int, Memory_in_G int, Carrier text, Price real ) CREATE TABLE phone_market ( Market_ID int, Phone_ID text, Num_of_stock int ) CREATE TABLE market ( Market_ID int, District text, Num_of_employees int, Num_of_shops real, Rankin...
SELECT Name, COUNT(Name) FROM phone_market AS T1 JOIN market AS T2 ON T1.Market_ID = T2.Market_ID JOIN phone AS T3 ON T1.Phone_ID = T3.Phone_ID GROUP BY Name ORDER BY Name DESC
nvbench
CREATE TABLE table_name_89 ( record VARCHAR, date VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is Record, when Date is 'March 1'?
SELECT record FROM table_name_89 WHERE date = "march 1"
sql_create_context
CREATE TABLE semester ( semester_id int, semester varchar, year int ) CREATE TABLE gsi ( course_offering_id int, student_id int ) CREATE TABLE ta ( campus_job_id int, student_id int, location varchar ) CREATE TABLE comment_instructor ( instructor_id int, student_id int, sc...
SELECT DISTINCT course.department, course.name, course.number, program_course.workload, program_course.workload FROM course, program_course WHERE program_course.category LIKE '%Other%' AND program_course.course_id = course.course_id AND program_course.workload = (SELECT MIN(PROGRAM_COURSEalias1.workload) FROM program_c...
advising
CREATE TABLE cost ( row_id number, subject_id number, hadm_id number, event_type text, event_id number, chargetime time, cost number ) CREATE TABLE d_labitems ( row_id number, itemid number, label text ) CREATE TABLE diagnoses_icd ( row_id number, subject_id number, ...
SELECT COUNT(*) > 0 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 = 10431)) AND outputevents.itemid IN (SELECT d_items.itemid FROM d_items WHERE d_items.label = 'gu irrigant/ur...
mimic_iii
CREATE TABLE PostHistoryTypes ( Id number, Name text ) CREATE TABLE Votes ( Id number, PostId number, VoteTypeId number, UserId number, CreationDate time, BountyAmount number ) CREATE TABLE PostNoticeTypes ( Id number, ClassId number, Name text, Body text, IsHidden ...
SELECT Tags.TagName, COUNT(Posts.Id) AS questions, SUM(ViewCount) AS views FROM Posts LEFT JOIN PostTags ON Posts.Id = PostTags.PostId LEFT JOIN Tags ON PostTags.TagId = Tags.Id WHERE Tags.TagName IN ('asterisk', 'pbx', 'sms', 'voip') GROUP BY Tags.TagName
sede
CREATE TABLE table_74480 ( "Rank" real, "Nation" text, "Gold" real, "Silver" real, "Bronze" real, "Total" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the lowest Total containing a Bronze of 0 and Rank smaller than 2?
SELECT MIN("Total") FROM table_74480 WHERE "Bronze" = '0' AND "Rank" < '2'
wikisql
CREATE TABLE table_58869 ( "DSL Type" text, "Provider" text, "Resale" text, "Down (up to kbit/s)" real, "Up (up to kbit/s)" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- who is the provider when up (up to kbit/s) is 1180?
SELECT "Provider" FROM table_58869 WHERE "Up (up to kbit/s)" = '1180'
wikisql
CREATE TABLE table_21977627_1 ( chassis VARCHAR, engine VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What chasis did the maserati l6s have?
SELECT chassis FROM table_21977627_1 WHERE engine = "Maserati L6s"
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 diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE demographic.insurance = "Medicaid" AND diagnoses.icd9_code = "99659"
mimicsql_data
CREATE TABLE table_26626 ( "Name" text, "Deceased Spouse" text, "Cause of Death" text, "Date of Spouses Death" text, "Length of Marriage" text, "Children Together" text, "Current Marital Status" text ) -- Using valid SQLite, answer the following questions for the tables provided above. --...
SELECT "Cause of Death" FROM table_26626 WHERE "Name" = 'Stella Farentino'
wikisql
CREATE TABLE table_18845 ( "Result" text, "Date" text, "Race" text, "Venue" text, "Group" text, "Distance" text, "Weight (kg)" real, "Jockey" text, "Winner/2nd" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- How many races were for a...
SELECT COUNT("Group") FROM table_18845 WHERE "Distance" = '2020 m'
wikisql
CREATE TABLE table_name_30 ( heat INTEGER, nationality VARCHAR, result VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which Heat has a Nationality of bulgaria, and a Result larger than 55.97?
SELECT MIN(heat) FROM table_name_30 WHERE nationality = "bulgaria" AND result > 55.97
sql_create_context
CREATE TABLE member ( Member_ID text, Name text, Nationality text, Role text ) CREATE TABLE performance ( Performance_ID real, Date text, Host text, Location text, Attendance int ) CREATE TABLE member_attendance ( Member_ID int, Performance_ID int, Num_of_Pieces int ) ...
SELECT Date, COUNT(Date) FROM member_attendance AS T1 JOIN member AS T2 ON T1.Member_ID = T2.Member_ID JOIN performance AS T3 ON T1.Performance_ID = T3.Performance_ID WHERE T2.Role = "Violin" GROUP BY Date
nvbench
CREATE TABLE patient ( uniquepid text, patienthealthsystemstayid number, patientunitstayid number, gender text, age text, ethnicity text, hospitalid number, wardid number, admissionheight number, admissionweight number, dischargeweight number, hospitaladmittime time, ...
SELECT t1.labname FROM (SELECT lab.labname, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM lab WHERE STRFTIME('%y', lab.labresulttime) >= '2105' GROUP BY lab.labname) AS t1 WHERE t1.c1 <= 4
eicu
CREATE TABLE table_58106 ( "Number" text, "Builder" text, "Type" text, "Date" text, "Works number" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- On what Date was the Works Number 7?
SELECT "Date" FROM table_58106 WHERE "Works number" = '7'
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 INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.discharge_location = "REHAB/DISTINCT PART HOSP" AND procedures.long_title = "Enteral infusion of concentrated nutritional substances"
mimicsql_data
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.OUT_DIAG_DIS_NM, AVG(t_kc21.PERSON_AGE) FROM t_kc21 WHERE t_kc21.MED_SER_ORG_NO = '4535136' GROUP BY t_kc21.OUT_DIAG_DIS_NM
css
CREATE TABLE table_2119448_3 ( won_promotion VARCHAR, season VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Name the won promotion for 1987
SELECT won_promotion FROM table_2119448_3 WHERE season = 1987
sql_create_context
CREATE TABLE station_company ( Station_ID int, Company_ID int, Rank_of_the_Year int ) CREATE TABLE company ( Company_ID int, Rank int, Company text, Headquarters text, Main_Industry text, Sales_billion real, Profits_billion real, Assets_billion real, Market_Value real ) ...
SELECT Main_Industry, COUNT(Main_Industry) FROM company WHERE NOT Company_ID IN (SELECT Company_ID FROM station_company) GROUP BY Main_Industry
nvbench
CREATE TABLE table_24692 ( "Location" text, "July (\u00b0C)" text, "July (\u00b0F)" text, "January (\u00b0C)" text, "January (\u00b0F)" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What were the July ( C) temperatures when the July ( F) temperatur...
SELECT "July (\u00b0C)" FROM table_24692 WHERE "July (\u00b0F)" = '71/55'
wikisql
CREATE TABLE table_203_505 ( id number, "number" number, "event" text, "type" text, "matthew" text, "mark" text, "luke" text, "john" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- how many events does john describe ?
SELECT COUNT("event") FROM table_203_505 WHERE NOT "john" IS NULL
squall
CREATE TABLE news_report ( Event_ID VARCHAR, journalist_ID VARCHAR ) CREATE TABLE journalist ( Name VARCHAR, journalist_ID VARCHAR ) CREATE TABLE event ( Date VARCHAR, Event_ID VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Show the names o...
SELECT T3.Name, T2.Date FROM news_report AS T1 JOIN event AS T2 ON T1.Event_ID = T2.Event_ID JOIN journalist AS T3 ON T1.journalist_ID = T3.journalist_ID
sql_create_context
CREATE TABLE table_203_593 ( id number, "tenure" text, "coach" text, "years" number, "record" text, "pct." number, "ncaa tournament" number ) -- Using valid SQLite, answer the following questions for the tables provided above. -- who was the coach after joe connally ?
SELECT "coach" FROM table_203_593 WHERE "tenure" > (SELECT "tenure" FROM table_203_593 WHERE "coach" = 'joe connally') ORDER BY "tenure" LIMIT 1
squall
CREATE TABLE table_name_67 ( rider VARCHAR, laps VARCHAR, grid VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Who is the rider who did less than 20 laps on a grid number greater than 23?
SELECT rider FROM table_name_67 WHERE laps < 20 AND grid > 23
sql_create_context
CREATE TABLE table_11079 ( "Episode Air Date" text, "Audition City" text, "Date" text, "First Audition Venue" text, "Callback Date" text, "Callback Venue" text, "Golden Tickets" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What was the dat...
SELECT "Date" FROM table_11079 WHERE "Golden Tickets" = '26'
wikisql
CREATE TABLE table_2748 ( "Season" real, "Winner" text, "Captain" text, "Coach" text, "League finish" text, "Mat" real, "W" real, "L" real, "Win %" text, "Runner-up" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Name the league ...
SELECT "League finish" FROM table_2748 WHERE "W" = '11'
wikisql
CREATE TABLE table_94 ( "Season" real, "Driver" text, "Team" text, "Engine" text, "Poles" real, "Wins" real, "Podiums" real, "Points" text, "Margin of defeat" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which margin of defeats had...
SELECT "Margin of defeat" FROM table_94 WHERE "Points" = '30'
wikisql