instruction
stringlengths
151
7.46k
output
stringlengths
2
4.44k
source
stringclasses
26 values
CREATE TABLE table_29556461_8 ( game INTEGER, high_assists VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- When allen/moore/wyatt 4 have the highest amount of assists what is the highest game?
SELECT MAX(game) FROM table_29556461_8 WHERE high_assists = "Allen/Moore/Wyatt – 4"
sql_create_context
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 diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE demographic.gender = "M" AND diagnoses.short_title = "Mal neo descend colon"
mimicsql_data
CREATE TABLE table_name_20 ( distance VARCHAR, stage VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the Distance of the 1945 Vuelta a Espana with 4A Stage?
SELECT distance FROM table_name_20 WHERE stage = "4a"
sql_create_context
CREATE TABLE publication_keyword ( kid int, pid int ) CREATE TABLE publication ( abstract varchar, cid int, citation_num int, jid int, pid int, reference_num int, title varchar, year int ) CREATE TABLE domain_author ( aid int, did int ) CREATE TABLE cite ( cited in...
SELECT organization.name FROM author, domain, domain_author, organization WHERE domain_author.aid = author.aid AND domain.did = domain_author.did AND domain.name = 'Databases' AND organization.continent = 'North America' AND organization.oid = author.oid
academic
CREATE TABLE Customers_Cards ( card_id INTEGER, customer_id INTEGER, card_type_code VARCHAR(15), card_number VARCHAR(80), date_valid_from DATETIME, date_valid_to DATETIME, other_card_details VARCHAR(255) ) CREATE TABLE Accounts ( account_id INTEGER, customer_id INTEGER, account_...
SELECT card_type_code, COUNT(*) FROM Customers_Cards GROUP BY card_type_code ORDER BY card_type_code DESC
nvbench
CREATE TABLE table_1090916_2 ( status VARCHAR, livery VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the status when livery is blue?
SELECT status FROM table_1090916_2 WHERE livery = "Blue"
sql_create_context
CREATE TABLE Person ( name varchar(20), age INTEGER, city TEXT, gender TEXT, job TEXT ) CREATE TABLE PersonFriend ( name varchar(20), friend varchar(20), year INTEGER ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Draw a bar chart for how ma...
SELECT gender, COUNT(*) FROM Person WHERE age < 40 GROUP BY gender ORDER BY COUNT(*)
nvbench
CREATE TABLE table_45273 ( "Year" real, "Tournaments played" real, "Cuts made" real, "Wins" real, "Best finish" text, "Earnings ( $ )" real, "Money list rank" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- what is the earliest year with the ...
SELECT MIN("Year") FROM table_45273 WHERE "Best finish" = 't-65'
wikisql
CREATE TABLE table_50108 ( "Date" text, "H/A/N" text, "Opponent" text, "Score" text, "Record" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is Date, when Record is 12-58?
SELECT "Date" FROM table_50108 WHERE "Record" = '12-58'
wikisql
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 dual_carrier...
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 (((flight.departure_time = 705 AND flight.stops = 1) AND CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'ATLANTA' AND flight.to_airport = ...
atis
CREATE TABLE table_14656147_2 ( record VARCHAR, result VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Type the record details if any result has L 3-6 in it?
SELECT record FROM table_14656147_2 WHERE result = "L 3-6"
sql_create_context
CREATE TABLE table_47468 ( "Place" text, "Player" text, "Country" text, "Score" text, "To par" text, "Money ( $ )" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which Money ($) has a Score of 70-66-73-69=278?
SELECT AVG("Money ( $ )") FROM table_47468 WHERE "Score" = '70-66-73-69=278'
wikisql
CREATE TABLE table_79441 ( "Tie no" text, "Home team" text, "Score" text, "Away team" text, "Date" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What date was Chester the away team?
SELECT "Date" FROM table_79441 WHERE "Away team" = 'chester'
wikisql
CREATE TABLE table_399 ( "Name" text, "Position" text, "Height" text, "Weight(lbs)" real, "Born" text, "College" text, "Drafted" text, "Pro Team" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the name when born is december 30, 1...
SELECT "Name" FROM table_399 WHERE "Born" = 'December 30, 1957 Detroit, MI'
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 diagnoses ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) CREATE TABLE demographic (...
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE diagnoses.short_title = "Syst/diast hrt fail NOS" AND lab."CATEGORY" = "Chemistry"
mimicsql_data
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 procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.discharge_location = "DEAD/EXPIRED" AND procedures.long_title = "Initial insertion of transvenous leads [electrodes] into atrium and ventricle"
mimicsql_data
CREATE TABLE table_name_3 ( city_town VARCHAR, stadium VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What town has the Welford Road Stadium?
SELECT city_town FROM table_name_3 WHERE stadium = "welford road"
sql_create_context
CREATE TABLE table_57794 ( "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 crowd attendance for the game with ...
SELECT SUM("Crowd") FROM table_57794 WHERE "Away team score" = '14.10 (94)'
wikisql
CREATE TABLE table_39566 ( "Role" text, "D'Oyly Carte 1920 Tour" text, "D'Oyly Carte 1930 Tour" text, "D'Oyly Carte 1939 Tour" text, "D'Oyly Carte 1945 Tour" text, "D'Oyly Carte 1950 Tour" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- D'Oyly Ca...
SELECT "D'Oyly Carte 1950 Tour" FROM table_39566 WHERE "D'Oyly Carte 1939 Tour" = 'sydney granville'
wikisql
CREATE TABLE enrolled_in ( stuid number, cid text, grade text ) CREATE TABLE gradeconversion ( lettergrade text, gradepoint number ) CREATE TABLE course ( cid text, cname text, credits number, instructor number, days text, hours text, dno number ) CREATE TABLE student ...
SELECT dname FROM department WHERE building = "Mergenthaler"
spider
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 COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE demographic.age < "67" AND diagnoses.long_title = "Schizoaffective disorder, unspecified"
mimicsql_data
CREATE TABLE stadium ( ID int, name text, Capacity int, City text, Country text, Opening_year int ) CREATE TABLE swimmer ( ID int, name text, Nationality text, meter_100 real, meter_200 text, meter_300 text, meter_400 text, meter_500 text, meter_600 text, ...
SELECT Time, meter_100 FROM swimmer ORDER BY Time DESC
nvbench
CREATE TABLE hz_info_zyjzjlb ( JZLSH number, YLJGDM number, zyjzjlb_id number ) 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 t...
SELECT mzjzjlb.SG, mzjzjlb.TZ FROM person_info JOIN hz_info JOIN mzjzjlb 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 WHERE person_info.XM = '郎高义'
css
CREATE TABLE table_name_83 ( score VARCHAR, place VARCHAR, player VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the score with a place of t6 for the player k.j. choi?
SELECT score FROM table_name_83 WHERE place = "t6" AND player = "k.j. choi"
sql_create_context
CREATE TABLE table_name_23 ( record VARCHAR, visitor VARCHAR, score VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which Record has a Visitor of pittsburgh, and a Score of 4 0?
SELECT record FROM table_name_23 WHERE visitor = "pittsburgh" AND score = "4–0"
sql_create_context
CREATE TABLE admissions ( row_id number, subject_id number, hadm_id number, admittime time, dischtime time, admission_type text, admission_location text, discharge_location text, insurance text, language text, marital_status text, ethnicity text, age number ) CREATE ...
SELECT t3.drug FROM (SELECT t2.drug, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM (SELECT admissions.subject_id, prescriptions.startdate, admissions.hadm_id FROM prescriptions JOIN admissions ON prescriptions.hadm_id = admissions.hadm_id WHERE prescriptions.drug = 'ketoconazole') AS t1 JOIN (SELECT admissions....
mimic_iii
CREATE TABLE table_8129 ( "Rank" real, "Building" text, "Location" text, "Height" text, "Floors" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which location has 13 floors and a rank greater than 12?
SELECT "Location" FROM table_8129 WHERE "Rank" > '12' AND "Floors" = '13'
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 COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.insurance = "Government" AND procedures.icd9_code = "92"
mimicsql_data
CREATE TABLE intakeoutput ( intakeoutputid number, patientunitstayid number, cellpath text, celllabel text, cellvaluenumeric number, intakeoutputtime time ) CREATE TABLE allergy ( allergyid number, patientunitstayid number, drugname text, allergyname text, allergytime time )...
SELECT 24 * (STRFTIME('%j', CURRENT_TIME()) - STRFTIME('%j', patient.hospitaladmittime)) FROM patient WHERE patient.uniquepid = '010-21105' AND patient.hospitaldischargetime IS NULL
eicu
CREATE TABLE zyjzjlb ( CYBQDM text, CYBQMC text, CYCWH text, CYKSDM text, CYKSMC text, CYSJ time, CYZTDM number, HZXM text, JZKSDM text, JZKSMC text, JZLSH text, KH text, KLX number, MZBMLX number, MZJZLSH text, MZZDBM text, MZZDMC text, MZZYZDZZBM...
SELECT jyjgzbb.JYZBLSH FROM person_info JOIN hz_info JOIN txmzjzjlb JOIN jybgb JOIN jyjgzbb ON person_info.RYBH = hz_info.RYBH AND hz_info.YLJGDM = txmzjzjlb.YLJGDM AND hz_info.KH = txmzjzjlb.KH AND hz_info.KLX = txmzjzjlb.KLX AND txmzjzjlb.YLJGDM = jybgb.YLJGDM_MZJZJLB AND txmzjzjlb.JZLSH = jybgb.JZLSH_MZJZJLB AND jyb...
css
CREATE TABLE jobs ( JOB_ID varchar(10), JOB_TITLE varchar(35), MIN_SALARY decimal(6,0), MAX_SALARY decimal(6,0) ) CREATE TABLE regions ( REGION_ID decimal(5,0), REGION_NAME varchar(25) ) CREATE TABLE locations ( LOCATION_ID decimal(4,0), STREET_ADDRESS varchar(40), POSTAL_CODE varc...
SELECT HIRE_DATE, AVG(SALARY) FROM employees WHERE SALARY BETWEEN 8000 AND 12000 AND COMMISSION_PCT <> "null" OR DEPARTMENT_ID <> 40
nvbench
CREATE TABLE table_name_1 ( year INTEGER, finish VARCHAR, start VARCHAR, team VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What's the latest year with a start of 3 and a finish of 40 for the morgan-mcclure team?
SELECT MAX(year) FROM table_name_1 WHERE start = "3" AND team = "morgan-mcclure" AND finish = "40"
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 mzjzjlb ( HXPLC number, HZXM ...
SELECT zyjybgb.BGRGH, zyjybgb.BGRXM FROM zyjybgb WHERE zyjybgb.JZLSH = '62628580577' GROUP BY zyjybgb.BGRGH HAVING COUNT(*) > 4 UNION SELECT mzjybgb.BGRGH, mzjybgb.BGRXM FROM mzjybgb WHERE mzjybgb.JZLSH = '62628580577' GROUP BY mzjybgb.BGRGH HAVING COUNT(*) > 4
css
CREATE TABLE t_kc24 ( MED_SAFE_PAY_ID text, OVERALL_CD_ORG text, OVERALL_CD_PERSON text, MED_CLINIC_ID text, REF_SLT_FLG number, CLINIC_SLT_DATE time, COMP_ID text, PERSON_ID text, FLX_MED_ORG_ID text, INSU_TYPE text, MED_AMOUT number, PER_ACC_PAY number, OVE_PAY numb...
SELECT COUNT(*) FROM t_kc21 JOIN t_kc22 ON t_kc21.MED_CLINIC_ID = t_kc22.MED_CLINIC_ID WHERE t_kc21.PERSON_NM = '郑妙晴' AND t_kc22.STA_DATE BETWEEN '2013-07-08' AND '2013-10-12' AND t_kc22.MED_INV_ITEM_TYPE = '检查费'
css
CREATE TABLE table_203_533 ( id number, "season" number, "level" text, "division" text, "section" text, "position" text, "movements" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- what is the lowest position earned during this team 's histor...
SELECT "position" FROM table_203_533 ORDER BY "position" DESC LIMIT 1
squall
CREATE TABLE table_name_1 ( record VARCHAR, attendance VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the record of the game with 18,084 in attendance?
SELECT record FROM table_name_1 WHERE attendance = "18,084"
sql_create_context
CREATE TABLE table_76152 ( "1996 general" real, "1999 European" real, "2001 general" real, "2004 European" real, "2006 general" real, "2008 general" real, "2009 European" real, "2013 general" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -...
SELECT COUNT("1999 European") FROM table_76152 WHERE "2009 European" > '4.7' AND "2001 general" > '7.5' AND "2006 general" = '10' AND "2008 general" > '9.4'
wikisql
CREATE TABLE admissions ( row_id number, subject_id number, hadm_id number, admittime time, dischtime time, admission_type text, admission_location text, discharge_location text, insurance text, language text, marital_status text, ethnicity text, age number ) CREATE ...
SELECT AVG(labevents.valuenum) FROM labevents WHERE labevents.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 20207) AND labevents.itemid IN (SELECT d_labitems.itemid FROM d_labitems WHERE d_labitems.label = 'sodium')
mimic_iii
CREATE TABLE table_name_22 ( label VARCHAR, catalog VARCHAR, date VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the Label of the September 20, 2008 release with Catalog number RTRADCD491?
SELECT label FROM table_name_22 WHERE catalog = "rtradcd491" AND date = "september 20, 2008"
sql_create_context
CREATE TABLE t_kc24 ( MED_SAFE_PAY_ID text, OVERALL_CD_ORG text, OVERALL_CD_PERSON text, MED_CLINIC_ID text, REF_SLT_FLG number, CLINIC_SLT_DATE time, COMP_ID text, PERSON_ID text, FLX_MED_ORG_ID text, INSU_TYPE text, MED_AMOUT number, PER_ACC_PAY number, OVE_PAY numb...
SELECT SUM(MED_AMOUT) FROM t_kc24 WHERE MED_CLINIC_ID IN (SELECT MED_CLINIC_ID FROM t_kc21 WHERE MED_SER_ORG_NO = '2687252' AND MED_ORG_DEPT_NM = '小儿神经内科') AND CLINIC_SLT_DATE BETWEEN '2001-05-05' AND '2008-07-19'
css
CREATE TABLE student ( id text, name text, dept_name text, tot_cred number ) CREATE TABLE takes ( id text, course_id text, sec_id text, semester text, year number, grade text ) CREATE TABLE instructor ( id text, name text, dept_name text, salary number ) CREATE...
SELECT name FROM instructor WHERE salary > (SELECT MIN(salary) FROM instructor WHERE dept_name = 'Biology')
spider
CREATE TABLE course_offering ( offering_id int, course_id int, semester int, section_number int, start_time time, end_time time, monday varchar, tuesday varchar, wednesday varchar, thursday varchar, friday varchar, saturday varchar, sunday varchar, has_final_proje...
SELECT DISTINCT course.department, course.name, course.number FROM course, program_course WHERE course.department LIKE '%THEORY%' AND program_course.category LIKE 'PreMajor' AND program_course.course_id = course.course_id
advising
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 job_history ( EMPLOYEE_ID decimal(6,0), START_DATE date, END_DATE date, JOB_ID varchar(10), ...
SELECT PHONE_NUMBER, DEPARTMENT_ID FROM employees WHERE NOT DEPARTMENT_ID IN (SELECT DEPARTMENT_ID FROM departments WHERE MANAGER_ID BETWEEN 100 AND 200) ORDER BY DEPARTMENT_ID
nvbench
CREATE TABLE table_name_15 ( retail_name VARCHAR, digital_analog_signal VARCHAR, chipset_based_on VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the Retail name with a Digital/analog signal with analog, and a Chipset based on with radeon 9600?
SELECT retail_name FROM table_name_15 WHERE digital_analog_signal = "analog" AND chipset_based_on = "radeon 9600"
sql_create_context
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 AVG(zyb.MED_CLINIC_ID) FROM zyb WHERE zyb.MED_SER_ORG_NO = '泌尿肿瘤科' AND zyb.IN_HOSP_DAYS BETWEEN '2000-02-11' AND '2021-08-09' AND zyb.IN_HOSP_DATE = '瘙痒症'
css
CREATE TABLE table_35879 ( "Call sign" text, "Frequency MHz" real, "City of license" text, "ERP W" text, "Class" text, "FCC info" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What City of license has a ERP W of 2,000?
SELECT "City of license" FROM table_35879 WHERE "ERP W" = '2,000'
wikisql
CREATE TABLE demographic ( subject_id text, hadm_id text, name text, marital_status text, age text, dob text, gender text, language text, religion text, admission_type text, days_stay text, insurance text, ethnicity text, expire_flag text, admission_location t...
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE procedures.icd9_code = "331" AND prescriptions.route = "SC"
mimicsql_data
CREATE TABLE table_20183474_1 ( press_jury INTEGER, artist VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- How many press jury points did the song by Frank Aleksandersen get?
SELECT MIN(press_jury) FROM table_20183474_1 WHERE artist = "Frank Aleksandersen"
sql_create_context
CREATE TABLE table_name_61 ( score VARCHAR, to_par VARCHAR, player VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the Score of the Round with Player Aaron Baddeley having a To par of +2?
SELECT score FROM table_name_61 WHERE to_par = "+2" AND player = "aaron baddeley"
sql_create_context
CREATE TABLE table_name_20 ( city VARCHAR, host VARCHAR, region VARCHAR, state VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What city in the east region in North Carolina was the round where the University of Richmond was the host?
SELECT city FROM table_name_20 WHERE region = "east" AND state = "north carolina" AND host = "university of richmond"
sql_create_context
CREATE TABLE Acceptance ( Submission_ID int, Workshop_ID int, Result text ) CREATE TABLE submission ( Submission_ID int, Scores real, Author text, College text ) CREATE TABLE workshop ( Workshop_ID int, Date text, Venue text, Name text ) -- Using valid SQLite, answer the ...
SELECT Author, COUNT(DISTINCT T1.Workshop_ID) FROM Acceptance AS T1 JOIN submission AS T2 ON T1.Submission_ID = T2.Submission_ID ORDER BY Author DESC
nvbench
CREATE TABLE table_name_73 ( points INTEGER, chassis VARCHAR, year VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What point is the lowest for listings of chassis labeled AGS JH23 before 1988?
SELECT MIN(points) FROM table_name_73 WHERE chassis = "ags jh23" AND year < 1988
sql_create_context
CREATE TABLE table_65058 ( "Round" real, "Date" text, "Home Team" text, "Score" text, "Away Team" text, "Attendance" real, "Stadium" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What round did the home team Pohang Steelers play?
SELECT "Round" FROM table_65058 WHERE "Home Team" = 'pohang steelers'
wikisql
CREATE TABLE table_8460 ( "Place" text, "Player" text, "Country" text, "Score" text, "To par" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the Country that has a Player of Scott Hoch?
SELECT "Country" FROM table_8460 WHERE "Player" = 'scott hoch'
wikisql
CREATE TABLE table_name_13 ( physical_property VARCHAR, helium VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which Physical property has a Helium of 0.0693?
SELECT physical_property FROM table_name_13 WHERE helium = "0.0693"
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 demographic ( subject_id text, hadm_id text, name text, marital_status text, age text, dob text, gender text, ...
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.dod_year <= "2148.0" AND lab.label = "Calculated TBG"
mimicsql_data
CREATE TABLE table_33233 ( "Player" text, "Matches" real, "Inns" real, "Runs" real, "High Score" real, "Average" real, "Catches" real, "Stump" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the total number of runs for the player...
SELECT COUNT("Runs") FROM table_33233 WHERE "Inns" < '9'
wikisql
CREATE TABLE table_203_84 ( id number, "rank" number, "name" text, "height\nft (m)" text, "floors" number, "year" text, "coordinates" text, "notes" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- what is the number of buildings taller tha...
SELECT COUNT("name") FROM table_203_84 WHERE "height\nft (m)" > 200
squall
CREATE TABLE ftxmzjzjlb ( 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, MZZYZD...
SELECT COUNT(txmzjzjlb.ZZYSGH) FROM person_info JOIN hz_info JOIN txmzjzjlb ON person_info.RYBH = hz_info.RYBH AND hz_info.YLJGDM = txmzjzjlb.YLJGDM AND hz_info.KH = txmzjzjlb.KH AND hz_info.KLX = txmzjzjlb.KLX WHERE person_info.XM = '奚冰蓝' AND txmzjzjlb.JZKSRQ BETWEEN '2010-01-26' AND '2013-12-18' UNION SELECT COUNT(ft...
css
CREATE TABLE table_29217650_1 ( december_28 VARCHAR, movies VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the figure for December 28 for ang tanging ina mo (last na 'to!)?
SELECT december_28 FROM table_29217650_1 WHERE movies = "Ang Tanging Ina Mo (Last na 'To!)"
sql_create_context
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 prescriptions ( subject_id text, hadm_id...
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE lab.itemid = "50945"
mimicsql_data
CREATE TABLE table_22840 ( "Rank" real, "Race Number" real, "Name" text, "NOC" text, "- 250m" text, "- 500m" text, "- 750m" text, "- 1,000m" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the -500 number for Theo Bos?
SELECT "- 500m" FROM table_22840 WHERE "Name" = 'Theo Bos'
wikisql
CREATE TABLE table_74865 ( "Team" text, "Class" text, "Chassis" text, "Engine" text, "Driver" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Driver Shaun Jones with a viper as a chassis is in what class?
SELECT "Class" FROM table_74865 WHERE "Chassis" = 'viper' AND "Driver" = 'shaun jones'
wikisql
CREATE TABLE table_34019 ( "Rank" real, "Player" text, "Country" text, "Earnings ( $ )" real, "Events" real, "Wins" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Name the most rank for wins more than 0 and events of 26
SELECT MAX("Rank") FROM table_34019 WHERE "Events" = '26' AND "Wins" > '0'
wikisql
CREATE TABLE table_45441 ( "Outcome" text, "Date" text, "Tournament" text, "Surface" text, "Opponent" text, "Score" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What was the score in the match against Sergi Bruguera?
SELECT "Score" FROM table_45441 WHERE "Opponent" = 'sergi bruguera'
wikisql
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), SALARY decimal(8,2), COMMISSION_PCT decimal(2,2), MANAGER_ID decimal(6,0), DEPARTMENT_ID decimal(...
SELECT HIRE_DATE, SUM(SALARY) FROM employees WHERE NOT FIRST_NAME LIKE '%M%'
nvbench
CREATE TABLE ftxmzjzjlb ( 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, MZZYZD...
SELECT jyjgzbb.JCZBJGDL, jyjgzbb.JCZBJGDW FROM person_info JOIN hz_info JOIN txmzjzjlb JOIN jybgb JOIN jyjgzbb ON person_info.RYBH = hz_info.RYBH AND hz_info.YLJGDM = txmzjzjlb.YLJGDM AND hz_info.KH = txmzjzjlb.KH AND hz_info.KLX = txmzjzjlb.KLX AND txmzjzjlb.YLJGDM = jybgb.YLJGDM_MZJZJLB AND txmzjzjlb.JZLSH = jybgb.JZ...
css
CREATE TABLE table_2385460_1 ( stops VARCHAR, stations VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Name the stops for stations 36
SELECT stops FROM table_2385460_1 WHERE stations = 36
sql_create_context
CREATE TABLE table_name_55 ( quantity VARCHAR, class VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the quantity of class B V?
SELECT quantity FROM table_name_55 WHERE class = "b v"
sql_create_context
CREATE TABLE Customer_Policies ( Policy_ID INTEGER, Customer_ID INTEGER, Policy_Type_Code CHAR(15), Start_Date DATE, End_Date DATE ) CREATE TABLE Payments ( Payment_ID INTEGER, Settlement_ID INTEGER, Payment_Method_Code VARCHAR(255), Date_Payment_Made DATE, Amount_Payment INTEGE...
SELECT Payment_Method_Code, AVG(Amount_Payment) FROM Payments GROUP BY Payment_Method_Code ORDER BY Payment_Method_Code DESC
nvbench
CREATE TABLE microbiologyevents ( row_id number, subject_id number, hadm_id number, charttime time, spec_type_desc text, org_name text ) CREATE TABLE inputevents_cv ( row_id number, subject_id number, hadm_id number, icustay_id number, charttime time, itemid number, ...
SELECT COUNT(*) FROM labevents WHERE labevents.itemid IN (SELECT d_labitems.itemid FROM d_labitems WHERE d_labitems.label = 'vitamin b12') AND labevents.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 21074) AND DATETIME(labevents.charttime) <= DATETIME(CURRENT_TIME(), '-6 month')
mimic_iii
CREATE TABLE table_8931 ( "Game" real, "March" real, "Opponent" text, "Score" text, "Decision" text, "Record" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Who did the Rangers play in a game that was later than 72 when the team record was 39-27...
SELECT "Opponent" FROM table_8931 WHERE "Game" > '72' AND "Record" = '39-27-9'
wikisql
CREATE TABLE table_7963 ( "Tie no" text, "Home team" text, "Score" text, "Away team" text, "Date" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- On 27 January 1968 who was the Home Team when the Away team was Carlisle United?
SELECT "Home team" FROM table_7963 WHERE "Date" = '27 january 1968' AND "Away team" = 'carlisle united'
wikisql
CREATE TABLE table_14726 ( "Date" text, "Home captain" text, "Away captain" text, "Venue" text, "Result" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Who was the Away Captain at The Oval?
SELECT "Away captain" FROM table_14726 WHERE "Venue" = 'the oval'
wikisql
CREATE TABLE train ( id int, train_number int, name text, origin text, destination text, time text, interval text ) CREATE TABLE route ( train_id int, station_id int ) CREATE TABLE station ( id int, network_name text, services text, local_authority text ) CREATE TA...
SELECT local_authority, COUNT(local_authority) FROM station GROUP BY services, local_authority ORDER BY local_authority DESC
nvbench
CREATE TABLE table_name_37 ( category VARCHAR, year VARCHAR, role_episode VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What's the category in 1998 with the role/episode of David Duchovny?
SELECT category FROM table_name_37 WHERE year = 1998 AND role_episode = "david duchovny"
sql_create_context
CREATE TABLE table_1156 ( "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. -- What date was week 2?
SELECT "Date" FROM table_1156 WHERE "Week" = '2'
wikisql
CREATE TABLE airport_service ( city_code varchar, airport_code varchar, miles_distant int, direction varchar, minutes_distant int ) CREATE TABLE flight ( aircraft_code_sequence text, airline_code varchar, airline_flight text, arrival_time int, connections int, departure_time...
SELECT DISTINCT ground_service.transport_type FROM airport, airport_service, city, ground_service WHERE airport.airport_code = airport_service.airport_code AND city.city_code = airport_service.city_code AND city.city_name = 'DENVER' AND ground_service.airport_code = airport.airport_code
atis
CREATE TABLE table_name_3 ( width VARCHAR, entered_service VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which width had an entered service year of 2010?
SELECT width FROM table_name_3 WHERE entered_service = 2010
sql_create_context
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 COUNT(qtb.MED_SER_ORG_NO) FROM qtb WHERE qtb.PERSON_ID = '04724844' AND qtb.IN_HOSP_DATE BETWEEN '2015-02-09' AND '2015-03-31' UNION SELECT COUNT(gyb.MED_SER_ORG_NO) FROM gyb WHERE gyb.PERSON_ID = '04724844' AND gyb.IN_HOSP_DATE BETWEEN '2015-02-09' AND '2015-03-31' UNION SELECT COUNT(zyb.MED_SER_ORG_NO) FROM zy...
css
CREATE TABLE table_14970 ( "Name" text, "Tenure" text, "Courtesy title" text, "Court Rank" text, "Revenues" text, "Lineage" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What's the court ranking of 5th son of tadayori and has revenues of 10,000...
SELECT "Court Rank" FROM table_14970 WHERE "Revenues" = '10,000 koku' AND "Lineage" = '5th son of tadayori'
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 COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE demographic.admission_type = "EMERGENCY" AND prescriptions.drug = "Hydrocortisone Cream 0.5%"
mimicsql_data
CREATE TABLE table_26 ( "Rank Each wrestlers total number of days as champion are ranked highest to lowest; wrestlers with the same number mean that they are tied for that certain rank." real, "Wrestler" text, "# of reigns" real, "Combined defenses" real, "Combined days" text ) -- Using valid SQLi...
SELECT "Combined days" FROM table_26 WHERE "Wrestler" = 'Go Shiozaki'
wikisql
CREATE TABLE table_name_1 ( skip VARCHAR, third VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which skip's third is Steffen Walstad?
SELECT skip FROM table_name_1 WHERE third = "steffen walstad"
sql_create_context
CREATE TABLE table_67011 ( "Date" text, "Opponent" text, "Score" text, "Loss" text, "Attendance" real, "Record" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the attendance number of the game on April 16?
SELECT COUNT("Attendance") FROM table_67011 WHERE "Date" = 'april 16'
wikisql
CREATE TABLE table_29289372_1 ( pop_density__per_km²_ VARCHAR, area__km²_ VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- When 82.74 is the area in kilometers squared what is the pop.density (per km2)?
SELECT pop_density__per_km²_ FROM table_29289372_1 WHERE area__km²_ = "82.74"
sql_create_context
CREATE TABLE zyjzjlb ( CYBQDM text, CYBQMC text, CYCWH text, CYKSDM text, CYKSMC text, CYSJ time, CYZTDM number, HZXM text, JZKSDM text, JZKSMC text, JZLSH text, KH text, KLX number, MZBMLX number, MZJZLSH text, MZZDBM text, MZZDMC text, MZZYZDZZBM...
SELECT COUNT(*) FROM wdmzjzjlb WHERE wdmzjzjlb.YLJGDM = '1552619' AND wdmzjzjlb.JZKSRQ BETWEEN '2005-04-17' AND '2019-12-11' AND wdmzjzjlb.ZZBZ > 0 UNION SELECT COUNT(*) FROM bdmzjzjlb WHERE bdmzjzjlb.YLJGDM = '1552619' AND bdmzjzjlb.JZKSRQ BETWEEN '2005-04-17' AND '2019-12-11' AND bdmzjzjlb.ZZBZ > 0
css
CREATE TABLE table_23300 ( "Rank" real, "No." real, "Pos" text, "Player" text, "Premier League" real, "FA Cup" real, "League Cup" real, "Champions League" real, "Club World Cup" real, "Total" real ) -- Using valid SQLite, answer the following questions for the tables provided a...
SELECT MIN("Rank") FROM table_23300 WHERE "Total" = '2'
wikisql
CREATE TABLE table_name_88 ( lane VARCHAR, heat VARCHAR, nationality VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the Lane of the swimmer from Uzbekistan in Heat 1?
SELECT COUNT(lane) FROM table_name_88 WHERE heat = 1 AND nationality = "uzbekistan"
sql_create_context
CREATE TABLE lab ( subject_id text, hadm_id text, itemid text, charttime text, flag text, value_unit text, label text, fluid text ) CREATE TABLE diagnoses ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) CREATE TABLE procedures ( ...
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.diagnosis = "BOWEL OBSTRUCTION" AND demographic.days_stay > "10"
mimicsql_data
CREATE TABLE table_49923 ( "Tie no" text, "Home team" text, "Score" text, "Away team" text, "Date" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is Date, when Home Team is 'Luton Town'?
SELECT "Date" FROM table_49923 WHERE "Home team" = 'luton town'
wikisql
CREATE TABLE table_53360 ( "City" text, "Country" text, "Airport" text, "IATA" text, "ICAO" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Name the IATA for jessore
SELECT "IATA" FROM table_53360 WHERE "City" = 'jessore'
wikisql
CREATE TABLE zyjzjlb ( CYBQDM text, CYBQMC text, CYCWH text, CYKSDM text, CYKSMC text, CYSJ time, CYZTDM number, HZXM text, JZKSDM text, JZKSMC text, JZLSH text, KH text, KLX number, MZBMLX number, MZJZLSH text, MZZDBM text, MZZDMC text, MZZYZDZZBM...
SELECT * FROM hz_info JOIN mzjzjlb JOIN jybgb JOIN jyjgzbb ON hz_info.YLJGDM = mzjzjlb.YLJGDM AND hz_info.KH = mzjzjlb.KH AND hz_info.KLX = mzjzjlb.KLX AND mzjzjlb.YLJGDM = jybgb.YLJGDM_MZJZJLB AND mzjzjlb.JZLSH = jybgb.JZLSH_MZJZJLB AND jybgb.YLJGDM = jyjgzbb.YLJGDM AND jybgb.BGDH = jyjgzbb.BGDH WHERE hz_info.person_i...
css
CREATE TABLE table_name_88 ( date INTEGER, location_attendance VARCHAR, game VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the latest date at Los Angeles with a game less than 62?
SELECT MAX(date) FROM table_name_88 WHERE location_attendance = "los angeles" AND game < 62
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 INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE demographic.ethnicity = "HISPANIC/LATINO - PUERTO RICAN" AND diagnoses.long_title = "Other specified procedures as the cause of abnormal reaction of patient, or of later complication, wit...
mimicsql_data
CREATE TABLE days ( days_code varchar, day_name varchar ) CREATE TABLE code_description ( code varchar, description text ) CREATE TABLE city ( city_code varchar, city_name varchar, state_code varchar, country_name varchar, time_zone_code varchar ) CREATE TABLE fare_basis ( far...
SELECT DISTINCT flight.flight_id FROM airport_service, city, fare, fare_basis, flight, flight_fare WHERE (city.city_code = airport_service.city_code AND city.city_name = 'BOSTON' AND fare_basis.class_type = 'COACH' AND fare.fare_basis_code = fare_basis.fare_basis_code AND flight_fare.fare_id = fare.fare_id AND flight.f...
atis
CREATE TABLE Tags ( Id number, TagName text, Count number, ExcerptPostId number, WikiPostId number ) CREATE TABLE PostHistory ( Id number, PostHistoryTypeId number, PostId number, RevisionGUID other, CreationDate time, UserId number, UserDisplayName text, Comment tex...
SELECT ROW_NUMBER() OVER (ORDER BY Reputation DESC) AS "#", u.Id AS "user_link", u.Reputation, COUNT(p.Id) FROM Users AS u INNER JOIN Posts AS p ON p.OwnerUserId = u.Id INNER JOIN PostTags AS pt ON pt.PostId = p.Id INNER JOIN Tags AS t ON t.Id = pt.TagId WHERE LOWER(Location) LIKE LOWER('%##countryname##%') AND t.TagNa...
sede
CREATE TABLE table_19508635_1 ( song_choice VARCHAR, original_artist VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Name the song choice for michael jackson
SELECT song_choice FROM table_19508635_1 WHERE original_artist = "Michael Jackson"
sql_create_context
CREATE TABLE table_203_289 ( id number, "version" text, "length" text, "album" text, "remixed by" text, "year" number, "comment" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- how many of the versions are over 6 minutes ?
SELECT COUNT("version") FROM table_203_289 WHERE "length" >= 6
squall
CREATE TABLE procedures ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) CREATE TABLE lab ( subject_id text, hadm_id text, itemid text, charttime text, flag text, value_unit text, label text, fluid text ) CREATE TABLE prescription...
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE demographic.admission_type = "ELECTIVE" AND diagnoses.short_title = "Await organ transplnt st"
mimicsql_data