instruction
stringlengths
151
7.46k
output
stringlengths
2
4.44k
source
stringclasses
26 values
CREATE TABLE table_35856 ( "Season" real, "Overall" text, "Slalom" text, "Giant Slalom" text, "Super G" text, "Combined" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which combined score has an overall of 8?
SELECT "Combined" FROM table_35856 WHERE "Overall" = '8'
wikisql
CREATE TABLE player ( Player_ID int, name text, Position text, Club_ID int, Apps real, Tries real, Goals text, Points real ) CREATE TABLE club_rank ( Rank real, Club_ID int, Gold real, Silver real, Bronze real, Total real ) CREATE TABLE club ( Club_ID int, ...
SELECT Position, AVG(Points) FROM player GROUP BY Position ORDER BY Position
nvbench
CREATE TABLE departments ( DEPARTMENT_ID decimal(4,0), DEPARTMENT_NAME varchar(30), MANAGER_ID decimal(6,0), LOCATION_ID decimal(4,0) ) CREATE TABLE job_history ( EMPLOYEE_ID decimal(6,0), START_DATE date, END_DATE date, JOB_ID varchar(10), DEPARTMENT_ID decimal(4,0) ) CREATE TABLE...
SELECT JOB_ID, AVG(SALARY) FROM employees WHERE HIRE_DATE < '2002-06-21' GROUP BY JOB_ID ORDER BY AVG(SALARY) DESC
nvbench
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.expire_flag = "0" AND demographic.diagnosis = "FEMORAL ARTERY THROMBOSIS"
mimicsql_data
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 AVG(t_kc21.IN_HOSP_DAYS) FROM t_kc21 WHERE t_kc21.MED_SER_ORG_NO = '3554465' AND t_kc21.IN_HOSP_DATE BETWEEN '2008-07-28' AND '2019-05-22'
css
CREATE TABLE table_name_84 ( area_km_2 INTEGER, population VARCHAR, official_name VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the highest area for locations named Centreville having populations over 532?
SELECT MAX(area_km_2) FROM table_name_84 WHERE population > 532 AND official_name = "centreville"
sql_create_context
CREATE TABLE status ( station_id INTEGER, bikes_available INTEGER, docks_available INTEGER, time TEXT ) CREATE TABLE weather ( date TEXT, max_temperature_f INTEGER, mean_temperature_f INTEGER, min_temperature_f INTEGER, max_dew_point_f INTEGER, mean_dew_point_f INTEGER, min_...
SELECT date, COUNT(date) FROM weather WHERE min_dew_point_f < (SELECT MIN(min_dew_point_f) FROM weather WHERE zip_code = 94107) GROUP BY date ORDER BY date
nvbench
CREATE TABLE allergy ( allergyid number, patientunitstayid number, drugname text, allergyname text, allergytime time ) CREATE TABLE vitalperiodic ( vitalperiodicid number, patientunitstayid number, temperature number, sao2 number, heartrate number, respiration number, sy...
SELECT MIN(t1.c1) FROM (SELECT SUM(cost.cost) AS c1 FROM cost WHERE cost.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.patientunitstayid IN (SELECT lab.patientunitstayid FROM lab WHERE lab.labname = 'anion gap')) AND STRFTIME('%y', cost.chargetime) <= '2101' GROUP BY ...
eicu
CREATE TABLE table_204_711 ( id number, "dance" text, "best dancer(s)" text, "best score" number, "worst dancer(s)" text, "worst score" number ) -- Using valid SQLite, answer the following questions for the tables provided above. -- which is the last dance on the chart
SELECT "dance" FROM table_204_711 ORDER BY id DESC LIMIT 1
squall
CREATE TABLE person_info_hz_info ( RYBH text, KH number, KLX number, YLJGDM number ) 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 t...
SELECT * FROM person_info JOIN hz_info JOIN zyjzjlb JOIN person_info_hz_info ON person_info.RYBH = person_info_hz_info.RYBH AND hz_info.YLJGDM = zyjzjlb.YLJGDM AND hz_info.KH = zyjzjlb.KH AND hz_info.KLX = zyjzjlb.KLX AND person_info_hz_info.KH = hz_info.KH AND person_info_hz_info.KLX = hz_info.KLX AND person_info_hz_i...
css
CREATE TABLE table_57035 ( "Date" text, "Tournament" text, "Location" text, "Purse( $ )" real, "Winner" text, "Score" text, "1st Prize( $ )" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the winner for Virginia?
SELECT "Winner" FROM table_57035 WHERE "Location" = 'virginia'
wikisql
CREATE TABLE table_6148 ( "Year" real, "Finish position" text, "1st day" text, "2nd day" text, "3rd day" text, "4th Day" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the 3rd day that has bumped by clare as the 4th day?
SELECT "3rd day" FROM table_6148 WHERE "4th Day" = 'bumped by clare'
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 lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.dob_year < "2056" AND lab.fluid = "Pleural"
mimicsql_data
CREATE TABLE device ( Software_Platform VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Please show different software platforms and the corresponding number of devices using each.
SELECT Software_Platform, COUNT(*) FROM device GROUP BY Software_Platform
sql_create_context
CREATE TABLE table_name_62 ( a330 VARCHAR, a310 VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the A330 and the A310 wide?
SELECT a330 FROM table_name_62 WHERE a310 = "wide"
sql_create_context
CREATE TABLE table_11504 ( "Rank" real, "Player" text, "Country" text, "Earnings ( $ )" real, "Events" real, "Wins" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the average events that Al Geiberger played with wins smaller than 1?
SELECT AVG("Events") FROM table_11504 WHERE "Player" = 'al geiberger' AND "Wins" < '1'
wikisql
CREATE TABLE table_name_95 ( founded INTEGER, joined_prsl VARCHAR, home_city VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- When is the club founded that founed prsl in 2008 and the home city is carolina 1?
SELECT MAX(founded) FROM table_name_95 WHERE joined_prsl = 2008 AND home_city = "carolina 1"
sql_create_context
CREATE TABLE customers_cards ( card_id number, customer_id number, card_type_code text, card_number text, date_valid_from time, date_valid_to time, other_card_details text ) CREATE TABLE customers ( customer_id number, customer_first_name text, customer_last_name text, custo...
SELECT COUNT(*) FROM customers_cards AS T1 JOIN customers AS T2 ON T1.customer_id = T2.customer_id WHERE T2.customer_first_name = "Art" AND T2.customer_last_name = "Turcotte"
spider
CREATE TABLE table_name_98 ( event VARCHAR, method VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What event did Mikhail Avetisyan win by method of DQ (eye gouging)?
SELECT event FROM table_name_98 WHERE method = "dq (eye gouging)"
sql_create_context
CREATE TABLE table_28019988_5 ( series__number INTEGER, production_code VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What episode number in the series had a production code of bdf405?
SELECT MIN(series__number) FROM table_28019988_5 WHERE production_code = "BDF405"
sql_create_context
CREATE TABLE company ( Company_ID real, Name text, Headquarters text, Industry text, Sales_in_Billion real, Profits_in_Billion real, Assets_in_Billion real, Market_Value_in_Billion real ) CREATE TABLE employment ( Company_ID int, People_ID int, Year_working int ) CREATE TAB...
SELECT Headquarters, COUNT(Headquarters) FROM company GROUP BY Headquarters ORDER BY COUNT(Headquarters)
nvbench
CREATE TABLE student ( student_id int, lastname varchar, firstname varchar, program_id int, declare_major varchar, total_credit int, total_gpa float, entered_as varchar, admit_term int, predicted_graduation_semester int, degree varchar, minor varchar, internship varch...
SELECT COUNT(*) = 0 FROM course INNER JOIN course_offering ON course.course_id = course_offering.course_id INNER JOIN offering_instructor ON offering_instructor.offering_id = course_offering.offering_id INNER JOIN instructor ON offering_instructor.instructor_id = instructor.instructor_id WHERE course.department = 'PROS...
advising
CREATE TABLE instructor ( instructor_id int, name varchar, uniqname varchar ) CREATE TABLE course_tags_count ( course_id int, clear_grading int, pop_quiz int, group_projects int, inspirational int, long_lectures int, extra_credit int, few_tests int, good_feedback int, ...
SELECT DISTINCT course.department, course.name, course.number, program_course.workload, program_course.workload FROM course, program_course WHERE program_course.category LIKE '%MDE%' AND program_course.course_id = course.course_id AND program_course.workload = (SELECT MIN(PROGRAM_COURSEalias1.workload) FROM program_cou...
advising
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.CKZFWXX, jyjgzbb.CKZFWSX FROM mzjzjlb JOIN jybgb JOIN jyjgzbb ON mzjzjlb.YLJGDM = jybgb.YLJGDM_MZJZJLB AND mzjzjlb.JZLSH = jybgb.JZLSH_MZJZJLB AND jybgb.YLJGDM = jyjgzbb.YLJGDM AND jybgb.BGDH = jyjgzbb.BGDH WHERE mzjzjlb.JZZDSM = '慢性咽炎' AND jyjgzbb.JCZBDM = '487632'
css
CREATE TABLE hz_info ( KH text, KLX number, RYBH text, YLJGDM text, person_info_CSD text, person_info_CSRQ time, person_info_GJDM text, person_info_GJMC text, person_info_JGDM text, person_info_JGMC text, person_info_MZDM text, person_info_MZMC text, person_info_XBDM ...
SELECT jyjgzbb.JCZBJGDL, jyjgzbb.JCZBJGDW FROM hz_info JOIN mzjzjlb JOIN jybgb JOIN jyjgzbb ON hz_info.YLJGDM = mzjzjlb.YLJGDM AND hz_info.KH = mzjzjlb.KH AND hz_info.KLX = mzjzjlb.KLX AND mzjzjlb.YLJGDM = jybgb.YLJGDM_MZJZJLB AND mzjzjlb.JZLSH = jybgb.JZLSH_MZJZJLB AND jybgb.YLJGDM = jyjgzbb.YLJGDM AND jybgb.BGDH = jy...
css
CREATE TABLE table_name_19 ( venue VARCHAR, host VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the venue at Stanford University?
SELECT venue FROM table_name_19 WHERE host = "stanford university"
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 t_kc21.IN_DIAG_DIS_CD, t_kc21.IN_DIAG_DIS_NM FROM t_kc21 WHERE t_kc21.PERSON_ID = '37329044' AND t_kc21.MED_CLINIC_ID IN (SELECT t_kc21_t_kc24.MED_CLINIC_ID FROM t_kc24 WHERE t_kc24.MED_AMOUT >= 6376.37)
css
CREATE TABLE table_name_45 ( byes INTEGER, wins VARCHAR, against VARCHAR, club VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which Byes has an Against smaller than 1297, and a Club of avoca, and Wins larger than 12?
SELECT AVG(byes) FROM table_name_45 WHERE against < 1297 AND club = "avoca" AND wins > 12
sql_create_context
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 Team_ID, All_Games_Percent FROM basketball_match GROUP BY All_Road
nvbench
CREATE TABLE table_74617 ( "Home team" text, "Home team score" text, "Away team" text, "Away team score" text, "Venue" text, "Crowd" real, "Date" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- When was the game where the away team had a scor...
SELECT "Date" FROM table_74617 WHERE "Away team score" = '13.8 (86)'
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 lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.admityear < "2129" AND lab.label = "Lymphocytes, Percent"
mimicsql_data
CREATE TABLE table_2289 ( "Type" text, "Beam height (mm)" real, "Flange width (mm)" real, "Web thickness (mm)" text, "Flange thickness (mm)" text, "Weight (kg/m)" text, "Cross-section area (cm 2 )" text, "Moment of inertia in torsion (J) (cm 4 )" text ) -- Using valid SQLite, answer th...
SELECT "Flange thickness (mm)" FROM table_2289 WHERE "Weight (kg/m)" = '19.9'
wikisql
CREATE TABLE regions ( REGION_ID decimal(5,0), REGION_NAME varchar(25) ) 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,...
SELECT JOB_ID, SUM(SALARY) FROM employees WHERE HIRE_DATE < '2002-06-21' GROUP BY JOB_ID
nvbench
CREATE TABLE PostHistoryTypes ( Id number, Name text ) CREATE TABLE Badges ( Id number, UserId number, Name text, Date time, Class number, TagBased boolean ) CREATE TABLE ReviewTasks ( Id number, ReviewTaskTypeId number, CreationDate time, DeletionDate time, ReviewT...
WITH cw_cte AS (SELECT ph.Id AS cwid, ph.PostId AS pid FROM PostHistory AS ph INNER JOIN Posts AS p ON ph.PostId = p.Id WHERE (ph.PostHistoryTypeId = 16)) SELECT COUNT(DISTINCT RevisionGUID), ph.PostId AS "post_link", revisions = 'site://posts/' + CAST(ph.PostId AS TEXT) + '/revisions' FROM cw_cte AS c INNER JOIN PostH...
sede
CREATE TABLE table_22496344_1 ( weight INTEGER, _number VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the weight when 20 is the number?
SELECT MAX(weight) FROM table_22496344_1 WHERE _number = 20
sql_create_context
CREATE TABLE t_kc21_t_kc22 ( MED_CLINIC_ID text, MED_EXP_DET_ID number ) CREATE TABLE t_kc24 ( ACCOUNT_DASH_DATE time, ACCOUNT_DASH_FLG number, CASH_PAY number, CIVIL_SUBSIDY number, CKC102 number, CLINIC_ID text, CLINIC_SLT_DATE time, COMP_ID text, COM_ACC_PAY number, C...
SELECT t_kc22.SOC_SRT_DIRE_CD, t_kc22.SOC_SRT_DIRE_NM, t_kc22.AMOUNT 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.MED_CLINIC_ID = '14145059782' AND t_kc22.SOC_SRT_DIRE_NM LIKE '%蜜炼%'
css
CREATE TABLE table_name_67 ( Id VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the 2007 value with 2r in 2011 and 2r in 2008?
SELECT 2007 FROM table_name_67 WHERE 2011 = "2r" AND 2008 = "2r"
sql_create_context
CREATE TABLE table_203_631 ( id number, "year" number, "name of show" text, "episodes" text, "other guests" text, "winner(s)" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- how many of shows had at least 5 episodes ?
SELECT COUNT(DISTINCT "name of show") FROM table_203_631 WHERE "episodes" >= 5
squall
CREATE TABLE table_name_29 ( time VARCHAR, song_title VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the time from the song called Treat Me Nice?
SELECT time FROM table_name_29 WHERE song_title = "treat me nice"
sql_create_context
CREATE TABLE table_11161 ( "Date" text, "Venue" text, "Result" text, "Win/ Loss/ Draw" text, "Competition" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which competition had a result of 1-0?
SELECT "Competition" FROM table_11161 WHERE "Result" = '1-0'
wikisql
CREATE TABLE d_icd_procedures ( row_id number, icd9_code text, short_title text, long_title text ) CREATE TABLE diagnoses_icd ( row_id number, subject_id number, hadm_id number, icd9_code text, charttime time ) CREATE TABLE admissions ( row_id number, subject_id number, ...
SELECT AVG(t1.c1) FROM (SELECT SUM(cost.cost) AS c1 FROM cost WHERE cost.hadm_id IN (SELECT procedures_icd.hadm_id FROM procedures_icd WHERE procedures_icd.icd9_code = (SELECT d_icd_procedures.icd9_code FROM d_icd_procedures WHERE d_icd_procedures.short_title = 'nonop cardiac/vasc exam')) AND DATETIME(cost.chargetime, ...
mimic_iii
CREATE TABLE SuggestedEdits ( Id number, PostId number, CreationDate time, ApprovalDate time, RejectionDate time, OwnerUserId number, Comment text, Text text, Title text, Tags text, RevisionGUID other ) CREATE TABLE Votes ( Id number, PostId number, VoteTypeId nu...
SELECT Score, Id AS "post_link" FROM Posts WHERE Body LIKE '%apt-get install%' AND NOT Body LIKE '%add-apt-repository%' AND NOT Body LIKE '%apps.ubuntu.com%' AND PostTypeId = 2 AND ClosedDate IS NULL ORDER BY Score DESC
sede
CREATE TABLE table_name_41 ( year INTEGER, mixed_doubles VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the average year with alfredo salazar fina salazar in mixed doubles?
SELECT AVG(year) FROM table_name_41 WHERE mixed_doubles = "alfredo salazar fina salazar"
sql_create_context
CREATE TABLE procedures ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) CREATE TABLE demographic ( subject_id text, hadm_id text, name text, marital_status text, age text, dob text, gender text, language text, religion text, ...
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.expire_flag = "0" AND procedures.long_title = "Insertion of non-drug-eluting coronary artery stent(s)"
mimicsql_data
CREATE TABLE staff ( gender VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which gender makes up the majority of the staff?
SELECT gender FROM staff GROUP BY gender ORDER BY COUNT(*) DESC LIMIT 1
sql_create_context
CREATE TABLE table_16855 ( "Player" text, "No." real, "Nationality" text, "Position" text, "Years for Jazz" text, "School/Club Team" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What position did the player from maynard evans hs play
SELECT "Position" FROM table_16855 WHERE "School/Club Team" = 'Maynard Evans HS'
wikisql
CREATE TABLE table_10596 ( "Location" text, "Venue" text, "Promotion" text, "Event" text, "Inductee(s)" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the location when the event was November reign?
SELECT "Location" FROM table_10596 WHERE "Event" = 'november reign'
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 COUNT(*) FROM t_kc21 WHERE MED_SER_ORG_NO = '8895083' AND IN_HOSP_DATE BETWEEN '2008-12-06' AND '2011-03-11' AND CLINIC_TYPE = '住院'
css
CREATE TABLE table_13723 ( "Week" real, "Date" text, "Opponent" text, "Result" text, "Attendance" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What's the week when the result was W 38-24 and attendance was less than 43,449?
SELECT SUM("Week") FROM table_13723 WHERE "Result" = 'w 38-24' AND "Attendance" < '43,449'
wikisql
CREATE TABLE body_builder ( Body_Builder_ID int, People_ID int, Snatch real, Clean_Jerk real, Total real ) CREATE TABLE people ( People_ID int, Name text, Height real, Weight real, Birth_Date text, Birth_Place text ) -- Using valid SQLite, answer the following questions fo...
SELECT Body_Builder_ID, Total FROM body_builder
nvbench
CREATE TABLE table_name_89 ( top_10 INTEGER, cuts_made VARCHAR, events VARCHAR, top_5 VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the best top-10 result when events are fewer than 39, top-5 is 1 and more than 5 cuts are made?
SELECT MAX(top_10) FROM table_name_89 WHERE events < 39 AND top_5 = 1 AND cuts_made > 5
sql_create_context
CREATE TABLE table_41988 ( "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 date has 6 as the tie no.?
SELECT "Date" FROM table_41988 WHERE "Tie no" = '6'
wikisql
CREATE TABLE table_48597 ( "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 resolution of the fight when matt gric...
SELECT "Res." FROM table_48597 WHERE "Record" = '2-0'
wikisql
CREATE TABLE table_20422 ( "Episode Number" real, "Air Date" text, "Guest Host" text, "Musical Guest (Song performed)" text, "Who knows the most about the guest host? panelists" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Who was the musical gues...
SELECT "Musical Guest (Song performed)" FROM table_20422 WHERE "Who knows the most about the guest host? panelists" = 'Matt Willis and Chantelle Houghton'
wikisql
CREATE TABLE table_104 ( "Name of lava dome" text, "Country" text, "Volcanic area" text, "Composition" text, "Last eruption or growth episode" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the composition at Valles lava dome?
SELECT "Composition" FROM table_104 WHERE "Name of lava dome" = 'Valles lava dome'
wikisql
CREATE TABLE cost ( costid number, uniquepid text, patienthealthsystemstayid number, eventtype text, eventid number, chargetime time, cost number ) CREATE TABLE treatment ( treatmentid number, patientunitstayid number, treatmentname text, treatmenttime time ) CREATE TABLE i...
SELECT COUNT(DISTINCT t1.uniquepid) FROM (SELECT patient.uniquepid, COUNT(*) AS c1 FROM patient WHERE patient.patientunitstayid = (SELECT treatment.patientunitstayid FROM treatment WHERE treatment.treatmentname = 'antihypertensive drug' AND DATETIME(treatment.treatmenttime) >= DATETIME(CURRENT_TIME(), '-1 year')) GROUP...
eicu
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 * FROM hz_info JOIN wdmzjzjlb ON hz_info.YLJGDM = wdmzjzjlb.YLJGDM AND hz_info.KH = wdmzjzjlb.KH AND hz_info.KLX = wdmzjzjlb.KLX WHERE hz_info.RYBH = '48565412' AND hz_info.YLJGDM = '9606012' AND wdmzjzjlb.CYKSMC LIKE '%感染性%' UNION SELECT * FROM hz_info JOIN bdmzjzjlb ON hz_info.YLJGDM = bdmzjzjlb.YLJGDM AND hz_...
css
CREATE TABLE table_1939367_1 ( arabs_2011 VARCHAR, province VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- If the province is Nunavut, what is the Arabs 2011 amount?
SELECT arabs_2011 FROM table_1939367_1 WHERE province = "Nunavut"
sql_create_context
CREATE TABLE table_name_32 ( name VARCHAR, caps VARCHAR, rank VARCHAR, confederation VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which UEFA confederation member had a rank more than 17 and caps of 114?
SELECT name FROM table_name_32 WHERE rank > 17 AND confederation = "uefa" AND caps = 114
sql_create_context
CREATE TABLE table_74641 ( "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. -- Who was the away team playing the home team Nort...
SELECT "Away team" FROM table_74641 WHERE "Home team" = 'north melbourne'
wikisql
CREATE TABLE Votes ( Id number, PostId number, VoteTypeId number, UserId number, CreationDate time, BountyAmount number ) CREATE TABLE Users ( Id number, Reputation number, CreationDate time, DisplayName text, LastAccessDate time, WebsiteUrl text, Location text, ...
SELECT Posts.Id AS "post_link" FROM Posts, PostHistory WHERE Posts.Id = PostHistory.PostId AND PostHistoryTypeId = 35 LIMIT 50
sede
CREATE TABLE table_1434788_5 ( candidates VARCHAR, incumbent VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Who were the candidates in the election where John Beatty was the incumbent?
SELECT candidates FROM table_1434788_5 WHERE incumbent = "John Beatty"
sql_create_context
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 T1.Name, T1.Manufacturer FROM Products AS T1 JOIN Manufacturers AS T2 ON T1.Manufacturer = T2.Code GROUP BY T1.Name ORDER BY T1.Name
nvbench
CREATE TABLE PHOTOS ( Tourist_Attraction_ID VARCHAR, Name VARCHAR ) CREATE TABLE TOURIST_ATTRACTIONS ( Name VARCHAR, Tourist_Attraction_ID VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the name of the tourist attraction that is associated w...
SELECT T2.Name FROM PHOTOS AS T1 JOIN TOURIST_ATTRACTIONS AS T2 ON T1.Tourist_Attraction_ID = T2.Tourist_Attraction_ID WHERE T1.Name = "game1"
sql_create_context
CREATE TABLE PostNotices ( Id number, PostId number, PostNoticeTypeId number, CreationDate time, DeletionDate time, ExpiryDate time, Body text, OwnerUserId number, DeletionUserId number ) CREATE TABLE VoteTypes ( Id number, Name text ) CREATE TABLE Tags ( Id number, ...
SELECT c.PostId AS "post_link", YEAR(C.CreationDate) AS Year, MONTH(C.CreationDate) AS Month, c.Text AS Body FROM Comments AS C, Posts AS P WHERE (C.Text LIKE '%should be a comment%' AND LENGTH(c.Text) < 25 AND C.PostId = P.Id AND C.CreationDate < '2016-12-01T00:00:00.000' AND C.CreationDate > '2011-01-01T00:00:00.000'...
sede
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 OUT_HOSP_DATE FROM t_kc21 WHERE MED_CLINIC_ID = '57313257288'
css
CREATE TABLE table_71063 ( "Sydney" text, "Melbourne" text, "Perth" text, "Adelaide" text, "Gold Coast" text, "Auckland" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the result for Gold Coast when Adelaide and Perth are yes, but Auckla...
SELECT "Gold Coast" FROM table_71063 WHERE "Adelaide" = 'yes' AND "Auckland" = 'no' AND "Perth" = 'yes'
wikisql
CREATE TABLE table_name_83 ( license VARCHAR, system VARCHAR, name VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which License has a System of amiga, and a Name of pocketuae?
SELECT license FROM table_name_83 WHERE system = "amiga" AND name = "pocketuae"
sql_create_context
CREATE TABLE program_requirement ( program_id int, category varchar, min_credit int, additional_req varchar ) CREATE TABLE gsi ( course_offering_id int, student_id int ) CREATE TABLE course_tags_count ( course_id int, clear_grading int, pop_quiz int, group_projects int, ins...
SELECT DISTINCT course.department, course.name, course.number, semester.semester FROM course, course_offering, semester WHERE ((semester.semester = 'FA' AND semester.year = 2016) OR (semester.semester = 'WN' AND semester.year = 2017)) AND course.course_id = course_offering.course_id AND course.department = 'department0...
advising
CREATE TABLE jybgb ( BBCJBW text, BBDM text, BBMC text, BBZT number, BGDH text, BGJGDM text, BGJGMC text, BGRGH text, BGRQ time, BGRXM text, BGSJ time, CJRQ time, JSBBRQSJ time, JSBBSJ time, JYBBH text, JYJGMC text, JYJSGH text, JYJSQM text, JY...
SELECT COUNT(*) FROM zzmzjzjlb WHERE zzmzjzjlb.YLJGDM = '3982250' AND zzmzjzjlb.JZKSRQ BETWEEN '2005-02-09' AND '2017-11-19' AND zzmzjzjlb.WDBZ > 0 UNION SELECT COUNT(*) FROM fzzmzjzjlb WHERE fzzmzjzjlb.YLJGDM = '3982250' AND fzzmzjzjlb.JZKSRQ BETWEEN '2005-02-09' AND '2017-11-19' AND fzzmzjzjlb.WDBZ > 0
css
CREATE TABLE table_name_24 ( package_option VARCHAR, country VARCHAR, language VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the package/option for Italy when the language is italian?
SELECT package_option FROM table_name_24 WHERE country = "italy" AND language = "italian"
sql_create_context
CREATE TABLE table_name_91 ( population INTEGER, town_status VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the highest population of a city that has a town status of 2010?
SELECT MAX(population) FROM table_name_91 WHERE town_status = "2010"
sql_create_context
CREATE TABLE table_76729 ( "Round" real, "Pick" real, "Overall" real, "Name" text, "Position" text, "College" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- How many Picks have an Overall smaller than 304, and a Position of g, and a Round smalle...
SELECT COUNT("Pick") FROM table_76729 WHERE "Overall" < '304' AND "Position" = 'g' AND "Round" < '11'
wikisql
CREATE TABLE table_78673 ( "Place" text, "Player" text, "Country" text, "Score" text, "To par" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What was Australia's score when Peter Lonard played?
SELECT "Score" FROM table_78673 WHERE "Country" = 'australia' AND "Player" = 'peter lonard'
wikisql
CREATE TABLE table_14342480_5 ( field_goals VARCHAR, position VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Na,e the number of field goals for right tackle
SELECT COUNT(field_goals) FROM table_14342480_5 WHERE position = "Right tackle"
sql_create_context
CREATE TABLE course_offering ( offering_id int, course_id int, semester int, section_number int, start_time time, end_time time, monday varchar, tuesday varchar, wednesday varchar, thursday varchar, friday varchar, saturday varchar, sunday varchar, has_final_proje...
SELECT COUNT(*) > 0 FROM course, course_offering, semester WHERE course.course_id = course_offering.course_id AND course.department = 'NRE' AND course.number = 336 AND semester.semester = 'Summer' AND semester.semester_id = course_offering.semester
advising
CREATE TABLE table_9856 ( "Rank" real, "Venue name" text, "Highest attendance" text, "Location" text, "Current seating capacity" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the highest Rank, when Location is Kinshasa, DR Congo, and when C...
SELECT MAX("Rank") FROM table_9856 WHERE "Location" = 'kinshasa, dr congo' AND "Current seating capacity" < '80,000'
wikisql
CREATE TABLE table_15187735_21 ( segment_c VARCHAR, series_ep VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What are the titles of segment c for series episode is 21-08?
SELECT segment_c FROM table_15187735_21 WHERE series_ep = "21-08"
sql_create_context
CREATE TABLE table_43549 ( "Official #" real, "TF1 #" real, "French title" text, "English title" text, "Air date (France)" text, "Original Beechwood Bunny Tale / Source material" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the Origina...
SELECT "Original Beechwood Bunny Tale / Source material" FROM table_43549 WHERE "Official #" > '38' AND "TF1 #" > '50' AND "English title" = 'sweet fabiola'
wikisql
CREATE TABLE table_30293 ( "Vessel" text, "Built" real, "Max Speed" text, "Length" text, "Breadth" text, "Flag" text, "Propulsion" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the max speed when the vessel is gallion?
SELECT "Max Speed" FROM table_30293 WHERE "Vessel" = 'Gallion'
wikisql
CREATE TABLE table_26387382_1 ( power__mw·hr_yr_ VARCHAR, location__county_ VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What locations are considered centre?
SELECT power__mw·hr_yr_ FROM table_26387382_1 WHERE location__county_ = "Centre"
sql_create_context
CREATE TABLE table_635 ( "W.H. Archer" text, "J.E. Armstrong" text, "H.L. Birkett" text, "F.A. Brill" text, "H.T. Brewer" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Who is J.E. Armstrong when W.H. Archer is D.M. Lawson?
SELECT "J.E. Armstrong" FROM table_635 WHERE "W.H. Archer" = 'D.M. Lawson'
wikisql
CREATE TABLE time_interval ( period text, begin_time int, end_time int ) CREATE TABLE code_description ( code varchar, description text ) CREATE TABLE fare_basis ( fare_basis_code text, booking_class text, class_type text, premium text, economy text, discounted text, ni...
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, state WHERE (CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'DETROIT' AND date_day.day_number = 21 AND date_day.month_number = ...
atis
CREATE TABLE table_17801022_1 ( manufacturer VARCHAR, date VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What manufacturer won the race on November 2?
SELECT manufacturer FROM table_17801022_1 WHERE date = "November 2"
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 prescriptions ( subject_id text, hadm_id text, icustay_id text, drug_type text, drug text, formulary_drug_cd text, ...
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.ethnicity = "UNKNOWN/NOT SPECIFIED" AND demographic.diagnosis = "COMPLETE HEART BLOCK"
mimicsql_data
CREATE TABLE table_10568 ( "Rank" real, "Nation" text, "Gold" real, "Silver" real, "Bronze" real, "Total" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- How many times was the total more than 1, the nation was east germany and silver was more th...
SELECT COUNT("Bronze") FROM table_10568 WHERE "Total" > '1' AND "Nation" = 'east germany' AND "Silver" > '1'
wikisql
CREATE TABLE table_name_53 ( attempts INTEGER, net_yards VARCHAR, touchdowns VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What are the highest attempts that have net yards less than 631, and 2 for the touchdowns?
SELECT MAX(attempts) FROM table_name_53 WHERE net_yards < 631 AND touchdowns = 2
sql_create_context
CREATE TABLE table_6170 ( "Year" real, "Total Convictions" real, "Homicide (Art. 111,112,113,116 StGB)" real, "Serious Bodily Injury (Art. 122 StGB)" real, "Minor Bodily Injury (Art. 123 StGB)" real, "Sexual Contact with Children (Art. 187 StGB)" real, "Rape (Art. 190 StGB)" real, "Theft...
SELECT AVG("Total Convictions") FROM table_6170 WHERE "Fraud (Art. 146 StGB)" = '1,521' AND "Year" < '2006'
wikisql
CREATE TABLE table_26996293_1 ( college VARCHAR, player VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What college did Jim Bennett attend?
SELECT college FROM table_26996293_1 WHERE player = "Jim Bennett"
sql_create_context
CREATE TABLE table_53665 ( "English" text, "Scots" text, "West Frisian" text, "Afrikaans" text, "Dutch" text, "Dutch ( Limburgish )" text, "Low German" text, "Low German ( Groningen )" text, "Middle German ( Luxemburgish )" text, "German" text, "Yiddish" text, "Gothic" te...
SELECT "Middle German ( Luxemburgish )" FROM table_53665 WHERE "English" = 'stone'
wikisql
CREATE TABLE status ( station_id INTEGER, bikes_available INTEGER, docks_available INTEGER, time TEXT ) CREATE TABLE station ( id INTEGER, name TEXT, lat NUMERIC, long NUMERIC, dock_count INTEGER, city TEXT, installation_date TEXT ) CREATE TABLE trip ( id INTEGER, d...
SELECT date, COUNT(date) FROM weather WHERE mean_sea_level_pressure_inches BETWEEN 30.3 AND 31 ORDER BY COUNT(date) DESC
nvbench
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 WHERE demographic.religion = "CHRISTIAN SCIENTIST"
mimicsql_data
CREATE TABLE table_6775 ( "Season" text, "Round" text, "Date" text, "Home" text, "Away" text, "Result" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What round had a home of FC augsburg with the result of 3-0?
SELECT "Round" FROM table_6775 WHERE "Home" = 'fc augsburg' AND "Result" = '3-0'
wikisql
CREATE TABLE routes ( rid integer, dst_apid integer, dst_ap varchar(4), src_apid bigint, src_ap varchar(4), alid bigint, airline varchar(4), codeshare text ) CREATE TABLE airlines ( alid integer, name text, iata varchar(2), icao varchar(3), callsign text, country...
SELECT country, COUNT(country) FROM airlines WHERE name LIKE 'Orbit%' GROUP BY country ORDER BY COUNT(country) DESC
nvbench
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_ORG_DEPT_CD, t_kc21.OUT_DIAG_DIS_CD, AVG(t_kc21.PERSON_AGE) FROM t_kc21 WHERE t_kc21.MED_SER_ORG_NO = '9593496' GROUP BY t_kc21.MED_ORG_DEPT_CD, t_kc21.OUT_DIAG_DIS_CD
css
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 AVG(intakeoutput.cellvaluenumeric) FROM intakeoutput WHERE intakeoutput.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '006-97726')) AND intakeoutput.celllabel = 'insul...
eicu
CREATE TABLE table_name_34 ( average VARCHAR, total_points VARCHAR, rank_by_average VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the total average with 54 total points and a rank less than 10?
SELECT COUNT(average) FROM table_name_34 WHERE total_points = 54 AND rank_by_average < 10
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 lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.admission_type = "URGENT" AND lab.fluid = "Joint Fluid"
mimicsql_data
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 wdmzjzjlb ( CYBQDM text, CYBQ...
SELECT * FROM hz_info JOIN mzjzjlb JOIN jybgb JOIN jyjgzbb ON hz_info.YLJGDM = mzjzjlb.YLJGDM AND hz_info.KH = mzjzjlb.KH AND hz_info.KLX = mzjzjlb.KLX AND mzjzjlb.YLJGDM = jybgb.YLJGDM_MZJZJLB AND mzjzjlb.JZLSH = jybgb.JZLSH_MZJZJLB AND jybgb.YLJGDM = jyjgzbb.YLJGDM AND jybgb.BGDH = jyjgzbb.BGDH WHERE hz_info.RYBH = '...
css
CREATE TABLE aircraft ( aid number(9,0), name varchar2(30), distance number(6,0) ) CREATE TABLE flight ( flno number(4,0), origin varchar2(20), destination varchar2(20), distance number(6,0), departure_date date, arrival_date date, price number(7,2), aid number(9,0) ) CREAT...
SELECT name, distance FROM aircraft ORDER BY name DESC
nvbench