instruction
stringlengths
151
7.46k
output
stringlengths
2
4.44k
source
stringclasses
26 values
CREATE TABLE table_name_75 ( date VARCHAR, result VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the Date of the Competition with a Result of 3 0?
SELECT date FROM table_name_75 WHERE result = "3–0"
sql_create_context
CREATE TABLE table_11960407_5 ( high_points VARCHAR, game VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Who scored the most points in Game 49?
SELECT high_points FROM table_11960407_5 WHERE game = 49
sql_create_context
CREATE TABLE table_14649 ( "Year" real, "Entrant" text, "Chassis" text, "Engine" text, "Points" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which entrant has a Mclaren m7c Chassis?
SELECT "Entrant" FROM table_14649 WHERE "Chassis" = 'mclaren m7c'
wikisql
CREATE TABLE table_name_30 ( date VARCHAR, opponent VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- On what date was the opponent the Miami Dolphins?
SELECT date FROM table_name_30 WHERE opponent = "miami dolphins"
sql_create_context
CREATE TABLE ReviewTaskResultTypes ( Id number, Name text, Description text ) CREATE TABLE Posts ( Id number, PostTypeId number, AcceptedAnswerId number, ParentId number, CreationDate time, DeletionDate time, Score number, ViewCount number, Body text, OwnerUserId num...
WITH TaggedPosts AS (SELECT ViewCount FROM Posts WHERE PostTypeId = 1 AND Tags LIKE '%##tagSubstring?python##%'), MostViewedQuestions AS (SELECT Count = COUNT(*) FROM TaggedPosts WHERE ViewCount > '##nviews:int?10000##') SELECT Count, CAST(Count AS FLOAT(20, 5)) * 100.0 / (SELECT COUNT(*) FROM TaggedPosts) AS Percentil...
sede
CREATE TABLE table_13960 ( "Rank" real, "Player" text, "County" text, "Tally" text, "Total" real, "Opposition" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the tally with a total larger than 8, Waterford was the opposition?
SELECT "Tally" FROM table_13960 WHERE "Total" > '8' AND "Opposition" = 'waterford'
wikisql
CREATE TABLE program_requirement ( program_id int, category varchar, min_credit int, additional_req varchar ) CREATE TABLE semester ( semester_id int, semester varchar, year int ) CREATE TABLE area ( course_id int, area varchar ) CREATE TABLE offering_instructor ( offering_ins...
SELECT DISTINCT course.department, course.name, course.number FROM course INNER JOIN area ON course.course_id = area.course_id WHERE (area.area LIKE '%Health Care Markets and Public Policies%' OR course.description LIKE '%Health Care Markets and Public Policies%' OR course.name LIKE '%Health Care Markets and Public Pol...
advising
CREATE TABLE table_79053 ( "Name" text, "Pos." text, "Height" text, "Weight" text, "Date of Birth" text, "Club" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the weight of the player from club panionios g.c. and was born on 1975-05-21?
SELECT "Weight" FROM table_79053 WHERE "Club" = 'panionios g.c.' AND "Date of Birth" = '1975-05-21'
wikisql
CREATE TABLE table_27735 ( "Pick #" real, "MLS Team" text, "Player" text, "Position" text, "Affiliation" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What player was drafted by the philadelphia union?
SELECT "Player" FROM table_27735 WHERE "MLS Team" = 'Philadelphia Union'
wikisql
CREATE TABLE table_21685 ( "School" text, "Years of Participation" text, "OCC Championships" real, "Last OCC Championship" text, "Last Outright OCC Championship" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What are the years of participation for ...
SELECT "Years of Participation" FROM table_21685 WHERE "School" = 'Pickerington North'
wikisql
CREATE TABLE table_15315 ( "Year" text, "Start" text, "Qual" text, "Rank" text, "Finish" text, "Laps" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the average lap of the race with a 23 finish?
SELECT AVG("Laps") FROM table_15315 WHERE "Finish" = '23'
wikisql
CREATE TABLE fgwyjzb ( CLINIC_ID text, CLINIC_TYPE text, COMP_ID text, DATA_ID text, DIFF_PLACE_FLG number, FERTILITY_STS number, FLX_MED_ORG_ID text, HOSP_LEV number, HOSP_STS number, IDENTITY_CARD text, INPT_AREA_BED text, INSURED_IDENTITY number, INSURED_STS text, ...
SELECT * FROM gwyjzb WHERE gwyjzb.MED_SER_ORG_NO = '4350123' AND gwyjzb.IN_HOSP_DATE BETWEEN '2005-07-03' AND '2021-04-26' UNION SELECT * FROM fgwyjzb WHERE fgwyjzb.MED_SER_ORG_NO = '4350123' AND fgwyjzb.IN_HOSP_DATE BETWEEN '2005-07-03' AND '2021-04-26' EXCEPT SELECT * FROM gwyjzb WHERE gwyjzb.MED_SER_ORG_NO = '435012...
css
CREATE TABLE intakeoutput ( intakeoutputid number, patientunitstayid number, cellpath text, celllabel text, cellvaluenumeric number, intakeoutputtime time ) CREATE TABLE diagnosis ( diagnosisid number, patientunitstayid number, diagnosisname text, diagnosistime time, icd9cod...
SELECT patient.hospitaladmittime FROM patient WHERE patient.uniquepid = '015-910' AND DATETIME(patient.hospitaladmittime, 'start of year') = DATETIME(CURRENT_TIME(), 'start of year', '-0 year') ORDER BY patient.hospitaladmittime DESC LIMIT 1
eicu
CREATE TABLE table_name_70 ( name VARCHAR, app_gs_sub_ VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Tell what has the App(GS/Sub) of 14 (8/6)
SELECT name FROM table_name_70 WHERE app_gs_sub_ = "14 (8/6)"
sql_create_context
CREATE TABLE table_name_75 ( verb VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- For the verb dhoa, what is the 2VF?
SELECT 2 AS __vf_ FROM table_name_75 WHERE verb = "dhoa"
sql_create_context
CREATE TABLE table_name_87 ( episode_4 VARCHAR, star VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which episode 4 has a Star of anna powierza?
SELECT episode_4 FROM table_name_87 WHERE star = "anna powierza"
sql_create_context
CREATE TABLE t_kc22 ( AMOUNT number, CHA_ITEM_LEV number, DATA_ID text, DIRE_TYPE number, DOSE_FORM text, DOSE_UNIT text, EACH_DOSAGE text, EXP_OCC_DATE time, FLX_MED_ORG_ID text, FXBZ number, HOSP_DOC_CD text, HOSP_DOC_NM text, MED_CLINIC_ID text, MED_DIRE_CD tex...
SELECT t_kc22.SOC_SRT_DIRE_CD, t_kc22.SOC_SRT_DIRE_NM, t_kc22.QTY, t_kc22.UNIVALENT, t_kc22.AMOUNT FROM t_kc22 WHERE t_kc22.t_kc21_PERSON_NM = '范曼蔓' AND t_kc22.t_kc21_IN_HOSP_DATE BETWEEN '2001-10-10' AND '2004-10-16'
css
CREATE TABLE mzjzjlb ( HXPLC number, HZXM text, JLSJ time, JZJSSJ time, JZKSBM text, JZKSMC text, JZKSRQ time, JZLSH text, JZZDBM text, JZZDSM text, JZZTDM number, JZZTMC text, KH text, KLX number, MJZH text, ML number, MZZYZDZZBM text, MZZYZDZZMC ...
SELECT jyjgzbb.YQBH, jyjgzbb.YQMC FROM hz_info JOIN mzjzjlb JOIN zyjybgb JOIN jyjgzbb ON hz_info.YLJGDM = mzjzjlb.YLJGDM AND hz_info.KH = mzjzjlb.KH AND hz_info.KLX = mzjzjlb.KLX AND mzjzjlb.YLJGDM = zyjybgb.YLJGDM_MZJZJLB AND mzjzjlb.JZLSH = zyjybgb.JZLSH_MZJZJLB AND zyjybgb.YLJGDM = jyjgzbb.YLJGDM AND zyjybgb.BGDH = ...
css
CREATE TABLE table_14917 ( "Season" text, "Series" text, "Races" text, "Wins" text, "Podiums" text, "Points" text, "Final Placing" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which Season has 95 Points?
SELECT "Season" FROM table_14917 WHERE "Points" = '95'
wikisql
CREATE TABLE table_200_22 ( id number, "year" number, "single" text, "peak chart positions\nger" number, "peak chart positions\nire" number, "peak chart positions\nuk" number, "peak chart positions\nus" number, "peak chart positions\nus\nmain" number, "peak chart positions\nus\ndance...
SELECT "peak chart positions\nus" FROM table_200_22 WHERE "single" = 'with david bowie'
squall
CREATE TABLE txmzjzjlb ( 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 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 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 prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE demographic.dod_year <= "2132.0" AND prescriptions.drug = "Sertraline"
mimicsql_data
CREATE TABLE table_name_90 ( team VARCHAR, game VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is Team, when Game is 77?
SELECT team FROM table_name_90 WHERE game = 77
sql_create_context
CREATE TABLE t_kc21_t_kc24 ( MED_CLINIC_ID text, MED_SAFE_PAY_ID number ) 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, ...
SELECT t_kc21.MED_ORG_DEPT_CD, t_kc21.OUT_DIAG_DIS_NM, AVG(t_kc21.PERSON_AGE) FROM t_kc21 WHERE t_kc21.MED_SER_ORG_NO = '1692026' GROUP BY t_kc21.MED_ORG_DEPT_CD, t_kc21.OUT_DIAG_DIS_NM
css
CREATE TABLE jyjgzbb ( BGDH text, BGRQ time, CKZFWDX text, CKZFWSX number, CKZFWXX number, JCFF text, JCRGH text, JCRXM text, JCXMMC text, JCZBDM text, JCZBJGDL number, JCZBJGDW text, JCZBJGDX text, JCZBMC text, JLDW text, JYRQ time, JYZBLSH text, ...
SELECT zyjybgb.JYXMDM, zyjybgb.JYXMMC FROM zyjybgb WHERE zyjybgb.BGDH = '15227854281' UNION SELECT mzjybgb.JYXMDM, mzjybgb.JYXMMC FROM mzjybgb WHERE mzjybgb.BGDH = '15227854281'
css
CREATE TABLE table_70836 ( "Name" text, "Frequency" text, "Language" text, "City" text, "Website" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which city has spanish news on the website ultimahora.com ?
SELECT "City" FROM table_70836 WHERE "Language" = 'spanish' AND "Website" = 'ultimahora.com'
wikisql
CREATE TABLE table_47475 ( "Track" real, "Title" text, "Songwriter(s)" text, "Producer(s)" text, "Length" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Who is sezen aksu's producer?
SELECT "Producer(s)" FROM table_47475 WHERE "Songwriter(s)" = 'sezen aksu'
wikisql
CREATE TABLE table_name_54 ( purpose VARCHAR, name VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What was the purpose of the Quay test blast?
SELECT purpose FROM table_name_54 WHERE name = "quay"
sql_create_context
CREATE TABLE ReviewRejectionReasons ( Id number, Name text, Description text, PostTypeId number ) CREATE TABLE Badges ( Id number, UserId number, Name text, Date time, Class number, TagBased boolean ) CREATE TABLE Posts ( Id number, PostTypeId number, AcceptedAnswer...
SELECT TIME_TO_STR(p.CreationDate, '%h'), COUNT(*) FROM Posts AS p WHERE p.OwnerUserId = @UserId AND p.PostTypeId = 2 GROUP BY TIME_TO_STR(p.CreationDate, '%h')
sede
CREATE TABLE table_51004 ( "Year" real, "Nord" text, "West" text, "S\u00fcdwest" text, "Berlin" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What was Berlin when fk pirmasens was S dwest and westfalia herne was west?
SELECT "Berlin" FROM table_51004 WHERE "S\u00fcdwest" = 'fk pirmasens' AND "West" = 'westfalia herne'
wikisql
CREATE TABLE table_6000 ( "Stage" text, "Winner" text, "General classification" text, "Points classification" text, "Mountains classification" text, "Combination classification" text, "Team classification" text ) -- Using valid SQLite, answer the following questions for the tables provided...
SELECT "Team classification" FROM table_6000 WHERE "Combination classification" = 'egoi martínez' AND "Winner" = 'tom boonen'
wikisql
CREATE TABLE table_11144 ( "Season" real, "Episodes" real, "Originally aired" text, "Season Premiere" text, "Season Finale" text, "DVD release date" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which series has a season premiere on January 3, ...
SELECT MAX("Episodes") FROM table_11144 WHERE "Season Premiere" = 'january 3, 2007'
wikisql
CREATE TABLE table_name_39 ( opposition VARCHAR, stadium VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Who was the opposition at 11,682 excl. exhibition match?
SELECT opposition FROM table_name_39 WHERE stadium = "11,682 excl. exhibition match"
sql_create_context
CREATE TABLE table_32293 ( "Date" text, "Time" text, "Epicenter" text, "Magnitude" text, "Fatalities" text, "Name" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the Time when the Epicenter was Bam?
SELECT "Time" FROM table_32293 WHERE "Epicenter" = 'bam'
wikisql
CREATE TABLE table_name_19 ( interview VARCHAR, country VARCHAR, swimsuit VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the interview number in Louisiana, and the swimsuit number is more than 9.1?
SELECT COUNT(interview) FROM table_name_19 WHERE country = "louisiana" AND swimsuit > 9.1
sql_create_context
CREATE TABLE table_41721 ( "Tie no" text, "Home team" text, "Score" text, "Away team" text, "Date" text, "Attendance" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Where Bolton Wanderers is the home team, who is the away team?
SELECT "Away team" FROM table_41721 WHERE "Home team" = 'bolton wanderers'
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 procedures ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) CREATE TABLE demographic ...
SELECT demographic.days_stay, demographic.expire_flag FROM demographic WHERE demographic.name = "Elizabeth Bateman"
mimicsql_data
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 demographic.name, demographic.diagnosis FROM demographic WHERE demographic.subject_id = "7578"
mimicsql_data
CREATE TABLE table_41090 ( "Tournament" text, "1987" text, "1988" text, "1989" text, "1990" text, "1991" text, "1992" text, "1993" text, "1994" text, "1995" text, "1996" text, "1997" text, "1998" text, "1999" text, "2000" text, "2001" text, "2002" text...
SELECT "1989" FROM table_41090 WHERE "1999" = 'f' AND "1994" = '2r'
wikisql
CREATE TABLE table_name_4 ( winning_score VARCHAR, date VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What was the winning score on 7 jun 1976?
SELECT winning_score FROM table_name_4 WHERE date = "7 jun 1976"
sql_create_context
CREATE TABLE table_23747 ( "County" text, "Obama%" text, "Obama#" real, "McCain%" text, "McCain#" real, "Total" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What percentage of the votes did Obama get in the county where McCain got 3648 votes?
SELECT "Obama%" FROM table_23747 WHERE "McCain#" = '3648'
wikisql
CREATE TABLE semester ( semester_id int, semester varchar, year int ) CREATE TABLE requirement ( requirement_id int, requirement varchar, college varchar ) CREATE TABLE course_prerequisite ( pre_course_id int, course_id int ) CREATE TABLE ta ( campus_job_id int, student_id int...
SELECT DISTINCT course.department, course.name, course.number, program_course.workload FROM course INNER JOIN student_record ON student_record.course_id = course.course_id INNER JOIN program_course ON program_course.course_id = course.course_id WHERE course.department = 'NERS' AND program_course.workload = (SELECT MAX(...
advising
CREATE TABLE fgwyjzb ( CLINIC_ID text, CLINIC_TYPE text, COMP_ID text, DATA_ID text, DIFF_PLACE_FLG number, FERTILITY_STS number, FLX_MED_ORG_ID text, HOSP_LEV number, HOSP_STS number, IDENTITY_CARD text, INPT_AREA_BED text, INSURED_IDENTITY number, INSURED_STS text, ...
SELECT gwyjzb.OUT_DIAG_DIS_CD, gwyjzb.OUT_DIAG_DIS_NM FROM gwyjzb WHERE gwyjzb.MED_CLINIC_ID = '86947036895' UNION SELECT fgwyjzb.OUT_DIAG_DIS_CD, fgwyjzb.OUT_DIAG_DIS_NM FROM fgwyjzb WHERE fgwyjzb.MED_CLINIC_ID = '86947036895'
css
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 INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE diagnoses.long_title = "Neonatal hypoglycemia" AND lab."CATEGORY" = "Chemistry"
mimicsql_data
CREATE TABLE d_icd_diagnoses ( row_id number, icd9_code text, short_title text, long_title text ) CREATE TABLE d_icd_procedures ( row_id number, icd9_code text, short_title text, long_title text ) CREATE TABLE inputevents_cv ( row_id number, subject_id number, hadm_id numbe...
SELECT STRFTIME('%j', admissions.dischtime) - STRFTIME('%j', admissions.admittime) FROM admissions WHERE admissions.subject_id = 15135 AND NOT admissions.dischtime IS NULL ORDER BY admissions.admittime DESC LIMIT 1
mimic_iii
CREATE TABLE table_name_6 ( closed VARCHAR, opened VARCHAR, distance_from_wellington VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Opened prior to 1877 only 2.44km from Wellington, when did this station close?
SELECT closed FROM table_name_6 WHERE opened < 1877 AND distance_from_wellington = "2.44km"
sql_create_context
CREATE TABLE table_59428 ( "Classification" text, "% of all" text, "John Kerry" text, "John Edwards" text, "Dennis Kucinich" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is Dennis Kucinich, when Classification is 'Democrat'?
SELECT "Dennis Kucinich" FROM table_59428 WHERE "Classification" = 'democrat'
wikisql
CREATE TABLE flight_leg ( flight_id int, leg_number int, leg_flight int ) 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_airlin...
SELECT DISTINCT flight.flight_id FROM airport_service AS AIRPORT_SERVICE_0, airport_service AS AIRPORT_SERVICE_1, airport_service AS AIRPORT_SERVICE_2, city AS CITY_0, city AS CITY_1, city AS CITY_2, flight, flight_stop WHERE (CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'DENVER' AND CITY_2.cit...
atis
CREATE TABLE table_name_73 ( architecture VARCHAR, original_vehicle VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What architecture type does the Ford Escort Wagon have?
SELECT architecture FROM table_name_73 WHERE original_vehicle = "ford escort wagon"
sql_create_context
CREATE TABLE lab ( labid number, patientunitstayid number, labname text, labresult number, labresulttime time ) CREATE TABLE treatment ( treatmentid number, patientunitstayid number, treatmentname text, treatmenttime time ) CREATE TABLE vitalperiodic ( vitalperiodicid number, ...
SELECT intakeoutput.intakeoutputtime FROM intakeoutput WHERE intakeoutput.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '005-4471')) AND intakeoutput.cellpath LIKE '%output%'...
eicu
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 * FROM hz_info JOIN mzjzjlb JOIN jybgb JOIN jyjgzbb JOIN jybgb_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 = jybgb_jyjgzbb.YLJGDM AND jybgb.BGDH = jyjgzbb.BG...
css
CREATE TABLE PostTags ( PostId number, TagId number ) CREATE TABLE PostsWithDeleted ( Id number, PostTypeId number, AcceptedAnswerId number, ParentId number, CreationDate time, DeletionDate time, Score number, ViewCount number, Body text, OwnerUserId number, OwnerDis...
SELECT q.Id AS "post_link", h.Text AS "edited_tags", q.OwnerUserId AS "user_link", q.CreationDate AS "post_date", h.UserId AS "user_link", h.CreationDate AS "edit_date" FROM PostHistory AS h, Posts AS q WHERE h.PostId = q.Id AND h.PostHistoryTypeId = 6 AND h.Text LIKE '%<' + '##Tag##' + '>%' AND h.UserId != q.OwnerUser...
sede
CREATE TABLE table_1449176_1 ( common_of VARCHAR, rank VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the name of the 9th ranked common?
SELECT common_of FROM table_1449176_1 WHERE rank = "9th"
sql_create_context
CREATE TABLE table_name_65 ( speed VARCHAR, rank VARCHAR, rider VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is Ryan McCay's speed that has a rank better than 8?
SELECT speed FROM table_name_65 WHERE rank > 8 AND rider = "ryan mccay"
sql_create_context
CREATE TABLE t_kc22 ( AMOUNT number, CHA_ITEM_LEV number, DATA_ID text, DIRE_TYPE number, DOSE_FORM text, DOSE_UNIT text, EACH_DOSAGE text, EXP_OCC_DATE time, FLX_MED_ORG_ID text, FXBZ number, HOSP_DOC_CD text, HOSP_DOC_NM text, MED_CLINIC_ID text, MED_DIRE_CD tex...
SELECT COUNT(*) FROM t_kc21 JOIN t_kc22 ON t_kc21.MED_CLINIC_ID = t_kc22.MED_CLINIC_ID WHERE t_kc21.MED_SER_ORG_NO = '5664551' AND t_kc22.SOC_SRT_DIRE_NM = '叶酸片'
css
CREATE TABLE table_name_95 ( call_sign VARCHAR, city_of_license VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What Call sign has a City of license of higgston, ga?
SELECT call_sign FROM table_name_95 WHERE city_of_license = "higgston, ga"
sql_create_context
CREATE TABLE table_203_855 ( id number, "date" text, "city" text, "venue" text, "member" text, "performance" text, "notes" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- how many days after september 3rd did brian perform in stockholm ?
SELECT (SELECT "date" FROM table_203_855 WHERE "city" = 'stockholm') - 3
squall
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.discharge_location = "SHORT TERM HOSPITAL" AND demographic.dob_year < "1821"
mimicsql_data
CREATE TABLE table_57405 ( "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 date that an away team score 11.22 ...
SELECT "Date" FROM table_57405 WHERE "Away team score" = '11.22 (88)'
wikisql
CREATE TABLE table_203_502 ( id number, "team" text, "titles" number, "runner-up" number, "third place" number, "fourth place" number, "years participated" number ) -- Using valid SQLite, answer the following questions for the tables provided above. -- what are the number of years maine h...
SELECT "years participated" FROM table_203_502 WHERE "team" = 'maine'
squall
CREATE TABLE table_27011 ( "Vehicle" text, "Operating mode" text, "EPA rated All-electric range" text, "EPA rated combined fuel economy" text, "Clean electric grid California (San Francisco)" text, "U.S. national average electric mix" text, "Dirty electric grid Rocky Mountains (Denver)" text...
SELECT COUNT("Vehicle") FROM table_27011 WHERE "Clean electric grid California (San Francisco)" = '100 g/mi (62 g/km)'
wikisql
CREATE TABLE Lots ( lot_id INTEGER, investor_id INTEGER, lot_details VARCHAR(255) ) CREATE TABLE Transactions_Lots ( transaction_id INTEGER, lot_id INTEGER ) CREATE TABLE Purchases ( purchase_transaction_id INTEGER, purchase_details VARCHAR(255) ) CREATE TABLE Transactions ( transacti...
SELECT date_of_transaction, COUNT(date_of_transaction) FROM Transactions WHERE transaction_type_code = "SALE" ORDER BY date_of_transaction DESC
nvbench
CREATE TABLE Financial_Transactions ( transaction_id INTEGER, account_id INTEGER, invoice_number INTEGER, transaction_type VARCHAR(15), transaction_date DATETIME, transaction_amount DECIMAL(19,4), transaction_comment VARCHAR(255), other_transaction_details VARCHAR(255) ) CREATE TABLE Or...
SELECT gender, COUNT(*) FROM Customers GROUP BY gender
nvbench
CREATE TABLE table_name_3 ( quantity_made VARCHAR, manufacturer VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is Quantity Made, when Manufacturer is 'Baldwin'?
SELECT quantity_made FROM table_name_3 WHERE manufacturer = "baldwin"
sql_create_context
CREATE TABLE player ( player_id number, player text, years_played text, total_wl text, singles_wl text, doubles_wl text, team number ) CREATE TABLE match_season ( season number, player text, position text, country number, team number, draft_pick_number number, dr...
SELECT position, COUNT(*) FROM match_season GROUP BY position
spider
CREATE TABLE table_43486 ( "Venue" text, "Location" text, "Environment" text, "Closed" text, "Reason" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What were the reasons that venues closed in the 1990s?
SELECT "Reason" FROM table_43486 WHERE "Closed" = '1990s'
wikisql
CREATE TABLE pilot ( name VARCHAR, pilot_id VARCHAR, Winning_Pilot VARCHAR, country VARCHAR ) CREATE TABLE MATCH ( name VARCHAR, pilot_id VARCHAR, Winning_Pilot VARCHAR, country VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- find the...
SELECT name FROM pilot WHERE NOT pilot_id IN (SELECT Winning_Pilot FROM MATCH WHERE country = 'Australia')
sql_create_context
CREATE TABLE table_name_85 ( championship INTEGER, league_cup VARCHAR, total VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the highest championship that has 1 as the league cup, and 17 as the total?
SELECT MAX(championship) FROM table_name_85 WHERE league_cup = 1 AND total = "17"
sql_create_context
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(25) ) CREATE TABLE employees ( EMPLOYEE_ID decimal(6,0), FIRST_NAME varchar(20), LAST_NAME varchar(25), EMAIL varch...
SELECT HIRE_DATE, AVG(SALARY) FROM employees WHERE NOT DEPARTMENT_ID IN (SELECT DEPARTMENT_ID FROM departments WHERE MANAGER_ID BETWEEN 100 AND 200) ORDER BY AVG(SALARY)
nvbench
CREATE TABLE table_1745843_9 ( verb_meaning VARCHAR, part_2 VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Name the verb meaning for half drosch
SELECT verb_meaning FROM table_1745843_9 WHERE part_2 = "half drosch"
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 COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.marital_status = "MARRIED" AND lab.label = "Albumin"
mimicsql_data
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 procedures ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) ...
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE demographic.admission_location = "CLINIC REFERRAL/PREMATURE" AND diagnoses.long_title = "Percutaneous transluminal coronary angioplasty status"
mimicsql_data
CREATE TABLE table_13573 ( "Model number" text, "sSpec number" text, "Cores" text, "Frequency" text, "Turbo" text, "L2 cache" text, "L3 cache" text, "GPU model" text, "GPU frequency" text, "Socket" text, "I/O bus" text, "Release date" text, "Part number(s)" text, ...
SELECT "Cores" FROM table_13573 WHERE "Part number(s)" = 'cl8064701477202'
wikisql
CREATE TABLE table_203_747 ( 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 countries have at least 10 gold medals in the asian yout...
SELECT COUNT("nation") FROM table_203_747 WHERE "gold" >= 10
squall
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 MAX(demographic.age) FROM demographic WHERE demographic.diagnosis = "ABDOMINAL PAIN" AND demographic.days_stay = "43"
mimicsql_data
CREATE TABLE table_name_91 ( chinese_title VARCHAR, premiere VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the Chinese title with a premiere rating of 31?
SELECT chinese_title FROM table_name_91 WHERE premiere = 31
sql_create_context
CREATE TABLE table_71991 ( "Rank" real, "Mountain Peak" text, "Province" text, "Mountain Range" text, "Location" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which mountain range includes Mount Hubbard?
SELECT "Mountain Range" FROM table_71991 WHERE "Mountain Peak" = 'mount hubbard'
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 aircraft ( ...
SELECT DISTINCT flight.flight_id FROM airport_service AS AIRPORT_SERVICE_0, airport_service AS AIRPORT_SERVICE_1, city AS CITY_0, city AS CITY_1, date_day, days, flight WHERE (CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'OAKLAND' AND date_day.day_number = 25 AND date_day.month_number = 6 AND d...
atis
CREATE TABLE table_name_23 ( opponent_in_the_final VARCHAR, date VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Final that has a Date of january 10, 2004 had what opponent?
SELECT opponent_in_the_final FROM table_name_23 WHERE date = "january 10, 2004"
sql_create_context
CREATE TABLE wine ( No INTEGER, Grape TEXT, Winery TEXT, Appelation TEXT, State TEXT, Name TEXT, Year INTEGER, Price INTEGER, Score INTEGER, Cases INTEGER, Drink TEXT ) CREATE TABLE appellations ( No INTEGER, Appelation TEXT, County TEXT, State TEXT, Area...
SELECT Grape, COUNT(*) FROM wine GROUP BY Grape ORDER BY Grape DESC
nvbench
CREATE TABLE table_11235 ( "Date" text, "Visiting Team" text, "Final Score" text, "Host Team" text, "Stadium" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Who was the visiting team at Lincoln Financial Field when the final score was 24-14?
SELECT "Visiting Team" FROM table_11235 WHERE "Stadium" = 'lincoln financial field' AND "Final Score" = '24-14'
wikisql
CREATE TABLE services ( service_id number, service_type_code text, workshop_group_id number, product_description text, product_name text, product_price number, other_product_service_details text ) CREATE TABLE performers ( performer_id number, address_id number, customer_name te...
SELECT COUNT(*) FROM customers
spider
CREATE TABLE table_37329 ( "Unit" text, "Russian" text, "Translation" text, "Ratio" real, "Metric value" text, "Avoirdupois value" text, "Ordinary value" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What unit has an Avoirdupois value of 57...
SELECT "Unit" FROM table_37329 WHERE "Avoirdupois value" = '57.602 gr.'
wikisql
CREATE TABLE table_11636213_7 ( date VARCHAR, result VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What date was the result 6 2, 4 6, 6 4?
SELECT date FROM table_11636213_7 WHERE result = "6–2, 4–6, 6–4"
sql_create_context
CREATE TABLE hz_info ( KH text, KLX number, YLJGDM text, RYBH text ) CREATE TABLE person_info ( RYBH text, XBDM number, XBMC text, XM text, CSRQ time, CSD text, MZDM text, MZMC text, GJDM text, GJMC text, JGDM text, JGMC text, XLDM text, XLMC text...
SELECT BBDM, BBMC, BBZT FROM jybgb WHERE BGDH = '87858204866'
css
CREATE TABLE table_19215 ( "Team" text, "First Played" real, "Played" real, "Win" real, "Draw" real, "Loss" real, "Points For" real, "Ponts Against" real, "Last Meeting" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- How many teams s...
SELECT COUNT("Team") FROM table_19215 WHERE "Points For" = '38'
wikisql
CREATE TABLE table_204_742 ( id number, "release date" text, "single title" text, "uk singles chart\nposition" number, "french\ncharts" number, "german\ncharts" number, "irish\ncharts" number, "various" text ) -- Using valid SQLite, answer the following questions for the tables provide...
SELECT (SELECT "release date" FROM table_204_742 WHERE "single title" = '"hot love"') < (SELECT "release date" FROM table_204_742 WHERE "single title" = '"run to me"')
squall
CREATE TABLE intakeoutput ( intakeoutputid number, patientunitstayid number, cellpath text, celllabel text, cellvaluenumeric number, intakeoutputtime time ) CREATE TABLE diagnosis ( diagnosisid number, patientunitstayid number, diagnosisname text, diagnosistime time, icd9cod...
SELECT t1.celllabel FROM (SELECT intakeoutput.celllabel, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM intakeoutput WHERE intakeoutput.cellpath LIKE '%intake%' AND DATETIME(intakeoutput.intakeoutputtime, 'start of year') = DATETIME(CURRENT_TIME(), 'start of year', '-1 year') GROUP BY intakeoutput.celllabel) AS ...
eicu
CREATE TABLE table_40634 ( "Year" real, "Division" real, "League" text, "Regular Season" text, "Playoffs" text, "Open Cup" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- When the regular season of 2nd, Northeast and the year was less than 2008 w...
SELECT COUNT("Division") FROM table_40634 WHERE "Regular Season" = '2nd, northeast' AND "Year" < '2008'
wikisql
CREATE TABLE table_78226 ( "Tie no" real, "Home team" text, "Score" text, "Away team" text, "Attendance" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Who was the away team in a tie no larger than 16 with forest green rovers at home?
SELECT "Away team" FROM table_78226 WHERE "Tie no" > '16' AND "Home team" = 'forest green rovers'
wikisql
CREATE TABLE table_30622 ( "Position" text, "Player" text, "Period" text, "Teams" text, "Consecutive starts" real, "Playoffs" real, "Total" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the largest number of consecutive starts for j...
SELECT MAX("Consecutive starts") FROM table_30622 WHERE "Player" = 'Jason Gildon'
wikisql
CREATE TABLE table_77731 ( "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's the record when the attendance was 41,573?
SELECT "Record" FROM table_77731 WHERE "Attendance" = '41,573'
wikisql
CREATE TABLE table_train_27 ( "id" int, "bone_marrow_transplant" bool, "antimicrobial_therapy" bool, "immune_suppression" bool, "hiv_infection" bool, "autoimmune_disease" bool, "hepatitis_b_infection" bool, "renal_disease" bool, "total_parenteral_nutrition" bool, "surgery" bool, ...
SELECT * FROM table_train_27 WHERE immune_suppression = 1
criteria2sql
CREATE TABLE table_79409 ( "play" text, "author" text, "company" text, "base" text, "country" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- what is the play when the company is cyprus theatre organisation?
SELECT "play" FROM table_79409 WHERE "company" = 'cyprus theatre organisation'
wikisql
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 lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.marital_status = "SINGLE" AND lab.label = "Transferrin"
mimicsql_data
CREATE TABLE hz_info ( KH text, KLX number, RYBH text, YLJGDM text ) CREATE TABLE zyjzjlb_jybgb ( YLJGDM_ZYJZJLB text, BGDH number, YLJGDM number ) CREATE TABLE jyjgzbb ( BGDH text, BGRQ time, CKZFWDX text, CKZFWSX number, CKZFWXX number, JCFF text, JCRGH text, ...
SELECT jyjgzbb.JYZBLSH 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...
css
CREATE TABLE table_name_25 ( opponent VARCHAR, result VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Can you tell me the Opponent that has the Result of w 37-14?
SELECT opponent FROM table_name_25 WHERE result = "w 37-14"
sql_create_context
CREATE TABLE table_77998 ( "Round" text, "Date" text, "Opponent" text, "Venue" text, "Result" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the Date with a Opponent with wimbledon, and a Result of won 2-0?
SELECT "Date" FROM table_77998 WHERE "Opponent" = 'wimbledon' AND "Result" = 'won 2-0'
wikisql
CREATE TABLE jybgb ( BBCJBW text, BBDM text, BBMC text, BBZT number, BGDH text, BGJGDM text, BGJGMC text, BGRGH text, BGRQ time, BGRXM text, BGSJ time, CJRQ time, JSBBRQSJ time, JSBBSJ time, JYBBH text, JYJGMC text, JYJSGH text, JYJSQM text, JY...
SELECT COUNT(*) FROM person_info JOIN hz_info JOIN zzmzjzjlb ON person_info.RYBH = hz_info.RYBH AND hz_info.YLJGDM = zzmzjzjlb.YLJGDM AND hz_info.KH = zzmzjzjlb.KH AND hz_info.KLX = zzmzjzjlb.KLX WHERE person_info.XM = '彭馨欣' AND zzmzjzjlb.JZKSRQ BETWEEN '2007-04-24' AND '2014-10-25' AND zzmzjzjlb.YLJGDM = '4381298' UNI...
css
CREATE TABLE table_1557974_1 ( career_and_other_notes VARCHAR, birthplace VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- How many wrestlers were born in nara, and have a completed 'career and other notes' section?
SELECT COUNT(career_and_other_notes) FROM table_1557974_1 WHERE birthplace = "Nara"
sql_create_context