instruction
stringlengths
151
7.46k
output
stringlengths
2
4.44k
source
stringclasses
26 values
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.BGDH FROM hz_info JOIN mzjzjlb JOIN jybgb ON hz_info.YLJGDM = mzjzjlb.YLJGDM AND hz_info.KH = mzjzjlb.KH AND hz_info.KLX = mzjzjlb.KLX AND mzjzjlb.YLJGDM = jybgb.YLJGDM_MZJZJLB AND mzjzjlb.JZLSH = jybgb.JZLSH_MZJZJLB WHERE hz_info.RYBH = '53573541' AND NOT jybgb.BGDH IN (SELECT jyjgzbb.BGDH FROM jyjgzbb WH...
css
CREATE TABLE table_16635 ( "Rd." real, "Grand Prix" text, "Pole Position" text, "Fastest Lap" text, "Winning Driver" text, "Constructor" text, "Report" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What number is the Monaco Grand Prix?
SELECT "Rd." FROM table_16635 WHERE "Grand Prix" = 'Monaco Grand Prix'
wikisql
CREATE TABLE table_42262 ( "Position" text, "Jersey number" real, "Name v t e" text, "Height (cm)" real, "Weight (kg)" real, "Birthplace" text, "2009-10 team" text, "NHL rights, if any" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What...
SELECT "Position" FROM table_42262 WHERE "2009-10 team" = 'london knights'
wikisql
CREATE TABLE table_71972 ( "Year" real, "Chassis" text, "Engine(s)" text, "Tyres" text, "Points" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the Engine(s) that has f Tyres in 1971?
SELECT "Engine(s)" FROM table_71972 WHERE "Tyres" = 'f' AND "Year" = '1971'
wikisql
CREATE TABLE table_name_36 ( last_title VARCHAR, club VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Name the last title for club of quilmes
SELECT last_title FROM table_name_36 WHERE club = "quilmes"
sql_create_context
CREATE TABLE table_203_274 ( id number, "church name" text, "address" text, "community" text, "school" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- what is the last church in the silverlake neighborhood listed ?
SELECT "church name" FROM table_203_274 ORDER BY id DESC LIMIT 1
squall
CREATE TABLE Rating ( rID int, mID int, stars int, ratingDate date ) CREATE TABLE Movie ( mID int, title text, year int, director text ) CREATE TABLE Reviewer ( rID int, name text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Show ...
SELECT title, stars FROM Rating AS T1 JOIN Movie AS T2 ON T1.mID = T2.mID ORDER BY stars
nvbench
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 * FROM gwyjzb WHERE gwyjzb.PERSON_ID = '18039764' AND gwyjzb.MED_SER_ORG_NO = '6690866' AND NOT gwyjzb.MED_ORG_DEPT_NM LIKE '%营养%' UNION SELECT * FROM fgwyjzb WHERE fgwyjzb.PERSON_ID = '18039764' AND fgwyjzb.MED_SER_ORG_NO = '6690866' AND NOT fgwyjzb.MED_ORG_DEPT_NM LIKE '%营养%'
css
CREATE TABLE allergy ( allergyid number, patientunitstayid number, drugname text, allergyname text, allergytime time ) CREATE TABLE treatment ( treatmentid number, patientunitstayid number, treatmentname text, treatmenttime time ) CREATE TABLE microlab ( microlabid number, ...
SELECT COUNT(*) > 0 FROM medication WHERE medication.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '015-72608')) AND medication.drugname = 'ondansetron 2 mg/1 ml 2ml sdv inj'...
eicu
CREATE TABLE outputevents ( row_id number, subject_id number, hadm_id number, icustay_id number, charttime time, itemid number, value number ) CREATE TABLE chartevents ( row_id number, subject_id number, hadm_id number, icustay_id number, itemid number, charttime tim...
SELECT COUNT(*) FROM prescriptions WHERE prescriptions.drug = 'triamcinolone acetonide 0.025% cream' AND STRFTIME('%y', prescriptions.startdate) >= '2104'
mimic_iii
CREATE TABLE table_28750142_1 ( distance VARCHAR, jockey VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the distance of jockey Jason Titley?
SELECT distance FROM table_28750142_1 WHERE jockey = "Jason Titley"
sql_create_context
CREATE TABLE table_26104 ( "Game" real, "Date" text, "Opponent" text, "Score" text, "Location" text, "Attendance" real, "Record" text, "Points" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What was the game number when the opposing tea...
SELECT MIN("Game") FROM table_26104 WHERE "Opponent" = 'Buffalo Sabres'
wikisql
CREATE TABLE table_55897 ( "Date" text, "Opponent" text, "Score" text, "Loss" text, "Attendance" text, "Record" text ) -- 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_55897 WHERE "Attendance" = '18,084'
wikisql
CREATE TABLE table_32565 ( "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 Away team is visiting Carlton?
SELECT "Away team" FROM table_32565 WHERE "Home team" = 'carlton'
wikisql
CREATE TABLE phone ( Name text, Phone_ID int, Memory_in_G int, Carrier text, Price real ) CREATE TABLE market ( Market_ID int, District text, Num_of_employees int, Num_of_shops real, Ranking int ) CREATE TABLE phone_market ( Market_ID int, Phone_ID text, Num_of_stoc...
SELECT Carrier, AVG(Memory_in_G) FROM phone GROUP BY Carrier ORDER BY Carrier DESC
nvbench
CREATE TABLE table_31287 ( "Season" text, "Level" text, "Division" text, "Section" text, "Position" text, "Movements" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- in which year the season was in 5th position
SELECT "Season" FROM table_31287 WHERE "Position" = '5th'
wikisql
CREATE TABLE table_name_75 ( rounds VARCHAR, motorcycle VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which round has the mv agusta f4 1000 mt?
SELECT rounds FROM table_name_75 WHERE motorcycle = "mv agusta f4 1000 mt"
sql_create_context
CREATE TABLE microlab ( microlabid number, patientunitstayid number, culturesite text, organism text, culturetakentime time ) CREATE TABLE medication ( medicationid number, patientunitstayid number, drugname text, dosage text, routeadmin text, drugstarttime time, drugsto...
SELECT t3.drugname FROM (SELECT t2.drugname, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM (SELECT patient.uniquepid, medication.drugstarttime FROM medication JOIN patient ON medication.patientunitstayid = patient.patientunitstayid WHERE medication.drugname = 'propofol 10 mg/ml' AND STRFTIME('%y', medication.dr...
eicu
CREATE TABLE table_2985664_8 ( strike_rate VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- How many entries for 50 occur when strike rate is 92.81?
SELECT COUNT(50) FROM table_2985664_8 WHERE strike_rate = "92.81"
sql_create_context
CREATE TABLE table_name_75 ( year INTEGER, venue VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- When was the last time a venue was held in turin, italy?
SELECT MAX(year) FROM table_name_75 WHERE venue = "turin, italy"
sql_create_context
CREATE TABLE chartevents ( row_id number, subject_id number, hadm_id number, icustay_id number, itemid number, charttime time, valuenum number, valueuom text ) CREATE TABLE procedures_icd ( row_id number, subject_id number, hadm_id number, icd9_code text, charttime t...
SELECT COUNT(*) FROM procedures_icd WHERE procedures_icd.icd9_code = (SELECT d_icd_procedures.icd9_code FROM d_icd_procedures WHERE d_icd_procedures.short_title = 'adrenal exploration nos') AND STRFTIME('%y', procedures_icd.charttime) <= '2102'
mimic_iii
CREATE TABLE table_29693 ( "Team" text, "Chairman" text, "Head Coach" text, "Captain" text, "Kitmaker" text, "Shirt sponsor" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- How many captains have the kitmaker as n/a?
SELECT COUNT("Captain") FROM table_29693 WHERE "Kitmaker" = 'N/A'
wikisql
CREATE TABLE table_name_10 ( bowling_style VARCHAR, date_of_birth VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Name the bowling style of the player born 16 march 1974
SELECT bowling_style FROM table_name_10 WHERE date_of_birth = "16 march 1974"
sql_create_context
CREATE TABLE table_43069 ( "Position" text, "Jersey #" real, "Name" text, "Height (cm)" real, "Weight (kg)" real, "Birthdate" text, "Birthplace" text, "1990\u20131991 Team" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the 1990 ...
SELECT "1990\u20131991 Team" FROM table_43069 WHERE "Name" = 'joel otto'
wikisql
CREATE TABLE table_63131 ( "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 population wher...
SELECT AVG("Population") FROM table_63131 WHERE "Median family income" = '$48,446' AND "Number of households" > '35,343'
wikisql
CREATE TABLE table_29772 ( "Game" real, "Date" text, "Team" text, "Score" text, "High points" text, "High rebounds" text, "High assists" text, "Location Attendance" text, "Record" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What w...
SELECT MIN("Game") FROM table_29772 WHERE "Date" = 'March 27'
wikisql
CREATE TABLE table_203_535 ( id number, "rank" number, "nation" text, "gold" number, "silver" number, "bronze" number, "total" number ) -- Using valid SQLite, answer the following questions for the tables provided above. -- how many total medals did russia win ?
SELECT "total" FROM table_203_535 WHERE "nation" = 'russia'
squall
CREATE TABLE procedures ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) CREATE TABLE diagnoses ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) CREATE TABLE lab ( subject_id text, hadm_id text, ...
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE demographic.days_stay > "15" AND diagnoses.long_title = "Respiratory distress syndrome in newborn"
mimicsql_data
CREATE TABLE station ( id INTEGER, name TEXT, lat NUMERIC, long NUMERIC, dock_count INTEGER, city TEXT, installation_date TEXT ) CREATE TABLE status ( station_id INTEGER, bikes_available INTEGER, docks_available INTEGER, time TEXT ) CREATE TABLE trip ( id INTEGER, d...
SELECT id, duration FROM trip ORDER BY duration DESC LIMIT 3
nvbench
CREATE TABLE table_name_32 ( matches INTEGER, point VARCHAR, final_rank VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Tell me the highest matches for point 43 and final rank less than 7
SELECT MAX(matches) FROM table_name_32 WHERE point = 43 AND final_rank < 7
sql_create_context
CREATE TABLE table_58493 ( "Nation" text, "Gold" real, "Silver" real, "Bronze" real, "Total" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What was Andorra's total with less than 10 silver and more than 5 bronze?
SELECT SUM("Total") FROM table_58493 WHERE "Silver" < '10' AND "Nation" = 'andorra' AND "Bronze" > '5'
wikisql
CREATE TABLE table_name_44 ( best_actor VARCHAR, best_director VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which Best Actor has a Best Director of takeshi kitano for outrage beyond?
SELECT best_actor FROM table_name_44 WHERE best_director = "takeshi kitano for outrage beyond"
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.gender = "M" AND demographic.admission_type = "NEWBORN"
mimicsql_data
CREATE TABLE table_name_89 ( wins VARCHAR, poles VARCHAR, final_placing VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- How many wins did Hobbs had a 15th finish at poles 0?
SELECT wins FROM table_name_89 WHERE poles = "0" AND final_placing = "15th"
sql_create_context
CREATE TABLE county_public_safety ( county_id number, name text, population number, police_officers number, residents_per_officer number, case_burden number, crime_rate number, police_force text, location text ) CREATE TABLE city ( city_id number, county_id number, name ...
SELECT name FROM city ORDER BY name
spider
CREATE TABLE diagnoses ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) CREATE TABLE lab ( subject_id text, hadm_id text, itemid text, charttime text, flag text, value_unit text, label text, fluid text ) CREATE TABLE procedures ( ...
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.admityear < "2180" AND procedures.short_title = "Entral infus nutrit sub"
mimicsql_data
CREATE TABLE table_204_68 ( id number, "name" text, "profession" text, "hometown" text, "term expires" number, "office" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- other members of the state regents from tulsa besides joseph l. parker jr. .
SELECT "name" FROM table_204_68 WHERE "hometown" = 'tulsa' AND "name" <> 'joseph l. parker jr'
squall
CREATE TABLE hz_info ( KH text, KLX number, RYBH text, YLJGDM text ) 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, ...
SELECT mzjzjlb.KH, mzjzjlb.KLX FROM mzjzjlb WHERE mzjzjlb.JZLSH = '58982567842'
css
CREATE TABLE table_58820 ( "Res." text, "Record" text, "Opponent" text, "Method" text, "Event" text, "Round" real, "Time" text, "Location" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which Round has a Time of 0:37?
SELECT "Round" FROM table_58820 WHERE "Time" = '0:37'
wikisql
CREATE TABLE class_of_service ( booking_class varchar, rank int, class_description text ) CREATE TABLE equipment_sequence ( aircraft_code_sequence varchar, aircraft_code varchar ) CREATE TABLE days ( days_code varchar, day_name varchar ) CREATE TABLE state ( state_code text, state...
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 = 'DENVER' AND CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'BALTIMO...
atis
CREATE TABLE table_7073 ( "Name" text, "GP-GS" text, "Yards" real, "Long" real, "Avg/G" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the sum for the long that has 926 yards and an avg/g less than 84.2?
SELECT SUM("Long") FROM table_7073 WHERE "Yards" = '926' AND "Avg/G" < '84.2'
wikisql
CREATE TABLE table_35872 ( "Outcome" text, "Date" text, "Tournament" text, "Surface" text, "Partner" text, "Opponents" text, "Score" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What surface was the match on November 6, 1982 played on?
SELECT "Surface" FROM table_35872 WHERE "Date" = 'november 6, 1982'
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_NM, EACH_DOSAGE, USE_FRE FROM t_kc22 WHERE MED_CLINIC_ID = '95258264828'
css
CREATE TABLE allergy ( allergyid number, patientunitstayid number, drugname text, allergyname text, allergytime time ) CREATE TABLE intakeoutput ( intakeoutputid number, patientunitstayid number, cellpath text, celllabel text, cellvaluenumeric number, intakeoutputtime time )...
SELECT t1.drugstarttime FROM (SELECT patient.uniquepid, medication.drugstarttime FROM medication JOIN patient ON medication.patientunitstayid = patient.patientunitstayid WHERE medication.drugname = 'proventil,ventolin' AND patient.uniquepid = '005-48105' AND DATETIME(medication.drugstarttime, 'start of year') = DATETIM...
eicu
CREATE TABLE cost ( row_id number, subject_id number, hadm_id number, event_type text, event_id number, chargetime time, cost number ) CREATE TABLE inputevents_cv ( row_id number, subject_id number, hadm_id number, icustay_id number, charttime time, itemid number, ...
SELECT 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 = 25997)) AND chartevents.itemid IN (SELECT d_items.itemid FROM d_items WHERE d_items.label = 'admit wt'...
mimic_iii
CREATE TABLE table_11622392_1 ( purse__ INTEGER ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the sum of the largest purse?
SELECT MAX(purse__) AS $__ FROM table_11622392_1
sql_create_context
CREATE TABLE table_name_57 ( lost VARCHAR, opposition VARCHAR, tied VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the total number of losses against the Rajasthan Royals with more than 0 ties?
SELECT COUNT(lost) FROM table_name_57 WHERE opposition = "rajasthan royals" AND tied > 0
sql_create_context
CREATE TABLE table_25751274_2 ( episode_number INTEGER, rating VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the lowest episode number that had a ratings/share (18-49) of 1.1/3?
SELECT MIN(episode_number) FROM table_25751274_2 WHERE rating / SHARE(18 - 49) = 1.1 / 3
sql_create_context
CREATE TABLE table_1827900_1 ( votes_khuzestan VARCHAR, _percentage_of_votes_khuzestan VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- How many figures for votes Khuzestan were there when the percentage was 34.50?
SELECT COUNT(votes_khuzestan) FROM table_1827900_1 WHERE _percentage_of_votes_khuzestan = "34.50"
sql_create_context
CREATE TABLE table_45005 ( "Year" real, "Award" text, "Name" text, "Institution" text, "Chief Judge" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What student won 3rd with Peter Agre as Chief Judge?
SELECT "Name" FROM table_45005 WHERE "Chief Judge" = 'peter agre' AND "Award" = '3rd'
wikisql
CREATE TABLE keyphrase ( keyphraseid int, keyphrasename varchar ) CREATE TABLE cite ( citingpaperid int, citedpaperid int ) CREATE TABLE paperfield ( fieldid int, paperid int ) CREATE TABLE author ( authorid int, authorname varchar ) CREATE TABLE writes ( paperid int, authori...
SELECT DISTINCT COUNT(paper.paperid) FROM keyphrase, paper, paperkeyphrase, venue WHERE keyphrase.keyphrasename = 'parsing' AND paperkeyphrase.keyphraseid = keyphrase.keyphraseid AND paper.paperid = paperkeyphrase.paperid AND paper.year = 2014 AND venue.venueid = paper.venueid AND venue.venuename = 'ACL'
scholar
CREATE TABLE table_name_5 ( rookie VARCHAR, goalkeeper VARCHAR, week VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Who is the rookie goalkeeper Rob Scherr who played before week 6?
SELECT rookie FROM table_name_5 WHERE goalkeeper = "rob scherr" AND week < 6
sql_create_context
CREATE TABLE table_61515 ( "Region" text, "Date" text, "Label" text, "Format(s)" text, "Catalog" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the date with a Japan region?
SELECT "Date" FROM table_61515 WHERE "Region" = 'japan'
wikisql
CREATE TABLE table_76292 ( "Name" text, "City" text, "Years as tallest" text, "Height ft / m" text, "Floors" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- In what city does the tallest building have 35 floors?
SELECT "City" FROM table_76292 WHERE "Floors" = '35'
wikisql
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 microbiologyevents ( row_id number, subject_id number, hadm_id number, charttime tim...
SELECT d_labitems.label FROM d_labitems WHERE d_labitems.itemid IN (SELECT t1.itemid FROM (SELECT labevents.itemid, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM labevents WHERE DATETIME(labevents.charttime, 'start of year') = DATETIME(CURRENT_TIME(), 'start of year', '-0 year') GROUP BY labevents.itemid) AS t1...
mimic_iii
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 diagnoses.long_title FROM diagnoses WHERE diagnoses.subject_id = "18372"
mimicsql_data
CREATE TABLE table_28768925_1 ( title VARCHAR, no_in_series VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the name of episode 43 in the series?
SELECT title FROM table_28768925_1 WHERE no_in_series = 43
sql_create_context
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(DEPARTMENT_ID) FROM employees WHERE SALARY BETWEEN 8000 AND 12000 AND COMMISSION_PCT <> "null" OR DEPARTMENT_ID <> 40 ORDER BY SUM(DEPARTMENT_ID)
nvbench
CREATE TABLE table_name_66 ( internet_explorer VARCHAR, mobile VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What percentage of users were using Internet Explorer during the period in which 2.1% were using mobile browsers?
SELECT internet_explorer FROM table_name_66 WHERE mobile = "2.1%"
sql_create_context
CREATE TABLE procedures ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) CREATE TABLE demographic ( subject_id text, hadm_id text, name text, marital_status text, age text, dob text, gender text, language text, religion text, ...
SELECT lab.itemid FROM demographic INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.name = "Jerry Deberry"
mimicsql_data
CREATE TABLE course_prerequisite ( pre_course_id int, course_id int ) CREATE TABLE gsi ( course_offering_id int, student_id int ) CREATE TABLE program_requirement ( program_id int, category varchar, min_credit int, additional_req varchar ) CREATE TABLE ta ( campus_job_id int, ...
SELECT COUNT(DISTINCT course.department, course.name, course.number, semester.semester) FROM course, course_offering, semester WHERE course.course_id = course_offering.course_id AND course.department = 'department0' AND course.number BETWEEN 500 AND 500 + 100 AND semester.semester IN ('FA', 'WN') AND semester.semester_...
advising
CREATE TABLE table_1745843_8 ( verb_meaning VARCHAR, part_3 VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the verb meaning of the word with part 3 'sufun'?
SELECT verb_meaning FROM table_1745843_8 WHERE part_3 = "sufun"
sql_create_context
CREATE TABLE table_name_6 ( position VARCHAR, team VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What position does the player from the Arizona Diamondbacks play?
SELECT position FROM table_name_6 WHERE team = "arizona diamondbacks"
sql_create_context
CREATE TABLE table_73796 ( "Season" real, "Series" text, "Team" text, "Races" real, "Wins" real, "Poles" real, "F.L." real, "Podiums" real, "Points" real, "Position" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- How many F.L. ar...
SELECT COUNT("F.L.") FROM table_73796 WHERE "Series" = 'Formula Three Euroseries'
wikisql
CREATE TABLE d_icd_diagnoses ( row_id number, icd9_code text, short_title text, long_title text ) CREATE TABLE diagnoses_icd ( row_id number, subject_id number, hadm_id number, icd9_code text, charttime time ) CREATE TABLE admissions ( row_id number, subject_id number, ...
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 = 2957 AND admissions.dischtime IS NULL)) AND inputevents_cv.itemid IN (SELECT d_items.itemid FROM d_items...
mimic_iii
CREATE TABLE table_name_72 ( license VARCHAR, creator VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the name of the license created by IETF?
SELECT license FROM table_name_72 WHERE creator = "ietf"
sql_create_context
CREATE TABLE t_kc21_t_kc22 ( MED_CLINIC_ID text, MED_EXP_DET_ID number ) 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, C...
SELECT t_kc21.IN_DIAG_DIS_CD, t_kc21.IN_DIAG_DIS_NM FROM t_kc21 WHERE t_kc21.PERSON_ID = '77164356' AND t_kc21.MED_CLINIC_ID IN (SELECT t_kc24.MED_CLINIC_ID FROM t_kc24 WHERE t_kc24.MED_AMOUT > 6696.69)
css
CREATE TABLE table_name_4 ( rowers VARCHAR, country VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which rowers represented the country of portugal?
SELECT rowers FROM table_name_4 WHERE country = "portugal"
sql_create_context
CREATE TABLE table_27515 ( "Supply sector (% of GDP in current prices)" text, "1993-2001" text, "2002-2005" text, "2006-2009" text, "2010-2012" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What was GDP for 2006-2009 for the sector that had a 20.1 ...
SELECT "2006-2009" FROM table_27515 WHERE "2010-2012" = '20.1'
wikisql
CREATE TABLE table_1288 ( "Player" text, "No." real, "Nationality" text, "Position" text, "Years in Orlando" text, "School/Club Team" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- WHAT WAS THE JERSEY NUMBER OF THE ROSTER PLAYER FROM OKLAHOMA ST...
SELECT "No." FROM table_1288 WHERE "Position" = 'Guard' AND "School/Club Team" = 'Oklahoma State'
wikisql
CREATE TABLE table_name_41 ( week INTEGER, date VARCHAR, attendance VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Who was the opponent on the date of November 29, 1970 and the attendance was less than 31,427?
SELECT AVG(week) FROM table_name_41 WHERE date = "november 29, 1970" AND attendance < 31 OFFSET 427
sql_create_context
CREATE TABLE mzjybgb ( BBCJBW text, BBDM text, BBMC text, BBZT number, BGDH number, 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, ...
SELECT AVG(jyjgzbb.JCZBJGDL), MIN(jyjgzbb.JCZBJGDL), MAX(jyjgzbb.JCZBJGDL) FROM mzjzjlb JOIN zyjybgb JOIN jyjgzbb ON mzjzjlb.YLJGDM = zyjybgb.YLJGDM_MZJZJLB AND mzjzjlb.JZLSH = zyjybgb.JZLSH_MZJZJLB AND zyjybgb.YLJGDM = jyjgzbb.YLJGDM AND zyjybgb.BGDH = jyjgzbb.BGDH WHERE mzjzjlb.JZZDSM = '沙眼' AND jyjgzbb.JCZBMC = '甘油三...
css
CREATE TABLE table_name_43 ( order_sung VARCHAR, artist VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What order was the performance of a Richard Marx song?
SELECT order_sung FROM table_name_43 WHERE artist = "richard marx"
sql_create_context
CREATE TABLE addresses ( address_id number, line_1 text, line_2 text, line_3 text, city text, zip_postcode text, state_province_county text, country text, other_address_details text ) CREATE TABLE student_addresses ( student_id number, address_id number, date_address_fro...
SELECT COUNT(*) FROM assessment_notes
spider
CREATE TABLE table_name_95 ( weight VARCHAR, name VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the weight of Damir Buri ?
SELECT weight FROM table_name_95 WHERE name = "damir burić"
sql_create_context
CREATE TABLE table_name_64 ( gfr_2006 INTEGER, whites_as__percentage_of_pop VARCHAR, tfr_2006 VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the lowest total GFR that has 95.80% of the population as Whites, and a TFR total larger than 2.14, in 20...
SELECT MIN(gfr_2006) FROM table_name_64 WHERE whites_as__percentage_of_pop = "95.80%" AND tfr_2006 > 2.14
sql_create_context
CREATE TABLE table_204_277 ( id number, "region" text, "country" text, "location" text, "size (m)" text, "payload (metric tonnes)" text, "degrees of freedom" number, "x horiz disp (mm)" number, "y horiz disp (mm)" number, "z vert disp (mm)" number, "x horiz vel (mm/s)" number...
SELECT "region" FROM table_204_277 WHERE "region" <> 'asia' GROUP BY "region" ORDER BY COUNT(*) DESC LIMIT 1
squall
CREATE TABLE table_name_74 ( name VARCHAR, province VARCHAR, term_expires VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Whose term expired in 1996 and was from the province of Central Highlands?
SELECT name FROM table_name_74 WHERE province = "central highlands" AND term_expires = 1996
sql_create_context
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 COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.diagnosis = "CHEST PAIN" AND demographic.days_stay > "2"
mimicsql_data
CREATE TABLE table_name_62 ( pick VARCHAR, player VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- How many teams picked Jason Webb?
SELECT COUNT(pick) FROM table_name_62 WHERE player = "jason webb"
sql_create_context
CREATE TABLE table_12032893_1 ( height VARCHAR, position VARCHAR, high_school VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What height was the forward position at Crockett High School?
SELECT height FROM table_12032893_1 WHERE position = "Forward" AND high_school = "Crockett"
sql_create_context
CREATE TABLE intakeoutput ( intakeoutputid number, patientunitstayid number, cellpath text, celllabel text, cellvaluenumeric number, intakeoutputtime time ) CREATE TABLE medication ( medicationid number, patientunitstayid number, drugname text, dosage text, routeadmin text, ...
SELECT COUNT(*) FROM microlab WHERE microlab.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '031-24513')) AND microlab.culturesite = 'urine, catheter specimen' AND DATETIME(mi...
eicu
CREATE TABLE table_33837 ( "Rank" text, "Nation" text, "Gold" real, "Silver" real, "Bronze" real, "Total" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- How many Gold medals were won by the Nation that had more than 12 Bronze medals and less tha...
SELECT COUNT("Gold") FROM table_33837 WHERE "Bronze" > '12' AND "Total" < '124'
wikisql
CREATE TABLE table_23180638_1 ( peak_position VARCHAR, oricon_albums_chart VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- How many peak positions were there on the weekly charts?
SELECT COUNT(peak_position) FROM table_23180638_1 WHERE oricon_albums_chart = "Weekly Charts"
sql_create_context
CREATE TABLE table_11475 ( "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. -- When Geelong is the Away team, what did the Home...
SELECT "Home team score" FROM table_11475 WHERE "Away team" = 'geelong'
wikisql
CREATE TABLE Rating ( stars INTEGER ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the total number of ratings that has more than 3 stars?
SELECT COUNT(*) FROM Rating WHERE stars > 3
sql_create_context
CREATE TABLE departments ( DEPARTMENT_ID decimal(4,0), DEPARTMENT_NAME varchar(30), MANAGER_ID decimal(6,0), LOCATION_ID decimal(4,0) ) CREATE TABLE locations ( LOCATION_ID decimal(4,0), STREET_ADDRESS varchar(40), POSTAL_CODE varchar(12), CITY varchar(30), STATE_PROVINCE varchar(25...
SELECT HIRE_DATE, DEPARTMENT_ID FROM employees WHERE NOT DEPARTMENT_ID IN (SELECT DEPARTMENT_ID FROM departments WHERE MANAGER_ID BETWEEN 100 AND 200) ORDER BY HIRE_DATE DESC
nvbench
CREATE TABLE dual_carrier ( main_airline varchar, low_flight_number int, high_flight_number int, dual_airline varchar, service_name text ) CREATE TABLE month ( month_number int, month_name text ) CREATE TABLE time_zone ( time_zone_code text, time_zone_name text, hours_from_gmt ...
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 = 'MILWAUK...
atis
CREATE TABLE table_77326 ( "Season" text, "Skip" text, "Third" text, "Second" text, "Lead" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Who was the lead with Pete Fenson as skip and Joe Polo as second in season 2005 06?
SELECT "Lead" FROM table_77326 WHERE "Skip" = 'pete fenson' AND "Second" = 'joe polo' AND "Season" = '2005–06'
wikisql
CREATE TABLE table_name_92 ( game INTEGER, score VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which Game is the highest one that has a Score of 3 2?
SELECT MAX(game) FROM table_name_92 WHERE score = "3–2"
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 demographic ( subject_id text, hadm_id text, name text, marital_status text, age text, dob te...
SELECT prescriptions.route FROM prescriptions WHERE prescriptions.drug = "Voriconazole"
mimicsql_data
CREATE TABLE table_13193 ( "Place" text, "Player" text, "Country" text, "Score" text, "To par" real, "Money ( $ )" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- How much money does the player with a score of 74-71-76-76=297 have?
SELECT "Money ( $ )" FROM table_13193 WHERE "Score" = '74-71-76-76=297'
wikisql
CREATE TABLE table_50615 ( "Game" text, "Day, Date" text, "Anand" text, "Gelfand" text, "Standing" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What was Anand's score in game 8?
SELECT "Anand" FROM table_50615 WHERE "Game" = '8'
wikisql
CREATE TABLE table_7841 ( "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. -- Can you tell me the Score that has the Country of united states, and the Place of t2...
SELECT "Score" FROM table_7841 WHERE "Country" = 'united states' AND "Place" = 't2' AND "Player" = 'tom watson'
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 prescriptions.drug_type FROM prescriptions WHERE prescriptions.subject_id = "6983"
mimicsql_data
CREATE TABLE table_72925 ( "Body style" text, "Wheelbase" text, "Length" text, "Height" text, "Curb weight" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What's the length of the model with 500 E body style?
SELECT "Length" FROM table_72925 WHERE "Body style" = '500 E'
wikisql
CREATE TABLE table_name_30 ( result VARCHAR, date VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- WHAT WAS THE RESULT FOR NOVEMBER 29, 2001?
SELECT result FROM table_name_30 WHERE date = "november 29, 2001"
sql_create_context
CREATE TABLE table_40555 ( "Season" text, "Winner" text, "Score" text, "Runner-up" text, "Losing Semifinalists" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- During which Season was the tournament in progress?
SELECT "Season" FROM table_40555 WHERE "Runner-up" = 'tournament in progress'
wikisql
CREATE TABLE dorm_amenity ( amenid number, amenity_name text ) CREATE TABLE lives_in ( stuid number, dormid number, room_number number ) CREATE TABLE dorm ( dormid number, dorm_name text, student_capacity number, gender text ) CREATE TABLE student ( stuid number, lname tex...
SELECT dorm_name FROM dorm WHERE student_capacity > 300
spider
CREATE TABLE table_204_383 ( id number, "rank" number, "nation" text, "gold" number, "silver" number, "bronze" number, "total" number ) -- Using valid SQLite, answer the following questions for the tables provided above. -- which nation took the most bronze medals ?
SELECT "nation" FROM table_204_383 ORDER BY "bronze" DESC LIMIT 1
squall