instruction
stringlengths
151
7.46k
output
stringlengths
2
4.44k
source
stringclasses
26 values
CREATE TABLE table_25572118_1 ( date VARCHAR, series VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- When emt 9 is the series what is the date?
SELECT date FROM table_25572118_1 WHERE series = "EMT 9"
sql_create_context
CREATE TABLE table_1281 ( "Mission name" text, "Lunar lander" text, "Lunar landing date" text, "Lunar blastoff date" text, "Lunar landing site" text, "Duration on lunar surface" text, "Crew" text, "Number of s EVA" real, "Total EVA Time (HH:MM)" text ) -- Using valid SQLite, answer...
SELECT "Mission name" FROM table_1281 WHERE "Lunar landing site" = 'Ocean of Storms'
wikisql
CREATE TABLE mzjzjlb_jybgb ( YLJGDM_MZJZJLB text, BGDH number, YLJGDM 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 n...
SELECT jyjgzbb.CKZFWXX, jyjgzbb.CKZFWSX FROM mzjzjlb JOIN jybgb JOIN jyjgzbb JOIN mzjzjlb_jybgb ON mzjzjlb.YLJGDM = mzjzjlb_jybgb.YLJGDM_MZJZJLB AND mzjzjlb.JZLSH = jybgb.JZLSH_MZJZJLB AND jybgb.YLJGDM = jyjgzbb.YLJGDM AND jybgb.BGDH = jyjgzbb.BGDH AND mzjzjlb_jybgb.YLJGDM = jybgb.YLJGDM AND mzjzjlb_jybgb.BGDH = jybgb....
css
CREATE TABLE dual_carrier ( main_airline varchar, low_flight_number int, high_flight_number int, dual_airline varchar, service_name text ) CREATE TABLE days ( days_code varchar, day_name varchar ) CREATE TABLE flight_fare ( flight_id int, fare_id int ) CREATE TABLE fare ( fare...
SELECT DISTINCT flight.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, flight, flight_stop WHERE (CITY_2.city_code = AIRPORT_SERVICE_2.ci...
atis
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(*) FROM intakeoutput WHERE intakeoutput.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '011-14590' AND NOT patient.hospitaldischargetime IS NULL ORDER BY patient....
eicu
CREATE TABLE table_69693 ( "Language" text, "Number" text, "percentage (%)" text, "males" text, "females" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- How many women speak German?
SELECT "females" FROM table_69693 WHERE "Language" = 'german'
wikisql
CREATE TABLE table_68576 ( "Res." text, "Record" text, "Opponent" text, "Method" text, "Event" text, "Round" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What method does the opponent of Dan New use?
SELECT "Method" FROM table_68576 WHERE "Opponent" = 'dan new'
wikisql
CREATE TABLE table_52790 ( "Tournament" text, "Winner" text, "Runner-up" text, "Score" text, "Third Place" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the name of the runner up when yevgeny kafelnikov was third place and the score was 3 6...
SELECT "Runner-up" FROM table_52790 WHERE "Third Place" = 'yevgeny kafelnikov' AND "Score" = '3–6, 6–4, [10–3]'
wikisql
CREATE TABLE table_23877 ( "#" text, "Date" text, "at/vs." text, "Opponent" text, "Score" text, "Attendance" real, "Record" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What game number had an attendance of 2813?
SELECT "#" FROM table_23877 WHERE "Attendance" = '2813'
wikisql
CREATE TABLE catalog_structure ( catalog_level_number number, catalog_id number, catalog_level_name text ) CREATE TABLE catalog_contents_additional_attributes ( catalog_entry_id number, catalog_level_number number, attribute_id number, attribute_value text ) CREATE TABLE attribute_definiti...
SELECT catalog_publisher FROM catalogs GROUP BY catalog_publisher ORDER BY COUNT(*) DESC LIMIT 1
spider
CREATE TABLE table_name_96 ( attendance VARCHAR, week VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What was the total attendance in week 8?
SELECT COUNT(attendance) FROM table_name_96 WHERE week = 8
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 COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.ethnicity = "BLACK/HAITIAN" AND demographic.dob_year < "2184"
mimicsql_data
CREATE TABLE medication ( medicationid number, patientunitstayid number, drugname text, dosage text, routeadmin text, drugstarttime time, drugstoptime time ) CREATE TABLE microlab ( microlabid number, patientunitstayid number, culturesite text, organism text, culturetake...
SELECT t1.drugname FROM (SELECT medication.drugname, COUNT(medication.drugstarttime) AS c1 FROM medication WHERE medication.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '006...
eicu
CREATE TABLE table_train_160 ( "id" int, "alt" float, "systolic_blood_pressure_sbp" int, "ast" float, "platelet_count" float, "diastolic_blood_pressure_dbp" int, "serum_creatinine" float, "triglyceride_tg" float, "hypertension" bool, "NOUSE" float ) -- Using valid SQLite, answe...
SELECT * FROM table_train_160 WHERE alt > 3 OR ast > 3
criteria2sql
CREATE TABLE table_name_66 ( year VARCHAR, position VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- How many years have had the position of 2nd?
SELECT COUNT(year) FROM table_name_66 WHERE position = "2nd"
sql_create_context
CREATE TABLE table_name_12 ( body VARCHAR, event_type VARCHAR, sport VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What body is at the World Championship for Underwater Target shooting?
SELECT body FROM table_name_12 WHERE event_type = "world championship" AND sport = "underwater target shooting"
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 demographic ...
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 = "Adv eff antineoplastic" AND prescriptions.route = "PR"
mimicsql_data
CREATE TABLE table_9409 ( "Name" text, "Country" text, "Town" text, "Height metres / ft" text, "Structural type" text, "Held record" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the height in Rouen?
SELECT "Height metres / ft" FROM table_9409 WHERE "Town" = 'rouen'
wikisql
CREATE TABLE table_name_59 ( surface VARCHAR, opponent_in_the_final VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What was the surface of the tournament where Anna Benzon was the opponent in the final?
SELECT surface FROM table_name_59 WHERE opponent_in_the_final = "anna benzon"
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 zyjzjlb.JZLSH FROM hz_info JOIN zyjzjlb ON hz_info.YLJGDM = zyjzjlb.YLJGDM AND hz_info.KH = zyjzjlb.KH AND hz_info.KLX = zyjzjlb.KLX WHERE hz_info.person_info_XM = '张采文' AND NOT zyjzjlb.JZLSH IN (SELECT jybgb.JZLSH FROM jybgb WHERE jybgb.BGRQ <= '2006-07-17')
css
CREATE TABLE table_22815259_1 ( record VARCHAR, cowboys_points VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Name the number of record for 12 cowboys points
SELECT COUNT(record) FROM table_22815259_1 WHERE cowboys_points = 12
sql_create_context
CREATE TABLE table_21114902_1 ( knockouts_of_the_night VARCHAR, fighter VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- How many knockout of the night occurred when joe lauzon fought.
SELECT knockouts_of_the_night FROM table_21114902_1 WHERE fighter = "Joe Lauzon"
sql_create_context
CREATE TABLE intakeoutput ( intakeoutputid number, patientunitstayid number, cellpath text, celllabel text, cellvaluenumeric number, intakeoutputtime time ) CREATE TABLE vitalperiodic ( vitalperiodicid number, patientunitstayid number, temperature number, sao2 number, heartr...
SELECT COUNT(DISTINCT t1.uniquepid) FROM (SELECT patient.uniquepid, diagnosis.diagnosistime FROM diagnosis JOIN patient ON diagnosis.patientunitstayid = patient.patientunitstayid WHERE diagnosis.diagnosisname = 'metabolic acidosis - severe') AS t1 JOIN (SELECT patient.uniquepid, medication.drugstarttime FROM medication...
eicu
CREATE TABLE table_55085 ( "Series ^" text, "Model" text, "CPU clock ( MHz )" text, "CPU cores" real, "TDP ( W )" text, "L2 cache (KiB)" text, "Radeon cores" real, "DDR3 speed" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Name the aver...
SELECT AVG("DDR3 speed") FROM table_55085 WHERE "Model" = 'e-350'
wikisql
CREATE TABLE table_13660 ( "Year" text, "Start" text, "Qual" text, "Rank" text, "Finish" text, "Laps" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which Laps have a Finish of 15?
SELECT "Laps" FROM table_13660 WHERE "Finish" = '15'
wikisql
CREATE TABLE table_name_44 ( iupac_name VARCHAR, common_name VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the IUPAC name for chloroform?
SELECT iupac_name FROM table_name_44 WHERE common_name = "chloroform"
sql_create_context
CREATE TABLE zyjzjlb ( CYBQDM text, CYBQMC text, CYCWH text, CYKSDM text, CYKSMC text, CYSJ time, CYZTDM number, HZXM text, JZKSDM text, JZKSMC text, JZLSH text, KH text, KLX number, MZBMLX number, MZJZLSH text, MZZDBM text, MZZDMC text, MZZYZDZZBM...
SELECT * FROM hz_info JOIN mzjzjlb JOIN jyjgzbb ON hz_info.YLJGDM = mzjzjlb.YLJGDM AND hz_info.KH = mzjzjlb.KH AND hz_info.KLX = mzjzjlb.KLX AND mzjzjlb.YLJGDM = jyjgzbb.jybgb_YLJGDM_MZJZJLB AND mzjzjlb.JZLSH = jyjgzbb.jybgb_JZLSH_MZJZJLB WHERE hz_info.RYBH = '86192991' AND jyjgzbb.JYRQ BETWEEN '2006-02-16' AND '2012-1...
css
CREATE TABLE table_name_46 ( university_of_dublin VARCHAR, cultural_and_educational_panel VARCHAR, industrial_and_commercial_panel VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the number for the University of Dublin with their Cultural and Educ...
SELECT COUNT(university_of_dublin) FROM table_name_46 WHERE cultural_and_educational_panel = 5 AND industrial_and_commercial_panel < 9
sql_create_context
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 ACC_Road, AVG(Team_ID) FROM basketball_match GROUP BY ACC_Road ORDER BY ACC_Road DESC
nvbench
CREATE TABLE table_56866 ( "Player" text, "Height" text, "School" text, "Hometown" text, "College" text, "NBA Draft" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Where is Terry Mills from?
SELECT "Hometown" FROM table_56866 WHERE "Player" = 'terry mills'
wikisql
CREATE TABLE Employees ( role_code VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Show all role codes with at least 3 employees.
SELECT role_code FROM Employees GROUP BY role_code HAVING COUNT(*) >= 3
sql_create_context
CREATE TABLE table_name_72 ( record_company VARCHAR, year_of_recording VARCHAR, conductor VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What record company did conductor Mikhail Snitko record for after 1996?
SELECT record_company FROM table_name_72 WHERE year_of_recording > 1996 AND conductor = "mikhail snitko"
sql_create_context
CREATE TABLE table_203_228 ( id number, "#" number, "title" text, "songwriters" text, "producer(s)" text, "performer (s)" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- who produced the most tracks ?
SELECT "producer(s)" FROM table_203_228 GROUP BY "producer(s)" ORDER BY COUNT("title") DESC LIMIT 1
squall
CREATE TABLE table_name_46 ( total INTEGER, nation VARCHAR, bronze VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- How many total medals for germany with under 56 bronzes?
SELECT SUM(total) FROM table_name_46 WHERE nation = "germany" AND bronze < 56
sql_create_context
CREATE TABLE table_75863 ( "Round #" real, "Pick #" text, "Player" text, "Position" text, "College" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the College with a Player that is dean caliguire?
SELECT "College" FROM table_75863 WHERE "Player" = 'dean caliguire'
wikisql
CREATE TABLE microlab ( microlabid number, patientunitstayid number, culturesite text, organism text, culturetakentime time ) CREATE TABLE vitalperiodic ( vitalperiodicid number, patientunitstayid number, temperature number, sao2 number, heartrate number, respiration number,...
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 = '004-66442')) AND medication.drugname = '30 ml cup : alum & mag hydroxide-s...
eicu
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 WHERE diagnoses.short_title = "Status autm crd dfbrltr"
mimicsql_data
CREATE TABLE catalogs ( catalog_id number, catalog_name text, catalog_publisher text, date_of_publication time, date_of_latest_revision time ) CREATE TABLE attribute_definitions ( attribute_id number, attribute_name text, attribute_data_type text ) CREATE TABLE catalog_structure ( ...
SELECT COUNT(*) FROM catalog_contents
spider
CREATE TABLE race ( name VARCHAR, track_id VARCHAR ) CREATE TABLE track ( name VARCHAR, track_id VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Show all track names that have had no races.
SELECT name FROM track WHERE NOT track_id IN (SELECT track_id FROM race)
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 diagnoses ( ...
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.gender = "M" AND demographic.diagnosis = "GUILLAIN BARRE SYNDROME"
mimicsql_data
CREATE TABLE t_kc22 ( AMOUNT number, CHA_ITEM_LEV number, DATA_ID text, DIRE_TYPE number, DOSE_FORM text, DOSE_UNIT text, EACH_DOSAGE text, EXP_OCC_DATE time, FLX_MED_ORG_ID text, FXBZ number, HOSP_DOC_CD text, HOSP_DOC_NM text, MED_CLINIC_ID text, MED_DIRE_CD tex...
SELECT qtb.FLX_MED_ORG_ID FROM qtb WHERE qtb.MED_CLINIC_ID = '04955741225' UNION SELECT gyb.FLX_MED_ORG_ID FROM gyb WHERE gyb.MED_CLINIC_ID = '04955741225' UNION SELECT zyb.FLX_MED_ORG_ID FROM zyb WHERE zyb.MED_CLINIC_ID = '04955741225' UNION SELECT mzb.FLX_MED_ORG_ID FROM mzb WHERE mzb.MED_CLINIC_ID = '04955741225'
css
CREATE TABLE table_56913 ( "Year" text, "2010" real, "2009" real, "2008" real, "2005" real, "2000" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Name the total number of 2010 for when 2009 is less than 14, 2008 is less than 15 and 2005 is 3
SELECT COUNT("2010") FROM table_56913 WHERE "2009" < '14' AND "2008" < '15' AND "2005" = '3'
wikisql
CREATE TABLE table_name_6 ( time_retired VARCHAR, driver VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is nigel mansell's time/retired?
SELECT time_retired FROM table_name_6 WHERE driver = "nigel mansell"
sql_create_context
CREATE TABLE table_name_93 ( tournament VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- During the Hamburg Masters Tournament, during which Ji Nov k was absent(A) in 1998, how did he do in 1997?
SELECT 1997 FROM table_name_93 WHERE 1998 = "a" AND tournament = "hamburg masters"
sql_create_context
CREATE TABLE table_18475946_2 ( rnag__mhz_ VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the 2fm for rnag 94.4?
SELECT 2 AS fm__mhz_ FROM table_18475946_2 WHERE rnag__mhz_ = "94.4"
sql_create_context
CREATE TABLE PostsWithDeleted ( Id number, PostTypeId number, AcceptedAnswerId number, ParentId number, CreationDate time, DeletionDate time, Score number, ViewCount number, Body text, OwnerUserId number, OwnerDisplayName text, LastEditorUserId number, LastEditorDispl...
SELECT age, COUNT(*) FROM Users GROUP BY age ORDER BY age
sede
CREATE TABLE medication ( medicationid number, patientunitstayid number, drugname text, dosage text, routeadmin text, drugstarttime time, drugstoptime time ) CREATE TABLE diagnosis ( diagnosisid number, patientunitstayid number, diagnosisname text, diagnosistime time, ic...
SELECT lab.labname FROM lab WHERE lab.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '006-195316' AND patient.hospitaldischargetime IS NULL)) ORDER BY lab.labresulttime LIMIT ...
eicu
CREATE TABLE table_204_54 ( id number, "pondicherry assembly" text, "duration" text, "name of m.l.a." text, "party affiliation" text, "election year" number ) -- Using valid SQLite, answer the following questions for the tables provided above. -- what was the name of m.l.a. previous to the cu...
SELECT "name of m.l.a." FROM table_204_54 WHERE id = (SELECT MAX(id) FROM table_204_54) - 1
squall
CREATE TABLE table_37328 ( "Unit" text, "Russian" text, "Translation" text, "Ratio" real, "Metric value" text, "Avoirdupois value" text, "Ordinary value" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the largest ration with an ordin...
SELECT MAX("Ratio") FROM table_37328 WHERE "Ordinary value" = '84 zolotnik'
wikisql
CREATE TABLE table_7015 ( "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 was the location of the accident that led to 50/50 fatalities?
SELECT "Location" FROM table_7015 WHERE "Fatalities" = '50/50'
wikisql
CREATE TABLE table_62779 ( "Title" text, "Series" text, "Director" text, "Production Number" text, "Release date" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the title with chuck jones as the director and the production number 9537?
SELECT "Title" FROM table_62779 WHERE "Director" = 'chuck jones' AND "Production Number" = '9537'
wikisql
CREATE TABLE table_1580 ( "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. -- How man...
SELECT COUNT("Score") FROM table_1580 WHERE "High rebounds" = 'David Lee (13)'
wikisql
CREATE TABLE t_kc22 ( AMOUNT number, CHA_ITEM_LEV number, DATA_ID text, DIRE_TYPE number, DOSE_FORM text, DOSE_UNIT text, EACH_DOSAGE text, EXP_OCC_DATE time, FLX_MED_ORG_ID text, FXBZ number, HOSP_DOC_CD text, HOSP_DOC_NM text, MED_CLINIC_ID text, MED_DIRE_CD tex...
SELECT COUNT(*) FROM (SELECT t_kc24.t_kc21_MED_ORG_DEPT_CD FROM t_kc24 WHERE t_kc24.t_kc21_MED_SER_ORG_NO = '3601816' AND t_kc24.CLINIC_SLT_DATE BETWEEN '2005-05-13' AND '2016-07-14' GROUP BY t_kc24.t_kc21_MED_ORG_DEPT_CD HAVING SUM(t_kc24.MED_AMOUT) >= 1904.15) AS T
css
CREATE TABLE table_name_68 ( name VARCHAR, spike VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Who has exactly 342 spikes?
SELECT name FROM table_name_68 WHERE spike = 342
sql_create_context
CREATE TABLE table_4016 ( "Institution" text, "Location" text, "Founded" real, "Affiliation" text, "Enrollment" real, "Team Nickname" text, "Primary conference" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Name the founded for florida stat...
SELECT "Founded" FROM table_4016 WHERE "Institution" = 'Florida State University'
wikisql
CREATE TABLE table_23106 ( "No." real, "Date" text, "Tournament" text, "Winning score" text, "To par" text, "Margin of victory" text, "Runner(s)-up" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What was the margin of victory of Steve Stric...
SELECT "Margin of victory" FROM table_23106 WHERE "Runner(s)-up" = 'Steve Stricker'
wikisql
CREATE TABLE table_70014 ( "Year" real, "Entrant" text, "Chassis" text, "Engine" text, "Points" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which Chassis has more than 0 points, an Entrant of Scuderia Ferrari, and was later than 1952?
SELECT "Chassis" FROM table_70014 WHERE "Points" > '0' AND "Entrant" = 'scuderia ferrari' AND "Year" > '1952'
wikisql
CREATE TABLE table_name_76 ( attendance VARCHAR, date VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What was the total attendance on September 12?
SELECT attendance FROM table_name_76 WHERE date = "september 12"
sql_create_context
CREATE TABLE cost ( costid number, uniquepid text, patienthealthsystemstayid number, eventtype text, eventid number, chargetime time, cost number ) CREATE TABLE patient ( uniquepid text, patienthealthsystemstayid number, patientunitstayid number, gender text, age text, ...
SELECT COUNT(DISTINCT t1.uniquepid) FROM (SELECT patient.uniquepid, treatment.treatmenttime FROM treatment JOIN patient ON treatment.patientunitstayid = patient.patientunitstayid WHERE treatment.treatmentname = 'antibiotics - penicillins' AND DATETIME(treatment.treatmenttime) >= DATETIME(CURRENT_TIME(), '-3 year')) AS ...
eicu
CREATE TABLE table_29565673_2 ( blank_ends VARCHAR, w INTEGER ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the blank ends record when the win record is higher than 6.0?
SELECT blank_ends FROM table_29565673_2 WHERE w > 6.0
sql_create_context
CREATE TABLE table_name_44 ( d_43 VARCHAR, d_41 VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the D43 associated with a D41 of r 21?
SELECT d_43 FROM table_name_44 WHERE d_41 = "r 21"
sql_create_context
CREATE TABLE table_58341 ( "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. -- Who was the home team at princes park?
SELECT "Home team" FROM table_58341 WHERE "Venue" = 'princes park'
wikisql
CREATE TABLE table_name_50 ( record VARCHAR, week VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the Record in Week 2?
SELECT record FROM table_name_50 WHERE week = 2
sql_create_context
CREATE TABLE table_61051 ( "Model" text, "Years" text, "Engine" text, "Power" text, "0\u2013100km/h (62mph)" text, "Top Speed" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the 0 100km/h (62mph) acceleration of the model with a top spee...
SELECT "0\u2013100km/h (62mph)" FROM table_61051 WHERE "Top Speed" = '208km/h (129mph)'
wikisql
CREATE TABLE chartevents ( row_id number, subject_id number, hadm_id number, icustay_id number, itemid number, charttime time, valuenum number, valueuom text ) CREATE TABLE labevents ( row_id number, subject_id number, hadm_id number, itemid number, charttime time, ...
SELECT transfers.careunit FROM transfers WHERE transfers.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 4718) AND NOT transfers.careunit IS NULL AND DATETIME(transfers.intime) <= DATETIME(CURRENT_TIME(), '-4 year') ORDER BY transfers.intime LIMIT 1
mimic_iii
CREATE TABLE ReviewTaskTypes ( Id number, Name text, Description text ) CREATE TABLE ReviewRejectionReasons ( Id number, Name text, Description text, PostTypeId number ) CREATE TABLE PostHistory ( Id number, PostHistoryTypeId number, PostId number, RevisionGUID other, C...
SELECT * FROM Posts WHERE OwnerUserId = '1850851' ORDER BY ViewCount
sede
CREATE TABLE table_67059 ( "Year" real, "Tournament" text, "Venue" text, "Result" text, "Event" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What tournement was held in Helsinki, Finland in 2005?
SELECT "Event" FROM table_67059 WHERE "Venue" = 'helsinki, finland'
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 prescriptions ( subject_id text, hadm_id text, icustay_id text, drug_type text, drug text, formulary_drug_cd text, ...
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.gender = "M" AND demographic.discharge_location = "HOME HEALTH CARE"
mimicsql_data
CREATE TABLE table_name_58 ( overall INTEGER, round VARCHAR, position VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What was the Overall number for the player with a position of C and a round greater than 7?
SELECT SUM(overall) FROM table_name_58 WHERE round > 7 AND position = "c"
sql_create_context
CREATE TABLE table_48866 ( "Season" real, "Total Attendance" real, "Games" real, "Average" real, "High avg." real, "Team" text, "No. Of Clubs" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the maximum number of games when the season...
SELECT MAX("Games") FROM table_48866 WHERE "Season" > '2001' AND "Average" < '10,838'
wikisql
CREATE TABLE d_items ( row_id number, itemid number, label text, linksto text ) CREATE TABLE cost ( row_id number, subject_id number, hadm_id number, event_type text, event_id number, chargetime time, cost number ) CREATE TABLE outputevents ( row_id number, subject_...
SELECT t3.drug FROM (SELECT t2.drug, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM (SELECT admissions.subject_id, prescriptions.startdate FROM prescriptions JOIN admissions ON prescriptions.hadm_id = admissions.hadm_id WHERE prescriptions.drug = 'phenylephrine' AND DATETIME(prescriptions.startdate, 'start of ye...
mimic_iii
CREATE TABLE table_11901 ( "Week" real, "Date" text, "Opponent" text, "Home/Away" text, "Result" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the date against the Tampa bay Storm?
SELECT "Date" FROM table_11901 WHERE "Opponent" = 'tampa bay storm'
wikisql
CREATE TABLE table_name_31 ( date VARCHAR, loss VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Name the date for Loss of schilling (5 2)
SELECT date FROM table_name_31 WHERE loss = "schilling (5–2)"
sql_create_context
CREATE TABLE jyjgzbb ( BGDH text, BGRQ time, CKZFWDX text, CKZFWSX number, CKZFWXX number, JCFF text, JCRGH text, JCRXM text, JCXMMC text, JCZBDM text, JCZBJGDL number, JCZBJGDW text, JCZBJGDX text, JCZBMC text, JLDW text, JYRQ time, JYZBLSH text, ...
SELECT jybgb.BGDH FROM hz_info JOIN zzmzjzjlb JOIN jybgb 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 WHERE hz_info.RYBH = '05865201' AND NOT jybgb.BGDH IN (SELECT jyjgzbb.BGDH FRO...
css
CREATE TABLE table_name_99 ( game_site VARCHAR, attendance VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Where was the game with the attendance of 54,436?
SELECT game_site FROM table_name_99 WHERE attendance = "54,436"
sql_create_context
CREATE TABLE table_19839391_3 ( no_decisions INTEGER, winning__percentage VARCHAR, wins VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- how many 'no decisions' are there with 3 wins and a win percentage of 1.000?
SELECT MIN(no_decisions) FROM table_19839391_3 WHERE winning__percentage = "1.000" AND wins = 3
sql_create_context
CREATE TABLE hz_info ( KH text, KLX number, RYBH text, YLJGDM text ) CREATE TABLE mzjzjlb_jybgb ( YLJGDM_MZJZJLB text, BGDH number, YLJGDM number ) CREATE TABLE jybgb ( BBCJBW text, BBDM text, BBMC text, BBZT number, BGDH text, BGJGDM text, BGJGMC text, BGRG...
SELECT COUNT(*) FROM (SELECT jybgb.KSBM FROM mzjzjlb JOIN jybgb JOIN mzjzjlb_jybgb ON mzjzjlb.YLJGDM = mzjzjlb_jybgb.YLJGDM_MZJZJLB AND mzjzjlb.JZLSH = jybgb.JZLSH_MZJZJLB AND mzjzjlb_jybgb.YLJGDM = jybgb.YLJGDM AND mzjzjlb_jybgb.BGDH = jybgb.BGDH AND mzjzjlb_jybgb.YLJGDM = jybgb.YLJGDM AND mzjzjlb_jybgb.BGDH = jybgb.B...
css
CREATE TABLE table_75587 ( "Name" text, "Pennant number" text, "Builder" text, "Laid Down" text, "Launched" text, "Commissioned" text, "Current status" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- what builder launched the name minerva
SELECT "Launched" FROM table_75587 WHERE "Name" = 'minerva'
wikisql
CREATE TABLE cost ( row_id number, subject_id number, hadm_id number, event_type text, event_id number, chargetime time, cost number ) CREATE TABLE inputevents_cv ( row_id number, subject_id number, hadm_id number, icustay_id number, charttime time, itemid number, ...
SELECT COUNT(*) > 0 FROM microbiologyevents WHERE microbiologyevents.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 4469) AND microbiologyevents.spec_type_desc = 'throat culture' AND NOT microbiologyevents.org_name IS NULL ORDER BY microbiologyevents.charttime DESC LIMIT 1
mimic_iii
CREATE TABLE InvoiceLine ( InvoiceLineId integer, InvoiceId integer, TrackId integer, UnitPrice decimal(10,2), Quantity integer ) CREATE TABLE Employee ( EmployeeId integer, LastName varchar(20), FirstName varchar(20), Title varchar(30), ReportsTo integer, BirthDate datetime...
SELECT T1.Title, T1.AlbumId FROM Album AS T1 JOIN Track AS T2 ON T1.AlbumId = T2.AlbumId WHERE T2.UnitPrice > 1 ORDER BY T1.AlbumId DESC
nvbench
CREATE TABLE table_name_86 ( nationality VARCHAR, name VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which Nationality has a Name of assyrian?
SELECT nationality FROM table_name_86 WHERE name = "assyrian"
sql_create_context
CREATE TABLE jobs ( JOB_ID varchar(10), JOB_TITLE varchar(35), MIN_SALARY decimal(6,0), MAX_SALARY decimal(6,0) ) CREATE TABLE countries ( COUNTRY_ID varchar(2), COUNTRY_NAME varchar(40), REGION_ID decimal(10,0) ) CREATE TABLE job_history ( EMPLOYEE_ID decimal(6,0), START_DATE date...
SELECT FIRST_NAME, MANAGER_ID FROM employees ORDER BY FIRST_NAME DESC
nvbench
CREATE TABLE table_12171 ( "Outcome" text, "Date" text, "Tournament" text, "Surface" text, "Partner" text, "Opponents" text, "Score" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- The tournament with the opponent of Kelly De Beer Eva Pera wa...
SELECT "Date" FROM table_12171 WHERE "Opponents" = 'kelly de beer eva pera'
wikisql
CREATE TABLE school_details ( school_id number, nickname text, colors text, league text, class text, division text ) CREATE TABLE school_performance ( school_id number, school_year text, class_a text, class_aa text ) CREATE TABLE player ( player_id number, player text, ...
SELECT T2.location FROM player AS T1 JOIN school AS T2 ON T1.school_id = T2.school_id GROUP BY T1.school_id HAVING COUNT(*) > 1
spider
CREATE TABLE table_name_9 ( score VARCHAR, record VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the score for 4-1?
SELECT score FROM table_name_9 WHERE record = "4-1"
sql_create_context
CREATE TABLE PostHistoryTypes ( Id number, Name text ) CREATE TABLE ReviewTaskTypes ( Id number, Name text, Description text ) CREATE TABLE PostTypes ( Id number, Name text ) CREATE TABLE PostLinks ( Id number, CreationDate time, PostId number, RelatedPostId number, Li...
SELECT p.Id AS "post_link" FROM Posts AS p, PostHistory AS ph WHERE p.PostTypeId = 2 AND ph.PostId = p.Id AND ph.PostHistoryTypeId IN (38) AND p.OwnerUserId = '##userId##' ORDER BY p.Id
sede
CREATE TABLE student_record ( student_id int, course_id int, semester int, grade varchar, how varchar, transfer_source varchar, earn_credit varchar, repeat_term varchar, test_id varchar ) CREATE TABLE ta ( campus_job_id int, student_id int, location varchar ) CREATE TAB...
SELECT COUNT(DISTINCT course.course_id) FROM course, course_offering, program_course, semester WHERE course.course_id = course_offering.course_id AND course.credits = 7 AND course.department = 'UC' AND program_course.category LIKE '%ULCS%' AND program_course.course_id = course.course_id AND semester.semester = 'Summer'...
advising
CREATE TABLE TagSynonyms ( Id number, SourceTagName text, TargetTagName text, CreationDate time, OwnerUserId number, AutoRenameCount number, LastAutoRename time, Score number, ApprovedByUserId number, ApprovalDate time ) CREATE TABLE Users ( Id number, Reputation number,...
SELECT DATETIMEFROMPARTS(TIME_TO_STR(CreationDate, '%Y'), TIME_TO_STR(CreationDate, '%m'), 1, 0, 0, 0, 0) AS date, COUNT(*) AS count FROM Posts WHERE PostTypeId = 2 GROUP BY TIME_TO_STR(CreationDate, '%Y'), TIME_TO_STR(CreationDate, '%m') ORDER BY TIME_TO_STR(CreationDate, '%Y'), TIME_TO_STR(CreationDate, '%m')
sede
CREATE TABLE table_203_478 ( id number, "week" number, "date" text, "opponent" text, "result" text, "attendance" number ) -- Using valid SQLite, answer the following questions for the tables provided above. -- against which opponent were there the most people in attendance ?
SELECT "opponent" FROM table_203_478 ORDER BY "attendance" DESC LIMIT 1
squall
CREATE TABLE table_61883 ( "Tie no" text, "Home team" text, "Score 1" text, "Away team" text, "Attendance" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the Home team of Tie no 11?
SELECT "Home team" FROM table_61883 WHERE "Tie no" = '11'
wikisql
CREATE TABLE table_13537 ( "Event" text, "Record" text, "Nationality" text, "Date" text, "Games" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the Record of the 3000 M?
SELECT "Record" FROM table_13537 WHERE "Event" = '3000 m'
wikisql
CREATE TABLE table_204_851 ( id number, "serial number" number, "river" text, "name" text, "area (km2)" number, "district" text, "co-ordinate" text, "altitude (m)" number ) -- Using valid SQLite, answer the following questions for the tables provided above. -- name a reservoir that ha...
SELECT "name" FROM table_204_851 WHERE "altitude (m)" > 100 AND "altitude (m)" < 500
squall
CREATE TABLE table_name_11 ( prize VARCHAR, event VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the Prize, when the Event is Ept Sanremo?
SELECT prize FROM table_name_11 WHERE event = "ept sanremo"
sql_create_context
CREATE TABLE table_65088 ( "Peak" text, "Country" text, "Elevation (m)" real, "Prominence (m)" real, "Col (m)" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Count the Prominence (m) of Col (m) smaller than 0?
SELECT AVG("Prominence (m)") FROM table_65088 WHERE "Col (m)" < '0'
wikisql
CREATE TABLE film ( title VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- How many films have the word 'Dummy' in their titles?
SELECT COUNT(*) FROM film WHERE title LIKE "%Dummy%"
sql_create_context
CREATE TABLE table_name_59 ( game_site VARCHAR, week VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Where did they have the divisional playoffs?
SELECT game_site FROM table_name_59 WHERE week = "divisional playoffs"
sql_create_context
CREATE TABLE instructor ( instructor_id int, name varchar, uniqname varchar ) CREATE TABLE gsi ( course_offering_id int, student_id int ) CREATE TABLE requirement ( requirement_id int, requirement varchar, college varchar ) CREATE TABLE program ( program_id int, name varchar, ...
SELECT DISTINCT name, number FROM course WHERE department = 'BIOLCHEM' AND credits = 11
advising
CREATE TABLE table_202_200 ( id number, "year" number, "title" text, "role" text, "notes" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- what movies did greenstreet act for in 1946 ?
SELECT "title" FROM table_202_200 WHERE "year" = 1946
squall
CREATE TABLE Sportsinfo ( StuID VARCHAR, gamesplayed INTEGER ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Show all student IDs with the number of sports and total number of games played
SELECT StuID, COUNT(*), SUM(gamesplayed) FROM Sportsinfo GROUP BY StuID
sql_create_context
CREATE TABLE table_27135 ( "Round" text, "Circuit" text, "Date" text, "Class A Winner" text, "Class B Winner" text, "Class C Winner" text, "Class D Winner" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Who was the Class C winner in round 8?...
SELECT "Class C Winner" FROM table_27135 WHERE "Round" = '8'
wikisql