instruction
stringlengths
151
7.46k
output
stringlengths
2
4.44k
source
stringclasses
26 values
CREATE TABLE table_name_42 ( format VARCHAR, conference VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What format has conference iii as the conference?
SELECT format FROM table_name_42 WHERE conference = "conference iii"
sql_create_context
CREATE TABLE table_name_3 ( erp_w INTEGER, call_sign VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which ERP W is the highest one that has a Call sign of w255bi?
SELECT MAX(erp_w) FROM table_name_3 WHERE call_sign = "w255bi"
sql_create_context
CREATE TABLE CloseReasonTypes ( Id number, Name text, Description text ) CREATE TABLE ReviewTaskResultTypes ( Id number, Name text, Description text ) CREATE TABLE PostFeedback ( Id number, PostId number, IsAnonymous boolean, VoteTypeId number, CreationDate time ) CREATE T...
SELECT SUM(UpVotes) AS upv, SUM(DownVotes) AS downv FROM Users ORDER BY upv DESC LIMIT 30
sede
CREATE TABLE table_16799784_3 ( latitude VARCHAR, longitude VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- At a longitude of 321.9e, what is the latitude of the features found?
SELECT latitude FROM table_16799784_3 WHERE longitude = "321.9E"
sql_create_context
CREATE TABLE table_name_52 ( year VARCHAR, distance VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- In what year saw a total distance of 1,870.23 km?
SELECT year FROM table_name_52 WHERE distance = "1,870.23 km"
sql_create_context
CREATE TABLE table_name_52 ( date VARCHAR, home_team VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- When did the Wolverhampton Wanderers play at home?
SELECT date FROM table_name_52 WHERE home_team = "wolverhampton wanderers"
sql_create_context
CREATE TABLE table_933 ( "Week" real, "Date" text, "Opponent" text, "Result" text, "Stadium" text, "Record" text, "Attendance" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- what is the minimum attendance with record being 4 6
SELECT MIN("Attendance") FROM table_933 WHERE "Record" = '4–6'
wikisql
CREATE TABLE table_63139 ( "Position" real, "Team" text, "Played" real, "Wins" real, "Draws P.K. Wins / P.K. Losses" text, "Losses" real, "Scored" real, "Conceded" real, "Points" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- How man...
SELECT COUNT("Points") FROM table_63139 WHERE "Position" > '4' AND "Losses" > '5' AND "Conceded" = '15' AND "Scored" > '11'
wikisql
CREATE TABLE table_name_92 ( points VARCHAR, tries_against VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- When the tries against is 90 how many points are there?
SELECT points FROM table_name_92 WHERE tries_against = "90"
sql_create_context
CREATE TABLE table_10665 ( "Driver" text, "Constructor" text, "Laps" real, "Time/Retired" text, "Grid" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the Time/Retired for Grid 6?
SELECT "Time/Retired" FROM table_10665 WHERE "Grid" = '6'
wikisql
CREATE TABLE table_37259 ( "Name" text, "Number" real, "From" text, "Length (km)" real, "Length (mi)" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What's the shortest length from north klondike highway that has a length less than 326?
SELECT MIN("Length (km)") FROM table_37259 WHERE "Name" = 'north klondike highway' AND "Length (mi)" < '326'
wikisql
CREATE TABLE table_9582 ( "Year" real, "Lijsttrekker" text, "Fractievoorzitter" text, "Cabinet" text, "Chair" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is Fractievoorzitter, when Lijsttrekker is 'No Elections', and when Year is after 2005?...
SELECT "Fractievoorzitter" FROM table_9582 WHERE "Lijsttrekker" = 'no elections' AND "Year" > '2005'
wikisql
CREATE TABLE table_23486853_7 ( score VARCHAR, date VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What scores happened on February 9?
SELECT score FROM table_23486853_7 WHERE date = "February 9"
sql_create_context
CREATE TABLE table_25529 ( "Name" text, "Platform" text, "License" text, "Windows builders" text, "Java builders" text, "Other builders" text, "SCM system" text, "Notification" text, "IDE Integration" text, "Other Integration" text ) -- Using valid SQLite, answer the following ...
SELECT "Windows builders" FROM table_25529 WHERE "Name" = 'Apache Gump'
wikisql
CREATE TABLE table_203_420 ( id number, "#" number, "stadium" text, "capacity" number, "city" text, "home team" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- which stadium can hold more people than ballymena showgrounds , but less than windsor ...
SELECT "stadium" FROM table_203_420 WHERE "capacity" > (SELECT "capacity" FROM table_203_420 WHERE "stadium" = 'ballymena showgrounds') AND "capacity" < (SELECT "capacity" FROM table_203_420 WHERE "stadium" = 'windsor park')
squall
CREATE TABLE table_name_90 ( college VARCHAR, name VARCHAR, round VARCHAR, overall VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which college's round is more than 4, when the overall is less than 237 and Ted Cottrell was the name?
SELECT college FROM table_name_90 WHERE round > 4 AND overall < 237 AND name = "ted cottrell"
sql_create_context
CREATE TABLE district ( district_id number, district_name text, headquartered_city text, city_population number, city_area number ) CREATE TABLE product ( product_id number, product text, dimensions text, dpi number, pages_per_minute_color number, max_page_size text, int...
SELECT t3.headquartered_city FROM store AS t1 JOIN store_district AS t2 ON t1.store_id = t2.store_id JOIN district AS t3 ON t2.district_id = t3.district_id WHERE t1.store_name = "Blackville"
spider
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 ftxmzjzjlb ( HXPLC number, HZ...
SELECT COUNT(*) FROM (SELECT jybgb.KSBM FROM txmzjzjlb JOIN jybgb ON txmzjzjlb.YLJGDM = jybgb.YLJGDM_MZJZJLB AND txmzjzjlb.JZLSH = jybgb.JZLSH_MZJZJLB WHERE txmzjzjlb.YLJGDM = '5860255' AND jybgb.BGRQ BETWEEN '2007-07-16' AND '2020-08-01' GROUP BY jybgb.KSBM HAVING COUNT(*) < 19 UNION SELECT jybgb.KSBM FROM ftxmzjzjlb ...
css
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 allergy.allergyname FROM allergy WHERE allergy.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '003-17096')) AND DATETIME(allergy.allergytime, 'start of year') = DATETIM...
eicu
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 WHERE demographic.expire_flag = "0" AND procedures.icd9_code = "3761"
mimicsql_data
CREATE TABLE Products ( Code INTEGER, Name VARCHAR(255), Price DECIMAL, Manufacturer INTEGER ) CREATE TABLE Manufacturers ( Code INTEGER, Name VARCHAR(255), Headquarter VARCHAR(255), Founder VARCHAR(255), Revenue REAL ) -- Using valid SQLite, answer the following questions for the...
SELECT T1.Code, T1.Manufacturer FROM Products AS T1 JOIN Manufacturers AS T2 ON T1.Manufacturer = T2.Code GROUP BY Name
nvbench
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 hz_info.person_info_XM FROM hz_info JOIN zyjzjlb JOIN jybgb ON hz_info.YLJGDM = zyjzjlb.YLJGDM AND hz_info.KH = zyjzjlb.KH AND hz_info.KLX = zyjzjlb.KLX AND zyjzjlb.YLJGDM = jybgb.YLJGDM_ZYJZJLB AND zyjzjlb.JZLSH = jybgb.JZLSH_ZYJZJLB WHERE jybgb.BGDH = '36585431258'
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 AVG(jyjgzbb.JCZBJGDL), MIN(jyjgzbb.JCZBJGDL), MAX(jyjgzbb.JCZBJGDL) FROM mzjzjlb JOIN jybgb JOIN jyjgzbb JOIN mzjzjlb_jybgb ON mzjzjlb.YLJGDM = mzjzjlb_jybgb.YLJGDM_MZJZJLB AND mzjzjlb.JZLSH = jybgb.JZLSH_MZJZJLB AND jybgb.YLJGDM = jyjgzbb.YLJGDM AND jybgb.BGDH = jyjgzbb.BGDH AND mzjzjlb_jybgb.YLJGDM = jybgb.YLJ...
css
CREATE TABLE table_name_21 ( place VARCHAR, money___$__ VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What place did the player that took won $350 finish in?
SELECT place FROM table_name_21 WHERE money___$__ = 350
sql_create_context
CREATE TABLE table_name_68 ( result VARCHAR, date VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Tell me the result of july 16, 2000
SELECT result FROM table_name_68 WHERE date = "july 16, 2000"
sql_create_context
CREATE TABLE table_name_53 ( name VARCHAR, games VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which Name has Games of 105?
SELECT name FROM table_name_53 WHERE games = 105
sql_create_context
CREATE TABLE hz_info ( KH text, KLX number, RYBH text, YLJGDM text ) 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, ...
SELECT mzjzjlb.JZLSH 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 = '范秀逸' AND hz_info.YLJGDM = '3470456' AND mzjzjlb.JZKSMC LIKE '%变态反应%'
css
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 CloseReasonTypes ( Id number, Name text, Description...
SELECT ROW_NUMBER() OVER (ORDER BY Reputation DESC) AS "#", Id AS "user_link", Reputation FROM Users WHERE LOWER(Location) LIKE '%arad%romania%' ORDER BY Reputation DESC LIMIT 300
sede
CREATE TABLE table_35859 ( "Tournament" text, "Wins" real, "Top-5" real, "Top-10" real, "Top-25" real, "Events" real, "Cuts made" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Name the top-10 with top-5 less than 1
SELECT "Top-10" FROM table_35859 WHERE "Top-5" < '1'
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 diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE demographic.admission_location = "EMERGENCY ROOM ADMIT" AND diagnoses.icd9_code = "52809"
mimicsql_data
CREATE TABLE storm ( Storm_ID int, Name text, Dates_active text, Max_speed int, Damage_millions_USD real, Number_Deaths int ) CREATE TABLE region ( Region_id int, Region_code text, Region_name text ) CREATE TABLE affected_region ( Region_id int, Storm_ID int, Number_cit...
SELECT Name, Number_Deaths FROM storm WHERE Number_Deaths >= 1
nvbench
CREATE TABLE table_41253 ( "Class" text, "Quantity" real, "Manufacturer" text, "Motor" text, "Seats" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which motor's class was bs 1910?
SELECT "Motor" FROM table_41253 WHERE "Class" = 'bs 1910'
wikisql
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 demographic (...
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 = "4610" AND prescriptions.drug_type = "ADDITIVE"
mimicsql_data
CREATE TABLE table_58735 ( "Name" text, "Total" real, "First" text, "Last" text, "Highest rank" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What rank is Takat riki?
SELECT "Highest rank" FROM table_58735 WHERE "Name" = 'takatōriki'
wikisql
CREATE TABLE table_name_96 ( safari VARCHAR, firefox VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What percentage of users were using Safari during the period in which 30.82% were using Firefox?
SELECT safari FROM table_name_96 WHERE firefox = "30.82%"
sql_create_context
CREATE TABLE table_25942 ( "SF Round" real, "Country" text, "Location" text, "Date" text, "Driver" text, "Race 1(pts)" real, "Race 2(pts)" real, "Race Total(pts)" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Who is every driver for the...
SELECT "Driver" FROM table_25942 WHERE "Location" = 'Estoril Circuit'
wikisql
CREATE TABLE basketball_match ( Team_ID int, School_ID int, Team_Name text, ACC_Regular_Season text, ACC_Percent text, ACC_Home text, ACC_Road text, All_Games text, All_Games_Percent int, All_Home text, All_Road text, All_Neutral text ) CREATE TABLE university ( Scho...
SELECT All_Neutral, All_Games_Percent FROM basketball_match ORDER BY All_Games_Percent DESC
nvbench
CREATE TABLE treatment ( treatmentid number, patientunitstayid number, treatmentname text, treatmenttime time ) CREATE TABLE diagnosis ( diagnosisid number, patientunitstayid number, diagnosisname text, diagnosistime time, icd9code text ) CREATE TABLE lab ( labid number, pa...
SELECT t3.diagnosisname FROM (SELECT t2.diagnosisname, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM (SELECT patient.uniquepid, diagnosis.diagnosistime FROM diagnosis JOIN patient ON diagnosis.patientunitstayid = patient.patientunitstayid WHERE diagnosis.diagnosisname = 'cellulitis - abdomen/pelvis' AND STRFTIM...
eicu
CREATE TABLE table_71177 ( "Player" text, "Country" text, "Caps" real, "Goals" text, "Years Active" text, "Years at Club" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the greatest number of caps for Bruce Djite?
SELECT MAX("Caps") FROM table_71177 WHERE "Player" = 'bruce djite'
wikisql
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 MED_SER_ORG_NO FROM t_kc21 WHERE PERSON_ID = '70715838' AND MED_CLINIC_ID IN (SELECT MED_CLINIC_ID FROM t_kc22 WHERE SOC_SRT_DIRE_CD = '986663290')
css
CREATE TABLE demographic ( subject_id text, hadm_id text, name text, marital_status text, age text, dob text, gender text, language text, religion text, admission_type text, days_stay text, insurance text, ethnicity text, expire_flag text, admission_location t...
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.admission_type = "EMERGENCY" AND demographic.ethnicity = "AMERICAN INDIAN/ALASKA NATIVE"
mimicsql_data
CREATE TABLE table_26411 ( "Season" text, "Name" text, "Teams" real, "Relegated to league" text, "Promoted to league" text, "Promoted from league" text, "Relegated from league" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Who was promoted ...
SELECT "Promoted to league" FROM table_26411 WHERE "Relegated to league" = 'Coventry'
wikisql
CREATE TABLE table_59758 ( "Player" text, "Draft" text, "Round" real, "Pick" real, "Position" text, "NFL Club" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which NFL Club has a Player of sam tidmore, and a Pick of 81?
SELECT "NFL Club" FROM table_59758 WHERE "Player" = 'sam tidmore' AND "Pick" = '81'
wikisql
CREATE TABLE table_43572 ( "Result" text, "TUF Competitor" text, "Opponent" text, "Method" text, "Event" text, "Date" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- when is the opponent lyoto machida?
SELECT "Date" FROM table_43572 WHERE "Opponent" = 'lyoto machida'
wikisql
CREATE TABLE table_38756 ( "Couple" text, "Score" text, "Style" text, "Music" text, "Result" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which music is jive?
SELECT "Music" FROM table_38756 WHERE "Style" = 'jive'
wikisql
CREATE TABLE table_name_79 ( frequency VARCHAR, sspec_number VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the frequency of the processor with an sSpec number of sl3bn(kc0)sl3e9(kc0)?
SELECT frequency FROM table_name_79 WHERE sspec_number = "sl3bn(kc0)sl3e9(kc0)"
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 AVG(t_kc24.MED_AMOUT) FROM t_kc24 WHERE t_kc24.MED_CLINIC_ID IN (SELECT qtb.MED_CLINIC_ID FROM qtb WHERE qtb.PERSON_AGE >= 10 UNION SELECT gyb.MED_CLINIC_ID FROM gyb WHERE gyb.PERSON_AGE >= 10 UNION SELECT zyb.MED_CLINIC_ID FROM zyb WHERE zyb.PERSON_AGE >= 10 UNION SELECT mzb.MED_CLINIC_ID FROM mzb WHERE mzb.PER...
css
CREATE TABLE t_kc24 ( ACCOUNT_DASH_DATE time, ACCOUNT_DASH_FLG number, CASH_PAY number, CIVIL_SUBSIDY number, CKC102 number, CLINIC_ID text, CLINIC_SLT_DATE time, COMP_ID text, COM_ACC_PAY number, COM_PAY number, DATA_ID text, ENT_ACC_PAY number, ENT_PAY number, F...
SELECT t_kc22.SOC_SRT_DIRE_CD, t_kc22.SOC_SRT_DIRE_NM, t_kc22.UNIVALENT FROM t_kc22 WHERE t_kc22.MED_CLINIC_ID IN (SELECT gwyjzb.MED_CLINIC_ID FROM gwyjzb WHERE gwyjzb.PERSON_ID = '54049149' AND gwyjzb.MED_SER_ORG_NO = '1343392' UNION SELECT fgwyjzb.MED_CLINIC_ID FROM fgwyjzb WHERE fgwyjzb.PERSON_ID = '54049149' AND fg...
css
CREATE TABLE table_22638 ( "Years covered" text, "All bills sponsored" real, "All amendments sponsored" real, "All bills cosponsored" real, "All amendments cosponsored" real, "Bills originally cosponsored" real, "Amendments originally cosponsored" real ) -- Using valid SQLite, answer the f...
SELECT "All bills cosponsored" FROM table_22638 WHERE "Bills originally cosponsored" = '113'
wikisql
CREATE TABLE exhibition ( Exhibition_ID int, Year int, Theme text, Artist_ID int, Ticket_Price real ) CREATE TABLE artist ( Artist_ID int, Name text, Country text, Year_Join int, Age int ) CREATE TABLE exhibition_record ( Exhibition_ID int, Date text, Attendance int...
SELECT Country, COUNT(Country) FROM artist GROUP BY Country ORDER BY COUNT(Country) DESC
nvbench
CREATE TABLE table_name_82 ( year_signed VARCHAR, year_separated VARCHAR, chinese_name VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What was the signed year for the Chinese name who separated in 1987?
SELECT year_signed FROM table_name_82 WHERE year_separated = "1987" AND chinese_name = "蘇永康"
sql_create_context
CREATE TABLE table_2026548_1 ( explanation VARCHAR, vice_president VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Name the explanation for alben w. barkley
SELECT explanation FROM table_2026548_1 WHERE vice_president = "Alben W. Barkley"
sql_create_context
CREATE TABLE table_204_451 ( id number, "component" text, "model 01" text, "model 01+" text, "model 02" text, "model e2" text, "model 2+ (pre-production)" text, "model 03 (china copy)" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- what ...
SELECT "component" FROM table_204_451 WHERE id = (SELECT id FROM table_204_451 WHERE "component" = 'bluetooth') + 1
squall
CREATE TABLE table_71392 ( "Rank" real, "Lane" real, "Name" text, "Nationality" text, "Time" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the lowest rank of Jens Kruppa in a lane larger than 2?
SELECT MIN("Rank") FROM table_71392 WHERE "Name" = 'jens kruppa' AND "Lane" > '2'
wikisql
CREATE TABLE table_18516 ( "District" text, "Incumbent" text, "Party" text, "First elected" real, "Result" text, "Candidates" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- For the Republican party what are the names of the incumbents?
SELECT "Incumbent" FROM table_18516 WHERE "Party" = 'Republican'
wikisql
CREATE TABLE microlab ( microlabid number, patientunitstayid number, culturesite text, organism text, culturetakentime time ) CREATE TABLE patient ( uniquepid text, patienthealthsystemstayid number, patientunitstayid number, gender text, age text, ethnicity text, hospita...
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 = '033-250' AND NOT patient.hospitaldischargetime IS NULL ORDER BY patient.ho...
eicu
CREATE TABLE requirement ( requirement_id int, requirement varchar, college varchar ) CREATE TABLE program_requirement ( program_id int, category varchar, min_credit int, additional_req varchar ) CREATE TABLE course_prerequisite ( pre_course_id int, course_id int ) CREATE TABLE jo...
SELECT DISTINCT department, name, number FROM course WHERE (description LIKE '%UM Chemistry Program at Peking University , Beijing%' OR name LIKE '%UM Chemistry Program at Peking University , Beijing%') AND credits = 17
advising
CREATE TABLE Manufacturers ( Code INTEGER, Name VARCHAR(255), Headquarter VARCHAR(255), Founder VARCHAR(255), Revenue REAL ) CREATE TABLE Products ( Code INTEGER, Name VARCHAR(255), Price DECIMAL, Manufacturer INTEGER ) -- Using valid SQLite, answer the following questions for the...
SELECT Founder, SUM(Price) FROM Products AS T1 JOIN Manufacturers AS T2 ON T1.Manufacturer = T2.Code GROUP BY Founder ORDER BY SUM(Price) DESC
nvbench
CREATE TABLE table_46821 ( "Place" text, "Player" text, "Country" text, "Score" real, "To par" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the to par of player john buczek, who has a t9 place and is from the United States?
SELECT "To par" FROM table_46821 WHERE "Place" = 't9' AND "Country" = 'united states' AND "Player" = 'john buczek'
wikisql
CREATE TABLE table_37185 ( "Ship" text, "Hull No." text, "Builder" text, "Home Port" text, "Commissioned\u2013 Decommissioned" text, "NVR page" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Name the ship with hull number of aor-6
SELECT "Ship" FROM table_37185 WHERE "Hull No." = 'aor-6'
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 WHERE demographic.admission_type = "NEWBORN" AND demographic.admission_location = "TRANSFER FROM HOSP/EXTRAM"
mimicsql_data
CREATE TABLE course_prerequisite ( pre_course_id int, course_id int ) CREATE TABLE jobs ( job_id int, job_title varchar, description varchar, requirement varchar, city varchar, state varchar, country varchar, zip int ) CREATE TABLE comment_instructor ( instructor_id int, ...
SELECT DISTINCT department, name, number FROM course WHERE (description LIKE '%Human Physiology-Laboratory%' OR name LIKE '%Human Physiology-Laboratory%') AND credits = 3
advising
CREATE TABLE table_76607 ( "Round" real, "Pick" real, "Overall" real, "Name" text, "Position" text, "College" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is stanford's average overall?
SELECT AVG("Overall") FROM table_76607 WHERE "College" = 'stanford'
wikisql
CREATE TABLE table_name_90 ( venue VARCHAR, winner VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- where did marie-laure taya win?
SELECT venue FROM table_name_90 WHERE winner = "marie-laure taya"
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 SUM(t_kc22.QTY), SUM(t_kc22.AMOUNT) FROM t_kc22 WHERE t_kc22.SOC_SRT_DIRE_NM = '氟哌啶醇片(糖衣)' AND t_kc22.STA_DATE BETWEEN '2007-10-04' AND '2014-10-03'
css
CREATE TABLE table_25276528_2 ( title VARCHAR, directed_by VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What title did Bill Foster direct ?
SELECT title FROM table_25276528_2 WHERE directed_by = "Bill Foster"
sql_create_context
CREATE TABLE table_75454 ( "Round" text, "Date" text, "Matches" real, "Clubs" text, "New entries this round" text, "Prize money" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- How many new entries this round have clubs 2 1?
SELECT "New entries this round" FROM table_75454 WHERE "Clubs" = '2 → 1'
wikisql
CREATE TABLE procedures ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) CREATE TABLE prescriptions ( subject_id text, hadm_id text, icustay_id text, drug_type text, drug text, formulary_drug_cd text, route text, drug_dose text ) ...
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE demographic.ethnicity = "AMERICAN INDIAN/ALASKA NATIVE" AND prescriptions.drug_type = "ADDITIVE"
mimicsql_data
CREATE TABLE t_kc22 ( MED_EXP_DET_ID text, OVERALL_CD_ORG text, OVERALL_CD_PERSON text, MED_CLINIC_ID text, MED_EXP_BILL_ID text, SOC_SRT_DIRE_CD text, SOC_SRT_DIRE_NM text, DIRE_TYPE number, CHA_ITEM_LEV number, MED_INV_ITEM_TYPE text, MED_DIRE_CD text, MED_DIRE_NM text,...
SELECT MED_DIRE_CD, MED_DIRE_NM FROM t_kc22 WHERE MED_CLINIC_ID = '46764459204' AND SOC_SRT_DIRE_NM = '炙远志颗粒'
css
CREATE TABLE table_204_582 ( id number, "model" text, "launch" text, "code name" text, "fab (nm)" number, "bus interface" text, "memory (mib)" text, "core clock (mhz)" number, "memory clock (mhz)" number, "config core1" text, "fillrate\nmoperations/s" number, "fillrate\nm...
SELECT "model" FROM table_204_582 ORDER BY id DESC LIMIT 1
squall
CREATE TABLE lab ( labid number, patientunitstayid number, labname text, labresult number, labresulttime time ) CREATE TABLE vitalperiodic ( vitalperiodicid number, patientunitstayid number, temperature number, sao2 number, heartrate number, respiration number, systemics...
SELECT t3.drugname FROM (SELECT t2.drugname, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM (SELECT patient.uniquepid, diagnosis.diagnosistime, patient.patienthealthsystemstayid FROM diagnosis JOIN patient ON diagnosis.patientunitstayid = patient.patientunitstayid WHERE diagnosis.diagnosisname = 'upper urinary t...
eicu
CREATE TABLE actor ( last_name VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- How many different last names do the actors and actresses have?
SELECT COUNT(DISTINCT last_name) FROM actor
sql_create_context
CREATE TABLE table_204_111 ( id number, "name" text, "animal type" text, "introduced" number, "reintroduced" text, "retired" number, "beanie baby resembled" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- how many total pillow pals were both ...
SELECT COUNT("name") FROM table_204_111 WHERE "reintroduced" = 1999 AND "retired" = 1999
squall
CREATE TABLE dual_carrier ( main_airline varchar, low_flight_number int, high_flight_number int, dual_airline varchar, service_name text ) CREATE TABLE restriction ( restriction_code text, advance_purchase int, stopovers text, saturday_stay_required text, minimum_stay int, m...
SELECT DISTINCT ground_service.transport_type FROM city, ground_service WHERE city.city_name = 'TORONTO' AND ground_service.city_code = city.city_code AND ground_service.transport_type = 'LIMOUSINE'
atis
CREATE TABLE table_68544 ( "2001" text, "2004" text, "2009" text, "2013" text, "Total" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the year 2001 with a total larger than 1, and 2009 with 8?
SELECT "2001" FROM table_68544 WHERE "Total" > '1' AND "2009" = '8'
wikisql
CREATE TABLE ReviewTaskResultTypes ( Id number, Name text, Description text ) CREATE TABLE PostNotices ( Id number, PostId number, PostNoticeTypeId number, CreationDate time, DeletionDate time, ExpiryDate time, Body text, OwnerUserId number, DeletionUserId number ) CREA...
SELECT SUM(Reputation) / COUNT(*) AS Average_rep FROM Users WHERE Reputation > 100
sede
CREATE TABLE table_name_87 ( country VARCHAR, finish VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which country has a finish of t22?
SELECT country FROM table_name_87 WHERE finish = "t22"
sql_create_context
CREATE TABLE table_29583818_3 ( place VARCHAR, couple VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- How many times is the couple laura and colin?
SELECT COUNT(place) FROM table_29583818_3 WHERE couple = "Laura and Colin"
sql_create_context
CREATE TABLE mzjzjlb_jybgb ( YLJGDM_MZJZJLB text, BGDH number, YLJGDM 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 te...
SELECT COUNT(mzjzjlb.ZZYSGH) FROM hz_info JOIN mzjzjlb ON hz_info.YLJGDM = mzjzjlb.YLJGDM AND hz_info.KH = mzjzjlb.KH AND hz_info.KLX = mzjzjlb.KLX WHERE hz_info.RYBH = '41398120' AND mzjzjlb.JZKSRQ BETWEEN '2001-07-25' AND '2011-05-08'
css
CREATE TABLE table_name_29 ( draws INTEGER, losses VARCHAR, club VARCHAR, against VARCHAR, wins VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What's the smallest draw of Warrnambool when the against was less than 1299, more than 7 wins, and less...
SELECT MIN(draws) FROM table_name_29 WHERE against < 1299 AND wins > 7 AND club = "warrnambool" AND losses < 2
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 demographic.dob, demographic.admittime FROM demographic WHERE demographic.name = "Fernando Wontor"
mimicsql_data
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.JCZBJGDL, jyjgzbb.JCZBJGDW FROM person_info JOIN hz_info JOIN mzjzjlb JOIN jybgb JOIN jyjgzbb JOIN person_info_hz_info ON person_info.RYBH = person_info_hz_info.RYBH AND hz_info.YLJGDM = mzjzjlb.YLJGDM AND hz_info.KH = mzjzjlb.KH AND hz_info.KLX = mzjzjlb.KLX AND mzjzjlb.YLJGDM = jybgb.YLJGDM_MZJZJLB AND...
css
CREATE TABLE table_79722 ( "Rank" real, "Nation" text, "Gold" real, "Silver" real, "Bronze" real, "Total" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What are the most bronze medals in a rank more than 1 with a total larger than 3?
SELECT MAX("Bronze") FROM table_79722 WHERE "Total" > '3' AND "Rank" > '1'
wikisql
CREATE TABLE table_52239 ( "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. -- What was the method for the resolution of nc where ...
SELECT "Method" FROM table_52239 WHERE "Round" < '3' AND "Res." = 'nc'
wikisql
CREATE TABLE table_name_98 ( score VARCHAR, date VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the score on december 10?
SELECT score FROM table_name_98 WHERE date = "december 10"
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 IN_HOSP_DAYS FROM t_kc21 WHERE MED_CLINIC_ID = '17340163122'
css
CREATE TABLE table_28914 ( "District" text, "Incumbent" text, "Party" text, "First elected" text, "Result" text, "Candidates" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which party experienced a result of lost re-election democratic-republic...
SELECT "Party" FROM table_28914 WHERE "Result" = 'Lost re-election Democratic-Republican hold'
wikisql
CREATE TABLE table_44157 ( "Round" real, "Pick" real, "Player" text, "Nationality" text, "College" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which player went to Wake Forest and was selected with a pick after 145?
SELECT "Player" FROM table_44157 WHERE "Pick" > '145' AND "College" = 'wake forest'
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 diagnoses ( ...
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.diagnosis = "COLANGITIS" AND demographic.dod_year <= "2186.0"
mimicsql_data
CREATE TABLE table_16185956_1 ( district VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Who are the candidates in Washington 1 district?
SELECT 2008 AS _candidates FROM table_16185956_1 WHERE district = "Washington 1"
sql_create_context
CREATE TABLE table_15463188_7 ( name VARCHAR, school_club_team VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Name the name of the state
SELECT name FROM table_15463188_7 WHERE school_club_team = "State"
sql_create_context
CREATE TABLE table_name_26 ( venue VARCHAR, home_team VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the venue where the melbourne tigers play their home games?
SELECT venue FROM table_name_26 WHERE home_team = "melbourne tigers"
sql_create_context
CREATE TABLE table_name_54 ( front_side_bus VARCHAR, model_number VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the Front Side Bus for Model Number c3 850?
SELECT front_side_bus FROM table_name_54 WHERE model_number = "c3 850"
sql_create_context
CREATE TABLE table_name_35 ( score INTEGER, country VARCHAR, player VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What was Craig Stadler's lowest score for United states?
SELECT MIN(score) FROM table_name_35 WHERE country = "united states" AND player = "craig stadler"
sql_create_context
CREATE TABLE lab ( subject_id text, hadm_id text, itemid text, charttime text, flag text, value_unit text, label text, fluid text ) CREATE TABLE procedures ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) CREATE TABLE diagnoses ( ...
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.discharge_location = "DISC-TRAN CANCER/CHLDRN H" AND procedures.icd9_code = "8604"
mimicsql_data
CREATE TABLE screen_mode ( graphics_mode number, char_cells text, pixels text, hardware_colours number, used_kb number, map text, type text ) CREATE TABLE chip_model ( model_name text, launch_year number, ram_mib number, rom_mib number, slots text, wifi text, blu...
SELECT MAX(T1.ram_mib), MIN(T1.ram_mib) FROM chip_model AS T1 JOIN phone AS T2 ON T1.model_name = T2.chip_model WHERE T2.company_name = "Nokia Corporation"
spider
CREATE TABLE table_16078390_2 ( primary_conference VARCHAR, institution VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What conference does Gonzaga University play in?
SELECT primary_conference FROM table_16078390_2 WHERE institution = "Gonzaga University"
sql_create_context
CREATE TABLE table_35183 ( "Game" real, "March" real, "Opponent" text, "Score" text, "Record" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- March of 26 has what lowest game?
SELECT MIN("Game") FROM table_35183 WHERE "March" = '26'
wikisql
CREATE TABLE paperfield ( fieldid int, paperid int ) CREATE TABLE field ( fieldid int ) CREATE TABLE venue ( venueid int, venuename varchar ) CREATE TABLE writes ( paperid int, authorid int ) CREATE TABLE cite ( citingpaperid int, citedpaperid int ) CREATE TABLE paper ( pape...
SELECT DISTINCT writes.paperid FROM author, writes WHERE author.authorname = 'daniel a. epstein' AND writes.authorid = author.authorid
scholar
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_DIRE_CD text, MED_DIRE_NM text,...
SELECT t_kc21.OUT_DIAG_DOC_CD, t_kc21.OUT_DIAG_DOC_NM FROM t_kc21 WHERE t_kc21.PERSON_ID = '53365571' AND t_kc21.IN_HOSP_DATE BETWEEN '2002-10-09' AND '2011-08-01' GROUP BY t_kc21.OUT_DIAG_DOC_CD ORDER BY COUNT(*) DESC LIMIT 1
css