instruction
stringlengths
151
7.46k
output
stringlengths
2
4.44k
source
stringclasses
26 values
CREATE TABLE table_1773908_3 ( provider VARCHAR, resale VARCHAR, up__up_to_kbit_s_ VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- How many providers are there where the resale category is yes and bandwith is up is 1024?
SELECT COUNT(provider) FROM table_1773908_3 WHERE resale = "yes" AND up__up_to_kbit_s_ = 1024
sql_create_context
CREATE TABLE ReviewTaskStates ( Id number, Name text, Description text ) CREATE TABLE PostHistoryTypes ( Id number, Name text ) CREATE TABLE ReviewTaskResultTypes ( Id number, Name text, Description text ) CREATE TABLE Badges ( Id number, UserId number, Name text, Date...
SELECT num.TagName AS Tag, ROW_NUMBER() OVER (ORDER BY rate.Rate DESC) AS LastQuarterRank, ROW_NUMBER() OVER (ORDER BY num.Num DESC) AS TotalRank, rate.Rate AS QuestionsLastQuarter, num.Num AS QuestionsTotal FROM (SELECT COUNT(PostId) AS Rate, TagName FROM Tags, PostTags, Posts WHERE Tags.Id = PostTags.TagId AND Posts....
sede
CREATE TABLE table_67883 ( "City" text, "Province/Region" text, "Country" text, "IATA" text, "ICAO" text, "Airport" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- In what city is RJSN located?
SELECT "City" FROM table_67883 WHERE "ICAO" = 'rjsn'
wikisql
CREATE TABLE table_name_15 ( score VARCHAR, opponent_in_the_final VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What score has wynne prakusya as the opponent in the final?
SELECT score FROM table_name_15 WHERE opponent_in_the_final = "wynne prakusya"
sql_create_context
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 (SELECT COUNT(DISTINCT t1.uniquepid) FROM (SELECT patient.uniquepid, diagnosis.diagnosistime FROM diagnosis JOIN patient ON diagnosis.patientunitstayid = patient.patientunitstayid WHERE diagnosis.diagnosisname = 'acute coronary syndrome' AND DATETIME(diagnosis.diagnosistime) >= DATETIME(CURRENT_TIME(), '-3 year'...
eicu
CREATE TABLE departments ( DEPARTMENT_ID decimal(4,0), DEPARTMENT_NAME varchar(30), MANAGER_ID decimal(6,0), LOCATION_ID decimal(4,0) ) CREATE TABLE countries ( COUNTRY_ID varchar(2), COUNTRY_NAME varchar(40), REGION_ID decimal(10,0) ) CREATE TABLE regions ( REGION_ID decimal(5,0), ...
SELECT JOB_ID, AVG(EMPLOYEE_ID) FROM employees WHERE SALARY BETWEEN 8000 AND 12000 AND COMMISSION_PCT <> "null" OR DEPARTMENT_ID <> 40 GROUP BY JOB_ID ORDER BY AVG(EMPLOYEE_ID) DESC
nvbench
CREATE TABLE rating ( rid number, mid number, stars number, ratingdate time ) CREATE TABLE reviewer ( rid number, name text ) CREATE TABLE movie ( mid number, title text, year number, director text ) -- Using valid SQLite, answer the following questions for the tables provide...
SELECT T2.title, T2.year FROM rating AS T1 JOIN movie AS T2 ON T1.mid = T2.mid ORDER BY T1.stars DESC LIMIT 3
spider
CREATE TABLE table_19561 ( "School Year" text, "Class A" text, "Class AA" text, "Class AAA" text, "Class AAAA" text, "Class AAAAA" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- How many class AA in the year 2002-03
SELECT COUNT("Class AA") FROM table_19561 WHERE "School Year" = '2002-03'
wikisql
CREATE TABLE table_47075 ( "Year" real, "Award" text, "Category" text, "Nominated Work" text, "Result" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What ward was she nominated at for her work, Flare Path for the category of best featured actress i...
SELECT "Award" FROM table_47075 WHERE "Nominated Work" = 'flare path' AND "Category" = 'best featured actress in a play'
wikisql
CREATE TABLE diagnoses ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) CREATE TABLE lab ( subject_id text, hadm_id text, itemid text, charttime text, flag text, value_unit text, label text, fluid text ) CREATE TABLE demographic (...
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.age < "86" AND procedures.short_title = "Rt & lt heart angiocard"
mimicsql_data
CREATE TABLE table_204_669 ( id number, "rank" number, "athlete" text, "nationality" text, "time" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- who was the only contestant from switzerland to place in the top 50 ?
SELECT "athlete" FROM table_204_669 WHERE "nationality" = 'switzerland' AND "rank" <= 50
squall
CREATE TABLE inputevents_cv ( row_id number, subject_id number, hadm_id number, icustay_id number, charttime time, itemid number, amount number ) CREATE TABLE patients ( row_id number, subject_id number, gender text, dob time, dod time ) CREATE TABLE labevents ( row...
SELECT prescriptions.startdate FROM prescriptions WHERE prescriptions.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 5142) AND prescriptions.route = 'po' AND DATETIME(prescriptions.startdate, 'start of month') = DATETIME(CURRENT_TIME(), 'start of month', '-1 month') ORDER BY prescri...
mimic_iii
CREATE TABLE PendingFlags ( Id number, FlagTypeId number, PostId number, CreationDate time, CloseReasonTypeId number, CloseAsOffTopicReasonTypeId number, DuplicateOfQuestionId number, BelongsOnBaseHostAddress text ) CREATE TABLE CloseAsOffTopicReasonTypes ( Id number, IsUniversa...
WITH USER_BY_TAG AS (SELECT ROW_NUMBER() OVER (ORDER BY COUNT(*) DESC) AS Rank, u.Id AS "user_link", TagName, COUNT(*) AS UpVotes FROM Tags AS t INNER JOIN PostTags AS pt ON pt.TagId = t.Id INNER JOIN Posts AS p ON p.ParentId = pt.PostId INNER JOIN Votes AS v ON v.PostId = p.Id AND VoteTypeId = 2 INNER JOIN Users AS u ...
sede
CREATE TABLE table_name_52 ( notes VARCHAR, rank VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What are the notes of the number 1 rank?
SELECT notes FROM table_name_52 WHERE rank = 1
sql_create_context
CREATE TABLE table_10363 ( "Candidate" text, "Total Receipts" real, "Loans Received" real, "Receipts w/o Loans" real, "Money Spent" real, "Cash On Hand" real, "Total Debt" real, "Cash on Hand Minus Debt" real ) -- Using valid SQLite, answer the following questions for the tables provid...
SELECT AVG("Cash On Hand") FROM table_10363 WHERE "Receipts w/o Loans" = '19,951,290' AND "Money Spent" < '17,556,672'
wikisql
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 t.TagName AS TagName, t.Count AS TagCountTotal, COUNT(p.Id) OVER (PARTITION BY t.Id) AS TagCount, p.Id AS "post_link", p.Tags AS Tags, exc.Body AS Excerpt FROM Tags AS target JOIN PostTags AS pt ON (target.Id = pt.TagId) JOIN Posts AS p ON (pt.PostId = p.Id) JOIN PostTags AS tp ON (p.Id = tp.PostId) JOIN Tags AS...
sede
CREATE TABLE table_name_11 ( position VARCHAR, height VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the Position of the Player with a Height of 2.11?
SELECT position FROM table_name_11 WHERE height = 2.11
sql_create_context
CREATE TABLE instructor ( instructor_id int, name varchar, uniqname varchar ) CREATE TABLE gsi ( course_offering_id int, student_id int ) CREATE TABLE requirement ( requirement_id int, requirement varchar, college varchar ) CREATE TABLE program ( program_id int, name varchar, ...
SELECT DISTINCT instructor.name FROM course, course_offering, instructor, offering_instructor WHERE course.course_id = course_offering.course_id AND course.department = 'EECS' AND course.number = 301 AND NOT instructor.name LIKE '%Brian Kennedy%' AND offering_instructor.instructor_id = instructor.instructor_id AND offe...
advising
CREATE TABLE club ( clubname VARCHAR, clubid VARCHAR ) CREATE TABLE student ( stuid VARCHAR, fname VARCHAR, lname VARCHAR ) CREATE TABLE member_of_club ( clubid VARCHAR, stuid VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- List the club...
SELECT DISTINCT t1.clubname FROM club AS t1 JOIN member_of_club AS t2 ON t1.clubid = t2.clubid JOIN student AS t3 ON t2.stuid = t3.stuid WHERE t3.fname = "Davis" AND t3.lname = "Steven"
sql_create_context
CREATE TABLE table_2496 ( "Season" real, "Series" text, "Team" text, "Races" real, "Wins" real, "Poles" real, "F/Laps" real, "Podiums" real, "Points" real, "Position" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the poi...
SELECT COUNT("Points") FROM table_2496 WHERE "Series" = 'Formula Renault 2.0 Italy'
wikisql
CREATE TABLE table_name_87 ( date_married VARCHAR, name_dates VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- When did Louise, Princess royal get married?
SELECT date_married FROM table_name_87 WHERE name_dates = "louise, princess royal"
sql_create_context
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 JOIN t_kc21_t_kc22 ON t_kc21.MED_CLINIC_ID = t_kc21_t_kc22.MED_CLINIC_ID AND t_kc21_t_kc22.MED_EXP_DET_ID = t_kc22.MED_EXP_DET_ID WHERE t_kc21.PERSON_NM = '吕莹玉' AND t_kc22.STA_DATE BETWEEN '2008-10-25' AND '2015-12-06' AND t_kc22.SELF_PAY_PRO < 0.73
css
CREATE TABLE table_name_98 ( course VARCHAR, year VARCHAR, location VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- what is the course at midlothian, illinois for a year before 1934?
SELECT course FROM table_name_98 WHERE year < 1934 AND location = "midlothian, illinois"
sql_create_context
CREATE TABLE microlab ( microlabid number, patientunitstayid number, culturesite text, organism text, culturetakentime time ) CREATE TABLE lab ( labid number, patientunitstayid number, labname text, labresult number, labresulttime time ) CREATE TABLE treatment ( treatmentid...
SELECT (SELECT COUNT(DISTINCT t1.uniquepid) FROM (SELECT patient.uniquepid, diagnosis.diagnosistime FROM diagnosis JOIN patient ON diagnosis.patientunitstayid = patient.patientunitstayid WHERE diagnosis.diagnosisname = 'cabg < 7days' AND DATETIME(diagnosis.diagnosistime) >= DATETIME(CURRENT_TIME(), '-4 year')) AS t1) -...
eicu
CREATE TABLE table_name_95 ( voting_order VARCHAR, commentator VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What was the voting order when the commentator was renato tagliani?
SELECT voting_order FROM table_name_95 WHERE commentator = "renato tagliani"
sql_create_context
CREATE TABLE table_204_834 ( id number, "rank" number, "name" text, "nationality" text, "time" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- what come after rex f.
SELECT "name" FROM table_204_834 WHERE id = (SELECT id FROM table_204_834 WHERE "name" = 'rex favero') + 1
squall
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 WHERE demographic.discharge_location = "SHORT TERM HOSPITAL" AND demographic.dob_year < "1837"
mimicsql_data
CREATE TABLE table_11575 ( "Crew" real, "Open 1st VIII" text, "Open 2nd VIII" text, "Open 3rd VIII" text, "Year 11 1st VIII" text, "Year 11 2nd VIII" text, "Year 11 3rd VIII" text, "Year 10 1st Quad" text, "Year 10 2nd Quad" text, "Year 10 3rd Quad" text, "Year 10 4th Quad" t...
SELECT "Open 1st VIII" FROM table_11575 WHERE "Crew" = '2012'
wikisql
CREATE TABLE table_1275 ( "Con- gress" text, "District" text, "Vacator" text, "Election date" text, "Successor" text, "Took seat" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Name the number of districts for december 1799
SELECT COUNT("District") FROM table_1275 WHERE "Election date" = 'December 1799'
wikisql
CREATE TABLE allergy ( allergyid number, patientunitstayid number, drugname text, allergyname text, allergytime time ) CREATE TABLE patient ( uniquepid text, patienthealthsystemstayid number, patientunitstayid number, gender text, age text, ethnicity text, hospitalid num...
SELECT t2.drugname FROM (SELECT patient.uniquepid, treatment.treatmenttime, patient.patienthealthsystemstayid FROM treatment JOIN patient ON treatment.patientunitstayid = patient.patientunitstayid WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid =...
eicu
CREATE TABLE hz_info_zyjzjlb ( JZLSH number, YLJGDM number, zyjzjlb_id number ) 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 tim...
SELECT COUNT(*) FROM zyjzjlb JOIN hz_info_zyjzjlb JOIN hz_info ON hz_info_zyjzjlb.JZLSH = zyjzjlb.JZLSH AND hz_info_zyjzjlb.YLJGDM = hz_info_zyjzjlb.YLJGDM AND hz_info_zyjzjlb.JZLSH = zyjzjlb.JZLSH AND hz_info_zyjzjlb.zyjzjlb_id = zyjzjlb.zyjzjlb_id AND hz_info_zyjzjlb.YLJGDM = hz_info.YLJGDM WHERE hz_info.YLJGDM = '23...
css
CREATE TABLE t_kc22 ( AMOUNT number, CHA_ITEM_LEV number, DATA_ID text, DIRE_TYPE number, DOSE_FORM text, DOSE_UNIT text, EACH_DOSAGE text, EXP_OCC_DATE time, FLX_MED_ORG_ID text, FXBZ number, HOSP_DOC_CD text, HOSP_DOC_NM text, MED_CLINIC_ID text, MED_DIRE_CD tex...
SELECT t_kc24.t_kc21_OUT_DIAG_DIS_CD, t_kc24.t_kc21_OUT_DIAG_DIS_NM FROM t_kc24 WHERE t_kc24.t_kc21_PERSON_NM = '邹宏富' AND t_kc24.MED_CLINIC_ID IN (SELECT t_kc24.MED_CLINIC_ID FROM t_kc24 WHERE t_kc24.MED_AMOUT > 6492.34)
css
CREATE TABLE table_7524 ( "Event" text, "2006\u201307" text, "2007\u201308" text, "2008\u201309" text, "2010\u201311" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which Event has a 2007 08 of n/a?
SELECT "Event" FROM table_7524 WHERE "2007\u201308" = 'n/a'
wikisql
CREATE TABLE table_37838 ( "District" text, "District Headquarters" text, "Area (km 2 .)" real, "Population 1991 Census" real, "Population 2001 Census" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the number of Population 2001 Census that ...
SELECT COUNT("Population 2001 Census") FROM table_37838 WHERE "District Headquarters" = 'jharsuguda' AND "Area (km 2 .)" < '2,081'
wikisql
CREATE TABLE table_name_71 ( score VARCHAR, set_2 VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the Score for Set 2 of 24 26?
SELECT score FROM table_name_71 WHERE set_2 = "24–26"
sql_create_context
CREATE TABLE diagnoses_icd ( row_id number, subject_id number, hadm_id number, icd9_code text, charttime time ) CREATE TABLE cost ( row_id number, subject_id number, hadm_id number, event_type text, event_id number, chargetime time, cost number ) CREATE TABLE procedures...
SELECT AVG(chartevents.valuenum) FROM chartevents WHERE chartevents.icustay_id IN (SELECT icustays.icustay_id FROM icustays WHERE icustays.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 15754)) AND chartevents.itemid IN (SELECT d_items.itemid FROM d_items WHERE d_items.label = 'temp...
mimic_iii
CREATE TABLE country ( country_id number, country text, last_update time ) CREATE TABLE payment ( payment_id number, customer_id number, staff_id number, rental_id number, amount number, payment_date time, last_update time ) CREATE TABLE actor ( actor_id number, first_n...
SELECT T2.name, T1.category_id, COUNT(*) FROM film_category AS T1 JOIN category AS T2 ON T1.category_id = T2.category_id GROUP BY T1.category_id
spider
CREATE TABLE table_name_83 ( tonnage___grt__ INTEGER, deaths VARCHAR, date VARCHAR, fate VARCHAR, flag VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- How much tonnage has a Fate of sunk, and a Flag of great britain, and a Date of 26 september 194...
SELECT SUM(tonnage___grt__) FROM table_name_83 WHERE fate = "sunk" AND flag = "great britain" AND date = "26 september 1940" AND deaths = 2
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 lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.marital_status = "SINGLE" AND lab.label = "Potassium, Whole Blood"
mimicsql_data
CREATE TABLE contacts ( contact_id number, customer_id number, gender text, first_name text, last_name text, contact_phone text ) CREATE TABLE customer_orders ( order_id number, customer_id number, order_date time, order_status_code text ) CREATE TABLE addresses ( address_i...
SELECT product_type_code, product_name FROM products WHERE product_price > 1000 OR product_price < 500
spider
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, T1.Price FROM Products AS T1 JOIN Manufacturers AS T2 ON T1.Manufacturer = T2.Code GROUP BY T1.Name ORDER BY T1.Price
nvbench
CREATE TABLE table_61257 ( "Rank" real, "Nation" text, "Gold" real, "Silver" real, "Bronze" real, "Total" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the rank for the Mixed Team nation with a total of less than 13?
SELECT "Rank" FROM table_61257 WHERE "Total" < '13' AND "Nation" = 'mixed team'
wikisql
CREATE TABLE table_63085 ( "Country" text, "Date" text, "Label" text, "Format" text, "Catalogue No." text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- what is the date when the format is cd (limited edition steel-box) from united kingdom?
SELECT "Date" FROM table_63085 WHERE "Format" = 'cd (limited edition steel-box)' AND "Country" = 'united kingdom'
wikisql
CREATE TABLE table_name_38 ( bike__40km_ VARCHAR, swim__15km_ VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the time for the bike (40km) when the swim (1.5km) is 19:56?
SELECT bike__40km_ FROM table_name_38 WHERE swim__15km_ = "19:56"
sql_create_context
CREATE TABLE jyjgzbb ( JYZBLSH text, YLJGDM text, BGDH text, BGRQ time, JYRQ time, JCRGH text, JCRXM text, SHRGH text, SHRXM text, JCXMMC text, JCZBDM text, JCFF text, JCZBMC text, JCZBJGDX text, JCZBJGDL number, JCZBJGDW text, SBBM text, YQBH text...
SELECT * FROM jyjgzbb WHERE JCZBMC = (SELECT JCZBMC FROM jyjgzbb WHERE JYZBLSH = '48654562475') AND JCZBJGDW = (SELECT JCZBJGDW FROM jyjgzbb WHERE JYZBLSH = '48654562475') AND JCZBJGDL <> (SELECT JCZBJGDL FROM jyjgzbb WHERE JYZBLSH = '48654562475')
css
CREATE TABLE Student_Tests_Taken ( registration_id INTEGER, date_test_taken DATETIME, test_result VARCHAR(255) ) CREATE TABLE Courses ( course_id INTEGER, author_id INTEGER, subject_id INTEGER, course_name VARCHAR(120), course_description VARCHAR(255) ) CREATE TABLE Student_Course_Enro...
SELECT date_of_latest_logon, COUNT(date_of_latest_logon) FROM Students WHERE family_name = "Jaskolski" OR family_name = "Langosh" ORDER BY COUNT(date_of_latest_logon) DESC
nvbench
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 'Brent' + '100'
sede
CREATE TABLE diagnoses ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) CREATE TABLE procedures ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) CREATE TABLE demographic ( subject_id text, hadm_id t...
SELECT procedures.short_title FROM procedures WHERE procedures.icd9_code = "9744"
mimicsql_data
CREATE TABLE table_name_31 ( population VARCHAR, area__km²_ VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the Population of the nation that has an Area (km ) of 70,273?
SELECT population FROM table_name_31 WHERE area__km²_ = "70,273"
sql_create_context
CREATE TABLE table_17355408_5 ( high_assists VARCHAR, game VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Name the high assists for 29 game
SELECT high_assists FROM table_17355408_5 WHERE game = 29
sql_create_context
CREATE TABLE table_name_50 ( developer_s_ VARCHAR, platform_s_ VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Who was the developer of Wii?
SELECT developer_s_ FROM table_name_50 WHERE platform_s_ = "wii"
sql_create_context
CREATE TABLE table_name_26 ( press VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Who is the 92.5 with the press of 282.5?
SELECT 925 FROM table_name_26 WHERE press = "282.5"
sql_create_context
CREATE TABLE table_13604 ( "General election" real, "Name" text, "Share of votes" text, "Seats" real, "Share of seats" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- How much General election has a Share of votes of 17%?
SELECT SUM("General election") FROM table_13604 WHERE "Share of votes" = '17%'
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 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_15 ( club VARCHAR, location VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which club is located in Thomson, Victoria?
SELECT club FROM table_name_15 WHERE location = "thomson, victoria"
sql_create_context
CREATE TABLE news_report ( journalist_ID int, Event_ID int, Work_Type text ) CREATE TABLE event ( Event_ID int, Date text, Venue text, Name text, Event_Attendance int ) CREATE TABLE journalist ( journalist_ID int, Name text, Nationality text, Age text, Years_working...
SELECT Nationality, SUM(Age) FROM journalist GROUP BY Nationality ORDER BY Nationality DESC
nvbench
CREATE TABLE diagnosis ( diagnosisid number, patientunitstayid number, diagnosisname text, diagnosistime time, icd9code text ) CREATE TABLE allergy ( allergyid number, patientunitstayid number, drugname text, allergyname text, allergytime time ) CREATE TABLE vitalperiodic ( ...
SELECT t3.labname FROM (SELECT t2.labname, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM (SELECT patient.uniquepid, treatment.treatmenttime FROM treatment JOIN patient ON treatment.patientunitstayid = patient.patientunitstayid WHERE treatment.treatmentname = 'non-cardiac angiography - angiography of arteries of...
eicu
CREATE TABLE prescriptions ( row_id number, subject_id number, hadm_id number, startdate time, enddate time, drug text, dose_val_rx text, dose_unit_rx text, route text ) CREATE TABLE d_labitems ( row_id number, itemid number, label text ) CREATE TABLE icustays ( row...
SELECT COUNT(DISTINCT t1.subject_id) FROM (SELECT admissions.subject_id, diagnoses_icd.charttime FROM diagnoses_icd JOIN admissions ON diagnoses_icd.hadm_id = admissions.hadm_id WHERE diagnoses_icd.icd9_code = (SELECT d_icd_diagnoses.icd9_code FROM d_icd_diagnoses WHERE d_icd_diagnoses.short_title = 'gangrene') AND DAT...
mimic_iii
CREATE TABLE PostTypes ( Id number, Name text ) CREATE TABLE PostFeedback ( Id number, PostId number, IsAnonymous boolean, VoteTypeId number, CreationDate time ) CREATE TABLE VoteTypes ( Id number, Name text ) CREATE TABLE Comments ( Id number, PostId number, Score num...
SELECT ROW_NUMBER() OVER (ORDER BY Reputation DESC) AS "#", Id AS "user_link", Reputation, Location FROM Users WHERE Location LIKE '%NC%' OR LOWER(Location) LIKE '%north carolina%' AND NOT LOWER(Location) LIKE '%france%' AND NOT Location LIKE '%NCR%' ORDER BY Reputation DESC LIMIT 2500
sede
CREATE TABLE table_10096 ( "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 the Away team was essendon, what was the Ve...
SELECT "Venue" FROM table_10096 WHERE "Away team" = 'essendon'
wikisql
CREATE TABLE table_40033 ( "Country" text, "Men's race" real, "Women's race" real, "Men's wheelchair" real, "Women's Wheelchair" real, "Total" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What's the sum of Men's race when Women's race is less ...
SELECT SUM("Men's race") FROM table_40033 WHERE "Women's race" < '1' AND "Women's Wheelchair" = '1' AND "Total" > '3' AND "Men's wheelchair" > '3'
wikisql
CREATE TABLE regions ( REGION_ID decimal(5,0), REGION_NAME varchar(25) ) CREATE TABLE locations ( LOCATION_ID decimal(4,0), STREET_ADDRESS varchar(40), POSTAL_CODE varchar(12), CITY varchar(30), STATE_PROVINCE varchar(25), COUNTRY_ID varchar(2) ) CREATE TABLE jobs ( JOB_ID varchar(...
SELECT HIRE_DATE, COUNT(HIRE_DATE) FROM employees WHERE FIRST_NAME LIKE '%D%' OR FIRST_NAME LIKE '%S%' ORDER BY COUNT(HIRE_DATE)
nvbench
CREATE TABLE offering_instructor ( offering_instructor_id int, offering_id int, instructor_id int ) CREATE TABLE student_record ( student_id int, course_id int, semester int, grade varchar, how varchar, transfer_source varchar, earn_credit varchar, repeat_term varchar, t...
SELECT DISTINCT course.department, course.name, course.number FROM course, program_course WHERE program_course.category LIKE '%Core%' AND program_course.course_id = course.course_id
advising
CREATE TABLE table_41377 ( "Team 1" text, "Agg." text, "Team 2" text, "1st leg" text, "2nd leg" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What was the 2nd leg score for the tie that had a 5-0 first leg score?
SELECT "2nd leg" FROM table_41377 WHERE "1st leg" = '5-0'
wikisql
CREATE TABLE table_26673 ( "Institution" text, "Nickname" text, "Location" text, "Founded" real, "Type" text, "Enrollment" real, "Joined" real, "Left" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What university team is referred to as ...
SELECT "Institution" FROM table_26673 WHERE "Nickname" = 'Tigers'
wikisql
CREATE TABLE days ( days_code varchar, day_name varchar ) CREATE TABLE time_interval ( period text, begin_time int, end_time int ) CREATE TABLE code_description ( code varchar, description text ) CREATE TABLE dual_carrier ( main_airline varchar, low_flight_number int, high_fli...
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 = 'LAS VEGAS' AND CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CIT...
atis
CREATE TABLE table_name_2 ( gold VARCHAR, event VARCHAR, silver VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Who received gold when the event is time trial details and silver is simon richardson great britain (gbr)?
SELECT gold FROM table_name_2 WHERE event = "time trial details" AND silver = "simon richardson great britain (gbr)"
sql_create_context
CREATE TABLE table_62249 ( "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 is Home Team, when Date is '22 Nov 1989', and when Away Team is 'Bath City'?
SELECT "Home team" FROM table_62249 WHERE "Date" = '22 nov 1989' AND "Away team" = 'bath city'
wikisql
CREATE TABLE table_64780 ( "Constituency number" text, "Name" text, "Reserved for ( SC / ST /None)" text, "District" text, "Number of electorates (2009)" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What's the constituency number of the Seoni dist...
SELECT "Constituency number" FROM table_64780 WHERE "Reserved for ( SC / ST /None)" = 'none' AND "District" = 'seoni'
wikisql
CREATE TABLE table_17429402_7 ( occ_championships INTEGER, last_outright_occ_championship VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the fewest number of occ championships for the team that last won an outright occ championship in 2006?
SELECT MIN(occ_championships) FROM table_17429402_7 WHERE last_outright_occ_championship = "2006"
sql_create_context
CREATE TABLE table_67602 ( "Rank" real, "Lane" real, "Name" text, "Nationality" text, "Time" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the smallest lane for rank 6?
SELECT MIN("Lane") FROM table_67602 WHERE "Rank" = '6'
wikisql
CREATE TABLE table_68566 ( "Station" text, "Frequency" real, "Network Affiliation" text, "Format" text, "City of License" text, "Status" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the status of the independent station KPFB?
SELECT "Status" FROM table_68566 WHERE "Network Affiliation" = 'independent' AND "Station" = 'kpfb'
wikisql
CREATE TABLE table_412 ( "Jurisdiction" text, "Voted Yes" real, "Percent Yes" text, "Voted No" real, "Percent No" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- what is the minimum voted no where percent no is 56.6
SELECT MIN("Voted No") FROM table_412 WHERE "Percent No" = '56.6'
wikisql
CREATE TABLE table_37427 ( "Medal" text, "Name" text, "Games" text, "Sport" text, "Event" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What event did Rashid Sidek participate in?
SELECT "Event" FROM table_37427 WHERE "Name" = 'rashid sidek'
wikisql
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 T2.Name, T2.Revenue FROM Products AS T1 JOIN Manufacturers AS T2 ON T1.Manufacturer = T2.Code GROUP BY T2.Name ORDER BY T2.Name
nvbench
CREATE TABLE table_name_82 ( position VARCHAR, year VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which position was in 2009?
SELECT position FROM table_name_82 WHERE year = 2009
sql_create_context
CREATE TABLE table_57443 ( "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. -- On wha...
SELECT "Date" FROM table_57443 WHERE "High rebounds" = 'two-way tie (8)'
wikisql
CREATE TABLE appellations ( No INTEGER, Appelation TEXT, County TEXT, State TEXT, Area TEXT, isAVA TEXT ) CREATE TABLE wine ( No INTEGER, Grape TEXT, Winery TEXT, Appelation TEXT, State TEXT, Name TEXT, Year INTEGER, Price INTEGER, Score INTEGER, Cases IN...
SELECT Year, SUM(AVG(Price)) FROM wine ORDER BY SUM(AVG(Price)) DESC
nvbench
CREATE TABLE table_19229713_4 ( _number INTEGER, us_viewers__million_ VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Name the number for viewers being 1.87
SELECT MAX(_number) FROM table_19229713_4 WHERE us_viewers__million_ = "1.87"
sql_create_context
CREATE TABLE Ref_Document_Types ( Document_Type_Code CHAR(15), Document_Type_Name VARCHAR(255), Document_Type_Description VARCHAR(255) ) CREATE TABLE Ref_Budget_Codes ( Budget_Type_Code CHAR(15), Budget_Type_Description VARCHAR(255) ) CREATE TABLE Documents ( Document_ID INTEGER, Document_...
SELECT Document_Type_Description, COUNT(Document_Type_Description) FROM Ref_Document_Types GROUP BY Document_Type_Description
nvbench
CREATE TABLE ReviewTaskResultTypes ( Id number, Name text, Description text ) CREATE TABLE Posts ( Id number, PostTypeId number, AcceptedAnswerId number, ParentId number, CreationDate time, DeletionDate time, Score number, ViewCount number, Body text, OwnerUserId num...
SELECT PostId, COUNT(*) FROM (SELECT h.RevisionGUID, h.PostId, h.Id, h.UserId AS "user_link", h.UserDisplayName FROM PostHistory AS h JOIN Posts AS p ON h.PostId = p.Id WHERE (p.PostTypeId IN (4, 5)) AND (h.PostHistoryTypeId IN (2, 5))) AS data GROUP BY PostId ORDER BY COUNT(*) DESC
sede
CREATE TABLE table_78508 ( "Rider" text, "Manufacturer" text, "Laps" real, "Time/Retired" text, "Grid" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What was the average amount of laps for competitors with a grid that was more than 11 and a Time/Re...
SELECT AVG("Laps") FROM table_78508 WHERE "Time/Retired" = '+28.108' AND "Grid" > '11'
wikisql
CREATE TABLE table_name_46 ( week VARCHAR, attendance INTEGER ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What week had an Attendance smaller than 21,097?
SELECT COUNT(week) FROM table_name_46 WHERE attendance < 21 OFFSET 097
sql_create_context
CREATE TABLE table_46328 ( "Game" real, "Date" text, "Team" text, "Score" text, "High points" text, "High rebounds" text, "High assists" text, "Location Attendance" text, "Record" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What s...
SELECT "Location Attendance" FROM table_46328 WHERE "Record" = '41–36'
wikisql
CREATE TABLE table_name_18 ( pick INTEGER, school VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the highest pick from Washington?
SELECT MAX(pick) FROM table_name_18 WHERE school = "washington"
sql_create_context
CREATE TABLE table_name_63 ( province VARCHAR, airport VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which province is Luogang International Airport located in?
SELECT province FROM table_name_63 WHERE airport = "luogang international airport"
sql_create_context
CREATE TABLE entrepreneur ( Entrepreneur_ID int, People_ID int, Company text, Money_Requested real, Investor text ) CREATE TABLE people ( People_ID int, Name text, Height real, Weight real, Date_of_Birth text ) -- Using valid SQLite, answer the following questions for the tabl...
SELECT Date_of_Birth, COUNT(Date_of_Birth) FROM entrepreneur AS T1 JOIN people AS T2 ON T1.People_ID = T2.People_ID WHERE T1.Investor = "Simon Woodroffe" OR T1.Investor = "Peter Jones" ORDER BY COUNT(Date_of_Birth)
nvbench
CREATE TABLE table_name_14 ( country VARCHAR, score VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What country has a score of 73-72-67=212?
SELECT country FROM table_name_14 WHERE score = 73 - 72 - 67 = 212
sql_create_context
CREATE TABLE employees ( EMPLOYEE_ID decimal(6,0), FIRST_NAME varchar(20), LAST_NAME varchar(25), EMAIL varchar(25), PHONE_NUMBER varchar(20), HIRE_DATE date, JOB_ID varchar(10), SALARY decimal(8,2), COMMISSION_PCT decimal(2,2), MANAGER_ID decimal(6,0), DEPARTMENT_ID decimal(...
SELECT HIRE_DATE, SALARY FROM employees WHERE NOT EMPLOYEE_ID IN (SELECT EMPLOYEE_ID FROM job_history) ORDER BY HIRE_DATE
nvbench
CREATE TABLE table_name_77 ( elevation__ft_ INTEGER, isolation VARCHAR, range VARCHAR, peak_name VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- WHAT IS THE ELEVATION OF THE UNAKA MOUNTAINS, IN ROAN HIGH BLUFF PEAK, AND ISOLATION LARGER THAN 1.54?
SELECT AVG(elevation__ft_) FROM table_name_77 WHERE range = "unaka mountains" AND peak_name = "roan high bluff" AND isolation > 1.54
sql_create_context
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 MAX(vitalperiodic.sao2) FROM vitalperiodic WHERE vitalperiodic.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '022-199074' AND patient.hospitaldischargetime IS NULL)) A...
eicu
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 JOIN t_kc22 ON t_kc21.MED_CLINIC_ID = t_kc22.MED_CLINIC_ID WHERE t_kc21.PERSON_NM = '柏曼衍' AND t_kc22.STA_DATE BETWEEN '2003-11-01' AND '2008-06-26' AND t_kc21.MED_SER_ORG_NO = '8406678' AND t_kc22.MED_INV_ITEM_TYPE = '西药费'
css
CREATE TABLE table_16380 ( "No. in series" real, "No. in season" real, "Title" text, "Director" text, "Writer(s)" text, "Original air date" text, "Production code" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- when did 'unpleasantville' air...
SELECT "Original air date" FROM table_16380 WHERE "Title" = 'Unpleasantville'
wikisql
CREATE TABLE d_icd_procedures ( row_id number, icd9_code text, short_title text, long_title text ) CREATE TABLE outputevents ( row_id number, subject_id number, hadm_id number, icustay_id number, charttime time, itemid number, value number ) CREATE TABLE d_icd_diagnoses ( ...
SELECT (SELECT chartevents.valuenum FROM chartevents WHERE chartevents.icustay_id IN (SELECT icustays.icustay_id FROM icustays WHERE icustays.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 23070)) AND chartevents.itemid IN (SELECT d_items.itemid FROM d_items WHERE d_items.label = 'a...
mimic_iii
CREATE TABLE table_34188 ( "School" text, "Location" text, "Mascot" text, "Enrollment" real, "IHSAA Class" text, "# / County" text, "Year joined" real, "Previous conference" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which IHSAA Clas...
SELECT "IHSAA Class" FROM table_34188 WHERE "Mascot" = 'wildcats'
wikisql
CREATE TABLE table_19758 ( "Result" text, "Date" text, "Race" text, "Venue" text, "Group" text, "Distance" text, "Weight (kg)" text, "Jockey" text, "Winner/2nd" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the group name wh...
SELECT "Group" FROM table_19758 WHERE "Race" = '3yo Hcp Restricted Maiden'
wikisql
CREATE TABLE table_16376436_1 ( college VARCHAR, player VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which college did Leon Perry attend?
SELECT college FROM table_16376436_1 WHERE player = "Leon Perry"
sql_create_context
CREATE TABLE table_59333 ( "Date" text, "Tournament" text, "Surface" text, "Opponent" text, "Score" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is Score, when Opponent is 'Daniel Gimeno-Traver'?
SELECT "Score" FROM table_59333 WHERE "Opponent" = 'daniel gimeno-traver'
wikisql
CREATE TABLE table_70498 ( "Team 1" text, "Agg." text, "Team 2" text, "1st leg" text, "2nd leg" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What was the aggregate score that had Union Douala as Team 1?
SELECT "Agg." FROM table_70498 WHERE "Team 1" = 'union douala'
wikisql
CREATE TABLE captain ( captain_id number, name text, ship_id number, age text, class text, rank text ) CREATE TABLE ship ( ship_id number, name text, type text, built_year number, class text, flag text ) -- Using valid SQLite, answer the following questions for the tab...
SELECT rank FROM captain WHERE class = 'Cutter' INTERSECT SELECT rank FROM captain WHERE class = 'Armed schooner'
spider