instruction
stringlengths
151
7.46k
output
stringlengths
2
4.44k
source
stringclasses
26 values
CREATE TABLE table_15865 ( "Player" text, "No." real, "Nationality" text, "Position" text, "Years in Toronto" text, "School/Club Team" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which country is the player that went to Georgetown from?
SELECT "Nationality" FROM table_15865 WHERE "School/Club Team" = 'Georgetown'
wikisql
CREATE TABLE program_requirement ( program_id int, category varchar, min_credit int, additional_req varchar ) CREATE TABLE offering_instructor ( offering_instructor_id int, offering_id int, instructor_id int ) CREATE TABLE program ( program_id int, name varchar, college varchar...
SELECT DISTINCT course.department, course.name, course.number FROM course INNER JOIN program_course ON program_course.course_id = course.course_id WHERE course.has_exams = 'N' AND course.has_projects = 'Y' AND program_course.category LIKE 'ULCS'
advising
CREATE TABLE table_66972 ( "Date" text, "Tournament" text, "Winning score" text, "Margin of victory" text, "Runner(s)-up" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What was the winning score in the mazda senior tournament players championship?
SELECT "Winning score" FROM table_66972 WHERE "Tournament" = 'mazda senior tournament players championship'
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 INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.gender = "F" AND lab.label = "MCV"
mimicsql_data
CREATE TABLE table_1637981_7 ( grand_rapids__grr_ VARCHAR, saginaw__mbs_ VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- When Saginaw's fare is $470.47, what was the fare to Grand Rapids?
SELECT grand_rapids__grr_ FROM table_1637981_7 WHERE saginaw__mbs_ = "$470.47"
sql_create_context
CREATE TABLE medication ( medicationid number, patientunitstayid number, drugname text, dosage text, routeadmin text, drugstarttime time, drugstoptime time ) CREATE TABLE treatment ( treatmentid number, patientunitstayid number, treatmentname text, treatmenttime time ) CREA...
SELECT treatment.treatmenttime FROM treatment WHERE treatment.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '021-25408')) AND STRFTIME('%y', treatment.treatmenttime) >= '2105...
eicu
CREATE TABLE table_name_7 ( line_name VARCHAR, nimt_junction VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What line has Junction of Huntly NIMT
SELECT line_name FROM table_name_7 WHERE nimt_junction = "huntly"
sql_create_context
CREATE TABLE procedures ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) CREATE TABLE lab ( subject_id text, hadm_id text, itemid text, charttime text, flag text, value_unit text, label text, fluid text ) CREATE TABLE diagnoses ( ...
SELECT demographic.diagnosis, diagnoses.short_title FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE demographic.name = "Betty Campbell"
mimicsql_data
CREATE TABLE table_name_90 ( player VARCHAR, previous_team__league_ VARCHAR, year VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is Player, when Previous Team (League) is 'Medicine Hat Tigers ( WHL )', and when Year is less than 2002?
SELECT player FROM table_name_90 WHERE previous_team__league_ = "medicine hat tigers ( whl )" AND year < 2002
sql_create_context
CREATE TABLE table_name_21 ( at_austin VARCHAR, texas_vs VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the Austin record of Kansas State?
SELECT at_austin FROM table_name_21 WHERE texas_vs = "kansas state"
sql_create_context
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.SBBM, jyjgzbb.YQBH, jyjgzbb.YQMC FROM jyjgzbb WHERE jyjgzbb.JYZBLSH = '68679682654'
css
CREATE TABLE performance ( Date VARCHAR, Attendance VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the date of the performance with the highest number of attendees?
SELECT Date FROM performance ORDER BY Attendance DESC LIMIT 1
sql_create_context
CREATE TABLE cost ( row_id number, subject_id number, hadm_id number, event_type text, event_id number, chargetime time, cost number ) CREATE TABLE inputevents_cv ( row_id number, subject_id number, hadm_id number, icustay_id number, charttime time, itemid number, ...
SELECT d_items.label FROM d_items WHERE d_items.itemid IN (SELECT inputevents_cv.itemid FROM inputevents_cv WHERE inputevents_cv.icustay_id IN (SELECT icustays.icustay_id FROM icustays WHERE icustays.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 31854)) AND DATETIME(inputevents_cv....
mimic_iii
CREATE TABLE admissions ( row_id number, subject_id number, hadm_id number, admittime time, dischtime time, admission_type text, admission_location text, discharge_location text, insurance text, language text, marital_status text, ethnicity text, age number ) CREATE ...
SELECT labevents.valuenum FROM labevents WHERE labevents.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 55247) AND labevents.itemid IN (SELECT d_labitems.itemid FROM d_labitems WHERE d_labitems.label = 'glucose') AND DATETIME(labevents.charttime) <= DATETIME(CURRENT_TIME(), '-62 mon...
mimic_iii
CREATE TABLE program_course ( program_id int, course_id int, workload int, category varchar ) CREATE TABLE course_tags_count ( course_id int, clear_grading int, pop_quiz int, group_projects int, inspirational int, long_lectures int, extra_credit int, few_tests int, g...
SELECT COUNT(*) > 0 FROM course, course_offering, semester WHERE course.course_id = course_offering.course_id AND course.department = 'EECS' AND course.number = 314 AND semester.semester = 'FA' AND semester.semester_id = course_offering.semester AND semester.year = 2016
advising
CREATE TABLE ReviewRejectionReasons ( Id number, Name text, Description text, PostTypeId number ) CREATE TABLE PendingFlags ( Id number, FlagTypeId number, PostId number, CreationDate time, CloseReasonTypeId number, CloseAsOffTopicReasonTypeId number, DuplicateOfQuestionId n...
SELECT * FROM Users WHERE Location LIKE '%##location##%' ORDER BY CreationDate
sede
CREATE TABLE party ( Party_ID int, Year real, Party text, Governor text, Lieutenant_Governor text, Comptroller text, Attorney_General text, US_Senate text ) CREATE TABLE county ( County_Id int, County_name text, Population real, Zip_code text ) CREATE TABLE election ( ...
SELECT Comptroller, COUNT(Comptroller) FROM election AS T1 JOIN party AS T2 ON T1.Party = T2.Party_ID WHERE T1.District = 1 OR T1.District = 2 GROUP BY Comptroller ORDER BY COUNT(Comptroller)
nvbench
CREATE TABLE table_16580 ( "#" real, "Episode" text, "Rating" text, "Share" real, "Rating/Share (18-49)" text, "Viewers (millions)" text, "Rank (timeslot)" real, "Rank (night)" real, "Rank (week)" text ) -- Using valid SQLite, answer the following questions for the tables provided ...
SELECT COUNT("#") FROM table_16580 WHERE "Episode" = 'Conference Call'
wikisql
CREATE TABLE ReviewTasks ( Id number, ReviewTaskTypeId number, CreationDate time, DeletionDate time, ReviewTaskStateId number, PostId number, SuggestedEditId number, CompletedByReviewTaskId number ) CREATE TABLE VoteTypes ( Id number, Name text ) CREATE TABLE PostLinks ( Id...
SELECT Users.DisplayName, Users.Reputation, Users.Location, Badges.Name FROM Users INNER JOIN Badges ON Users.Id = Badges.UserId WHERE Users.Reputation = (SELECT MAX(Reputation) FROM Users WHERE Location = 'South Africa' AND Badges.Name = 'Enlightened' AND YEAR(Badges.Date) = 2016)
sede
CREATE TABLE table_204_703 ( id number, "rank" number, "nation" text, "gold" number, "silver" number, "bronze" number, "total" number ) -- Using valid SQLite, answer the following questions for the tables provided above. -- name the country that had the same number of bronze medals as rus...
SELECT "nation" FROM table_204_703 WHERE "nation" <> 'russia' AND "bronze" = (SELECT "bronze" FROM table_204_703 WHERE "nation" = 'russia')
squall
CREATE TABLE table_203_737 ( id number, "#" number, "employer" text, "# of employees" number ) -- Using valid SQLite, answer the following questions for the tables provided above. -- how many employees does mundelein high school have ?
SELECT "# of employees" FROM table_203_737 WHERE "employer" = 'mundelein high school'
squall
CREATE TABLE table_31991 ( "Name" text, "Circuit" text, "Date" text, "Winning driver" text, "Winning constructor" text, "Report" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Name the report for raymond sommer
SELECT "Report" FROM table_31991 WHERE "Winning driver" = 'raymond sommer'
wikisql
CREATE TABLE table_1013129_1 ( college_junior_club_team VARCHAR, player VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What teams did the player vadim sharifijanov play for?
SELECT college_junior_club_team FROM table_1013129_1 WHERE player = "Vadim Sharifijanov"
sql_create_context
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, diagnoses.short_title FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE demographic.name = "Josette Orr"
mimicsql_data
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.days_stay > "29" AND prescriptions.route = "NU"
mimicsql_data
CREATE TABLE table_27969432_4 ( us_viewers__in_millions_ VARCHAR, no_in_season VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- How many viewers in millions were there for episode 4 of this season?
SELECT COUNT(us_viewers__in_millions_) FROM table_27969432_4 WHERE no_in_season = 4
sql_create_context
CREATE TABLE table_76739 ( "Game" real, "Date" text, "Team" text, "Score" text, "Record" text, "Streak" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is Team, when Game is 77?
SELECT "Team" FROM table_76739 WHERE "Game" = '77'
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 Id AS "post_link", CreationDate FROM Posts WHERE Body LIKE '%apt-cache%' ORDER BY CreationDate DESC
sede
CREATE TABLE table_name_96 ( left_office VARCHAR, romanized__hangul_ VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- When did chang myon ( ) leave office?
SELECT left_office FROM table_name_96 WHERE romanized__hangul_ = "chang myon (장면)"
sql_create_context
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 '2001-07-23' AND '2007-04-15' GROUP BY t_kc22.SOC_SRT_DIRE_CD ORDER BY COUNT(*) DESC LIMIT 1
css
CREATE TABLE record ( ID int, Result text, Swimmer_ID int, Event_ID int ) CREATE TABLE stadium ( ID int, name text, Capacity int, City text, Country text, Opening_year int ) CREATE TABLE event ( ID int, Name text, Stadium_ID int, Year text ) CREATE TABLE swimme...
SELECT Time, ID FROM swimmer ORDER BY ID DESC
nvbench
CREATE TABLE table_name_51 ( remelting_at__°c_ VARCHAR, sn_sb___percentage_ VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the remelting temperature for the alloy that has a Sn/Sb ratio of 9.5/15?
SELECT remelting_at__°c_ FROM table_name_51 WHERE sn_sb___percentage_ = "9.5/15"
sql_create_context
CREATE TABLE table_29970488_2 ( hometown VARCHAR, previous_school VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- How many hometowns are there when Charis Prep was the previous school?
SELECT COUNT(hometown) FROM table_29970488_2 WHERE previous_school = "Charis Prep"
sql_create_context
CREATE TABLE table_name_30 ( position VARCHAR, college_junior_club_team__league_ VARCHAR, round VARCHAR, nationality VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is Position, when Round is less than 5, when Nationality is 'Canada', and when Co...
SELECT position FROM table_name_30 WHERE round < 5 AND nationality = "canada" AND college_junior_club_team__league_ = "saint john sea dogs ( qmjhl )"
sql_create_context
CREATE TABLE table_20757 ( "Home team" text, "Home team score" text, "Away team" text, "Away team score" text, "Ground" text, "Crowd" real, "Date" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What was the away team's score of at the game o...
SELECT "Away team score" FROM table_20757 WHERE "Ground" = 'Telstra Stadium'
wikisql
CREATE TABLE procedures ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) CREATE TABLE lab ( subject_id text, hadm_id text, itemid text, charttime text, flag text, value_unit text, label text, fluid text ) CREATE TABLE demographic ...
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE demographic.ethnicity = "ASIAN" AND diagnoses.long_title = "Neutropenia, unspecified"
mimicsql_data
CREATE TABLE table_183 ( "Information" text, "Dysart" text, "Shadow Ridge" text, "Valley Vista" text, "Willow Canyon" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Name the Valley Vista of Anthony Capuano
SELECT "Valley Vista" FROM table_183 WHERE "Willow Canyon" = 'Anthony Capuano'
wikisql
CREATE TABLE table_13677 ( "Name" text, "Ceremony" text, "Year" text, "Academy Award" text, "Film" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- In what Year was the 32nd Ceremony with winner William A. Horning in the Film North by Northwest?
SELECT "Year" FROM table_13677 WHERE "Ceremony" = '32nd' AND "Name" = 'william a. horning' AND "Film" = 'north by northwest'
wikisql
CREATE TABLE table_name_65 ( money___ INTEGER, score VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the highest Money ( $ ), when Score is '69-71-70-74=284'?
SELECT MAX(money___) AS $__ FROM table_name_65 WHERE score = 69 - 71 - 70 - 74 = 284
sql_create_context
CREATE TABLE table_55405 ( "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's the lowest gold with a total of 4 and less than 2 silver for liechtenstein?
SELECT MIN("Gold") FROM table_55405 WHERE "Total" = '4' AND "Nation" = 'liechtenstein' AND "Silver" < '2'
wikisql
CREATE TABLE table_45644 ( "Position" real, "best year" text, "best 2-year period" text, "best 3-year period" text, "best 5-year period" text, "best 10-year period" text, "best 15-year period" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- W...
SELECT "best 3-year period" FROM table_45644 WHERE "best 15-year period" = 'smyslov; kasparov' AND "Position" = '5'
wikisql
CREATE TABLE d_labitems ( row_id number, itemid number, label text ) CREATE TABLE d_items ( row_id number, itemid number, label text, linksto text ) CREATE TABLE cost ( row_id number, subject_id number, hadm_id number, event_type text, event_id number, chargetime ti...
SELECT labevents.charttime FROM labevents WHERE labevents.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 73913) ORDER BY labevents.charttime LIMIT 1
mimic_iii
CREATE TABLE demographic ( subject_id text, hadm_id text, name text, marital_status text, age text, dob text, gender text, language text, religion text, admission_type text, days_stay text, insurance text, ethnicity text, expire_flag text, admission_location t...
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE demographic.ethnicity = "WHITE" AND prescriptions.drug = "Metolazone"
mimicsql_data
CREATE TABLE table_61004 ( "Date" text, "Opponent" text, "Home/Away" text, "Field" text, "Result" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What field had results of w 18-12?
SELECT "Field" FROM table_61004 WHERE "Result" = 'w 18-12'
wikisql
CREATE TABLE table_204_79 ( id number, "season" text, "tier" number, "division" text, "place" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- how many seasons were finished in 3rd place ?
SELECT COUNT("season") FROM table_204_79 WHERE "place" = 3
squall
CREATE TABLE SuggestedEditVotes ( Id number, SuggestedEditId number, UserId number, VoteTypeId number, CreationDate time, TargetUserId number, TargetRepChange number ) CREATE TABLE SuggestedEdits ( Id number, PostId number, CreationDate time, ApprovalDate time, Rejection...
SELECT Id, DisplayName, Reputation, WebsiteUrl, Location FROM Users WHERE Location LIKE '%Bangladesh%' ORDER BY Reputation DESC LIMIT 150
sede
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 txmzjzjlb.JLSJ FROM txmzjzjlb WHERE txmzjzjlb.JZLSH = '67524339485' UNION SELECT ftxmzjzjlb.JLSJ FROM ftxmzjzjlb WHERE ftxmzjzjlb.JZLSH = '67524339485'
css
CREATE TABLE table_56922 ( "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 when the bronze is less than 0?
SELECT COUNT("Rank") FROM table_56922 WHERE "Bronze" < '0'
wikisql
CREATE TABLE table_203_90 ( id number, "religious\ngroup" text, "population\n%" text, "growth\n(1991-2001)" text, "sex ratio\n(total)" number, "literacy\n(%)" text, "work participation\n(%)" text, "sex ratio\n(rural)" number, "sex ratio\n(urban)" number, "sex ratio\n(child)" numb...
SELECT COUNT("religious\ngroup") FROM table_203_90 WHERE "sex ratio\n(total)" > 1000
squall
CREATE TABLE table_72174 ( "District" text, "Vacator" text, "Reason for change" text, "Successor" text, "Date successor seated" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- When was the date successor seated when the vacator was charles e. chamber...
SELECT "Date successor seated" FROM table_72174 WHERE "Vacator" = 'Charles E. Chamberlain (R)'
wikisql
CREATE TABLE table_name_94 ( player VARCHAR, pick__number INTEGER ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What player is picked before 2?
SELECT player FROM table_name_94 WHERE pick__number < 2
sql_create_context
CREATE TABLE table_2015453_1 ( date VARCHAR, attendance VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What date was the attendance 22000?
SELECT date FROM table_2015453_1 WHERE attendance = 22000
sql_create_context
CREATE TABLE table_19320 ( "Rank" real, "Name" text, "Nationality" text, "1st (m)" text, "2nd (m)" text, "Points" text, "Overall NT points" text, "Overall WC points (Rank)" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Name the total nu...
SELECT COUNT("1st (m)") FROM table_19320 WHERE "2nd (m)" = '125.5'
wikisql
CREATE TABLE t_kc21 ( MED_CLINIC_ID text, OVERALL_CD_ORG text, OVERALL_CD_PERSON text, COMP_ID text, PERSON_ID text, PERSON_NM text, IDENTITY_CARD text, SOC_SRT_CARD text, PERSON_SEX number, PERSON_AGE number, IN_HOSP_DATE time, OUT_HOSP_DATE time, DIFF_PLACE_FLG numb...
SELECT SUM(t_kc24.MED_AMOUT), SUM(t_kc24.OVE_PAY) FROM t_kc21 JOIN t_kc24 ON t_kc21.MED_CLINIC_ID = t_kc24.MED_CLINIC_ID WHERE t_kc21.MED_SER_ORG_NO = '7738882' AND t_kc24.CLINIC_SLT_DATE BETWEEN '2010-01-07' AND '2010-10-09'
css
CREATE TABLE Ref_Address_Types ( address_type_code VARCHAR(15), address_type_description VARCHAR(80) ) CREATE TABLE Students_in_Detention ( student_id INTEGER, detention_id INTEGER, incident_id INTEGER ) CREATE TABLE Student_Addresses ( student_id INTEGER, address_id INTEGER, date_addr...
SELECT date_address_from, SUM(monthly_rental) FROM Student_Addresses ORDER BY monthly_rental DESC
nvbench
CREATE TABLE table_204_627 ( id number, "date" text, "opponent" text, "score" text, "top scorer (total points)" text, "venue (location)" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- how many games were not played at araneta coliseum ?
SELECT COUNT(*) FROM table_204_627 WHERE "venue (location)" <> 'araneta coliseum'
squall
CREATE TABLE table_28138 ( "Player" text, "Nationality" text, "Finals" real, "Win-Loss" text, "Year(s)" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What was the win loss record the lady who appeard in 1969?
SELECT "Win-Loss" FROM table_28138 WHERE "Year(s)" = '1969'
wikisql
CREATE TABLE table_30049462_3 ( high_points VARCHAR, team VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- in the milwaukee team who made the high points
SELECT high_points FROM table_30049462_3 WHERE team = "Milwaukee"
sql_create_context
CREATE TABLE railway ( Railway_ID int, Railway text, Builder text, Built text, Wheels text, Location text, ObjectNumber text ) CREATE TABLE railway_manage ( Railway_ID int, Manager_ID int, From_Year text ) CREATE TABLE manager ( Manager_ID int, Name text, Country te...
SELECT Arrival, COUNT(Arrival) FROM train GROUP BY Arrival ORDER BY Arrival DESC
nvbench
CREATE TABLE table_24963 ( "Institution" text, "Date of report" text, "s Risk-weighted asset , \u20ac million" real, "Tier 1 Capital, \u20ac million" real, "Tier 1 ratio" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Name the date of report for tie...
SELECT "Date of report" FROM table_24963 WHERE "Tier 1 ratio" = '3.9%'
wikisql
CREATE TABLE CloseAsOffTopicReasonTypes ( Id number, IsUniversal boolean, InputTitle text, MarkdownInputGuidance text, MarkdownPostOwnerGuidance text, MarkdownPrivilegedUserGuidance text, MarkdownConcensusDescription text, CreationDate time, CreationModeratorId number, ApprovalDa...
SELECT Months AS "Months since user last seen", Posts AS "Posts at exactly", SUM(Posts) OVER (ORDER BY Months DESC) AS "Posts at or before" FROM (SELECT DATEDIFF(mm, Users.LastAccessDate, GETDATE()) AS "Months", COUNT(*) AS "Posts" FROM Users INNER JOIN Posts ON Posts.OwnerUserId = Users.Id GROUP BY DATEDIFF(mm, Users....
sede
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 demographic.age, demographic.religion FROM demographic WHERE demographic.subject_id = "17519"
mimicsql_data
CREATE TABLE t_kc22 ( AMOUNT number, CHA_ITEM_LEV number, DATA_ID text, DIRE_TYPE number, DOSE_FORM text, DOSE_UNIT text, EACH_DOSAGE text, EXP_OCC_DATE time, FLX_MED_ORG_ID text, FXBZ number, HOSP_DOC_CD text, HOSP_DOC_NM text, MED_CLINIC_ID text, MED_DIRE_CD tex...
SELECT SUM(t_kc24.MED_AMOUT), SUM(t_kc24.OVE_PAY) FROM gwyjzb JOIN t_kc24 ON gwyjzb.MED_CLINIC_ID = t_kc24.MED_CLINIC_ID WHERE gwyjzb.MED_SER_ORG_NO = '2412028' AND t_kc24.CLINIC_SLT_DATE BETWEEN '2002-01-31' AND '2009-06-09' UNION SELECT SUM(t_kc24.MED_AMOUT), SUM(t_kc24.OVE_PAY) FROM fgwyjzb JOIN t_kc24 ON fgwyjzb.ME...
css
CREATE TABLE table_60619 ( "English translation" text, "Original album" text, "Lyricist(s)" text, "Composer(s)" text, "Time" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is Time, when Composer(s) is 'Kyriakos Papadopoulos'?
SELECT "Time" FROM table_60619 WHERE "Composer(s)" = 'kyriakos papadopoulos'
wikisql
CREATE TABLE table_name_26 ( Id VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the 1991 when 1997 is 18?
SELECT 1991 FROM table_name_26 WHERE 1997 = "18"
sql_create_context
CREATE TABLE table_name_82 ( loss VARCHAR, date VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What was the score June 22?
SELECT loss FROM table_name_82 WHERE date = "june 22"
sql_create_context
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 IN_DIAG_DIS_CD, AVG(PERSON_AGE) FROM t_kc21 WHERE MED_SER_ORG_NO = '5333311' GROUP BY IN_DIAG_DIS_CD
css
CREATE TABLE market ( market_id number, district text, num_of_employees number, num_of_shops number, ranking number ) CREATE TABLE phone_market ( market_id number, phone_id text, num_of_stock number ) CREATE TABLE phone ( name text, phone_id number, memory_in_g number, ...
SELECT carrier FROM phone GROUP BY carrier ORDER BY COUNT(*) DESC LIMIT 1
spider
CREATE TABLE table_26899 ( "No. in series" real, "No. in 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. -- What episode number in the...
SELECT MIN("No. in series") FROM table_26899 WHERE "Title" = 'Guitar'
wikisql
CREATE TABLE table_name_71 ( school VARCHAR, round VARCHAR, player VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which school has more than 3 rounds with jason odom?
SELECT school FROM table_name_71 WHERE round > 3 AND player = "jason odom"
sql_create_context
CREATE TABLE table_56372 ( "Year" real, "Entrant" text, "Chassis" text, "Engine" text, "Pts." real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- what is the most recent year for a ligier gitanes blondes
SELECT MAX("Year") FROM table_56372 WHERE "Entrant" = 'ligier gitanes blondes'
wikisql
CREATE TABLE appearances ( year INTEGER, team_id TEXT, league_id TEXT, player_id TEXT, g_all NUMERIC, gs NUMERIC, g_batting INTEGER, g_defense NUMERIC, g_p INTEGER, g_c INTEGER, g_1b INTEGER, g_2b INTEGER, g_3b INTEGER, g_ss INTEGER, g_lf INTEGER, g_cf INT...
SELECT year, AVG(attendance) FROM home_game ORDER BY year
nvbench
CREATE TABLE Employees ( employee_id INTEGER, role_code CHAR(15), employee_name VARCHAR(255), other_details VARCHAR(255) ) CREATE TABLE Documents_Mailed ( document_id INTEGER, mailed_to_address_id INTEGER, mailing_date DATETIME ) CREATE TABLE Draft_Copies ( document_id INTEGER, dra...
SELECT receipt_date, COUNT(receipt_date) FROM Documents ORDER BY receipt_date DESC
nvbench
CREATE TABLE t_kc22 ( AMOUNT number, CHA_ITEM_LEV number, DATA_ID text, DIRE_TYPE number, DOSE_FORM text, DOSE_UNIT text, EACH_DOSAGE text, EXP_OCC_DATE time, FLX_MED_ORG_ID text, FXBZ number, HOSP_DOC_CD text, HOSP_DOC_NM text, MED_DIRE_CD text, MED_DIRE_NM text,...
SELECT t_kc21.IN_DIAG_DIS_CD, t_kc21.IN_DIAG_DIS_NM FROM t_kc21 WHERE t_kc21.PERSON_NM = '金英耀' AND t_kc21.IN_HOSP_DATE BETWEEN '2000-04-27' AND '2021-02-17' GROUP BY t_kc21.IN_DIAG_DIS_CD ORDER BY COUNT(*) DESC LIMIT 1
css
CREATE TABLE table_name_31 ( Id VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What did the tournament with a QF in 1969 get in 1956-1968?
SELECT 1956 AS _1968 FROM table_name_31 WHERE 1969 = "qf"
sql_create_context
CREATE TABLE table_11461 ( "Tournament" text, "2006" text, "2007" text, "2008" text, "2009" text, "2010" text, "2011" text, "2012" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the 2012 value with 1r in 2011, 2007 of A, 2010 of ...
SELECT "2012" FROM table_11461 WHERE "2011" = '1r' AND "2007" = 'a' AND "2010" = '1r' AND "2009" = 'a'
wikisql
CREATE TABLE table_52116 ( "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 is the away side score when hawthorn is the...
SELECT "Away team score" FROM table_52116 WHERE "Home team" = 'hawthorn'
wikisql
CREATE TABLE table_73451 ( "No." real, "Title" text, "Directed by" text, "Written by" text, "Original air date" text, "Production code" text, "Viewers (in millions)" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- How many millions of people ...
SELECT "Viewers (in millions)" FROM table_73451 WHERE "Title" = 'Father''s Day'
wikisql
CREATE TABLE table_name_38 ( ties VARCHAR, wins VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the tie with a win of 0?
SELECT ties FROM table_name_38 WHERE wins = "0"
sql_create_context
CREATE TABLE bdmzjzjlb ( HXPLC number, HZXM text, JLSJ time, JZJSSJ time, JZKSBM text, JZKSMC text, JZKSRQ time, JZLSH number, JZZDBM text, JZZDSM text, JZZTDM number, JZZTMC text, KH text, KLX number, MJZH text, ML number, MZZYZDZZBM text, MZZYZDZ...
SELECT jybgb.KSBM, jybgb.KSMC FROM person_info JOIN hz_info JOIN wdmzjzjlb JOIN jybgb ON person_info.RYBH = hz_info.RYBH AND hz_info.YLJGDM = wdmzjzjlb.YLJGDM AND hz_info.KH = wdmzjzjlb.KH AND hz_info.KLX = wdmzjzjlb.KLX AND wdmzjzjlb.YLJGDM = jybgb.YLJGDM_MZJZJLB AND wdmzjzjlb.JZLSH = jybgb.JZLSH_MZJZJLB WHERE person_...
css
CREATE TABLE table_66603 ( "Frequency" text, "Call sign" text, "Branding" text, "Format" text, "Owner" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Who owns CKSB-8-FM?
SELECT "Owner" FROM table_66603 WHERE "Call sign" = 'cksb-8-fm'
wikisql
CREATE TABLE PostTypes ( Id number, Name text ) CREATE TABLE Users ( Id number, Reputation number, CreationDate time, DisplayName text, LastAccessDate time, WebsiteUrl text, Location text, AboutMe text, Views number, UpVotes number, DownVotes number, ProfileImage...
SELECT ROW_NUMBER() OVER (ORDER BY Reputation DESC) AS "#", u.Id AS "user_link", u.Reputation, COUNT(p.Id) FROM Users AS u INNER JOIN Posts AS p ON p.OwnerUserId = u.Id INNER JOIN PostTags AS pt ON pt.PostId = p.Id INNER JOIN Tags AS t ON t.Id = pt.TagId WHERE t.TagName = '##tagname##' GROUP BY u.Reputation, u.Id ORDER...
sede
CREATE TABLE table_25071 ( "State (class)" text, "Vacator" text, "Reason for change" text, "Successor" text, "Date of successors formal installation" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the date of successors formal installation w...
SELECT "Date of successors formal installation" FROM table_25071 WHERE "Reason for change" = 'Resigned December 4, 1819'
wikisql
CREATE TABLE table_14572 ( "Year" real, "Venue" text, "Winner" text, "Country" text, "Score" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the latest Year, when the Venue is L bker Golf Resort?
SELECT MAX("Year") FROM table_14572 WHERE "Venue" = 'lübker golf resort'
wikisql
CREATE TABLE table_2159537_3 ( successor VARCHAR, reason_for_change VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Who was the successor for the reason for change being 'died January 16, 1944?
SELECT successor FROM table_2159537_3 WHERE reason_for_change = "Died January 16, 1944"
sql_create_context
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 text, icustay_id text, drug_type text, drug text, formulary_drug_cd text, route text, drug_dose text ) ...
SELECT demographic.diagnosis, demographic.dischtime FROM demographic WHERE demographic.subject_id = "71798"
mimicsql_data
CREATE TABLE table_48202 ( "Member" text, "Party" text, "Electorate" text, "State" text, "Term of office" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is Electorate, when Party is 'Country', when State is 'WA', and when Member is 'John Hallet...
SELECT "Electorate" FROM table_48202 WHERE "Party" = 'country' AND "State" = 'wa' AND "Member" = 'john hallett'
wikisql
CREATE TABLE table_59377 ( "Player" text, "Country" text, "Year(s) won" text, "Total" real, "To par" real, "Finish" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the total when the finish was t44?
SELECT "Total" FROM table_59377 WHERE "Finish" = 't44'
wikisql
CREATE TABLE prescriptions ( subject_id text, hadm_id text, icustay_id text, drug_type text, drug text, formulary_drug_cd text, route text, drug_dose text ) CREATE TABLE demographic ( subject_id text, hadm_id text, name text, marital_status text, age text, dob te...
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.diagnosis = "BRAIN MASS;INTRACRANIAL HEMORRHAGE" AND lab.fluid = "Urine"
mimicsql_data
CREATE TABLE table_29926 ( "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. -- Where ...
SELECT "Location Attendance" FROM table_29926 WHERE "High assists" = 'Will Bynum (5)'
wikisql
CREATE TABLE countries ( COUNTRY_ID varchar(2), COUNTRY_NAME varchar(40), REGION_ID decimal(10,0) ) CREATE TABLE regions ( REGION_ID decimal(5,0), REGION_NAME varchar(25) ) CREATE TABLE jobs ( JOB_ID varchar(10), JOB_TITLE varchar(35), MIN_SALARY decimal(6,0), MAX_SALARY decimal(6,...
SELECT HIRE_DATE, AVG(SALARY) FROM employees WHERE FIRST_NAME LIKE '%D%' OR FIRST_NAME LIKE '%S%'
nvbench
CREATE TABLE table_name_85 ( bush_number INTEGER, kerry_number VARCHAR, others_percentage VARCHAR, others_number VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the highest Bush#, when Others% is '1.7%', when Others# is less than 75, and when ...
SELECT MAX(bush_number) FROM table_name_85 WHERE others_percentage = "1.7%" AND others_number < 75 AND kerry_number > 1 OFFSET 524
sql_create_context
CREATE TABLE table_76372 ( "Rank" text, "Nation" text, "Gold" real, "Silver" real, "Bronze" real, "Total" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- How many total silvers does Russia have?
SELECT COUNT("Silver") FROM table_76372 WHERE "Nation" = 'russia'
wikisql
CREATE TABLE table_27091128_2 ( team VARCHAR, replaced_by VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What team's manager was replaced by Ercan Ertem z?
SELECT team FROM table_27091128_2 WHERE replaced_by = "Ercan Ertemçöz"
sql_create_context
CREATE TABLE table_20174050_7 ( notes VARCHAR, reader VARCHAR, title VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- If the title is Paradox Lost and the reader is Briggs, Nicholas Nicholas Briggs, what are all of the notes?
SELECT notes FROM table_20174050_7 WHERE reader = "Briggs, Nicholas Nicholas Briggs" AND title = "Paradox Lost"
sql_create_context
CREATE TABLE demographic ( subject_id text, hadm_id text, name text, marital_status text, age text, dob text, gender text, language text, religion text, admission_type text, days_stay text, insurance text, ethnicity text, expire_flag text, admission_location t...
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.diagnosis = "LEFT COLON CANCER" AND lab.fluid = "Urine"
mimicsql_data
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.admityear < "2197" AND lab.fluid = "Blood"
mimicsql_data
CREATE TABLE t_kc24 ( ACCOUNT_DASH_DATE time, ACCOUNT_DASH_FLG number, CASH_PAY number, CIVIL_SUBSIDY number, CKC102 number, CLINIC_ID text, CLINIC_SLT_DATE time, COMP_ID text, COM_ACC_PAY number, COM_PAY number, DATA_ID text, ENT_ACC_PAY number, ENT_PAY number, F...
SELECT qtb.MED_ORG_DEPT_CD, qtb.IN_DIAG_DIS_NM, MAX(t_kc24.CIVIL_SUBSIDY) FROM qtb JOIN t_kc24 ON qtb.MED_CLINIC_ID = t_kc24.MED_CLINIC_ID WHERE qtb.MED_SER_ORG_NO = '4694071' GROUP BY qtb.MED_ORG_DEPT_CD, qtb.IN_DIAG_DIS_NM ORDER BY MAX(t_kc24.CIVIL_SUBSIDY / t_kc24.MED_AMOUT) DESC UNION SELECT gyb.MED_ORG_DEPT_CD, gy...
css
CREATE TABLE zyjzjlb ( CYBQDM text, CYBQMC text, CYCWH text, CYKSDM text, CYKSMC text, CYSJ time, CYZTDM number, HZXM text, JZKSDM text, JZKSMC text, JZLSH text, KH text, KLX number, MZBMLX number, MZJZLSH text, MZZDBM text, MZZDMC text, MZZYZDZZBM...
SELECT jybgb.BGDH FROM person_info JOIN hz_info JOIN mzjzjlb JOIN jybgb ON person_info.RYBH = hz_info.RYBH AND hz_info.YLJGDM = mzjzjlb.YLJGDM AND hz_info.KH = mzjzjlb.KH AND hz_info.KLX = mzjzjlb.KLX AND mzjzjlb.YLJGDM = jybgb.YLJGDM_MZJZJLB AND mzjzjlb.JZLSH = jybgb.JZLSH_MZJZJLB WHERE person_info.XM = '郑欣嘉' AND NOT ...
css
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 WHERE demographic.discharge_location = "DISCH-TRAN TO PSYCH HOSP" AND diagnoses.long_title = "Dehydration"
mimicsql_data