instruction
stringlengths
151
7.46k
output
stringlengths
2
4.44k
source
stringclasses
26 values
CREATE TABLE table_name_4 ( opponent VARCHAR, stadium VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What opponent has balboa stadium as the opponent?
SELECT opponent FROM table_name_4 WHERE stadium = "balboa stadium"
sql_create_context
CREATE TABLE party ( party_id number, year number, party text, governor text, lieutenant_governor text, comptroller text, attorney_general text, us_senate text ) CREATE TABLE election ( election_id number, counties_represented text, district number, delegate text, pa...
SELECT COUNT(DISTINCT governor) FROM party
spider
CREATE TABLE table_203_751 ( id number, "year" number, "title" text, "peak chart positions\nus\nair" number, "peak chart positions\nus\nmain" number, "peak chart positions\nus\nmod" number, "album" text ) -- Using valid SQLite, answer the following questions for the tables provided above. ...
SELECT "title" FROM table_203_751 WHERE "year" = 1995 ORDER BY "peak chart positions\nus\nmain" LIMIT 1
squall
CREATE TABLE table_name_81 ( comp VARCHAR, score VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What's the comp when the score was 393?
SELECT comp FROM table_name_81 WHERE score = "393"
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 procedures ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) CREATE TABLE prescription...
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE demographic.dob_year < "1879" AND prescriptions.route = "DIALYS"
mimicsql_data
CREATE TABLE ReviewRejectionReasons ( Id number, Name text, Description text, PostTypeId number ) CREATE TABLE FlagTypes ( Id number, Name text, Description text ) CREATE TABLE ReviewTaskResults ( Id number, ReviewTaskId number, ReviewTaskResultTypeId number, CreationDate t...
SELECT Id AS "user_link", UpVotes, DownVotes, (DownVotes) * 100 / (DownVotes + UpVotes) AS DownVotesPCT FROM Users WHERE DownVotes > 100 AND Id != -1 ORDER BY DownVotesPCT DESC LIMIT 100
sede
CREATE TABLE table_name_74 ( company VARCHAR, author VARCHAR, play VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which company has an author of Aristophanes and play of Plutus?
SELECT company FROM table_name_74 WHERE author = "aristophanes" AND play = "plutus"
sql_create_context
CREATE TABLE hz_info ( KH text, KLX number, RYBH text, YLJGDM text ) CREATE TABLE hz_info_zyjzjlb ( JZLSH number, YLJGDM number, zyjzjlb_id number ) CREATE TABLE mzjzjlb ( HXPLC number, HZXM text, JLSJ time, JZJSSJ time, JZKSBM text, JZKSMC text, JZKSRQ time, ...
SELECT COUNT(hz_info.RYBH) FROM hz_info JOIN mzjzjlb ON hz_info.YLJGDM = mzjzjlb.YLJGDM AND hz_info.KH = mzjzjlb.KH AND hz_info.KLX = mzjzjlb.KLX WHERE mzjzjlb.ZZYSGH = '75246625' AND mzjzjlb.JZKSRQ BETWEEN '2000-11-21' AND '2017-06-25'
css
CREATE TABLE table_77629 ( "Entrant" text, "Constructor" text, "Chassis" text, "Engine" text, "Tyres" text, "Driver" text, "Rounds" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Who is the Constructor for driver Piercarlo Ghinzani and a For...
SELECT "Constructor" FROM table_77629 WHERE "Driver" = 'piercarlo ghinzani' AND "Engine" = 'ford cosworth dfv 3.0 v8'
wikisql
CREATE TABLE table_name_85 ( quantity INTEGER, drg_number_s_ VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is average quantity, when DRG number is 99 011?
SELECT AVG(quantity) FROM table_name_85 WHERE drg_number_s_ = "99 011"
sql_create_context
CREATE TABLE table_71369 ( "Week" real, "Date" text, "Opponent" text, "Result" text, "Game site" text, "Record" text, "Attendance" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the total number of weeks that the Seahawks had a recor...
SELECT COUNT("Week") FROM table_71369 WHERE "Record" = '5-5'
wikisql
CREATE TABLE table_20626 ( "No." real, "Name" text, "Mi from Kingston" text, "Km from Kingston" text, "Parish" text, "Length feet" real, "Length meters" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which parishes have a railroad length of ...
SELECT "Parish" FROM table_20626 WHERE "Length meters" = '51.8'
wikisql
CREATE TABLE table_432 ( "Rnd" real, "Circuit" text, "CA Winning Team" text, "GT1 Winning Team" text, "GT2 Winning Team" text, "GT3 Winning Team" text, "Results" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the rnd for gt1 winning ...
SELECT "Rnd" FROM table_432 WHERE "GT1 Winning Team" = 'Doc Bundy Andy Wallace'
wikisql
CREATE TABLE table_16034882_4 ( points VARCHAR, wins VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the amount of points for the team with 13 wins?
SELECT points FROM table_16034882_4 WHERE wins = 13
sql_create_context
CREATE TABLE furniture_manufacte ( Manufacturer_ID int, Furniture_ID int, Price_in_Dollar real ) CREATE TABLE furniture ( Furniture_ID int, Name text, Num_of_Component int, Market_Rate real ) CREATE TABLE manufacturer ( Manufacturer_ID int, Open_Year real, Name text, Num_of...
SELECT Name, Price_in_Dollar FROM furniture AS t1 JOIN furniture_manufacte AS t2 ON t1.Furniture_ID = t2.Furniture_ID
nvbench
CREATE TABLE table_61390 ( "Season" text, "Premier" real, "First" real, "Second" real, "Total" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the lowest Total, when Second is '55'?
SELECT MIN("Total") FROM table_61390 WHERE "Second" = '55'
wikisql
CREATE TABLE microbiologyevents ( row_id number, subject_id number, hadm_id number, charttime time, spec_type_desc text, org_name text ) CREATE TABLE procedures_icd ( row_id number, subject_id number, hadm_id number, icd9_code text, charttime time ) CREATE TABLE d_items ( ...
SELECT admissions.admittime FROM admissions WHERE admissions.subject_id = 25696 AND DATETIME(admissions.admittime, 'start of year') = DATETIME(CURRENT_TIME(), 'start of year', '-1 year') ORDER BY admissions.admittime DESC LIMIT 1
mimic_iii
CREATE TABLE Catalog_Structure ( catalog_level_number INTEGER, catalog_id INTEGER, catalog_level_name VARCHAR(50) ) CREATE TABLE Catalogs ( catalog_id INTEGER, catalog_name VARCHAR(50), catalog_publisher VARCHAR(80), date_of_publication DATETIME, date_of_latest_revision DATETIME ) CREA...
SELECT catalog_level_name, catalog_level_number FROM Catalog_Structure WHERE catalog_level_number BETWEEN 5 AND 10 ORDER BY catalog_level_name
nvbench
CREATE TABLE microlab ( microlabid number, patientunitstayid number, culturesite text, organism text, culturetakentime time ) CREATE TABLE diagnosis ( diagnosisid number, patientunitstayid number, diagnosisname text, diagnosistime time, icd9code text ) CREATE TABLE cost ( c...
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 = '027-106613')) AND intakeoutput.cellpath LIKE '%intake...
eicu
CREATE TABLE table_13346 ( "Class to 1928" text, "Class from 1928" text, "Seats" text, "Quantity" real, "Year(s) of Manufacture" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What's the sum of Quantity for the Class of 1928 of CI-30?
SELECT SUM("Quantity") FROM table_13346 WHERE "Class from 1928" = 'ci-30'
wikisql
CREATE TABLE microbiologyevents ( row_id number, subject_id number, hadm_id number, charttime time, spec_type_desc text, org_name text ) CREATE TABLE d_items ( row_id number, itemid number, label text, linksto text ) CREATE TABLE diagnoses_icd ( row_id number, subject_i...
SELECT admissions.admittime FROM admissions WHERE admissions.subject_id = 18678 AND admissions.admission_location = 'phys referral/normal deli' AND DATETIME(admissions.admittime) >= DATETIME(CURRENT_TIME(), '-3 year') ORDER BY admissions.admittime LIMIT 1
mimic_iii
CREATE TABLE mzb ( CLINIC_ID 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, INSU_TYPE text, IN...
SELECT qtb.CLINIC_ID FROM qtb WHERE qtb.MED_CLINIC_ID = '98553609544' UNION SELECT gyb.CLINIC_ID FROM gyb WHERE gyb.MED_CLINIC_ID = '98553609544' UNION SELECT zyb.CLINIC_ID FROM zyb WHERE zyb.MED_CLINIC_ID = '98553609544' UNION SELECT mzb.CLINIC_ID FROM mzb WHERE mzb.MED_CLINIC_ID = '98553609544'
css
CREATE TABLE table_20485 ( "Week" real, "Date" text, "Opponent" text, "Result" text, "Record" text, "Game Site" text, "Attendance" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Where was the game site on October 29, 1989?
SELECT "Game Site" FROM table_20485 WHERE "Date" = 'October 29, 1989'
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 diagnoses_icd ( row_id number, subject_id number, hadm_id number, icd9_code text, charttime time ) CREATE TABLE chartevent...
SELECT AVG(t1.c1) FROM (SELECT COUNT(DISTINCT diagnoses_icd.hadm_id) AS c1 FROM diagnoses_icd WHERE diagnoses_icd.icd9_code = (SELECT d_icd_diagnoses.icd9_code FROM d_icd_diagnoses WHERE d_icd_diagnoses.short_title = 'posttraumatic stress dis') AND DATETIME(diagnoses_icd.charttime) <= DATETIME(CURRENT_TIME(), '-2 year'...
mimic_iii
CREATE TABLE table_name_21 ( winner VARCHAR, score VARCHAR, date VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- who won with a score of 199 (-14) on oct 31?
SELECT winner FROM table_name_21 WHERE score = "199 (-14)" AND date = "oct 31"
sql_create_context
CREATE TABLE mzjzjlb ( HXPLC number, HZXM text, JLSJ time, JZJSSJ time, JZKSBM text, JZKSMC text, JZKSRQ time, JZLSH text, JZZDBM text, JZZDSM text, JZZTDM number, JZZTMC text, KH text, KLX number, MJZH text, ML number, MZZYZDZZBM text, MZZYZDZZMC ...
SELECT jybgb.BGJGDM, jybgb.BGJGMC FROM jybgb WHERE jybgb.BGDH = '19150646660'
css
CREATE TABLE party ( party_id number, year number, party text, governor text, lieutenant_governor text, comptroller text, attorney_general text, us_senate text ) CREATE TABLE county ( county_id number, county_name text, population number, zip_code text ) CREATE TABLE el...
SELECT T1.county_name FROM county AS T1 JOIN election AS T2 ON T1.county_id = T2.district GROUP BY T1.county_id HAVING COUNT(*) >= 2
spider
CREATE TABLE table_37747 ( "Name" text, "Team" text, "Qual 1" text, "Qual 2" text, "Best" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What was the Name of the person with a Qual 1 of 1:26.056?
SELECT "Name" FROM table_37747 WHERE "Qual 1" = '1:26.056'
wikisql
CREATE TABLE table_62345 ( "Week" real, "Date" text, "Opponent" text, "Result" text, "Attendance" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which opponent has a week less than 2?
SELECT "Opponent" FROM table_62345 WHERE "Week" < '2'
wikisql
CREATE TABLE aircraft ( aid number(9,0), name varchar2(30), distance number(6,0) ) CREATE TABLE flight ( flno number(4,0), origin varchar2(20), destination varchar2(20), distance number(6,0), departure_date date, arrival_date date, price number(7,2), aid number(9,0) ) CREAT...
SELECT name, distance FROM aircraft ORDER BY distance
nvbench
CREATE TABLE table_23346303_4 ( steals VARCHAR, player VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- How many steals did jasmine wynne have?
SELECT steals FROM table_23346303_4 WHERE player = "Jasmine Wynne"
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 School_ID, All_Games_Percent FROM basketball_match GROUP BY All_Road
nvbench
CREATE TABLE table_203_561 ( id number, "pos" number, "team" text, "total" number, "high" number, "low" number, "average" number, "change" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- which team recorded a higher average attendance in ...
SELECT "team" FROM table_203_561 WHERE "team" IN ('jatco fc', 'ykk fc') ORDER BY "average" DESC LIMIT 1
squall
CREATE TABLE table_name_70 ( city VARCHAR, date VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which City has a Date on october 26, 2007
SELECT city FROM table_name_70 WHERE date = "october 26, 2007"
sql_create_context
CREATE TABLE candidate ( Candidate_ID int, People_ID int, Poll_Source text, Date text, Support_rate real, Consider_rate real, Oppose_rate real, Unsure_rate real ) CREATE TABLE people ( People_ID int, Sex text, Name text, Date_of_Birth text, Height real, Weight re...
SELECT Sex, AVG(Weight) FROM people GROUP BY Sex ORDER BY AVG(Weight)
nvbench
CREATE TABLE candidate ( Candidate_ID int, People_ID int, Poll_Source text, Date text, Support_rate real, Consider_rate real, Oppose_rate real, Unsure_rate real ) CREATE TABLE people ( People_ID int, Sex text, Name text, Date_of_Birth text, Height real, Weight re...
SELECT Date_of_Birth, Weight FROM people ORDER BY Date_of_Birth
nvbench
CREATE TABLE table_name_83 ( name VARCHAR, total_goals VARCHAR, fa_cup_goals VARCHAR, league_cup_goals VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Who had fa cup goals of 0, league cup goals less than 2, and total goals of 2?
SELECT name FROM table_name_83 WHERE fa_cup_goals = 0 AND league_cup_goals < 2 AND total_goals = 2
sql_create_context
CREATE TABLE wine ( No INTEGER, Grape TEXT, Winery TEXT, Appelation TEXT, State TEXT, Name TEXT, Year INTEGER, Price INTEGER, Score INTEGER, Cases INTEGER, Drink TEXT ) CREATE TABLE appellations ( No INTEGER, Appelation TEXT, County TEXT, State TEXT, Area...
SELECT Year, SUM(AVG(Price)) FROM wine ORDER BY SUM(AVG(Price))
nvbench
CREATE TABLE state ( state_code text, state_name text, country_name text ) CREATE TABLE time_interval ( period text, begin_time int, end_time int ) CREATE TABLE dual_carrier ( main_airline varchar, low_flight_number int, high_flight_number int, dual_airline varchar, service...
SELECT DISTINCT flight.flight_id FROM airport_service AS AIRPORT_SERVICE_0, airport_service AS AIRPORT_SERVICE_1, city AS CITY_0, city AS CITY_1, flight WHERE CITY_0.city_code = AIRPORT_SERVICE_0.city_code AND CITY_0.city_name = 'DALLAS' AND CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'SAN FRA...
atis
CREATE TABLE table_name_73 ( condition VARCHAR, partial_thromboplastin_time VARCHAR, prothrombin_time VARCHAR, bleeding_time VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which Condition has an unaffected Prothrombin time and a Bleeding time, and a ...
SELECT condition FROM table_name_73 WHERE prothrombin_time = "unaffected" AND bleeding_time = "unaffected" AND partial_thromboplastin_time = "prolonged"
sql_create_context
CREATE TABLE table_61828 ( "School" text, "Location" text, "Nickname(s)" text, "Colors" text, "Years Member" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What Colors has a School of sesser high school?
SELECT "Colors" FROM table_61828 WHERE "School" = 'sesser high school'
wikisql
CREATE TABLE t_kc21_t_kc22 ( MED_CLINIC_ID text, MED_EXP_DET_ID number ) 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 ...
SELECT t_kc21.MED_CLINIC_ID FROM t_kc21 WHERE t_kc21.PERSON_ID = '51519970' AND t_kc21.MED_SER_ORG_NO = '2900289' AND NOT t_kc21.IN_DIAG_DIS_NM LIKE '%喉%'
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 COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.dob_year < "2043" AND lab.fluid = "Ascites"
mimicsql_data
CREATE TABLE table_56312 ( "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 was the surface type at Takao Suzuki?
SELECT "Surface" FROM table_56312 WHERE "Opponent in the final" = 'takao suzuki'
wikisql
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 PendingFlags ( Id number, FlagTypeId ...
SELECT * FROM TagSynonyms WHERE Id = (SELECT MAX(Id) FROM TagSynonyms)
sede
CREATE TABLE table_name_20 ( points VARCHAR, time_retired VARCHAR, car_no VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- How many points were scored by car number 10 that ended with a collision?
SELECT points FROM table_name_20 WHERE time_retired = "collision" AND car_no = "10"
sql_create_context
CREATE TABLE table_28418916_3 ( result VARCHAR, opponents_conference VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What was the result when then opponents conference was Mac (east)?
SELECT result FROM table_28418916_3 WHERE opponents_conference = "MAC (East)"
sql_create_context
CREATE TABLE Lives_in ( stuid INTEGER, dormid INTEGER, room_number INTEGER ) CREATE TABLE Dorm ( dormid INTEGER, dorm_name VARCHAR(20), student_capacity INTEGER, gender VARCHAR(1) ) CREATE TABLE Has_amenity ( dormid INTEGER, amenid INTEGER ) CREATE TABLE Student ( StuID INTEGE...
SELECT Sex, AVG(Age) FROM Student GROUP BY Sex ORDER BY Sex
nvbench
CREATE TABLE table_name_32 ( date VARCHAR, high_assists VARCHAR, high_points VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- On which date was Raymond Felton (6) the high assists and Jason Richardson (42) the high points?
SELECT date FROM table_name_32 WHERE high_assists = "raymond felton (6)" AND high_points = "jason richardson (42)"
sql_create_context
CREATE TABLE table_22355 ( "District" text, "Vacator" text, "Reason for change" text, "Successor" text, "Date successor seated" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Who did Walter B. Jones, Sr. (d) succeeded in office?
SELECT "Vacator" FROM table_22355 WHERE "Successor" = 'Walter B. Jones, Sr. (D)'
wikisql
CREATE TABLE t_kc21 ( MED_CLINIC_ID text, OVERALL_CD_ORG text, OVERALL_CD_PERSON text, COMP_ID text, PERSON_ID text, PERSON_NM text, IDENTITY_CARD text, SOC_SRT_CARD text, PERSON_SEX number, PERSON_AGE number, IN_HOSP_DATE time, OUT_HOSP_DATE time, DIFF_PLACE_FLG numb...
SELECT SOC_SRT_DIRE_CD, SOC_SRT_DIRE_NM FROM t_kc22 WHERE MED_CLINIC_ID = '99336512882' GROUP BY SOC_SRT_DIRE_CD ORDER BY SUM(SELF_PAY_AMO) DESC LIMIT 1
css
CREATE TABLE genre ( g_name varchar2(20), rating varchar2(10), most_popular_in varchar2(50) ) CREATE TABLE song ( song_name varchar2(50), artist_name varchar2(50), country varchar2(20), f_id number(10), genre_is varchar2(20), rating number(10), languages varchar2(20), releas...
SELECT formats, COUNT(*) FROM files GROUP BY formats
nvbench
CREATE TABLE table_28797 ( "Episode" real, "Title" text, "Writer" text, "Director" text, "Original airdate" text, "Ratings (Kanto)" text, "Ratings (Kansai)" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the ratings for the original ...
SELECT "Ratings (Kansai)" FROM table_28797 WHERE "Original airdate" = 'May 25, 2010 22.00 - 22.54'
wikisql
CREATE TABLE table_name_92 ( club VARCHAR, season VARCHAR, away_result VARCHAR, round VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Away result of 1 1, and a Round of 1r, and a Season of 1967-68 involves what club?
SELECT club FROM table_name_92 WHERE away_result = "1–1" AND round = "1r" AND season = "1967-68"
sql_create_context
CREATE TABLE table_62566 ( "Parish ( Prestegjeld )" text, "Sub-Parish (Sokn)" text, "Church Name" text, "Year Built" real, "Location of the Church" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which church was built in 1600?
SELECT "Church Name" FROM table_62566 WHERE "Year Built" = '1600'
wikisql
CREATE TABLE table_19753079_13 ( district VARCHAR, incumbent VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- In what district is the incumbent John Linder?
SELECT district FROM table_19753079_13 WHERE incumbent = "John Linder"
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 icustays ( row_id number, subject_id number, hadm_id number, icustay_id number, ...
SELECT MIN(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 = 26469)) AND inputevents_cv.itemid IN (SELECT d_items.itemid FROM d_items WHERE d_items.lab...
mimic_iii
CREATE TABLE table_32822 ( "Week" text, "Date" text, "Opponent" text, "Result" text, "Kickoff" text, "Game site" text, "Record" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the record when the game was played at raymond james stadi...
SELECT "Record" FROM table_32822 WHERE "Game site" = 'raymond james stadium'
wikisql
CREATE TABLE Course_Authors_and_Tutors ( author_id INTEGER, author_tutor_ATB VARCHAR(3), login_name VARCHAR(40), password VARCHAR(40), personal_name VARCHAR(80), middle_name VARCHAR(80), family_name VARCHAR(80), gender_mf VARCHAR(1), address_line_1 VARCHAR(80) ) CREATE TABLE Student...
SELECT date_of_enrolment, COUNT(date_of_enrolment) FROM Courses AS T1 JOIN Student_Course_Enrolment AS T2 ON T1.course_id = T2.course_id WHERE T1.course_name = "Spanish" ORDER BY COUNT(date_of_enrolment)
nvbench
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 COUNT(*) FROM t_kc21 WHERE t_kc21.MED_SER_ORG_NO = '6247162' AND t_kc21.IN_HOSP_DATE BETWEEN '2008-03-18' AND '2019-06-20' AND t_kc21.IN_DIAG_DIS_CD <> t_kc21.OUT_DIAG_DIS_CD
css
CREATE TABLE artist ( artist_id number, name text, country text, year_join number, age number ) CREATE TABLE exhibition_record ( exhibition_id number, date text, attendance number ) CREATE TABLE exhibition ( exhibition_id number, year number, theme text, artist_id numbe...
SELECT name FROM artist EXCEPT SELECT T2.name FROM exhibition AS T1 JOIN artist AS T2 ON T1.artist_id = T2.artist_id WHERE T1.year = 2004
spider
CREATE TABLE table_name_5 ( overall_win_percentage VARCHAR, coach VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What was coach Dick Bennett's overall win percentage?
SELECT overall_win_percentage FROM table_name_5 WHERE coach = "dick bennett"
sql_create_context
CREATE TABLE table_204_161 ( id number, "name" text, "1968 cf\ndesignator" text, "place of\nmanufacture" text, "primary\nrole(s)" text, "service\nperiod" text, "#\nused" number ) -- Using valid SQLite, answer the following questions for the tables provided above. -- which aircraft has the...
SELECT "name" FROM table_204_161 ORDER BY "#\nused" DESC LIMIT 1
squall
CREATE TABLE microlab ( microlabid number, patientunitstayid number, culturesite text, organism text, culturetakentime time ) CREATE TABLE allergy ( allergyid number, patientunitstayid number, drugname text, allergyname text, allergytime time ) CREATE TABLE vitalperiodic ( ...
SELECT vitalperiodic.respiration FROM vitalperiodic WHERE vitalperiodic.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '016-23497') AND NOT patient.unitdischargetime IS NULL O...
eicu
CREATE TABLE procedures_icd ( row_id number, subject_id number, hadm_id number, icd9_code text, charttime time ) CREATE TABLE inputevents_cv ( row_id number, subject_id number, hadm_id number, icustay_id number, charttime time, itemid number, amount number ) CREATE TABL...
SELECT admissions.marital_status FROM admissions WHERE admissions.subject_id = 90165 AND NOT admissions.dischtime IS NULL ORDER BY admissions.admittime LIMIT 1
mimic_iii
CREATE TABLE status ( station_id number, bikes_available number, docks_available number, time text ) CREATE TABLE station ( id number, name text, lat number, long number, dock_count number, city text, installation_date text ) CREATE TABLE trip ( id number, duration ...
SELECT DISTINCT T1.id, T1.name FROM station AS T1 JOIN status AS T2 ON T1.id = T2.station_id WHERE T2.bikes_available > 12
spider
CREATE TABLE microbiologyevents ( row_id number, subject_id number, hadm_id number, charttime time, spec_type_desc text, org_name text ) CREATE TABLE outputevents ( row_id number, subject_id number, hadm_id number, icustay_id number, charttime time, itemid number, va...
SELECT (SELECT labevents.valuenum FROM labevents WHERE labevents.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 17237 AND NOT admissions.dischtime IS NULL ORDER BY admissions.admittime DESC LIMIT 1) AND labevents.itemid IN (SELECT d_labitems.itemid FROM d_labitems WHERE d_labitems.l...
mimic_iii
CREATE TABLE intakeoutput ( intakeoutputid number, patientunitstayid number, cellpath text, celllabel text, cellvaluenumeric number, intakeoutputtime time ) CREATE TABLE patient ( uniquepid text, patienthealthsystemstayid number, patientunitstayid number, gender text, age te...
SELECT t3.culturesite FROM (SELECT t2.culturesite, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM (SELECT patient.uniquepid, treatment.treatmenttime FROM treatment JOIN patient ON treatment.patientunitstayid = patient.patientunitstayid WHERE treatment.treatmentname = 'glucose - d50' AND STRFTIME('%y', treatment....
eicu
CREATE TABLE VoteTypes ( Id number, Name text ) CREATE TABLE PostTypes ( Id number, Name text ) CREATE TABLE TagSynonyms ( Id number, SourceTagName text, TargetTagName text, CreationDate time, OwnerUserId number, AutoRenameCount number, LastAutoRename time, Score number...
SELECT Id AS "user_link", UpVotes, DownVotes FROM Users WHERE Id = '##id##'
sede
CREATE TABLE table_name_34 ( to_par VARCHAR, player VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which To par has a Player of bernhard langer?
SELECT to_par FROM table_name_34 WHERE player = "bernhard langer"
sql_create_context
CREATE TABLE table_27274222_2 ( valid_votes VARCHAR, province VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- When Denizli was the province, what was the total number of valid votes?
SELECT COUNT(valid_votes) FROM table_27274222_2 WHERE province = "Denizli"
sql_create_context
CREATE TABLE table_name_63 ( home VARCHAR, visitor VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Who was the home team that played against the visiting team Minnesota?
SELECT home FROM table_name_63 WHERE visitor = "minnesota"
sql_create_context
CREATE TABLE table_name_83 ( school_club_team VARCHAR, player VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What School/Club Team is Player Howard Wood from?
SELECT school_club_team FROM table_name_83 WHERE player = "howard wood"
sql_create_context
CREATE TABLE table_20546 ( "No. in series" real, "No. in season" real, "Title" text, "Directed by" text, "Written By" text, "Originalairdate" text, "TV Broadcast" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Who directed the show that had ...
SELECT "Directed by" FROM table_20546 WHERE "TV Broadcast" = 'S07E04'
wikisql
CREATE TABLE treatment ( treatmentid number, patientunitstayid number, treatmentname text, treatmenttime time ) CREATE TABLE allergy ( allergyid number, patientunitstayid number, drugname text, allergyname text, allergytime time ) CREATE TABLE vitalperiodic ( vitalperiodicid nu...
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 = '025-44495')) AND DATETIME(microlab.culturetakentime, 'start of month') = DATET...
eicu
CREATE TABLE All_Documents ( Document_ID INTEGER, Date_Stored DATETIME, Document_Type_Code CHAR(15), Document_Name CHAR(255), Document_Description CHAR(255), Other_Details VARCHAR(255) ) CREATE TABLE Ref_Locations ( Location_Code CHAR(15), Location_Name VARCHAR(255), Location_Descri...
SELECT Date_in_Locaton_To, COUNT(Date_in_Locaton_To) FROM Document_Locations ORDER BY Date_in_Locaton_To
nvbench
CREATE TABLE table_50567 ( "Place" text, "Player" text, "Country" text, "Score" text, "To par" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What place had a score of 73-69-68=210?
SELECT "Place" FROM table_50567 WHERE "Score" = '73-69-68=210'
wikisql
CREATE TABLE table_30518 ( "Nr." real, "Player" text, "Games played" real, "Starting" real, "Sub" real, "Subbed" real, "Mins played" real, "Goals" real, "Pens. against" real, "Pens. for" real, "Fouls suff." real, "Fouls comm." real, "Yellow C" real, "Red c" real, ...
SELECT MAX("Assists") FROM table_30518 WHERE "Games played" = '25'
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 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 = '37516141' AND jybgb.BGRQ BETWEEN '2015-08-06' AND '2016-02-08' UNI...
css
CREATE TABLE table_201400_2 ( malayalam_name_മലയാളം VARCHAR, tamil_name_தமிழ் VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- what is the malayalam name of tamil name punarpoosam
SELECT malayalam_name_മലയാളം FROM table_201400_2 WHERE tamil_name_தமிழ் = "Punarpoosam புனர்பூசம்"
sql_create_context
CREATE TABLE table_70137 ( "Member" text, "Party" text, "Electorate" text, "State" text, "First elected" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the year First elected when the Member is John Armitage?
SELECT "First elected" FROM table_70137 WHERE "Member" = 'john armitage'
wikisql
CREATE TABLE table_39429 ( "Category" text, "Type" text, "Attribute" text, "Bubbles" text, "Cancelable" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Name the cancelable for onmouseover
SELECT "Cancelable" FROM table_39429 WHERE "Attribute" = 'onmouseover'
wikisql
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 wdmzjzjlb ( CYBQDM text, CYBQ...
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 table_73040 ( "Position" real, "Gymnast" text, "Floor" text, "Pommel Horse" text, "Rings" text, "Vault" text, "Parallel Bars" text, "Horizontal Bar" text, "Total" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- If the flo...
SELECT "Parallel Bars" FROM table_73040 WHERE "Floor" = '14.200'
wikisql
CREATE TABLE club_rank ( Rank real, Club_ID int, Gold real, Silver real, Bronze real, Total real ) CREATE TABLE competition ( Competition_ID int, Year real, Competition_type text, Country text ) CREATE TABLE competition_result ( Competition_ID int, Club_ID_1 int, Cl...
SELECT Competition_type, COUNT(Competition_type) FROM competition GROUP BY Competition_type ORDER BY Competition_type
nvbench
CREATE TABLE Rooms ( RoomId TEXT, roomName TEXT, beds INTEGER, bedType TEXT, maxOccupancy INTEGER, basePrice INTEGER, decor TEXT ) CREATE TABLE Reservations ( Code INTEGER, Room TEXT, CheckIn TEXT, CheckOut TEXT, Rate REAL, LastName TEXT, FirstName TEXT, Adul...
SELECT roomName, COUNT(*) FROM Reservations AS T1 JOIN Rooms AS T2 ON T1.Room = T2.RoomId GROUP BY T1.Room
nvbench
CREATE TABLE record ( ID int, Result text, Swimmer_ID int, Event_ID int ) CREATE TABLE stadium ( ID int, name text, Capacity int, City text, Country text, Opening_year int ) CREATE TABLE event ( ID int, Name text, Stadium_ID int, Year text ) CREATE TABLE swimme...
SELECT meter_300, ID FROM swimmer ORDER BY meter_300 DESC
nvbench
CREATE TABLE table_name_56 ( class VARCHAR, quantity_preserved VARCHAR, quantity_made VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What class has 0 preserved and 2 made?
SELECT class FROM table_name_56 WHERE quantity_preserved = "0" AND quantity_made = "2"
sql_create_context
CREATE TABLE table_9724 ( "Year" real, "Miss Earth Venezuela" text, "1st Runner Up" text, "2nd Runner Up" text, "3rd Runner Up" text, "4th Runner Up" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- who is the 4th runner-up when the 2nd runner-up ...
SELECT "4th Runner Up" FROM table_9724 WHERE "2nd Runner Up" = 'osmariel villalobos'
wikisql
CREATE TABLE t_kc21 ( MED_CLINIC_ID text, OVERALL_CD_ORG text, OVERALL_CD_PERSON text, COMP_ID text, PERSON_ID text, PERSON_NM text, IDENTITY_CARD text, SOC_SRT_CARD text, PERSON_SEX number, PERSON_AGE number, IN_HOSP_DATE time, OUT_HOSP_DATE time, DIFF_PLACE_FLG numb...
SELECT OUT_HOSP_DATE FROM t_kc21 WHERE MED_CLINIC_ID = '57313257288'
css
CREATE TABLE PostHistory ( Id number, PostHistoryTypeId number, PostId number, RevisionGUID other, CreationDate time, UserId number, UserDisplayName text, Comment text, Text text, ContentLicense text ) CREATE TABLE ReviewTaskResults ( Id number, ReviewTaskId number, ...
SELECT TagName, Count, LastEditorUserId, LastEditDate, Body FROM Tags INNER JOIN Posts ON WikiPostId = Posts.Id WHERE Body LIKE '% %' OR Body LIKE '% %' OR Body LIKE N'% %' ORDER BY Count DESC
sede
CREATE TABLE table_name_2 ( Id VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What shows for 2008 when 2010 is 138?
SELECT 2008 FROM table_name_2 WHERE 2010 = "138"
sql_create_context
CREATE TABLE table_47886 ( "Name" text, "Height (m)" real, "Height (ft)" real, "Location" text, "Year built" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the sum of the heights in meters for the commerzbank tower built after 1984?
SELECT SUM("Height (m)") FROM table_47886 WHERE "Year built" > '1984' AND "Name" = 'commerzbank tower'
wikisql
CREATE TABLE table_71425 ( "Year" real, "Entrant" text, "Chassis" text, "Engine" text, "Points" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What was the sum of the years, when the entrant was Scuderia Centro Sud, and when there were 6 points?
SELECT SUM("Year") FROM table_71425 WHERE "Entrant" = 'scuderia centro sud' AND "Points" = '6'
wikisql
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 School_ID, All_Games_Percent FROM basketball_match GROUP BY ACC_Home
nvbench
CREATE TABLE table_24018112_1 ( brand_name VARCHAR, model__list_ VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What brand is model G6xxx?
SELECT brand_name FROM table_24018112_1 WHERE model__list_ = "G6xxx"
sql_create_context
CREATE TABLE table_17019 ( "No. in series" real, "No. in season" real, "Title" text, "Directed by" text, "Written by" text, "Original air date" text, "U.S. viewers (millions)" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which episode was ...
SELECT "Title" FROM table_17019 WHERE "Written by" = 'Anthony E. Zuiker & Ken Solarz'
wikisql
CREATE TABLE lab ( subject_id text, hadm_id text, itemid text, charttime text, flag text, value_unit text, label text, fluid text ) CREATE TABLE demographic ( subject_id text, hadm_id text, name text, marital_status text, age text, dob text, gender text, ...
SELECT demographic.ethnicity FROM demographic WHERE demographic.subject_id = "6983"
mimicsql_data
CREATE TABLE table_49277 ( "Season" text, "Skip" text, "Third" text, "Second" text, "Lead" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Who has the lead in the season where Cathrine Norberg is second and Anna Rindeskog is third?
SELECT "Lead" FROM table_49277 WHERE "Second" = 'cathrine norberg' AND "Third" = 'anna rindeskog'
wikisql
CREATE TABLE table_name_5 ( webcast VARCHAR, website VARCHAR, frequency VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Name the webcast for website of and frequency of 103.3
SELECT webcast FROM table_name_5 WHERE website = "•" AND frequency = 103.3
sql_create_context