instruction
stringlengths
151
7.46k
output
stringlengths
2
4.44k
source
stringclasses
26 values
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 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 = '20499920' AND jybgb.BGRQ BETWEEN '2010-05-11' AND '2020-04-09' UNION...
css
CREATE TABLE departments ( DEPARTMENT_ID decimal(4,0), DEPARTMENT_NAME varchar(30), MANAGER_ID decimal(6,0), LOCATION_ID decimal(4,0) ) CREATE TABLE countries ( COUNTRY_ID varchar(2), COUNTRY_NAME varchar(40), REGION_ID decimal(10,0) ) CREATE TABLE job_history ( EMPLOYEE_ID decimal(6,0...
SELECT HIRE_DATE, AVG(EMPLOYEE_ID) FROM employees WHERE HIRE_DATE < '2002-06-21'
nvbench
CREATE TABLE table_name_9 ( name VARCHAR, state VARCHAR, opened__closing_date_if_defunct_ VARCHAR, length VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the Name with an Opened (closing date if defunct) of 1995 and has a Length of miles (m), ...
SELECT name FROM table_name_9 WHERE opened__closing_date_if_defunct_ = "1995" AND length = "miles (m)" AND state = "illinois"
sql_create_context
CREATE TABLE Movie ( director VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What are the names of the directors who made exactly one movie?
SELECT director FROM Movie GROUP BY director HAVING COUNT(*) = 1
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 COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.ethnicity = "BLACK/AFRICAN AMERICAN" AND demographic.days_stay > "1"
mimicsql_data
CREATE TABLE table_40723 ( "Player" text, "Nationality" text, "Position" text, "Years in Orlando" text, "School/Club Team" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Mike Miller played for what school/club team?
SELECT "School/Club Team" FROM table_40723 WHERE "Player" = 'mike miller'
wikisql
CREATE TABLE table_42182 ( "Round" real, "Pick" real, "Name" text, "Position" text, "College" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What's the lowest round Justin Forsett was drafted in, with a draft pick larger than 233?
SELECT MIN("Round") FROM table_42182 WHERE "Name" = 'justin forsett' AND "Pick" > '233'
wikisql
CREATE TABLE table_name_98 ( nationality VARCHAR, round INTEGER ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which Nationality has a Round smaller than 3?
SELECT nationality FROM table_name_98 WHERE round < 3
sql_create_context
CREATE TABLE jobs ( job_id int, job_title varchar, description varchar, requirement varchar, city varchar, state varchar, country varchar, zip int ) CREATE TABLE program ( program_id int, name varchar, college varchar, introduction varchar ) CREATE TABLE requirement ( ...
SELECT DISTINCT course.department, course.name, course.number FROM course INNER JOIN course_offering ON course.course_id = course_offering.course_id INNER JOIN semester ON semester.semester_id = course_offering.semester WHERE course.department = 'BIOSTAT' AND semester.semester = 'Spring-Summer'
advising
CREATE TABLE prescriptions ( subject_id text, hadm_id text, icustay_id text, drug_type text, drug text, formulary_drug_cd text, route text, drug_dose text ) CREATE TABLE lab ( subject_id text, hadm_id text, itemid text, charttime text, flag text, value_unit text,...
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE demographic.admission_type = "URGENT" AND prescriptions.route = "SC"
mimicsql_data
CREATE TABLE table_29766 ( "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 i...
SELECT "Record" FROM table_29766 WHERE "Date" = 'November 19'
wikisql
CREATE TABLE table_19197 ( "Chassis Manufacturer" text, "Chassis Model" text, "Body Model" text, "Number in Fleet" real, "Fleet Numbers" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- what is smallest number in fleet for chassis manufacturer Scania ...
SELECT MIN("Number in Fleet") FROM table_19197 WHERE "Chassis Manufacturer" = 'Scania' AND "Fleet Numbers" = '3230'
wikisql
CREATE TABLE table_73407 ( "District" text, "Vacator" text, "Reason for change" text, "Successor" text, "Date successor seated" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Name the reason for change pennsylvania 13th
SELECT "Reason for change" FROM table_73407 WHERE "District" = 'Pennsylvania 13th'
wikisql
CREATE TABLE wine ( no number, grape text, winery text, appelation text, state text, name text, year number, price number, score number, cases number, drink text ) CREATE TABLE grapes ( id number, grape text, color text ) CREATE TABLE appellations ( no numbe...
SELECT AVG(price), AVG(score), appelation FROM wine GROUP BY appelation
spider
CREATE TABLE course ( course_id int, name varchar, department varchar, number varchar, credits varchar, advisory_requirement varchar, enforced_requirement varchar, description varchar, num_semesters int, num_enrolled int, has_discussion varchar, has_lab varchar, has_p...
SELECT DISTINCT course.department, course.name, course.number FROM course INNER JOIN area ON course.course_id = area.course_id INNER JOIN program_course ON program_course.course_id = course.course_id WHERE (area.area LIKE '%Polish Context%' OR course.description LIKE '%Polish Context%' OR course.name LIKE '%Polish Cont...
advising
CREATE TABLE table_name_87 ( points_against VARCHAR, club VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Name the points against for porthcawl rfc
SELECT points_against FROM table_name_87 WHERE club = "porthcawl rfc"
sql_create_context
CREATE TABLE table_63531 ( "Club" text, "Wins" real, "Losses" real, "Draws" real, "Against" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the lowest against when the draws are more than 0 and the losses are less than 3?
SELECT MIN("Against") FROM table_63531 WHERE "Losses" < '3' AND "Draws" > '0'
wikisql
CREATE TABLE microbiologyevents ( row_id number, subject_id number, hadm_id number, charttime time, spec_type_desc text, org_name text ) CREATE TABLE outputevents ( row_id number, subject_id number, hadm_id number, icustay_id number, charttime time, itemid number, va...
SELECT COUNT(DISTINCT admissions.subject_id) FROM admissions WHERE admissions.hadm_id IN (SELECT prescriptions.hadm_id FROM prescriptions WHERE prescriptions.drug = 'quinidine gluconate e.r.' AND DATETIME(prescriptions.startdate) <= DATETIME(CURRENT_TIME(), '-3 year'))
mimic_iii
CREATE TABLE degrees ( Id VARCHAR ) CREATE TABLE campuses ( Id VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What are the degrees conferred in 'San Francisco State University' in 2001.
SELECT degrees FROM campuses AS T1 JOIN degrees AS T2 ON t1.Id = t2.campus WHERE t1.campus = "San Francisco State University" AND t2.year = 2001
sql_create_context
CREATE TABLE table_5613 ( "Rank" real, "Airline" text, "2012" real, "2011" real, "2010" real, "2009" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- avg passengers in 2012 for 2009 more than 104.5 and 2010 less than 162.6 and 2011 less than 141.8...
SELECT AVG("2012") FROM table_5613 WHERE "2009" > '104.5' AND "2010" < '162.6' AND "2011" < '141.8'
wikisql
CREATE TABLE vitalperiodic ( vitalperiodicid number, patientunitstayid number, temperature number, sao2 number, heartrate number, respiration number, systemicsystolic number, systemicdiastolic number, systemicmean number, observationtime time ) CREATE TABLE lab ( labid numbe...
SELECT medication.drugstarttime FROM medication WHERE medication.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '022-130563')) AND medication.routeadmin = 'inh' ORDER BY medic...
eicu
CREATE TABLE flight ( aircraft_code_sequence text, airline_code varchar, airline_flight text, arrival_time int, connections int, departure_time int, dual_carrier text, flight_days text, flight_id int, flight_number int, from_airport varchar, meal_code text, stops int,...
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 = 'BOSTON' AND date_day.day_number = 20 AND date_day.month_number = 1 AND da...
atis
CREATE TABLE table_79157 ( "Position" real, "Team" text, "Played" real, "Drawn" real, "Lost" real, "Goals For" real, "Goals Against" real, "Goal Difference" text, "Points 1" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- How much Dra...
SELECT COUNT("Drawn") FROM table_79157 WHERE "Goals Against" = '81' AND "Lost" > '23'
wikisql
CREATE TABLE table_77866 ( "CERCLIS ID" text, "Name" text, "County" text, "Proposed" text, "Listed" text, "Construction completed" text, "Partially deleted" text, "Deleted" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- what is the cercl...
SELECT "CERCLIS ID" FROM table_77866 WHERE "Proposed" = '12/30/1982' AND "Partially deleted" = '05/01/2003'
wikisql
CREATE TABLE ship ( ship_id number, name text, type text, nationality text, tonnage number ) CREATE TABLE mission ( mission_id number, ship_id number, code text, launched_year number, location text, speed_knots number, fate text ) -- Using valid SQLite, answer the foll...
SELECT type, AVG(tonnage) FROM ship GROUP BY type
spider
CREATE TABLE table_11447995_2 ( bello VARCHAR, ben_tahir VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the Bello when Ben-Tahir is 296?
SELECT bello FROM table_11447995_2 WHERE ben_tahir = "296"
sql_create_context
CREATE TABLE diagnoses ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) CREATE TABLE procedures ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) CREATE TABLE prescriptions ( subject_id text, hadm_id...
SELECT demographic.dob, demographic.admission_type FROM demographic WHERE demographic.name = "James Sloan"
mimicsql_data
CREATE TABLE table_25980 ( "Season" real, "Series" text, "Team" text, "Races" real, "Wins" real, "Poles" real, "F/Laps" real, "Podiums" real, "Points" text, "Position" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- How many races...
SELECT COUNT("Races") FROM table_25980 WHERE "Season" = '2012' AND "Podiums" = '0'
wikisql
CREATE TABLE table_26686908_2 ( city___state VARCHAR, date VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What was the location for the date 7 10 october?
SELECT city___state FROM table_26686908_2 WHERE date = "7–10 October"
sql_create_context
CREATE TABLE diagnoses_icd ( row_id number, subject_id number, hadm_id number, icd9_code text, charttime time ) CREATE TABLE outputevents ( row_id number, subject_id number, hadm_id number, icustay_id number, charttime time, itemid number, value number ) CREATE TABLE d_...
SELECT admissions.subject_id FROM admissions WHERE admissions.hadm_id IN (SELECT diagnoses_icd.hadm_id FROM diagnoses_icd WHERE diagnoses_icd.icd9_code = (SELECT d_icd_diagnoses.icd9_code FROM d_icd_diagnoses WHERE d_icd_diagnoses.short_title = 'cannabis abuse-unspec') AND DATETIME(diagnoses_icd.charttime) >= DATETIME(...
mimic_iii
CREATE TABLE t_kc24 ( ACCOUNT_DASH_DATE time, ACCOUNT_DASH_FLG number, CASH_PAY number, CIVIL_SUBSIDY number, CKC102 number, CLINIC_ID text, CLINIC_SLT_DATE time, COMP_ID text, COM_ACC_PAY number, COM_PAY number, DATA_ID text, ENT_ACC_PAY number, ENT_PAY number, F...
SELECT COUNT(*) FROM t_kc21 JOIN t_kc22 ON t_kc21.MED_CLINIC_ID = t_kc22.MED_CLINIC_ID WHERE t_kc21.PERSON_ID = '78177381' AND t_kc22.STA_DATE BETWEEN '2003-04-07' AND '2019-05-26' AND t_kc22.SOC_SRT_DIRE_NM = '苯巴比妥片'
css
CREATE TABLE table_name_48 ( Id VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the 2005 value with a q2 in 2011, a q1 in 2012, and 1r in 2003?
SELECT 2005 FROM table_name_48 WHERE 2011 = "q2" AND 2012 = "q1" AND 2003 = "1r"
sql_create_context
CREATE TABLE company ( company_id number, rank number, company text, headquarters text, main_industry text, sales_billion number, profits_billion number, assets_billion number, market_value number ) CREATE TABLE station_company ( station_id number, company_id number, ran...
SELECT company, main_industry FROM company WHERE headquarters <> 'USA'
spider
CREATE TABLE table_47893 ( "Year" real, "Album" text, "Release type" text, "Label" text, "Hungarian top 40 album charts" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What was the name of the album that was a demo release?
SELECT "Album" FROM table_47893 WHERE "Release type" = 'demo'
wikisql
CREATE TABLE plays_games ( stuid number, gameid number, hours_played number ) CREATE TABLE sportsinfo ( stuid number, sportname text, hoursperweek number, gamesplayed number, onscholarship text ) CREATE TABLE student ( stuid number, lname text, fname text, age number, ...
SELECT T2.lname, T2.fname FROM sportsinfo AS T1 JOIN student AS T2 ON T1.stuid = T2.stuid WHERE T1.sportname = "Football" OR T1.sportname = "Lacrosse"
spider
CREATE TABLE Users ( Id number, Reputation number, CreationDate time, DisplayName text, LastAccessDate time, WebsiteUrl text, Location text, AboutMe text, Views number, UpVotes number, DownVotes number, ProfileImageUrl text, EmailHash text, AccountId number ) CRE...
SELECT u.CreationDate, u.Id AS "user_link" FROM Users AS u INNER JOIN Badges AS b ON b.UserId = u.Id WHERE b.Name = 'Nice Question' AND u.Reputation <= 1 GROUP BY u.Id, u.CreationDate ORDER BY u.CreationDate
sede
CREATE TABLE table_53369 ( "Driver" text, "Constructor" text, "Laps" real, "Time/retired" text, "Grid" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Tell me the highest laps for time/retired of +2 laps and driver of felice bonetto
SELECT MAX("Laps") FROM table_53369 WHERE "Time/retired" = '+2 laps' AND "Driver" = 'felice bonetto'
wikisql
CREATE TABLE table_67363 ( "Name" text, "Species Authority" text, "Order" text, "Family" text, "Red List" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the name for the species Authority of sigmodon hispidus say & ord, 1825?
SELECT "Name" FROM table_67363 WHERE "Species Authority" = 'sigmodon hispidus say & ord, 1825'
wikisql
CREATE TABLE table_37255 ( "Rank" real, "Stadium" text, "Capacity" real, "City" text, "Country" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which City has a Country of spain, and a Stadium of palacio de deportes de santander?
SELECT "City" FROM table_37255 WHERE "Country" = 'spain' AND "Stadium" = 'palacio de deportes de santander'
wikisql
CREATE TABLE table_42003 ( "Office" text, "Republican ticket" text, "Democratic ticket" text, "Liberal ticket" text, "Conservative ticket" text, "Socialist Workers ticket" text, "Socialist Labor ticket" text ) -- Using valid SQLite, answer the following questions for the tables provided ab...
SELECT "Office" FROM table_42003 WHERE "Socialist Workers ticket" = 'sylvia weinstein'
wikisql
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 diagnoses ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) C...
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE diagnoses.short_title = "Surg compl-heart" AND prescriptions.drug_type = "MAIN"
mimicsql_data
CREATE TABLE table_15451122_2 ( assembled VARCHAR, first_member VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What date was parliament assembled when John rudhale was first member?
SELECT assembled FROM table_15451122_2 WHERE first_member = "John Rudhale"
sql_create_context
CREATE TABLE table_75760 ( "Information" text, "Altade\u00f1a" text, "Aprende" text, "Centennial" text, "Kyrene MS" text, "del Pueblo" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What kind of Altade a has del Pueblo of maroon/gray?
SELECT "Altade\u00f1a" FROM table_75760 WHERE "del Pueblo" = 'maroon/gray'
wikisql
CREATE TABLE table_name_60 ( time_retired VARCHAR, grid VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the time/retired of the one with grid of 16?
SELECT time_retired FROM table_name_60 WHERE grid = 16
sql_create_context
CREATE TABLE zyb ( CLINIC_ID text, COMP_ID text, DATA_ID text, DIFF_PLACE_FLG number, FERTILITY_STS number, FLX_MED_ORG_ID text, HOSP_LEV number, HOSP_STS number, IDENTITY_CARD text, INPT_AREA_BED text, INSURED_IDENTITY number, INSURED_STS text, INSU_TYPE text, IN...
SELECT AVG(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 >= 20 UNION SELECT gyb.MED_CLINIC_ID FROM gyb WHERE gyb.PERSON_AGE >= 20 UNION SELECT zyb.MED_CLINIC_ID FROM zyb WHERE zyb.PERSON_AGE >= 20 UNION SELECT mzb.MED_CLINIC_ID FROM mzb WHERE mzb.PER...
css
CREATE TABLE driver ( Driver_ID int, Name text, Party text, Home_city text, Age int ) CREATE TABLE school_bus ( School_ID int, Driver_ID int, Years_Working int, If_full_time bool ) CREATE TABLE school ( School_ID int, Grade text, School text, Location text, Type...
SELECT Name, Age FROM driver ORDER BY Name DESC
nvbench
CREATE TABLE table_38138 ( "Date" text, "Visitor" text, "Score" text, "Home" text, "Decision" text, "Attendance" real, "Series" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which Score has a Series of flyers lead 3 2?
SELECT "Score" FROM table_38138 WHERE "Series" = 'flyers lead 3–2'
wikisql
CREATE TABLE customer_policies ( policy_id number, customer_id number, policy_type_code text, start_date time, end_date time ) CREATE TABLE claims ( claim_id number, policy_id number, date_claim_made time, date_claim_settled time, amount_claimed number, amount_settled number...
SELECT T1.claim_id, COUNT(*) FROM claims AS T1 JOIN settlements AS T2 ON T1.claim_id = T2.claim_id GROUP BY T1.claim_id
spider
CREATE TABLE patients ( row_id number, subject_id number, gender text, dob time, dod time ) CREATE TABLE icustays ( row_id number, subject_id number, hadm_id number, icustay_id number, first_careunit text, last_careunit text, first_wardid number, last_wardid number, ...
SELECT DISTINCT cost.cost FROM cost WHERE cost.event_type = 'labevents' AND cost.event_id IN (SELECT labevents.row_id FROM labevents WHERE labevents.itemid IN (SELECT d_labitems.itemid FROM d_labitems WHERE d_labitems.label = 'quantitative g6pd'))
mimic_iii
CREATE TABLE table_45219 ( "Tournament" text, "2002" text, "2004" text, "2005" text, "2006" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What shows for 2002 when the 2004 is A, and the 2005 is 1r?
SELECT "2002" FROM table_45219 WHERE "2004" = 'a' AND "2005" = '1r'
wikisql
CREATE TABLE table_73934 ( "Represents" text, "Contestant" text, "Age" real, "Height (cm)" text, "Height (ft)" text, "Hometown" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Name the total number of represents for clary sermina delgado cid
SELECT COUNT("Represents") FROM table_73934 WHERE "Contestant" = 'Clary Sermina Delgado Cid'
wikisql
CREATE TABLE student_record ( student_id int, course_id int, semester int, grade varchar, how varchar, transfer_source varchar, earn_credit varchar, repeat_term varchar, test_id varchar ) CREATE TABLE ta ( campus_job_id int, student_id int, location varchar ) CREATE TAB...
SELECT DISTINCT course.department, course.name, course.number FROM course INNER JOIN area ON course.course_id = area.course_id INNER JOIN program_course ON program_course.course_id = course.course_id WHERE (area.area LIKE '%Strategy of Sport Organizations%' OR course.description LIKE '%Strategy of Sport Organizations%'...
advising
CREATE TABLE table_30073089_2 ( position VARCHAR, fis_points VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Name the position for fis points being 3495
SELECT position FROM table_30073089_2 WHERE fis_points = 3495
sql_create_context
CREATE TABLE table_name_20 ( rank INTEGER, name VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is sun yang's lowest rank?
SELECT MIN(rank) FROM table_name_20 WHERE name = "sun yang"
sql_create_context
CREATE TABLE table_969 ( "Season" text, "Oberliga Bayern" text, "Oberliga Hessen" text, "Oberliga Baden-W\u00fcrttemberg" text, "Oberliga S\u00fcdwest" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Name the season for spvgg bayreuth and fsv salmroh...
SELECT "Season" FROM table_969 WHERE "Oberliga Bayern" = 'SpVgg Bayreuth' AND "Oberliga S\u00fcdwest" = 'FSV Salmrohr'
wikisql
CREATE TABLE instruments ( songid number, bandmateid number, instrument text ) CREATE TABLE band ( id number, firstname text, lastname text ) CREATE TABLE tracklists ( albumid number, position number, songid number ) CREATE TABLE albums ( aid number, title text, year n...
SELECT COUNT(*) FROM instruments WHERE instrument = "drums"
spider
CREATE TABLE table_1212189_1 ( torque__nm__rpm VARCHAR, model_engine VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- The 1.6 Duratec model/engine has how many torque formulas?
SELECT COUNT(torque__nm__rpm) FROM table_1212189_1 WHERE model_engine = "1.6 Duratec"
sql_create_context
CREATE TABLE table_6320 ( "Competition" text, "Played" real, "Blackpool" real, "Draw" real, "Preston North End" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- How much Preston North End has a Blackpool smaller than 0?
SELECT COUNT("Preston North End") FROM table_6320 WHERE "Blackpool" < '0'
wikisql
CREATE TABLE table_13005 ( "Played" real, "Drawn" real, "Lost" real, "Against" real, "% Won" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the Lost with Against smaller than 25, and Played smaller than 1?
SELECT AVG("Lost") FROM table_13005 WHERE "Against" < '25' AND "Played" < '1'
wikisql
CREATE TABLE table_50190 ( "Outcome" text, "Date" text, "Tournament" text, "Surface" text, "Opponent" text, "Score" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- On what Surface was the match against Malek Jaziri played?
SELECT "Surface" FROM table_50190 WHERE "Opponent" = 'malek jaziri'
wikisql
CREATE TABLE table_name_67 ( record VARCHAR, time___et__ VARCHAR, result VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Time ( ET ) of 1:00pm, and a Result of w 34 14 has what record?
SELECT record FROM table_name_67 WHERE time___et__ = "1:00pm" AND result = "w 34–14"
sql_create_context
CREATE TABLE table_name_27 ( pick INTEGER, nfl_club VARCHAR, round VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the largest pick by the Baltimore Colts in a round later than 10?
SELECT MAX(pick) FROM table_name_27 WHERE nfl_club = "baltimore colts" AND round > 10
sql_create_context
CREATE TABLE zyjzjlb ( CYBQDM text, CYBQMC text, CYCWH text, CYKSDM text, CYKSMC text, CYSJ time, CYZTDM number, HZXM text, JZKSDM text, JZKSMC text, JZLSH text, KH text, KLX number, MZBMLX number, MZJZLSH text, MZZDBM text, MZZDMC text, MZZYZDZZBM...
SELECT jyjgzbb.BGDH FROM person_info JOIN hz_info JOIN mzjzjlb JOIN jyjgzbb 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 AND mzjzjlb.YLJGDM = jyjgzbb.jybgb_YLJGDM_MZJZJLB AND mzjzjlb.JZLSH = jyjgzbb.jybgb_JZLSH_MZJZJLB WHERE person_info...
css
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 diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE demographic.admission_location = "EMERGENCY ROOM ADMIT" AND diagnoses.long_title = "Pneumonia in aspergillosis"
mimicsql_data
CREATE TABLE PostTags ( PostId number, TagId number ) CREATE TABLE SuggestedEditVotes ( Id number, SuggestedEditId number, UserId number, VoteTypeId number, CreationDate time, TargetUserId number, TargetRepChange number ) CREATE TABLE Tags ( Id number, TagName text, Cou...
SELECT p.CreationDate AS "Date", u.Id AS "User ID", u.DisplayName AS "User Name", p.Id AS "post_link" FROM Posts AS p JOIN Users AS u ON u.Id = p.OwnerUserId WHERE p.Body LIKE '%##SpecifiedText##%'
sede
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_kc21.MED_CLINIC_ID FROM t_kc21 WHERE t_kc21.PERSON_ID = '59839403' AND t_kc21.MED_CLINIC_ID IN (SELECT t_kc22.MED_CLINIC_ID FROM t_kc22 WHERE t_kc22.AMOUNT > 2930.76)
css
CREATE TABLE table_19031 ( "Year" real, "Mens singles" text, "Womens singles" text, "Mens doubles" text, "Womens doubles" text, "Mixed doubles" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- who is the the mens singles with mens doubles being ka...
SELECT "Mens singles" FROM table_19031 WHERE "Mens doubles" = 'Kaj Lindfors Kaj Osterberg'
wikisql
CREATE TABLE restriction ( restriction_code text, advance_purchase int, stopovers text, saturday_stay_required text, minimum_stay int, maximum_stay int, application text, no_discounts text ) CREATE TABLE flight_stop ( flight_id int, stop_number int, stop_days text, stop_...
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 = 'ATLANTA' AND CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'PITTSB...
atis
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_kc24.t_kc21_OUT_DIAG_DIS_CD, t_kc24.t_kc21_OUT_DIAG_DIS_NM FROM t_kc24 WHERE t_kc24.t_kc21_PERSON_ID = '10674984' AND t_kc24.MED_CLINIC_ID IN (SELECT t_kc24.MED_CLINIC_ID FROM t_kc24 WHERE t_kc24.MED_AMOUT >= 3779.26)
css
CREATE TABLE table_name_35 ( player VARCHAR, score VARCHAR, country VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which player has 68 as the score and canada as the country?
SELECT player FROM table_name_35 WHERE score = 68 AND country = "canada"
sql_create_context
CREATE TABLE table_25518547_4 ( player VARCHAR, affiliation VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- How many players are affiliated with indiana university?
SELECT COUNT(player) FROM table_25518547_4 WHERE affiliation = "Indiana University"
sql_create_context
CREATE TABLE region ( Region_id int, Region_code text, Region_name text ) CREATE TABLE affected_region ( Region_id int, Storm_ID int, Number_city_affected real ) CREATE TABLE storm ( Storm_ID int, Name text, Dates_active text, Max_speed int, Damage_millions_USD real, Nu...
SELECT Name, Number_Deaths FROM storm WHERE Number_Deaths >= 1 ORDER BY Number_Deaths DESC
nvbench
CREATE TABLE table_2190 ( "Year(s)" real, "Commentator" text, "Dual Commentator" text, "Spokesperson" text, "Channel" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- how many spokesperson where in 2004
SELECT COUNT("Spokesperson") FROM table_2190 WHERE "Year(s)" = '2004'
wikisql
CREATE TABLE table_32816 ( "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. -- Where did the home team score 18.17 (125)?
SELECT "Venue" FROM table_32816 WHERE "Home team score" = '18.17 (125)'
wikisql
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 zyjzjlb.CYZTDM FROM zyjzjlb WHERE zyjzjlb.JZLSH = '99842963848'
css
CREATE TABLE table_name_64 ( points INTEGER, performer VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the sum of Points, when the Performer is fe-mail?
SELECT SUM(points) FROM table_name_64 WHERE performer = "fe-mail"
sql_create_context
CREATE TABLE gwyjzb ( 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 SUM(t_kc24.MED_AMOUT) FROM gwyjzb JOIN t_kc24 ON gwyjzb.MED_CLINIC_ID = t_kc24.MED_CLINIC_ID WHERE gwyjzb.PERSON_NM = '葛秀洁' AND t_kc24.CLINIC_SLT_DATE BETWEEN '2008-03-21' AND '2012-07-18' UNION SELECT SUM(t_kc24.MED_AMOUT) FROM fgwyjzb JOIN t_kc24 ON fgwyjzb.MED_CLINIC_ID = t_kc24.MED_CLINIC_ID WHERE fgwyjzb.PE...
css
CREATE TABLE zyb ( CLINIC_ID text, COMP_ID text, DATA_ID text, DIFF_PLACE_FLG number, FERTILITY_STS number, FLX_MED_ORG_ID text, HOSP_LEV number, HOSP_STS number, IDENTITY_CARD text, INPT_AREA_BED text, INSURED_IDENTITY number, INSURED_STS text, INSU_TYPE text, IN...
SELECT AVG(qtb.IN_HOSP_DAYS) FROM qtb WHERE qtb.MED_SER_ORG_NO = '7349327' AND qtb.IN_HOSP_DATE BETWEEN '2006-06-14' AND '2007-03-09' UNION SELECT AVG(gyb.IN_HOSP_DAYS) FROM gyb WHERE gyb.MED_SER_ORG_NO = '7349327' AND gyb.IN_HOSP_DATE BETWEEN '2006-06-14' AND '2007-03-09' UNION SELECT AVG(zyb.IN_HOSP_DAYS) FROM zyb WH...
css
CREATE TABLE table_name_47 ( venue VARCHAR, away_team VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- In the match where fitzroy was the away team, where was the venue?
SELECT venue FROM table_name_47 WHERE away_team = "fitzroy"
sql_create_context
CREATE TABLE table_name_61 ( date VARCHAR, tournament VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the date of the U.S. Women's open?
SELECT date FROM table_name_61 WHERE tournament = "u.s. women's open"
sql_create_context
CREATE TABLE table_8573 ( "Region" text, "Date" text, "Label" text, "Format" text, "Catalog" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- On what date was the format of ed remaster cd?
SELECT "Date" FROM table_8573 WHERE "Format" = 'ed remaster cd'
wikisql
CREATE TABLE table_name_66 ( opponent VARCHAR, date VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What team was the opponent on October 15, 1967?
SELECT opponent FROM table_name_66 WHERE date = "october 15, 1967"
sql_create_context
CREATE TABLE table_name_11 ( floors INTEGER, height VARCHAR, building VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the largest amount of floors in the 70m (233ft) Tupper building (educational)?
SELECT MAX(floors) FROM table_name_11 WHERE height = "70m (233ft)" AND building = "tupper building (educational)"
sql_create_context
CREATE TABLE table_train_72 ( "id" int, "extracorporeal_membrane_oxygenation_ecmo_cannulation" bool, "heart_disease" bool, "meningitis_or_encephalitis" bool, "sepsis" bool, "cancer" bool, "prisoners" bool, "NOUSE" float ) -- Using valid SQLite, answer the following questions for the ta...
SELECT * FROM table_train_72 WHERE prisoners = 1
criteria2sql
CREATE TABLE table_204_514 ( id number, "date" text, "sub" number, "flight" text, "dead" number, "hurt" number, "pax." number, "type" text, "perpetrator" text, "description" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- which ai...
SELECT "flight" FROM table_204_514 ORDER BY "dead" DESC LIMIT 1
squall
CREATE TABLE table_name_30 ( total_viewers VARCHAR, bbc_one_weekly_ranking VARCHAR, episode_no VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What was the total viewership for BBC One weekly rankings larger than 7, before episode 4?
SELECT total_viewers FROM table_name_30 WHERE bbc_one_weekly_ranking > 7 AND episode_no < 4
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_DIAG_DIS_CD, IN_DIAG_DIS_NM FROM t_kc21 WHERE PERSON_ID = '75917305' AND MED_CLINIC_ID IN (SELECT MED_CLINIC_ID FROM t_kc24 WHERE MED_AMOUT >= 353.37)
css
CREATE TABLE table_14323 ( "Tournament" text, "Wins" real, "Top-5" real, "Top-25" real, "Events" real, "Cuts made" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the highest number of cuts made in a tournament with 0 wins and 0 top 5 pla...
SELECT MAX("Cuts made") FROM table_14323 WHERE "Top-5" = '0' AND "Wins" < '0'
wikisql
CREATE TABLE table_name_36 ( event VARCHAR, time VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What event of this season had a time of 2:43?
SELECT event FROM table_name_36 WHERE time = "2:43"
sql_create_context
CREATE TABLE CloseAsOffTopicReasonTypes ( Id number, IsUniversal boolean, InputTitle text, MarkdownInputGuidance text, MarkdownPostOwnerGuidance text, MarkdownPrivilegedUserGuidance text, MarkdownConcensusDescription text, CreationDate time, CreationModeratorId number, ApprovalDa...
SELECT Week, '22', '17163', '17702', '13438' FROM (SELECT DATEADD(WEEK, DATEDIFF(WEEK, 0, CreationDate), 0) AS "week", c.UserId, COUNT(*) AS Count FROM Comments AS c WHERE c.UserId IN (22, 17163, 17702, 13438) AND YEAR(c.CreationDate) >= 2016 GROUP BY DATEADD(WEEK, DATEDIFF(WEEK, 0, CreationDate), 0), c.UserId) AS src ...
sede
CREATE TABLE table_name_86 ( total__kg_ VARCHAR, snatch VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What's the Total (kg) of a Snatch of 132.5?
SELECT total__kg_ FROM table_name_86 WHERE snatch = 132.5
sql_create_context
CREATE TABLE table_51417 ( "Year" real, "Event" text, "Record" text, "Athlete" text, "Nationality" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which athlete performed before 1984 in an 800 m event?
SELECT "Athlete" FROM table_51417 WHERE "Year" < '1984' AND "Event" = '800 m'
wikisql
CREATE TABLE table_46153 ( "Game" text, "Date" text, "Opponent" text, "Score" text, "Location/Attendance" text, "Record" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Who was the opponent in Game 44?
SELECT "Opponent" FROM table_46153 WHERE "Game" = '44'
wikisql
CREATE TABLE table_name_14 ( silver VARCHAR, team VARCHAR, gold VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- How many silver when the team is northwest territories and gold is less than 34?
SELECT COUNT(silver) FROM table_name_14 WHERE team = "northwest territories" AND gold < 34
sql_create_context
CREATE TABLE table_name_94 ( opponent VARCHAR, score VARCHAR, surface VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Who is the opponent when the score was 6 4, 6 2 and the surface was clay?
SELECT opponent FROM table_name_94 WHERE score = "6–4, 6–2" AND surface = "clay"
sql_create_context
CREATE TABLE table_61339 ( "Women" text, "Country" text, "Season" text, "Victories" real, "Downhill" text, "Super G" text, "Giant Slalom" text, "Slalom" text, "Combined" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Can you tell me ...
SELECT "Giant Slalom" FROM table_61339 WHERE "Combined" = '1' AND "Country" = 'united states' AND "Victories" > '11'
wikisql
CREATE TABLE people ( people_id number, name text, age number, height number, hometown text ) CREATE TABLE gymnast ( gymnast_id number, floor_exercise_points number, pommel_horse_points number, rings_points number, vault_points number, parallel_bars_points number, horizo...
SELECT total_points FROM gymnast ORDER BY floor_exercise_points DESC
spider
CREATE TABLE table_60693 ( "Tie no" text, "Home team" text, "Score" text, "Away team" text, "Date" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What was the score of the game that home team birmingham city played?
SELECT "Score" FROM table_60693 WHERE "Home team" = 'birmingham city'
wikisql
CREATE TABLE table_40268 ( "Year" text, "Team" text, "Comp" text, "Long" text, "Rate" text, "RAtt" text, "RYds" text, "RAvg" text, "Lost" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the comp when the ryds is 2?
SELECT "Comp" FROM table_40268 WHERE "RYds" = '2'
wikisql
CREATE TABLE races ( raceId INTEGER, year INTEGER, round INTEGER, circuitId INTEGER, name TEXT, date TEXT, time TEXT, url TEXT ) CREATE TABLE lapTimes ( raceId INTEGER, driverId INTEGER, lap INTEGER, position INTEGER, time TEXT, milliseconds INTEGER ) CREATE TAB...
SELECT year, COUNT(year) FROM results AS T1 JOIN races AS T2 ON T1.raceId = T2.raceId JOIN drivers AS T3 ON T1.driverId = T3.driverId WHERE T3.forename = "Lewis" GROUP BY year ORDER BY year
nvbench