instruction
stringlengths
151
7.46k
output
stringlengths
2
4.44k
source
stringclasses
26 values
CREATE TABLE table_name_80 ( home_team VARCHAR, away_team VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the Home team at the Lincoln City Away game?
SELECT home_team FROM table_name_80 WHERE away_team = "lincoln city"
sql_create_context
CREATE TABLE table_name_3 ( 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 Princes Park?
SELECT away_team FROM table_name_3 WHERE venue = "princes park"
sql_create_context
CREATE TABLE table_name_96 ( date VARCHAR, record VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What was the date of the game when the Lightning had a record of 10 13 2?
SELECT date FROM table_name_96 WHERE record = "10–13–2"
sql_create_context
CREATE TABLE table_name_44 ( driver VARCHAR, laps VARCHAR, grid VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Who is the driver with 58 laps and a grid smaller than 21?
SELECT driver FROM table_name_44 WHERE laps = 58 AND grid < 21
sql_create_context
CREATE TABLE table_74735 ( "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. -- How many people were present in a total of every...
SELECT SUM("Crowd") FROM table_74735 WHERE "Venue" = 'mcg'
wikisql
CREATE TABLE table_33386 ( "General election" real, "# of candidates" real, "# of seats won" real, "% of popular vote" text, "Result" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the # of candidates that have a popular vote of 41.37%?
SELECT AVG("# of candidates") FROM table_33386 WHERE "% of popular vote" = '41.37%'
wikisql
CREATE TABLE table_3821 ( "Team" text, "Outgoing manager" text, "Manner of departure" text, "Date of vacancy" text, "Replaced by" text, "Date of appointment" text, "Position in table" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Name the d...
SELECT COUNT("Date of appointment") FROM table_3821 WHERE "Date of vacancy" = '26 May 2011'
wikisql
CREATE TABLE table_21777 ( "Club" text, "Played" text, "Won" text, "Drawn" text, "Lost" text, "Points for" text, "Points against" text, "Points difference" text, "Bonus Points" text, "Points" text ) -- Using valid SQLite, answer the following questions for the tables provided a...
SELECT COUNT("Club") FROM table_21777 WHERE "Points" = '62'
wikisql
CREATE TABLE table_16633 ( "School" text, "Location" text, "Enrolment" real, "Founded" real, "Denomination" text, "Day/Boarding" text, "School Colours" text, "Abbreviation" text, "In competition since" real ) -- Using valid SQLite, answer the following questions for the tables prov...
SELECT MIN("Founded") FROM table_16633 WHERE "Abbreviation" = 'SPLC'
wikisql
CREATE TABLE table_24491017_1 ( f_laps INTEGER, position VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- How many f/laps when he finished 8th?
SELECT MAX(f_laps) FROM table_24491017_1 WHERE position = "8th"
sql_create_context
CREATE TABLE table_name_43 ( laid_down VARCHAR, completed VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- when was the ship laid down when it was completed on 3 july 1926?
SELECT laid_down FROM table_name_43 WHERE completed = "3 july 1926"
sql_create_context
CREATE TABLE table_12175755_1 ( theme VARCHAR, song_choice VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the song choice when the theme is not aired?
SELECT theme FROM table_12175755_1 WHERE song_choice = "Not Aired"
sql_create_context
CREATE TABLE table_8835 ( "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 Score, when Place is 'T4', and when Player is 'Scott Hoch'?
SELECT "Score" FROM table_8835 WHERE "Place" = 't4' AND "Player" = 'scott hoch'
wikisql
CREATE TABLE table_3833 ( "Game" real, "Date" text, "Team" text, "Score" text, "High points" text, "High rebounds" text, "High assists" text, "Location Attendance" text, "Series" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Who had...
SELECT "High points" FROM table_3833 WHERE "Date" = 'April 22'
wikisql
CREATE TABLE table_44276 ( "Game" real, "Date" text, "Location" text, "Time" text, "Attendance" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- When was the last game that had a time of 2:46 and attendance of more than 57,533?
SELECT MAX("Game") FROM table_44276 WHERE "Time" = '2:46' AND "Attendance" > '57,533'
wikisql
CREATE TABLE table_name_93 ( position VARCHAR, event VARCHAR, venue VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which Position has an Event of 4x400 m relay, and a Venue of stuttgart , germany?
SELECT position FROM table_name_93 WHERE event = "4x400 m relay" AND venue = "stuttgart , germany"
sql_create_context
CREATE TABLE table_203_642 ( id number, "name" text, "quadrant" text, "sector" text, "ward" text, "type" text, "2012\npopulation\nrank" number, "population\n(2012)" number, "population\n(2011)" number, "% change" number, "dwellings\n(2012)" number, "area\n(km2)" number, ...
SELECT "name" FROM table_203_642 WHERE "2012\npopulation\nrank" = 1
squall
CREATE TABLE exhibition_record ( Exhibition_ID int, Date text, Attendance int ) CREATE TABLE artist ( Artist_ID int, Name text, Country text, Year_Join int, Age int ) CREATE TABLE exhibition ( Exhibition_ID int, Year int, Theme text, Artist_ID int, Ticket_Price real...
SELECT Name, Age FROM artist ORDER BY Age DESC
nvbench
CREATE TABLE allergy ( allergyid number, patientunitstayid number, drugname text, allergyname text, allergytime time ) CREATE TABLE diagnosis ( diagnosisid number, patientunitstayid number, diagnosisname text, diagnosistime time, icd9code text ) CREATE TABLE vitalperiodic ( ...
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 = '027-81062')) AND intakeoutput.cellpath LIKE '%in...
eicu
CREATE TABLE table_57199 ( "Date" text, "Course" text, "Distance" text, "Type" text, "Winner" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the name of the winner with a type of plain stage and a Course of nola to sora?
SELECT "Winner" FROM table_57199 WHERE "Type" = 'plain stage' AND "Course" = 'nola to sora'
wikisql
CREATE TABLE business ( bid int, business_id varchar, name varchar, full_address varchar, city varchar, latitude varchar, longitude varchar, review_count bigint, is_open tinyint, rating float, state varchar ) CREATE TABLE review ( rid int, business_id varchar, us...
SELECT city FROM business WHERE rating < 1.5
yelp
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 AVG(t_kc24.PER_ACC_PAY) FROM t_kc24 WHERE t_kc24.t_kc21_MED_SER_ORG_NO = '8739090' AND t_kc24.CLINIC_SLT_DATE BETWEEN '2003-04-09' AND '2019-11-24'
css
CREATE TABLE table_204_330 ( id number, "finished" text, "horse" text, "jockey" text, "trainer" text, "owner" text, "time / behind" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- what is the total number of trainers listed ?
SELECT COUNT("trainer") FROM table_204_330
squall
CREATE TABLE table_17058116_6 ( record VARCHAR, team VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- How many times did the team play charlotte?
SELECT COUNT(record) FROM table_17058116_6 WHERE team = "Charlotte"
sql_create_context
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 qtb.MED_ORG_DEPT_CD, qtb.IN_DIAG_DIS_CD, MIN(t_kc24.ILL_PAY) FROM qtb JOIN t_kc24 ON qtb.MED_CLINIC_ID = t_kc24.MED_CLINIC_ID WHERE qtb.MED_SER_ORG_NO = '8056118' GROUP BY qtb.MED_ORG_DEPT_CD, qtb.IN_DIAG_DIS_CD UNION SELECT gyb.MED_ORG_DEPT_CD, gyb.IN_DIAG_DIS_CD, MIN(t_kc24.ILL_PAY) FROM gyb JOIN t_kc24 ON gyb...
css
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 procedures ( ...
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE demographic.discharge_location = "SHORT TERM HOSPITAL" AND diagnoses.icd9_code = "7906"
mimicsql_data
CREATE TABLE table_name_41 ( evaluation_average__before_april_2009_ VARCHAR, _percentage_of_negative_evaluations VARCHAR, evaluation_average__from_april_2009_ VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the mean Evaluation number (Before April...
SELECT evaluation_average__before_april_2009_ FROM table_name_41 WHERE _percentage_of_negative_evaluations = "0.8%" AND evaluation_average__from_april_2009_ = "4.2"
sql_create_context
CREATE TABLE table_70670 ( "Rank" text, "Nation" text, "Gold" text, "Silver" text, "Bronze" text, "Total" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which bronze has a Rank of 37?
SELECT "Bronze" FROM table_70670 WHERE "Rank" = '37'
wikisql
CREATE TABLE table_67122 ( "Year" real, "Tournament" text, "Round 1" real, "Round 2" real, "Round 3" real, "Round 4" real, "Score" real, "To par" text, "Place" text, "Money (\uffe5)" real ) -- Using valid SQLite, answer the following questions for the tables provided above. --...
SELECT MAX("Round 4") FROM table_67122 WHERE "Score" = '284' AND "Year" > '1998'
wikisql
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
nvbench
CREATE TABLE table_4 ( "No" real, "Date" text, "Round" text, "Circuit" text, "Pole Position" text, "Fastest Lap" text, "Race winner" text, "Report" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Where was Assen held?
SELECT "Round" FROM table_4 WHERE "Circuit" = 'Assen'
wikisql
CREATE TABLE table_21756039_1 ( overall VARCHAR, year VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- How many overall in the year 2010-2011?
SELECT COUNT(overall) FROM table_21756039_1 WHERE year = "2010-2011"
sql_create_context
CREATE TABLE Staff ( nickname VARCHAR, first_name VARCHAR, last_name VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the nickname of staff with first name as Janessa and last name as Sawayn?
SELECT nickname FROM Staff WHERE first_name = "Janessa" AND last_name = "Sawayn"
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 lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.admityear < "2152" AND lab.fluid = "Cerebrospinal Fluid (CSF)"
mimicsql_data
CREATE TABLE table_21063459_1 ( opponent VARCHAR, record VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Who did the team play against when a record of 3-1, #16 was achieved?
SELECT opponent FROM table_21063459_1 WHERE record = "3-1, #16"
sql_create_context
CREATE TABLE table_name_7 ( touchdowns INTEGER, yards VARCHAR, long VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the average Touchdowns, when Yards is less than 293, and when Long is greater than 39?
SELECT AVG(touchdowns) FROM table_name_7 WHERE yards < 293 AND long > 39
sql_create_context
CREATE TABLE table_name_56 ( byes INTEGER, against VARCHAR, wimmera_fl VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which Byes have an Against larger than 1018, and a Wimmera FL of horsham diggers?
SELECT MIN(byes) FROM table_name_56 WHERE against > 1018 AND wimmera_fl = "horsham diggers"
sql_create_context
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 COUNT(*) FROM gwyjzb WHERE gwyjzb.MED_SER_ORG_NO = '9320875' AND gwyjzb.IN_HOSP_DATE BETWEEN '2006-03-27' AND '2018-07-19' AND gwyjzb.CLINIC_TYPE = '购药' UNION SELECT COUNT(*) FROM fgwyjzb WHERE fgwyjzb.MED_SER_ORG_NO = '9320875' AND fgwyjzb.IN_HOSP_DATE BETWEEN '2006-03-27' AND '2018-07-19' AND fgwyjzb.CLINIC_TY...
css
CREATE TABLE table_6191 ( "Date" text, "Opponent" text, "Venue" text, "Result" text, "Attendance" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which Venue has Attendances of 11,045?
SELECT "Venue" FROM table_6191 WHERE "Attendance" = '11,045'
wikisql
CREATE TABLE table_name_55 ( bronze INTEGER, nation VARCHAR, total VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the number of bronze that Scotland, which has less than 7 total medals, has?
SELECT SUM(bronze) FROM table_name_55 WHERE nation = "scotland" AND total < 7
sql_create_context
CREATE TABLE month ( month_number int, month_name text ) CREATE TABLE flight_leg ( flight_id int, leg_number int, leg_flight int ) CREATE TABLE fare ( fare_id int, from_airport varchar, to_airport varchar, fare_basis_code text, fare_airline text, restriction_code text, ...
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_15187735_20 ( episode INTEGER, segment_d VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which episode has segment D on custom motorcycle tanks?
SELECT MIN(episode) FROM table_15187735_20 WHERE segment_d = "Custom Motorcycle Tanks"
sql_create_context
CREATE TABLE time_slot ( time_slot_id text, day text, start_hr number, start_min number, end_hr number, end_min number ) CREATE TABLE student ( id text, name text, dept_name text, tot_cred number ) CREATE TABLE department ( dept_name text, building text, budget numb...
SELECT name FROM instructor WHERE name LIKE '%dar%'
spider
CREATE TABLE table_1506950_4 ( score INTEGER ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the worst (highest) score?
SELECT MAX(score) FROM table_1506950_4
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 COUNT(*) FROM gwyjzb JOIN t_kc22 ON gwyjzb.MED_CLINIC_ID = t_kc22.MED_CLINIC_ID WHERE gwyjzb.PERSON_ID = '29201885' AND t_kc22.STA_DATE BETWEEN '2014-05-23' AND '2016-12-27' AND t_kc22.SOC_SRT_DIRE_NM = '香砂养胃丸' UNION SELECT COUNT(*) FROM fgwyjzb JOIN t_kc22 ON fgwyjzb.MED_CLINIC_ID = t_kc22.MED_CLINIC_ID WHERE f...
css
CREATE TABLE table_66245 ( "Debut year" real, "Player" text, "Games" real, "Goals" real, "Years at club" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which Goals have Games smaller than 41, and a Player of mark amos?
SELECT MIN("Goals") FROM table_66245 WHERE "Games" < '41' AND "Player" = 'mark amos'
wikisql
CREATE TABLE table_23890 ( "School" text, "Location(s)" text, "Control" text, "Type" text, "Enrollment (2009)" real, "Founded" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the minimum enrollment for Plainfield?
SELECT MIN("Enrollment (2009)") FROM table_23890 WHERE "Location(s)" = 'Plainfield'
wikisql
CREATE TABLE table_29504351_2 ( best_finish VARCHAR, player VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the best finish record for Carl Paulson?
SELECT best_finish FROM table_29504351_2 WHERE player = "Carl Paulson"
sql_create_context
CREATE TABLE table_59044 ( "Name" text, "Location" text, "Years as tallest" text, "Height metres / ft" text, "Floors" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which Floors has a Location of tower hill?
SELECT "Floors" FROM table_59044 WHERE "Location" = 'tower hill'
wikisql
CREATE TABLE table_name_94 ( pick VARCHAR, college VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What's the pick for Georgia tech?
SELECT pick FROM table_name_94 WHERE college = "georgia tech"
sql_create_context
CREATE TABLE table_54880 ( "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 home team has a score of 5.8 (38)?
SELECT "Home team" FROM table_54880 WHERE "Home team score" = '5.8 (38)'
wikisql
CREATE TABLE table_66842 ( "Sunday" text, "Monday" text, "Tuesday" text, "Wednesday" text, "Thursday" text, "Friday" text, "Saturday" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which Wednesday has a Sunday of ?
SELECT "Wednesday" FROM table_66842 WHERE "Sunday" = 'གཟའ་ཉི་མ།'
wikisql
CREATE TABLE table_74367 ( "Sl. No." real, "Train number" real, "Train name" text, "Origin" text, "Destination" text, "Time" text, "Service" text, "Route/Via." text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the route/via when the...
SELECT "Route/Via." FROM table_74367 WHERE "Train name" = 'Parasuram Express'
wikisql
CREATE TABLE student_record ( student_id int, course_id int, semester int, grade varchar, how varchar, transfer_source varchar, earn_credit varchar, repeat_term varchar, test_id varchar ) CREATE TABLE offering_instructor ( offering_instructor_id int, offering_id int, ins...
SELECT DISTINCT instructor.name FROM course INNER JOIN course_offering ON course.course_id = course_offering.course_id INNER JOIN semester ON semester.semester_id = course_offering.semester INNER JOIN program_course ON program_course.course_id = course_offering.course_id INNER JOIN offering_instructor ON offering_instr...
advising
CREATE TABLE table_15663 ( "Rank" real, "Lane" real, "Name" text, "Nationality" text, "Time" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- How many Lanes have a rank higher than 3 with a time of 2:08.11?
SELECT COUNT("Lane") FROM table_15663 WHERE "Time" = '2:08.11' AND "Rank" > '3'
wikisql
CREATE TABLE table_name_82 ( color_commentator_s_ VARCHAR, year VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Who was the 2004 color commentator?
SELECT color_commentator_s_ FROM table_name_82 WHERE year = 2004
sql_create_context
CREATE TABLE table_name_26 ( date VARCHAR, score VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What date was the game score 103-94?
SELECT date FROM table_name_26 WHERE score = "103-94"
sql_create_context
CREATE TABLE table_203_114 ( id number, "week" number, "date" text, "tv time" text, "opponent" text, "result" text, "game site" text, "record" text, "attendance" number, "bye" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- what w...
SELECT (SELECT MAX("attendance") FROM table_203_114) - (SELECT MIN("attendance") FROM table_203_114)
squall
CREATE TABLE table_name_99 ( stadium VARCHAR, team VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the stadium of the san diego chargers?
SELECT stadium FROM table_name_99 WHERE team = "san diego chargers"
sql_create_context
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 AVG(MED_AMOUT) FROM t_kc21 WHERE MED_ORG_DEPT_NM = '肿瘤介入科' AND IN_HOSP_DATE BETWEEN '2000-07-17' AND '2003-10-05' AND IN_DIAG_DIS_NM = '混合型阿尔茨海默病性痴呆' AND CLINIC_TYPE = '住院'
css
CREATE TABLE table_203_313 ( id number, "name" text, "pennant" text, "builder" text, "launched" text, "original name" text, "fate" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- what was the next wave class oiler after wave emperor ?
SELECT "name" FROM table_203_313 WHERE "launched" > (SELECT "launched" FROM table_203_313 WHERE "name" = 'wave emperor') ORDER BY "launched" LIMIT 1
squall
CREATE TABLE table_204_722 ( id number, "season" text, "series" text, "team" text, "races" number, "wins" number, "poles" number, "f/lap" number, "podiums" number, "points" number, "position" text ) -- Using valid SQLite, answer the following questions for the tables provid...
SELECT SUM("poles") FROM table_204_722
squall
CREATE TABLE table_45407 ( "Game" real, "Date" text, "Opponent" text, "Score" text, "Location" text, "Record" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which game is located in Boston Garden and has a record of 49-17?
SELECT "Game" FROM table_45407 WHERE "Location" = 'boston garden' AND "Record" = '49-17'
wikisql
CREATE TABLE table_24630 ( "Year" real, "Starts" real, "Wins" real, "Top 5" real, "Top 10" real, "Poles" real, "Avg. Start" text, "Avg. Finish" text, "Winnings" text, "Position" text, "Team(s)" text ) -- Using valid SQLite, answer the following questions for the tables prov...
SELECT "Year" FROM table_24630 WHERE "Team(s)" = 'Donlavey Racing Bill Davis Racing'
wikisql
CREATE TABLE table_name_59 ( time_retired VARCHAR, laps VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What's the Time/Retired of Laps of 75?
SELECT time_retired FROM table_name_59 WHERE laps = 75
sql_create_context
CREATE TABLE table_name_4 ( rank VARCHAR, year INTEGER ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What rank is later than 1994?
SELECT rank FROM table_name_4 WHERE year > 1994
sql_create_context
CREATE TABLE table_name_69 ( song VARCHAR, artist VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the Song by Artist Robert Cogoi?
SELECT song FROM table_name_69 WHERE artist = "robert cogoi"
sql_create_context
CREATE TABLE t_kc21_t_kc24 ( MED_CLINIC_ID text, MED_SAFE_PAY_ID number ) 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, ...
SELECT t_kc21.MED_SER_ORG_NO FROM t_kc21 WHERE t_kc21.PERSON_ID = '05485933' AND t_kc21.MED_CLINIC_ID IN (SELECT t_kc22.MED_CLINIC_ID FROM t_kc22 WHERE t_kc22.SOC_SRT_DIRE_NM = '替米沙坦片')
css
CREATE TABLE table_78667 ( "City" text, "1860" text, "1870" text, "1880" text, "1890" real, "1900" real, "1910" real, "1920" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the 1880 figure when 1860 is N/A and 1910 is 494?
SELECT "1880" FROM table_78667 WHERE "1860" = 'n/a' AND "1910" = '494'
wikisql
CREATE TABLE table_13564637_4 ( Id VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the name of the column points against?
SELECT "points" AS _against FROM table_13564637_4 WHERE "points" = "points"
sql_create_context
CREATE TABLE table_69824 ( "Cyclist" text, "Nation" text, "Team" text, "Time" text, "UCI Points" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which nation is Robert Gesink from?
SELECT "Nation" FROM table_69824 WHERE "Cyclist" = 'robert gesink'
wikisql
CREATE TABLE table_25284864_3 ( november_3 VARCHAR, january_15_16 VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the November 3 result when the result for January 15-16 is 141?
SELECT november_3 FROM table_25284864_3 WHERE january_15_16 = "141"
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 * FROM t_kc21 WHERE t_kc21.MED_SER_ORG_NO = '7146110' AND t_kc21.IN_HOSP_DATE BETWEEN '2014-07-06' AND '2018-09-11' AND t_kc21.PERSON_NM LIKE '赵%'
css
CREATE TABLE table_name_19 ( color VARCHAR, thai_name VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Show the Color which has a Thai name of ?
SELECT color FROM table_name_19 WHERE thai_name = "วันพฤหัสบดี"
sql_create_context
CREATE TABLE table_28760 ( "Round" real, "Overall pick" real, "NFL team" text, "Player" text, "Position" text, "College" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Name the college for david carter
SELECT "College" FROM table_28760 WHERE "Player" = 'David Carter'
wikisql
CREATE TABLE table_30163 ( "Series episode" real, "Season episode" real, "Title" text, "Directed by" text, "Written by" text, "Original air date" text, "U.S. viewers (in million)" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- How many viewe...
SELECT "U.S. viewers (in million)" FROM table_30163 WHERE "Written by" = 'Kevin Biegel & Bill Lawrence'
wikisql
CREATE TABLE lab ( labid number, patientunitstayid number, labname text, labresult number, labresulttime time ) CREATE TABLE vitalperiodic ( vitalperiodicid number, patientunitstayid number, temperature number, sao2 number, heartrate number, respiration number, systemics...
SELECT t1.drugstarttime FROM (SELECT patient.uniquepid, medication.drugstarttime FROM medication JOIN patient ON medication.patientunitstayid = patient.patientunitstayid WHERE medication.drugname = 'dextrose' AND patient.uniquepid = '016-35481') AS t1 JOIN (SELECT patient.uniquepid, medication.drugstarttime FROM medica...
eicu
CREATE TABLE table_46756 ( "Team" text, "Outgoing manager" text, "Manner of departure" text, "Date of vacancy" text, "Replaced by" text, "Date of appointment" text, "Position in table" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What was ...
SELECT "Date of vacancy" FROM table_46756 WHERE "Date of appointment" = '11 march 2010'
wikisql
CREATE TABLE table_16819 ( "Model name" text, "Power (ps)" real, "Torque (Nm@rpm)" text, "Displacement (cm\u00b3)" real, "Engine code" text, "Comment" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- how many power (ps) with torque (nm@rpm) being ...
SELECT COUNT("Power (ps)") FROM table_16819 WHERE "Torque (Nm@rpm)" = '240@2200-5000'
wikisql
CREATE TABLE procedures ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) CREATE TABLE demographic ( subject_id text, hadm_id text, name text, marital_status text, age text, dob text, gender text, language text, religion text, ...
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE demographic.gender = "M" AND diagnoses.long_title = "Poisoning by other opiates and related narcotics"
mimicsql_data
CREATE TABLE table_52691 ( "Home team" text, "Home team score" text, "Away team" text, "Away team score" text, "Venue" text, "Crowd" real, "Date" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What was the score of the home team when there w...
SELECT "Home team score" FROM table_52691 WHERE "Crowd" > '5,500'
wikisql
CREATE TABLE table_19939 ( "Series Ep." text, "Episode" real, "Netflix" text, "Segment A" text, "Segment B" text, "Segment C" text, "Segment D" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Name the segment d for chicken
SELECT "Segment D" FROM table_19939 WHERE "Segment C" = 'Chicken'
wikisql
CREATE TABLE Has_Allergy ( StuID INTEGER, Allergy VARCHAR(20) ) CREATE TABLE Allergy_Type ( Allergy VARCHAR(20), AllergyType VARCHAR(20) ) CREATE TABLE Student ( StuID INTEGER, LName VARCHAR(12), Fname VARCHAR(12), Age INTEGER, Sex VARCHAR(1), Major INTEGER, Advisor INTEGER...
SELECT city_code, COUNT(*) FROM Student GROUP BY city_code ORDER BY city_code
nvbench
CREATE TABLE enroll ( class_code text, stu_num number, enroll_grade text ) CREATE TABLE course ( crs_code text, dept_code text, crs_description text, crs_credit number ) CREATE TABLE professor ( emp_num number, dept_code text, prof_office text, prof_extension text, prof...
SELECT COUNT(DISTINCT dept_address) FROM department WHERE school_code = 'BUS'
spider
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(SALARY) FROM employees WHERE FIRST_NAME LIKE '%D%' OR FIRST_NAME LIKE '%S%' GROUP BY JOB_ID ORDER BY SUM(SALARY)
nvbench
CREATE TABLE table_name_16 ( venue VARCHAR, home_team VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- In what venue does Footscray play?
SELECT venue FROM table_name_16 WHERE home_team = "footscray"
sql_create_context
CREATE TABLE outputevents ( row_id number, subject_id number, hadm_id number, icustay_id number, charttime time, itemid number, value number ) CREATE TABLE admissions ( row_id number, subject_id number, hadm_id number, admittime time, dischtime time, admission_type t...
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 = 55360 AND admissions.dischtime IS NULL)) AND transfers....
mimic_iii
CREATE TABLE airport ( airport_code varchar, airport_name text, airport_location text, state_code varchar, country_name varchar, time_zone_code varchar, minimum_connect_time int ) CREATE TABLE compartment_class ( compartment varchar, class_type varchar ) CREATE TABLE restriction ( ...
SELECT DISTINCT fare.fare_id FROM airport_service AS AIRPORT_SERVICE_0, airport_service AS AIRPORT_SERVICE_1, city AS CITY_0, city AS CITY_1, fare, flight, flight_fare WHERE CITY_0.city_code = AIRPORT_SERVICE_0.city_code AND CITY_0.city_name = 'DENVER' AND CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_...
atis
CREATE TABLE table_54626 ( "NGC number" real, "Object type" text, "Constellation" text, "Right ascension ( J2000 )" text, "Declination ( J2000 )" text, "Apparent magnitude" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- When the apparent magnitu...
SELECT "Right ascension ( J2000 )" FROM table_54626 WHERE "Apparent magnitude" = '10.5'
wikisql
CREATE TABLE microlab ( microlabid number, patientunitstayid number, culturesite text, organism text, culturetakentime time ) CREATE TABLE intakeoutput ( intakeoutputid number, patientunitstayid number, cellpath text, celllabel text, cellvaluenumeric number, intakeoutputtime...
SELECT t1.labname FROM (SELECT lab.labname, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM lab WHERE lab.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.age BETWEEN 20 AND 29) AND STRFTIME('%y', lab.labresulttime) <= '2100' GROUP BY lab.labname) AS t1 WHERE t1.c1 <= 5
eicu
CREATE TABLE table_name_18 ( score VARCHAR, goal INTEGER ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the score when there are less than 2 goals?
SELECT score FROM table_name_18 WHERE goal < 2
sql_create_context
CREATE TABLE table_12355 ( "Rank" text, "Nation" text, "Gold" real, "Silver" real, "Bronze" real, "Total" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the total number of Silver, when Gold is less than 34, when Rank is '6', and when To...
SELECT COUNT("Silver") FROM table_12355 WHERE "Gold" < '34' AND "Rank" = '6' AND "Total" > '10'
wikisql
CREATE TABLE table_23614702_2 ( horse__power VARCHAR, warship VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- How man horse power did the ship covadonga have?
SELECT horse__power FROM table_23614702_2 WHERE warship = "Covadonga"
sql_create_context
CREATE TABLE table_47966 ( "Week" real, "Date" text, "Opponent" text, "Result" text, "Attendance" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What was week 5's result?
SELECT "Result" FROM table_47966 WHERE "Week" = '5'
wikisql
CREATE TABLE table_name_8 ( college VARCHAR, team VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which college did the player who went to the Boston Patriots go to?
SELECT college FROM table_name_8 WHERE team = "boston patriots"
sql_create_context
CREATE TABLE table_54142 ( "Race" text, "Dist (f)" real, "Course" text, "Class" text, "Prize (\u00a3K)" real, "Odds" text, "Runners" real, "Placing" real, "Margin" text, "Time" text, "Jockey" text, "Trainer" text ) -- Using valid SQLite, answer the following questions f...
SELECT "Race" FROM table_54142 WHERE "Margin" = '8'
wikisql
CREATE TABLE table_12111 ( "Player" text, "Height" real, "Position" text, "Year born (Age)" text, "Current Club" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What's the position of the player with a Height of 2.06 and club of Triumph Lyubertsy?
SELECT "Position" FROM table_12111 WHERE "Height" = '2.06' AND "Current Club" = 'triumph lyubertsy'
wikisql
CREATE TABLE table_name_26 ( order VARCHAR, family VARCHAR, name VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- which order of bat belongs to the family of vespertilionidae and includes the northern long-eared myotis?
SELECT order FROM table_name_26 WHERE family = "vespertilionidae" AND name = "northern long-eared myotis"
sql_create_context
CREATE TABLE table_26263954_1 ( english VARCHAR, kunrei_shiki VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- how many number of english when kunrei-shiki is otya
SELECT COUNT(english) FROM table_26263954_1 WHERE kunrei_shiki = "otya"
sql_create_context
CREATE TABLE table_name_40 ( proposed VARCHAR, name VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the date for proposed for revere textile prints corporation
SELECT proposed FROM table_name_40 WHERE name = "revere textile prints corporation"
sql_create_context