instruction
stringlengths
151
7.46k
output
stringlengths
2
4.44k
source
stringclasses
26 values
CREATE TABLE table_name_54 ( attendance INTEGER, venue VARCHAR, date VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the average Attendance, when Venue is 'Candlestick Park', and when Date is 'November 25'?
SELECT AVG(attendance) FROM table_name_54 WHERE venue = "candlestick park" AND date = "november 25"
sql_create_context
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_kc22.MED_EXP_DET_ID FROM t_kc22 JOIN t_kc21_t_kc22 JOIN t_kc21 ON t_kc21_t_kc22.MED_EXP_DET_ID = t_kc22.MED_EXP_DET_ID AND t_kc21_t_kc22.MED_CLINIC_ID = t_kc21.MED_CLINIC_ID WHERE t_kc21.MED_CLINIC_ID = '51226934019' AND t_kc22.REMOTE_SETTLE_FLG = '异地1' OR t_kc22.REMOTE_SETTLE_FLG = '异地2'
css
CREATE TABLE PostHistoryTypes ( Id number, Name text ) CREATE TABLE TagSynonyms ( Id number, SourceTagName text, TargetTagName text, CreationDate time, OwnerUserId number, AutoRenameCount number, LastAutoRename time, Score number, ApprovedByUserId number, ApprovalDate ti...
SELECT * FROM Tags ORDER BY Count DESC LIMIT 10
sede
CREATE TABLE table_name_60 ( school_club_team VARCHAR, pick VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which school or club team has a pick of 139?
SELECT school_club_team FROM table_name_60 WHERE pick = 139
sql_create_context
CREATE TABLE table_name_15 ( circuit VARCHAR, team VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What circuit has volvo cars australia as the team?
SELECT circuit FROM table_name_15 WHERE team = "volvo cars australia"
sql_create_context
CREATE TABLE table_145439_1 ( economics VARCHAR, education VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- what's the economics score with education being 92.0
SELECT economics FROM table_145439_1 WHERE education = "92.0"
sql_create_context
CREATE TABLE jybgb ( BBCJBW text, BBDM text, BBMC text, BBZT number, BGDH text, BGJGDM text, BGJGMC text, BGRGH text, BGRQ time, BGRXM text, BGSJ time, CJRQ time, JSBBRQSJ time, JSBBSJ time, JYBBH text, JYJGMC text, JYJSGH text, JYJSQM text, JY...
SELECT jybgb.KSBM, jybgb.KSMC FROM jybgb WHERE jybgb.BGDH = '65189711033'
css
CREATE TABLE table_78774 ( "Date" text, "Round" text, "Opponent" text, "Venue" text, "Result" text, "Attendance" real, "Scorers" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the highest attendance at a game with a result of 5-1?
SELECT MAX("Attendance") FROM table_78774 WHERE "Result" = '5-1'
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 mzjzjlb ( HXPLC number, HZXM ...
SELECT jybgb.BGDH FROM person_info JOIN hz_info JOIN mzjzjlb JOIN jybgb JOIN mzjzjlb_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 = mzjzjlb_jybgb.YLJGDM_MZJZJLB AND mzjzjlb.JZLSH = jybgb.JZLSH_MZJZJLB AND mzjzjl...
css
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 procedures ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) ...
SELECT MIN(demographic.age) FROM demographic WHERE demographic.gender = "M" AND demographic.discharge_location = "LONG TERM CARE HOSPITAL"
mimicsql_data
CREATE TABLE table_name_44 ( away_team VARCHAR, venue VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What was the away team's score at the game held at MCG?
SELECT away_team AS score FROM table_name_44 WHERE venue = "mcg"
sql_create_context
CREATE TABLE table_8809 ( "Class" text, "Wheel arrangement" text, "Fleet number(s)" text, "Manufacturer" text, "Year made" text, "Quantity made" text, "Quantity preserved" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What manufacturer made...
SELECT "Manufacturer" FROM table_8809 WHERE "Class" = 'b-2'
wikisql
CREATE TABLE table_name_14 ( away VARCHAR, home VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is Away, when Home is 'marathon'?
SELECT away FROM table_name_14 WHERE home = "marathon"
sql_create_context
CREATE TABLE table_name_35 ( partner VARCHAR, surface VARCHAR, tournament VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Who was Silva's Partner in the Amarante Tournament played on a Hard Surface?
SELECT partner FROM table_name_35 WHERE surface = "hard" AND tournament = "amarante"
sql_create_context
CREATE TABLE table_70142 ( "Member" text, "Party" text, "Electorate" text, "State" text, "First elected" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the year First elected, when the State is vic, and when the Member is Hon Don Chipp?
SELECT "First elected" FROM table_70142 WHERE "State" = 'vic' AND "Member" = 'hon don chipp'
wikisql
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 diagnoses ON demographic.hadm_id = diagnoses.hadm_id INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE diagnoses.icd9_code = "6959" AND prescriptions.drug_type = "BASE"
mimicsql_data
CREATE TABLE demographic ( subject_id text, hadm_id text, name text, marital_status text, age text, dob text, gender text, language text, religion text, admission_type text, days_stay text, insurance text, ethnicity text, expire_flag text, admission_location t...
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE demographic.days_stay > "34" AND prescriptions.drug = "Pancrelipase 5000"
mimicsql_data
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_name_86 ( college VARCHAR, team VARCHAR, round VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Name the college that has 7 rounds and boston celtics team
SELECT college FROM table_name_86 WHERE team = "boston celtics" AND round = "7"
sql_create_context
CREATE TABLE table_15938 ( "UN Operation name" text, "UN Operation title" text, "Location" text, "Dates of Australian involvement" text, "Number of Australians involved" text, "Australian role" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- How ...
SELECT COUNT("Number of Australians involved") FROM table_15938 WHERE "UN Operation title" = 'UN Commission on Korea'
wikisql
CREATE TABLE table_name_24 ( player VARCHAR, to_par VARCHAR, score VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What Player has a To par of +1 and a Score of 73-71-71=217?
SELECT player FROM table_name_24 WHERE to_par = "+1" AND score = 73 - 71 - 71 = 217
sql_create_context
CREATE TABLE zzmzjzjlb ( 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 AVG(jyjgzbb.JCZBJGDL), MIN(jyjgzbb.JCZBJGDL), MAX(jyjgzbb.JCZBJGDL) FROM zzmzjzjlb JOIN jybgb JOIN jyjgzbb ON zzmzjzjlb.YLJGDM = jybgb.YLJGDM_MZJZJLB AND zzmzjzjlb.JZLSH = jybgb.JZLSH_MZJZJLB AND jybgb.YLJGDM = jyjgzbb.YLJGDM AND jybgb.BGDH = jyjgzbb.BGDH WHERE zzmzjzjlb.JZZDSM = '谵妄' AND jyjgzbb.JCZBDM = '97671...
css
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 JOB_ID, AVG(SALARY) FROM employees WHERE NOT EMPLOYEE_ID IN (SELECT EMPLOYEE_ID FROM job_history) GROUP BY JOB_ID ORDER BY AVG(SALARY) 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_CLINIC_ID text, MED_DIRE_CD tex...
SELECT COUNT(*) FROM t_kc21 WHERE t_kc21.MED_SER_ORG_NO = '0244651' AND t_kc21.IN_HOSP_DATE BETWEEN '2002-05-16' AND '2016-06-25' AND t_kc21.IN_DIAG_DIS_CD <> t_kc21.OUT_DIAG_DIS_CD
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, COUNT(T1.Name) FROM Products AS T1 JOIN Manufacturers AS T2 ON T1.Manufacturer = T2.Code GROUP BY T1.Name ORDER BY T1.Name
nvbench
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.JCZBJGDL, jyjgzbb.JCZBJGDW FROM person_info JOIN hz_info JOIN mzjzjlb JOIN jybgb JOIN jyjgzbb 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 ...
css
CREATE TABLE table_17064 ( "Player" text, "Position" text, "School" text, "Hometown" text, "College" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What player represented Vista Murrieta High School?
SELECT "Player" FROM table_17064 WHERE "School" = 'Vista Murrieta High School'
wikisql
CREATE TABLE table_15274 ( "Championship" text, "Current champion(s)" text, "Reign" text, "Date won" text, "Days held" real, "Location" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Name the days for current champions of dean ambrose
SELECT "Days held" FROM table_15274 WHERE "Current champion(s)" = 'dean ambrose'
wikisql
CREATE TABLE table_26826304_1 ( written_by VARCHAR, production_code VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Who was the writer of the episode with a production code of 5aky04?
SELECT written_by FROM table_26826304_1 WHERE production_code = "5AKY04"
sql_create_context
CREATE TABLE table_17641206_8 ( episode VARCHAR, original_airdate VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- How many episodes aired on 22january2009
SELECT COUNT(episode) FROM table_17641206_8 WHERE original_airdate = "22January2009"
sql_create_context
CREATE TABLE table_36855 ( "City" text, "State/Territory" text, "IATA" text, "ICAO" text, "Airport" text, "Begin" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which airport has an ICAO of ybcg?
SELECT "Airport" FROM table_36855 WHERE "ICAO" = 'ybcg'
wikisql
CREATE TABLE table_11630008_7 ( title VARCHAR, production_code VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the title of production code 514?
SELECT title FROM table_11630008_7 WHERE production_code = 514
sql_create_context
CREATE TABLE table_27392 ( "Language" text, "Padilla Municipality" real, "Tomina Municipality" real, "Sopachuy Municipality" real, "Villa Alcal\u00e1 Municipality" real, "El Villar Municipality" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Nam...
SELECT "Language" FROM table_27392 WHERE "Sopachuy Municipality" = '10'
wikisql
CREATE TABLE student_course_attendance ( student_id number, course_id number, date_of_attendance time ) CREATE TABLE candidate_assessments ( candidate_id number, qualification text, assessment_date time, asessment_outcome_code text ) CREATE TABLE candidates ( candidate_id number, c...
SELECT student_id FROM student_course_registrations UNION SELECT student_id FROM student_course_attendance
spider
CREATE TABLE table_name_93 ( qual_1 VARCHAR, name VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What did Alex Tagliani get for Qual 1?
SELECT qual_1 FROM table_name_93 WHERE name = "alex tagliani"
sql_create_context
CREATE TABLE table_39604 ( "Year" real, "Championship" text, "54 Holes" text, "Winning Score" text, "Margin" text, "Runner(s)-up" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which championship has a margin of 8 strokes?
SELECT "Championship" FROM table_39604 WHERE "Margin" = '8 strokes'
wikisql
CREATE TABLE table_name_27 ( method VARCHAR, record VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which method has a record of 3-0?
SELECT method FROM table_name_27 WHERE record = "3-0"
sql_create_context
CREATE TABLE table_name_68 ( type VARCHAR, etymology VARCHAR, number_of_bearers_2008 VARCHAR, rank VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is Type, when Number of Bearers 2008 is greater than 12.376, when Rank is greater than 3, and when ...
SELECT type FROM table_name_68 WHERE number_of_bearers_2008 > 12.376 AND rank > 3 AND etymology = "son of jens"
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 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.marital_status = "SINGLE" AND lab.itemid = "51144"
mimicsql_data
CREATE TABLE table_10077 ( "Place" text, "Player" text, "Country" text, "Score" text, "To par" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the score of player craig stadler from the United States with a t8 place?
SELECT "Score" FROM table_10077 WHERE "Place" = 't8' AND "Country" = 'united states' AND "Player" = 'craig stadler'
wikisql
CREATE TABLE game ( Date VARCHAR, home_team VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- List the dates of games by the home team name in descending order.
SELECT Date FROM game ORDER BY home_team DESC
sql_create_context
CREATE TABLE table_name_17 ( game INTEGER, batting_2nd VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- what is the game when batting 2nd is new zealand 6/133 (18)?
SELECT MIN(game) FROM table_name_17 WHERE batting_2nd = "new zealand 6/133 (18)"
sql_create_context
CREATE TABLE table_name_84 ( score VARCHAR, home_team VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What was the score when the home team was goole town?
SELECT score FROM table_name_84 WHERE home_team = "goole town"
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 demographic.admission_type, diagnoses.short_title FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE demographic.subject_id = "30011"
mimicsql_data
CREATE TABLE table_73019 ( "Japanese Title" text, "Romaji Title" text, "TV Station" text, "Time Frame" text, "Starring Actors" text, "Theme Song(s)" text, "Episodes" real, "Average Ratings" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- ...
SELECT "Theme Song(s)" FROM table_73019 WHERE "Romaji Title" = 'Magarikado no Kanojo'
wikisql
CREATE TABLE table_204_631 ( id number, "#" number, "title" text, "english translation" text, "original album" text, "length" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- how many albums did not have a time length ?
SELECT COUNT("title") FROM table_204_631 WHERE "length" IS NULL
squall
CREATE TABLE table_204_237 ( id number, "season" text, "average" number, "high" number, "low" number, "season tickets" number ) -- Using valid SQLite, answer the following questions for the tables provided above. -- how many seasons had average attendance of at least 15,000 at the stadio enni...
SELECT COUNT("season") FROM table_204_237 WHERE "average" >= 15000
squall
CREATE TABLE ReviewTaskResultTypes ( Id number, Name text, Description text ) CREATE TABLE Posts ( Id number, PostTypeId number, AcceptedAnswerId number, ParentId number, CreationDate time, DeletionDate time, Score number, ViewCount number, Body text, OwnerUserId num...
SELECT * FROM sys.databases WHERE (NOT name LIKE '%.Meta' OR name = 'StackExchange.Meta') AND database_id > 5 ORDER BY name
sede
CREATE TABLE patients ( row_id number, subject_id number, gender text, dob time, dod time ) CREATE TABLE prescriptions ( row_id number, subject_id number, hadm_id number, startdate time, enddate time, drug text, dose_val_rx text, dose_unit_rx text, route text ) ...
SELECT t2.drug FROM (SELECT admissions.subject_id, procedures_icd.charttime FROM procedures_icd JOIN admissions ON procedures_icd.hadm_id = admissions.hadm_id WHERE admissions.subject_id = 66015 AND procedures_icd.icd9_code = (SELECT d_icd_procedures.icd9_code FROM d_icd_procedures WHERE d_icd_procedures.short_title = ...
mimic_iii
CREATE TABLE table_1993 ( "Rank" real, "London Borough" text, "Black African Population" real, "Black Caribbean Population" real, "Other Black Population" real, "Total Black Population" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- How much is ...
SELECT MIN("Other Black Population") FROM table_1993 WHERE "Black African Population" = '37811'
wikisql
CREATE TABLE PostHistoryTypes ( Id number, Name text ) CREATE TABLE Votes ( Id number, PostId number, VoteTypeId number, UserId number, CreationDate time, BountyAmount number ) CREATE TABLE ReviewTaskTypes ( Id number, Name text, Description text ) CREATE TABLE PostsWithDe...
SELECT Tags, p.Id AS "post_link" FROM Posts AS p JOIN PostTags AS pt ON p.Id = pt.PostId JOIN Tags AS t ON pt.TagId = t.Id WHERE t.TagName = 'origins' ORDER BY CASE WHEN p.Tags LIKE '%history-of%' THEN 1 ELSE 0 END, p.CreationDate
sede
CREATE TABLE ReviewRejectionReasons ( Id number, Name text, Description text, PostTypeId number ) CREATE TABLE Users ( Id number, Reputation number, CreationDate time, DisplayName text, LastAccessDate time, WebsiteUrl text, Location text, AboutMe text, Views number, ...
SELECT s.Id AS "suggested_edit_link", v.UserId, v.CreationDate, s.Comment FROM SuggestedEditVotes AS v INNER JOIN SuggestedEdits AS s ON s.Id = v.SuggestedEditId WHERE v.SuggestedEditId IN (SELECT Id FROM SuggestedEdits WHERE Id IN (SELECT SuggestedEditId FROM ReviewTasks WHERE Id IN (SELECT ReviewTaskId FROM ReviewTas...
sede
CREATE TABLE table_name_40 ( application_sharing VARCHAR, web_conferencing VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is Application Sharing, when Web Conferencing is 'Web Conferencing'?
SELECT application_sharing FROM table_name_40 WHERE web_conferencing = "web conferencing"
sql_create_context
CREATE TABLE job_history ( EMPLOYEE_ID decimal(6,0), START_DATE date, END_DATE date, JOB_ID varchar(10), DEPARTMENT_ID decimal(4,0) ) CREATE TABLE jobs ( JOB_ID varchar(10), JOB_TITLE varchar(35), MIN_SALARY decimal(6,0), MAX_SALARY decimal(6,0) ) CREATE TABLE regions ( REGION_...
SELECT LAST_NAME, EMPLOYEE_ID FROM employees WHERE NOT DEPARTMENT_ID IN (SELECT DEPARTMENT_ID FROM departments WHERE MANAGER_ID BETWEEN 100 AND 200) ORDER BY EMPLOYEE_ID
nvbench
CREATE TABLE table_name_70 ( home VARCHAR, competition VARCHAR, round VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which Home has a Competition of european cup, and a Round of qf?
SELECT home FROM table_name_70 WHERE competition = "european cup" AND round = "qf"
sql_create_context
CREATE TABLE table_59093 ( "Player" text, "Country" text, "Year(s) Won" text, "Total" real, "To par" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Can you tell me the Year(s) Won that has the To par larger than 5, and the Total smaller than 155, an...
SELECT "Year(s) Won" FROM table_59093 WHERE "To par" > '5' AND "Total" < '155' AND "Country" = 'united states'
wikisql
CREATE TABLE transfers ( row_id number, subject_id number, hadm_id number, icustay_id number, eventtype text, careunit text, wardid number, intime time, outtime time ) CREATE TABLE d_icd_diagnoses ( row_id number, icd9_code text, short_title text, long_title text ) ...
SELECT d_icd_procedures.short_title FROM d_icd_procedures WHERE d_icd_procedures.icd9_code IN (SELECT t1.icd9_code FROM (SELECT procedures_icd.icd9_code, COUNT(procedures_icd.charttime) AS c1 FROM procedures_icd WHERE procedures_icd.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 186...
mimic_iii
CREATE TABLE table_63876 ( "Rank" real, "Rider" text, "Team" text, "Speed" text, "Time" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the lowest rank of rider darren gilpin?
SELECT MIN("Rank") FROM table_63876 WHERE "Rider" = 'darren gilpin'
wikisql
CREATE TABLE table_2214582_3 ( home_leg VARCHAR, opponents VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What was the home leg score against partizani tirana?
SELECT home_leg FROM table_2214582_3 WHERE opponents = "Partizani Tirana"
sql_create_context
CREATE TABLE table_name_83 ( loss VARCHAR, record VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What loss has 10-16 as the record?
SELECT loss FROM table_name_83 WHERE record = "10-16"
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 Team_Name, All_Games_Percent FROM basketball_match ORDER BY All_Games_Percent DESC
nvbench
CREATE TABLE SuggestedEditVotes ( Id number, SuggestedEditId number, UserId number, VoteTypeId number, CreationDate time, TargetUserId number, TargetRepChange number ) CREATE TABLE PostHistoryTypes ( Id number, Name text ) CREATE TABLE ReviewRejectionReasons ( Id number, Na...
SELECT COUNT(P.Id) AS Posts, YEAR(P.CreationDate) AS Year_Data FROM Posts AS P WHERE P.Title LIKE '%mockito%' AND ((P.Tags LIKE '%android-testing%') OR (P.Tags LIKE '%robotium%') OR (P.Tags LIKE '%androidviewclient%') OR (P.Tags LIKE '%monkeyrunner%') OR (P.Tags LIKE '%robolectric%') OR (P.Tags LIKE '%android-espresso%...
sede
CREATE TABLE patient ( uniquepid text, patienthealthsystemstayid number, patientunitstayid number, gender text, age text, ethnicity text, hospitalid number, wardid number, admissionheight number, admissionweight number, dischargeweight number, hospitaladmittime time, ...
SELECT SUM(CASE WHEN patient.hospitaldischargestatus = 'alive' THEN 1 WHEN STRFTIME('%j', patient.hospitaldischargetime) - STRFTIME('%j', t2.diagnosistime) > 1 * 365 THEN 1 ELSE 0 END) * 100 / COUNT(*) FROM (SELECT t1.uniquepid, t1.diagnosistime FROM (SELECT patient.uniquepid, diagnosis.diagnosistime FROM diagnosis JOI...
eicu
CREATE TABLE table_6655 ( "Date" text, "City" text, "Opponent" text, "Results\u00b9" text, "Type of game" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- On what date was there a friendly game against Wales?
SELECT "Date" FROM table_6655 WHERE "Type of game" = 'friendly' AND "Opponent" = 'wales'
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 mzjzjlb ( HXPLC number, HZXM ...
SELECT jyjgzbb.JCZBJGDL, jyjgzbb.JCZBJGDW FROM person_info JOIN hz_info JOIN mzjzjlb JOIN zyjybgb JOIN jyjgzbb 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 = zyjybgb.YLJGDM_MZJZJLB AND mzjzjlb.JZLSH = zyjybgb.JZLSH_MZ...
css
CREATE TABLE table_name_50 ( player VARCHAR, games_played VARCHAR, goals_allowed VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Who played over 46 games and allowed less than 195 goals?
SELECT player FROM table_name_50 WHERE games_played > 46 AND goals_allowed < 195
sql_create_context
CREATE TABLE table_64938 ( "Player" text, "Int'l Debut" text, "Year" text, "Cross Code Debut" text, "Date" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the Date of RL Test v Wales Int'l Debut?
SELECT "Date" FROM table_64938 WHERE "Int'l Debut" = 'rl test v wales'
wikisql
CREATE TABLE diagnoses ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) CREATE TABLE demographic ( subject_id text, hadm_id text, name text, marital_status text, age text, dob text, gender text, language text, religion text, ...
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.diagnosis = "SQUAMOUS CELL CARCINOMA ORAL TONGUE/SDA" AND demographic.dob_year < "2170"
mimicsql_data
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 SOC_SRT_DIRE_NM, AMOUNT, MED_CLINIC_ID FROM t_kc22 WHERE (MED_CLINIC_ID = '71680261632' OR MED_CLINIC_ID = '54695034661') AND SOC_SRT_DIRE_NM IN ((SELECT SOC_SRT_DIRE_NM FROM t_kc22 WHERE MED_CLINIC_ID = '71680261632') INTERSECT (SELECT SOC_SRT_DIRE_NM FROM t_kc22 WHERE MED_CLINIC_ID = '54695034661'))
css
CREATE TABLE table_name_99 ( constructor VARCHAR, time_retired VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the constructor for time/retired of handling?
SELECT constructor FROM table_name_99 WHERE time_retired = "handling"
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 procedures ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) ...
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE procedures.icd9_code = "4105" AND prescriptions.drug_type = "MAIN"
mimicsql_data
CREATE TABLE table_name_34 ( municipality VARCHAR, party VARCHAR, election VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which municipality has a party of Lega Friuli-VG that won elections before 2011?
SELECT municipality FROM table_name_34 WHERE party = "lega friuli-vg" AND election < 2011
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 diagnoses ON demographic.hadm_id = diagnoses.hadm_id INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE diagnoses.short_title = "Intestinal abscess" AND prescriptions.drug_type = "MAIN"
mimicsql_data
CREATE TABLE table_name_94 ( wins INTEGER, points VARCHAR, year VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Name the lowest Wins which has Points of 28, and a Year smaller than 1972?
SELECT MIN(wins) FROM table_name_94 WHERE points = 28 AND year < 1972
sql_create_context
CREATE TABLE table_204_964 ( id number, "team" text, "seasons" number, "games" number, "wins" number, "ties" number, "losses" number, "goals\nfor" number, "goals\nagainst" number, "goal\ndiff" number, "points" number ) -- Using valid SQLite, answer the following questions f...
SELECT "team" FROM table_204_964 ORDER BY "losses" LIMIT 1
squall
CREATE TABLE table_67844 ( "Rank" real, "Team" text, "Wins" real, "Losses" real, "Runs Allowed" real, "Run Ratio" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the average number of losses the team with less than 25 runs allowed and 5 w...
SELECT AVG("Losses") FROM table_67844 WHERE "Runs Allowed" < '25' AND "Wins" = '5'
wikisql
CREATE TABLE diagnoses ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) CREATE TABLE demographic ( subject_id text, hadm_id text, name text, marital_status text, age text, dob text, gender text, language text, religion text, ...
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE demographic.admission_type = "URGENT" AND diagnoses.long_title = "Poisoning by penicillins"
mimicsql_data
CREATE TABLE course_prerequisite ( pre_course_id int, course_id int ) CREATE TABLE area ( course_id int, area varchar ) CREATE TABLE offering_instructor ( offering_instructor_id int, offering_id int, instructor_id int ) CREATE TABLE student ( student_id int, lastname varchar, ...
SELECT COUNT(*) > 0 FROM course, course_offering, semester WHERE course.course_id = course_offering.course_id AND course.department = 'SAC' AND course.number = 306 AND semester.semester = 'FA' AND semester.semester_id = course_offering.semester AND semester.year = 2016
advising
CREATE TABLE table_204_770 ( id number, "season" number, "date" text, "jia-a/csl winner" text, "result" text, "fa cup winner" text, "scorers" text, "stadium" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- how many games have been won by ...
SELECT COUNT(*) FROM table_204_770 WHERE ABS("result" - "result") = 1
squall
CREATE TABLE table_203_496 ( id number, "pos" number, "country" text, "gold" number, "silver" number, "bronze" number, "total" number ) -- Using valid SQLite, answer the following questions for the tables provided above. -- how many gold and bronze medals were achieved overall ?
SELECT SUM("silver" + "bronze") FROM table_203_496
squall
CREATE TABLE table_36006 ( "Year" real, "Competition" text, "Venue" text, "Position" text, "Notes" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- In what Year was the Position 11th?
SELECT COUNT("Year") FROM table_36006 WHERE "Position" = '11th'
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 procedures ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) ...
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.dod_year <= "2158.0" AND lab.itemid = "51078"
mimicsql_data
CREATE TABLE table_191323_2 ( notes VARCHAR, nssdc_id_no VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What are the notes of the satellite whose nssdc id number is 1959-002a?
SELECT notes FROM table_191323_2 WHERE nssdc_id_no = "1959-002A"
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 ACC_Regular_Season, School_ID FROM basketball_match ORDER BY School_ID DESC
nvbench
CREATE TABLE table_68802 ( "Date" text, "Visiting Team" text, "Final Score" text, "Host Team" text, "Stadium" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Who was the visiting team at the matchup at the RCA Dome?
SELECT "Visiting Team" FROM table_68802 WHERE "Stadium" = 'rca dome'
wikisql
CREATE TABLE grapes ( ID INTEGER, Grape TEXT, Color TEXT ) CREATE TABLE appellations ( No INTEGER, Appelation TEXT, County TEXT, State TEXT, Area TEXT, isAVA TEXT ) CREATE TABLE wine ( No INTEGER, Grape TEXT, Winery TEXT, Appelation TEXT, State TEXT, Name TE...
SELECT Grape, COUNT(*) FROM wine GROUP BY Grape ORDER BY Grape DESC
nvbench
CREATE TABLE paperkeyphrase ( paperid int, keyphraseid int ) CREATE TABLE cite ( citingpaperid int, citedpaperid int ) CREATE TABLE author ( authorid int, authorname varchar ) CREATE TABLE field ( fieldid int ) CREATE TABLE dataset ( datasetid int, datasetname varchar ) CREATE T...
SELECT DISTINCT paper.paperid FROM keyphrase, paper, paperkeyphrase WHERE keyphrase.keyphrasename = 'monte carlo simulation' AND paperkeyphrase.keyphraseid = keyphrase.keyphraseid AND paper.paperid = paperkeyphrase.paperid AND paper.year > 2011
scholar
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 WHERE demographic.marital_status = "SINGLE" AND demographic.admityear < "2178"
mimicsql_data
CREATE TABLE table_name_78 ( pts_game VARCHAR, games VARCHAR, name VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- what is the pts/game for Charlotte barras and the games is 5?
SELECT pts_game FROM table_name_78 WHERE games = 5 AND name = "charlotte barras"
sql_create_context
CREATE TABLE table_728 ( "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's the year of the first election of the district whose incumbent is E...
SELECT "First elected" FROM table_728 WHERE "Incumbent" = 'Edwin E. Willis'
wikisql
CREATE TABLE table_17088705_2 ( swimsuit VARCHAR, preliminary VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Give swimsuit scores of participants 8.847 in preliminary
SELECT swimsuit FROM table_17088705_2 WHERE preliminary = "8.847"
sql_create_context
CREATE TABLE table_72992 ( "Year" real, "Date (Opening)" text, "Date (Closing)" text, "Opening Film" text, "Number of Screening" text, "Award-Winning Film" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which opening film has the opening date of...
SELECT "Opening Film" FROM table_72992 WHERE "Date (Opening)" = 'August 23'
wikisql
CREATE TABLE PostsWithDeleted ( Id number, PostTypeId number, AcceptedAnswerId number, ParentId number, CreationDate time, DeletionDate time, Score number, ViewCount number, Body text, OwnerUserId number, OwnerDisplayName text, LastEditorUserId number, LastEditorDispl...
SELECT 'bacon', COUNT(*) FROM Posts WHERE Body LIKE '%bacon%' UNION ALL SELECT 'butter', COUNT(*) FROM Posts WHERE Body LIKE '%butter%'
sede
CREATE TABLE table_66119 ( "Date" text, "Venue" text, "Score" text, "Result" text, "Competition" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the Score of the 1996 Asian Cup Qualification on June 29, 1996?
SELECT "Score" FROM table_66119 WHERE "Competition" = '1996 asian cup qualification' AND "Date" = 'june 29, 1996'
wikisql
CREATE TABLE table_204_680 ( id number, "released" text, "title" text, "artist" text, "format" text, "language" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- which artist has released at least 5 albums ?
SELECT "artist" FROM table_204_680 GROUP BY "artist" HAVING COUNT(*) >= 5
squall
CREATE TABLE table_name_51 ( name VARCHAR, points INTEGER ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Who has points larger than 167.5?
SELECT name FROM table_name_51 WHERE points > 167.5
sql_create_context
CREATE TABLE table_15796072_1 ( original_artist VARCHAR, order__number VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Who was the original artist when the order number is 9?
SELECT original_artist FROM table_15796072_1 WHERE order__number = "9"
sql_create_context
CREATE TABLE table_26131768_4 ( district INTEGER, representative VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- If the Representative is Barbara sears, what is the district number?
SELECT MAX(district) FROM table_26131768_4 WHERE representative = "Barbara Sears"
sql_create_context
CREATE TABLE table_27150 ( "Rnd." real, "Circuit" text, "LMP1 Winning Team" text, "LMP2 Winning Team" text, "FLM Winning Team" text, "GT1 Winning Team" text, "GT2 Winning Team" text, "Results" text ) -- Using valid SQLite, answer the following questions for the tables provided above. ...
SELECT "GT2 Winning Team" FROM table_27150 WHERE "LMP1 Winning Team" = 'Greg Mansell Leo Mansell'
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 lab ( subject_id text, hadm_id text, ...
SELECT demographic.admission_type FROM demographic WHERE demographic.name = "Betty Campbell"
mimicsql_data