instruction
stringlengths
151
7.46k
output
stringlengths
2
4.44k
source
stringclasses
26 values
CREATE TABLE table_name_12 ( subject VARCHAR, pinyin VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Name the subject of shiyan
SELECT subject FROM table_name_12 WHERE pinyin = "shiyan"
sql_create_context
CREATE TABLE table_36380 ( "Game" real, "March" real, "Opponent" text, "Score" text, "Record" text, "Points" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which Score has Points of 88, and a Record of 38 22 12?
SELECT "Score" FROM table_36380 WHERE "Points" = '88' AND "Record" = '38–22–12'
wikisql
CREATE TABLE table_803 ( "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. -- who made...
SELECT "High rebounds" FROM table_803 WHERE "Record" = '12-30'
wikisql
CREATE TABLE table_name_61 ( away_team VARCHAR, tie_no VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the name of the away team for Tie #19?
SELECT away_team FROM table_name_61 WHERE tie_no = "19"
sql_create_context
CREATE TABLE PostTags ( PostId number, TagId number ) CREATE TABLE PendingFlags ( Id number, FlagTypeId number, PostId number, CreationDate time, CloseReasonTypeId number, CloseAsOffTopicReasonTypeId number, DuplicateOfQuestionId number, BelongsOnBaseHostAddress text ) CREATE T...
SELECT Id, Title, Body FROM Posts WHERE PostTypeId = 2 AND OwnerUserId = '##UserId##' AND AcceptedAnswerId = Id
sede
CREATE TABLE table_54230 ( "Year" real, "Date" text, "Winner" text, "Result" text, "Loser" text, "Location" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the date where the winner was the Oakland Raiders in 1975?
SELECT "Date" FROM table_54230 WHERE "Year" = '1975' AND "Winner" = 'oakland raiders'
wikisql
CREATE TABLE table_name_67 ( points INTEGER, drawn VARCHAR, lost VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the greatest points value that have draws under 2 and 2 losses?
SELECT MAX(points) FROM table_name_67 WHERE drawn < 2 AND lost = 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 procedures.icd9_code, procedures.long_title FROM procedures WHERE procedures.subject_id = "9258"
mimicsql_data
CREATE TABLE table_42633 ( "Date" text, "Tournament" text, "Winning score" text, "Margin of victory" text, "Runner(s)-up" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Who were the Runner(s)-up with the winning score of 16 (66-68-70-68=272)?
SELECT "Runner(s)-up" FROM table_42633 WHERE "Winning score" = '−16 (66-68-70-68=272)'
wikisql
CREATE TABLE table_name_53 ( outcome VARCHAR, date VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What was the outcome of the match on August 20, 1978?
SELECT outcome FROM table_name_53 WHERE date = "august 20, 1978"
sql_create_context
CREATE TABLE table_name_9 ( other VARCHAR, value VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the Other transliteration for value 1 000?
SELECT other FROM table_name_9 WHERE value = "1 000"
sql_create_context
CREATE TABLE table_40620 ( "Outcome" text, "Date" text, "Tournament" text, "Surface" text, "Opponent" text, "Score" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the Outcome with an Opponent that is jelena jankovi ?
SELECT "Outcome" FROM table_40620 WHERE "Opponent" = 'jelena janković'
wikisql
CREATE TABLE table_name_36 ( pop__2010_ INTEGER, land___sqmi__ VARCHAR, geo_id VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the average population of the township having land of 35.666sqmi and GEO ID over 3807364500?
SELECT AVG(pop__2010_) FROM table_name_36 WHERE land___sqmi__ = 35.666 AND geo_id > 3807364500
sql_create_context
CREATE TABLE t_kc21_t_kc22 ( MED_CLINIC_ID text, MED_EXP_DET_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, H...
SELECT t_kc22.SOC_SRT_DIRE_NM FROM t_kc22 JOIN t_kc21_t_kc22 JOIN t_kc21 ON t_kc21_t_kc22.MED_EXP_DET_ID = t_kc22.MED_EXP_DET_ID AND t_kc21_t_kc22.MED_CLINIC_ID = t_kc21.MED_CLINIC_ID WHERE t_kc21_t_kc22.MED_CLINIC_ID = '87150491460' INTERSECT SELECT t_kc22.SOC_SRT_DIRE_NM FROM t_kc22 JOIN t_kc21_t_kc22 JOIN t_kc21 ON ...
css
CREATE TABLE table_name_31 ( away_team VARCHAR, venue VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What was the away team score in the game at Arden Street Oval?
SELECT away_team AS score FROM table_name_31 WHERE venue = "arden street oval"
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 jybgb.BGDH FROM person_info JOIN hz_info JOIN txmzjzjlb JOIN jybgb ON person_info.RYBH = hz_info.RYBH AND hz_info.YLJGDM = txmzjzjlb.YLJGDM AND hz_info.KH = txmzjzjlb.KH AND hz_info.KLX = txmzjzjlb.KLX AND txmzjzjlb.YLJGDM = jybgb.YLJGDM_MZJZJLB AND txmzjzjlb.JZLSH = jybgb.JZLSH_MZJZJLB WHERE person_info.XM = '苗...
css
CREATE TABLE countries ( COUNTRY_ID varchar(2), COUNTRY_NAME varchar(40), REGION_ID decimal(10,0) ) CREATE TABLE jobs ( JOB_ID varchar(10), JOB_TITLE varchar(35), MIN_SALARY decimal(6,0), MAX_SALARY decimal(6,0) ) CREATE TABLE departments ( DEPARTMENT_ID decimal(4,0), DEPARTMENT_NA...
SELECT COUNTRY_NAME, COUNT(COUNTRY_NAME) FROM countries GROUP BY COUNTRY_NAME
nvbench
CREATE TABLE Documents ( Document_ID INTEGER, Document_Type_Code CHAR(15), Project_ID INTEGER, Document_Date DATETIME, Document_Name VARCHAR(255), Document_Description VARCHAR(255), Other_Details VARCHAR(255) ) CREATE TABLE Ref_Budget_Codes ( Budget_Type_Code CHAR(15), Budget_Type_D...
SELECT Document_Type_Code, COUNT(*) FROM Documents GROUP BY Document_Type_Code
nvbench
CREATE TABLE table_46218 ( "Date" text, "Opponent" text, "Location" text, "Time" text, "Result" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What was the final score for the game played at 7:00 pm?
SELECT "Result" FROM table_46218 WHERE "Time" = '7:00 pm'
wikisql
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 procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.ethnicity = "BLACK/AFRICAN AMERICAN" AND procedures.short_title = "Pericardiocentesis"
mimicsql_data
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 demographic.admission_type, diagnoses.short_title FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE demographic.name = "Jane Dillard"
mimicsql_data
CREATE TABLE table_1426 ( "#" real, "Series Sorted" text, "Title" text, "Author" text, "Doctor" text, "Featuring" text, "Released" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What was the doctor for sorted series 6eb/b?
SELECT "Doctor" FROM table_1426 WHERE "Series Sorted" = '6EB/B'
wikisql
CREATE TABLE table_25561038_1 ( points VARCHAR, position VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- List the total points for the 1st place team.
SELECT points FROM table_25561038_1 WHERE position = "1st"
sql_create_context
CREATE TABLE table_47325 ( "Year" text, "Rebs" real, "Asts" real, "Stls" real, "Blks" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the lowest Stls, when Rebs is greater than 8.6?
SELECT MIN("Stls") FROM table_47325 WHERE "Rebs" > '8.6'
wikisql
CREATE TABLE table_52238 ( "Year" real, "Theme" text, "Artist" text, "Mintage" text, "Issue Price" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- How many coins by Suzanne Duranceau were minted?
SELECT "Mintage" FROM table_52238 WHERE "Artist" = 'suzanne duranceau'
wikisql
CREATE TABLE department_store_chain ( dept_store_chain_id number, dept_store_chain_name text ) CREATE TABLE product_suppliers ( product_id number, supplier_id number, date_supplied_from time, date_supplied_to time, total_amount_purchased text, total_value_purchased number ) CREATE TABL...
SELECT T1.staff_name, T1.staff_gender FROM staff AS T1 JOIN staff_department_assignments AS T2 ON T1.staff_id = T2.staff_id WHERE T2.date_assigned_from LIKE "2016%"
spider
CREATE TABLE allergy ( allergyid number, patientunitstayid number, drugname text, allergyname text, allergytime time ) CREATE TABLE treatment ( treatmentid number, patientunitstayid number, treatmentname text, treatmenttime time ) CREATE TABLE patient ( uniquepid text, pati...
SELECT COUNT(DISTINCT patient.uniquepid) FROM patient WHERE patient.patientunitstayid IN (SELECT treatment.patientunitstayid FROM treatment WHERE treatment.treatmentname = 'valve replacement or repair - emergent' AND DATETIME(treatment.treatmenttime, 'start of year') = DATETIME(CURRENT_TIME(), 'start of year', '-1 year...
eicu
CREATE TABLE t_kc21 ( MED_CLINIC_ID text, OVERALL_CD_ORG text, OVERALL_CD_PERSON text, COMP_ID text, PERSON_ID text, PERSON_NM text, IDENTITY_CARD text, SOC_SRT_CARD text, PERSON_SEX number, PERSON_AGE number, IN_HOSP_DATE time, OUT_HOSP_DATE time, DIFF_PLACE_FLG numb...
SELECT MED_CLINIC_ID FROM t_kc21 WHERE PERSON_ID = '97657668' AND NOT MED_CLINIC_ID IN (SELECT MED_CLINIC_ID FROM t_kc22 WHERE AMOUNT < 9132.88)
css
CREATE TABLE table_13806 ( "Year" text, "Game" text, "Genre" text, "Platform(s)" text, "Developer(s)" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the genre for the year 2012 (16th)?
SELECT "Genre" FROM table_13806 WHERE "Year" = '2012 (16th)'
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 wdmzjzjlb.JZZDBM, wdmzjzjlb.JZZDSM FROM person_info JOIN hz_info JOIN wdmzjzjlb ON person_info.RYBH = hz_info.RYBH AND hz_info.YLJGDM = wdmzjzjlb.YLJGDM AND hz_info.KH = wdmzjzjlb.KH AND hz_info.KLX = wdmzjzjlb.KLX WHERE person_info.XM = '韩嘉容' UNION SELECT bdmzjzjlb.JZZDBM, bdmzjzjlb.JZZDSM FROM person_info JOIN...
css
CREATE TABLE cinema ( Cinema_ID int, Name text, Openning_year int, Capacity int, Location text ) CREATE TABLE film ( Film_ID int, Rank_in_series int, Number_in_season int, Title text, Directed_by text, Original_air_date text, Production_code text ) CREATE TABLE schedule...
SELECT Name, SUM(T1.Show_times_per_day) FROM schedule AS T1 JOIN cinema AS T2 ON T1.Cinema_ID = T2.Cinema_ID GROUP BY T1.Cinema_ID ORDER BY Name DESC
nvbench
CREATE TABLE table_name_76 ( date VARCHAR, circuit VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- what date was mallala motor sport park the circuit?
SELECT date FROM table_name_76 WHERE circuit = "mallala motor sport park"
sql_create_context
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.JCRGH, jyjgzbb.JCRXM 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 W...
css
CREATE TABLE table_49934 ( "Player" text, "Country" text, "Year(s) won" text, "Total" real, "To par" text, "Finish" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the Year(s) won from the United States as country with a To Par of +4?
SELECT "Year(s) won" FROM table_49934 WHERE "Country" = 'united states' AND "To par" = '+4'
wikisql
CREATE TABLE table_67305 ( "Player" text, "Test Career" text, "Tests" real, "Catches" real, "Stumpings" real, "Total Dismissals" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- When was Mushfiqur Rahim's test career?
SELECT "Test Career" FROM table_67305 WHERE "Player" = 'mushfiqur rahim'
wikisql
CREATE TABLE table_26938 ( "Game" real, "Date" text, "Opponent" text, "Result" text, "Wildcats points" real, "Opponents" real, "Record" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- How many opponents' points numbers are associated with the...
SELECT COUNT("Opponents") FROM table_26938 WHERE "Opponent" = 'at Ole Miss'
wikisql
CREATE TABLE t_kc21_t_kc24 ( MED_CLINIC_ID text, MED_SAFE_PAY_ID number ) CREATE TABLE t_kc21 ( 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...
SELECT AVG(t_kc24.MED_AMOUT) FROM t_kc24 WHERE t_kc21_t_kc24.MED_CLINIC_ID IN (SELECT t_kc21.MED_CLINIC_ID FROM t_kc21 WHERE t_kc21.PERSON_AGE > 28)
css
CREATE TABLE table_10871 ( "Year" real, "Chassis" text, "Engine(s)" text, "Tyres" text, "Points" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the Tyres with a ford dfz v8 engine(s) with a chassis of coloni fc187?
SELECT "Tyres" FROM table_10871 WHERE "Engine(s)" = 'ford dfz v8' AND "Chassis" = 'coloni fc187'
wikisql
CREATE TABLE table_name_4 ( venue VARCHAR, date VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What venue listed is dated February 22, 2003?
SELECT venue FROM table_name_4 WHERE date = "february 22, 2003"
sql_create_context
CREATE TABLE Projects ( project_id INTEGER, organisation_id INTEGER, project_details VARCHAR(255) ) CREATE TABLE Document_Types ( document_type_code VARCHAR(10), document_description VARCHAR(255) ) CREATE TABLE Project_Staff ( staff_id DOUBLE, project_id INTEGER, role_code VARCHAR(10),...
SELECT outcome_description, COUNT(outcome_description) FROM Research_Outcomes AS T1 JOIN Project_Outcomes AS T2 ON T1.outcome_code = T2.outcome_code GROUP BY outcome_description ORDER BY COUNT(outcome_description)
nvbench
CREATE TABLE table_12450 ( "Player" text, "Pos." text, "Nationality" text, "Previous team" text, "Years of NBA experience [a ]" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which player was previously on the New York Knicks?
SELECT "Player" FROM table_12450 WHERE "Previous team" = 'new york knicks'
wikisql
CREATE TABLE table_26163 ( "Episode" text, "First broadcast" text, "Davids team" text, "Lees team" text, "Scores" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- How many shows did team David consist of vernon kay and dara briain
SELECT COUNT("Episode") FROM table_26163 WHERE "Davids team" = 'Vernon Kay and Dara Ó Briain'
wikisql
CREATE TABLE table_name_38 ( qual VARCHAR, year VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the Qual listed on the Year of 1954?
SELECT qual FROM table_name_38 WHERE year = "1954"
sql_create_context
CREATE TABLE table_38696 ( "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 the lowest overall of the wide receiver player from a round higher than 5 and ...
SELECT MIN("Overall") FROM table_38696 WHERE "Position" = 'wide receiver' AND "Round" < '5' AND "Pick #" > '7'
wikisql
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, ZYLBDM text, ZYMC text ) CREATE TABLE mzjzjlb ( YLJGDM text, JZLSH ...
(SELECT mzjzjlb.YLJGDM 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 = '窦嘉美') UNION (SELECT zyjzjlb.YLJGDM FROM person_info JOIN hz_info JOIN zyjzjlb ON person_info.RYBH = h...
css
CREATE TABLE classroom ( building varchar(15), room_number varchar(7), capacity numeric(4,0) ) CREATE TABLE teaches ( ID varchar(5), course_id varchar(8), sec_id varchar(8), semester varchar(6), year numeric(4,0) ) CREATE TABLE instructor ( ID varchar(5), name varchar(20), ...
SELECT year, COUNT(*) FROM section ORDER BY year
nvbench
CREATE TABLE table_19753079_35 ( first_elected VARCHAR, result VARCHAR, incumbent VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Name the first elected for re-elected and brian higgins
SELECT first_elected FROM table_19753079_35 WHERE result = "Re-elected" AND incumbent = "Brian Higgins"
sql_create_context
CREATE TABLE table_37358 ( "Date" text, "Site" text, "Sport" text, "Winning team" text, "Series" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What sport was played on February 25, 2011?
SELECT "Sport" FROM table_37358 WHERE "Date" = 'february 25, 2011'
wikisql
CREATE TABLE STUDENT ( STU_NUM int, STU_LNAME varchar(15), STU_FNAME varchar(15), STU_INIT varchar(1), STU_DOB datetime, STU_HRS int, STU_CLASS varchar(2), STU_GPA float(8), STU_TRANSFER numeric, DEPT_CODE varchar(18), STU_PHONE varchar(4), PROF_NUM int ) CREATE TABLE EM...
SELECT DEPT_CODE, SUM(CRS_CREDIT) FROM COURSE GROUP BY DEPT_CODE
nvbench
CREATE TABLE ReviewTaskTypes ( Id number, Name text, Description text ) CREATE TABLE ReviewRejectionReasons ( Id number, Name text, Description text, PostTypeId number ) CREATE TABLE ReviewTaskStates ( Id number, Name text, Description text ) CREATE TABLE TagSynonyms ( Id ...
SELECT p.Id AS "post_link" FROM Posts AS p WHERE p.Body LIKE '% %'
sede
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.Name, T2.Revenue FROM Products AS T1 JOIN Manufacturers AS T2 ON T1.Manufacturer = T2.Code GROUP BY T1.Name ORDER BY T2.Revenue
nvbench
CREATE TABLE city ( city_code varchar, city_name varchar, state_code varchar, country_name varchar, time_zone_code varchar ) CREATE TABLE aircraft ( aircraft_code varchar, aircraft_description varchar, manufacturer varchar, basic_type varchar, engines int, propulsion varchar...
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, fare, flight, flight_fare WHERE (CITY_0.city_code = AIRPORT_SERVICE_0.city_code AND CITY_0.city_name = 'BOSTON' AND CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1....
atis
CREATE TABLE table_name_4 ( round VARCHAR, pick VARCHAR, nfl_club VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What round has a pick less than 189, with arizona cardinals as the NFL club?
SELECT round FROM table_name_4 WHERE pick < 189 AND nfl_club = "arizona cardinals"
sql_create_context
CREATE TABLE PostTags ( PostId number, TagId number ) CREATE TABLE PostTypes ( Id number, Name text ) CREATE TABLE Tags ( Id number, TagName text, Count number, ExcerptPostId number, WikiPostId number ) CREATE TABLE PendingFlags ( Id number, FlagTypeId number, PostId n...
SELECT YEAR(a.CreationDate) AS "year", MONTH(a.CreationDate) AS "month", COUNT(*) AS "number_of_answers", (SELECT COUNT(*) AS "number_of_answers" FROM Posts AS aa JOIN Posts AS qq ON aa.ParentId = qq.Id INNER JOIN Users ON Users.Id = aa.OwnerUserId WHERE (aa.PostTypeId = 2 AND qq.AcceptedAnswerId = aa.Id) AND MONTH(aa....
sede
CREATE TABLE table_37312 ( "Year" real, "Class" text, "Team" text, "Points" real, "Wins" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the Wins before 1960 with less than 2 Points?
SELECT SUM("Wins") FROM table_37312 WHERE "Year" < '1960' AND "Points" < '2'
wikisql
CREATE TABLE table_50356 ( "Team" text, "Head Coach" text, "Team Captain" text, "Kitmaker" text, "Shirt sponsor" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Who is the kitmaker for the team whose team captain is Robert Enke?
SELECT "Kitmaker" FROM table_50356 WHERE "Team Captain" = 'robert enke'
wikisql
CREATE TABLE table_name_55 ( name VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the 2012 club for the Billy Miller Category:Articles with hcards (Name)?
SELECT 2012 AS _club FROM table_name_55 WHERE name = "billy miller category:articles with hcards"
sql_create_context
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 * FROM person_info JOIN hz_info JOIN txmzjzjlb ON person_info.RYBH = hz_info.RYBH AND hz_info.YLJGDM = txmzjzjlb.YLJGDM AND hz_info.KH = txmzjzjlb.KH AND hz_info.KLX = txmzjzjlb.KLX WHERE person_info.XM = '曹安卉' AND hz_info.YLJGDM = '4269180' AND txmzjzjlb.JZZDSM LIKE '%人格障碍%' UNION SELECT * FROM person_info JOIN...
css
CREATE TABLE table_15869204_8 ( high_points VARCHAR, game VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Who was the high point scorer in game number 68?
SELECT high_points FROM table_15869204_8 WHERE game = 68
sql_create_context
CREATE TABLE table_name_18 ( result___category VARCHAR, year INTEGER ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which result is older than 2007?
SELECT result___category FROM table_name_18 WHERE year < 2007
sql_create_context
CREATE TABLE table_1886270_1 ( cr_no INTEGER ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the lowest cr number?
SELECT MIN(cr_no) FROM table_1886270_1
sql_create_context
CREATE TABLE table_1342249_35 ( incumbent VARCHAR, district VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the incumbent for ohio 12?
SELECT incumbent FROM table_1342249_35 WHERE district = "Ohio 12"
sql_create_context
CREATE TABLE table_name_24 ( season VARCHAR, round VARCHAR, home_result VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Round of 2r, and a Home result of 0-0 has what season?
SELECT season FROM table_name_24 WHERE round = "2r" AND home_result = "0-0"
sql_create_context
CREATE TABLE table_13416000_3 ( first_driver_s_ VARCHAR, country VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- How many entries are there for first driver for Canada?
SELECT COUNT(first_driver_s_) FROM table_13416000_3 WHERE country = "Canada"
sql_create_context
CREATE TABLE table_36794 ( "Body" text, "Equatorial diameter" text, "Polar diameter" text, "Equatorial bulge" text, "Flattening ratio" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the Equatorial diameter of the Body: ceres?
SELECT "Equatorial diameter" FROM table_36794 WHERE "Body" = 'ceres'
wikisql
CREATE TABLE t_kc21_t_kc24 ( MED_CLINIC_ID text, MED_SAFE_PAY_ID number ) CREATE TABLE t_kc21 ( 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...
SELECT t_kc21.OUT_DIAG_DIS_CD, t_kc21.OUT_DIAG_DIS_NM FROM t_kc21 WHERE t_kc21.PERSON_NM = '陶晴画' AND t_kc21.MED_CLINIC_ID IN (SELECT t_kc21_t_kc24.MED_CLINIC_ID FROM t_kc24 WHERE t_kc24.MED_AMOUT >= 769.78)
css
CREATE TABLE table_64586 ( "Tournament" text, "2000" text, "1999" text, "1998" text, "1997" text, "1996" text, "1995" text, "1994" text, "1993" text, "1992" text, "1991" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is ...
SELECT "1991" FROM table_64586 WHERE "1997" = '18'
wikisql
CREATE TABLE table_name_69 ( rectifier VARCHAR, det_pre_amp VARCHAR, _number_tubes VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Name the rectifier for Det/Pre-amp of x and # tubes of 4
SELECT rectifier FROM table_name_69 WHERE det_pre_amp = "x" AND _number_tubes = "4"
sql_create_context
CREATE TABLE schedule ( Cinema_ID int, Film_ID int, Date text, Show_times_per_day int, Price float ) CREATE TABLE film ( Film_ID int, Rank_in_series int, Number_in_season int, Title text, Directed_by text, Original_air_date text, Production_code text ) CREATE TABLE cine...
SELECT Date, COUNT(Date) FROM schedule AS T1 JOIN film AS T2 ON T1.Film_ID = T2.Film_ID JOIN cinema AS T3 ON T1.Cinema_ID = T3.Cinema_ID GROUP BY Date ORDER BY Date DESC
nvbench
CREATE TABLE table_name_77 ( engine_type VARCHAR, numbers VARCHAR, length VARCHAR, year VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- If length is ft (m) with numbers of 6600-6684 (84 buses) for 2003, what is the engine type?
SELECT engine_type FROM table_name_77 WHERE length = "ft (m)" AND year = "2003" AND numbers = "6600-6684 (84 buses)"
sql_create_context
CREATE TABLE lab ( subject_id text, hadm_id text, itemid text, charttime text, flag text, value_unit text, label text, fluid text ) CREATE TABLE demographic ( subject_id text, hadm_id text, name text, marital_status text, age text, dob text, gender text, ...
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE diagnoses.short_title = "Acute nephritis NEC" AND prescriptions.route = "PO"
mimicsql_data
CREATE TABLE table_12417 ( "Shooter" text, "Event" text, "Rank points" text, "Score points" text, "Total" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What was the shooter when the rank points was olympic bronze medalist?
SELECT "Shooter" FROM table_12417 WHERE "Rank points" = 'olympic bronze medalist'
wikisql
CREATE TABLE table_53768 ( "Date" text, "Venue" text, "Score" text, "Result" text, "Competition" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- what is the result for 11 august 2010?
SELECT "Result" FROM table_53768 WHERE "Date" = '11 august 2010'
wikisql
CREATE TABLE d_icd_diagnoses ( row_id number, icd9_code text, short_title text, long_title text ) CREATE TABLE chartevents ( row_id number, subject_id number, hadm_id number, icustay_id number, itemid number, charttime time, valuenum number, valueuom text ) CREATE TABLE...
SELECT admissions.admission_type FROM admissions WHERE admissions.subject_id = 51577 AND STRFTIME('%y', admissions.admittime) <= '2104' ORDER BY admissions.admittime LIMIT 1
mimic_iii
CREATE TABLE table_17538 ( "Country" text, "Currency" text, "1 Euro =" text, "1 USD =" text, "Central bank" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What's the value of 1 USD in Paraguay?
SELECT "1 USD =" FROM table_17538 WHERE "Country" = 'Paraguay'
wikisql
CREATE TABLE table_10009 ( "Team" text, "Driver" text, "Class" text, "Chassis" text, "Engine" text, "Rounds" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- what is the team when the rounds is all engine is mercedes hwa and driver is sam abay?
SELECT "Team" FROM table_10009 WHERE "Rounds" = 'all' AND "Engine" = 'mercedes hwa' AND "Driver" = 'sam abay'
wikisql
CREATE TABLE table_66407 ( "Title" text, "Series" text, "Director" text, "Production Number" real, "Release date" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What director had a production number of 1490?
SELECT "Director" FROM table_66407 WHERE "Production Number" = '1490'
wikisql
CREATE TABLE table_203_345 ( id number, "name" text, "party" text, "took office" number, "left office" number ) -- Using valid SQLite, answer the following questions for the tables provided above. -- how long was arthur berry in officer for ?
SELECT "left office" - "took office" FROM table_203_345 WHERE "name" = 'arthur berry'
squall
CREATE TABLE trip ( id INTEGER, duration INTEGER, start_date TEXT, start_station_name TEXT, start_station_id INTEGER, end_date TEXT, end_station_name TEXT, end_station_id INTEGER, bike_id INTEGER, subscription_type TEXT, zip_code INTEGER ) CREATE TABLE station ( id INTEG...
SELECT lat, MIN(T2.duration) FROM station AS T1 JOIN trip AS T2 ON T1.id = T2.end_station_id GROUP BY lat
nvbench
CREATE TABLE table_19744915_15 ( rank INTEGER ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the lowest rank?
SELECT MIN(rank) FROM table_19744915_15
sql_create_context
CREATE TABLE keyword ( keyword varchar, kid int ) CREATE TABLE domain ( did int, name varchar ) CREATE TABLE domain_keyword ( did int, kid int ) CREATE TABLE journal ( homepage varchar, jid int, name varchar ) CREATE TABLE cite ( cited int, citing int ) CREATE TABLE doma...
SELECT publication.title FROM conference, publication WHERE conference.name = 'VLDB' AND publication.cid = conference.cid AND publication.year > 2000
academic
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 COUNT(*) FROM (SELECT zyjybgb.KSBM FROM mzjzjlb JOIN zyjybgb ON mzjzjlb.YLJGDM = zyjybgb.YLJGDM_MZJZJLB AND mzjzjlb.JZLSH = zyjybgb.JZLSH_MZJZJLB WHERE mzjzjlb.YLJGDM = '9223333' AND zyjybgb.BGRQ BETWEEN '2010-12-18' AND '2020-10-25' GROUP BY zyjybgb.KSBM HAVING COUNT(*) >= 13 UNION SELECT mzjybgb.KSBM FROM mzjz...
css
CREATE TABLE table_64907 ( "School" text, "City" text, "Team Name" text, "County" text, "Year Joined" text, "Year Left" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which school are the Red Devils from?
SELECT "School" FROM table_64907 WHERE "Team Name" = 'red devils'
wikisql
CREATE TABLE table_51627 ( "Year" real, "Date" text, "Type" text, "EU Council presidency" text, "President-in-Office" text, "Host city" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the type for EU Council Presidency of UK and John Majo...
SELECT "Type" FROM table_51627 WHERE "EU Council presidency" = 'uk' AND "President-in-Office" = 'john major'
wikisql
CREATE TABLE table_204_567 ( id number, "team" text, "location" text, "stadium" text, "capacity" number, "manager" text, "captain" text, "kit manufacturer" text, "shirt sponsor" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- what sta...
SELECT "stadium" FROM table_204_567 ORDER BY "capacity" LIMIT 1
squall
CREATE TABLE table_1266602_2 ( team VARCHAR, crew_chief VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which teams used Wally Rogers as their crew chief?
SELECT team FROM table_1266602_2 WHERE crew_chief = "Wally Rogers"
sql_create_context
CREATE TABLE person_info ( CSD text, CSRQ time, GJDM text, GJMC text, JGDM text, JGMC text, MZDM text, MZMC text, RYBH text, XBDM number, XBMC text, XLDM text, XLMC text, XM text, ZYLBDM text, ZYMC text ) CREATE TABLE hz_info ( KH text, KLX number...
SELECT * FROM hz_info JOIN mzjzjlb JOIN jybgb JOIN jyjgzbb JOIN mzjzjlb_jybgb ON hz_info.YLJGDM = mzjzjlb.YLJGDM AND hz_info.KH = mzjzjlb.KH AND hz_info.KLX = mzjzjlb.KLX AND mzjzjlb.YLJGDM = mzjzjlb_jybgb.YLJGDM_MZJZJLB AND mzjzjlb.JZLSH = jybgb.JZLSH_MZJZJLB AND jybgb.YLJGDM = jyjgzbb.YLJGDM AND jybgb.BGDH = jyjgzbb....
css
CREATE TABLE table_65822 ( "Part Number" text, "Pins" text, "Body Width/mm" real, "Body Length/mm" real, "Lead Pitch/mm" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which Lead Pitch/mm has a Part Number of tsop40, and a Body Length/mm larger than...
SELECT MAX("Lead Pitch/mm") FROM table_65822 WHERE "Part Number" = 'tsop40' AND "Body Length/mm" > '18.4'
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 procedures ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) ...
SELECT demographic.discharge_location, demographic.dischtime FROM demographic WHERE demographic.subject_id = "22999"
mimicsql_data
CREATE TABLE table_34067 ( "Date" text, "Tournament" text, "Winning score" text, "Margin of victory" text, "Runner(s)-up" text ) -- 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_34067 WHERE "Date" = '7 jun 1976'
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 ACC_Percent, All_Games_Percent FROM basketball_match GROUP BY ACC_Regular_Season
nvbench
CREATE TABLE state ( state_code text, state_name text, country_name text ) CREATE TABLE airport_service ( city_code varchar, airport_code varchar, miles_distant int, direction varchar, minutes_distant int ) CREATE TABLE ground_service ( city_code text, airport_code text, tr...
SELECT DISTINCT city.city_code FROM airport_service, city, flight WHERE city.city_code = airport_service.city_code AND flight.airline_code = 'CP' AND flight.from_airport = airport_service.airport_code
atis
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 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 table_78706 ( "Tournament" text, "1992" text, "1993" text, "1994" text, "1995" text, "1996" text, "1997" text, "1998" text, "1999" text, "2000" text, "2001" text, "2002" text, "2003" text, "2004" text, "2005" text ) -- Using valid SQLite, answer...
SELECT "1992" FROM table_78706 WHERE "1999" = 'year-end championship'
wikisql
CREATE TABLE zyjzjlb ( CYBQDM text, CYBQMC text, CYCWH text, CYKSDM text, CYKSMC text, CYSJ time, CYZTDM number, HZXM text, JZKSDM text, JZKSMC text, JZLSH text, KH text, KLX number, MZBMLX number, MZJZLSH text, MZZDBM text, MZZDMC text, MZZYZDZZBM...
SELECT * FROM person_info JOIN hz_info JOIN wdmzjzjlb JOIN jybgb JOIN jyjgzbb ON person_info.RYBH = hz_info.RYBH AND hz_info.YLJGDM = wdmzjzjlb.YLJGDM AND hz_info.KH = wdmzjzjlb.KH AND hz_info.KLX = wdmzjzjlb.KLX AND wdmzjzjlb.YLJGDM = jybgb.YLJGDM_MZJZJLB AND wdmzjzjlb.JZLSH = jybgb.JZLSH_MZJZJLB AND jybgb.YLJGDM = jy...
css
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 prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE demographic.ethnicity = "BLACK/AFRICAN AMERICAN" AND prescriptions.drug_type = "MAIN"
mimicsql_data
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 ground_service.transport_type FROM airport, airport_service, city AS CITY_0, city AS CITY_1, ground_service WHERE airport.airport_code = airport_service.airport_code AND CITY_0.city_name = 'ATLANTA' AND CITY_1.city_code = airport_service.city_code AND CITY_1.city_name = 'ATLANTA' AND ground_service.airp...
atis
CREATE TABLE table_name_30 ( date VARCHAR, grand_prix VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What date is the Portuguese Grand Prix?
SELECT date FROM table_name_30 WHERE grand_prix = "portuguese grand prix"
sql_create_context
CREATE TABLE diagnosis ( diagnosisid number, patientunitstayid number, diagnosisname text, diagnosistime time, icd9code text ) CREATE TABLE medication ( medicationid number, patientunitstayid number, drugname text, dosage text, routeadmin text, drugstarttime time, drugst...
SELECT t1.drugstarttime FROM (SELECT patient.uniquepid, medication.drugstarttime FROM medication JOIN patient ON medication.patientunitstayid = patient.patientunitstayid WHERE medication.drugname = 'fentanyl' AND patient.uniquepid = '016-22566' AND STRFTIME('%y-%m', medication.drugstarttime) >= '2104-10') AS t1 JOIN (S...
eicu
CREATE TABLE table_17111812_1 ( winner VARCHAR, fifth VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- When dizzee rascal is 5th, who was the winner?
SELECT winner FROM table_17111812_1 WHERE fifth = "Dizzee Rascal"
sql_create_context