instruction
stringlengths
151
7.46k
output
stringlengths
2
4.44k
source
stringclasses
26 values
CREATE TABLE table_name_15 ( to_par VARCHAR, player VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What was willie wood's to par?
SELECT to_par FROM table_name_15 WHERE player = "willie wood"
sql_create_context
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 patient ( uniquep...
SELECT t1.diagnosisname FROM (SELECT diagnosis.diagnosisname, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM diagnosis WHERE diagnosis.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.age BETWEEN 20 AND 29) AND STRFTIME('%y', diagnosis.diagnosistime) <= '2104' GROUP BY diagnosis....
eicu
CREATE TABLE table_14845 ( "Minister" text, "Party" text, "Start date" text, "End date" text, "Prime Minister" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Name the end date for robert goebbels
SELECT "End date" FROM table_14845 WHERE "Minister" = 'robert goebbels'
wikisql
CREATE TABLE hz_info ( KH text, KLX number, YLJGDM text, RYBH text ) CREATE TABLE jybgb ( YLJGDM text, YLJGDM_MZJZJLB text, YLJGDM_ZYJZJLB text, BGDH text, BGRQ time, JYLX number, JZLSH text, JZLSH_MZJZJLB text, JZLSH_ZYJZJLB text, JZLX number, KSBM text, ...
SELECT BBCJBW FROM jybgb WHERE BGDH = '23715494511'
css
CREATE TABLE Reviewer ( rID int, name text ) CREATE TABLE Rating ( rID int, mID int, stars int, ratingDate date ) CREATE TABLE Movie ( mID int, title text, year int, director text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Give ...
SELECT rID, stars FROM Rating AS T1 JOIN Movie AS T2 ON T1.mID = T2.mID GROUP BY title
nvbench
CREATE TABLE table_1806 ( "No. in series" real, "No. in season" real, "Title" text, "Directed by" text, "Written by" text, "Original air date" text, "Prod. code" text, "Viewers (millions)" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- W...
SELECT "Prod. code" FROM table_1806 WHERE "Title" = 'He Ain''t a Hottie, He''s My Brother'
wikisql
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 Name, COUNT(Name) FROM Products GROUP BY Name ORDER BY Name
nvbench
CREATE TABLE table_name_60 ( home_team VARCHAR, away_team VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the home team score that played away team carlton?
SELECT home_team AS score FROM table_name_60 WHERE away_team = "carlton"
sql_create_context
CREATE TABLE table_204_951 ( id number, "candidate" text, "votes" number, "percentage" text, "counties" number, "delegates" number ) -- Using valid SQLite, answer the following questions for the tables provided above. -- who received more votes , duncan hunter or alan keyes ?
SELECT "candidate" FROM table_204_951 WHERE "candidate" IN ('duncan hunter', 'alan keyes') ORDER BY "votes" DESC LIMIT 1
squall
CREATE TABLE lab ( subject_id text, hadm_id text, itemid text, charttime text, flag text, value_unit text, label text, fluid text ) CREATE TABLE procedures ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) CREATE TABLE prescription...
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE demographic.days_stay > "17" AND prescriptions.drug = "Sulfameth/Trimethoprim DS"
mimicsql_data
CREATE TABLE table_5067 ( "Game" real, "Date" text, "Team" text, "Score" text, "High points" text, "High rebounds" text, "High assists" text, "Location Attendance" text, "Record" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is...
SELECT SUM("Game") FROM table_5067 WHERE "Date" = 'february 28'
wikisql
CREATE TABLE table_name_7 ( type_of_game VARCHAR, results¹ VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What type of game had a result of 1:2?
SELECT type_of_game FROM table_name_7 WHERE results¹ = "1:2"
sql_create_context
CREATE TABLE TagSynonyms ( Id number, SourceTagName text, TargetTagName text, CreationDate time, OwnerUserId number, AutoRenameCount number, LastAutoRename time, Score number, ApprovedByUserId number, ApprovalDate time ) CREATE TABLE VoteTypes ( Id number, Name text ) C...
SELECT ROW_NUMBER() OVER (ORDER BY Reputation DESC) AS "#", Id AS "user_link", Reputation FROM Users WHERE LOWER(Location) LIKE '%united arab emirates%' ORDER BY Reputation DESC LIMIT 150
sede
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 allergy ( allergy...
SELECT allergy.drugname FROM allergy WHERE allergy.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '007-849' AND patient.hospitaldischargetime IS NULL))
eicu
CREATE TABLE table_44277 ( "Place" text, "Player" text, "Country" text, "Score" text, "To par" text, "Money ( $ )" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What place is South Africa?
SELECT "Place" FROM table_44277 WHERE "Country" = 'south africa'
wikisql
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 * FROM hz_info JOIN zyjzjlb JOIN hz_info_zyjzjlb ON hz_info.YLJGDM = hz_info_zyjzjlb.YLJGDM AND hz_info.KH = zyjzjlb.KH AND hz_info.KLX = zyjzjlb.KLX AND hz_info_zyjzjlb.JZLSH = zyjzjlb.JZLSH AND hz_info_zyjzjlb.YLJGDM = hz_info_zyjzjlb.YLJGDM AND hz_info_zyjzjlb.JZLSH = zyjzjlb.JZLSH AND hz_info_zyjzjlb.zyjzjlb...
css
CREATE TABLE table_name_31 ( date VARCHAR, result VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What Date has a Result of l 21 34?
SELECT date FROM table_name_31 WHERE result = "l 21–34"
sql_create_context
CREATE TABLE table_7372 ( "Position" real, "Team" text, "Points" real, "Played" real, "Drawn" real, "Lost" real, "Against" real, "Difference" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the largest lost stat when the differenc...
SELECT MAX("Lost") FROM table_7372 WHERE "Difference" = '- 19'
wikisql
CREATE TABLE table_name_9 ( constructor VARCHAR, grid VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Tell me the constructor for grid of 17
SELECT constructor FROM table_name_9 WHERE grid = 17
sql_create_context
CREATE TABLE table_name_92 ( crowd INTEGER, home_team VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- How big was the crowd of the Home team of Collingwood?
SELECT MAX(crowd) FROM table_name_92 WHERE home_team = "collingwood"
sql_create_context
CREATE TABLE table_name_52 ( leading_scorer VARCHAR, date VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Who is the leading scorer of the game on 13 February 2008?
SELECT leading_scorer FROM table_name_52 WHERE date = "13 february 2008"
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 demographic ...
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.diagnosis = "MORBID OBESITY/SDA" AND demographic.dod_year <= "2183.0"
mimicsql_data
CREATE TABLE table_68142 ( "Year" text, "Start" text, "Qual" text, "Rank" text, "Finish" text, "Laps" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the highest laps of the year when the rank was 14?
SELECT MAX("Laps") FROM table_68142 WHERE "Rank" = '14'
wikisql
CREATE TABLE table_53907 ( "Record" text, "Year" text, "Date" text, "Driver" text, "Car Make" text, "Time" text, "Average Speed (mph)" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What day had a time of 29.816?
SELECT "Date" FROM table_53907 WHERE "Time" = '29.816'
wikisql
CREATE TABLE table_name_98 ( series_ep VARCHAR, segment_b VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What series episode has deli meats under segment B?
SELECT series_ep FROM table_name_98 WHERE segment_b = "deli meats"
sql_create_context
CREATE TABLE table_15773 ( "Year" text, "Men's singles" text, "Women's singles" text, "Men's doubles" text, "Women's doubles" text, "Mixed doubles" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What year was there no competition in Mixed Double...
SELECT "Year" FROM table_15773 WHERE "Mixed doubles" = 'no competition'
wikisql
CREATE TABLE table_33381 ( "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. -- For the game where the away team was North Melbo...
SELECT "Venue" FROM table_33381 WHERE "Away team" = 'north melbourne'
wikisql
CREATE TABLE table_name_43 ( home_team VARCHAR, venue VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What was the home team score at Kardinia Park?
SELECT home_team AS score FROM table_name_43 WHERE venue = "kardinia park"
sql_create_context
CREATE TABLE area ( course_id int, area varchar ) CREATE TABLE program ( program_id int, name varchar, college varchar, introduction varchar ) CREATE TABLE course_prerequisite ( pre_course_id int, course_id int ) CREATE TABLE course_offering ( offering_id int, course_id int, ...
SELECT DISTINCT course.department, course.name, course.number, program_course.workload, program_course.workload FROM course, program_course WHERE program_course.category LIKE '%MDE%' AND program_course.course_id = course.course_id AND program_course.workload = (SELECT MIN(PROGRAM_COURSEalias1.workload) FROM program_cou...
advising
CREATE TABLE table_12962773_12 ( year_born INTEGER, height VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What year was the player with the height 2.04 born?
SELECT MIN(year_born) FROM table_12962773_12 WHERE height = "2.04"
sql_create_context
CREATE TABLE table_name_96 ( pick VARCHAR, hometown_school VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What number pick was the player with the hometown school of concordia college?
SELECT pick FROM table_name_96 WHERE hometown_school = "concordia college"
sql_create_context
CREATE TABLE table_name_34 ( rank INTEGER, total VARCHAR, silver VARCHAR, bronze VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which rank has a more than 0 silver, 4 bronze, and a total smaller than 10?
SELECT SUM(rank) FROM table_name_34 WHERE silver > 0 AND bronze = 4 AND total < 10
sql_create_context
CREATE TABLE table_75667 ( "Call sign" text, "Frequency MHz" text, "City of license" text, "ERP W" text, "FCC info" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which FCC info has an ERP W of 100 watts?
SELECT "FCC info" FROM table_75667 WHERE "ERP W" = '100 watts'
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 jyjgzbb.JCRGH, jyjgzbb.JCRXM FROM person_info JOIN hz_info JOIN mzjzjlb JOIN jybgb JOIN jyjgzbb JOIN hz_info_mzjzjlb ON person_info.RYBH = hz_info.RYBH AND 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 mzjzj...
css
CREATE TABLE table_name_39 ( position VARCHAR, college VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What position does the saint louis player play?
SELECT position FROM table_name_39 WHERE college = "saint louis"
sql_create_context
CREATE TABLE jybgb ( YLJGDM text, YLJGDM_MZJZJLB text, YLJGDM_ZYJZJLB text, BGDH text, BGRQ time, JYLX number, JZLSH text, JZLSH_MZJZJLB text, JZLSH_ZYJZJLB text, JZLX number, KSBM text, KSMC text, SQRGH text, SQRXM text, BGRGH text, BGRXM text, SHRGH ...
SELECT AVG(jyjgzbb.JCZBJGDL), MIN(jyjgzbb.JCZBJGDL), MAX(jyjgzbb.JCZBJGDL) FROM mzjzjlb JOIN jybgb JOIN jyjgzbb ON mzjzjlb.YLJGDM = jybgb.YLJGDM_MZJZJLB AND mzjzjlb.JZLSH = jybgb.JZLSH_MZJZJLB AND jybgb.YLJGDM = jyjgzbb.YLJGDM AND jybgb.BGDH = jyjgzbb.BGDH WHERE mzjzjlb.JZZDBM = 'O32.933' AND jyjgzbb.JCZBDM = '830460'
css
CREATE TABLE table_27496841_3 ( total_points VARCHAR, place VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Name the total points for 2
SELECT total_points FROM table_27496841_3 WHERE place = 2
sql_create_context
CREATE TABLE table_35155 ( "Medal" text, "Name" text, "Games" text, "Sport" text, "Event" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What medal was awarded in the men's freestyle 52 kg?
SELECT "Medal" FROM table_35155 WHERE "Event" = 'men''s freestyle 52 kg'
wikisql
CREATE TABLE table_10951 ( "Home team" text, "Home team score" text, "Away team" text, "Away team score" text, "Venue" text, "Crowd" real, "Date" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- When the away team was geelong, what was the awa...
SELECT "Away team score" FROM table_10951 WHERE "Away team" = 'geelong'
wikisql
CREATE TABLE table_26589 ( "#" real, "Player" text, "Country" text, "Points" real, "Reset points" real, "Events" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Name the number of events for 3031
SELECT COUNT("Events") FROM table_26589 WHERE "Points" = '3031'
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 diagnoses ( ...
SELECT demographic.days_stay, demographic.expire_flag FROM demographic WHERE demographic.subject_id = "8323"
mimicsql_data
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 * FROM hz_info JOIN mzjzjlb JOIN jybgb JOIN jyjgzbb JOIN jybgb_jyjgzbb ON 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 = jybgb_jyjgzbb.YLJGDM AND jybgb.BGDH = jyjgzbb.BG...
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 jyjgzbb.JCZBJGDL, jyjgzbb.JCZBJGDW FROM hz_info JOIN mzjzjlb JOIN jyjgzbb ON hz_info.YLJGDM = mzjzjlb.YLJGDM AND hz_info.KH = mzjzjlb.KH AND hz_info.KLX = mzjzjlb.KLX AND mzjzjlb.YLJGDM = jyjgzbb.jybgb_YLJGDM_MZJZJLB AND mzjzjlb.JZLSH = jyjgzbb.jybgb_JZLSH_MZJZJLB WHERE mzjzjlb.JZZDSM = '特发性肌张力障碍' AND hz_info.RY...
css
CREATE TABLE table_63248 ( "Date" text, "Opponent" text, "Venue" text, "Result" text, "Attendance" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which venue had an opponent of Sunderland and a result of a 1-1 draw?
SELECT "Venue" FROM table_63248 WHERE "Opponent" = 'sunderland' AND "Result" = '1-1'
wikisql
CREATE TABLE table_26229 ( "No" real, "Player" text, "Height (m)" text, "Height (f)" text, "Position" text, "Year born" real, "Current Club" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- name the player for number 5
SELECT "Player" FROM table_26229 WHERE "No" = '5'
wikisql
CREATE TABLE table_13011 ( "Country" text, "Builder" text, "Location" text, "Ship" text, "Class / type" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the country of Palmers Shipbuilding and Iron Company?
SELECT "Country" FROM table_13011 WHERE "Builder" = 'palmers shipbuilding and iron company'
wikisql
CREATE TABLE table_36615 ( "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 is the Pick # with an Overall of 19?
SELECT MAX("Pick #") FROM table_36615 WHERE "Overall" = '19'
wikisql
CREATE TABLE table_12652 ( "Perpetrator" text, "Year" text, "Location" text, "Country" text, "Killed" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Who is the perpetrator in Bait Al-Aqari?
SELECT "Perpetrator" FROM table_12652 WHERE "Location" = 'bait al-aqari'
wikisql
CREATE TABLE table_name_22 ( uni_number VARCHAR, bats VARCHAR, surname VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What's the Uni# of Timms, who has bats of R?
SELECT uni_number FROM table_name_22 WHERE bats = "r" AND surname = "timms"
sql_create_context
CREATE TABLE table_name_40 ( score VARCHAR, place VARCHAR, player VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is Score, when Place is 'T8', and when Player is 'Orville Moody'?
SELECT score FROM table_name_40 WHERE place = "t8" AND player = "orville moody"
sql_create_context
CREATE TABLE airport_aircraft ( ID int, Airport_ID int, Aircraft_ID int ) CREATE TABLE pilot ( Pilot_Id int(11), Name varchar(50), Age int(11) ) CREATE TABLE match ( Round real, Location text, Country text, Date text, Fastest_Qualifying text, Winning_Pilot text, Win...
SELECT Description, COUNT(Description) FROM aircraft GROUP BY Description
nvbench
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 gwyjzb.MED_SER_ORG_NO FROM gwyjzb WHERE gwyjzb.PERSON_ID = '87821381' GROUP BY gwyjzb.MED_SER_ORG_NO ORDER BY COUNT(*) DESC UNION SELECT fgwyjzb.MED_SER_ORG_NO FROM fgwyjzb WHERE fgwyjzb.PERSON_ID = '87821381' GROUP BY fgwyjzb.MED_SER_ORG_NO ORDER BY COUNT(*) DESC
css
CREATE TABLE table_35745 ( "Name" text, "Location" text, "State" text, "Opened (closing date if defunct)" text, "Surface" text, "Length" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the Name with an Opened (closing date if defunct) of ...
SELECT "Name" FROM table_35745 WHERE "Opened (closing date if defunct)" = '1995' AND "Length" = 'miles (m)' AND "State" = 'illinois'
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.admission_location = "TRSF WITHIN THIS FACILITY" AND demographic.dob_year < "2150"
mimicsql_data
CREATE TABLE table_name_46 ( nation VARCHAR, total VARCHAR, bronze VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Name the nation when bronze is less than 4 and the total is more than 4
SELECT nation FROM table_name_46 WHERE total > 4 AND bronze < 4
sql_create_context
CREATE TABLE table_51074 ( "Date" text, "Distance" text, "Handler" text, "Event" text, "Location" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- On what date was Mike Jackson a handler at the Indianapolis Boat, Sport & Travel Show?
SELECT "Date" FROM table_51074 WHERE "Handler" = 'mike jackson' AND "Event" = 'indianapolis boat, sport & travel show'
wikisql
CREATE TABLE t_kc21_t_kc22 ( MED_CLINIC_ID text, MED_EXP_DET_ID number ) CREATE TABLE t_kc21 ( 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 ...
SELECT t_kc21.OUT_DIAG_DIS_CD, AVG(t_kc21.PERSON_AGE) FROM t_kc21 WHERE t_kc21.MED_SER_ORG_NO = '7830669' GROUP BY t_kc21.OUT_DIAG_DIS_CD
css
CREATE TABLE table_54575 ( "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. -- For the Venue of western oval, what's the Away t...
SELECT "Away team" FROM table_54575 WHERE "Venue" = 'western oval'
wikisql
CREATE TABLE microlab ( microlabid number, patientunitstayid number, culturesite text, organism text, culturetakentime time ) CREATE TABLE treatment ( treatmentid number, patientunitstayid number, treatmentname text, treatmenttime time ) CREATE TABLE vitalperiodic ( vitalperiod...
SELECT t3.diagnosisname FROM (SELECT t2.diagnosisname, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM (SELECT patient.uniquepid, diagnosis.diagnosistime, patient.patienthealthsystemstayid FROM diagnosis JOIN patient ON diagnosis.patientunitstayid = patient.patientunitstayid WHERE diagnosis.diagnosisname = 'throm...
eicu
CREATE TABLE table_23211 ( "Further Cities" text, "County, Oblast or State" text, "Country" text, "Distance" text, "Direction" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Name the number of direction for debrecen
SELECT COUNT("Direction") FROM table_23211 WHERE "Further Cities" = 'Debrecen'
wikisql
CREATE TABLE table_18333678_2 ( arrival VARCHAR, departure VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- when does the train departuring at 11.35 arrive
SELECT arrival FROM table_18333678_2 WHERE departure = "11.35"
sql_create_context
CREATE TABLE table_19858 ( "Stage" real, "Winner" text, "General classification" text, "Points classification" text, "Mountains classification" text, "Combination classification" text, "Team classification" text ) -- Using valid SQLite, answer the following questions for the tables provide...
SELECT MIN("Stage") FROM table_19858 WHERE "Mountains classification" = 'Aitor Osa' AND "Winner" = 'Aitor González'
wikisql
CREATE TABLE table_74398 ( "Date" text, "Time" text, "ACC Team" text, "Big Ten Team" text, "Location" text, "Television" text, "Attendance" real, "Winner" text, "Challenge Leader" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What w...
SELECT "Time" FROM table_74398 WHERE "Location" = 'Cassell Coliseum • Blacksburg, VA'
wikisql
CREATE TABLE table_3683 ( "No. in series" real, "No. in season" real, "Title" text, "Directed by" text, "Written by" text, "Original air date" text, "U.S. viewers (million)" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Who was the writer i...
SELECT "Written by" FROM table_3683 WHERE "Directed by" = 'Jesse Peretz'
wikisql
CREATE TABLE table_4022 ( "Representative" text, "Party" text, "Years" text, "Congress" text, "District Home" text, "Occupation" text, "Electoral history" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What time span is listed under years fo...
SELECT "Years" FROM table_4022 WHERE "Congress" = '96th'
wikisql
CREATE TABLE d_icd_procedures ( row_id number, icd9_code text, short_title text, long_title text ) CREATE TABLE outputevents ( row_id number, subject_id number, hadm_id number, icustay_id number, charttime time, itemid number, value number ) CREATE TABLE d_icd_diagnoses ( ...
SELECT (SELECT labevents.valuenum FROM labevents WHERE labevents.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 97121 AND NOT admissions.dischtime IS NULL ORDER BY admissions.admittime LIMIT 1) AND labevents.itemid IN (SELECT d_labitems.itemid FROM d_labitems WHERE d_labitems.label ...
mimic_iii
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 prescriptions...
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.days_stay > "34" AND procedures.icd9_code = "3931"
mimicsql_data
CREATE TABLE school_details ( school_id number, nickname text, colors text, league text, class text, division text ) CREATE TABLE school ( school_id number, school text, location text, enrollment number, founded number, denomination text, boys_or_girls text, day_...
SELECT AVG(enrollment) FROM school
spider
CREATE TABLE treatment ( treatmentid number, patientunitstayid number, treatmentname text, treatmenttime time ) CREATE TABLE allergy ( allergyid number, patientunitstayid number, drugname text, allergyname text, allergytime time ) CREATE TABLE microlab ( microlabid number, ...
SELECT microlab.culturetakentime FROM microlab WHERE microlab.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '025-44495')) AND microlab.culturesite = 'sputum, tracheal specime...
eicu
CREATE TABLE table_56902 ( "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. -- Which home team played against the away team Car...
SELECT "Home team" FROM table_56902 WHERE "Away team" = 'carlton'
wikisql
CREATE TABLE table_name_21 ( tv_network_s_ VARCHAR, alternate_title_translation VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What TV network is the series aistr em aired on?
SELECT tv_network_s_ FROM table_name_21 WHERE alternate_title_translation = "aistrų žemė"
sql_create_context
CREATE TABLE table_25355392_2 ( november_3 VARCHAR, june_10_11 VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- what is november 3 when june 10-11 is june 10, 1964?
SELECT november_3 FROM table_25355392_2 WHERE june_10_11 = "June 10, 1964"
sql_create_context
CREATE TABLE intakeoutput ( intakeoutputid number, patientunitstayid number, cellpath text, celllabel text, cellvaluenumeric number, intakeoutputtime time ) CREATE TABLE diagnosis ( diagnosisid number, patientunitstayid number, diagnosisname text, diagnosistime time, icd9cod...
SELECT lab.labresulttime FROM lab WHERE lab.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '027-149724')) AND DATETIME(lab.labresulttime) >= DATETIME(CURRENT_TIME(), '-29 mont...
eicu
CREATE TABLE fgwyjzb ( 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 SUM(gwyjzb.MED_AMOUT) FROM gwyjzb WHERE gwyjzb.PERSON_NM = '陶成化' AND gwyjzb.CLINIC_TYPE = '门诊' UNION SELECT SUM(fgwyjzb.MED_AMOUT) FROM fgwyjzb WHERE fgwyjzb.PERSON_NM = '陶成化' AND fgwyjzb.CLINIC_TYPE = '门诊'
css
CREATE TABLE table_47993 ( "Year" real, "Network" text, "Title" text, "Notes" text, "Language" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the title for the Korean progran on KBS2?
SELECT "Title" FROM table_47993 WHERE "Language" = 'korean' AND "Network" = 'kbs2'
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_DIRE_CD text, MED_DIRE_NM text,...
SELECT t_kc21.MED_SER_ORG_NO FROM t_kc21 WHERE t_kc21.PERSON_NM = '奚秀英' AND t_kc21.IN_HOSP_DATE BETWEEN '2010-06-16' AND '2015-04-16' GROUP BY t_kc21.MED_SER_ORG_NO ORDER BY COUNT(*) DESC LIMIT 1
css
CREATE TABLE table_name_52 ( professional_partner VARCHAR, celebrity VARCHAR, rank VARCHAR, season VARCHAR, average VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Who is the professional partner of celebrity ma gorzata foremniak with a season les...
SELECT professional_partner FROM table_name_52 WHERE season < 7 AND average > 34.66 AND rank < 10 AND celebrity = "małgorzata foremniak"
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_CLINIC_ID text, MED_DIRE_CD tex...
SELECT qtb.MED_SER_ORG_NO FROM qtb WHERE qtb.PERSON_ID = '26493101' AND qtb.IN_HOSP_DATE BETWEEN '2008-01-22' AND '2013-02-04' GROUP BY qtb.MED_SER_ORG_NO ORDER BY COUNT(*) DESC LIMIT 1 UNION SELECT gyb.MED_SER_ORG_NO FROM gyb WHERE gyb.PERSON_ID = '26493101' AND gyb.IN_HOSP_DATE BETWEEN '2008-01-22' AND '2013-02-04' G...
css
CREATE TABLE locations ( LOCATION_ID decimal(4,0), STREET_ADDRESS varchar(40), POSTAL_CODE varchar(12), CITY varchar(30), STATE_PROVINCE varchar(25), COUNTRY_ID varchar(2) ) CREATE TABLE job_history ( EMPLOYEE_ID decimal(6,0), START_DATE date, END_DATE date, JOB_ID varchar(10), ...
SELECT HIRE_DATE, COUNT(HIRE_DATE) FROM employees ORDER BY COUNT(HIRE_DATE)
nvbench
CREATE TABLE table_34793 ( "Date" text, "Result" text, "Score" text, "Brazil scorers" text, "Competition" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which Result has a Score of 4-1, and a Competition of world cup qualifying?
SELECT "Result" FROM table_34793 WHERE "Score" = '4-1' AND "Competition" = 'world cup qualifying'
wikisql
CREATE TABLE date_day ( month_number int, day_number int, year int, day_name varchar ) CREATE TABLE dual_carrier ( main_airline varchar, low_flight_number int, high_flight_number int, dual_airline varchar, service_name text ) CREATE TABLE fare ( fare_id int, from_airport va...
SELECT DISTINCT flight.flight_id FROM airport_service AS AIRPORT_SERVICE_0, airport_service AS AIRPORT_SERVICE_1, city AS CITY_0, city AS CITY_1, flight WHERE (CITY_0.city_code = AIRPORT_SERVICE_0.city_code AND CITY_0.city_name = 'ATLANTA' AND CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'BALTI...
atis
CREATE TABLE table_45304 ( "Place" text, "Player" text, "Country" text, "Score" text, "To par" text, "Money ( $ )" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What was the To par of Jack Nicklaus?
SELECT "To par" FROM table_45304 WHERE "Player" = 'jack nicklaus'
wikisql
CREATE TABLE table_name_19 ( draw INTEGER, competition VARCHAR, dynamo VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- what is the most draw when the competition is soviet league and dynamo is more than 34?
SELECT MAX(draw) FROM table_name_19 WHERE competition = "soviet league" AND dynamo > 34
sql_create_context
CREATE TABLE table_8187 ( "Club" text, "Sport" text, "Founded" real, "League" text, "Venue" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- COunt the Founded which has a Venue of villa park?
SELECT SUM("Founded") FROM table_8187 WHERE "Venue" = 'villa park'
wikisql
CREATE TABLE table_26681728_1 ( rank_qualifying INTEGER, score_qualifying VARCHAR, location VARCHAR, year VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- In Ghent in 2011, what was the rank-qualifying value when the score-qualifying value was 14.850
SELECT MAX(rank_qualifying) FROM table_26681728_1 WHERE location = "Ghent" AND year = 2011 AND score_qualifying = "14.850"
sql_create_context
CREATE TABLE screen_mode ( graphics_mode number, char_cells text, pixels text, hardware_colours number, used_kb number, map text, type text ) CREATE TABLE phone ( company_name text, hardware_model_name text, accreditation_type text, accreditation_level text, date text, ...
SELECT * FROM chip_model
spider
CREATE TABLE Ref_Document_Types ( Document_Type_Code CHAR(15), Document_Type_Name VARCHAR(255), Document_Type_Description VARCHAR(255) ) CREATE TABLE Accounts ( Account_ID INTEGER, Statement_ID INTEGER, Account_Details VARCHAR(255) ) CREATE TABLE Ref_Budget_Codes ( Budget_Type_Code CHAR(15...
SELECT Document_Date, COUNT(Document_Date) FROM Ref_Document_Types AS T1 JOIN Documents AS T2 ON T1.Document_Type_Code = T2.Document_Type_Code ORDER BY COUNT(Document_Date)
nvbench
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 WHERE demographic.days_stay > "15" AND diagnoses.short_title = "Respiratory distress syn"
mimicsql_data
CREATE TABLE table_25668962_1 ( us_viewers__million_ VARCHAR, no_in_series VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- How many million U.S. viewers watched episode number 6 in the series?
SELECT us_viewers__million_ FROM table_25668962_1 WHERE no_in_series = 6
sql_create_context
CREATE TABLE table_name_12 ( game INTEGER, high_rebounds VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which Game is the highest one that has High rebounds of pau gasol (11)?
SELECT MAX(game) FROM table_name_12 WHERE high_rebounds = "pau gasol (11)"
sql_create_context
CREATE TABLE table_name_29 ( qual_2 VARCHAR, qual_1 VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What was the second qualification time with a first qualification time of 1:02.813?
SELECT qual_2 FROM table_name_29 WHERE qual_1 = "1:02.813"
sql_create_context
CREATE TABLE table_2850912_10 ( position VARCHAR, nhl_team VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What position was the player who was drafted by the Washington Capitals?
SELECT position FROM table_2850912_10 WHERE nhl_team = "Washington Capitals"
sql_create_context
CREATE TABLE locations ( LOCATION_ID decimal(4,0), STREET_ADDRESS varchar(40), POSTAL_CODE varchar(12), CITY varchar(30), STATE_PROVINCE varchar(25), COUNTRY_ID varchar(2) ) CREATE TABLE jobs ( JOB_ID varchar(10), JOB_TITLE varchar(35), MIN_SALARY decimal(6,0), MAX_SALARY decima...
SELECT JOB_ID, SUM(EMPLOYEE_ID) FROM employees WHERE HIRE_DATE < '2002-06-21' GROUP BY JOB_ID ORDER BY SUM(EMPLOYEE_ID) DESC
nvbench
CREATE TABLE table_67645 ( "Year" real, "Literature" text, "Music" text, "Film" text, "Performing arts" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Name the literature for pradit prasarttong
SELECT "Literature" FROM table_67645 WHERE "Performing arts" = 'pradit prasarttong'
wikisql
CREATE TABLE table_34993 ( "Name" text, "Years" text, "Seasons" real, "Lost" real, "Pct." real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the years coached by the person with a win percentage of 0.667 and 380 losses?
SELECT "Years" FROM table_34993 WHERE "Pct." = '0.667' AND "Lost" = '380'
wikisql
CREATE TABLE t_kc21 ( 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 AVG(t_kc24.MED_AMOUT) FROM t_kc24 WHERE t_kc24.MED_CLINIC_ID IN (SELECT t_kc21.MED_CLINIC_ID FROM t_kc21 WHERE t_kc21.PERSON_AGE >= 9)
css
CREATE TABLE table_204_398 ( id number, "title" text, "year" number, "publisher" text, "developer" text, "platforms" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- which project had greatest number of platforms ?
SELECT "title" FROM table_204_398 ORDER BY "platforms" DESC LIMIT 1
squall
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 WHERE demographic.insurance = "Government" AND procedures.icd9_code = "92"
mimicsql_data
CREATE TABLE table_name_42 ( pick__number VARCHAR, overall VARCHAR, college VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is College of Ohio State's pick number with an overall lower than 145?
SELECT pick__number FROM table_name_42 WHERE overall < 145 AND college = "ohio state"
sql_create_context
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.JCRGH, jyjgzbb.JCRXM FROM hz_info JOIN mzjzjlb JOIN jybgb JOIN jyjgzbb ON 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 = jyjgzbb.YLJGDM AND jybgb.BGDH = jyjgzbb....
css