instruction
stringlengths
151
7.46k
output
stringlengths
2
4.44k
source
stringclasses
26 values
CREATE TABLE table_72739 ( "Episode Number" real, "Air Date" text, "Guest Host" text, "Musical Guest (Song performed)" text, "Who knows the most about the guest host? Panelists" text, "Coat Of Cash Wearing Celebrity" text ) -- Using valid SQLite, answer the following questions for the tables p...
SELECT MIN("Episode Number") FROM table_72739 WHERE "Who knows the most about the guest host? Panelists" = 'Reggie Yates and Kelly Osbourne'
wikisql
CREATE TABLE PendingFlags ( Id number, FlagTypeId number, PostId number, CreationDate time, CloseReasonTypeId number, CloseAsOffTopicReasonTypeId number, DuplicateOfQuestionId number, BelongsOnBaseHostAddress text ) CREATE TABLE ReviewTaskResults ( Id number, ReviewTaskId number...
SELECT Users.Id AS "user_link", TagName, COUNT(*) AS UpVotes FROM Tags INNER JOIN PostTags ON PostTags.TagId = Tags.Id INNER JOIN Posts ON Posts.ParentId = PostTags.PostId INNER JOIN Votes ON Votes.PostId = Posts.Id AND VoteTypeId = 2 INNER JOIN Users ON Users.Id = Posts.OwnerUserId WHERE LOWER(Location) LIKE '%kottaya...
sede
CREATE TABLE actor ( Actor_ID int, Name text, Musical_ID int, Character text, Duration text, age int ) CREATE TABLE musical ( Musical_ID int, Name text, Year int, Award text, Category text, Nominee text, Result text ) -- Using valid SQLite, answer the following que...
SELECT Nominee, COUNT(*) FROM musical GROUP BY Nominee ORDER BY Nominee
nvbench
CREATE TABLE TagSynonyms ( Id number, SourceTagName text, TargetTagName text, CreationDate time, OwnerUserId number, AutoRenameCount number, LastAutoRename time, Score number, ApprovedByUserId number, ApprovalDate time ) CREATE TABLE ReviewRejectionReasons ( Id number, N...
SELECT Users.Id AS "user_link", QuestionCounts.PostsCount AS "number_of_questions", AnswerCounts.PostsCount AS "number_of_answers" FROM (SELECT OwnerUserId, COUNT(Id) AS PostsCount FROM Posts WHERE PostTypeId = 1 GROUP BY OwnerUserId) AS QuestionCounts, (SELECT OwnerUserId, COUNT(Id) AS PostsCount FROM Posts WHERE Post...
sede
CREATE TABLE video_games ( gameid number, gname text, gtype text ) CREATE TABLE sportsinfo ( stuid number, sportname text, hoursperweek number, gamesplayed number, onscholarship text ) CREATE TABLE student ( stuid number, lname text, fname text, age number, sex text...
SELECT stuid FROM sportsinfo INTERSECT SELECT stuid FROM plays_games
spider
CREATE TABLE table_203_348 ( id number, "number" number, "name" text, "team" text, "position" text, "years with franchise" text, "note" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- which nba team has more retired jerseys than any other nba...
SELECT "team" FROM table_203_348 GROUP BY "team" ORDER BY COUNT(*) DESC LIMIT 1
squall
CREATE TABLE table_54349 ( "Date" text, "Visitor" text, "Score" text, "Home" text, "Leading scorer" text, "Attendance" real, "Record" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which Visitor was there when the Home game was played in Mia...
SELECT "Visitor" FROM table_54349 WHERE "Home" = 'miami' AND "Date" = 'november 4'
wikisql
CREATE TABLE Activity ( actid INTEGER, activity_name varchar(25) ) CREATE TABLE Faculty ( FacID INTEGER, Lname VARCHAR(15), Fname VARCHAR(15), Rank VARCHAR(15), Sex VARCHAR(1), Phone INTEGER, Room VARCHAR(5), Building VARCHAR(13) ) CREATE TABLE Student ( StuID INTEGER, ...
SELECT activity_name, COUNT(*) FROM Activity AS T1 JOIN Faculty_Participates_in AS T2 ON T1.actid = T2.actid GROUP BY T1.actid ORDER BY COUNT(*)
nvbench
CREATE TABLE table_name_60 ( losses INTEGER, win__percentage VARCHAR, wins VARCHAR, team VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What's the lowest Losses recorded wiht a Wins of 1, Team of Dallas Stars, and a Win % that's smaller than 0.25?
SELECT MIN(losses) FROM table_name_60 WHERE wins = 1 AND team = "dallas stars" AND win__percentage < 0.25
sql_create_context
CREATE TABLE hz_info ( KH text, KLX number, YLJGDM text ) CREATE TABLE person_info ( CSD text, CSRQ time, GJDM text, GJMC text, JGDM text, JGMC text, MZDM text, MZMC text, RYBH text, XBDM number, XBMC text, XLDM text, XLMC text, XM text, ZYLBDM te...
SELECT jyjgzbb.JCZBJGDL, jyjgzbb.JCZBJGDW 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...
css
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.Manufacturer FROM Products AS T1 JOIN Manufacturers AS T2 ON T1.Manufacturer = T2.Code GROUP BY Founder, T1.Name ORDER BY T1.Manufacturer DESC
nvbench
CREATE TABLE program ( program_id int, name varchar, college varchar, introduction varchar ) CREATE TABLE program_requirement ( program_id int, category varchar, min_credit int, additional_req varchar ) CREATE TABLE student_record ( student_id int, course_id int, semester i...
SELECT DISTINCT department, name, number FROM course WHERE (description LIKE '%topic0%' OR name LIKE '%topic0%') AND department = 'EECS'
advising
CREATE TABLE table_21132 ( "Election" real, "Candidates fielded" real, "# of seats won" real, "Total votes" real, "% of popular vote" text, "Place" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What place did the party finish in the year when t...
SELECT "Place" FROM table_21132 WHERE "% of popular vote" = '0.86%'
wikisql
CREATE TABLE allergy ( allergyid number, patientunitstayid number, drugname text, allergyname text, allergytime time ) CREATE TABLE medication ( medicationid number, patientunitstayid number, drugname text, dosage text, routeadmin text, drugstarttime time, drugstoptime t...
SELECT DISTINCT cost.cost FROM cost WHERE cost.eventtype = 'lab' AND cost.eventid IN (SELECT lab.labid FROM lab WHERE lab.labname = 'fe')
eicu
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 lab ( subject_id text, hadm_id text, itemid text, charttime text, flag text, value_unit text,...
SELECT prescriptions.drug FROM prescriptions WHERE prescriptions.formulary_drug_cd = "DIGO25"
mimicsql_data
CREATE TABLE table_70280 ( "Start Date/Time" text, "Duration" text, "End Time" text, "Spacecraft" text, "Crew" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Who was the crew for the duration of 12 minutes?
SELECT "Crew" FROM table_70280 WHERE "Duration" = '12 minutes'
wikisql
CREATE TABLE table_25762852_1 ( name VARCHAR, lifts VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- if there are 30 lifts, what is the name of the ski resort?
SELECT name FROM table_25762852_1 WHERE lifts = 30
sql_create_context
CREATE TABLE table_22903426_1 ( scm_system VARCHAR, windows_builders VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Name the number of scm system for nant, visual studio
SELECT COUNT(scm_system) FROM table_22903426_1 WHERE windows_builders = "NAnt, Visual Studio"
sql_create_context
CREATE TABLE table_name_5 ( segment_a VARCHAR, segment_b VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Segment B of aerospace fuel lines has what segment A?
SELECT segment_a FROM table_name_5 WHERE segment_b = "aerospace fuel lines"
sql_create_context
CREATE TABLE table_63900 ( "Year" real, "Main" text, "Hessen" text, "Rhein" text, "Saar" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the average year for a Saar of FK Pirmasens and Hessen of Wormatia Worms?
SELECT AVG("Year") FROM table_63900 WHERE "Saar" = 'fk pirmasens' AND "Hessen" = 'wormatia worms'
wikisql
CREATE TABLE procedures ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) CREATE TABLE demographic ( subject_id text, hadm_id text, name text, marital_status text, age text, dob text, gender text, language text, religion text, ...
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.dod_year <= "2168.0" AND procedures.icd9_code = "3142"
mimicsql_data
CREATE TABLE people ( Name VARCHAR, People_ID VARCHAR ) CREATE TABLE body_builder ( People_ID VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What are the names of body builders?
SELECT T2.Name FROM body_builder AS T1 JOIN people AS T2 ON T1.People_ID = T2.People_ID
sql_create_context
CREATE TABLE table_4739 ( "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. -- What was the North Melbourne's score when they pl...
SELECT "Home team score" FROM table_4739 WHERE "Home team" = 'north melbourne'
wikisql
CREATE TABLE table_name_29 ( opponent VARCHAR, attendance VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which Opponent has a Attendance of 7,034?
SELECT opponent FROM table_name_29 WHERE attendance = "7,034"
sql_create_context
CREATE TABLE inputevents_cv ( row_id number, subject_id number, hadm_id number, icustay_id number, charttime time, itemid number, amount number ) CREATE TABLE d_labitems ( row_id number, itemid number, label text ) CREATE TABLE diagnoses_icd ( row_id number, subject_id ...
SELECT admissions.dischtime FROM admissions WHERE admissions.subject_id = 14621 AND DATETIME(admissions.dischtime, 'start of year') = DATETIME(CURRENT_TIME(), 'start of year', '-0 year') ORDER BY admissions.dischtime LIMIT 1
mimic_iii
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, T1.Name
nvbench
CREATE TABLE table_2076533_1 ( control VARCHAR, main_location VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Name the control for albany
SELECT control FROM table_2076533_1 WHERE main_location = "Albany"
sql_create_context
CREATE TABLE table_name_68 ( rank INTEGER, location VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the lowest rank that has university park, pa as the location?
SELECT MIN(rank) FROM table_name_68 WHERE location = "university park, pa"
sql_create_context
CREATE TABLE table_47605 ( "Date" text, "Visitor" text, "Score" text, "Home" text, "Record" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What was the score of the game where the record was 2-2?
SELECT "Score" FROM table_47605 WHERE "Record" = '2-2'
wikisql
CREATE TABLE table_1689 ( "Province" text, "Provincial capital" text, "Largest city" text, "Area (km 2 )" real, "Population (2013)" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- what is the largest city where the province is eastern cape?
SELECT "Largest city" FROM table_1689 WHERE "Province" = 'Eastern Cape'
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 demographic.admittime, procedures.icd9_code FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.subject_id = "98220"
mimicsql_data
CREATE TABLE TagSynonyms ( Id number, SourceTagName text, TargetTagName text, CreationDate time, OwnerUserId number, AutoRenameCount number, LastAutoRename time, Score number, ApprovedByUserId number, ApprovalDate time ) CREATE TABLE ReviewRejectionReasons ( Id number, N...
SELECT Id, DisplayName, Reputation, WebsiteUrl, Location FROM Users ORDER BY Reputation DESC LIMIT 150
sede
CREATE TABLE pilot ( Id VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- How many pilots are there?
SELECT COUNT(*) FROM pilot
sql_create_context
CREATE TABLE table_23166 ( "RPM" real, "Standard HP" text, "Standard torque (lb/ft)" text, "Standard speed (6th gear)" text, "Modified speed (6th gear)" real, "Modified HP" text, "Modified torque (lb/ft)" text ) -- Using valid SQLite, answer the following questions for the tables provided ...
SELECT "Modified speed (6th gear)" FROM table_23166 WHERE "Standard torque (lb/ft)" = '10.3' AND "Modified torque (lb/ft)" = '8.75'
wikisql
CREATE TABLE table_30860 ( "Episode #" real, "Series #" real, "Episode Title" text, "Original air date" text, "Production Code" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the production code of the episode with series #8?
SELECT "Production Code" FROM table_30860 WHERE "Series #" = '8'
wikisql
CREATE TABLE table_12902 ( "Date" text, "Label" text, "Format" text, "Country" text, "Catalog" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the country associated with the date in 2003?
SELECT "Country" FROM table_12902 WHERE "Date" = '2003'
wikisql
CREATE TABLE table_name_52 ( home VARCHAR, date VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Who is the home team on March 5?
SELECT home FROM table_name_52 WHERE date = "march 5"
sql_create_context
CREATE TABLE table_18144 ( "District" text, "Incumbent" text, "Party" text, "First elected" real, "Results" text, "Candidates" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- How did the election end for Robert Wexler?
SELECT "Results" FROM table_18144 WHERE "Incumbent" = 'Robert Wexler'
wikisql
CREATE TABLE table_35393 ( "Round" real, "Pick" real, "Player" text, "Position" text, "School/Club Team" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What's the sum of the Pick that has the Player of Robert Ingalls?
SELECT COUNT("Pick") FROM table_35393 WHERE "Player" = 'robert ingalls'
wikisql
CREATE TABLE person_info ( CSD text, CSRQ time, GJDM text, GJMC text, JGDM text, JGMC text, MZDM text, MZMC text, RYBH text, XBDM number, XBMC text, XLDM text, XLMC text, XM text, ZYLBDM text, ZYMC text ) CREATE TABLE jybgb ( BBCJBW text, BBDM tex...
SELECT txmzjzjlb.JZLSH FROM person_info JOIN hz_info JOIN txmzjzjlb ON person_info.RYBH = hz_info.RYBH AND hz_info.YLJGDM = txmzjzjlb.YLJGDM AND hz_info.KH = txmzjzjlb.KH AND hz_info.KLX = txmzjzjlb.KLX WHERE person_info.XM = '韩向彤' AND hz_info.YLJGDM = '9745753' AND NOT txmzjzjlb.JZKSMC LIKE '%科室%' UNION SELECT ftxmzjz...
css
CREATE TABLE table_16557 ( "Season" real, "Grand FinalDate" text, "WinningTeam" text, "Score" text, "LosingTeam" text, "Location" text, "GF Attendance" real, "Clive Churchill Medal" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What was...
SELECT "Grand FinalDate" FROM table_16557 WHERE "LosingTeam" = 'St. George-Illawarra Dragons'
wikisql
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 WHERE demographic.ethnicity = "BLACK/HAITIAN" AND demographic.dob_year < "2175"
mimicsql_data
CREATE TABLE table_27869 ( "Settlement" text, "Cyrillic Name Other Names" text, "Type" text, "Population (2011)" real, "Largest ethnic group (2002)" text, "Dominant religion (2002)" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Name the cyrilli...
SELECT "Cyrillic Name Other Names" FROM table_27869 WHERE "Population (2011)" = '518'
wikisql
CREATE TABLE table_47707 ( "Date" text, "Flight" text, "Aircraft" text, "Registration" text, "Location" text, "Fatalities" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which fatality was at ankara for the aircraft douglas c-47?
SELECT "Fatalities" FROM table_47707 WHERE "Location" = 'ankara' AND "Aircraft" = 'douglas c-47'
wikisql
CREATE TABLE table_35978 ( "Tournament" text, "Wins" real, "Top-5" real, "Top-10" real, "Top-25" real, "Events" real, "Cuts made" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which Cuts made has a Tournament of totals, and Wins smaller tha...
SELECT AVG("Cuts made") FROM table_35978 WHERE "Tournament" = 'totals' AND "Wins" < '11'
wikisql
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_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_ID = '33992574' GROUP BY t_kc22.SOC_SRT_DIRE_CD ORDER BY COUNT(*) DESC
css
CREATE TABLE table_20661 ( "Title" text, "Series" text, "Release" text, "Featuring" text, "Writer" text, "Director" text, "Length" text, "Timeline" text, "Release Date" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the relea...
SELECT "Release" FROM table_20661 WHERE "Timeline" = 'Season 2'
wikisql
CREATE TABLE table_name_73 ( team VARCHAR, rank VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What team has rank 3?
SELECT team FROM table_name_73 WHERE rank = 3
sql_create_context
CREATE TABLE table_name_73 ( viewers__m_ VARCHAR, rank___number_ VARCHAR, share VARCHAR, rating VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- How many vieweres for the episode with a share of 1, a Rating larger than 0.7000000000000001, and a Rank (#...
SELECT viewers__m_ FROM table_name_73 WHERE share = 1 AND rating > 0.7000000000000001 AND rank___number_ = "100/102"
sql_create_context
CREATE TABLE table_50016 ( "Place" text, "Player" text, "Country" text, "Score" text, "To par" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Who is the player from the United States with a score of 71-75=146?
SELECT "Player" FROM table_50016 WHERE "Country" = 'united states' AND "Score" = '71-75=146'
wikisql
CREATE TABLE table_11498 ( "Date" text, "Opponent" text, "Home/Away" text, "Field" text, "Result" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the field of the game on July 22?
SELECT "Field" FROM table_11498 WHERE "Date" = 'july 22'
wikisql
CREATE TABLE table_25877 ( "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 w...
SELECT "Date" FROM table_25877 WHERE "Record" = '27-14'
wikisql
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 prescriptions ( subject_id text, hadm_id...
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.long_title = "Atrioventricular block, complete" AND lab."CATEGORY" = "Hematology"
mimicsql_data
CREATE TABLE table_50605 ( "Oklahoma vs." text, "Overall Record" text, "at Norman" text, "at Opponent's Venue" text, "at Neutral Site" text, "Last 5 Meetings" text, "Last 10 Meetings" text, "Current Streak" text, "Since Beginning of Big 12" text ) -- Using valid SQLite, answer the ...
SELECT "Since Beginning of Big 12" FROM table_50605 WHERE "Last 10 Meetings" = 'ou, 7-3' AND "at Neutral Site" = 'ou, 2-1' AND "Last 5 Meetings" = 'bu, 3-2'
wikisql
CREATE TABLE table_21682 ( "School" text, "Years of Participation" text, "OCC Championships" real, "Last OCC Championship" text, "Last Outright OCC Championship" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- How many schools won their last occ cham...
SELECT COUNT("School") FROM table_21682 WHERE "Last OCC Championship" = '2006'
wikisql
CREATE TABLE table_name_57 ( venue VARCHAR, result VARCHAR, year VARCHAR, category VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What are the venues prior to 2005 in the World Class category that resulted in a bronze?
SELECT venue FROM table_name_57 WHERE year < 2005 AND category = "world class" AND result = "bronze"
sql_create_context
CREATE TABLE table_28128 ( "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 was the distance in ...
SELECT "Distance" FROM table_28128 WHERE "Race" = 'Manikato Stakes'
wikisql
CREATE TABLE table_17058226_5 ( high_rebounds VARCHAR, high_assists VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Who performed all the high rebounds when craig smith (4) was the lead for high assists?
SELECT high_rebounds FROM table_17058226_5 WHERE high_assists = "Craig Smith (4)"
sql_create_context
CREATE TABLE loan ( loan_id text, loan_type text, cust_id text, branch_id text, amount number ) CREATE TABLE bank ( branch_id number, bname text, no_of_customers number, city text, state text ) CREATE TABLE customer ( cust_id text, cust_name text, acc_type text, ...
SELECT SUM(T2.amount) FROM bank AS T1 JOIN loan AS T2 ON T1.branch_id = T2.branch_id WHERE T1.state = 'New York'
spider
CREATE TABLE table_name_77 ( week VARCHAR, result VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which Week has a Result of w 23 22?
SELECT week FROM table_name_77 WHERE result = "w 23–22"
sql_create_context
CREATE TABLE table_28671 ( "No. in series" real, "No. in season" real, "Title" text, "Directed by" text, "Written by" text, "Original air date" text, "Production code" text, "U.S. viewers (millions)" text ) -- Using valid SQLite, answer the following questions for the tables provided a...
SELECT MIN("No. in series") FROM table_28671 WHERE "Title" = 'There Will Be Bad Blood'
wikisql
CREATE TABLE table_27700530_14 ( high_rebounds VARCHAR, date VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Who had the most the most rebounds and how many did they have on April 1?
SELECT high_rebounds FROM table_27700530_14 WHERE date = "April 1"
sql_create_context
CREATE TABLE table_28898948_3 ( by_election INTEGER, electorate VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- When waikaia is the electorate what is the highest by-election?
SELECT MAX(by_election) FROM table_28898948_3 WHERE electorate = "Waikaia"
sql_create_context
CREATE TABLE table_64795 ( "Week" real, "Date" text, "Opponent" text, "Result" text, "Attendance" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the Attendance of the game with a Result of L 20-14?
SELECT "Attendance" FROM table_64795 WHERE "Result" = 'l 20-14'
wikisql
CREATE TABLE table_76378 ( "Game" real, "Date" text, "Opponent" 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. -- Wh...
SELECT "High rebounds" FROM table_76378 WHERE "Date" = 'september 11'
wikisql
CREATE TABLE table_name_61 ( date VARCHAR, clock VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which date has a Clock of 0.8-1.6ghz?
SELECT date FROM table_name_61 WHERE clock = "0.8-1.6ghz"
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 lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.dob_year < "2053" AND lab.label = "RBC, Joint Fluid"
mimicsql_data
CREATE TABLE table_name_93 ( team_website VARCHAR, institution VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- what is the team website when the institution is indiana university of pennsylvania?
SELECT team_website FROM table_name_93 WHERE institution = "indiana university of pennsylvania"
sql_create_context
CREATE TABLE dorm_amenity ( amenid number, amenity_name text ) CREATE TABLE student ( stuid number, lname text, fname text, age number, sex text, major number, advisor number, city_code text ) CREATE TABLE dorm ( dormid number, dorm_name text, student_capacity numbe...
SELECT T1.amenity_name FROM dorm_amenity AS T1 JOIN has_amenity AS T2 ON T1.amenid = T2.amenid GROUP BY T2.amenid ORDER BY COUNT(*) DESC LIMIT 1
spider
CREATE TABLE PostNoticeTypes ( Id number, ClassId number, Name text, Body text, IsHidden boolean, Predefined boolean, PostNoticeDurationId number ) CREATE TABLE PostHistoryTypes ( Id number, Name text ) CREATE TABLE CloseReasonTypes ( Id number, Name text, Description t...
SELECT Id AS "user_link", Reputation, CreationDate, DisplayName, LastAccessDate, UpVotes, DownVotes FROM Users WHERE UpVotes > '##votes##' ORDER BY Id
sede
CREATE TABLE ReviewTaskResults ( Id number, ReviewTaskId number, ReviewTaskResultTypeId number, CreationDate time, RejectionReasonId number, Comment text ) CREATE TABLE ReviewTaskStates ( Id number, Name text, Description text ) CREATE TABLE Posts ( Id number, PostTypeId nu...
SELECT ROW_NUMBER() OVER (ORDER BY Reputation DESC) AS "#", Id AS "user_link", Location, Reputation FROM Users WHERE Reputation > 99000 AND LOWER(Location) LIKE LOWER('%italy%') ORDER BY Reputation DESC
sede
CREATE TABLE table_72365 ( "District" text, "Incumbent" text, "Party" text, "First elected" real, "Results" text, "Candidates" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Who were the candidates in the district where Jerry Costello won?
SELECT "Candidates" FROM table_72365 WHERE "Incumbent" = 'Jerry Costello'
wikisql
CREATE TABLE climber ( climber_id number, name text, country text, time text, points number, mountain_id number ) CREATE TABLE mountain ( mountain_id number, name text, height number, prominence number, range text, country text ) -- Using valid SQLite, answer the follo...
SELECT T1.time FROM climber AS T1 JOIN mountain AS T2 ON T1.mountain_id = T2.mountain_id WHERE T2.country = "Uganda"
spider
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 P.Id AS "post_link", P.Body FROM Posts AS P, PostTypes AS Pt, Votes AS V, VoteTypes AS Vt WHERE P.Id = V.PostId AND Vt.Id = V.VoteTypeId AND P.Score < -2 AND Pt.Id = 2 AND Vt.Id = 3 AND DATEDIFF(month, P.CreationDate, GETDATE()) < 6 GROUP BY P.Id, P.Body
sede
CREATE TABLE table_64740 ( "Year" real, "Competition" text, "Venue" text, "Position" text, "Event" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which Year has a Competition of commonwealth youth games?
SELECT AVG("Year") FROM table_64740 WHERE "Competition" = 'commonwealth youth games'
wikisql
CREATE TABLE table_37503 ( "Date" text, "Tournament" text, "Location" text, "Winner" text, "Score" text, "1st prize ( $ )" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- How much was the first place prize for the American golf classic located in...
SELECT "1st prize ( $ )" FROM table_37503 WHERE "Location" = 'ohio' AND "Tournament" = 'american golf classic'
wikisql
CREATE TABLE record ( ID int, Result text, Swimmer_ID int, Event_ID int ) CREATE TABLE event ( ID int, Name text, Stadium_ID int, Year text ) CREATE TABLE swimmer ( ID int, name text, Nationality text, meter_100 real, meter_200 text, meter_300 text, meter_40...
SELECT meter_400, ID FROM swimmer ORDER BY meter_400 DESC
nvbench
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 COUNT(*) FROM gwyjzb JOIN t_kc22 ON gwyjzb.MED_CLINIC_ID = t_kc22.MED_CLINIC_ID WHERE gwyjzb.PERSON_ID = '66990606' AND t_kc22.STA_DATE BETWEEN '2008-08-22' AND '2015-12-14' AND gwyjzb.MED_SER_ORG_NO = '0896805' AND t_kc22.MED_INV_ITEM_TYPE = '检查费' UNION SELECT COUNT(*) FROM fgwyjzb JOIN t_kc22 ON fgwyjzb.MED_CL...
css
CREATE TABLE table_name_83 ( result VARCHAR, western_champion VARCHAR, eastern_champion VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the score from the Sacramento monarchs from the west and the Connecticut sun from the east?
SELECT result FROM table_name_83 WHERE western_champion = "sacramento monarchs" AND eastern_champion = "connecticut sun"
sql_create_context
CREATE TABLE table_name_60 ( record VARCHAR, opponent VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What was the record in the game where the opponent was the cincinnati royals?
SELECT record FROM table_name_60 WHERE opponent = "cincinnati royals"
sql_create_context
CREATE TABLE table_2454589_1 ( club VARCHAR, home_city VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Name the club for quevedo
SELECT club FROM table_2454589_1 WHERE home_city = "Quevedo"
sql_create_context
CREATE TABLE table_name_19 ( money___$__ VARCHAR, player VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What was the Money ($) amount for Lloyd Mangrum?
SELECT money___$__ FROM table_name_19 WHERE player = "lloyd mangrum"
sql_create_context
CREATE TABLE SuggestedEdits ( Id number, PostId number, CreationDate time, ApprovalDate time, RejectionDate time, OwnerUserId number, Comment text, Text text, Title text, Tags text, RevisionGUID other ) CREATE TABLE PostsWithDeleted ( Id number, PostTypeId number, ...
SELECT Questions.Id AS "post_link", Questions.Title, Questions.AnswerCount, Questions.ViewCount, Questions.FavoriteCount, Questions.Score, Questions.LastActivityDate, Questions.Tags FROM Posts AS Answers INNER JOIN Posts AS Questions ON Questions.Id = Answers.ParentId INNER JOIN Users AS Users ON Answers.OwnerUserId = ...
sede
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, MAX(T1.Price) FROM Products AS T1 JOIN Manufacturers AS T2 ON T1.Manufacturer = T2.Code GROUP BY T2.Name ORDER BY MAX(T1.Price)
nvbench
CREATE TABLE table_name_2 ( termini VARCHAR, junctions VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What's the termini of the route with junctions of i-35 fm 3338 sh 255?
SELECT termini FROM table_name_2 WHERE junctions = "i-35 fm 3338 sh 255"
sql_create_context
CREATE TABLE ReviewTaskStates ( Id number, Name text, Description text ) CREATE TABLE PostLinks ( Id number, CreationDate time, PostId number, RelatedPostId number, LinkTypeId number ) CREATE TABLE ReviewTaskResultTypes ( Id number, Name text, Description text ) CREATE TAB...
SELECT TIME_TO_STR(CreationDate, '%Y') AS "year", TIME_TO_STR(CreationDate, '%m') AS "date", Score AS "score", COUNT(*) AS CommentCount, SUM(LENGTH(Text)) AS Typed, GROUPING(TIME_TO_STR(CreationDate, '%Y')), GROUPING(TIME_TO_STR(CreationDate, '%m')), GROUPING(Score) FROM Comments WHERE UserId = @UserId GROUP BY CUBE (T...
sede
CREATE TABLE round ( round_id number, member_id number, decoration_theme text, rank_in_round number ) CREATE TABLE college ( college_id number, name text, leader_name text, college_location text ) CREATE TABLE member ( member_id number, name text, country text, college_...
SELECT country, COUNT(*) FROM member GROUP BY country
spider
CREATE TABLE mzjzjlb ( HXPLC number, HZXM text, JLSJ time, JZJSSJ time, JZKSBM text, JZKSMC text, JZKSRQ time, JZLSH text, JZZDBM text, JZZDSM text, JZZTDM number, JZZTMC text, KH text, KLX number, MJZH text, ML number, MZZYZDZZBM text, MZZYZDZZMC ...
SELECT jyjgzbb.YQBH, jyjgzbb.YQMC 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...
css
CREATE TABLE table_name_50 ( crowd INTEGER, venue VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- what is the lowest crowd at kardinia park
SELECT MIN(crowd) FROM table_name_50 WHERE venue = "kardinia park"
sql_create_context
CREATE TABLE comment_instructor ( instructor_id int, student_id int, score int, comment_text varchar ) CREATE TABLE semester ( semester_id int, semester varchar, year int ) CREATE TABLE instructor ( instructor_id int, name varchar, uniqname varchar ) CREATE TABLE program_cours...
SELECT AVG(workload) FROM program_course WHERE category LIKE '%PreMajor%'
advising
CREATE TABLE table_name_24 ( grid INTEGER, bike VARCHAR, rider VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Name the lowest Grid which has a Bike of ducati 1098 rs 08 and a Rider of max biaggi?
SELECT MIN(grid) FROM table_name_24 WHERE bike = "ducati 1098 rs 08" AND rider = "max biaggi"
sql_create_context
CREATE TABLE diagnoses ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) CREATE TABLE prescriptions ( subject_id text, hadm_id text, icustay_id text, drug_type text, drug text, formulary_drug_cd text, route text, drug_dose text ) C...
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.diagnosis = "SDH"
mimicsql_data
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 intakeoutput ( intakeoutpu...
SELECT lab.labresulttime FROM lab WHERE lab.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '004-86136')) AND lab.labname = 'anion gap' AND DATETIME(lab.labresulttime, 'start o...
eicu
CREATE TABLE table_53417 ( "Team" text, "Games Played" real, "Wins" real, "Losses" real, "Ties" real, "Goals For" real, "Goals Against" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- what is the lowest number of ties when the losses is 7 and...
SELECT MIN("Ties") FROM table_53417 WHERE "Losses" = '7' AND "Games Played" < '10'
wikisql
CREATE TABLE writes ( paperid int, authorid int ) CREATE TABLE paperfield ( fieldid int, paperid int ) CREATE TABLE journal ( journalid int, journalname varchar ) CREATE TABLE keyphrase ( keyphraseid int, keyphrasename varchar ) CREATE TABLE venue ( venueid int, venuename var...
SELECT DISTINCT paper.year FROM author, paper, writes WHERE author.authorname = 'Luke S Zettlemoyer' AND writes.authorid = author.authorid AND writes.paperid = paper.paperid ORDER BY paper.year
scholar
CREATE TABLE table_42453 ( "Year" real, "Team" text, "Chassis" text, "Engine" text, "Rank" text, "Points" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the chassis when the rank is 3rd?
SELECT "Chassis" FROM table_42453 WHERE "Rank" = '3rd'
wikisql
CREATE TABLE ENROLL ( CLASS_CODE varchar(5), STU_NUM int, ENROLL_GRADE varchar(50) ) CREATE TABLE PROFESSOR ( EMP_NUM int, DEPT_CODE varchar(10), PROF_OFFICE varchar(50), PROF_EXTENSION varchar(4), PROF_HIGH_DEGREE varchar(5) ) CREATE TABLE STUDENT ( STU_NUM int, STU_LNAME varc...
SELECT CRS_CODE, COUNT(*) FROM CLASS GROUP BY CRS_CODE ORDER BY COUNT(*) DESC
nvbench
CREATE TABLE table_203_173 ( id number, "year(s)" text, "serial name" text, "role" text, "co-star" text, "note(s)" text, "channel" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- how many shows were on zee tv ?
SELECT COUNT("serial name") FROM table_203_173 WHERE "channel" = 'zee tv'
squall
CREATE TABLE table_name_2 ( protein_name VARCHAR, sequence_identity_to_human_protein VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the protein name of the protein with a sequence identity to human protein of 32%?
SELECT protein_name FROM table_name_2 WHERE sequence_identity_to_human_protein = "32%"
sql_create_context
CREATE TABLE table_48655 ( "Year" real, "Date" text, "Winner" text, "Result" text, "Loser" text, "Location" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Who was the winner when the result was 56-0 before 1935?
SELECT "Winner" FROM table_48655 WHERE "Year" < '1935' AND "Result" = '56-0'
wikisql