instruction
stringlengths
151
7.46k
output
stringlengths
2
4.44k
source
stringclasses
26 values
CREATE TABLE table_name_21 ( track VARCHAR, translation VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Name the total number of tracks for of the fallen angel
SELECT COUNT(track) FROM table_name_21 WHERE translation = "the fallen angel"
sql_create_context
CREATE TABLE table_14937957_1 ( original_airdate VARCHAR, episode__number VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- How many times did episode 1.8 air?
SELECT COUNT(original_airdate) FROM table_14937957_1 WHERE episode__number = "1.8"
sql_create_context
CREATE TABLE table_8172 ( "Tie no" text, "Home team" text, "Score" text, "Away team" text, "Attendance" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the attendance with a 45 tie no.?
SELECT "Attendance" FROM table_8172 WHERE "Tie no" = '45'
wikisql
CREATE TABLE table_1478 ( "Player" text, "Team" text, "Matches" real, "Innings" real, "Runs" real, "Average" text, "Highest Score" text, "100s" real, "50s" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What was the score when Donald...
SELECT "Highest Score" FROM table_1478 WHERE "Innings" = '9' AND "Player" = 'Donald Bradman'
wikisql
CREATE TABLE table_7613 ( "Kansas State vs." text, "Games played" text, "Overall Record" text, "Last 5 Meetings" text, "Last 10 Meetings" text, "Current Streak" text, "Last Meeting" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the ...
SELECT "Last 5 Meetings" FROM table_7613 WHERE "Current Streak" = 'w 5' AND "Last Meeting" = '3/18/2010'
wikisql
CREATE TABLE table_name_12 ( date_outgoing VARCHAR, outgoing_manager VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- When did Peter Butler leave his team?
SELECT date_outgoing FROM table_name_12 WHERE outgoing_manager = "peter butler"
sql_create_context
CREATE TABLE table_13151 ( "Elected" text, "Assembled" text, "Dissolved" text, "1st member" text, "2nd member" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the assembled date of the parliament dissolved on 9 February 1611 and elected in 16...
SELECT "Assembled" FROM table_13151 WHERE "Dissolved" = '9 february 1611' AND "Elected" = '1606'
wikisql
CREATE TABLE cinema ( Cinema_ID int, Name text, Openning_year int, Capacity int, Location text ) CREATE TABLE schedule ( Cinema_ID int, Film_ID int, Date text, Show_times_per_day int, Price float ) CREATE TABLE film ( Film_ID int, Rank_in_series int, Number_in_seaso...
SELECT Directed_by, COUNT(*) FROM film GROUP BY Directed_by ORDER BY Directed_by DESC
nvbench
CREATE TABLE table_37625 ( "Type" text, "Owns" text, "Length" text, "Delivery Date" text, "Gross Tonnage" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- with delivery date 1997 1997 what is the owns?
SELECT "Owns" FROM table_37625 WHERE "Delivery Date" = '1997 1997'
wikisql
CREATE TABLE table_48960 ( "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 team was the away team when the home team was Grimsby Town?
SELECT "Away team" FROM table_48960 WHERE "Home team" = 'grimsby town'
wikisql
CREATE TABLE table_6971 ( "Outcome" text, "Date" text, "Tournament" text, "Surface" text, "Partner" text, "Opponents" text, "Score" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which Opponents has a Score of 6 3, 6 4, 6 1?
SELECT "Opponents" FROM table_6971 WHERE "Score" = '6–3, 6–4, 6–1'
wikisql
CREATE TABLE state ( state_code text, state_name text, country_name text ) CREATE TABLE code_description ( code varchar, description text ) CREATE TABLE airport_service ( city_code varchar, airport_code varchar, miles_distant int, direction varchar, minutes_distant int ) CREAT...
SELECT DISTINCT flight.flight_id FROM airport_service AS AIRPORT_SERVICE_0, airport_service AS AIRPORT_SERVICE_1, city AS CITY_0, city AS CITY_1, date_day, days, flight WHERE (((date_day.day_number = 21 AND date_day.month_number = 2 AND date_day.year = 1991 AND days.day_name = date_day.day_name AND flight.airline_code ...
atis
CREATE TABLE table_name_17 ( years VARCHAR, duration VARCHAR, character VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- what is the years when the duration is 13 years and the character is renee phelan?
SELECT years FROM table_name_17 WHERE duration = "13 years" AND character = "renee phelan"
sql_create_context
CREATE TABLE table_name_33 ( date VARCHAR, tie_no VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is Date, when Tie no is '3'?
SELECT date FROM table_name_33 WHERE tie_no = "3"
sql_create_context
CREATE TABLE table_name_6 ( date VARCHAR, week VARCHAR, attendance VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which date has a Week larger than 5, and an Attendance of 54,803?
SELECT date FROM table_name_6 WHERE week > 5 AND attendance = "54,803"
sql_create_context
CREATE TABLE table_name_87 ( rank VARCHAR, date_of_official_foundation_of_municipality VARCHAR, province VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the total number of Rank, when Date of Official Foundation of Municipality is after 1926, when...
SELECT COUNT(rank) FROM table_name_87 WHERE date_of_official_foundation_of_municipality > 1926 AND province = "sistan and baluchestan" AND 2006 > 567449
sql_create_context
CREATE TABLE table_60021 ( "Date" text, "Result" text, "Competition" text, "Venue" text, "Attendance" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which Competition has a Result of france 46-16 scotland?
SELECT "Competition" FROM table_60021 WHERE "Result" = 'france 46-16 scotland'
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 procedures ( ...
SELECT diagnoses.icd9_code, diagnoses.long_title FROM diagnoses WHERE diagnoses.subject_id = "42067"
mimicsql_data
CREATE TABLE table_name_50 ( language VARCHAR, television_service VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the language of the television service cartello promozionale sky hd?
SELECT language FROM table_name_50 WHERE television_service = "cartello promozionale sky hd"
sql_create_context
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 YEAR(q.CreationDate) + MONTH(q.CreationDate) / 12.0 AS "m", ROUND(COUNT(q.AcceptedAnswerId) * 100.0 / COUNT(*), 2) AS "global_%_accepted" FROM Posts AS q WHERE q.PostTypeId = 1 GROUP BY YEAR(q.CreationDate), MONTH(q.CreationDate) ORDER BY YEAR(q.CreationDate), MONTH(q.CreationDate)
sede
CREATE TABLE table_30134667_2 ( fastest_lap VARCHAR, location VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Who had the fastest lap in bowmanville, ontario?
SELECT fastest_lap FROM table_30134667_2 WHERE location = "Bowmanville, Ontario"
sql_create_context
CREATE TABLE table_name_39 ( ceremony VARCHAR, name VARCHAR, award VARCHAR, outcome VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the category Anuya Bhagvath was nominated for at vijay award?
SELECT ceremony FROM table_name_39 WHERE award = "vijay award" AND outcome = "nominated" AND name = "anuya bhagvath"
sql_create_context
CREATE TABLE Locations ( Location_ID INTEGER, Other_Details VARCHAR(255) ) CREATE TABLE Channels ( Channel_ID INTEGER, Other_Details VARCHAR(255) ) CREATE TABLE Parties ( Party_ID INTEGER, Party_Details VARCHAR(255) ) CREATE TABLE Parties_in_Events ( Party_ID INTEGER, Event_ID INTEGER...
SELECT Product_Name, COUNT(*) FROM Products AS T1 JOIN Products_in_Events AS T2 ON T1.Product_ID = T2.Product_ID GROUP BY T1.Product_Name ORDER BY COUNT(*)
nvbench
CREATE TABLE procedures_icd ( row_id number, subject_id number, hadm_id number, icd9_code text, charttime time ) CREATE TABLE d_labitems ( row_id number, itemid number, label text ) CREATE TABLE patients ( row_id number, subject_id number, gender text, dob time, dod...
SELECT d_labitems.label FROM d_labitems WHERE d_labitems.itemid IN (SELECT t3.itemid FROM (SELECT t2.itemid, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM (SELECT admissions.subject_id, procedures_icd.charttime FROM procedures_icd JOIN admissions ON procedures_icd.hadm_id = admissions.hadm_id WHERE procedures_i...
mimic_iii
CREATE TABLE Badges ( Id number, UserId number, Name text, Date time, Class number, TagBased boolean ) CREATE TABLE CloseAsOffTopicReasonTypes ( Id number, IsUniversal boolean, InputTitle text, MarkdownInputGuidance text, MarkdownPostOwnerGuidance text, MarkdownPrivilege...
SELECT Id, TagName, 'count' FROM Tags ORDER BY 'count' DESC
sede
CREATE TABLE jybgb ( YLJGDM text, YLJGDM_MZJZJLB text, YLJGDM_ZYJZJLB text, BGDH text, BGRQ time, JYLX number, JZLSH text, JZLSH_MZJZJLB text, JZLSH_ZYJZJLB text, JZLX number, KSBM text, KSMC text, SQRGH text, SQRXM text, BGRGH text, BGRXM text, SHRGH ...
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 = '矽肺(硅肺)I期' AND jyjgzbb.JCZBMC = '脂蛋白(a)二代'
css
CREATE TABLE lab ( labid number, patientunitstayid number, labname text, labresult number, labresulttime time ) CREATE TABLE intakeoutput ( intakeoutputid number, patientunitstayid number, cellpath text, celllabel text, cellvaluenumeric number, intakeoutputtime time ) CREAT...
SELECT COUNT(*) > 0 FROM microlab WHERE microlab.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '025-44495')) AND STRFTIME('%y-%m', microlab.culturetakentime) >= '2105-10'
eicu
CREATE TABLE table_name_18 ( score VARCHAR, loss VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What was the score when the game has a loss of Lary (10-12)?
SELECT score FROM table_name_18 WHERE loss = "lary (10-12)"
sql_create_context
CREATE TABLE table_58620 ( "Polling Firm" text, "Polling Dates" text, "Bob Chiarelli" text, "Alex Munter" text, "Larry O'Brien" text, "Terry Kilrea (dropped out)" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What dates does Alex Munter have 25...
SELECT "Polling Dates" FROM table_58620 WHERE "Alex Munter" = '25%' AND "Polling Firm" = 'decima'
wikisql
CREATE TABLE ReviewTaskResultTypes ( Id number, Name text, Description text ) CREATE TABLE CloseAsOffTopicReasonTypes ( Id number, IsUniversal boolean, InputTitle text, MarkdownInputGuidance text, MarkdownPostOwnerGuidance text, MarkdownPrivilegedUserGuidance text, MarkdownConce...
SELECT Users.Id AS "user_link", Users.Reputation AS "total_rep", SUM(Posts.Score) * 10 + COUNT(Posts.AcceptedAnswerId) * 15 AS "answer_rep" FROM Users INNER JOIN Posts ON Posts.OwnerUserId = Users.Id WHERE Posts.PostTypeId = 2 AND Posts.CommunityOwnedDate IS NULL GROUP BY Users.Reputation, Users.Id ORDER BY 'answer_rep...
sede
CREATE TABLE table_20026849_1 ( season INTEGER, contestants VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What was the latest season with 20 contestants?
SELECT MAX(season) FROM table_20026849_1 WHERE contestants = 20
sql_create_context
CREATE TABLE field ( fieldid int ) CREATE TABLE cite ( citingpaperid int, citedpaperid int ) CREATE TABLE paperdataset ( paperid int, datasetid int ) CREATE TABLE dataset ( datasetid int, datasetname varchar ) CREATE TABLE paperkeyphrase ( paperid int, keyphraseid int ) CREATE T...
SELECT DISTINCT paper.paperid FROM author, paper, venue, writes WHERE author.authorname = 'anne rose' AND venue.venueid = paper.venueid AND venue.venuename = 'chi' AND writes.authorid = author.authorid AND writes.paperid = paper.paperid
scholar
CREATE TABLE table_name_32 ( lost INTEGER, team VARCHAR, against VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- How many losses have corinthians as the team, with an against greater than 26?
SELECT SUM(lost) FROM table_name_32 WHERE team = "corinthians" AND against > 26
sql_create_context
CREATE TABLE table_name_77 ( name VARCHAR, reserved_for___sc___st__none_ VARCHAR, constituency_number VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the name when the reserved is (sc / st /none) of st, with a constituency number 196?
SELECT name FROM table_name_77 WHERE reserved_for___sc___st__none_ = "st" AND constituency_number = "196"
sql_create_context
CREATE TABLE table_28104 ( "Company" text, "Name" text, "County" text, "Militia Regiment" text, "Commander" text, "Organization Date" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Name the name for company d
SELECT "Name" FROM table_28104 WHERE "Company" = 'Company D'
wikisql
CREATE TABLE bdmzjzjlb ( CYBQDM text, CYBQMC text, CYCWH text, CYKSDM text, CYKSMC text, CYSJ time, CYZTDM number, HZXM text, JZKSDM text, JZKSMC text, JZLSH number, KH text, KLX number, MZBMLX number, MZJZLSH text, MZZDBM text, MZZDMC text, MZZYZD...
SELECT COUNT(*) FROM bdmzjzjlb WHERE bdmzjzjlb.ZYBMLX = '1438612' AND bdmzjzjlb.RYDJSJ BETWEEN '2001-07-24' AND '2018-05-18'
css
CREATE TABLE table_name_98 ( qual_1 VARCHAR, qual_2 VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which Qual 1 has a Qual 2 of 58.861?
SELECT qual_1 FROM table_name_98 WHERE qual_2 = "58.861"
sql_create_context
CREATE TABLE table_train_143 ( "id" int, "gender" string, "systolic_blood_pressure_sbp" int, "agitation" bool, "npi" int, "aggression_domain" bool, "delusions_hallucinations" bool, "pulse_rate" int, "fridericia_corrected_qt_interval_qtcf" int, "diastolic_blood_pressure_dbp" int, ...
SELECT * FROM table_train_143 WHERE kidney_disease = 1 OR liver_disease = 1
criteria2sql
CREATE TABLE table_name_55 ( date VARCHAR, score VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which Date has a Score of 0 2?
SELECT date FROM table_name_55 WHERE score = "0 – 2"
sql_create_context
CREATE TABLE table_35515 ( "Manufacturer" text, "Model" text, "Quantity" real, "Introduced" real, "Retired" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- How many in the quantity section had Fokker as a manufacturer and retired later than 1999?
SELECT COUNT("Quantity") FROM table_35515 WHERE "Manufacturer" = 'fokker' AND "Retired" > '1999'
wikisql
CREATE TABLE table_4117 ( "Series #" real, "Season #" real, "Title" text, "Directed by" text, "Written by" text, "Original air date" text, "Production code" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- How many original air dates did the e...
SELECT COUNT("Original air date") FROM table_4117 WHERE "Directed by" = 'Bethany Rooney'
wikisql
CREATE TABLE cost ( row_id number, subject_id number, hadm_id number, event_type text, event_id number, chargetime time, cost number ) CREATE TABLE diagnoses_icd ( row_id number, subject_id number, hadm_id number, icd9_code text, charttime time ) CREATE TABLE chartevent...
SELECT COUNT(DISTINCT admissions.subject_id) FROM admissions WHERE admissions.hadm_id IN (SELECT icustays.hadm_id FROM icustays WHERE icustays.icustay_id IN (SELECT inputevents_cv.icustay_id FROM inputevents_cv WHERE inputevents_cv.itemid IN (SELECT d_items.itemid FROM d_items WHERE d_items.label = 'lipids' AND d_items...
mimic_iii
CREATE TABLE table_55482 ( "Club" text, "City" text, "Stadium" text, "Capacity" real, "2006-2007 season" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What city in the 06/07 season had cagliari and finished 16th in serie a?
SELECT "City" FROM table_55482 WHERE "2006-2007 season" = '16th in serie a' AND "Club" = 'cagliari'
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 Code, Manufacturer FROM Products WHERE Price BETWEEN 60 AND 120
nvbench
CREATE TABLE table_26614365_1 ( eastern VARCHAR, english VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the eastern word for 'light'?
SELECT eastern FROM table_26614365_1 WHERE english = "light"
sql_create_context
CREATE TABLE table_53395 ( "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 did the home team score 14.22 (106)?
SELECT "Date" FROM table_53395 WHERE "Home team score" = '14.22 (106)'
wikisql
CREATE TABLE zyjzjlb ( CYBQDM text, CYBQMC text, CYCWH text, CYKSDM text, CYKSMC text, CYSJ time, CYZTDM number, HZXM text, JZKSDM text, JZKSMC text, JZLSH text, KH text, KLX number, MZBMLX number, MZJZLSH text, MZZDBM text, MZZDMC text, MZZYZDZZBM...
SELECT mzjzjlb.JZLSH FROM hz_info JOIN mzjzjlb ON hz_info.YLJGDM = mzjzjlb.YLJGDM AND hz_info.KH = mzjzjlb.KH AND hz_info.KLX = mzjzjlb.KLX WHERE hz_info.RYBH = '96787952' AND hz_info.YLJGDM = '6798205' AND mzjzjlb.JZKSMC LIKE '%手外科%'
css
CREATE TABLE table_name_18 ( team VARCHAR, result VARCHAR, interim_head_coach VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which team lost under interim head coach, Dewayne Walker?
SELECT team FROM table_name_18 WHERE result = "lost" AND interim_head_coach = "dewayne walker"
sql_create_context
CREATE TABLE table_name_47 ( track VARCHAR, year VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What's the track for 1978?
SELECT track FROM table_name_47 WHERE year = 1978
sql_create_context
CREATE TABLE has_amenity ( dormid number, amenid number ) CREATE TABLE dorm ( dormid number, dorm_name text, student_capacity number, gender text ) CREATE TABLE student ( stuid number, lname text, fname text, age number, sex text, major number, advisor number, c...
SELECT COUNT(*) FROM student
spider
CREATE TABLE table_name_50 ( year INTEGER, program_title VARCHAR, score VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What was the latest year placement for Taboo with a score smaller than 96.125?
SELECT MAX(year) FROM table_name_50 WHERE program_title = "taboo" AND score < 96.125
sql_create_context
CREATE TABLE business ( bid int, business_id varchar, name varchar, full_address varchar, city varchar, latitude varchar, longitude varchar, review_count bigint, is_open tinyint, rating float, state varchar ) CREATE TABLE tip ( tip_id int, business_id varchar, te...
SELECT COUNT(DISTINCT (business.name)) FROM business, category WHERE business.city = 'Madison' AND category.business_id = business.business_id AND category.category_name = 'preschools'
yelp
CREATE TABLE table_name_64 ( link VARCHAR, date_of_polling VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the link for january 31 february 3, 2011?
SELECT link FROM table_name_64 WHERE date_of_polling = "january 31 – february 3, 2011"
sql_create_context
CREATE TABLE procedures_icd ( row_id number, subject_id number, hadm_id number, icd9_code text, charttime time ) CREATE TABLE d_icd_diagnoses ( row_id number, icd9_code text, short_title text, long_title text ) CREATE TABLE transfers ( row_id number, subject_id number, ...
SELECT MAX(labevents.valuenum) FROM labevents WHERE labevents.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 85895) AND labevents.itemid IN (SELECT d_labitems.itemid FROM d_labitems WHERE d_labitems.label = 'specific gravity') AND DATETIME(labevents.charttime, 'start of month') = DA...
mimic_iii
CREATE TABLE flight_leg ( flight_id int, leg_number int, leg_flight int ) CREATE TABLE fare ( fare_id int, from_airport varchar, to_airport varchar, fare_basis_code text, fare_airline text, restriction_code text, one_direction_cost int, round_trip_cost int, round_trip_re...
SELECT DISTINCT flight.flight_id FROM airport, flight WHERE airport.airport_code = 'DAL' AND flight.from_airport = airport.airport_code
atis
CREATE TABLE procedures_icd ( row_id number, subject_id number, hadm_id number, icd9_code text, charttime time ) CREATE TABLE diagnoses_icd ( row_id number, subject_id number, hadm_id number, icd9_code text, charttime time ) CREATE TABLE labevents ( row_id number, subje...
SELECT MIN(t1.c1) FROM (SELECT SUM(cost.cost) AS c1 FROM cost WHERE cost.hadm_id IN (SELECT labevents.hadm_id FROM labevents WHERE labevents.itemid IN (SELECT d_labitems.itemid FROM d_labitems WHERE d_labitems.label = 'rbc, pleural')) AND DATETIME(cost.chargetime, 'start of year') = DATETIME(CURRENT_TIME(), 'start of y...
mimic_iii
CREATE TABLE table_name_78 ( country VARCHAR, notes VARCHAR, athlete VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is Alan Campbell's Country with Notes of FA?
SELECT country FROM table_name_78 WHERE notes = "fa" AND athlete = "alan campbell"
sql_create_context
CREATE TABLE table_63943 ( "Position" real, "Team" text, "Played" real, "Wins" real, "Draws P.K. Wins / P.K. Losses" text, "Losses" real, "Scored" real, "Conceded" real, "Points" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is...
SELECT MIN("Played") FROM table_63943 WHERE "Draws P.K. Wins / P.K. Losses" = '3/0' AND "Points" > '18'
wikisql
CREATE TABLE table_name_6 ( engine VARCHAR, points VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the engine for the car with 3 points?
SELECT engine FROM table_name_6 WHERE points = 3
sql_create_context
CREATE TABLE table_name_62 ( points_for VARCHAR, tries_for VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Name the points with tries for of 40
SELECT points_for FROM table_name_62 WHERE tries_for = "40"
sql_create_context
CREATE TABLE table_name_39 ( tournament VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is 2011, when Tournament is 'Year-End Ranking'?
SELECT 2011 FROM table_name_39 WHERE tournament = "year-end ranking"
sql_create_context
CREATE TABLE table_60043 ( "7:00 am" text, "7:30 am" text, "8:00 am" text, "9:00 am" text, "10:00 am" text, "11:00 am" text, "noon" text, "12:30 pm" text, "1:00 pm" text, "1:30 pm" text, "2:00 pm" text, "3:00 pm" text, "4:00 pm" text, "4:30 pm" text, "5:00 pm"...
SELECT "6:30 pm" FROM table_60043 WHERE "9:00 am" = 'local programs' AND "8:00 am" = 'the early show'
wikisql
CREATE TABLE ReviewTasks ( Id number, ReviewTaskTypeId number, CreationDate time, DeletionDate time, ReviewTaskStateId number, PostId number, SuggestedEditId number, CompletedByReviewTaskId number ) CREATE TABLE PostFeedback ( Id number, PostId number, IsAnonymous boolean, ...
SELECT DATEADD(mm, (YEAR(Posts.CreationDate) - 1900) * 12 + MONTH(Posts.CreationDate) - 1, 0) AS Month, Tags.TagName, SUM(Posts.ViewCount) AS Views FROM Tags LEFT JOIN PostTags ON PostTags.TagId = Tags.Id LEFT JOIN Posts ON Posts.Id = PostTags.PostId LEFT JOIN PostTypes ON PostTypes.Id = Posts.PostTypeId WHERE Tags.Tag...
sede
CREATE TABLE qtb ( 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(zyb.MED_CLINIC_ID) FROM zyb WHERE zyb.MED_ORG_DEPT_NM = '9918' AND zyb.IN_HOSP_DAYS BETWEEN '2006-08-27' AND '2014-06-14' AND zyb.IN_DIAG_DIS_NM = 'F35.173'
css
CREATE TABLE table_name_52 ( opponent VARCHAR, venue VARCHAR, year VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Name the opponent for 1996 at the mt smart stadium venue
SELECT opponent FROM table_name_52 WHERE venue = "mt smart stadium" AND year = 1996
sql_create_context
CREATE TABLE zyjzjlb ( CYBQDM text, CYBQMC text, CYCWH text, CYKSDM text, CYKSMC text, CYSJ time, CYZTDM number, HZXM text, JZKSDM text, JZKSMC text, JZLSH text, KH text, KLX number, MZBMLX number, MZJZLSH text, MZZDBM text, MZZDMC text, MZZYZDZZBM...
SELECT zyjybgb.BGDH FROM zyjybgb WHERE zyjybgb.JZLSH = '67577996810' AND NOT zyjybgb.KSMC LIKE '%科%' UNION SELECT mzjybgb.BGDH FROM mzjybgb WHERE mzjybgb.JZLSH = '67577996810' AND NOT mzjybgb.KSMC LIKE '%科%'
css
CREATE TABLE table_18628 ( "District" text, "Incumbent" text, "Party" text, "First elected" real, "Result" text, "Candidates" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What was the result of the Tennessee 2 district election?
SELECT "Result" FROM table_18628 WHERE "District" = 'Tennessee 2'
wikisql
CREATE TABLE Companies ( id int, name text, Headquarters text, Industry text, Sales_billion real, Profits_billion real, Assets_billion real, Market_Value_billion text ) CREATE TABLE buildings ( id int, name text, City text, Height int, Stories int, Status text ) ...
SELECT name, Assets_billion FROM Companies ORDER BY name
nvbench
CREATE TABLE table_2562572_5 ( city___municipality VARCHAR, urban_settlement VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Name the city for kanji a
SELECT city___municipality FROM table_2562572_5 WHERE urban_settlement = "Kanjiža"
sql_create_context
CREATE TABLE table_name_3 ( series VARCHAR, home VARCHAR, date VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which series is based in Toronto on may 18?
SELECT series FROM table_name_3 WHERE home = "toronto" AND date = "may 18"
sql_create_context
CREATE TABLE table_name_81 ( co_drivers VARCHAR, year VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Who were the co-drivers in 2008?
SELECT co_drivers FROM table_name_81 WHERE year = 2008
sql_create_context
CREATE TABLE chartevents ( row_id number, subject_id number, hadm_id number, icustay_id number, itemid number, charttime time, valuenum number, valueuom text ) CREATE TABLE diagnoses_icd ( row_id number, subject_id number, hadm_id number, icd9_code text, charttime ti...
SELECT admissions.admittime FROM admissions WHERE admissions.subject_id = 54390 AND DATETIME(admissions.admittime) <= DATETIME(CURRENT_TIME(), '-3 year') ORDER BY admissions.admittime DESC LIMIT 1
mimic_iii
CREATE TABLE equipment_sequence ( aircraft_code_sequence varchar, aircraft_code varchar ) CREATE TABLE code_description ( code varchar, description text ) CREATE TABLE class_of_service ( booking_class varchar, rank int, class_description text ) CREATE TABLE date_day ( month_number int...
SELECT DISTINCT flight.flight_id FROM aircraft, airport_service AS AIRPORT_SERVICE_0, airport_service AS AIRPORT_SERVICE_1, city AS CITY_0, city AS CITY_1, equipment_sequence, flight WHERE (aircraft.basic_type = '737' AND aircraft.manufacturer = 'BOEING' AND CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.cit...
atis
CREATE TABLE table_name_79 ( result VARCHAR, week VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What was week 3 score?
SELECT result FROM table_name_79 WHERE week = 3
sql_create_context
CREATE TABLE table_34411 ( "Game" real, "December" real, "Opponent" text, "Score" text, "Record" text, "Points" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which Game has Points of 53, and an Opponent of @ minnesota north stars, and a Decembe...
SELECT AVG("Game") FROM table_34411 WHERE "Points" = '53' AND "Opponent" = '@ minnesota north stars' AND "December" > '30'
wikisql
CREATE TABLE cite ( citingpaperid int, citedpaperid int ) CREATE TABLE keyphrase ( keyphraseid int, keyphrasename varchar ) CREATE TABLE paperkeyphrase ( paperid int, keyphraseid int ) CREATE TABLE writes ( paperid int, authorid int ) CREATE TABLE author ( authorid int, autho...
SELECT DISTINCT keyphrase.keyphraseid FROM author, keyphrase, paper, paperkeyphrase, writes WHERE author.authorname = 'kaiming he' AND paperkeyphrase.keyphraseid = keyphrase.keyphraseid AND paper.paperid = paperkeyphrase.paperid AND writes.authorid = author.authorid AND writes.paperid = paper.paperid
scholar
CREATE TABLE table_1356555_2 ( per_capita_income VARCHAR, county VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the per capita income of shasta?
SELECT per_capita_income FROM table_1356555_2 WHERE county = "Shasta"
sql_create_context
CREATE TABLE table_name_51 ( examples VARCHAR, australian VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What are the examples for the Australian ?
SELECT examples FROM table_name_51 WHERE australian = "æ"
sql_create_context
CREATE TABLE table_75872 ( "Date" text, "Opponent" text, "Location" text, "Score" text, "Loss" text, "Record" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What was the location of the game when the record was 12-4?
SELECT "Location" FROM table_75872 WHERE "Record" = '12-4'
wikisql
CREATE TABLE table_name_3 ( year INTEGER, genre VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which Year has a Genre of rock (track)?
SELECT SUM(year) FROM table_name_3 WHERE genre = "rock (track)"
sql_create_context
CREATE TABLE university ( School_ID int, School text, Location text, Founded real, Affiliation text, Enrollment real, Nickname text, Primary_conference text ) CREATE TABLE basketball_match ( Team_ID int, School_ID int, Team_Name text, ACC_Regular_Season text, ACC_Per...
SELECT All_Neutral, ACC_Percent FROM basketball_match
nvbench
CREATE TABLE table_name_6 ( name VARCHAR, street_address VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What name has 100 w. pender st. as the address?
SELECT name FROM table_name_6 WHERE street_address = "100 w. pender st."
sql_create_context
CREATE TABLE table_25794138_1 ( capacity INTEGER, stadium VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What was the maximum capacity of larry gomes stadium?
SELECT MAX(capacity) FROM table_25794138_1 WHERE stadium = "Larry Gomes stadium"
sql_create_context
CREATE TABLE table_name_76 ( frequency VARCHAR, call_sign VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the frequency of KQLX?
SELECT frequency FROM table_name_76 WHERE call_sign = "kqlx"
sql_create_context
CREATE TABLE table_name_73 ( date VARCHAR, score VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- When was the score 7-1?
SELECT date FROM table_name_73 WHERE score = "7-1"
sql_create_context
CREATE TABLE table_name_47 ( kilgore__r_ VARCHAR, date VARCHAR, potts__i_ VARCHAR, kaine__d_ VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What was Kilgore's percentage when Potts (I) had 4% and Kaine (D) 47%, in the poll from October 30, 2005?
SELECT kilgore__r_ FROM table_name_47 WHERE potts__i_ = "4%" AND kaine__d_ = "47%" AND date = "october 30, 2005"
sql_create_context
CREATE TABLE table_62421 ( "Pick #" real, "Player" text, "Nationality" text, "Position" text, "Team from" text, "League from" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which League from has a Position of lw, a Pick # larger than 34, and a P...
SELECT "League from" FROM table_62421 WHERE "Position" = 'lw' AND "Pick #" > '34' AND "Player" = 'bradley ross'
wikisql
CREATE TABLE table_74545 ( "Name" text, "NT Career" text, "Played" real, "Drawn" real, "Lost" real, "Win %" real, "Drawn %" real, "Lost %" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- How many values for Lost% occur when the value for ...
SELECT COUNT("Lost %") FROM table_74545 WHERE "Drawn" = '8' AND "Lost" < '14'
wikisql
CREATE TABLE table_5561 ( "Date" text, "Opponent" text, "Score" text, "Loss" text, "Attendance" real, "Record" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What date has 79-48 as the record?
SELECT "Date" FROM table_5561 WHERE "Record" = '79-48'
wikisql
CREATE TABLE diagnosis ( diagnosisid number, patientunitstayid number, diagnosisname text, diagnosistime time, icd9code text ) CREATE TABLE treatment ( treatmentid number, patientunitstayid number, treatmentname text, treatmenttime time ) CREATE TABLE vitalperiodic ( vitalperio...
SELECT t2.drugname FROM (SELECT patient.uniquepid, treatment.treatmenttime FROM treatment JOIN patient ON treatment.patientunitstayid = patient.patientunitstayid WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '021-93953' AND NOT patient.hospit...
eicu
CREATE TABLE table_29216 ( "Pick #" real, "CFL Team" text, "Player" text, "Position" text, "College" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What was Barry Jamieson's pick number?
SELECT MAX("Pick #") FROM table_29216 WHERE "Player" = 'Barry Jamieson'
wikisql
CREATE TABLE table_name_11 ( wins INTEGER, class VARCHAR, year VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What are the most wins in 1971 in 250cc class?
SELECT MAX(wins) FROM table_name_11 WHERE class = "250cc" AND year = 1971
sql_create_context
CREATE TABLE Ref_Service_Types ( Service_Type_Code CHAR(15), Parent_Service_Type_Code CHAR(15), Service_Type_Description VARCHAR(255) ) CREATE TABLE Bookings ( Booking_ID INTEGER, Customer_ID INTEGER, Workshop_Group_ID VARCHAR(100), Status_Code CHAR(15), Store_ID INTEGER, Order_Date...
SELECT Service_Type_Description, COUNT(*) FROM Ref_Service_Types AS T1 JOIN Services AS T2 ON T1.Service_Type_Code = T2.Service_Type_Code GROUP BY T2.Service_Type_Code
nvbench
CREATE TABLE table_name_6 ( international_tourist_arrivals__2011_ VARCHAR, international_tourist_arrivals__2012_ VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- In 2011, how many tourists visited the country that had 23.4 million tourists in 2012?
SELECT international_tourist_arrivals__2011_ FROM table_name_6 WHERE international_tourist_arrivals__2012_ = "23.4 million"
sql_create_context
CREATE TABLE table_72434 ( "District" text, "Incumbent" text, "Party" text, "First elected" real, "Result" text, "Candidates" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- what is the total number of results where the district is south carolina...
SELECT COUNT("Result") FROM table_72434 WHERE "District" = 'South Carolina 5'
wikisql
CREATE TABLE table_name_41 ( wins VARCHAR, series VARCHAR, season VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the value for Wins, when the Series is GP2 Series, and when the Season is before 2009?
SELECT wins FROM table_name_41 WHERE series = "gp2 series" AND season < 2009
sql_create_context
CREATE TABLE table_66029 ( "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 nation finished with 11 silver medals?
SELECT "Nation" FROM table_66029 WHERE "Silver" = '11'
wikisql
CREATE TABLE table_15081939_4 ( province VARCHAR, evening_gown VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- How many provinces have evening gown score of 8.49
SELECT COUNT(province) FROM table_15081939_4 WHERE evening_gown = "8.49"
sql_create_context
CREATE TABLE prescriptions ( subject_id text, hadm_id text, icustay_id text, drug_type text, drug text, formulary_drug_cd text, route text, drug_dose text ) CREATE TABLE diagnoses ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) C...
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE demographic.age < "62" AND prescriptions.route = "NG"
mimicsql_data
CREATE TABLE ta ( campus_job_id int, student_id int, location varchar ) CREATE TABLE gsi ( course_offering_id int, student_id int ) CREATE TABLE student ( student_id int, lastname varchar, firstname varchar, program_id int, declare_major varchar, total_credit int, total...
SELECT COUNT(*) FROM course, course_offering, semester WHERE course_offering.start_time > '10:00:00' AND course.course_id = course_offering.course_id AND course.department = 'PEDDENT' AND course.number = 598 AND semester.semester = 'WN' AND semester.semester_id = course_offering.semester AND semester.year = 2016
advising