instruction
stringlengths
151
7.46k
output
stringlengths
2
4.44k
source
stringclasses
26 values
CREATE TABLE table_58332 ( "Player" text, "Height" text, "School" text, "Hometown" text, "College" text, "NBA Draft" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which Hometown has a Height of 6-10?
SELECT "Hometown" FROM table_58332 WHERE "Height" = '6-10'
wikisql
CREATE TABLE demographic ( subject_id text, hadm_id text, name text, marital_status text, age text, dob text, gender text, language text, religion text, admission_type text, days_stay text, insurance text, ethnicity text, expire_flag text, admission_location t...
SELECT demographic.expire_flag, demographic.dod FROM demographic WHERE demographic.subject_id = "3369"
mimicsql_data
CREATE TABLE table_20407 ( "Country" text, "Total Freshwater Withdrawal (km 3 /yr)" text, "Per Capita Withdrawal (m 3 /p/yr)" real, "Domestic Use (m 3 /p/yr)(in %)" text, "Industrial Use (m 3 /p/yr)(in %)" text, "Agricultural Use (m 3 /p/yr)(in %)" text ) -- Using valid SQLite, answer the foll...
SELECT "Country" FROM table_20407 WHERE "Agricultural Use (m 3 /p/yr)(in %)" = '794(86%)'
wikisql
CREATE TABLE table_79745 ( "Season" text, "Launch date" text, "Final date" text, "Days" real, "Housemates" real, "Winner" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What final date had 16 housemates?
SELECT "Final date" FROM table_79745 WHERE "Housemates" = '16'
wikisql
CREATE TABLE table_204_941 ( id number, "#" number, "date" text, "visitor" text, "score" text, "home" text, "record" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- each game took place in what month .
SELECT "date" FROM table_204_941
squall
CREATE TABLE table_1473672_3 ( college_junior_club_team VARCHAR, nhl_team VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which college/junior/club team did the player play on that played for the Buffalo Sabres in NHL?
SELECT college_junior_club_team FROM table_1473672_3 WHERE nhl_team = "Buffalo Sabres"
sql_create_context
CREATE TABLE table_55120 ( "Episode #" real, "# in Season" real, "Episode Name" text, "Airdate" text, "Location" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the lowest episode # with an air date of October 31, 2001?
SELECT MIN("Episode #") FROM table_55120 WHERE "Airdate" = 'october 31, 2001'
wikisql
CREATE TABLE table_name_39 ( score VARCHAR, loss VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- what was the score in the loss to tapani (0-1)?
SELECT score FROM table_name_39 WHERE loss = "tapani (0-1)"
sql_create_context
CREATE TABLE table_17120964_6 ( attendance VARCHAR, opponent VARCHAR, venue VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What was the total attendance during the home game against the Swindon Wildcats?
SELECT attendance FROM table_17120964_6 WHERE opponent = "Swindon Wildcats" AND venue = "Home"
sql_create_context
CREATE TABLE table_26757_4 ( proto_slavic VARCHAR, macedonian VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- When (r ba) is the macedonian what is the proto-slavic?
SELECT proto_slavic FROM table_26757_4 WHERE macedonian = "риба (ríba)"
sql_create_context
CREATE TABLE table_name_89 ( detriment VARCHAR, domicile VARCHAR, sign VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which detriment has a domicile of mercury and Virgo as a sign?
SELECT detriment FROM table_name_89 WHERE domicile = "mercury" AND sign = "virgo"
sql_create_context
CREATE TABLE table_74293 ( "Player" text, "Starts" real, "Cuts made" real, "Best finish" text, "Money list rank" real, "Earnings (\u20ac)" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- How many cuts did Gary Clark make?
SELECT "Cuts made" FROM table_74293 WHERE "Player" = 'Gary Clark'
wikisql
CREATE TABLE course_offering ( offering_id int, course_id int, semester int, section_number int, start_time time, end_time time, monday varchar, tuesday varchar, wednesday varchar, thursday varchar, friday varchar, saturday varchar, sunday varchar, has_final_proje...
SELECT DISTINCT department, name, number FROM course WHERE (description LIKE '%Electricity and Magnetism%' OR name LIKE '%Electricity and Magnetism%') AND credits = 8
advising
CREATE TABLE table_name_18 ( to_par VARCHAR, place VARCHAR, country VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is To Par, when Place is 'T5', and when Country is 'United States'?
SELECT to_par FROM table_name_18 WHERE place = "t5" AND country = "united states"
sql_create_context
CREATE TABLE table_203_322 ( id number, "club" text, "played" number, "won" number, "drawn" number, "lost" number, "points for" number, "points against" number, "bonus points" number, "points" number ) -- Using valid SQLite, answer the following questions for the tables provide...
SELECT (SELECT "points" FROM table_203_322 WHERE "club" = 'biarritz olympique') - (SELECT "points" FROM table_203_322 WHERE "club" = 'su agen')
squall
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 * FROM gwyjzb WHERE gwyjzb.MED_SER_ORG_NO = '4368636' AND gwyjzb.IN_HOSP_DATE BETWEEN '2006-09-30' AND '2016-08-13' UNION SELECT * FROM fgwyjzb WHERE fgwyjzb.MED_SER_ORG_NO = '4368636' AND fgwyjzb.IN_HOSP_DATE BETWEEN '2006-09-30' AND '2016-08-13' EXCEPT SELECT * FROM gwyjzb WHERE gwyjzb.MED_SER_ORG_NO = '436863...
css
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 Name, COUNT(Name) FROM Products WHERE Price <= 200 GROUP BY Name ORDER BY COUNT(Name)
nvbench
CREATE TABLE table_name_14 ( surface VARCHAR, partner VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What surface has natalia gussoni as the partner?
SELECT surface FROM table_name_14 WHERE partner = "natalia gussoni"
sql_create_context
CREATE TABLE Badges ( Id number, UserId number, Name text, Date time, Class number, TagBased boolean ) CREATE TABLE PostHistory ( Id number, PostHistoryTypeId number, PostId number, RevisionGUID other, CreationDate time, UserId number, UserDisplayName text, Comme...
WITH Raw AS (SELECT Id, Score, RANK() OVER (PARTITION BY ParentId ORDER BY Id) AS No FROM Posts WHERE PostTypeId = 2), Raw2 AS (SELECT No, Score, COUNT(*) AS Count FROM Raw GROUP BY Score, No) SELECT Score, CAST(No AS TEXT) AS No, Count FROM Raw2 WHERE Score BETWEEN -5 AND 10 AND No BETWEEN 1 AND 5
sede
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 * FROM hz_info JOIN mzjzjlb JOIN jybgb JOIN jyjgzbb JOIN person_info_hz_info JOIN person_info 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....
css
CREATE TABLE diagnoses_icd ( row_id number, subject_id number, hadm_id number, icd9_code text, charttime time ) CREATE TABLE transfers ( row_id number, subject_id number, hadm_id number, icustay_id number, eventtype text, careunit text, wardid number, intime time, ...
SELECT COUNT(DISTINCT t1.subject_id) FROM (SELECT admissions.subject_id, diagnoses_icd.charttime FROM diagnoses_icd JOIN admissions ON diagnoses_icd.hadm_id = admissions.hadm_id WHERE diagnoses_icd.icd9_code = (SELECT d_icd_diagnoses.icd9_code FROM d_icd_diagnoses WHERE d_icd_diagnoses.short_title = 'pseudomonal pneumo...
mimic_iii
CREATE TABLE table_18133 ( "District" text, "Incumbent" text, "Party" text, "First elected" real, "Results" text, "Candidates" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Who ran in the district elections won by Tom Petri?
SELECT "Candidates" FROM table_18133 WHERE "Incumbent" = 'Tom Petri'
wikisql
CREATE TABLE table_35465 ( "Stage" text, "General classification" text, "Points classification" text, "Mountains classification" text, "Young rider classification" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the general classification wit...
SELECT "General classification" FROM table_35465 WHERE "Stage" = '13'
wikisql
CREATE TABLE table_name_8 ( date VARCHAR, result VARCHAR, method VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is Date, when Result is Loss, and when Method is Submission (Armbar)?
SELECT date FROM table_name_8 WHERE result = "loss" AND method = "submission (armbar)"
sql_create_context
CREATE TABLE table_24837750_1 ( date_in_service VARCHAR, county VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- When did the wind farm in Musselshell started service?
SELECT date_in_service FROM table_24837750_1 WHERE county = "Musselshell"
sql_create_context
CREATE TABLE table_57902 ( "Season" real, "Div." text, "Tms." real, "Pos." real, "Attendance/G" real, "Emperor's Cup" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- How many seasons did the Div J1 have the Emperor's cup in the 3rd round with Tms...
SELECT COUNT("Season") FROM table_57902 WHERE "Emperor's Cup" = '3rd round' AND "Div." = 'j1' AND "Tms." > '18'
wikisql
CREATE TABLE table_name_3 ( june VARCHAR, november VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Who is the June playmate with the November playmate Lorraine Olivia?
SELECT june FROM table_name_3 WHERE november = "lorraine olivia"
sql_create_context
CREATE TABLE table_3794 ( "Year" text, "Stage" real, "Start of stage" text, "Distance (km)" text, "Category of climb" text, "Stage winner" text, "Nationality" text, "Yellow jersey" text, "Bend" real ) -- Using valid SQLite, answer the following questions for the tables provided abo...
SELECT COUNT("Start of stage") FROM table_3794 WHERE "Year" = '2006'
wikisql
CREATE TABLE table_28243691_2 ( founded VARCHAR, team_nickname VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- In how many different years was the team nicknamed Comets founded?
SELECT COUNT(founded) FROM table_28243691_2 WHERE team_nickname = "Comets"
sql_create_context
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 t_kc22.SOC_SRT_DIRE_CD, t_kc22.SOC_SRT_DIRE_NM 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 = '54641166707' AND t_kc22.HOSP_DOC_NM LIKE '谢%'
css
CREATE TABLE table_40893 ( "Club" text, "Home town" text, "Arena" text, "Founded" real, "Rank" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which arena was founded in 2000?
SELECT "Arena" FROM table_40893 WHERE "Founded" = '2000'
wikisql
CREATE TABLE category ( category_id number, name text, last_update time ) CREATE TABLE customer ( customer_id number, store_id number, first_name text, last_name text, email text, address_id number, active boolean, create_date time, last_update time ) CREATE TABLE addre...
SELECT COUNT(*) FROM inventory WHERE store_id = 1
spider
CREATE TABLE useracct ( u_id integer, name varchar(128) ) CREATE TABLE trust ( source_u_id integer, target_u_id integer, trust integer ) CREATE TABLE item ( i_id integer, title varchar(20) ) CREATE TABLE review ( a_id integer, u_id integer, i_id integer, rating integer, ...
SELECT name, AVG(T2.rating) FROM useracct AS T1 JOIN review AS T2 ON T1.u_id = T2.u_id GROUP BY T2.u_id
nvbench
CREATE TABLE program_course ( program_id int, course_id int, workload int, category varchar ) CREATE TABLE ta ( campus_job_id int, student_id int, location varchar ) CREATE TABLE course_tags_count ( course_id int, clear_grading int, pop_quiz int, group_projects int, ins...
SELECT COUNT(*) = 0 FROM course INNER JOIN course_offering ON course.course_id = course_offering.course_id INNER JOIN offering_instructor ON offering_instructor.offering_id = course_offering.offering_id INNER JOIN instructor ON offering_instructor.instructor_id = instructor.instructor_id WHERE course.number = 503 AND c...
advising
CREATE TABLE table_name_59 ( year_inducted VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What's the year inducted for the label of label?
SELECT year_inducted FROM table_name_59 WHERE "label" = "label"
sql_create_context
CREATE TABLE lab ( subject_id text, hadm_id text, itemid text, charttime text, flag text, value_unit text, label text, fluid text ) CREATE TABLE diagnoses ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) CREATE TABLE procedures ( ...
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE diagnoses.short_title = "Abn react-renal dialysis" AND prescriptions.route = "IV"
mimicsql_data
CREATE TABLE student ( sex VARCHAR, age VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- How many female students (sex is F) whose age is below 25?
SELECT COUNT(*) FROM student WHERE sex = 'F' AND age < 25
sql_create_context
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 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_17460 ( "Pick #" real, "Player" text, "Position" text, "Nationality" text, "NHL team" text, "College/junior/club team" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which nhl team has a college/junior/club team named universi...
SELECT "NHL team" FROM table_17460 WHERE "College/junior/club team" = 'University of Notre Dame (NCAA)'
wikisql
CREATE TABLE cost ( costid number, uniquepid text, patienthealthsystemstayid number, eventtype text, eventid number, chargetime time, cost number ) CREATE TABLE diagnosis ( diagnosisid number, patientunitstayid number, diagnosisname text, diagnosistime time, icd9code tex...
SELECT t3.diagnosisname FROM (SELECT t2.diagnosisname, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM (SELECT patient.uniquepid, diagnosis.diagnosistime FROM diagnosis JOIN patient ON diagnosis.patientunitstayid = patient.patientunitstayid WHERE diagnosis.diagnosisname = 'respiratory arrest' AND DATETIME(diagnos...
eicu
CREATE TABLE PROFESSOR ( EMP_NUM int, DEPT_CODE varchar(10), PROF_OFFICE varchar(50), PROF_EXTENSION varchar(4), PROF_HIGH_DEGREE varchar(5) ) CREATE TABLE ENROLL ( CLASS_CODE varchar(5), STU_NUM int, ENROLL_GRADE varchar(50) ) CREATE TABLE STUDENT ( STU_NUM int, STU_LNAME varc...
SELECT DEPT_CODE, MAX(STU_GPA) FROM STUDENT GROUP BY DEPT_CODE
nvbench
CREATE TABLE table_204_469 ( id number, "coach" text, "years" text, "seasons" number, "wins" number, "losses" number, "ties" number, "pct" number ) -- Using valid SQLite, answer the following questions for the tables provided above. -- how many coaches had above 500 wins ?
SELECT COUNT("coach") FROM table_204_469 WHERE "wins" > 500
squall
CREATE TABLE table_3570 ( "No. in series" real, "No. in season" real, "Title" text, "Directed by" text, "Written by" text, "Original air date" text, "Production code" real, "U.S. viewers (millions)" text ) -- Using valid SQLite, answer the following questions for the tables provided ab...
SELECT "No. in season" FROM table_3570 WHERE "Title" = '65 Million Years Off'
wikisql
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 demographic.days_stay, demographic.admittime FROM demographic WHERE demographic.subject_id = "66411"
mimicsql_data
CREATE TABLE table_name_92 ( Id VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What in 2007 has a 2010 of qf, and a 2012 of w?
SELECT 2007 FROM table_name_92 WHERE 2010 = "qf" AND 2012 = "w"
sql_create_context
CREATE TABLE table_72735 ( "Episode Number" real, "Air Date" text, "Guest Host" text, "Musical Guest (Song performed)" text, "Who knows the most about the guest host? Panelists" text, "Coat Of Cash Wearing Celebrity" text ) -- Using valid SQLite, answer the following questions for the tables p...
SELECT COUNT("Coat Of Cash Wearing Celebrity") FROM table_72735 WHERE "Who knows the most about the guest host? Panelists" = 'Matt Di Angelo and Antony Cotton'
wikisql
CREATE TABLE hz_info_mzjzjlb ( JZLSH number, YLJGDM number, mzjzjlb_id number ) 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 t...
SELECT * FROM hz_info JOIN mzjzjlb JOIN jybgb JOIN jyjgzbb JOIN hz_info_mzjzjlb ON hz_info.YLJGDM = hz_info_mzjzjlb.YLJGDM AND hz_info.KH = mzjzjlb.KH AND hz_info.KLX = mzjzjlb.KLX AND hz_info_mzjzjlb.YLJGDM = jybgb.YLJGDM_MZJZJLB AND mzjzjlb.JZLSH = jybgb.JZLSH_MZJZJLB AND jybgb.YLJGDM = jyjgzbb.YLJGDM AND jybgb.BGDH ...
css
CREATE TABLE table_name_85 ( opening VARCHAR, worldwide VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- WHAT IS THE OPENING WITH A WORLDWIDE NUMBER OF $559,852,396?
SELECT opening FROM table_name_85 WHERE worldwide = "$559,852,396"
sql_create_context
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 SUM(t_kc24.PER_ACC_PAY) FROM t_kc24 WHERE t_kc24.t_kc21_PERSON_NM = '范清宁' AND t_kc24.CLINIC_SLT_DATE BETWEEN '2018-09-12' AND '2019-07-01'
css
CREATE TABLE ReviewRejectionReasons ( Id number, Name text, Description text, PostTypeId number ) CREATE TABLE PostHistory ( Id number, PostHistoryTypeId number, PostId number, RevisionGUID other, CreationDate time, UserId number, UserDisplayName text, Comment text, ...
SELECT u.Id AS "user_link", CASE WHEN u.Reputation >= 2500 THEN 'yes' ELSE 'no' END AS "barrier", LastAccessDate FROM Users AS u WHERE 4 < (SELECT SUM(a.Score) FROM Posts AS a, Posts AS q, PostTags AS pt, Tags AS t WHERE u.Id = a.OwnerUserId AND a.PostTypeId = 2 AND q.PostTypeId = 1 AND a.ParentId = q.Id AND q.Id = pt....
sede
CREATE TABLE table_name_90 ( incumbent VARCHAR, results VARCHAR, first_elected VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Who is the incumbent that has been in office since before 1996 and was again re-elected?
SELECT incumbent FROM table_name_90 WHERE results = "re-elected" AND first_elected < 1996
sql_create_context
CREATE TABLE procedures_icd ( row_id number, subject_id number, hadm_id number, icd9_code text, charttime time ) CREATE TABLE admissions ( row_id number, subject_id number, hadm_id number, admittime time, dischtime time, admission_type text, admission_location text, ...
SELECT prescriptions.drug FROM prescriptions WHERE prescriptions.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 15209) AND DATETIME(prescriptions.startdate, 'start of day') = DATETIME(CURRENT_TIME(), 'start of day', '-0 day') EXCEPT SELECT prescriptions.drug FROM prescriptions WHERE...
mimic_iii
CREATE TABLE table_name_21 ( outcome VARCHAR, venue VARCHAR, year VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What was the Outcome of the Danish Open in 1985?
SELECT outcome FROM table_name_21 WHERE venue = "danish open" AND year = "1985"
sql_create_context
CREATE TABLE table_name_87 ( l2_cache VARCHAR, multi_1 VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the L2 cache with a 13.5x multi 1?
SELECT l2_cache FROM table_name_87 WHERE multi_1 = "13.5x"
sql_create_context
CREATE TABLE storm ( Storm_ID int, Name text, Dates_active text, Max_speed int, Damage_millions_USD real, Number_Deaths int ) CREATE TABLE region ( Region_id int, Region_code text, Region_name text ) CREATE TABLE affected_region ( Region_id int, Storm_ID int, Number_cit...
SELECT Name, Damage_millions_USD FROM storm ORDER BY Max_speed DESC
nvbench
CREATE TABLE table_79711 ( "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 average silver has belarus as the nation, with a total less than 1?
SELECT AVG("Silver") FROM table_79711 WHERE "Nation" = 'belarus' AND "Total" < '1'
wikisql
CREATE TABLE table_74701 ( "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 day is the venue the western oval?
SELECT "Date" FROM table_74701 WHERE "Venue" = 'western oval'
wikisql
CREATE TABLE outputevents ( row_id number, subject_id number, hadm_id number, icustay_id number, charttime time, itemid number, value number ) CREATE TABLE prescriptions ( row_id number, subject_id number, hadm_id number, startdate time, enddate time, drug text, ...
SELECT COUNT(*) > 0 FROM chartevents WHERE chartevents.icustay_id IN (SELECT icustays.icustay_id FROM icustays WHERE icustays.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 5828)) AND chartevents.itemid IN (SELECT d_items.itemid FROM d_items WHERE d_items.label = 'heart rate' AND d_...
mimic_iii
CREATE TABLE city ( City_ID int, County_ID int, Name text, White real, Black real, Amerindian real, Asian real, Multiracial real, Hispanic real ) CREATE TABLE county_public_safety ( County_ID int, Name text, Population int, Police_officers int, Residents_per_offi...
SELECT Police_force, COUNT(*) FROM county_public_safety GROUP BY Police_force
nvbench
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 Founder, COUNT(Founder) FROM Products AS T1 JOIN Manufacturers AS T2 ON T1.Manufacturer = T2.Code GROUP BY Founder ORDER BY COUNT(Founder)
nvbench
CREATE TABLE table_28138035_20 ( year_location VARCHAR, womens_doubles VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Where was the tour when jing junhong li jiawei played womens doubles?
SELECT year_location FROM table_28138035_20 WHERE womens_doubles = "Jing Junhong Li Jiawei"
sql_create_context
CREATE TABLE table_15416002_1 ( saffir_simpson_category VARCHAR, name VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the Saffir-Simpson category for the hurricane named Bonnie?
SELECT saffir_simpson_category FROM table_15416002_1 WHERE name = "Bonnie"
sql_create_context
CREATE TABLE table_name_70 ( year VARCHAR, venue VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- In what year did Ilju t enko compete in Barcelona, Spain?
SELECT year FROM table_name_70 WHERE venue = "barcelona, spain"
sql_create_context
CREATE TABLE table_28620 ( "Year" real, "Under-11" text, "Under-13" text, "Under-15" text, "Under-17" text, "Under-19" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is every value for Under-17 if Under-15 is Maria Elena Ubina?
SELECT "Under-17" FROM table_28620 WHERE "Under-15" = 'Maria Elena Ubina'
wikisql
CREATE TABLE table_25550 ( "Year" real, "Dates" text, "Champion" text, "Country" text, "Score" text, "Margin of victory" text, "Tournament location" text, "Purse ( $ )" real, "Winners share ($)" real ) -- Using valid SQLite, answer the following questions for the tables provided ab...
SELECT "Score" FROM table_25550 WHERE "Champion" = 'Jan Stephenson'
wikisql
CREATE TABLE cost ( costid number, uniquepid text, patienthealthsystemstayid number, eventtype text, eventid number, chargetime time, cost number ) CREATE TABLE allergy ( allergyid number, patientunitstayid number, drugname text, allergyname text, allergytime time ) CRE...
SELECT 1 * (STRFTIME('%j', CURRENT_TIME()) - STRFTIME('%j', treatment.treatmenttime)) FROM treatment WHERE treatment.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '006-202970...
eicu
CREATE TABLE table_name_44 ( revenue__ INTEGER, team VARCHAR, rank VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Name the highest revenue for schalke 04 with rank less than 10
SELECT MAX(revenue__) AS $m_ FROM table_name_44 WHERE team = "schalke 04" AND rank < 10
sql_create_context
CREATE TABLE table_42474 ( "Tie no" text, "Home team" text, "Score" text, "Away team" text, "Date" text, "Attendance" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What home team has 8 ties?
SELECT "Home team" FROM table_42474 WHERE "Tie no" = '8'
wikisql
CREATE TABLE table_train_241 ( "id" int, "blood_sugars" int, "c_peptide_level" float, "hemoglobin_a1c_hba1c" float, "glucometer" bool, "creatinine_clearance_cl" float, "symptoms_hypoglycemic_episodes" bool, "hypoglycemia" bool, "hba1c" float, "diabetes" bool, "NOUSE" float ) ...
SELECT * FROM table_train_241 WHERE hypoglycemia = 1 OR (blood_sugars < 54 AND glucometer = 1 AND symptoms_hypoglycemic_episodes = 0)
criteria2sql
CREATE TABLE table_name_89 ( tries_for VARCHAR, tries_against VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the tries for when 52 was the tries against?
SELECT tries_for FROM table_name_89 WHERE tries_against = "52"
sql_create_context
CREATE TABLE admissions ( row_id number, subject_id number, hadm_id number, admittime time, dischtime time, admission_type text, admission_location text, discharge_location text, insurance text, language text, marital_status text, ethnicity text, age number ) CREATE ...
SELECT SUM(prescriptions.dose_val_rx) FROM prescriptions WHERE prescriptions.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 2425) AND prescriptions.drug = 'dorzolamide 2%/timolol 0.5% ophth.' AND DATETIME(prescriptions.startdate) <= DATETIME(CURRENT_TIME(), '-48 month')
mimic_iii
CREATE TABLE Payments ( Payment_ID INTEGER, Settlement_ID INTEGER, Payment_Method_Code VARCHAR(255), Date_Payment_Made DATE, Amount_Payment INTEGER ) CREATE TABLE Customer_Policies ( Policy_ID INTEGER, Customer_ID INTEGER, Policy_Type_Code CHAR(15), Start_Date DATE, End_Date DAT...
SELECT Date_Claim_Settled, COUNT(Date_Claim_Settled) FROM Settlements GROUP BY Date_Claim_Settled ORDER BY Date_Claim_Settled
nvbench
CREATE TABLE table_204_388 ( id number, "#" number, "date" text, "visitor" text, "score" text, "home" text, "record" text, "pts" number ) -- Using valid SQLite, answer the following questions for the tables provided above. -- on december 14 was the home team the chicago black hawks or...
SELECT "home" FROM table_204_388 WHERE "date" = 'december 14'
squall
CREATE TABLE table_name_35 ( date VARCHAR, week VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the date of week 17?
SELECT date FROM table_name_35 WHERE week = 17
sql_create_context
CREATE TABLE Tags ( Id number, TagName text, Count number, ExcerptPostId number, WikiPostId number ) CREATE TABLE ReviewTaskTypes ( Id number, Name text, Description text ) CREATE TABLE PostHistoryTypes ( Id number, Name text ) CREATE TABLE CloseReasonTypes ( Id number, ...
SELECT p.Id AS "post_link", p.Tags FROM Posts AS p INNER JOIN PostTags AS pt ON p.Id = pt.PostId WHERE pt.TagId = 16957 AND EXISTS(SELECT 1 FROM PostTags AS pt2 WHERE pt2.PostId = p.Id AND pt2.TagId NOT IN (930, 1449) HAVING COUNT(*) >= 5)
sede
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 ( subject_id text, hadm_id text, name text, marital_status text, age text, dob text, gender text, ...
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE demographic.days_stay > "34" AND prescriptions.route = "BOTH EYES"
mimicsql_data
CREATE TABLE table_56161 ( "Date" text, "Competition" text, "Venue" text, "Result" text, "Score" text, "Goals" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which result has a Goal of deacon 2/5?
SELECT "Result" FROM table_56161 WHERE "Goals" = 'deacon 2/5'
wikisql
CREATE TABLE hz_info ( KH text, KLX number, RYBH text, YLJGDM text ) CREATE TABLE txmzjzjlb ( HXPLC number, HZXM text, JLSJ time, JZJSSJ time, JZKSBM text, JZKSMC text, JZKSRQ time, JZLSH number, JZZDBM text, JZZDSM text, JZZTDM number, JZZTMC text, K...
SELECT COUNT(*) FROM txmzjzjlb WHERE txmzjzjlb.YLJGDM = '5872925' AND txmzjzjlb.JZKSRQ BETWEEN '2006-10-31' AND '2014-06-19' AND txmzjzjlb.WDBZ > 0 UNION SELECT COUNT(*) FROM ftxmzjzjlb WHERE ftxmzjzjlb.YLJGDM = '5872925' AND ftxmzjzjlb.JZKSRQ BETWEEN '2006-10-31' AND '2014-06-19' AND ftxmzjzjlb.WDBZ > 0
css
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 zyjybgb.JYKSBM, zyjybgb.JYKSMC FROM zyjybgb WHERE zyjybgb.JZLSH = '73994470317' UNION SELECT mzjybgb.JYKSBM, mzjybgb.JYKSMC FROM mzjybgb WHERE mzjybgb.JZLSH = '73994470317'
css
CREATE TABLE table_name_3 ( record VARCHAR, score VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which Record has a Score of w 107 102 (ot)?
SELECT record FROM table_name_3 WHERE score = "w 107–102 (ot)"
sql_create_context
CREATE TABLE table_1592 ( "Character" text, "Indianapolis Concerts" text, "Sarasota" text, "Broadway" text, "Brighton Cast" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Name the indianapolis concerts for paul baker
SELECT "Indianapolis Concerts" FROM table_1592 WHERE "Brighton Cast" = 'Paul Baker'
wikisql
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.department, course.name, course.number FROM course, program_course WHERE program_course.category LIKE '%ULCS%' AND program_course.course_id = course.course_id
advising
CREATE TABLE table_name_12 ( overall_ranking VARCHAR, status VARCHAR, name VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What's the total number of overall rankings of jvnne leow's events that are eliminated?
SELECT COUNT(overall_ranking) FROM table_name_12 WHERE status = "eliminated" AND name = "廖尹宁 jvnne leow"
sql_create_context
CREATE TABLE table_46314 ( "from" text, "aircraft" text, "carrier" text, "air wing" text, "tail code" text, "area" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the air wing for the craft with a tail code of ah-3xx, deployed from 16 Jun...
SELECT "air wing" FROM table_46314 WHERE "area" = 'vietnam war' AND "tail code" = 'ah-3xx' AND "from" = '16 june 1967'
wikisql
CREATE TABLE demographic ( subject_id text, hadm_id text, name text, marital_status text, age text, dob text, gender text, language text, religion text, admission_type text, days_stay text, insurance text, ethnicity text, expire_flag text, admission_location t...
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.gender = "F" AND demographic.ethnicity = "WHITE - RUSSIAN"
mimicsql_data
CREATE TABLE table_name_94 ( starts INTEGER, chassis VARCHAR, finishes VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- what is the average starts when the chassis is focus rs wrc 08 and finishes is more than 27?
SELECT AVG(starts) FROM table_name_94 WHERE chassis = "focus rs wrc 08" AND finishes > 27
sql_create_context
CREATE TABLE table_43374 ( "Ship" text, "Built" real, "Builder" text, "Entered Service for AIDA" text, "Gross Tonnage" text, "Flag" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which Flag did the Ship Aidavita have?
SELECT "Flag" FROM table_43374 WHERE "Ship" = 'aidavita'
wikisql
CREATE TABLE table_20272 ( "No." real, "Date" text, "Tournament" text, "Winning score" text, "To par" text, "Margin of victory" text, "Runner(s)-up" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Name the margin of victory when tournament is...
SELECT "Margin of victory" FROM table_20272 WHERE "Tournament" = 'Algarve Open de Portugal'
wikisql
CREATE TABLE PostLinks ( Id number, CreationDate time, PostId number, RelatedPostId number, LinkTypeId number ) CREATE TABLE CloseReasonTypes ( Id number, Name text, Description text ) CREATE TABLE SuggestedEdits ( Id number, PostId number, CreationDate time, ApprovalDa...
SELECT * FROM Badges INNER JOIN Users ON Users.Id = UserId WHERE Name LIKE '##Badge##' AND Location LIKE '##Location##' AND (AboutMe LIKE '%@%' OR AboutMe LIKE '%gmail%' OR AboutMe LIKE '%yahoo%' OR AboutMe LIKE '%linkedin%' OR AboutMe LIKE '.edu' OR AboutMe LIKE '%github%' OR AboutMe LIKE '%.com' OR AboutMe LIKE '%.or...
sede
CREATE TABLE table_dev_38 ( "id" int, "gender" string, "serum_potassium" float, "systolic_blood_pressure_sbp" int, "creatinine_clearance_cl" float, "estimated_glomerular_filtration_rate_egfr" int, "diastolic_blood_pressure_dbp" int, "ace_inhibitors" bool, "serum_creatinine" float, ...
SELECT * FROM table_dev_38 WHERE kidney_disease = 1 OR (serum_creatinine > 1.3 AND serum_creatinine < 3.3 AND gender = 'female') OR (serum_creatinine > 1.5 AND serum_creatinine < 3.5 AND gender = 'male') OR (estimated_glomerular_filtration_rate_egfr >= 20 AND estimated_glomerular_filtration_rate_egfr <= 60)
criteria2sql
CREATE TABLE table_20273 ( "No." real, "Date" text, "Tournament" text, "Winning score" text, "To par" text, "Margin of victory" text, "Runner(s)-up" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Name the tournament when margin of victory is...
SELECT "Tournament" FROM table_20273 WHERE "Margin of victory" = '3 strokes' AND "Winning score" = '71-66-70-67=274'
wikisql
CREATE TABLE person_info ( CSD text, CSRQ time, GJDM text, GJMC text, JGDM text, JGMC text, MZDM text, MZMC text, RYBH text, XBDM number, XBMC text, XLDM text, XLMC text, XM text, ZYLBDM text, ZYMC text ) CREATE TABLE jybgb ( BBCJBW text, BBDM tex...
SELECT zyjzjlb.ZYZDBM, zyjzjlb.ZYZDMC FROM hz_info JOIN zyjzjlb ON hz_info.YLJGDM = zyjzjlb.YLJGDM AND hz_info.KH = zyjzjlb.KH AND hz_info.KLX = zyjzjlb.KLX WHERE hz_info.RYBH = '11219115'
css
CREATE TABLE table_15329030_1 ( date_of_polls VARCHAR, state VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which dates of polls occur in the Mizoram state?
SELECT date_of_polls FROM table_15329030_1 WHERE state = "Mizoram"
sql_create_context
CREATE TABLE captain ( Captain_ID int, Name text, Ship_ID int, age text, Class text, Rank text ) CREATE TABLE Ship ( Ship_ID int, Name text, Type text, Built_Year real, Class text, Flag text ) -- Using valid SQLite, answer the following questions for the tables provide...
SELECT Rank, COUNT(*) FROM captain GROUP BY Rank
nvbench
CREATE TABLE table_name_21 ( team_2 VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the 1st leg of Team 2 PSV Eindhoven?
SELECT 1 AS st_leg FROM table_name_21 WHERE team_2 = "psv eindhoven"
sql_create_context
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 t3.labname FROM (SELECT t2.labname, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM (SELECT patient.uniquepid, treatment.treatmenttime FROM treatment JOIN patient ON treatment.patientunitstayid = patient.patientunitstayid WHERE treatment.treatmentname = 'vasodilating agent - iv - labetalol' AND DATETIME(tr...
eicu
CREATE TABLE table_58043 ( "Outcome" text, "Date" real, "Tournament" text, "Surface" text, "Partner" text, "Opponents in the final" text, "Score in the final" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Who is the partner in the final wit...
SELECT "Partner" FROM table_58043 WHERE "Score in the final" = '2–6, 7–6, 7–6'
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 All_Neutral, ACC_Percent FROM basketball_match ORDER BY ACC_Percent
nvbench
CREATE TABLE transfers ( row_id number, subject_id number, hadm_id number, icustay_id number, eventtype text, careunit text, wardid number, intime time, outtime time ) CREATE TABLE diagnoses_icd ( row_id number, subject_id number, hadm_id number, icd9_code text, ...
SELECT COUNT(*) > 0 FROM microbiologyevents WHERE microbiologyevents.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 61751) AND microbiologyevents.spec_type_desc = 'bile' AND DATETIME(microbiologyevents.charttime, 'start of month') = DATETIME(CURRENT_TIME(), 'start of month', '-1 mon...
mimic_iii
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 demographic.insurance FROM demographic WHERE demographic.subject_id = "26285"
mimicsql_data