instruction
stringlengths
151
7.46k
output
stringlengths
2
4.44k
source
stringclasses
26 values
CREATE TABLE table_26926 ( "Player" text, "Played" real, "Sets Won" real, "Sets Lost" real, "Legs Won" real, "Legs Lost" real, "LWAT" real, "100+" real, "140+" real, "180s" real, "High Checkout" real, "3-dart Average" text ) -- Using valid SQLite, answer the following q...
SELECT "Played" FROM table_26926 WHERE "Legs Won" = '25' AND "100+" = '35'
wikisql
CREATE TABLE Guests ( guest_id INTEGER, gender_code CHAR(1), guest_first_name VARCHAR(80), guest_last_name VARCHAR(80), date_of_birth DATETIME ) CREATE TABLE Apartment_Bookings ( apt_booking_id INTEGER, apt_id INTEGER, guest_id INTEGER, booking_status_code CHAR(15), booking_star...
SELECT date_of_birth, COUNT(date_of_birth) FROM Guests WHERE gender_code = "Male" ORDER BY COUNT(date_of_birth) DESC
nvbench
CREATE TABLE table_name_25 ( opponent VARCHAR, week VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Who was the opponent in the Week 4 game?
SELECT opponent FROM table_name_25 WHERE week = 4
sql_create_context
CREATE TABLE table_name_27 ( name VARCHAR, overall INTEGER ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Who is drafted overall less than 49?
SELECT name FROM table_name_27 WHERE overall < 49
sql_create_context
CREATE TABLE table_23576576_2 ( represented VARCHAR, hometown VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- If the hometown is Windhoek, what is the represented?
SELECT represented FROM table_23576576_2 WHERE hometown = "Windhoek"
sql_create_context
CREATE TABLE table_name_81 ( award VARCHAR, result VARCHAR, production VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which award was An Officer and a Gentleman nominated for?
SELECT award FROM table_name_81 WHERE result = "nominated" AND production = "an officer and a gentleman"
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 prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE prescriptions.formulary_drug_cd = "SENN187"
mimicsql_data
CREATE TABLE table_43826 ( "Game" real, "Date" text, "Team" text, "Score" text, "High points" text, "High rebounds" text, "Location Attendance" text, "Record" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the record when George ...
SELECT "Record" FROM table_43826 WHERE "High rebounds" = 'george hill (11)'
wikisql
CREATE TABLE table_23135 ( "Pick #" real, "Player" text, "Position" text, "Nationality" text, "NHL team" text, "College/junior/club team" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- When kitchener rangers (oha) is the college, junior, or club...
SELECT "Position" FROM table_23135 WHERE "College/junior/club team" = 'Kitchener Rangers (OHA)'
wikisql
CREATE TABLE PostsWithDeleted ( Id number, PostTypeId number, AcceptedAnswerId number, ParentId number, CreationDate time, DeletionDate time, Score number, ViewCount number, Body text, OwnerUserId number, OwnerDisplayName text, LastEditorUserId number, LastEditorDispl...
SELECT 'Score Rank' = ROW_NUMBER() OVER (ORDER BY ROUND((CAST('Total Score' AS FLOAT) / CAST('Total Answers' AS FLOAT)), 2) DESC), ROUND((CAST('Total Score' AS FLOAT) / CAST('Total Answers' AS FLOAT)), 2) AS "Score Per Answer", u.Id AS "user_link", 'Rep Rank' = ROW_NUMBER() OVER (ORDER BY u.Reputation DESC), u.Reputati...
sede
CREATE TABLE customer_orders ( customer_id VARCHAR, order_id VARCHAR ) CREATE TABLE customers ( customer_name VARCHAR ) CREATE TABLE products ( product_id VARCHAR, product_details VARCHAR ) CREATE TABLE order_items ( order_id VARCHAR, product_id VARCHAR ) -- Using valid SQLite, answer t...
SELECT customer_name FROM customers EXCEPT SELECT t1.customer_name FROM customers AS t1 JOIN customer_orders AS t2 ON t1.customer_id = t2.customer_id JOIN order_items AS t3 ON t2.order_id = t3.order_id JOIN products AS t4 ON t3.product_id = t4.product_id WHERE t4.product_details = 'Latte'
sql_create_context
CREATE TABLE diagnoses ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) CREATE TABLE demographic ( subject_id text, hadm_id text, name text, marital_status text, age text, dob text, gender text, language text, religion text, ...
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE diagnoses.short_title = "Acidosis" AND lab.fluid = "Urine"
mimicsql_data
CREATE TABLE microlab ( microlabid number, patientunitstayid number, culturesite text, organism text, culturetakentime time ) CREATE TABLE intakeoutput ( intakeoutputid number, patientunitstayid number, cellpath text, celllabel text, cellvaluenumeric number, intakeoutputtime...
SELECT t1.celllabel FROM (SELECT intakeoutput.celllabel, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM intakeoutput WHERE intakeoutput.cellpath LIKE '%intake%' AND DATETIME(intakeoutput.intakeoutputtime) >= DATETIME(CURRENT_TIME(), '-2 year') GROUP BY intakeoutput.celllabel) AS t1 WHERE t1.c1 <= 3
eicu
CREATE TABLE table_16099880_5 ( report VARCHAR, pole_position VARCHAR, fastest_lap VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the report for races where Will Power had both pole position and fastest lap?
SELECT report FROM table_16099880_5 WHERE pole_position = "Will Power" AND fastest_lap = "Will Power"
sql_create_context
CREATE TABLE table_name_78 ( venue VARCHAR, competition VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Where was the 2013 Eaff East Asian Cup Qualifier played?
SELECT venue FROM table_name_78 WHERE competition = "2013 eaff east asian cup qualifier"
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 AVG(jyjgzbb.JCZBJGDL), MIN(jyjgzbb.JCZBJGDL), MAX(jyjgzbb.JCZBJGDL) FROM mzjzjlb JOIN jybgb JOIN jyjgzbb JOIN jybgb_jyjgzbb ON mzjzjlb.YLJGDM = jybgb.YLJGDM_MZJZJLB AND mzjzjlb.JZLSH = jybgb.JZLSH_MZJZJLB AND jybgb.YLJGDM = jybgb_jyjgzbb.YLJGDM AND jybgb.BGDH = jyjgzbb.BGDH AND jybgb_jyjgzbb.JYZBLSH = jyjgzbb.JY...
css
CREATE TABLE t_kc22 ( MED_EXP_DET_ID text, OVERALL_CD_ORG text, OVERALL_CD_PERSON text, MED_CLINIC_ID text, MED_EXP_BILL_ID text, SOC_SRT_DIRE_CD text, SOC_SRT_DIRE_NM text, DIRE_TYPE number, CHA_ITEM_LEV number, MED_INV_ITEM_TYPE text, MED_DIRE_CD text, MED_DIRE_NM text,...
SELECT t_kc21.MED_CLINIC_ID, t_kc21.PERSON_ID, t_kc21.PERSON_NM, t_kc21.IDENTITY_CARD, t_kc21.PERSON_SEX, t_kc21.PERSON_AGE FROM t_kc21 JOIN t_kc24 ON t_kc21.MED_CLINIC_ID = t_kc24.MED_CLINIC_ID WHERE t_kc24.MED_AMOUT = (SELECT MED_AMOUT FROM t_kc24 WHERE MED_CLINIC_ID = '70444989325')
css
CREATE TABLE demographic ( subject_id text, hadm_id text, name text, marital_status text, age text, dob text, gender text, language text, religion text, admission_type text, days_stay text, insurance text, ethnicity text, expire_flag text, admission_location t...
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.admission_location = "EMERGENCY ROOM ADMIT" AND demographic.dob_year < "2080"
mimicsql_data
CREATE TABLE demographic ( subject_id text, hadm_id text, name text, marital_status text, age text, dob text, gender text, language text, religion text, admission_type text, days_stay text, insurance text, ethnicity text, expire_flag text, admission_location t...
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE demographic.days_stay > "8" AND prescriptions.drug_type = "BASE"
mimicsql_data
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 text, INPT_AREA_BED text, INSURED_IDENTITY number, INSURED_STS text, ...
SELECT COUNT(*) FROM t_kc21 JOIN t_kc22 ON t_kc21.MED_CLINIC_ID = t_kc22.MED_CLINIC_ID WHERE t_kc21.PERSON_ID = '86561769' AND t_kc22.STA_DATE BETWEEN '2002-01-19' AND '2019-07-05' AND t_kc22.SOC_SRT_DIRE_NM = '盐酸文拉法辛缓释片'
css
CREATE TABLE rating ( rid number, mid number, stars number, ratingdate time ) CREATE TABLE movie ( mid number, title text, year number, director text ) CREATE TABLE reviewer ( rid number, name text ) -- Using valid SQLite, answer the following questions for the tables provide...
SELECT T1.title, T1.director FROM movie AS T1 JOIN movie AS T2 ON T1.director = T2.director WHERE T1.title <> T2.title ORDER BY T1.director, T1.title
spider
CREATE TABLE table_70224 ( "Date" text, "City" text, "Event" text, "Winner" text, "Prize" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Jo o Barbosa was the winner of which event?
SELECT "Event" FROM table_70224 WHERE "Winner" = 'joão barbosa'
wikisql
CREATE TABLE table_38264 ( "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 score of the game on November 10, 2006?
SELECT "Score" FROM table_38264 WHERE "Date" = 'november 10, 2006'
wikisql
CREATE TABLE table_28693349_2 ( free_throws INTEGER, player VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- How many free throws did Charles Pearman score?
SELECT MAX(free_throws) FROM table_28693349_2 WHERE player = "Charles Pearman"
sql_create_context
CREATE TABLE t_kc24 ( ACCOUNT_DASH_DATE time, ACCOUNT_DASH_FLG number, CASH_PAY number, CIVIL_SUBSIDY number, CKC102 number, CLINIC_ID text, CLINIC_SLT_DATE time, COMP_ID text, COM_ACC_PAY number, COM_PAY number, DATA_ID text, ENT_ACC_PAY number, ENT_PAY number, F...
SELECT SUM(t_kc24.OVE_PAY) FROM t_kc24 WHERE t_kc24.PERSON_ID = '94271201' AND t_kc24.CLINIC_SLT_DATE BETWEEN '2016-10-16' AND '2020-08-17'
css
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 prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE demographic.admission_type = "URGENT" AND prescriptions.route = "NEB"
mimicsql_data
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_Road, AVG(School_ID) FROM basketball_match GROUP BY ACC_Road
nvbench
CREATE TABLE table_58474 ( "Player" text, "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's the nationality of jim les?
SELECT "Nationality" FROM table_58474 WHERE "Player" = 'jim les'
wikisql
CREATE TABLE table_4393 ( "State" text, "Interview" real, "Swimsuit" real, "Evening gown" real, "Average" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Tell me the highest interview for north carolina and evening gown more than 7.68
SELECT MAX("Interview") FROM table_4393 WHERE "State" = 'north carolina' AND "Evening gown" > '7.68'
wikisql
CREATE TABLE table_141541_5 ( domestic_freight VARCHAR, change VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- what's the domestic freight with change being +8.0%
SELECT domestic_freight FROM table_141541_5 WHERE change = "+8.0%"
sql_create_context
CREATE TABLE table_53259 ( "Rank" real, "Previous Rank" text, "Name" text, "Nationality" text, "Team" text, "Points" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Tell me the team with a rank less than 13 and points more than 79 and previous ra...
SELECT "Team" FROM table_53259 WHERE "Rank" < '13' AND "Points" > '79' AND "Previous Rank" = '4'
wikisql
CREATE TABLE table_43983 ( "Nat." text, "Name" text, "Moving to" text, "Type" text, "Transfer window" text, "Transfer fee" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What type of transfer window is winter in Ita?
SELECT "Type" FROM table_43983 WHERE "Transfer window" = 'winter' AND "Nat." = 'ita'
wikisql
CREATE TABLE table_204_595 ( id number, "rank" number, "nation" text, "gold" number, "silver" number, "bronze" number, "total" number ) -- Using valid SQLite, answer the following questions for the tables provided above. -- how many nations won more than one silver medal ?
SELECT COUNT("nation") FROM table_204_595 WHERE "silver" > 1
squall
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 COUNT(*) FROM t_kc22 WHERE t_kc22.MED_ORG_DEPT_CD = '544' AND t_kc22.STA_DATE BETWEEN '2005-01-30' AND '2005-07-23' AND t_kc22.SOC_SRT_DIRE_NM = '苯妥英钠片'
css
CREATE TABLE table_40912 ( "Pos." text, "Player" text, "Team" text, "Height" text, "Weight" real, "First round" real, "Final round" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is Final round, when Player is Danilo Gallinari?
SELECT "Final round" FROM table_40912 WHERE "Player" = 'danilo gallinari'
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.IN_DIAG_DIS_CD, t_kc21.IN_DIAG_DIS_NM FROM t_kc21 WHERE t_kc21.PERSON_NM = '许智勇' AND t_kc21.IN_HOSP_DATE BETWEEN '2011-01-29' AND '2018-06-01' GROUP BY t_kc21.IN_DIAG_DIS_CD ORDER BY COUNT(*) DESC LIMIT 1
css
CREATE TABLE offering_instructor ( offering_instructor_id int, offering_id int, instructor_id int ) CREATE TABLE comment_instructor ( instructor_id int, student_id int, score int, comment_text varchar ) CREATE TABLE gsi ( course_offering_id int, student_id int ) CREATE TABLE cours...
SELECT COUNT(*) > 0 FROM course, course_offering, offering_instructor, semester WHERE course.course_id = course_offering.course_id AND course.department = 'HISTORY' AND course.number = 641 AND offering_instructor.offering_id = course_offering.offering_id AND semester.semester = 'WN' AND semester.semester_id = course_of...
advising
CREATE TABLE ReviewTaskTypes ( Id number, Name text, Description text ) CREATE TABLE VoteTypes ( Id number, Name text ) CREATE TABLE PostTags ( PostId number, TagId number ) CREATE TABLE PostTypes ( Id number, Name text ) CREATE TABLE PostFeedback ( Id number, PostId numb...
SELECT q.Id, q.Title AS "Title", u.Id AS "Asker", u.Id AS "user_link", au.Id AS "Answerer", au.Id AS "user_link", q.CreationDate AS "When Asked", a.CreationDate AS "When Answered", q.LastActivityDate AS "Last Active", q.ViewCount AS "Views", q.AnswerCount AS "Total Answers", q.CommentCount AS "Q Comments", a.CommentCou...
sede
CREATE TABLE jybgb_jyjgzbb ( JYZBLSH number, YLJGDM text, jyjgzbb_id number ) 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, ...
SELECT jybgb.SQRGH, jybgb.SQRXM FROM jybgb WHERE jybgb.BGDH = '21129933460'
css
CREATE TABLE table_name_41 ( total INTEGER, institution VARCHAR, aided VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which higher secondary school listing has the lowest total and an Aided amount larger than 14?
SELECT MIN(total) FROM table_name_41 WHERE institution = "higher secondary school" AND aided > 14
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 * FROM gwyjzb WHERE gwyjzb.MED_SER_ORG_NO = '2465778' AND gwyjzb.IN_HOSP_DATE BETWEEN '2006-06-24' AND '2021-01-30' AND gwyjzb.PERSON_NM LIKE '姜%' UNION SELECT * FROM fgwyjzb WHERE fgwyjzb.MED_SER_ORG_NO = '2465778' AND fgwyjzb.IN_HOSP_DATE BETWEEN '2006-06-24' AND '2021-01-30' AND fgwyjzb.PERSON_NM LIKE '姜%'
css
CREATE TABLE table_30541 ( "#" text, "Player" text, "Country" text, "Score" text, "To par" text, "Winnings ($)" real, "After" real, "Before" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the lowest after when the player is adam ...
SELECT MIN("After") FROM table_30541 WHERE "Player" = 'Adam Scott'
wikisql
CREATE TABLE table_name_32 ( _ppp__ VARCHAR, d__billions_of_us$_ VARCHAR, expenditures_on_r INTEGER, country_region VARCHAR, year VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the average expenditures on R&D for Croatia after 2007?
SELECT AVG(expenditures_on_r) & d__billions_of_us$_, _ppp__ FROM table_name_32 WHERE country_region = "croatia" AND year > 2007
sql_create_context
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 t_kc22.SOC_SRT_DIRE_CD, t_kc22.SOC_SRT_DIRE_NM FROM t_kc21 JOIN t_kc22 ON t_kc21.MED_CLINIC_ID = t_kc22.MED_CLINIC_ID WHERE t_kc21.PERSON_NM = '杨欣荣' AND t_kc22.MED_INV_ITEM_TYPE = '检查费'
css
CREATE TABLE representative ( Representative_ID int, Name text, State text, Party text, Lifespan text ) CREATE TABLE election ( Election_ID int, Representative_ID int, Date text, Votes real, Vote_Percent real, Seats real, Place real ) -- Using valid SQLite, answer the ...
SELECT Date, Vote_Percent FROM election
nvbench
CREATE TABLE Posts ( Id number, PostTypeId number, AcceptedAnswerId number, ParentId number, CreationDate time, DeletionDate time, Score number, ViewCount number, Body text, OwnerUserId number, OwnerDisplayName text, LastEditorUserId number, LastEditorDisplayName text...
SELECT DisplayName, LastAccessDate, Reputation, UpVotes, DownVotes FROM Users ORDER BY Reputation DESC, UpVotes DESC LIMIT 10
sede
CREATE TABLE table_name_14 ( rank VARCHAR, headquarters VARCHAR, sales__billion_$_ VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is Rank, when Headquarters is United Kingdom, and when Sales (billion $) is 370.9?
SELECT rank FROM table_name_14 WHERE headquarters = "united kingdom" AND sales__billion_$_ = 370.9
sql_create_context
CREATE TABLE table_49632 ( "Game" text, "Date" text, "Home Team" text, "Result" text, "Road Team" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the road team playing against Boston on April 16?
SELECT "Road Team" FROM table_49632 WHERE "Home Team" = 'boston' AND "Date" = 'april 16'
wikisql
CREATE TABLE table_74690 ( "Tujunga" text, "La Crescenta- Montrose" text, "Glendale" text, "La Ca\u00f1ada Flintridge" text, "Pasadena" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the percentage of Glendale when Pasadena is 14%?
SELECT "Glendale" FROM table_74690 WHERE "Pasadena" = '14%'
wikisql
CREATE TABLE table_203_794 ( id number, "year" number, "location" text, "attendance" number, "theme phrase" text, "top messages" text, "host" text, "opening general session guest(s)" text, "closing general session guest(s)" text, "sunday night reception" text, "wednesday nigh...
SELECT COUNT(*) FROM table_203_794 WHERE "location" = 'orlando'
squall
CREATE TABLE table_61411 ( "Letter" text, "American" text, "British" text, "Australian" text, "Examples" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What does American have if Australia has ?
SELECT "American" FROM table_61411 WHERE "Australian" = 'əʉ'
wikisql
CREATE TABLE t_kc22 ( AMOUNT number, CHA_ITEM_LEV number, DATA_ID text, DIRE_TYPE number, DOSE_FORM text, DOSE_UNIT text, EACH_DOSAGE text, EXP_OCC_DATE time, FLX_MED_ORG_ID text, FXBZ number, HOSP_DOC_CD text, HOSP_DOC_NM text, MED_CLINIC_ID text, MED_DIRE_CD tex...
SELECT COUNT(*) FROM gwyjzb JOIN t_kc22 ON gwyjzb.MED_CLINIC_ID = t_kc22.MED_CLINIC_ID WHERE gwyjzb.PERSON_NM = '何修明' AND t_kc22.STA_DATE BETWEEN '2013-12-16' AND '2014-11-24' GROUP BY t_kc22.SOC_SRT_DIRE_CD ORDER BY COUNT(*) DESC LIMIT 1 UNION SELECT COUNT(*) FROM fgwyjzb JOIN t_kc22 ON fgwyjzb.MED_CLINIC_ID = t_kc22....
css
CREATE TABLE ReviewRejectionReasons ( Id number, Name text, Description text, PostTypeId number ) CREATE TABLE CloseReasonTypes ( Id number, Name text, Description text ) CREATE TABLE PostsWithDeleted ( Id number, PostTypeId number, AcceptedAnswerId number, ParentId number,...
SELECT COUNT(Id), WeekStart FROM (SELECT Id, DATEADD(week, DATEDIFF(day, '20000109', CreationDate) / 7, '20000109') AS WeekStart FROM Posts WHERE CreationDate > '2016-01-01 00:00:00' AND UPPER(Body) LIKE UPPER('%##PostText##%')) AS RelevantQuestionsByWeek GROUP BY WeekStart
sede
CREATE TABLE Bookings_Services ( Order_ID INTEGER, Product_ID INTEGER ) CREATE TABLE Drama_Workshop_Groups ( Workshop_Group_ID INTEGER, Address_ID INTEGER, Currency_Code CHAR(15), Marketing_Region_Code CHAR(15), Store_Name VARCHAR(255), Store_Phone VARCHAR(255), Store_Email_Address ...
SELECT Actual_Delivery_Date, COUNT(Actual_Delivery_Date) FROM Bookings ORDER BY Actual_Delivery_Date
nvbench
CREATE TABLE table_27462177_1 ( us_viewers__millions_ VARCHAR, written_by VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- How many millions of US viewers watched the episode written by Jack Sanderson?
SELECT us_viewers__millions_ FROM table_27462177_1 WHERE written_by = "Jack Sanderson"
sql_create_context
CREATE TABLE candidate ( Candidate_ID int, People_ID int, Poll_Source text, Date text, Support_rate real, Consider_rate real, Oppose_rate real, Unsure_rate real ) CREATE TABLE people ( People_ID int, Sex text, Name text, Date_of_Birth text, Height real, Weight re...
SELECT Sex, AVG(Weight) FROM people GROUP BY Sex
nvbench
CREATE TABLE diagnoses ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) CREATE TABLE lab ( subject_id text, hadm_id text, itemid text, charttime text, flag text, value_unit text, label text, fluid text ) CREATE TABLE demographic (...
SELECT procedures.long_title FROM procedures WHERE procedures.icd9_code = "331"
mimicsql_data
CREATE TABLE table_name_89 ( position VARCHAR, college VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What position does the College of Louisiana State have?
SELECT position FROM table_name_89 WHERE college = "louisiana state"
sql_create_context
CREATE TABLE table_30208 ( "#" real, "Date" text, "Opponent" text, "Site/Stadium" text, "Score" text, "Win" text, "Loss" text, "Save" text, "Attendance" real, "Overall Record" text, "NCAAT Record" text ) -- Using valid SQLite, answer the following questions for the tables p...
SELECT "Save" FROM table_30208 WHERE "Loss" = 'Duke (3-2)'
wikisql
CREATE TABLE table_70894 ( "Date" text, "Round" text, "Opponents" text, "Result F\u2013A" text, "Attendance" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What attendance was on 7 January 2003?
SELECT "Attendance" FROM table_70894 WHERE "Date" = '7 january 2003'
wikisql
CREATE TABLE table_12358 ( "Model" text, "Chassis code" text, "Production time" text, "Number built" real, "Engine" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What's the total number built with a chassis code of w108.057?
SELECT COUNT("Number built") FROM table_12358 WHERE "Chassis code" = 'w108.057'
wikisql
CREATE TABLE table_12834315_5 ( hand_guards VARCHAR, name VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What hand guard system is used with a gas piston commando?
SELECT hand_guards FROM table_12834315_5 WHERE name = "Gas Piston Commando"
sql_create_context
CREATE TABLE table_name_26 ( champions VARCHAR, semi_finalists VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What champions have 1 (2009) as the semi-finalists?
SELECT champions FROM table_name_26 WHERE semi_finalists = "1 (2009)"
sql_create_context
CREATE TABLE table_name_83 ( score VARCHAR, country VARCHAR, place VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- what's the score in canada with place of t8?
SELECT score FROM table_name_83 WHERE country = "canada" AND place = "t8"
sql_create_context
CREATE TABLE table_25205 ( "Edition" text, "Round" text, "Date" text, "Partnering" text, "Against" text, "Surface" text, "Opponents" text, "W\u2013L" text, "Result" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What was the result f...
SELECT "Result" FROM table_25205 WHERE "Partnering" = 'Frederica Piedade'
wikisql
CREATE TABLE table_203_679 ( id number, "part" text, "number" text, "first public release date (first edition)" number, "latest public release date (edition)" number, "latest amendment" text, "title" text, "description" text ) -- Using valid SQLite, answer the following questions for t...
SELECT "part" FROM table_203_679 ORDER BY "first public release date (first edition)" DESC LIMIT 1
squall
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 mzjzjlb JOIN jybgb JOIN jyjgzbb JOIN person_info_hz_info ON person_info.RYBH = person_info_hz_info.RYBH AND hz_info.YLJGDM = mzjzjlb.YLJGDM AND hz_info.KH = mzjzjlb.KH AND hz_info.KLX = mzjzjlb.KLX AND mzjzjlb.YLJGDM = jybgb.YLJGDM_MZJZJLB AND mzjzjlb.JZLSH = jybgb.JZLSH_MZJZ...
css
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 COUNT(hz_info.RYBH) FROM hz_info JOIN zyjzjlb ON hz_info.YLJGDM = zyjzjlb.YLJGDM AND hz_info.KH = zyjzjlb.KH AND hz_info.KLX = zyjzjlb.KLX WHERE zyjzjlb.YLJGDM = '1966400' AND DATEDIFF(zyjzjlb.CYSJ, zyjzjlb.RYSJ) > 11
css
CREATE TABLE table_name_69 ( away_team VARCHAR, crowd INTEGER ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Who was the away team when the crowd was larger than 41,451?
SELECT away_team FROM table_name_69 WHERE crowd > 41 OFFSET 451
sql_create_context
CREATE TABLE table_2180 ( "Pitcher" text, "Starts" real, "Wins" real, "Losses" real, "No decisions" real, "Winning %" text, "Seasons" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- what is the number of starts in 1977
SELECT "Starts" FROM table_2180 WHERE "Seasons" = '1977'
wikisql
CREATE TABLE allergy ( allergyid number, patientunitstayid number, drugname text, allergyname text, allergytime time ) CREATE TABLE lab ( labid number, patientunitstayid number, labname text, labresult number, labresulttime time ) CREATE TABLE microlab ( microlabid number, ...
SELECT COUNT(*) FROM lab WHERE lab.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '006-232166')) AND lab.labname = 'cpk' AND DATETIME(lab.labresulttime) >= DATETIME(CURRENT_TI...
eicu
CREATE TABLE table_name_81 ( score VARCHAR, game VARCHAR, record VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which Score has a Game larger than 40, and a Record of 25-10-8?
SELECT score FROM table_name_81 WHERE game > 40 AND record = "25-10-8"
sql_create_context
CREATE TABLE table_1931 ( "Country" text, "Contestant" text, "Age" real, "Height (cm)" real, "Height (ft)" text, "Hometown" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- When belarus is the country what is the hometown?
SELECT "Hometown" FROM table_1931 WHERE "Country" = 'Belarus'
wikisql
CREATE TABLE Engineer_Skills ( engineer_id INTEGER, skill_id INTEGER ) CREATE TABLE Maintenance_Contracts ( maintenance_contract_id INTEGER, maintenance_contract_company_id INTEGER, contract_start_date DATETIME, contract_end_date DATETIME, other_contract_details VARCHAR(255) ) CREATE TABLE...
SELECT staff_name, COUNT(staff_name) FROM Staff AS T1 JOIN Engineer_Visits AS T2 ON T1.staff_id = T2.contact_staff_id JOIN Maintenance_Engineers AS T3 ON T2.engineer_id = T3.engineer_id GROUP BY staff_name ORDER BY COUNT(staff_name)
nvbench
CREATE TABLE procedures ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) CREATE TABLE lab ( subject_id text, hadm_id text, itemid text, charttime text, flag text, value_unit text, label text, fluid text ) CREATE TABLE diagnoses ( ...
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.admityear < "2121" AND lab."CATEGORY" = "Hematology"
mimicsql_data
CREATE TABLE table_name_5 ( total INTEGER, rank VARCHAR, bronze VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the Total medals for the Nation ranking 33 with more than 1 Bronze?
SELECT AVG(total) FROM table_name_5 WHERE rank = "33" AND bronze > 1
sql_create_context
CREATE TABLE table_train_247 ( "id" int, "mini_mental_state_examination_mmse" int, "creatinine_consistently" float, "creatinine_clearance_cl" float, "seizure_disorder" bool, "age" float, "NOUSE" float ) -- Using valid SQLite, answer the following questions for the tables provided above. -...
SELECT * FROM table_train_247 WHERE mini_mental_state_examination_mmse >= 24
criteria2sql
CREATE TABLE table_25847 ( "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. -- Name t...
SELECT "Record" FROM table_25847 WHERE "Team" = 'Charlotte'
wikisql
CREATE TABLE table_46444 ( "Position" real, "Team" text, "Played" real, "Drawn" real, "Lost" real, "Goals For" real, "Goals Against" real, "Goal Average 1" real, "Points 2" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which Goals A...
SELECT AVG("Goals Against") FROM table_46444 WHERE "Drawn" > '9' AND "Lost" > '15' AND "Position" = '24' AND "Played" < '46'
wikisql
CREATE TABLE clients ( client_id number, address_id number, customer_email_address text, customer_name text, customer_phone text, other_details text ) CREATE TABLE ref_service_types ( service_type_code text, parent_service_type_code text, service_type_description text ) CREATE TABL...
SELECT COUNT(*) FROM bookings
spider
CREATE TABLE table_16645_1 ( __percentage VARCHAR, urban VARCHAR, population__000_ VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- How many percentage figures are given for the urban population when the total population number is 14685?
SELECT COUNT(urban), __percentage FROM table_16645_1 WHERE population__000_ = 14685
sql_create_context
CREATE TABLE mzb ( 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 < 23 UNION SELECT gyb.MED_CLINIC_ID FROM gyb WHERE gyb.PERSON_AGE < 23 UNION SELECT zyb.MED_CLINIC_ID FROM zyb WHERE zyb.PERSON_AGE < 23 UNION SELECT mzb.MED_CLINIC_ID FROM mzb WHERE mzb.PERSON...
css
CREATE TABLE table_name_30 ( kickoff VARCHAR, date VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the kickoff for the game on october 22, 2000?
SELECT kickoff FROM table_name_30 WHERE date = "october 22, 2000"
sql_create_context
CREATE TABLE table_name_71 ( finish VARCHAR, start VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- When the start is 22, what is the finish?
SELECT finish FROM table_name_71 WHERE start = "22"
sql_create_context
CREATE TABLE table_18994724_1 ( original_title VARCHAR, submitting_country VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the original title of the film submitted by Greece?
SELECT original_title FROM table_18994724_1 WHERE submitting_country = "Greece"
sql_create_context
CREATE TABLE table_name_42 ( score VARCHAR, visitor VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What was the score when Pittsburgh was the visitor?
SELECT score FROM table_name_42 WHERE visitor = "pittsburgh"
sql_create_context
CREATE TABLE ReviewTaskResults ( Id number, ReviewTaskId number, ReviewTaskResultTypeId number, CreationDate time, RejectionReasonId number, Comment text ) CREATE TABLE SuggestedEditVotes ( Id number, SuggestedEditId number, UserId number, VoteTypeId number, CreationDate tim...
SELECT FavoriteCount, Posts.Id, Title, 'http://stackoverflow.com/questions/' + CAST(Posts.Id AS TEXT) + '/' AS Link FROM Posts JOIN PostTags ON Posts.Id = PostTags.PostId JOIN Tags ON PostTags.TagId = Tags.Id WHERE Posts.PostTypeId = 1 AND Tags.TagName = '##Tag:string##' AND CommunityOwnedDate IS NULL AND FavoriteCount...
sede
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 gwyjzb.MED_ORG_DEPT_CD, gwyjzb.MED_ORG_DEPT_NM FROM gwyjzb JOIN t_kc24 ON gwyjzb.MED_CLINIC_ID = t_kc24.MED_CLINIC_ID WHERE gwyjzb.MED_SER_ORG_NO = '3984777' AND t_kc24.CLINIC_SLT_DATE BETWEEN '2009-04-21' AND '2020-07-12' GROUP BY gwyjzb.MED_ORG_DEPT_CD ORDER BY SUM(t_kc24.OVE_PAY) DESC LIMIT 12 UNION SELECT fg...
css
CREATE TABLE table_name_45 ( place VARCHAR, to_par VARCHAR, score VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the Place of the Player with a To par of +3 and Score of 73-70-73=216?
SELECT place FROM table_name_45 WHERE to_par = "+3" AND score = 73 - 70 - 73 = 216
sql_create_context
CREATE TABLE table_55477 ( "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 ranking for bruce fleisher with over $2,411,543?
SELECT SUM("Rank") FROM table_55477 WHERE "Player" = 'bruce fleisher' AND "Earnings ( $ )" > '2,411,543'
wikisql
CREATE TABLE table_name_67 ( type VARCHAR, capacity VARCHAR, number VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which Type has a Capacity of 28 passengers, and a Number of 16?
SELECT type FROM table_name_67 WHERE capacity = "28 passengers" AND number = "16"
sql_create_context
CREATE TABLE table_20895 ( "Player" text, "Team" text, "Matches" real, "Wickets" real, "Average" text, "Best Bowling" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- How many wickets were there when average was 22.66?
SELECT "Wickets" FROM table_20895 WHERE "Average" = '22.66'
wikisql
CREATE TABLE table_name_84 ( average INTEGER, interview VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What was the highest average for the contestant having an interview score of 8.46?
SELECT MAX(average) FROM table_name_84 WHERE interview = 8.46
sql_create_context
CREATE TABLE table_1984697_85 ( school VARCHAR, city___town VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the name of the school/s in North Manchester?
SELECT school FROM table_1984697_85 WHERE city___town = "North Manchester"
sql_create_context
CREATE TABLE requirement ( requirement_id int, requirement varchar, college varchar ) CREATE TABLE offering_instructor ( offering_instructor_id int, offering_id int, instructor_id int ) CREATE TABLE instructor ( instructor_id int, name varchar, uniqname varchar ) CREATE TABLE cour...
SELECT DISTINCT course.department, course.name, course.number FROM course, course_offering, program_course, semester WHERE course_offering.friday = 'N' AND course_offering.monday = 'N' AND course.course_id = course_offering.course_id AND program_course.category LIKE '%ULCS%' AND program_course.course_id = course.course...
advising
CREATE TABLE Staff ( staff_id INTEGER, staff_address_id INTEGER, nickname VARCHAR(80), first_name VARCHAR(80), middle_name VARCHAR(80), last_name VARCHAR(80), date_of_birth DATETIME, date_joined_staff DATETIME, date_left_staff DATETIME ) CREATE TABLE Customer_Payments ( customer...
SELECT payment_method_code, COUNT(*) FROM Customer_Payments GROUP BY payment_method_code
nvbench
CREATE TABLE table_name_3 ( attendance INTEGER, date VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- How many people were in attendance on may 2?
SELECT MIN(attendance) FROM table_name_3 WHERE date = "may 2"
sql_create_context
CREATE TABLE hz_info ( KH text, KLX number, RYBH text, YLJGDM text ) CREATE TABLE txmzjzjlb ( HXPLC number, HZXM text, JLSJ time, JZJSSJ time, JZKSBM text, JZKSMC text, JZKSRQ time, JZLSH number, JZZDBM text, JZZDSM text, JZZTDM number, JZZTMC text, K...
SELECT * FROM hz_info JOIN txmzjzjlb JOIN jybgb JOIN jyjgzbb ON 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 AND jybgb.YLJGDM = jyjgzbb.YLJGDM AND jybgb.BGDH = jyjgzbb.BGDH WHERE hz_i...
css
CREATE TABLE table_name_70 ( career_win_loss VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is Career Win-Loss, when 2002 is 'A', and when 2001 is '4R'?
SELECT career_win_loss FROM table_name_70 WHERE 2002 = "a" AND 2001 = "4r"
sql_create_context
CREATE TABLE table_7578 ( "Rank" text, "Nation" text, "Gold" real, "Silver" real, "Bronze" real, "Total" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the fewest number of silvers have 0 golds?
SELECT MIN("Silver") FROM table_7578 WHERE "Gold" < '0'
wikisql