instruction
stringlengths
151
7.46k
output
stringlengths
2
4.44k
source
stringclasses
26 values
CREATE TABLE table_14631909_1 ( original_title VARCHAR, english_title VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the original title of europe for dummies?
SELECT original_title FROM table_14631909_1 WHERE english_title = "Europe for Dummies"
sql_create_context
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 gwyjzb.OUT_DIAG_DIS_CD, gwyjzb.OUT_DIAG_DIS_NM FROM gwyjzb WHERE gwyjzb.PERSON_NM = '任书萱' AND gwyjzb.MED_SER_ORG_NO = '4688366' AND gwyjzb.OUT_DIAG_DOC_NM LIKE '王%' UNION SELECT fgwyjzb.OUT_DIAG_DIS_CD, fgwyjzb.OUT_DIAG_DIS_NM FROM fgwyjzb WHERE fgwyjzb.PERSON_NM = '任书萱' AND fgwyjzb.MED_SER_ORG_NO = '4688366' AN...
css
CREATE TABLE table_name_88 ( total_appearances_league_only_ VARCHAR, name VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- How many total appearances (league only) have a name of gavin dykes?
SELECT total_appearances_league_only_ FROM table_name_88 WHERE name = "gavin dykes"
sql_create_context
CREATE TABLE table_name_91 ( quantity INTEGER, numbers VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the quantity of the item with the numbers of 29-36?
SELECT AVG(quantity) FROM table_name_91 WHERE numbers = "29-36"
sql_create_context
CREATE TABLE table_7102 ( "Week #" text, "Theme" text, "Song choice" text, "Original artist" text, "Order #" real, "Result" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the Week # when the Beatles were the original artist and the theme...
SELECT "Week #" FROM table_7102 WHERE "Original artist" = 'the beatles' AND "Theme" = 'the beatles'
wikisql
CREATE TABLE table_24018430_3 ( original_air_date VARCHAR, production_code VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- what is the original air date for production code 216?
SELECT original_air_date FROM table_24018430_3 WHERE production_code = 216
sql_create_context
CREATE TABLE table_30868 ( "Pick #" real, "Player" text, "Position" text, "Nationality" text, "NHL team" text, "College/junior/club team" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What pick number was the Boston Bruins selection for defence...
SELECT "Pick #" FROM table_30868 WHERE "Position" = 'Defence' AND "NHL team" = 'Boston Bruins'
wikisql
CREATE TABLE table_6158 ( "Round" real, "Player" text, "Position" text, "Nationality" text, "College/Junior/Club Team" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the sum of the round with the defenceman?
SELECT SUM("Round") FROM table_6158 WHERE "Position" = 'defenceman'
wikisql
CREATE TABLE table_68883 ( "Date" text, "Opponent" text, "Score" text, "Loss" text, "Attendance" real, "Record" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Who did they play on August 26?
SELECT "Opponent" FROM table_68883 WHERE "Date" = 'august 26'
wikisql
CREATE TABLE table_name_34 ( date VARCHAR, terrain VARCHAR, stage VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which date has a Terrain of plain stage, and a Stage of 4?
SELECT date FROM table_name_34 WHERE terrain = "plain stage" AND stage = "4"
sql_create_context
CREATE TABLE procedures_icd ( row_id number, subject_id number, hadm_id number, icd9_code text, charttime time ) CREATE TABLE d_icd_procedures ( row_id number, icd9_code text, short_title text, long_title text ) CREATE TABLE transfers ( row_id number, subject_id number, ...
SELECT 24 * (STRFTIME('%j', CURRENT_TIME()) - STRFTIME('%j', transfers.intime)) FROM transfers WHERE transfers.icustay_id IN (SELECT icustays.icustay_id FROM icustays WHERE icustays.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 71689 AND admissions.dischtime IS NULL)) AND transfers...
mimic_iii
CREATE TABLE table_26911 ( "Codename (main article)" text, "Brand name (list)" text, "Cores" real, "L3 Cache" text, "Socket" text, "TDP" text, "I/O Bus" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the sockets associated with a bra...
SELECT "Socket" FROM table_26911 WHERE "Brand name (list)" = 'Core i3-3xx0M'
wikisql
CREATE TABLE table_name_19 ( swimsuit VARCHAR, interview VARCHAR, average VARCHAR, evening_gown VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the total number of swimsuit scores that have average scores less than 8.823, evening gown scores l...
SELECT COUNT(swimsuit) FROM table_name_19 WHERE average < 8.823 AND evening_gown < 8.69 AND interview = 8.27
sql_create_context
CREATE TABLE ReviewRejectionReasons ( Id number, Name text, Description text, PostTypeId number ) CREATE TABLE VoteTypes ( Id number, Name text ) CREATE TABLE Posts ( Id number, PostTypeId number, AcceptedAnswerId number, ParentId number, CreationDate time, DeletionDate...
SELECT AVG(CAST(Score AS FLOAT)) AS "Average Score", SUM(Score) AS "Total Score", COUNT(Score) AS "Answers Count", TagName, OwnerUserId AS "user_link" FROM Tags INNER JOIN PostTags ON PostTags.TagId = Tags.Id INNER JOIN Posts ON Posts.ParentId = PostTags.PostId WHERE TagName = 'sql' GROUP BY TagName, OwnerUserId HAVING...
sede
CREATE TABLE table_name_89 ( results VARCHAR, total_votes INTEGER ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the result of the election with 3,871 total votes?
SELECT results FROM table_name_89 WHERE total_votes > 3 OFFSET 871
sql_create_context
CREATE TABLE table_name_58 ( date VARCHAR, opponent VARCHAR, ground VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- On what date was the game played at home against the opponent Siena?
SELECT date FROM table_name_58 WHERE opponent = "siena" AND ground = "home"
sql_create_context
CREATE TABLE diagnoses ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) CREATE TABLE demographic ( subject_id text, hadm_id text, name text, marital_status text, age text, dob text, gender text, language text, religion text, ...
SELECT AVG(demographic.age) FROM demographic WHERE demographic.marital_status = "MARRIED" AND demographic.discharge_location = "SHORT TERM HOSPITAL"
mimicsql_data
CREATE TABLE table_name_49 ( earnings___ INTEGER, player VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the average earnings made by Greg Norman?
SELECT AVG(earnings___) AS $__ FROM table_name_49 WHERE player = "greg norman"
sql_create_context
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 ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) CREATE TABLE demographic (...
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.admission_location = "PHYS REFERRAL/NORMAL DELI" AND demographic.age < "50"
mimicsql_data
CREATE TABLE PostTypes ( Id number, Name text ) CREATE TABLE PostFeedback ( Id number, PostId number, IsAnonymous boolean, VoteTypeId number, CreationDate time ) CREATE TABLE VoteTypes ( Id number, Name text ) CREATE TABLE Comments ( Id number, PostId number, Score num...
SELECT myAnswer.ParentId AS QuestionId, question.Title AS QuestionTitle, myAnswer.Score AS MyScore, otherAnswer.Score AS otherScore FROM Posts AS myAnswer INNER JOIN Posts AS otherAnswer ON otherAnswer.OwnerUserId = @OtherUserId INNER JOIN Posts AS question ON question.Id = myAnswer.ParentId AND myAnswer.ParentId = oth...
sede
CREATE TABLE table_44531 ( "Round" real, "Pick" real, "Overall" real, "Name" text, "Position" text, "College" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What was John Strohmeyer's average pick before round 12?
SELECT AVG("Pick") FROM table_44531 WHERE "Name" = 'john strohmeyer' AND "Round" < '12'
wikisql
CREATE TABLE table_17115950_2 ( date_of_vacancy VARCHAR, replaced_by VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What was the date of vacancy when Viorel Moldovan replaced a manager?
SELECT date_of_vacancy FROM table_17115950_2 WHERE replaced_by = "Viorel Moldovan"
sql_create_context
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 prescriptions.drug FROM prescriptions WHERE prescriptions.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 50286 AND NOT admissions.dischtime IS NULL ORDER BY admissions.admittime LIMIT 1) AND prescriptions.route = 'po' ORDER BY prescriptions.startdate LIMIT 1
mimic_iii
CREATE TABLE qtb ( CLINIC_ID text, COMP_ID text, DATA_ID text, DIFF_PLACE_FLG number, FERTILITY_STS number, FLX_MED_ORG_ID text, HOSP_LEV number, HOSP_STS number, IDENTITY_CARD text, INPT_AREA_BED text, INSURED_IDENTITY number, INSURED_STS text, INSU_TYPE text, IN...
SELECT SUM(t_kc22.AMOUNT) FROM t_kc22 JOIN mzb ON mzb.MED_ORG_DEPT_CD = t_kc22.MED_CLINIC_ID WHERE mzb.PERSON_SEX = '魏初雪' AND t_kc22.STA_DATE BETWEEN '2004-09-03' AND '2009-03-08' AND t_kc22.MED_INV_ITEM_TYPE = '手术费'
css
CREATE TABLE intakeoutput ( intakeoutputid number, patientunitstayid number, cellpath text, celllabel text, cellvaluenumeric number, intakeoutputtime time ) CREATE TABLE microlab ( microlabid number, patientunitstayid number, culturesite text, organism text, culturetakentime...
SELECT (SELECT SUM(intakeoutput.cellvaluenumeric) FROM intakeoutput WHERE intakeoutput.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '004-64091') AND patient.unitdischargetim...
eicu
CREATE TABLE d_icd_procedures ( row_id number, icd9_code text, short_title text, long_title text ) 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 1 * (STRFTIME('%j', CURRENT_TIME()) - STRFTIME('%j', transfers.intime)) FROM transfers WHERE transfers.icustay_id IN (SELECT icustays.icustay_id FROM icustays WHERE icustays.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 72032 AND admissions.dischtime IS NULL)) AND transfers....
mimic_iii
CREATE TABLE table_name_78 ( mcintosh VARCHAR, stuart VARCHAR, linda_mccartney VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which McIntosh has a Stuart of bass, and a Linda McCartney of keyboards or drum?
SELECT mcintosh FROM table_name_78 WHERE stuart = "bass" AND linda_mccartney = "keyboards or drum"
sql_create_context
CREATE TABLE table_12097 ( "Place" text, "Player" text, "Country" text, "Score" text, "To par" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the place of player john cook?
SELECT "Place" FROM table_12097 WHERE "Player" = 'john cook'
wikisql
CREATE TABLE ReviewTaskTypes ( Id number, Name text, Description text ) CREATE TABLE TagSynonyms ( Id number, SourceTagName text, TargetTagName text, CreationDate time, OwnerUserId number, AutoRenameCount number, LastAutoRename time, Score number, ApprovedByUserId number...
WITH test1 AS (SELECT DISTINCT u.Id, DisplayName, Reputation, Location, COUNT(p.Id) OVER (PARTITION BY u.Id) AS "questions_answered" FROM Users AS u LEFT JOIN Posts AS p ON u.Id = p.OwnerUserId WHERE LOWER(Location) LIKE '%visak%') /* Select row_number() over(order by 'questions_answered' desc) as rownum,*,sum(reputati...
sede
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 * FROM hz_info JOIN mzjzjlb JOIN jybgb JOIN jyjgzbb JOIN hz_info_mzjzjlb ON hz_info.YLJGDM = hz_info_mzjzjlb.YLJGDM AND hz_info.KH = mzjzjlb.KH AND hz_info.KLX = mzjzjlb.KLX AND hz_info_mzjzjlb.YLJGDM = jybgb.YLJGDM_MZJZJLB AND mzjzjlb.JZLSH = jybgb.JZLSH_MZJZJLB AND jybgb.YLJGDM = jyjgzbb.YLJGDM AND jybgb.BGDH ...
css
CREATE TABLE table_2367 ( "Institution" text, "Location" text, "Year Joined" real, "Affiliation" text, "Enrollment" real, "Mascot" text, "Colors" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- what is the name of the institution of the spart...
SELECT "Institution" FROM table_2367 WHERE "Location" = 'Sparta, WI'
wikisql
CREATE TABLE table_9360 ( "Name" text, "Pinnacle height planned" text, "Year completion expected" real, "Structure type" text, "Country" text, "Town" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What are the names for projects that will be com...
SELECT "Name" FROM table_9360 WHERE "Year completion expected" > '2016'
wikisql
CREATE TABLE table_name_23 ( gold INTEGER, silver VARCHAR, total VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is listed as the highest Gold that also has a Silver that's smaller than 1, and has a Total that's smaller than 0?
SELECT MAX(gold) FROM table_name_23 WHERE silver < 1 AND total < 0
sql_create_context
CREATE TABLE table_name_67 ( laps INTEGER, team VARCHAR, grid VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the smallest number of laps for Team Green when the grid is 1?
SELECT MIN(laps) FROM table_name_67 WHERE team = "team green" AND grid = 1
sql_create_context
CREATE TABLE basketball_match ( Team_ID int, School_ID int, Team_Name text, ACC_Regular_Season text, ACC_Percent text, ACC_Home text, ACC_Road text, All_Games text, All_Games_Percent int, All_Home text, All_Road text, All_Neutral text ) CREATE TABLE university ( Scho...
SELECT All_Road, ACC_Percent FROM basketball_match ORDER BY All_Road
nvbench
CREATE TABLE hz_info ( KH text, KLX number, RYBH text, YLJGDM text ) 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, ...
SELECT jyjgzbb.JCFF 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 AND jybgb.YLJGDM = jyj...
css
CREATE TABLE table_name_65 ( yards INTEGER, average INTEGER ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the least amount of yards when the average is less than 2.6?
SELECT MIN(yards) FROM table_name_65 WHERE average < 2.6
sql_create_context
CREATE TABLE table_29214 ( "Pick #" real, "CFL Team" text, "Player" text, "Position" text, "College" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What CFL Team was Barry Jamieson a part of?
SELECT "CFL Team" FROM table_29214 WHERE "Player" = 'Barry Jamieson'
wikisql
CREATE TABLE table_14752049_2 ( change__2009_to_2010_ VARCHAR, country VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What are the changes from 2009 to 2010 in Tunisia?
SELECT change__2009_to_2010_ FROM table_14752049_2 WHERE country = "Tunisia"
sql_create_context
CREATE TABLE table_203_531 ( id number, "date" text, "tournament" text, "location" text, "winner" text, "score" text, "1st prize ($)" number ) -- Using valid SQLite, answer the following questions for the tables provided above. -- phil mickelson 's score at the bob hope chrysler minus chr...
SELECT (SELECT "score" FROM table_203_531 WHERE "tournament" = 'bob hope chrysler classic') - (SELECT "score" FROM table_203_531 WHERE "tournament" = 'buick classic')
squall
CREATE TABLE table_42800 ( "Office" text, "Democratic ticket" text, "Republican ticket" text, "Prohibition ticket" text, "Greenback ticket" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which office was Richard M. Griffin vying for on the Greenback...
SELECT "Office" FROM table_42800 WHERE "Greenback ticket" = 'richard m. griffin'
wikisql
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_kc22.AMOUNT) FROM t_kc22 WHERE t_kc22.t_kc21_PERSON_NM = '蒋岚翠' AND t_kc22.t_kc21_CLINIC_TYPE = '门诊' AND t_kc22.STA_DATE BETWEEN '2008-05-06' AND '2015-12-28' AND t_kc22.MED_INV_ITEM_TYPE = '西药费'
css
CREATE TABLE table_19714 ( "Rank" real, "Name" text, "Nationality" text, "Total points" text, "Oberstdorf (Rk)" text, "Ga-Pa (Rk)" text, "Bhofen#1 (Rk)" text, "Bhofen#2 (Rk)" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What was the Bh...
SELECT "Bhofen#1 (Rk)" FROM table_19714 WHERE "Bhofen#2 (Rk)" = '231.2 (8)'
wikisql
CREATE TABLE microlab ( microlabid number, patientunitstayid number, culturesite text, organism text, culturetakentime time ) CREATE TABLE patient ( uniquepid text, patienthealthsystemstayid number, patientunitstayid number, gender text, age text, ethnicity text, hospita...
SELECT t3.culturesite FROM (SELECT t2.culturesite, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM (SELECT patient.uniquepid, treatment.treatmenttime, patient.patienthealthsystemstayid FROM treatment JOIN patient ON treatment.patientunitstayid = patient.patientunitstayid WHERE treatment.treatmentname = 'insulin -...
eicu
CREATE TABLE table_204_232 ( 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. -- which country has more medals , colombia or venezuela ?
SELECT "nation" FROM table_204_232 WHERE "nation" IN ('colombia', 'venezuela') ORDER BY "total" DESC LIMIT 1
squall
CREATE TABLE table_name_48 ( attendance INTEGER, date VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the average attendance for the game on September 26, 1976?
SELECT AVG(attendance) FROM table_name_48 WHERE date = "september 26, 1976"
sql_create_context
CREATE TABLE table_46020 ( "Game" real, "Date" text, "Opponent" text, "Score" text, "Location" text, "Record" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the date that the record was 51-14?
SELECT "Date" FROM table_46020 WHERE "Record" = '51-14'
wikisql
CREATE TABLE table_7218 ( "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. -- Which tournament had a margin of victory of 6 strokes?
SELECT "Tournament" FROM table_7218 WHERE "Margin of victory" = '6 strokes'
wikisql
CREATE TABLE Dorm ( dormid INTEGER, dorm_name VARCHAR(20), student_capacity INTEGER, gender VARCHAR(1) ) CREATE TABLE Dorm_amenity ( amenid INTEGER, amenity_name VARCHAR(25) ) CREATE TABLE Has_amenity ( dormid INTEGER, amenid INTEGER ) CREATE TABLE Student ( StuID INTEGER, LNa...
SELECT city_code, COUNT(*) FROM Student GROUP BY city_code ORDER BY city_code DESC
nvbench
CREATE TABLE table_44994 ( "Place" text, "Player" text, "Country" text, "Score" text, "To par" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What's the to par score in T8 place from Zimbabwe and has a score of 73-68=141?
SELECT "To par" FROM table_44994 WHERE "Place" = 't8' AND "Score" = '73-68=141' AND "Country" = 'zimbabwe'
wikisql
CREATE TABLE table_name_42 ( score VARCHAR, surface VARCHAR, date VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- For the game played on 31 July 2007 on clay what was the score?
SELECT score FROM table_name_42 WHERE surface = "clay" AND date = "31 july 2007"
sql_create_context
CREATE TABLE table_43361 ( "Position" text, "Jersey #" real, "Name" text, "Height (cm)" real, "Weight (kg)" real, "Birthdate" text, "Birthplace" text, "2005\u20132006 Team" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which Position pl...
SELECT "Position" FROM table_43361 WHERE "Birthdate" = 'june 30, 1981'
wikisql
CREATE TABLE table_29088 ( "Round #" text, "Home Team" text, "Win/Loss" text, "Score" text, "Opposition" text, "Location" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Was it a win or loss for Wanganui in round 3?
SELECT "Win/Loss" FROM table_29088 WHERE "Round #" = 'Round 3'
wikisql
CREATE TABLE table_58394 ( "AVE- No." real, "Name" text, "Country" text, "Highest mountain" text, "Height (m)" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which AVE-No has a Name of livigno alps?
SELECT MIN("AVE- No.") FROM table_58394 WHERE "Name" = 'livigno alps'
wikisql
CREATE TABLE table_63596 ( "County" text, "Per capita income" text, "Median household income" text, "Median family income" text, "Population" real, "Number of households" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which county had 6,807 hous...
SELECT "County" FROM table_63596 WHERE "Number of households" > '6,807' AND "Median family income" = '$49,865'
wikisql
CREATE TABLE table_22562 ( "Position" real, "Team" text, "Played" real, "Wins" real, "Draws P.K. Wins / P.K. Losses" text, "Losses" real, "Scored" real, "Conceded" real, "Points" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Name th...
SELECT MAX("Wins") FROM table_22562 WHERE "Team" = 'Sport Colombia'
wikisql
CREATE TABLE table_name_61 ( grid INTEGER, driver VARCHAR, laps VARCHAR, time_retired VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the average grid that has over 8 laps, a Time/Retired of +2 laps, and peter gethin driving?
SELECT AVG(grid) FROM table_name_61 WHERE laps > 8 AND time_retired = "+2 laps" AND driver = "peter gethin"
sql_create_context
CREATE TABLE table_name_99 ( nat VARCHAR, transfer_fee VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the nationality of the player with a transfer fee of 400k?
SELECT nat FROM table_name_99 WHERE transfer_fee = "£400k"
sql_create_context
CREATE TABLE table_12562214_1 ( notes VARCHAR, date__from_ VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- how many notes are form the date (from) 14 march 1910?
SELECT COUNT(notes) FROM table_12562214_1 WHERE date__from_ = "14 March 1910"
sql_create_context
CREATE TABLE table_name_39 ( event VARCHAR, location VARCHAR, days_held VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which event has Philadelphia, PA as the location and 41 days held?
SELECT event FROM table_name_39 WHERE location = "philadelphia, pa" AND days_held = 41
sql_create_context
CREATE TABLE labevents ( row_id number, subject_id number, hadm_id number, itemid number, charttime time, valuenum number, valueuom text ) CREATE TABLE prescriptions ( row_id number, subject_id number, hadm_id number, startdate time, enddate time, drug text, dose...
SELECT t3.drug FROM (SELECT t2.drug, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM (SELECT admissions.subject_id, diagnoses_icd.charttime FROM diagnoses_icd JOIN admissions ON diagnoses_icd.hadm_id = admissions.hadm_id WHERE diagnoses_icd.icd9_code = (SELECT d_icd_diagnoses.icd9_code FROM d_icd_diagnoses WHERE ...
mimic_iii
CREATE TABLE table_56193 ( "CERCLIS ID" text, "Name" text, "Borough or Census Area" text, "Proposed" text, "Listed" text, "Construction completed" text, "Partially deleted" text, "Deleted" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- W...
SELECT "Name" FROM table_56193 WHERE "Proposed" = '06/24/1988'
wikisql
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, ProfileImageUrl text, EmailHash text, AccountId number ) CRE...
SELECT a.OwnerUserId AS "user_link", COUNT(a.Id) AS "total_answers", SUM(CASE q.AcceptedAnswerId WHEN a.Id THEN 1 ELSE 0 END) AS "accepted_answers", ROUND(SUM(CASE q.AcceptedAnswerId WHEN a.Id THEN 1 ELSE 0 END) * 100.0 / COUNT(a.Id), 1) AS "percentage_accepted" FROM Posts AS a JOIN Posts AS q ON a.ParentId = q.Id WHER...
sede
CREATE TABLE university ( School_ID int, School text, Location text, Founded real, Affiliation text, Enrollment real, Nickname text, Primary_conference text ) CREATE TABLE basketball_match ( Team_ID int, School_ID int, Team_Name text, ACC_Regular_Season text, ACC_Per...
SELECT All_Games, All_Games_Percent FROM basketball_match ORDER BY All_Games
nvbench
CREATE TABLE reservations ( code number, room text, checkin text, checkout text, rate number, lastname text, firstname text, adults number, kids number ) CREATE TABLE rooms ( roomid text, roomname text, beds number, bedtype text, maxoccupancy number, basepric...
SELECT T2.roomname FROM reservations AS T1 JOIN rooms AS T2 ON T1.room = T2.roomid WHERE firstname LIKE '%ROY%'
spider
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 ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) CREATE TABLE demographic (...
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.admission_type = "URGENT" AND demographic.dob_year < "2074"
mimicsql_data
CREATE TABLE table_22824312_1 ( player VARCHAR, weight VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Who are the player's who weighed 170?
SELECT player FROM table_22824312_1 WHERE weight = 170
sql_create_context
CREATE TABLE table_204_997 ( id number, "#" text, "title" text, "celebrity guest(s)" text, "directed by" text, "written by" text, "original airdate" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- which of the 9 episodes in series 1 of mongre...
SELECT "#" FROM table_204_997 ORDER BY "celebrity guest(s)" DESC LIMIT 1
squall
CREATE TABLE d_items ( row_id number, itemid number, label text, linksto text ) CREATE TABLE inputevents_cv ( row_id number, subject_id number, hadm_id number, icustay_id number, charttime time, itemid number, amount number ) CREATE TABLE labevents ( row_id number, ...
SELECT 24 * (STRFTIME('%j', CURRENT_TIME()) - STRFTIME('%j', diagnoses_icd.charttime)) FROM diagnoses_icd WHERE diagnoses_icd.icd9_code = (SELECT d_icd_diagnoses.icd9_code FROM d_icd_diagnoses WHERE d_icd_diagnoses.short_title = 'trnspl status-bne marrow') AND diagnoses_icd.hadm_id IN (SELECT admissions.hadm_id FROM ad...
mimic_iii
CREATE TABLE table_41694 ( "Team #1" text, "Agg." text, "Team #2" text, "1st leg" text, "2nd leg" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the 1st leg that has akasvayu girona as team #2?
SELECT "1st leg" FROM table_41694 WHERE "Team #2" = 'akasvayu girona'
wikisql
CREATE TABLE zyjzjlb ( CYBQDM text, CYBQMC text, CYCWH text, CYKSDM text, CYKSMC text, CYSJ time, CYZTDM number, HZXM text, JZKSDM text, JZKSMC text, JZLSH text, KH text, KLX number, MZBMLX number, MZJZLSH text, MZZDBM text, MZZDMC text, MZZYZDZZBM...
SELECT COUNT(*) FROM mzjzjlb WHERE mzjzjlb.ZZYSGH = '21789346' AND mzjzjlb.JZKSRQ BETWEEN '2006-07-08' AND '2008-09-02'
css
CREATE TABLE table_15945862_1 ( september VARCHAR, november VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What september has 10.35 in November?
SELECT september FROM table_15945862_1 WHERE november = "10.35"
sql_create_context
CREATE TABLE medicine ( id number, name text, trade_name text, fda_approved text ) CREATE TABLE enzyme ( id number, name text, location text, product text, chromosome text, omim number, porphyria text ) CREATE TABLE medicine_enzyme_interaction ( enzyme_id number, me...
SELECT T1.id, T1.name, T1.fda_approved FROM medicine AS T1 JOIN medicine_enzyme_interaction AS T2 ON T2.medicine_id = T1.id GROUP BY T1.id ORDER BY COUNT(*) DESC
spider
CREATE TABLE Person ( name varchar(20), age INTEGER, city TEXT, gender TEXT, job TEXT ) CREATE TABLE PersonFriend ( name varchar(20), friend varchar(20), year INTEGER ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Who has friends that are ol...
SELECT friend, age FROM Person AS T1 JOIN PersonFriend AS T2 ON T1.name = T2.friend WHERE T1.age > (SELECT AVG(age) FROM Person) ORDER BY friend
nvbench
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 COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE demographic.gender = "F" AND prescriptions.drug = "D10W"
mimicsql_data
CREATE TABLE table_204_188 ( id number, "rank" number, "player" text, "points" number, "points defending" number, "points won" number, "new points" number, "withdrew due to" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- did gilles simon...
SELECT (SELECT "rank" FROM table_204_188 WHERE "player" = 'gilles simon') < (SELECT "rank" FROM table_204_188 WHERE "player" = 'tommy haas')
squall
CREATE TABLE vitalperiodic ( vitalperiodicid number, patientunitstayid number, temperature number, sao2 number, heartrate number, respiration number, systemicsystolic number, systemicdiastolic number, systemicmean number, observationtime time ) CREATE TABLE diagnosis ( diagn...
SELECT t2.drugname FROM (SELECT patient.uniquepid, diagnosis.diagnosistime, patient.patienthealthsystemstayid FROM diagnosis JOIN patient ON diagnosis.patientunitstayid = patient.patientunitstayid WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid =...
eicu
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 prescription...
SELECT procedures.long_title FROM procedures WHERE procedures.subject_id = "23733"
mimicsql_data
CREATE TABLE table_name_55 ( played_in VARCHAR, points_for VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Where was the match that had 119 points for played?
SELECT played_in FROM table_name_55 WHERE points_for = "119"
sql_create_context
CREATE TABLE table_7660 ( "Date" text, "Opponent" text, "Location" text, "Result" text, "Attendance" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which Location has a result of L 31-52?
SELECT "Location" FROM table_7660 WHERE "Result" = 'l 31-52'
wikisql
CREATE TABLE comment_instructor ( instructor_id int, student_id int, score int, comment_text varchar ) CREATE TABLE offering_instructor ( offering_instructor_id int, offering_id int, instructor_id int ) CREATE TABLE student_record ( student_id int, course_id int, semester int, ...
SELECT DISTINCT COURSE_0.department, COURSE_0.name, COURSE_0.number FROM course AS COURSE_0, course AS COURSE_1, course_prerequisite WHERE COURSE_0.course_id = course_prerequisite.pre_course_id AND NOT COURSE_0.course_id IN (SELECT STUDENT_RECORDalias0.course_id FROM student_record AS STUDENT_RECORDalias0 WHERE STUDENT...
advising
CREATE TABLE table_17140 ( "Player" text, "No.(s)" text, "Height in Ft." text, "Position" text, "Years for Rockets" text, "School/Club Team/Country" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Who is the player who's number is 3?
SELECT "Player" FROM table_17140 WHERE "No.(s)" = '3'
wikisql
CREATE TABLE table_name_90 ( year VARCHAR, manufacturer VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- In what year was Letecke Zavody N.P., Jinonice the manufacturer?
SELECT year FROM table_name_90 WHERE manufacturer = "letecke zavody n.p., jinonice"
sql_create_context
CREATE TABLE basketball_match ( Team_ID int, School_ID int, Team_Name text, ACC_Regular_Season text, ACC_Percent text, ACC_Home text, ACC_Road text, All_Games text, All_Games_Percent int, All_Home text, All_Road text, All_Neutral text ) CREATE TABLE university ( Scho...
SELECT ACC_Regular_Season, ACC_Percent FROM basketball_match
nvbench
CREATE TABLE labevents ( row_id number, subject_id number, hadm_id number, itemid number, charttime time, valuenum number, valueuom text ) CREATE TABLE procedures_icd ( row_id number, subject_id number, hadm_id number, icd9_code text, charttime time ) CREATE TABLE icust...
SELECT MAX(chartevents.valuenum) FROM chartevents WHERE chartevents.icustay_id IN (SELECT icustays.icustay_id FROM icustays WHERE icustays.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 10855)) AND chartevents.itemid IN (SELECT d_items.itemid FROM d_items WHERE d_items.label = 'hear...
mimic_iii
CREATE TABLE table_12005 ( "Year" text, "Name" text, "Film" text, "Song" text, "Status" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which film took place in 2000?
SELECT "Film" FROM table_12005 WHERE "Year" = '2000'
wikisql
CREATE TABLE Student ( city_code VARCHAR, Fname VARCHAR, Lname VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which city does student Linda Smith live in?
SELECT city_code FROM Student WHERE Fname = "Linda" AND Lname = "Smith"
sql_create_context
CREATE TABLE table_name_45 ( tv_station VARCHAR, episodes VARCHAR, romaji_title VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which TV station, has romaji title of tantei gakuen q and episodes larger than 10?
SELECT tv_station FROM table_name_45 WHERE episodes > 10 AND romaji_title = "tantei gakuen q"
sql_create_context
CREATE TABLE table_1805191_34 ( candidates VARCHAR, incumbent VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- How many times did Robin Hayes run?
SELECT COUNT(candidates) FROM table_1805191_34 WHERE incumbent = "Robin Hayes"
sql_create_context
CREATE TABLE table_60822 ( "Player" text, "Position" text, "Ekstraklasa" real, "Polish Cup" real, "Puchat Ligi" real, "UEFA Cup" real, "Total" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- How much Puchat Ligi has a Total smaller than 5, an...
SELECT SUM("Puchat Ligi") FROM table_60822 WHERE "Total" < '5' AND "Ekstraklasa" > '1'
wikisql
CREATE TABLE table_26099252_1 ( h264 VARCHAR, theora VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- When theora is 2.3, how much is the h.264?
SELECT h264 FROM table_26099252_1 WHERE theora = "2.3"
sql_create_context
CREATE TABLE table_51206 ( "Home team" text, "Home team score" text, "Away team" text, "Away team score" text, "Venue" text, "Date" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What was the away team when the home team score was 5.9 (39)?
SELECT "Away team" FROM table_51206 WHERE "Home team score" = '5.9 (39)'
wikisql
CREATE TABLE table_55462 ( "Year" real, "Player" text, "Position" text, "College/Country" text, "WNBA Team" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the earliest year a Baylor player made the list?
SELECT MIN("Year") FROM table_55462 WHERE "College/Country" = 'baylor'
wikisql
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 mzjzjlb.JZLSH FROM person_info JOIN hz_info JOIN mzjzjlb 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 person_info_hz_info.KH = hz_info.KH AND person_info_hz_info.KLX = hz_info.KLX AND pers...
css
CREATE TABLE table_name_3 ( party VARCHAR, left_office VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the party of the minister who left office on 26 November 2002?
SELECT party FROM table_name_3 WHERE left_office = "26 november 2002"
sql_create_context
CREATE TABLE table_23018 ( "Call sign" text, "Frequency" text, "City of License" text, "Licensee" text, "Format" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- When 90.7 fm is the frequency who is the licensee?
SELECT "Licensee" FROM table_23018 WHERE "Frequency" = '90.7 FM'
wikisql
CREATE TABLE fare_basis ( fare_basis_code text, booking_class text, class_type text, premium text, economy text, discounted text, night text, season text, basis_days text ) CREATE TABLE flight_leg ( flight_id int, leg_number int, leg_flight int ) CREATE TABLE equipment_...
SELECT DISTINCT flight.flight_id FROM airport_service AS AIRPORT_SERVICE_0, airport_service AS AIRPORT_SERVICE_1, airport_service AS AIRPORT_SERVICE_2, airport_service AS AIRPORT_SERVICE_3, city AS CITY_0, city AS CITY_1, city AS CITY_2, city AS CITY_3, date_day AS DATE_DAY_0, date_day AS DATE_DAY_1, days AS DAYS_0, da...
atis
CREATE TABLE table_name_96 ( record VARCHAR, method VARCHAR, time VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is Record, when Method is 'submission (triangle choke)', and when Time is 0:48?
SELECT record FROM table_name_96 WHERE method = "submission (triangle choke)" AND time = "0:48"
sql_create_context
CREATE TABLE table_20593 ( "Western Title" text, "Chinese Title" text, "Pinyin" text, "Released Date" text, "Genre" text, "Game Modes" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the released date for Super Mario 64 DS?
SELECT "Released Date" FROM table_20593 WHERE "Western Title" = 'Super Mario 64 DS'
wikisql
CREATE TABLE table_1140105_6 ( constructor VARCHAR, circuit VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- what is the name of the constructor that has the circuit zeltweg airfield?
SELECT constructor FROM table_1140105_6 WHERE circuit = "Zeltweg Airfield"
sql_create_context