instruction
stringlengths
151
7.46k
output
stringlengths
2
4.44k
source
stringclasses
26 values
CREATE TABLE table_65929 ( "Team" text, "Car Spec." text, "Drivers" text, "Class" text, "Rounds" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the car specs for team Airwaves BMW's driver Rob Collard?
SELECT "Car Spec." FROM table_65929 WHERE "Team" = 'airwaves bmw' AND "Drivers" = 'rob collard'
wikisql
CREATE TABLE inst ( instid number, name text, country text ) CREATE TABLE papers ( paperid number, title text ) CREATE TABLE authorship ( authid number, instid number, paperid number, authorder number ) CREATE TABLE authors ( authid number, lname text, fname text ) -...
SELECT COUNT(*) FROM authors
spider
CREATE TABLE table_2570269_2 ( original_air_date__uk_ VARCHAR, episode__number VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- If the episode number is 2-01 what is the original UK air date?
SELECT original_air_date__uk_ FROM table_2570269_2 WHERE episode__number = "2-01"
sql_create_context
CREATE TABLE cite ( citingpaperid int, citedpaperid int ) CREATE TABLE journal ( journalid int, journalname varchar ) CREATE TABLE venue ( venueid int, venuename varchar ) CREATE TABLE paperfield ( fieldid int, paperid int ) CREATE TABLE paperkeyphrase ( paperid int, keyphras...
SELECT DISTINCT COUNT(paper.paperid) FROM keyphrase, paper, paperkeyphrase WHERE keyphrase.keyphrasename = 'developing world' AND paperkeyphrase.keyphraseid = keyphrase.keyphraseid AND paper.paperid = paperkeyphrase.paperid AND paper.year = year0
scholar
CREATE TABLE table_name_50 ( agg VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What was the score of the second leg with an agg of 4-6?
SELECT 2 AS nd_leg FROM table_name_50 WHERE agg = "4-6"
sql_create_context
CREATE TABLE table_66494 ( "Rank" text, "Nation" text, "Gold" real, "Silver" real, "Bronze" real, "Total" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What was the highest number of bronze medals when there were a total of 4 medals, 1 silver m...
SELECT MAX("Bronze") FROM table_66494 WHERE "Total" = '4' AND "Silver" = '1' AND "Gold" < '2'
wikisql
CREATE TABLE table_name_89 ( country VARCHAR, town VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- what country has dubai
SELECT country FROM table_name_89 WHERE town = "dubai"
sql_create_context
CREATE TABLE table_name_39 ( year INTEGER, mintage VARCHAR, issue_price VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the latest year that has an n/a mintage and an Issue Price of $89.95?
SELECT MAX(year) FROM table_name_39 WHERE mintage = "n/a" AND issue_price = "$89.95"
sql_create_context
CREATE TABLE allergy ( allergyid number, patientunitstayid number, drugname text, allergyname text, allergytime time ) CREATE TABLE medication ( medicationid number, patientunitstayid number, drugname text, dosage text, routeadmin text, drugstarttime time, drugstoptime t...
SELECT (SELECT patient.admissionweight FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '017-101426' AND NOT patient.hospitaldischargetime IS NULL ORDER BY patient.hospitaladmittime DESC LIMIT 1) AND NOT patient.admissionweight IS N...
eicu
CREATE TABLE cost ( row_id number, subject_id number, hadm_id number, event_type text, event_id number, chargetime time, cost number ) CREATE TABLE transfers ( row_id number, subject_id number, hadm_id number, icustay_id number, eventtype text, careunit text, war...
SELECT COUNT(DISTINCT t2.subject_id) FROM (SELECT t1.subject_id, t1.charttime FROM (SELECT admissions.subject_id, diagnoses_icd.charttime FROM diagnoses_icd JOIN admissions ON diagnoses_icd.hadm_id = admissions.hadm_id WHERE diagnoses_icd.icd9_code = (SELECT d_icd_diagnoses.icd9_code FROM d_icd_diagnoses WHERE d_icd_di...
mimic_iii
CREATE TABLE table_name_31 ( home_team VARCHAR, away_team VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What did the home team score when the away team was South Melbourne?
SELECT home_team AS score FROM table_name_31 WHERE away_team = "south melbourne"
sql_create_context
CREATE TABLE outputevents ( row_id number, subject_id number, hadm_id number, icustay_id number, charttime time, itemid number, value number ) CREATE TABLE cost ( row_id number, subject_id number, hadm_id number, event_type text, event_id number, chargetime time, ...
SELECT COUNT(DISTINCT t1.subject_id) FROM (SELECT admissions.subject_id, procedures_icd.charttime FROM procedures_icd JOIN admissions ON procedures_icd.hadm_id = admissions.hadm_id WHERE procedures_icd.icd9_code = (SELECT d_icd_procedures.icd9_code FROM d_icd_procedures WHERE d_icd_procedures.short_title = 'cont inv me...
mimic_iii
CREATE TABLE table_6534 ( "Nation" text, "Gold" real, "Silver" real, "Bronze" real, "Total" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- How many bronzes for the nation with over 20 total, under 26 golds, and over 0 silvers?
SELECT COUNT("Bronze") FROM table_6534 WHERE "Silver" > '0' AND "Total" > '20' AND "Gold" < '26'
wikisql
CREATE TABLE table_name_76 ( _specialist_ VARCHAR, physician__gp_ INTEGER, all_nurses VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the number of physicians in the region with an all nurses number of 91?
SELECT MIN(physician__gp_) & _specialist_ FROM table_name_76 WHERE all_nurses = 91
sql_create_context
CREATE TABLE allergy ( allergyid number, patientunitstayid number, drugname text, allergyname text, allergytime time ) CREATE TABLE lab ( labid number, patientunitstayid number, labname text, labresult number, labresulttime time ) CREATE TABLE intakeoutput ( intakeoutputid ...
SELECT COUNT(DISTINCT patient.uniquepid) FROM patient WHERE patient.patientunitstayid IN (SELECT treatment.patientunitstayid FROM treatment WHERE treatment.treatmentname = 'antiplatelet agent - aggregation inhibitors' AND STRFTIME('%y', treatment.treatmenttime) <= '2101')
eicu
CREATE TABLE table_name_72 ( number_of_sequences_number_of_sequences VARCHAR, name VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the number of sequences for the name Alifoldz?
SELECT number_of_sequences_number_of_sequences AS :_ FROM table_name_72 WHERE name = "alifoldz"
sql_create_context
CREATE TABLE table_name_32 ( average_annual VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the average value for 2005, when the value for Average annual is 767?
SELECT AVG(2005) FROM table_name_32 WHERE average_annual = 767
sql_create_context
CREATE TABLE table_39602 ( "Bank" text, "Asset" real, "Loans" real, "NPL Net" text, "Deposits" real, "Net Interest Income" real, "Non-Interest Income" real, "Net Profit" real, "No. of Employees" text, "No. of Branches/Offices" real, "No. of ATMs" text ) -- Using valid SQLit...
SELECT "NPL Net" FROM table_39602 WHERE "Bank" = 'citibank'
wikisql
CREATE TABLE table_name_97 ( rank__timeslot_ INTEGER, rating VARCHAR, share VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the timeslot rank when the rating is smaller than 2.6 and the share is more than 4?
SELECT AVG(rank__timeslot_) FROM table_name_97 WHERE rating < 2.6 AND share > 4
sql_create_context
CREATE TABLE table_49264 ( "Poll Source" text, "Dates administered" text, "Democrat: Larry LaRocco" text, "Republican: Jim Risch" text, "Lead Margin" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which Poll Source has a Republican Jim Risch of 43%?...
SELECT "Poll Source" FROM table_49264 WHERE "Republican: Jim Risch" = '43%'
wikisql
CREATE TABLE table_63509 ( "Total fat" text, "Saturated fat" text, "Monounsaturated fat" text, "Polyunsaturated fat" text, "Smoke point" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the monounsaturated fat with 15g of saturated fat?
SELECT "Monounsaturated fat" FROM table_63509 WHERE "Saturated fat" = '15g'
wikisql
CREATE TABLE CloseReasonTypes ( Id number, Name text, Description text ) CREATE TABLE PostHistory ( Id number, PostHistoryTypeId number, PostId number, RevisionGUID other, CreationDate time, UserId number, UserDisplayName text, Comment text, Text text, ContentLicense...
SELECT * FROM Posts WHERE Tags LIKE '%redis%'
sede
CREATE TABLE station ( services VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- How many different services are provided by all stations?
SELECT COUNT(DISTINCT services) FROM station
sql_create_context
CREATE TABLE artist ( artist_name text, country text, gender text, preferred_genre text ) CREATE TABLE files ( f_id number, artist_name text, file_size text, duration text, formats text ) CREATE TABLE genre ( g_name text, rating text, most_popular_in text ) CREATE TABL...
SELECT AVG(rating), AVG(resolution) FROM song WHERE languages = "bangla"
spider
CREATE TABLE machine ( machine_id VARCHAR, quality_rank VARCHAR ) CREATE TABLE technician ( Name VARCHAR, technician_ID VARCHAR ) CREATE TABLE repair_assignment ( machine_id VARCHAR, technician_ID VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. ...
SELECT T3.Name FROM repair_assignment AS T1 JOIN machine AS T2 ON T1.machine_id = T2.machine_id JOIN technician AS T3 ON T1.technician_ID = T3.technician_ID ORDER BY T2.quality_rank
sql_create_context
CREATE TABLE table_name_6 ( rank INTEGER, gold VARCHAR, nation VARCHAR, bronze VARCHAR, silver VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the average rank Finland, which has 1 bronze, more than 1 silver, and less than 0 gold, has?
SELECT AVG(rank) FROM table_name_6 WHERE bronze = 1 AND silver > 1 AND nation = "finland" AND gold < 0
sql_create_context
CREATE TABLE demographic ( subject_id text, hadm_id text, name text, marital_status text, age text, dob text, gender text, language text, religion text, admission_type text, days_stay text, insurance text, ethnicity text, expire_flag text, admission_location t...
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.language = "CAPE" AND demographic.admission_location = "TRSF WITHIN THIS FACILITY"
mimicsql_data
CREATE TABLE table_name_56 ( year VARCHAR, band VARCHAR, lifetime_achievement_award VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- In what year did Aslan receive a Lifetime Achievement Award and Snow Patrol perform?
SELECT year FROM table_name_56 WHERE band = "snow patrol" AND lifetime_achievement_award = "aslan"
sql_create_context
CREATE TABLE person ( name text, age number, city text, gender text, job text ) CREATE TABLE personfriend ( name text, friend text, year number ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Whare the names, friends, and ages of all people w...
SELECT DISTINCT T2.name, T2.friend, T1.age FROM person AS T1 JOIN personfriend AS T2 ON T1.name = T2.friend WHERE T1.age > (SELECT AVG(age) FROM person)
spider
CREATE TABLE prescriptions ( subject_id text, hadm_id text, icustay_id text, drug_type text, drug text, formulary_drug_cd text, route text, drug_dose text ) CREATE TABLE diagnoses ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) C...
SELECT MIN(demographic.age) FROM demographic WHERE demographic.marital_status = "MARRIED" AND demographic.discharge_location = "DISCH-TRAN TO PSYCH HOSP"
mimicsql_data
CREATE TABLE table_name_91 ( date VARCHAR, winning_driver VARCHAR, name VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Tell me the date for rudolf caracciola for avusrennen
SELECT date FROM table_name_91 WHERE winning_driver = "rudolf caracciola" AND name = "avusrennen"
sql_create_context
CREATE TABLE table_4395 ( "Year" real, "Award" text, "Category" text, "Nominated Work" text, "Result" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Tell me the category for 2012 and drama league award
SELECT "Category" FROM table_4395 WHERE "Year" = '2012' AND "Award" = 'drama league award'
wikisql
CREATE TABLE table_30955 ( "Episode" text, "First broadcast" text, "Andrew and Georgies guest" text, "Jamie and Johns guest" text, "Scores" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- what was the size when tom daley appeared
SELECT "Episode" FROM table_30955 WHERE "Jamie and Johns guest" = 'Tom Daley'
wikisql
CREATE TABLE table_name_95 ( place VARCHAR, score VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the place of the player with a 71-69-66=206 score?
SELECT place FROM table_name_95 WHERE score = 71 - 69 - 66 = 206
sql_create_context
CREATE TABLE procedures_icd ( row_id number, subject_id number, hadm_id number, icd9_code text, charttime time ) CREATE TABLE d_items ( row_id number, itemid number, label text, linksto text ) CREATE TABLE d_icd_procedures ( row_id number, icd9_code text, short_title te...
SELECT (SELECT COUNT(DISTINCT t1.subject_id) FROM (SELECT admissions.subject_id, diagnoses_icd.charttime FROM diagnoses_icd JOIN admissions ON diagnoses_icd.hadm_id = admissions.hadm_id WHERE diagnoses_icd.icd9_code = (SELECT d_icd_diagnoses.icd9_code FROM d_icd_diagnoses WHERE d_icd_diagnoses.short_title = 'sec hyperp...
mimic_iii
CREATE TABLE diagnosis ( diagnosisid number, patientunitstayid number, diagnosisname text, diagnosistime time, icd9code text ) CREATE TABLE vitalperiodic ( vitalperiodicid number, patientunitstayid number, temperature number, sao2 number, heartrate number, respiration number...
SELECT MAX(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 = '028-39354')) AND intakeoutput.celllabel = 'chest...
eicu
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 (SELECT lab.labresult FROM lab WHERE lab.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '027-85328' AND patient.hospitaldischargetime IS NULL)) AND lab.labname = 'anion...
eicu
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 c.Score, c.Text, c.Id AS "comment_link" FROM Comments AS c INNER JOIN Posts AS q ON q.Id = c.PostId WHERE q.PostTypeId = 1 GROUP BY c.Score, c.Text, c.Id ORDER BY c.Score DESC LIMIT 100
sede
CREATE TABLE table_73413 ( "Season no." real, "Series no." real, "Title" text, "Directed by" text, "Written by" text, "Original air date" text, "Production code" real, "U.S. Viewers (millions)" text ) -- Using valid SQLite, answer the following questions for the tables provided above. ...
SELECT MAX("Series no.") FROM table_73413 WHERE "U.S. Viewers (millions)" = '3.14'
wikisql
CREATE TABLE cost ( costid number, uniquepid text, patienthealthsystemstayid number, eventtype text, eventid number, chargetime time, cost number ) CREATE TABLE treatment ( treatmentid number, patientunitstayid number, treatmentname text, treatmenttime time ) CREATE TABLE l...
SELECT COUNT(*) > 0 FROM vitalperiodic WHERE vitalperiodic.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '004-49903')) AND vitalperiodic.sao2 BETWEEN sao2_lower AND sao2_uppe...
eicu
CREATE TABLE table_261906_2 ( joined_mac INTEGER, institution VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the enrollment at delaware valley college?
SELECT MAX(joined_mac) FROM table_261906_2 WHERE institution = "Delaware Valley College"
sql_create_context
CREATE TABLE table_29862 ( "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. -- what d...
SELECT "Date" FROM table_29862 WHERE "Game" = '29'
wikisql
CREATE TABLE table_name_18 ( team VARCHAR, carries VARCHAR, week VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which Team has 19 Carries, and a Week larger than 13?
SELECT team FROM table_name_18 WHERE carries = 19 AND week > 13
sql_create_context
CREATE TABLE job_history ( employee_id number, start_date time, end_date time, job_id text, department_id number ) CREATE TABLE departments ( department_id number, department_name text, manager_id number, location_id number ) CREATE TABLE countries ( country_id text, countr...
SELECT employee_id, first_name, last_name, job_id FROM employees WHERE salary > (SELECT MAX(salary) FROM employees WHERE job_id = 'PU_MAN')
spider
CREATE TABLE table_33137 ( "Goal" real, "Date" text, "Venue" text, "Score" text, "Result" text, "Competition" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- For the venue of suwon world cup stadium , suwon , south korea and a Score of 3 0 what i...
SELECT "Result" FROM table_33137 WHERE "Venue" = 'suwon world cup stadium , suwon , south korea' AND "Score" = '3–0'
wikisql
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 jybgb.BGDH FROM hz_info JOIN mzjzjlb JOIN jybgb 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 WHERE hz_info.RYBH = '13423195' AND NOT jybgb.BGDH IN (SELECT BGDH FROM jyjgzbb WHERE JCZ...
css
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 diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE demographic.marital_status = "MARRIED" AND diagnoses.short_title = "Hy kid NOS w cr kid I-IV"
mimicsql_data
CREATE TABLE d_items ( row_id number, itemid number, label text, linksto text ) CREATE TABLE procedures_icd ( row_id number, subject_id number, hadm_id number, icd9_code text, charttime time ) CREATE TABLE microbiologyevents ( row_id number, subject_id number, hadm_id n...
SELECT t3.spec_type_desc FROM (SELECT t2.spec_type_desc, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM (SELECT admissions.subject_id, diagnoses_icd.charttime FROM diagnoses_icd JOIN admissions ON diagnoses_icd.hadm_id = admissions.hadm_id WHERE diagnoses_icd.icd9_code = (SELECT d_icd_diagnoses.icd9_code FROM d_...
mimic_iii
CREATE TABLE table_68186 ( "Season" real, "Overall" text, "Slalom" text, "Giant Slalom" text, "Super G" text, "Downhill" text, "Combined" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the combined of 2 overalls and 5 slaloms?
SELECT "Combined" FROM table_68186 WHERE "Overall" = '2' AND "Slalom" = '5'
wikisql
CREATE TABLE table_name_40 ( poles INTEGER, f_laps VARCHAR, series VARCHAR, season VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- How many poles are there in the Formula Three Euroseries in the 2008 season with more than 0 F/Laps?
SELECT SUM(poles) FROM table_name_40 WHERE series = "formula three euroseries" AND season = "2008" AND f_laps > 0
sql_create_context
CREATE TABLE table_name_6 ( competition VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Name the competition of 2010 of dnp
SELECT competition FROM table_name_6 WHERE 2010 = "dnp"
sql_create_context
CREATE TABLE playlists ( id number, name text ) CREATE TABLE playlist_tracks ( playlist_id number, track_id number ) CREATE TABLE artists ( id number, name text ) CREATE TABLE invoices ( id number, customer_id number, invoice_date time, billing_address text, billing_city t...
SELECT T2.name FROM genres AS T1 JOIN tracks AS T2 ON T1.id = T2.genre_id JOIN media_types AS T3 ON T3.id = T2.media_type_id WHERE T1.name = "Rock" OR T3.name = "MPEG audio file"
spider
CREATE TABLE table_name_70 ( round VARCHAR, position VARCHAR, player VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- In what Round is John Parco a Center?
SELECT round FROM table_name_70 WHERE position = "center" AND player = "john parco"
sql_create_context
CREATE TABLE table_15209 ( "Year" real, "Entrant" text, "Chassis" text, "Engine" text, "Points" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- How many points did Corbari Italia earn in 1985?
SELECT "Points" FROM table_15209 WHERE "Entrant" = 'corbari italia' AND "Year" = '1985'
wikisql
CREATE TABLE table_name_92 ( home_team VARCHAR, visiting_team VARCHAR, result VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Who is the home team when the san francisco 49ers are visiting with a result of 42-14?
SELECT home_team FROM table_name_92 WHERE visiting_team = "san francisco 49ers" AND result = "42-14"
sql_create_context
CREATE TABLE table_6963 ( "Date" text, "Time" text, "Home" text, "Away" text, "Score" text, "Ground" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the Home with an Away that is toronto rebels?
SELECT "Home" FROM table_6963 WHERE "Away" = 'toronto rebels'
wikisql
CREATE TABLE table_name_2 ( number_of_seats INTEGER, leader VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- How many seats does leader Raymond McCartney have?
SELECT SUM(number_of_seats) FROM table_name_2 WHERE leader = "raymond mccartney"
sql_create_context
CREATE TABLE ground_service ( city_code text, airport_code text, transport_type text, ground_fare int ) CREATE TABLE flight_fare ( flight_id int, fare_id int ) CREATE TABLE airport_service ( city_code varchar, airport_code varchar, miles_distant int, direction varchar, minu...
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 = 'SAN FRANCISCO' AND date_day.day_number = 25 AND date_day.month_number = 6...
atis
CREATE TABLE table_28802668_3 ( title VARCHAR, no_in_season VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- How many episode titles does episode 19 in the season have?
SELECT COUNT(title) FROM table_28802668_3 WHERE no_in_season = 19
sql_create_context
CREATE TABLE patients ( row_id number, subject_id number, gender text, dob time, dod time ) CREATE TABLE admissions ( row_id number, subject_id number, hadm_id number, admittime time, dischtime time, admission_type text, admission_location text, discharge_location te...
SELECT SUM(inputevents_cv.amount) FROM inputevents_cv WHERE inputevents_cv.icustay_id IN (SELECT icustays.icustay_id FROM icustays WHERE icustays.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 14621)) AND STRFTIME('%y-%m-%d', inputevents_cv.charttime) = '2105-06-22'
mimic_iii
CREATE TABLE table_204_329 ( id number, "no." number, "score" number, "player" text, "team" text, "balls" number, "inns." number, "opposing team" text, "date" text, "result" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- what is ...
SELECT COUNT("player") FROM table_204_329
squall
CREATE TABLE match_season ( Season real, Player text, Position text, Country int, Team int, Draft_Pick_Number int, Draft_Class text, College text ) CREATE TABLE country ( Country_id int, Country_name text, Capital text, Official_native_language text ) CREATE TABLE playe...
SELECT Draft_Class, Draft_Pick_Number FROM match_season WHERE Position = "Defender" ORDER BY Draft_Class DESC
nvbench
CREATE TABLE table_name_31 ( position VARCHAR, class VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which position has a sophomore class?
SELECT position FROM table_name_31 WHERE class = "sophomore"
sql_create_context
CREATE TABLE table_name_93 ( college VARCHAR, player VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which college does the player jon hameister-ries play for?
SELECT college FROM table_name_93 WHERE player = "jon hameister-ries"
sql_create_context
CREATE TABLE person_info ( CSD text, CSRQ time, GJDM text, GJMC text, JGDM text, JGMC text, MZDM text, MZMC text, RYBH text, XBDM number, XBMC text, XLDM text, XLMC text, XM text, ZYLBDM text, ZYMC text ) CREATE TABLE jybgb ( BBCJBW text, BBDM tex...
SELECT jybgb.BBCJBW FROM hz_info JOIN mzjzjlb JOIN jybgb 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 WHERE hz_info.RYBH = '60960957' AND jybgb.BGRQ BETWEEN '2014-02-27' AND '2014-05-23' UNI...
css
CREATE TABLE medication ( medicationid number, patientunitstayid number, drugname text, dosage text, routeadmin text, drugstarttime time, drugstoptime time ) CREATE TABLE patient ( uniquepid text, patienthealthsystemstayid number, patientunitstayid number, gender text, a...
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 = 'anticonvulsant - gabapentin' AND DATETIME(treatment.treatmenttime) >= DAT...
eicu
CREATE TABLE countries ( COUNTRY_ID varchar(2), COUNTRY_NAME varchar(40), REGION_ID decimal(10,0) ) 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), ...
SELECT HIRE_DATE, SUM(MANAGER_ID) FROM employees WHERE FIRST_NAME LIKE '%D%' OR FIRST_NAME LIKE '%S%'
nvbench
CREATE TABLE table_name_62 ( home_team VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What was Footscray's Home team score?
SELECT home_team AS score FROM table_name_62 WHERE home_team = "footscray"
sql_create_context
CREATE TABLE table_15887683_5 ( n° VARCHAR, television_service VARCHAR, package_option VARCHAR, content VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What are the values of n for cinema content provided by Sky Cinema +24 on its Sky Cinema package?
SELECT n° FROM table_15887683_5 WHERE package_option = "Sky Cinema" AND content = "cinema" AND television_service = "Sky Cinema" + 24
sql_create_context
CREATE TABLE table_name_3 ( score VARCHAR, away_team VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What was the score of the game against away team crewe alexandra?
SELECT score FROM table_name_3 WHERE away_team = "crewe alexandra"
sql_create_context
CREATE TABLE table_11959669_7 ( location_attendance VARCHAR, date VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- How many numbers were listed under attendance for March 2?
SELECT COUNT(location_attendance) FROM table_11959669_7 WHERE date = "March 2"
sql_create_context
CREATE TABLE table_name_58 ( candidate_name VARCHAR, target_approach VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is Candidate Name, when Target/Approach is 'vaccine to amyloid-beta'?
SELECT candidate_name FROM table_name_58 WHERE target_approach = "vaccine to amyloid-beta"
sql_create_context
CREATE TABLE table_name_52 ( result VARCHAR, date VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What was the end result for 28 February 2001?
SELECT result FROM table_name_52 WHERE date = "28 february 2001"
sql_create_context
CREATE TABLE labevents ( row_id number, subject_id number, hadm_id number, itemid number, charttime time, valuenum number, valueuom text ) CREATE TABLE d_items ( row_id number, itemid number, label text, linksto text ) CREATE TABLE procedures_icd ( row_id number, su...
SELECT 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 = 'hypothermia') AND DATETIME(diagnoses_icd.charttime, 'start of year') = DAT...
mimic_iii
CREATE TABLE table_65746 ( "Sunrayia FL" text, "Wins" real, "Byes" real, "Losses" real, "Draws" real, "Against" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the draws when there are less than 3 losses and more than 16 wins?
SELECT MAX("Draws") FROM table_65746 WHERE "Losses" < '3' AND "Wins" > '16'
wikisql
CREATE TABLE table_name_3 ( notes VARCHAR, film VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What notes does the film Touch & go have?
SELECT notes FROM table_name_3 WHERE film = "touch & go"
sql_create_context
CREATE TABLE table_23686 ( "English party name" text, "Norwegian party name" text, "Associated ideology" text, "Current leader" text, "International affiliation" text, "2013 Parliamentary election" text, "County councils ( 2011 )" real ) -- Using valid SQLite, answer the following question...
SELECT "2013 Parliamentary election" FROM table_23686 WHERE "English party name" = 'Pensioners Party'
wikisql
CREATE TABLE jyjgzbb ( BGDH text, BGRQ time, CKZFWDX text, CKZFWSX number, CKZFWXX number, JCFF text, JCRGH text, JCRXM text, JCXMMC text, JCZBDM text, JCZBJGDL number, JCZBJGDW text, JCZBJGDX text, JCZBMC text, JLDW text, JYRQ time, JYZBLSH text, ...
SELECT jyjgzbb.JCZBJGDL, jyjgzbb.JCZBJGDW FROM person_info JOIN hz_info JOIN zzmzjzjlb JOIN jybgb JOIN jyjgzbb 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 AND zzmzjzjlb.YLJGDM = jybgb.YLJGDM_MZJZJLB AND zzmzjzjlb.JZLSH = jybgb.JZ...
css
CREATE TABLE table_name_13 ( play_by_play VARCHAR, studio_host VARCHAR, colour_commentator_s_ VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Who did the play-by-play with studio host Ward Cornell and color commentator Bob Goldham?
SELECT play_by_play FROM table_name_13 WHERE studio_host = "ward cornell" AND colour_commentator_s_ = "bob goldham"
sql_create_context
CREATE TABLE flight_stop ( flight_id int, stop_number int, stop_days text, stop_airport text, arrival_time int, arrival_airline text, arrival_flight_number int, departure_time int, departure_airline text, departure_flight_number int, stop_time int ) CREATE TABLE date_day ( ...
SELECT DISTINCT flight.flight_id FROM airport_service, city, flight WHERE city.city_code = airport_service.city_code AND city.city_name = 'BALTIMORE' AND flight.to_airport = airport_service.airport_code
atis
CREATE TABLE table_4740 ( "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. -- What was the attendance at the St Kilda home game...
SELECT AVG("Crowd") FROM table_4740 WHERE "Home team" = 'st kilda'
wikisql
CREATE TABLE table_name_56 ( total_finals INTEGER, runners_up VARCHAR, winners VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the highest total number of finals a club with more than 2 runners-up and fewer than 1 winner went to?
SELECT MAX(total_finals) FROM table_name_56 WHERE runners_up > 2 AND winners < 1
sql_create_context
CREATE TABLE table_name_52 ( parent VARCHAR, height__m_ VARCHAR, prom__m_ VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which Parent has height smaller than 756 and a Prom of 39?
SELECT parent FROM table_name_52 WHERE height__m_ < 756 AND prom__m_ = 39
sql_create_context
CREATE TABLE mzjzjlb ( HXPLC number, HZXM text, JLSJ time, JZJSSJ time, JZKSBM text, JZKSMC text, JZKSRQ time, JZLSH text, JZZDBM text, JZZDSM text, JZZTDM number, JZZTMC text, KH text, KLX number, MJZH text, ML number, MZZYZDZZBM text, MZZYZDZZMC ...
SELECT jyjgzbb.JCRGH, jyjgzbb.JCRXM 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 jy...
css
CREATE TABLE table_name_81 ( name VARCHAR, event VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Who has the event of 36 arrow finals?
SELECT name FROM table_name_81 WHERE event = "36 arrow finals"
sql_create_context
CREATE TABLE person_info ( CSD text, CSRQ time, GJDM text, GJMC text, JGDM text, JGMC text, MZDM text, MZMC text, RYBH text, XBDM number, XBMC text, XLDM text, XLMC text, XM text, ZYLBDM text, ZYMC text ) CREATE TABLE jybgb ( BBCJBW text, BBDM tex...
SELECT wdmzjzjlb.MZBMLX, wdmzjzjlb.MZZDBM, wdmzjzjlb.MZZDMC FROM wdmzjzjlb WHERE wdmzjzjlb.JZLSH = '42916483908' UNION SELECT bdmzjzjlb.MZBMLX, bdmzjzjlb.MZZDBM, bdmzjzjlb.MZZDMC FROM bdmzjzjlb WHERE bdmzjzjlb.JZLSH = '42916483908'
css
CREATE TABLE diagnoses ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) 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 t...
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.dod_year <= "2126.0" AND lab.itemid = "51025"
mimicsql_data
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_Regular_Season, School_ID FROM basketball_match
nvbench
CREATE TABLE table_name_98 ( laps INTEGER, finish VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the highest number of laps that also has a finish total of 8?
SELECT MAX(laps) FROM table_name_98 WHERE finish = "8"
sql_create_context
CREATE TABLE table_name_33 ( nationality VARCHAR, name VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which Nationality has a Name of janne happonen?
SELECT nationality FROM table_name_33 WHERE name = "janne happonen"
sql_create_context
CREATE TABLE table_40306 ( "Date" text, "Result" text, "Opponent" text, "Location" text, "Method" text, "Round" real, "Record" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which Opponent has a Method of tko, and a Location of elgin, illino...
SELECT "Opponent" FROM table_40306 WHERE "Method" = 'tko' AND "Location" = 'elgin, illinois, usa' AND "Date" = '2001-02-11'
wikisql
CREATE TABLE table_name_27 ( student_body VARCHAR, affiliation VARCHAR, enrollment VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What's the Student Body with an Affiliation of Roman Catholic and has an Enrollment of 502?
SELECT student_body FROM table_name_27 WHERE affiliation = "roman catholic" AND enrollment = 502
sql_create_context
CREATE TABLE t_kc22 ( AMOUNT number, CHA_ITEM_LEV number, DATA_ID text, DIRE_TYPE number, DOSE_FORM text, DOSE_UNIT text, EACH_DOSAGE text, EXP_OCC_DATE time, FLX_MED_ORG_ID text, FXBZ number, HOSP_DOC_CD text, HOSP_DOC_NM text, MED_CLINIC_ID text, MED_DIRE_CD tex...
SELECT MIN(t_kc24.MED_AMOUT), MAX(t_kc24.MED_AMOUT) FROM t_kc24 WHERE t_kc24.MED_CLINIC_ID IN (SELECT t_kc24.MED_CLINIC_ID FROM t_kc24 WHERE t_kc24.t_kc21_MED_SER_ORG_NO = '0652199' AND t_kc24.t_kc21_OUT_DIAG_DIS_CD = 'H88.444')
css
CREATE TABLE table_name_33 ( total INTEGER, year_s__won VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Total for 1994, 1997 years won?
SELECT SUM(total) FROM table_name_33 WHERE year_s__won = "1994, 1997"
sql_create_context
CREATE TABLE table_46342 ( "Title" text, "Release date" text, "Format" text, "Code" text, "UK Singles Chart" text, "US Modern Rock" text, "Album" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the format of code 9 40231-2 (us only)?
SELECT "Format" FROM table_46342 WHERE "Code" = '9 40231-2 (us only)'
wikisql
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 AVG(demographic.days_stay) FROM demographic WHERE demographic.dod_year < "2186.0"
mimicsql_data
CREATE TABLE table_name_42 ( first VARCHAR, surname VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which First has a Surname of searle?
SELECT first FROM table_name_42 WHERE surname = "searle"
sql_create_context
CREATE TABLE table_204_57 ( id number, "year" number, "film" text, "role" text, "language" text, "notes" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- what was the only movie madhurima play in during the year 2012 ?
SELECT "film" FROM table_204_57 WHERE "year" = 2012
squall
CREATE TABLE table_204_459 ( id number, "date" text, "time" text, "opponent" text, "site" text, "tv" text, "result" text, "attendance" number, "record" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- what was the total attendance at t...
SELECT SUM("attendance") FROM table_204_459 WHERE "opponent" IN ('wright state', 'loyola')
squall
CREATE TABLE table_name_74 ( runner_s__up VARCHAR, winning_score VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Who were the Runner(s)-up with the winning score of 16 (66-68-70-68=272)?
SELECT runner_s__up FROM table_name_74 WHERE winning_score = −16(66 - 68 - 70 - 68 = 272)
sql_create_context