instruction
stringlengths
151
7.46k
output
stringlengths
2
4.44k
source
stringclasses
26 values
CREATE TABLE table_68161 ( "Year" real, "Entrant" text, "Chassis" text, "Engine" text, "Points" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which engine has an Entrant of team lotus, and a Year larger than 1962?
SELECT "Engine" FROM table_68161 WHERE "Entrant" = 'team lotus' AND "Year" > '1962'
wikisql
CREATE TABLE table_name_76 ( surface VARCHAR, winner_and_score VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- what is the surface when the winner and score is gustavo kuerten 6-4, 7-5, 7-6(6)?
SELECT surface FROM table_name_76 WHERE winner_and_score = "gustavo kuerten 6-4, 7-5, 7-6(6)"
sql_create_context
CREATE TABLE table_203_137 ( id number, "title" text, "album details" text, "peak chart positions\nus" number, "peak chart positions\nus r&b" number, "certifications" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- what canibus album was released...
SELECT "title" FROM table_203_137 WHERE id = (SELECT id FROM table_203_137 WHERE "title" = '2000 b.c. (before can-i-bus)') - 1
squall
CREATE TABLE table_name_22 ( accreditation_type VARCHAR, company_name VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the accreditation type of Vodacom Group PTY LTD (Vodafone group)?
SELECT accreditation_type FROM table_name_22 WHERE company_name = "vodacom group pty ltd (vodafone group)"
sql_create_context
CREATE TABLE table_46656 ( "Player" text, "Country" text, "Year(s) won" text, "Total" text, "To par" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is Player, when Country is 'United States', and when To Par is 'WD'?
SELECT "Player" FROM table_46656 WHERE "Country" = 'united states' AND "To par" = 'wd'
wikisql
CREATE TABLE PostLinks ( Id number, CreationDate time, PostId number, RelatedPostId number, LinkTypeId number ) CREATE TABLE SuggestedEditVotes ( Id number, SuggestedEditId number, UserId number, VoteTypeId number, CreationDate time, TargetUserId number, TargetRepChange ...
SELECT Id AS "post_link", CreationDate AS Title, ViewCount, Body, Tags FROM Posts WHERE PostTypeId = 1 AND CreationDate BETWEEN '01/01/2017' AND '12/31/2017' AND Tags LIKE '%<windows-phone%'
sede
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 SUM(t_kc24.MED_AMOUT) FROM t_kc24 WHERE t_kc24.t_kc21_MED_SER_ORG_NO = '6823656' AND t_kc24.CLINIC_SLT_DATE BETWEEN '2008-09-28' AND '2011-05-10'
css
CREATE TABLE people ( People_ID int, Sex text, Name text, Date_of_Birth text, Height real, Weight real ) 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 re...
SELECT Sex, AVG(Height) FROM people GROUP BY Sex ORDER BY Sex DESC
nvbench
CREATE TABLE classroom ( building varchar(15), room_number varchar(7), capacity numeric(4,0) ) CREATE TABLE instructor ( ID varchar(5), name varchar(20), dept_name varchar(20), salary numeric(8,2) ) CREATE TABLE section ( course_id varchar(8), sec_id varchar(8), semester varcha...
SELECT dept_name, MIN(salary) FROM instructor GROUP BY dept_name ORDER BY dept_name DESC
nvbench
CREATE TABLE table_61238 ( "Position" text, "Driver" text, "Entrant" text, "Class" text, "Laps" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Can you tell me the Position that has the Driver of bib stillwell?
SELECT "Position" FROM table_61238 WHERE "Driver" = 'bib stillwell'
wikisql
CREATE TABLE table_73487 ( "No. in series" real, "No. in season" real, "Title" text, "Directed by" text, "Written by" text, "Original air date" text, "Production code" text, "U.S. viewers (millions)" text ) -- Using valid SQLite, answer the following questions for the tables provided a...
SELECT "Written by" FROM table_73487 WHERE "Production code" = '5AJN11'
wikisql
CREATE TABLE table_30132 ( "Round" real, "Date" text, "Grand Prix" text, "Circuit" text, "MotoGP winner" text, "Moto2 winner" text, "Moto3 winner" text, "Report" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Name the motogp winner for 6...
SELECT "MotoGP winner" FROM table_30132 WHERE "Date" = '6 May'
wikisql
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 COUNT(*) FROM medication WHERE medication.drugname = 'potassium chloride tab cr' AND STRFTIME('%y', medication.drugstarttime) >= '2100'
eicu
CREATE TABLE table_name_21 ( tie_no VARCHAR, away_team VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- When Lincoln City was the away team what is the tie number?
SELECT tie_no FROM table_name_21 WHERE away_team = "lincoln city"
sql_create_context
CREATE TABLE Reservations ( Code INTEGER, Room TEXT, CheckIn TEXT, CheckOut TEXT, Rate REAL, LastName TEXT, FirstName TEXT, Adults INTEGER, Kids INTEGER ) CREATE TABLE Rooms ( RoomId TEXT, roomName TEXT, beds INTEGER, bedType TEXT, maxOccupancy INTEGER, baseP...
SELECT decor, COUNT(*) FROM Rooms WHERE bedType = "King" GROUP BY decor ORDER BY decor
nvbench
CREATE TABLE table_13464 ( "Japanese Title" text, "Romaji Title" text, "TV Station" text, "Episodes" text, "Average Ratings" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What Episode on TV Asahi Station has Rating of 12.0%?
SELECT "Episodes" FROM table_13464 WHERE "Average Ratings" = '12.0%' AND "TV Station" = 'tv asahi'
wikisql
CREATE TABLE table_name_48 ( crowd INTEGER, venue VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What was the highest crowd size at the Western Oval?
SELECT MAX(crowd) FROM table_name_48 WHERE venue = "western oval"
sql_create_context
CREATE TABLE table_25421463_1 ( team_name VARCHAR, points VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What team was Sigachev on when he had 38 points?
SELECT team_name FROM table_25421463_1 WHERE points = "38"
sql_create_context
CREATE TABLE table_53490 ( "Year" real, "Competition" text, "Date" text, "Location" text, "Score" text, "Result" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the result of the europe/africa group i, round robin game in Murcia (esp) bef...
SELECT "Result" FROM table_53490 WHERE "Location" = 'murcia (esp)' AND "Year" < '1999' AND "Competition" = 'europe/africa group i, round robin'
wikisql
CREATE TABLE table_name_58 ( class VARCHAR, wins VARCHAR, year VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- In 1992, what class has higher wins than 0?
SELECT class FROM table_name_58 WHERE wins > 0 AND year = 1992
sql_create_context
CREATE TABLE diagnoses_icd ( row_id number, subject_id number, hadm_id number, icd9_code text, charttime time ) CREATE TABLE labevents ( row_id number, subject_id number, hadm_id number, itemid number, charttime time, valuenum number, valueuom text ) CREATE TABLE d_labi...
SELECT MAX(t1.c1) FROM (SELECT SUM(cost.cost) AS c1 FROM cost WHERE cost.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 = 'abn react-anastom/graft')) AND DATETIME(cost.chargetime) >= DAT...
mimic_iii
CREATE TABLE table_name_99 ( tries_for VARCHAR, club VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- How many tries for Nelson RFC?
SELECT tries_for FROM table_name_99 WHERE club = "nelson rfc"
sql_create_context
CREATE TABLE table_30741 ( "Region Represented" text, "First Place" real, "Second Place" real, "Third Place" real, "Total Top 3 Placements" real, "First Place Winning Year(s) (if applicable)" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- How ma...
SELECT COUNT("Total Top 3 Placements") FROM table_30741 WHERE "Region Represented" = 'Taiwan'
wikisql
CREATE TABLE t_kc24 ( ACCOUNT_DASH_DATE time, ACCOUNT_DASH_FLG number, CASH_PAY number, CIVIL_SUBSIDY number, CKC102 number, CLINIC_ID text, CLINIC_SLT_DATE time, COMP_ID text, COM_ACC_PAY number, COM_PAY number, DATA_ID text, ENT_ACC_PAY number, ENT_PAY number, F...
SELECT gwyjzb.MED_SER_ORG_NO FROM gwyjzb WHERE gwyjzb.PERSON_NM = '秦雅惠' AND gwyjzb.MED_CLINIC_ID IN (SELECT t_kc22.MED_CLINIC_ID FROM t_kc22 WHERE t_kc22.SOC_SRT_DIRE_NM = '多糖铁复合物胶囊') UNION SELECT fgwyjzb.MED_SER_ORG_NO FROM fgwyjzb WHERE fgwyjzb.PERSON_NM = '秦雅惠' AND fgwyjzb.MED_CLINIC_ID IN (SELECT t_kc22.MED_CLINIC_...
css
CREATE TABLE table_44007 ( "Round" real, "Pick" real, "Name" text, "Position" text, "College" text, "AAFC Team" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which Round has a College of tulsa, and a Pick larger than 61?
SELECT AVG("Round") FROM table_44007 WHERE "College" = 'tulsa' AND "Pick" > '61'
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 t_kc22.t_kc21_MED_SER_ORG_NO FROM t_kc22 WHERE t_kc22.t_kc21_PERSON_ID = '11260648' AND t_kc22.MED_CLINIC_ID IN (SELECT t_kc22.MED_CLINIC_ID FROM t_kc22 WHERE t_kc22.SOC_SRT_DIRE_NM = '氟哌啶醇片(糖衣)')
css
CREATE TABLE table_5721 ( "Year" real, "Class" text, "Team" text, "Machine" text, "Points" real, "Wins" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Before 1981, how many Points did Team Suzuki have with less than 0 Wins?
SELECT SUM("Points") FROM table_5721 WHERE "Team" = 'suzuki' AND "Year" < '1981' AND "Wins" < '0'
wikisql
CREATE TABLE table_36546 ( "Driver" text, "Constructor" text, "Laps" real, "Time/Retired" text, "Grid" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- How many Laps have a Driver of david coulthard, and a Grid smaller than 14?
SELECT SUM("Laps") FROM table_36546 WHERE "Driver" = 'david coulthard' AND "Grid" < '14'
wikisql
CREATE TABLE Catalogs ( catalog_id INTEGER, catalog_name VARCHAR(50), catalog_publisher VARCHAR(80), date_of_publication DATETIME, date_of_latest_revision DATETIME ) CREATE TABLE Catalog_Contents_Additional_Attributes ( catalog_entry_id INTEGER, catalog_level_number INTEGER, attribute_i...
SELECT catalog_entry_name, COUNT(catalog_entry_name) FROM Catalog_Contents AS t1 JOIN Catalog_Contents_Additional_Attributes AS t2 ON t1.catalog_entry_id = t2.catalog_entry_id WHERE t2.catalog_level_number = "8" GROUP BY catalog_entry_name
nvbench
CREATE TABLE paper ( paperid int, title varchar, venueid int, year int, numciting int, numcitedby int, journalid int ) CREATE TABLE keyphrase ( keyphraseid int, keyphrasename varchar ) CREATE TABLE cite ( citingpaperid int, citedpaperid int ) CREATE TABLE journal ( jou...
SELECT DISTINCT WRITES_0.paperid FROM author AS AUTHOR_0, author AS AUTHOR_1, writes AS WRITES_0, writes AS WRITES_1 WHERE AUTHOR_0.authorname = 'Richard Ladner' AND AUTHOR_1.authorname = 'Linda Shapiro' AND WRITES_0.authorid = AUTHOR_0.authorid AND WRITES_1.authorid = AUTHOR_1.authorid AND WRITES_1.paperid = WRITES_0....
scholar
CREATE TABLE table_203_541 ( id number, "games" text, "host city" text, "dates" text, "nations" number, "participants" number, "events" number ) -- Using valid SQLite, answer the following questions for the tables provided above. -- what games featured the fewest participating nations ?
SELECT "games" FROM table_203_541 ORDER BY "nations" LIMIT 1
squall
CREATE TABLE d_icd_diagnoses ( row_id number, icd9_code text, short_title text, long_title 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 admissions ( row_id numb...
SELECT COUNT(*) > 0 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 = 17435) AND NOT icustays.outtime IS NULL ORDER BY icustays.intime LIMIT 1) AND inputevents_cv.itemid IN (...
mimic_iii
CREATE TABLE artist ( Artist_ID int, Artist text, Age int, Famous_Title text, Famous_Release_date text ) CREATE TABLE volume ( Volume_ID int, Volume_Issue text, Issue_Date text, Weeks_on_Top real, Song text, Artist_ID int ) CREATE TABLE music_festival ( ID int, Musi...
SELECT Category, COUNT(*) FROM music_festival GROUP BY Category ORDER BY Category
nvbench
CREATE TABLE zzmzjzjlb ( HXPLC number, HZXM text, JLSJ time, JZJSSJ time, JZKSBM text, JZKSMC text, JZKSRQ time, JZLSH number, JZZDBM text, JZZDSM text, JZZTDM number, JZZTMC text, KH text, KLX number, MJZH text, ML number, MZZYZDZZBM text, MZZYZDZ...
SELECT zzmzjzjlb.JZZDBM, zzmzjzjlb.JZZDSM FROM hz_info JOIN zzmzjzjlb ON hz_info.YLJGDM = zzmzjzjlb.YLJGDM AND hz_info.KH = zzmzjzjlb.KH AND hz_info.KLX = zzmzjzjlb.KLX WHERE hz_info.RYBH = '33787678' UNION SELECT fzzmzjzjlb.JZZDBM, fzzmzjzjlb.JZZDSM FROM hz_info JOIN fzzmzjzjlb ON hz_info.YLJGDM = fzzmzjzjlb.YLJGDM AN...
css
CREATE TABLE flight ( id number, vehicle_flight_number text, date text, pilot text, velocity number, altitude number, airport_id number, company_id number ) CREATE TABLE airport ( id number, city text, country text, iata text, icao text, name text ) CREATE TABLE...
SELECT id, country, city, name FROM airport ORDER BY name
spider
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.admission_type = "NEWBORN" AND demographic.admission_location = "PHYS REFERRAL/NORMAL DELI"
mimicsql_data
CREATE TABLE table_8900 ( "Consonant final stem" text, "Example: did-" text, "Vowel final stem" text, "Example: ch'aghara-" text, "Noun example: datv-" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What example for did- is shown for a Consonant fin...
SELECT "Example: did-" FROM table_8900 WHERE "Consonant final stem" = '-i' AND "Noun example: datv-" = 'datv-is'
wikisql
CREATE TABLE table_52931 ( "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 Brunswick Street Oval?
SELECT "Home team" FROM table_52931 WHERE "Venue" = 'brunswick street oval'
wikisql
CREATE TABLE table_name_70 ( result VARCHAR, week VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- The game in week 11 has what result?
SELECT result FROM table_name_70 WHERE week = 11
sql_create_context
CREATE TABLE table_name_56 ( tie_no VARCHAR, away_team VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the Tie no of the Port Vale Away game?
SELECT tie_no FROM table_name_56 WHERE away_team = "port vale"
sql_create_context
CREATE TABLE locations ( LOCATION_ID decimal(4,0), STREET_ADDRESS varchar(40), POSTAL_CODE varchar(12), CITY varchar(30), STATE_PROVINCE varchar(25), COUNTRY_ID varchar(2) ) CREATE TABLE jobs ( JOB_ID varchar(10), JOB_TITLE varchar(35), MIN_SALARY decimal(6,0), MAX_SALARY decima...
SELECT LAST_NAME, EMPLOYEE_ID FROM employees
nvbench
CREATE TABLE products ( code number, name text, price number, manufacturer number ) CREATE TABLE manufacturers ( code number, name text, headquarter text, founder text, revenue number ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What a...
SELECT name, headquarter, revenue FROM manufacturers ORDER BY revenue DESC
spider
CREATE TABLE Student_Tests_Taken ( registration_id INTEGER, date_test_taken DATETIME, test_result VARCHAR(255) ) CREATE TABLE Students ( student_id INTEGER, date_of_registration DATETIME, date_of_latest_logon DATETIME, login_name VARCHAR(40), password VARCHAR(10), personal_name VARC...
SELECT T2.middle_name, T1.student_id FROM Student_Course_Enrolment AS T1 JOIN Students AS T2 ON T1.student_id = T2.student_id
nvbench
CREATE TABLE Enrolled_in ( StuID INTEGER, CID VARCHAR(7), Grade VARCHAR(2) ) CREATE TABLE Gradeconversion ( lettergrade VARCHAR(2), gradepoint FLOAT ) CREATE TABLE Member_of ( FacID INTEGER, DNO INTEGER, Appt_Type VARCHAR(15) ) CREATE TABLE Minor_in ( StuID INTEGER, DNO INTEGE...
SELECT T1.CName, COUNT(T1.CName) FROM Course AS T1 JOIN Enrolled_in AS T2 ON T1.CID = T2.CID GROUP BY T1.CName, T2.CID HAVING COUNT(*) >= 5
nvbench
CREATE TABLE table_23685152_2 ( record VARCHAR, date VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What was the record in game played on July 28?
SELECT record FROM table_23685152_2 WHERE date = "July 28"
sql_create_context
CREATE TABLE diagnoses ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) CREATE TABLE prescriptions ( subject_id text, hadm_id text, icustay_id text, drug_type text, drug text, formulary_drug_cd text, route text, drug_dose text ) C...
SELECT AVG(demographic.age) FROM demographic WHERE demographic.age >= "31" AND demographic.admityear >= "2155"
mimicsql_data
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 lab ( subject_id text, hadm_id text, ...
SELECT procedures.icd9_code, procedures.long_title FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.name = "Mary Davis"
mimicsql_data
CREATE TABLE d_icd_diagnoses ( row_id number, icd9_code text, short_title text, long_title text ) CREATE TABLE d_labitems ( row_id number, itemid number, label text ) CREATE TABLE d_items ( row_id number, itemid number, label text, linksto text ) CREATE TABLE cost ( ro...
SELECT d_icd_procedures.short_title FROM d_icd_procedures WHERE d_icd_procedures.icd9_code IN (SELECT t3.icd9_code FROM (SELECT t2.icd9_code, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM (SELECT admissions.subject_id, diagnoses_icd.charttime, admissions.hadm_id FROM diagnoses_icd JOIN admissions ON diagnoses_i...
mimic_iii
CREATE TABLE diagnoses ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) CREATE TABLE demographic ( subject_id text, hadm_id text, name text, marital_status text, age text, dob text, gender text, language text, religion text, ...
SELECT demographic.admission_type, demographic.admission_location FROM demographic WHERE demographic.subject_id = "42067"
mimicsql_data
CREATE TABLE table_11811 ( "Home team" text, "Home team score" text, "Away team" text, "Away team score" text, "Venue" text, "Date" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- who is the home team when the home team score is 6.17 (53)?
SELECT "Home team" FROM table_11811 WHERE "Home team score" = '6.17 (53)'
wikisql
CREATE TABLE table_name_26 ( tournament VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the 2007 value with 1r in 2009 in the US Open?
SELECT 2007 FROM table_name_26 WHERE 2009 = "1r" AND tournament = "us open"
sql_create_context
CREATE TABLE table_name_90 ( pl_gp VARCHAR, pick__number VARCHAR, reg_gp VARCHAR, rd__number VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the sum number of Pl GP when the Reg GP was 0, the Rd number was bigger than 8, and the pick number wa...
SELECT COUNT(pl_gp) FROM table_name_90 WHERE reg_gp = 0 AND rd__number > 8 AND pick__number > 146
sql_create_context
CREATE TABLE table_name_16 ( status VARCHAR, opposing_teams VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which Status has a Opposing Teams of wales?
SELECT status FROM table_name_16 WHERE opposing_teams = "wales"
sql_create_context
CREATE TABLE table_15869204_4 ( date VARCHAR, location_attendance VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- On what date was the attendance at Continental Airlines Arena 13,755?
SELECT date FROM table_15869204_4 WHERE location_attendance = "Continental Airlines Arena 13,755"
sql_create_context
CREATE TABLE table_72723 ( "Episode No." real, "Title" text, "Directed by" text, "Written by" text, "Original air date" text, "Production code" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the production code for the episode written by...
SELECT "Production code" FROM table_72723 WHERE "Written by" = 'Drew Z. Greenberg'
wikisql
CREATE TABLE table_45286 ( "Rank" real, "Gold" real, "Silver" real, "Bronze" real, "Total" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the least total that has fewer golds than 2, a higher rank than 4 and fewer bronzes than 1?
SELECT MIN("Total") FROM table_45286 WHERE "Gold" < '2' AND "Rank" = '4' AND "Bronze" < '1'
wikisql
CREATE TABLE t_kc24 ( ACCOUNT_DASH_DATE time, ACCOUNT_DASH_FLG number, CASH_PAY number, CIVIL_SUBSIDY number, CKC102 number, CLINIC_ID text, CLINIC_SLT_DATE time, COMP_ID text, COM_ACC_PAY number, COM_PAY number, DATA_ID text, ENT_ACC_PAY number, ENT_PAY number, F...
SELECT t_kc22.SOC_SRT_DIRE_CD, t_kc22.SOC_SRT_DIRE_NM FROM t_kc22 WHERE t_kc22.t_kc21_PERSON_NM = '苏清华' GROUP BY t_kc22.SOC_SRT_DIRE_CD ORDER BY COUNT(*) DESC
css
CREATE TABLE table_14966667_19 ( height VARCHAR, name VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- How tall is Braxton Kelley?
SELECT height FROM table_14966667_19 WHERE name = "Braxton Kelley"
sql_create_context
CREATE TABLE table_name_57 ( ratio VARCHAR, unit VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What Ratio has a Unit of zolotnik?
SELECT ratio FROM table_name_57 WHERE unit = "zolotnik"
sql_create_context
CREATE TABLE table_69961 ( "Competition" text, "Played" real, "Draw" real, "Lost" real, "Against" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the total against with 1 draw and less than 8 played?
SELECT SUM("Against") FROM table_69961 WHERE "Draw" = '1' AND "Played" < '8'
wikisql
CREATE TABLE catalog_structure ( catalog_level_number number, catalog_id number, catalog_level_name text ) CREATE TABLE attribute_definitions ( attribute_id number, attribute_name text, attribute_data_type text ) CREATE TABLE catalogs ( catalog_id number, catalog_name text, catalog...
SELECT t2.catalog_level_name FROM catalog_contents AS t1 JOIN catalog_structure AS t2 ON t1.catalog_level_number = t2.catalog_level_number ORDER BY t1.price_in_dollars LIMIT 1
spider
CREATE TABLE table_name_89 ( date VARCHAR, week VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- When has a Week of 1?
SELECT date FROM table_name_89 WHERE week = 1
sql_create_context
CREATE TABLE table_43944 ( "Round" real, "Pick" real, "Overall" real, "Name" text, "Position" text, "College" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which Position has a College of colorado?
SELECT "Position" FROM table_43944 WHERE "College" = 'colorado'
wikisql
CREATE TABLE lab ( labid number, patientunitstayid number, labname text, labresult number, labresulttime time ) CREATE TABLE diagnosis ( diagnosisid number, patientunitstayid number, diagnosisname text, diagnosistime time, icd9code text ) CREATE TABLE treatment ( treatmenti...
SELECT MAX(t1.c1) FROM (SELECT SUM(cost.cost) AS c1 FROM cost WHERE cost.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.patientunitstayid IN (SELECT diagnosis.patientunitstayid FROM diagnosis WHERE diagnosis.diagnosisname = 'pneumonia - opportunistic')) AND STRFTIME('%...
eicu
CREATE TABLE pilot ( Pilot_Id int(11), Name varchar(50), Age int(11) ) CREATE TABLE airport_aircraft ( ID int, Airport_ID int, Aircraft_ID int ) CREATE TABLE airport ( Airport_ID int, Airport_Name text, Total_Passengers real, %_Change_2007 text, International_Passengers rea...
SELECT Description, COUNT(Description) FROM aircraft GROUP BY Description ORDER BY COUNT(Description) DESC
nvbench
CREATE TABLE lab ( labid number, patientunitstayid number, labname text, labresult number, labresulttime time ) CREATE TABLE intakeoutput ( intakeoutputid number, patientunitstayid number, cellpath text, celllabel text, cellvaluenumeric number, intakeoutputtime time ) CREAT...
SELECT 24 * (STRFTIME('%j', CURRENT_TIME()) - STRFTIME('%j', diagnosis.diagnosistime)) FROM diagnosis WHERE diagnosis.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '035-2205'...
eicu
CREATE TABLE table_75738 ( "Name" text, "Space Agency" text, "Launch Date" text, "Terminated" text, "Location" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which space agency launched the herschel space observatory?
SELECT "Space Agency" FROM table_75738 WHERE "Name" = 'herschel space observatory'
wikisql
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 regions ( REGION_ID decimal(5,0), REGION_NAME varchar(2...
SELECT FIRST_NAME, SALARY FROM employees ORDER BY FIRST_NAME DESC
nvbench
CREATE TABLE table_16842 ( "Player" text, "No." real, "Nationality" text, "Position" text, "Years for Jazz" text, "School/Club Team" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which position does Deshawn Stevenson play?
SELECT "Position" FROM table_16842 WHERE "Player" = 'DeShawn Stevenson'
wikisql
CREATE TABLE diagnosis ( diagnosisid number, patientunitstayid number, diagnosisname text, diagnosistime time, icd9code text ) CREATE TABLE microlab ( microlabid number, patientunitstayid number, culturesite text, organism text, culturetakentime time ) CREATE TABLE vitalperiodi...
SELECT diagnosis.diagnosistime FROM diagnosis WHERE diagnosis.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '002-4486' AND patient.hospitaldischargetime IS NULL)) AND diagnos...
eicu
CREATE TABLE table_204_130 ( id number, "#" number, "date" text, "venue" text, "opponent" text, "score" text, "result" text, "competition" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- who is the opponent listed after japan ?
SELECT "opponent" FROM table_204_130 WHERE id = (SELECT id FROM table_204_130 WHERE "opponent" = 'japan') + 1
squall
CREATE TABLE SuggestedEdits ( Id number, PostId number, CreationDate time, ApprovalDate time, RejectionDate time, OwnerUserId number, Comment text, Text text, Title text, Tags text, RevisionGUID other ) CREATE TABLE Badges ( Id number, UserId number, Name text, ...
'seems like a list question'
sede
CREATE TABLE table_203_172 ( id number, "title" text, "date of creation" text, "surname" text, "first titular" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- how many dukedoms are listed ?
SELECT COUNT("title") FROM table_203_172
squall
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 diagnoses ( ...
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.age < "71" AND procedures.icd9_code = "5732"
mimicsql_data
CREATE TABLE table_16976547_2 ( immunity VARCHAR, cycle_no VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Name the total number of immunity for cycle number of 13
SELECT COUNT(immunity) FROM table_16976547_2 WHERE cycle_no = "13"
sql_create_context
CREATE TABLE zyjzjlb ( YLJGDM text, JZLSH text, MZJZLSH text, KH text, KLX number, HZXM text, WDBZ number, RYDJSJ time, RYTJDM number, RYTJMC text, JZKSDM text, JZKSMC text, RZBQDM text, RZBQMC text, RYCWH text, CYKSDM text, CYKSMC text, CYBQDM tex...
SELECT SQKS, SQKSMC FROM jybgb WHERE BGDH = '77970046019'
css
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.admission_type = "EMERGENCY" AND demographic.diagnosis = "BLADDER CANCER/SDA"
mimicsql_data
CREATE TABLE table_58680 ( "County" text, "Per capita income" text, "Median household income" text, "Median family income" text, "Population" real, "Number of households" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the total number of...
SELECT COUNT("Number of households") FROM table_58680 WHERE "Population" > '25,692' AND "Median household income" = '$51,914'
wikisql
CREATE TABLE table_15110 ( "Week" text, "Date" text, "Opponent" text, "Result" text, "Game site" text, "Record" text, "Attendance" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Name the date for game site of riverfront stadium
SELECT "Date" FROM table_15110 WHERE "Game site" = 'riverfront stadium'
wikisql
CREATE TABLE table_34759 ( "Operation" text, "Binary" text, "Binomial" text, "Fibonacci" text, "Pairing" text, "Brodal ***" text, "Strict Fibonacci Heap" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Binomial of (log n), and a Strict Fibona...
SELECT "Operation" FROM table_34759 WHERE "Binomial" = 'θ(log n)' AND "Strict Fibonacci Heap" = 'o(log n)'
wikisql
CREATE TABLE d_icd_procedures ( row_id number, icd9_code text, short_title text, long_title text ) CREATE TABLE microbiologyevents ( row_id number, subject_id number, hadm_id number, charttime time, spec_type_desc text, org_name text ) CREATE TABLE admissions ( row_id numbe...
SELECT MAX(chartevents.valuenum) FROM chartevents WHERE chartevents.icustay_id IN (SELECT icustays.icustay_id FROM icustays WHERE icustays.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 3677)) AND chartevents.itemid IN (SELECT d_items.itemid FROM d_items WHERE d_items.label = 'admit...
mimic_iii
CREATE TABLE CloseReasonTypes ( Id number, Name text, Description text ) CREATE TABLE TagSynonyms ( Id number, SourceTagName text, TargetTagName text, CreationDate time, OwnerUserId number, AutoRenameCount number, LastAutoRename time, Score number, ApprovedByUserId numbe...
SELECT Tags.TagName, COUNT(*) AS "Number of Questions", AVG(Posts.Score + 0.0) AS "average score" FROM Posts, PostTags, Tags WHERE Posts.Id = PostTags.PostId AND PostTags.TagId = Tags.Id GROUP BY Tags.TagName ORDER BY COUNT(*) DESC
sede
CREATE TABLE hz_info ( KH text, KLX number, YLJGDM text, RYBH text ) CREATE TABLE jyjgzbb ( JYZBLSH text, YLJGDM text, BGDH text, BGRQ time, JYRQ time, JCRGH text, JCRXM text, SHRGH text, SHRXM text, JCXMMC text, JCZBDM text, JCFF text, JCZBMC text, ...
SELECT * FROM person_info JOIN hz_info JOIN zyjzjlb ON person_info.RYBH = hz_info.RYBH AND hz_info.YLJGDM = zyjzjlb.YLJGDM AND hz_info.KH = zyjzjlb.KH AND hz_info.KLX = zyjzjlb.KLX WHERE person_info.XM = '窦泰河' AND hz_info.YLJGDM = '1388094' AND zyjzjlb.JZKSMC LIKE '%遗传%'
css
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 t_kc22.SOC_SRT_DIRE_CD, t_kc22.SOC_SRT_DIRE_NM FROM t_kc22 WHERE t_kc22.t_kc21_PERSON_NM = '鲁雅丽' AND t_kc22.MED_INV_ITEM_TYPE = '检查费'
css
CREATE TABLE table_13251 ( "Year" real, "Champion" text, "City" text, "LLWS" text, "Record" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which champion has a Group Stage LLWS in Russellville?
SELECT "Champion" FROM table_13251 WHERE "LLWS" = 'group stage' AND "City" = 'russellville'
wikisql
CREATE TABLE vitalperiodic ( vitalperiodicid number, patientunitstayid number, temperature number, sao2 number, heartrate number, respiration number, systemicsystolic number, systemicdiastolic number, systemicmean number, observationtime time ) CREATE TABLE diagnosis ( diagn...
SELECT patient.hospitaladmittime FROM patient WHERE patient.uniquepid = '035-4428' AND DATETIME(patient.hospitaladmittime, 'start of year') = DATETIME(CURRENT_TIME(), 'start of year', '-1 year') ORDER BY patient.hospitaladmittime LIMIT 1
eicu
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.OUT_DIAG_DIS_CD, AVG(t_kc21.PERSON_AGE) FROM t_kc21 WHERE t_kc21.MED_SER_ORG_NO = '8485099' GROUP BY t_kc21.OUT_DIAG_DIS_CD
css
CREATE TABLE sportsinfo ( stuid number, sportname text, hoursperweek number, gamesplayed number, onscholarship text ) CREATE TABLE student ( stuid number, lname text, fname text, age number, sex text, major number, advisor number, city_code text ) CREATE TABLE plays...
SELECT stuid, COUNT(*), SUM(gamesplayed) FROM sportsinfo GROUP BY stuid
spider
CREATE TABLE table_name_93 ( report VARCHAR, set_3 VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which report has a Set 3 value of 21 25?
SELECT report FROM table_name_93 WHERE set_3 = "21–25"
sql_create_context
CREATE TABLE time_interval ( period text, begin_time int, end_time int ) CREATE TABLE state ( state_code text, state_name text, country_name text ) CREATE TABLE restriction ( restriction_code text, advance_purchase int, stopovers text, saturday_stay_required text, minimum_s...
SELECT DISTINCT fare.fare_id, flight.airline_code, flight.flight_id FROM airport_service AS AIRPORT_SERVICE_0, airport_service AS AIRPORT_SERVICE_1, city AS CITY_0, city AS CITY_1, fare, flight, flight_fare WHERE CITY_0.city_code = AIRPORT_SERVICE_0.city_code AND CITY_0.city_name = 'DALLAS' AND CITY_1.city_code = AIRPO...
atis
CREATE TABLE qtb ( 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.OUT_DIAG_DIS_CD, qtb.OUT_DIAG_DIS_NM FROM qtb WHERE qtb.PERSON_ID = '06437336' AND qtb.MED_CLINIC_ID IN (SELECT t_kc24.MED_CLINIC_ID FROM t_kc24 WHERE t_kc24.MED_AMOUT >= 6223.95) UNION SELECT gyb.OUT_DIAG_DIS_CD, gyb.OUT_DIAG_DIS_NM FROM gyb WHERE gyb.PERSON_ID = '06437336' AND gyb.MED_CLINIC_ID IN (SELECT ...
css
CREATE TABLE table_77243 ( "Place" text, "Player" text, "Country" text, "Score" text, "To par" real, "Money ( $ )" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which country's score of 72-77-69-74=292 resulted in a reward of over $5,500?
SELECT "Country" FROM table_77243 WHERE "Money ( $ )" > '5,500' AND "Score" = '72-77-69-74=292'
wikisql
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 = '38516022248'
css
CREATE TABLE table_name_64 ( actor VARCHAR, character VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- who is the actor that played rachel mckenna?
SELECT actor FROM table_name_64 WHERE character = "rachel mckenna"
sql_create_context
CREATE TABLE procedures ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) CREATE TABLE prescriptions ( subject_id text, hadm_id text, icustay_id text, drug_type text, drug text, formulary_drug_cd text, route text, drug_dose text ) ...
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.diagnosis = "ST ELEVATED MYOCARDIAL INFARCTION\CARDIAC CATH" AND lab.fluid = "Pleural"
mimicsql_data
CREATE TABLE diagnosis ( diagnosisid number, patientunitstayid number, diagnosisname text, diagnosistime time, icd9code text ) CREATE TABLE allergy ( allergyid number, patientunitstayid number, drugname text, allergyname text, allergytime time ) CREATE TABLE intakeoutput ( ...
SELECT t3.treatmentname FROM (SELECT t2.treatmentname, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM (SELECT patient.uniquepid, diagnosis.diagnosistime, patient.patienthealthsystemstayid FROM diagnosis JOIN patient ON diagnosis.patientunitstayid = patient.patientunitstayid WHERE diagnosis.diagnosisname = 'bronc...
eicu
CREATE TABLE table_name_38 ( year VARCHAR, score VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What year has 385 runs as the score?
SELECT year FROM table_name_38 WHERE score = "385 runs"
sql_create_context
CREATE TABLE manager ( Manager_ID int, Name text, Country text, Working_year_starts text, Age int, Level int ) CREATE TABLE railway ( Railway_ID int, Railway text, Builder text, Built text, Wheels text, Location text, ObjectNumber text ) CREATE TABLE train ( Tra...
SELECT Builder, COUNT(*) FROM railway GROUP BY Builder
nvbench
CREATE TABLE table_36519 ( "Result" text, "Opponent" text, "Method" text, "Event" text, "Date" text, "Round" text, "Time" text, "Location" text, "Rules" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- WHich Rules has a Method of ko (p...
SELECT "Rules" FROM table_36519 WHERE "Method" = 'ko (punch)'
wikisql
CREATE TABLE Elimination ( Elimination_ID text, Wrestler_ID text, Team text, Eliminated_By text, Elimination_Move text, Time text ) CREATE TABLE wrestler ( Wrestler_ID int, Name text, Reign text, Days_held text, Location text, Event text ) -- Using valid SQLite, answer...
SELECT Team, COUNT(Team) FROM Elimination GROUP BY Team
nvbench