instruction
stringlengths
151
7.46k
output
stringlengths
2
4.44k
source
stringclasses
26 values
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.JCZBJGDX, jyjgzbb.JCZBJGDL, jyjgzbb.JCZBJGDW FROM jyjgzbb WHERE jyjgzbb.JYZBLSH = '42474777202'
css
CREATE TABLE table_1341690_43 ( candidates VARCHAR, district VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Name the candidates for texas 1
SELECT candidates FROM table_1341690_43 WHERE district = "Texas 1"
sql_create_context
CREATE TABLE table_name_75 ( movie_title VARCHAR, year VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What movie was made in 1957?
SELECT movie_title FROM table_name_75 WHERE year = 1957
sql_create_context
CREATE TABLE table_47279 ( "Date" text, "Round" text, "Opponents" text, "H / A" text, "Result F \u2013 A" text, "Scorers" text, "Attendance" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Who were the scorers in round 3?
SELECT "Scorers" FROM table_47279 WHERE "Round" = 'round 3'
wikisql
CREATE TABLE table_48234 ( "Game" real, "Date" text, "Opponent" text, "Result" text, "49ers points" real, "Opponents" real, "Record" text, "Streak" text, "Attendance" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the lowest ...
SELECT MIN("49ers points") FROM table_48234 WHERE "Attendance" > '29,563' AND "Record" = '1-5'
wikisql
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 Team_ID, ACC_Percent FROM basketball_match GROUP BY All_Road
nvbench
CREATE TABLE table_25386974_1 ( f_laps VARCHAR, position VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- How many f/laps did Pedro Nunes have when he was in 20th position?
SELECT COUNT(f_laps) FROM table_25386974_1 WHERE position = "20th"
sql_create_context
CREATE TABLE table_69591 ( "Model" text, "Graded Hammer (Non GH3)" text, "Graded Hammer Three (GH3)" text, "Natural Wood Keyboard" text, "Synthetic Ivory Keytops" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which Natural Wood Keyboard has a CLP38...
SELECT "Natural Wood Keyboard" FROM table_69591 WHERE "Model" = 'clp380'
wikisql
CREATE TABLE procedures ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) 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, ...
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.admission_location = "EMERGENCY ROOM ADMIT" AND demographic.dob_year < "2078"
mimicsql_data
CREATE TABLE diagnoses ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) CREATE TABLE demographic ( subject_id text, hadm_id text, name text, marital_status text, age text, dob text, gender text, language text, religion text, ...
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.marital_status = "DIVORCED" AND lab.itemid = "51476"
mimicsql_data
CREATE TABLE Customers ( customer_name VARCHAR, date_became_customer VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Find the name of the first 5 customers.
SELECT customer_name FROM Customers ORDER BY date_became_customer LIMIT 5
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 * 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.BGDH WHERE hz_info.RYBH = '...
css
CREATE TABLE table_11139 ( "Year" real, "Theme" text, "Artist" text, "Composition" text, "Mintage" real, "Issue Price" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the composition of the coin that was issued after 2008, had a mintage l...
SELECT "Composition" FROM table_11139 WHERE "Mintage" > '999' AND "Artist" = 'jody broomfield' AND "Year" > '2008'
wikisql
CREATE TABLE table_17782308_1 ( result VARCHAR, week VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- How many results are listed for week 13?
SELECT COUNT(result) FROM table_17782308_1 WHERE week = 13
sql_create_context
CREATE TABLE table_7365 ( "Vol. #" real, "Title" text, "Material collected" text, "Pages" real, "ISBN" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- How many pages does the ISBN 1-40122-328-1 have?
SELECT SUM("Pages") FROM table_7365 WHERE "ISBN" = '1-40122-328-1'
wikisql
CREATE TABLE table_61598 ( "Place" text, "Player" text, "Country" text, "Score" text, "To par" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What country has t4 place and a 67-71-73=211 score?
SELECT "Country" FROM table_61598 WHERE "Place" = 't4' AND "Score" = '67-71-73=211'
wikisql
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 ) CREATE TABLE d_labitems ( row_id number, itemid number, label text ) CREATE TABLE microbiologyevents...
SELECT transfers.wardid FROM transfers WHERE transfers.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 76372 AND admissions.dischtime IS NULL) AND NOT transfers.wardid IS NULL ORDER BY transfers.intime DESC LIMIT 1
mimic_iii
CREATE TABLE table_name_82 ( attendance INTEGER, date VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Name the least attendance for 10 october 2006
SELECT MIN(attendance) FROM table_name_82 WHERE date = "10 october 2006"
sql_create_context
CREATE TABLE Rooms ( RoomId TEXT, roomName TEXT, beds INTEGER, bedType TEXT, maxOccupancy INTEGER, basePrice INTEGER, decor TEXT ) CREATE TABLE Reservations ( Code INTEGER, Room TEXT, CheckIn TEXT, CheckOut TEXT, Rate REAL, LastName TEXT, FirstName TEXT, Adul...
SELECT decor, COUNT(*) FROM Rooms WHERE bedType = "King" GROUP BY decor
nvbench
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 demographic ...
SELECT demographic.gender, demographic.language FROM demographic WHERE demographic.subject_id = "9271"
mimicsql_data
CREATE TABLE ReviewTaskStates ( Id number, Name text, Description text ) CREATE TABLE SuggestedEdits ( Id number, PostId number, CreationDate time, ApprovalDate time, RejectionDate time, OwnerUserId number, Comment text, Text text, Title text, Tags text, Revision...
SELECT PostId AS "post_link", Comment, UserId AS "user_link", CreationDate FROM PostHistory WHERE Comment LIKE '%##keyword##%' AND CreationDate >= '##Date1?2018-01-01##' AND CreationDate <= '##Date2?2019-01-01##' ORDER BY CreationDate
sede
CREATE TABLE table_name_38 ( opponents_in_the_final VARCHAR, partner VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Who is Partner Frederik Nielsen's Opponents in the final?
SELECT opponents_in_the_final FROM table_name_38 WHERE partner = "frederik nielsen"
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 COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE demographic.admityear < "2184" AND diagnoses.short_title = "Vascular hamartomas"
mimicsql_data
CREATE TABLE time_zone ( time_zone_code text, time_zone_name text, hours_from_gmt int ) CREATE TABLE food_service ( meal_code text, meal_number int, compartment text, meal_description varchar ) CREATE TABLE state ( state_code text, state_name text, country_name text ) CREATE T...
SELECT DISTINCT ground_service.transport_type FROM city, ground_service WHERE city.city_name = 'SAN DIEGO' AND ground_service.city_code = city.city_code
atis
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 procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.age < "85" AND procedures.long_title = "Endoscopic insertion of stent (tube) into bile duct"
mimicsql_data
CREATE TABLE table_name_71 ( second_party VARCHAR, first_party VARCHAR, election VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the second party that has a conservative first party in the 1834 election?
SELECT second_party FROM table_name_71 WHERE first_party = "conservative" AND election = "1834"
sql_create_context
CREATE TABLE table_name_77 ( pick__number INTEGER, overall VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What was the lowest pick number with an overall 86?
SELECT MIN(pick__number) FROM table_name_77 WHERE overall = 86
sql_create_context
CREATE TABLE job_history ( EMPLOYEE_ID decimal(6,0), START_DATE date, END_DATE date, JOB_ID varchar(10), DEPARTMENT_ID decimal(4,0) ) CREATE TABLE departments ( DEPARTMENT_ID decimal(4,0), DEPARTMENT_NAME varchar(30), MANAGER_ID decimal(6,0), LOCATION_ID decimal(4,0) ) CREATE TABLE...
SELECT JOB_ID, AVG(SALARY) FROM employees WHERE FIRST_NAME LIKE '%D%' OR FIRST_NAME LIKE '%S%' GROUP BY JOB_ID ORDER BY JOB_ID
nvbench
CREATE TABLE table_39415 ( "Call sign" text, "Frequency MHz" real, "City of license" text, "ERP W" real, "Class" text, "FCC info" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the ERP W for K236AM?
SELECT "ERP W" FROM table_39415 WHERE "Call sign" = 'k236am'
wikisql
CREATE TABLE table_72109 ( "Rd" real, "Name" text, "Pole Position" text, "Fastest Lap" text, "Winning driver" text, "Winning team" text, "Report" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- How many reports are there in the race that Fors...
SELECT COUNT("Report") FROM table_72109 WHERE "Winning team" = 'Forsythe Racing' AND "Pole Position" = 'Teo Fabi'
wikisql
CREATE TABLE table_19685 ( "Year" real, "Mens singles" text, "Womens singles" text, "Mens doubles" text, "Womens doubles" text, "Mixed doubles" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- WHo won men's singles in 1994?
SELECT "Mens singles" FROM table_19685 WHERE "Year" = '1994'
wikisql
CREATE TABLE instructor ( instructor_id int, name varchar, uniqname varchar ) CREATE TABLE gsi ( course_offering_id int, student_id int ) CREATE TABLE requirement ( requirement_id int, requirement varchar, college varchar ) CREATE TABLE program ( program_id int, name varchar, ...
SELECT COUNT(DISTINCT instructor.instructor_id) FROM course, course_offering, instructor, offering_instructor, semester WHERE course.course_id = course_offering.course_id AND course.department = 'FRENCH' AND course.number = 378 AND offering_instructor.instructor_id = instructor.instructor_id AND offering_instructor.off...
advising
CREATE TABLE table_1847180_4 ( district VARCHAR, vacator VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which district did Ralph Harvey (r) vacated when he resigned?
SELECT district FROM table_1847180_4 WHERE vacator = "Ralph Harvey (R)"
sql_create_context
CREATE TABLE table_47152 ( "Verb" text, "2 (VF)" text, "2 (F)" text, "3 (F)" text, "2/3 (P)" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- If 2F is tumi khao, what is 3F?
SELECT "3 (F)" FROM table_47152 WHERE "2 (F)" = 'tumi khao'
wikisql
CREATE TABLE table_11326124_3 ( against VARCHAR, opponent VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Who did Tina Pisnik verse?
SELECT against FROM table_11326124_3 WHERE opponent = "Tina Pisnik"
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 SUM(t_kc22.AMOUNT) FROM t_kc21 JOIN t_kc22 ON t_kc21.MED_CLINIC_ID = t_kc22.MED_CLINIC_ID WHERE t_kc21.PERSON_NM = '施博雅' AND t_kc21.CLINIC_TYPE = '门诊' AND t_kc22.STA_DATE BETWEEN '2005-08-29' AND '2007-04-15' AND t_kc22.MED_INV_ITEM_TYPE = '手术费'
css
CREATE TABLE table_name_80 ( avg_finish INTEGER, poles INTEGER ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the sum of value for average finish with poles less than 0?
SELECT SUM(avg_finish) FROM table_name_80 WHERE poles < 0
sql_create_context
CREATE TABLE hz_info ( KH text, KLX number, RYBH text, YLJGDM text ) 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,...
SELECT COUNT(*) FROM (SELECT jybgb.KSBM FROM mzjzjlb JOIN jybgb JOIN hz_info_mzjzjlb ON hz_info_mzjzjlb.YLJGDM = jybgb.YLJGDM_MZJZJLB AND mzjzjlb.JZLSH = jybgb.JZLSH_MZJZJLB AND hz_info_mzjzjlb.JZLSH = mzjzjlb.JZLSH AND hz_info_mzjzjlb.YLJGDM = hz_info_mzjzjlb.YLJGDM AND hz_info_mzjzjlb.JZLSH = mzjzjlb.JZLSH AND hz_inf...
css
CREATE TABLE table_203_248 ( id number, "code" text, "year" number ) -- Using valid SQLite, answer the following questions for the tables provided above. -- list each code not associated to a year .
SELECT "code" FROM table_203_248 WHERE "year" IS NULL
squall
CREATE TABLE ReviewRejectionReasons ( Id number, Name text, Description text, PostTypeId number ) CREATE TABLE CloseAsOffTopicReasonTypes ( Id number, IsUniversal boolean, InputTitle text, MarkdownInputGuidance text, MarkdownPostOwnerGuidance text, MarkdownPrivilegedUserGuidance...
SELECT num.TagName AS Tag, ROW_NUMBER() OVER (ORDER BY rate.Rate DESC) AS OldRank, ROW_NUMBER() OVER (ORDER BY num.Num DESC) AS RankNow, ROW_NUMBER() OVER (ORDER BY rate.Rate DESC) - ROW_NUMBER() OVER (ORDER BY num.Num DESC) AS Change, rate.Rate AS QuestionsIn2011, num.Num AS QuestionsTotal FROM (SELECT COUNT(PostId) A...
sede
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.dob_year < "2120" AND lab.fluid = "Blood"
mimicsql_data
CREATE TABLE table_58688 ( "Stage" text, "Winner" text, "General classification" text, "Mountains classification" text, "Points classification" text, "Team Classification" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What general classificatio...
SELECT "General classification" FROM table_58688 WHERE "Mountains classification" = 'david de la fuente' AND "Points classification" = 'thor hushovd'
wikisql
CREATE TABLE table_204_30 ( id number, "year built" text, "works number" number, "wheel arr." text, "gauge" text, "original owner" text, "name" text, "current location" text, "notes" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- who...
SELECT "original owner" FROM table_204_30 ORDER BY "year built" DESC LIMIT 1
squall
CREATE TABLE table_name_98 ( winner VARCHAR, prize VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Who is the Winner, when the Prize is 880,000?
SELECT winner FROM table_name_98 WHERE prize = "€880,000"
sql_create_context
CREATE TABLE PostTypes ( Id number, Name text ) CREATE TABLE Users ( Id number, Reputation number, CreationDate time, DisplayName text, LastAccessDate time, WebsiteUrl text, Location text, AboutMe text, Views number, UpVotes number, DownVotes number, ProfileImage...
SELECT (DATEPART(weekday, CreationDate) - 1) * 24 + DATEPART(hour, CreationDate) AS hour_of_week_GMT, COUNT(DISTINCT OwnerUserId) AS PostingUsers, COUNT(*) AS NumPosts FROM Posts AS p WHERE DATEDIFF(d, CreationDate, GETDATE()) <= '##DaysOfHistory##' GROUP BY (DATEPART(weekday, CreationDate) - 1) * 24 + DATEPART(hour, C...
sede
CREATE TABLE course ( course_id int, name varchar, department varchar, number varchar, credits varchar, advisory_requirement varchar, enforced_requirement varchar, description varchar, num_semesters int, num_enrolled int, has_discussion varchar, has_lab varchar, has_p...
SELECT DISTINCT course_offering.end_time, course_offering.friday, course_offering.monday, course_offering.saturday, course_offering.start_time, course_offering.sunday, course_offering.thursday, course_offering.tuesday, course_offering.wednesday FROM semester INNER JOIN course_offering ON semester.semester_id = course_o...
advising
CREATE TABLE table_48171 ( "Res." text, "Record" text, "Opponent" text, "Method" text, "Event" text, "Round" real, "Time" text, "Location" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- what is the record when the opponent is jeff willia...
SELECT "Record" FROM table_48171 WHERE "Opponent" = 'jeff williams'
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 t_kc21.OUT_DIAG_DIS_CD, t_kc21.OUT_DIAG_DIS_NM FROM t_kc21 WHERE t_kc21.PERSON_ID = '61021790' AND t_kc21.MED_CLINIC_ID IN (SELECT t_kc21_t_kc24.MED_CLINIC_ID FROM t_kc24 WHERE t_kc24.MED_AMOUT >= 5648.4)
css
CREATE TABLE table_29486189_4 ( party VARCHAR, residence VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- which party is the newark representative from
SELECT party FROM table_29486189_4 WHERE residence = "Newark"
sql_create_context
CREATE TABLE jyjgzbb ( BGDH text, BGRQ time, CKZFWDX text, CKZFWSX number, CKZFWXX number, JCFF text, JCRGH text, JCRXM text, JCXMMC text, JCZBDM text, JCZBJGDL number, JCZBJGDW text, JCZBJGDX text, JCZBMC text, JLDW text, JYRQ time, JYZBLSH text, ...
SELECT COUNT(*) FROM hz_info JOIN txmzjzjlb ON hz_info.YLJGDM = txmzjzjlb.YLJGDM AND hz_info.KH = txmzjzjlb.KH AND hz_info.KLX = txmzjzjlb.KLX WHERE hz_info.RYBH = '52475507' AND txmzjzjlb.JZKSRQ BETWEEN '2006-07-13' AND '2008-02-08' AND txmzjzjlb.YLJGDM = '6573850' UNION SELECT COUNT(*) FROM hz_info JOIN ftxmzjzjlb ON...
css
CREATE TABLE table_77976 ( "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 score has a Home team of geelong...
SELECT "Home team score" FROM table_77976 WHERE "Home team" = 'geelong'
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_kc22.SOC_SRT_DIRE_CD, t_kc22.SOC_SRT_DIRE_NM, t_kc22.AMOUNT FROM t_kc22 JOIN t_kc21_t_kc22 JOIN t_kc21 ON t_kc21_t_kc22.MED_EXP_DET_ID = t_kc22.MED_EXP_DET_ID AND t_kc21_t_kc22.MED_CLINIC_ID = t_kc21.MED_CLINIC_ID WHERE t_kc21.MED_CLINIC_ID = '89912914191' AND NOT t_kc22.SOC_SRT_DIRE_NM LIKE '%舒肝%'
css
CREATE TABLE wdmzjzjlb ( CYBQDM text, CYBQMC text, CYCWH text, CYKSDM text, CYKSMC text, CYSJ time, CYZTDM number, HZXM text, JZKSDM text, JZKSMC text, JZLSH number, KH text, KLX number, MZBMLX number, MZJZLSH text, MZZDBM text, MZZDMC text, MZZYZD...
SELECT jyjgzbb.JYZBLSH 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 = ...
css
CREATE TABLE tweets ( id bigint(20), uid int(11), text char(140), createdate datetime ) CREATE TABLE user_profiles ( uid int(11), name varchar(255), email varchar(255), partitionid int(11), followers int(11) ) CREATE TABLE follows ( f1 int(11), f2 int(11) ) -- Using valid...
SELECT name, partitionid FROM user_profiles AS T1 JOIN tweets AS T2 ON T1.uid = T2.uid ORDER BY name DESC
nvbench
CREATE TABLE table_52896 ( "Evaluation average (From February 2011)" real, "Evaluation average (From April 2009)" text, "Evaluation average (Before April 2009)" text, "% of negative evaluations" text, "Submitting schedule on time" text, "Punctuality/Attendance issues" text, "Peak lessons tau...
SELECT MAX("Peak lessons taught") FROM table_52896 WHERE "Evaluation average (Before April 2009)" = '4.4'
wikisql
CREATE TABLE table_name_29 ( no_s_ VARCHAR, school_club_team_country VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the number of the player who came from Virginia?
SELECT no_s_ FROM table_name_29 WHERE school_club_team_country = "virginia"
sql_create_context
CREATE TABLE table_name_25 ( engine_capacity INTEGER, mpg_us_urban VARCHAR, co_2_g_km VARCHAR, manufacturer VARCHAR, mpg_uk_extra_urban VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the highest engine capacity with a bmw manufacturer, an...
SELECT MAX(engine_capacity) FROM table_name_25 WHERE manufacturer = "bmw" AND mpg_uk_extra_urban = 52.3 AND co_2_g_km = 176 AND mpg_us_urban > 27.3
sql_create_context
CREATE TABLE table_name_5 ( ont VARCHAR, nb VARCHAR, normal_total VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Name the Ont of N.B. of 10 and normal total of 77
SELECT ont FROM table_name_5 WHERE nb = "10" AND normal_total = "77"
sql_create_context
CREATE TABLE Manufacturers ( Code INTEGER, Name VARCHAR(255), Headquarter VARCHAR(255), Founder VARCHAR(255), Revenue REAL ) CREATE TABLE Products ( Code INTEGER, Name VARCHAR(255), Price DECIMAL, Manufacturer INTEGER ) -- Using valid SQLite, answer the following questions for the...
SELECT T2.Name, T1.Code FROM Products AS T1 JOIN Manufacturers AS T2 ON T1.Manufacturer = T2.Code GROUP BY T2.Name ORDER BY T1.Code DESC
nvbench
CREATE TABLE table_name_33 ( start VARCHAR, year INTEGER ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What was the starting position in the year before 1986?
SELECT start FROM table_name_33 WHERE year < 1986
sql_create_context
CREATE TABLE table_1145 ( "Week" real, "Date" text, "Opponent" text, "Result" text, "Record" text, "Game Site" text, "Attendance" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Name the least week for september 19, 1976
SELECT MIN("Week") FROM table_1145 WHERE "Date" = 'September 19, 1976'
wikisql
CREATE TABLE table_21737 ( "Series #" real, "Episode #" real, "Title" text, "Directed by" text, "Written by" text, "U.S. viewers (million)" text, "Original airdate" text, "Production Code" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- I...
SELECT "Directed by" FROM table_21737 WHERE "Production Code" = '2T6267'
wikisql
CREATE TABLE table_36472 ( "Game" real, "February" real, "Opponent" text, "Score" text, "Record" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which Record has a February smaller than 8, and an Opponent of montreal canadiens?
SELECT "Record" FROM table_36472 WHERE "February" < '8' AND "Opponent" = 'montreal canadiens'
wikisql
CREATE TABLE table_36861 ( "Frequency" text, "Name" text, "Format" text, "Call Sign" text, "Covered Location" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What format is at frequency 99.5 FM?
SELECT "Format" FROM table_36861 WHERE "Frequency" = '99.5 fm'
wikisql
CREATE TABLE table_65186 ( "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 for bryce molder?
SELECT "Place" FROM table_65186 WHERE "Player" = 'bryce molder'
wikisql
CREATE TABLE table_23851574_2 ( nationality_sponsors VARCHAR, mirror_type VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- How many nationalities/sponsors for mirror/type schmidt uv?
SELECT COUNT(nationality_sponsors) FROM table_23851574_2 WHERE mirror_type = "Schmidt UV"
sql_create_context
CREATE TABLE table_name_69 ( ihsaa_class VARCHAR, school VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the IHSAA class for Portage?
SELECT ihsaa_class FROM table_name_69 WHERE school = "portage"
sql_create_context
CREATE TABLE table_36110 ( "Season" real, "Champion" text, "Second" text, "Third" text, "Team Champion" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What was the highest season with Barwa International Campos Team as champion?
SELECT MAX("Season") FROM table_36110 WHERE "Team Champion" = 'barwa international campos team'
wikisql
CREATE TABLE regions ( REGION_ID decimal(5,0), REGION_NAME varchar(25) ) CREATE TABLE jobs ( JOB_ID varchar(10), JOB_TITLE varchar(35), MIN_SALARY decimal(6,0), MAX_SALARY decimal(6,0) ) CREATE TABLE locations ( LOCATION_ID decimal(4,0), STREET_ADDRESS varchar(40), POSTAL_CODE varc...
SELECT HIRE_DATE, SUM(MANAGER_ID) FROM employees WHERE HIRE_DATE < '2002-06-21' ORDER BY SUM(MANAGER_ID) DESC
nvbench
CREATE TABLE files ( f_id number(10), artist_name varchar2(50), file_size varchar2(20), duration varchar2(20), formats varchar2(20) ) CREATE TABLE song ( song_name varchar2(50), artist_name varchar2(50), country varchar2(20), f_id number(10), genre_is varchar2(20), rating nu...
SELECT MIN(T1.duration), MIN(T2.rating) FROM files AS T1 JOIN song AS T2 ON T1.f_id = T2.f_id GROUP BY MIN(T1.duration) ORDER BY MIN(T2.rating)
nvbench
CREATE TABLE flight_leg ( flight_id int, leg_number int, leg_flight int ) CREATE TABLE aircraft ( aircraft_code varchar, aircraft_description varchar, manufacturer varchar, basic_type varchar, engines int, propulsion varchar, wide_body varchar, wing_span int, length int,...
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 = 'PITTSBURGH' AND CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'BAL...
atis
CREATE TABLE table_13034 ( "Team 1" text, "Score" text, "Team 2" text, "1st round" text, "2nd round" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the 1st round result for ECAC Chaumont (D2) as team 1?
SELECT "1st round" FROM table_13034 WHERE "Team 1" = 'ecac chaumont (d2)'
wikisql
CREATE TABLE table_name_72 ( event VARCHAR, winner VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What event did Will Fry win?
SELECT event FROM table_name_72 WHERE winner = "will fry"
sql_create_context
CREATE TABLE PostTags ( PostId number, TagId number ) CREATE TABLE Badges ( Id number, UserId number, Name text, Date time, Class number, TagBased boolean ) CREATE TABLE Posts ( Id number, PostTypeId number, AcceptedAnswerId number, ParentId number, CreationDate tim...
SELECT p.ViewCount / 1000 AS "kviews", SUM(p.CommentCount) / COUNT(*) AS "average_comment_count" FROM Posts AS p WHERE p.CommentCount != 0 GROUP BY p.ViewCount / 1000 ORDER BY p.ViewCount / 1000
sede
CREATE TABLE table_25687 ( "Episode Number" text, "Title" text, "Villains" text, "Director" text, "Writer" text, "Original airdate" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Who were the directors of the episode 'nano nits' written by natha...
SELECT "Director" FROM table_25687 WHERE "Writer" = 'Nathan Cockerill' AND "Title" = 'Nano Nits'
wikisql
CREATE TABLE jobs ( JOB_ID varchar(10), JOB_TITLE varchar(35), MIN_SALARY decimal(6,0), MAX_SALARY decimal(6,0) ) CREATE TABLE job_history ( EMPLOYEE_ID decimal(6,0), START_DATE date, END_DATE date, JOB_ID varchar(10), DEPARTMENT_ID decimal(4,0) ) CREATE TABLE countries ( COUNT...
SELECT HIRE_DATE, DEPARTMENT_ID FROM employees WHERE NOT DEPARTMENT_ID IN (SELECT DEPARTMENT_ID FROM departments WHERE MANAGER_ID BETWEEN 100 AND 200) ORDER BY HIRE_DATE
nvbench
CREATE TABLE table_15878 ( "Player" text, "No." text, "Nationality" text, "Position" text, "Years in Toronto" text, "School/Club Team" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What years was the player Lonny Baxter in Toronto?
SELECT "Years in Toronto" FROM table_15878 WHERE "Player" = 'Lonny Baxter'
wikisql
CREATE TABLE table_75578 ( "Week" real, "Date" text, "Opponent" text, "Result" text, "Venue" text, "Attendance" real ) -- 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_75578 WHERE "Date" = 'september 26, 1976'
wikisql
CREATE TABLE table_23308178_4 ( score VARCHAR, date VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What was the score on October 29?
SELECT score FROM table_23308178_4 WHERE date = "October 29"
sql_create_context
CREATE TABLE table_47401 ( "Position" real, "Club" text, "Played" real, "Points" real, "Wins" real, "Draws" real, "Losses" real, "Goals for" real, "Goals against" real, "Goal Difference" real ) -- Using valid SQLite, answer the following questions for the tables provided above....
SELECT COUNT("Goals against") FROM table_47401 WHERE "Played" > '38'
wikisql
CREATE TABLE table_24607 ( "Week" real, "Date" text, "Opponent" text, "Location" text, "Final Score" text, "Attendance" real, "Record" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What location was the game on October 6?
SELECT "Location" FROM table_24607 WHERE "Date" = 'October 6'
wikisql
CREATE TABLE table_14526 ( "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 was their Opponent on April 26?
SELECT "Opponent" FROM table_14526 WHERE "Date" = 'april 26'
wikisql
CREATE TABLE table_23212 ( "Institution" text, "Location" text, "Nickname" text, "Founded" real, "Type" text, "Enrollment" real, "Joined" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What's the nickname of the students of the school founde...
SELECT "Nickname" FROM table_23212 WHERE "Founded" = '1933'
wikisql
CREATE TABLE table_24224647_2 ( year_premiered VARCHAR, main_presenter VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- How many years premiered have Sa Beining as main presenter?
SELECT COUNT(year_premiered) FROM table_24224647_2 WHERE main_presenter = "Sa Beining"
sql_create_context
CREATE TABLE table_11677691_5 ( school VARCHAR, hometown VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which school is in the hometown of Aledo, Texas?
SELECT school FROM table_11677691_5 WHERE hometown = "Aledo, Texas"
sql_create_context
CREATE TABLE table_25322130_3 ( fastest_lap VARCHAR, round VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Name the fastest lap for round 3
SELECT fastest_lap FROM table_25322130_3 WHERE round = "3"
sql_create_context
CREATE TABLE table_11694832_1 ( us_viewers__millions_ VARCHAR, production_code VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- How many millions of U.S. viewers watched the show with a production code of 3T5769?
SELECT us_viewers__millions_ FROM table_11694832_1 WHERE production_code = "3T5769"
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 prescriptions ( subject_id text, hadm_id text, icustay_id text, drug_type text, drug text, formulary_drug_cd text, ...
SELECT demographic.dob, demographic.admission_location FROM demographic WHERE demographic.name = "Jerry Deberry"
mimicsql_data
CREATE TABLE t_kc21 ( MED_CLINIC_ID text, OVERALL_CD_ORG text, OVERALL_CD_PERSON text, COMP_ID text, PERSON_ID text, PERSON_NM text, IDENTITY_CARD text, SOC_SRT_CARD text, PERSON_SEX number, PERSON_AGE number, IN_HOSP_DATE time, OUT_HOSP_DATE time, DIFF_PLACE_FLG numb...
SELECT MIN(MED_AMOUT), MAX(MED_AMOUT) FROM t_kc24 WHERE MED_CLINIC_ID IN (SELECT MED_CLINIC_ID FROM t_kc21 WHERE MED_SER_ORG_NO = '3153932' AND IN_DIAG_DIS_CD = 'C22.756')
css
CREATE TABLE patients ( row_id number, subject_id number, gender text, dob time, dod time ) CREATE TABLE transfers ( row_id number, subject_id number, hadm_id number, icustay_id number, eventtype text, careunit text, wardid number, intime time, outtime time ) CR...
SELECT t3.drug FROM (SELECT t2.drug, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM (SELECT admissions.subject_id, prescriptions.startdate FROM prescriptions JOIN admissions ON prescriptions.hadm_id = admissions.hadm_id WHERE prescriptions.drug = 'dexamethasone sod phosphate') AS t1 JOIN (SELECT admissions.subje...
mimic_iii
CREATE TABLE table_2266976_1 ( team VARCHAR, year VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What team competed in 2003?
SELECT team FROM table_2266976_1 WHERE year = "2003"
sql_create_context
CREATE TABLE compartment_class ( compartment varchar, class_type varchar ) CREATE TABLE restriction ( restriction_code text, advance_purchase int, stopovers text, saturday_stay_required text, minimum_stay int, maximum_stay int, application text, no_discounts text ) CREATE TABLE...
SELECT DISTINCT flight.flight_id FROM airport_service AS AIRPORT_SERVICE_0, airport_service AS AIRPORT_SERVICE_1, airport_service AS AIRPORT_SERVICE_2, city AS CITY_0, city AS CITY_1, city AS CITY_2, flight, flight_stop WHERE (CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'DENVER' AND CITY_2.cit...
atis
CREATE TABLE table_1601792_4 ( site VARCHAR, television_station VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What are the site(s) for tv station 8tv?
SELECT site FROM table_1601792_4 WHERE television_station = "8TV"
sql_create_context
CREATE TABLE table_name_2 ( yards INTEGER, game_time VARCHAR, date VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Game time of 2nd quarter (0:00), and a Date of november 8, 1971 has how many average yards?
SELECT AVG(yards) FROM table_name_2 WHERE game_time = "2nd quarter (0:00)" AND date = "november 8, 1971"
sql_create_context
CREATE TABLE table_30367 ( "No. in series" real, "Title" text, "Directed by" text, "Written by" text, "Original air date" text, "Production code" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What's the title of the episode with production code...
SELECT "Title" FROM table_30367 WHERE "Production code" = '104'
wikisql
CREATE TABLE mzjzjlb ( YLJGDM text, JZLSH text, KH text, KLX number, MJZH text, HZXM text, NLS number, NLY number, ZSEBZ number, JZZTDM number, JZZTMC text, JZJSSJ time, TXBZ number, ZZBZ number, WDBZ number, JZKSBM text, JZKSMC text, JZKSRQ time, ...
(SELECT jybgb.BGDH FROM person_info JOIN hz_info JOIN mzjzjlb JOIN jybgb ON person_info.RYBH = hz_info.RYBH AND hz_info.YLJGDM = mzjzjlb.YLJGDM AND hz_info.KH = mzjzjlb.KH AND hz_info.KLX = mzjzjlb.KLX AND mzjzjlb.YLJGDM = jybgb.YLJGDM_MZJZJLB AND mzjzjlb.JZLSH = jybgb.JZLSH_MZJZJLB WHERE person_info.XM = '马欣怿' AND jyb...
css
CREATE TABLE table_68349 ( "Place" text, "Player" text, "Country" text, "Score" text, "To par" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What country was Henry Picard from?
SELECT "Country" FROM table_68349 WHERE "Player" = 'henry picard'
wikisql
CREATE TABLE route ( train_id int, station_id int ) CREATE TABLE weekly_weather ( station_id int, day_of_week text, high_temperature int, low_temperature int, precipitation real, wind_speed_mph int ) CREATE TABLE station ( id int, network_name text, services text, local...
SELECT time, train_number FROM train WHERE destination = 'Chennai'
nvbench
CREATE TABLE student ( student_id int, lastname varchar, firstname varchar, program_id int, declare_major varchar, total_credit int, total_gpa float, entered_as varchar, admit_term int, predicted_graduation_semester int, degree varchar, minor varchar, internship varch...
SELECT DISTINCT course.department, course.name, course.number, program_course.workload FROM course INNER JOIN area ON course.course_id = area.course_id INNER JOIN program_course ON program_course.course_id = course.course_id WHERE area.area LIKE '%computational science%' AND program_course.workload < (SELECT MIN(PROGRA...
advising
CREATE TABLE table_1644876_2 ( skip VARCHAR, stolen_ends VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Who was the skip with 14 stolen ends?
SELECT skip FROM table_1644876_2 WHERE stolen_ends = 14
sql_create_context