instruction
stringlengths
151
7.46k
output
stringlengths
2
4.44k
source
stringclasses
26 values
CREATE TABLE table_20007413_3 ( torque VARCHAR, year VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Name the torque for 1986
SELECT torque FROM table_20007413_3 WHERE year = "1986"
sql_create_context
CREATE TABLE diagnoses ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) CREATE TABLE prescriptions ( subject_id text, hadm_id text, icustay_id text, drug_type text, drug text, formulary_drug_cd text, route text, drug_dose text ) C...
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.insurance = "Private" AND demographic.age < "30"
mimicsql_data
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 Affiliation, SUM(Enrollment) FROM university GROUP BY Affiliation
nvbench
CREATE TABLE table_1965650_2 ( college_junior_club_team VARCHAR, player VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Name the college/junior club team for jimmy jones
SELECT college_junior_club_team FROM table_1965650_2 WHERE player = "Jimmy Jones"
sql_create_context
CREATE TABLE table_4645 ( "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 away team plays at Arden Street Oval?
SELECT "Away team" FROM table_4645 WHERE "Venue" = 'arden street oval'
wikisql
CREATE TABLE table_name_25 ( total INTEGER, silver VARCHAR, bronze VARCHAR, gold VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What's the total with silver being less than 0, less than 1 gold, and 3 bronze?
SELECT SUM(total) FROM table_name_25 WHERE bronze = 3 AND gold < 1 AND silver < 0
sql_create_context
CREATE TABLE table_7144 ( "Season" real, "Overall" real, "Slalom" text, "Super G" real, "Downhill" text, "Combined" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the combined of the overalls less than 34?
SELECT "Combined" FROM table_7144 WHERE "Overall" < '34'
wikisql
CREATE TABLE jyjgzbb ( BGDH text, BGRQ time, CKZFWDX text, CKZFWSX number, CKZFWXX number, JCFF text, JCRGH text, JCRXM text, JCXMMC text, JCZBDM text, JCZBJGDL number, JCZBJGDW text, JCZBJGDX text, JCZBMC text, JLDW text, JYRQ time, JYZBLSH text, ...
SELECT jyjgzbb.JCZBJGDL, jyjgzbb.JCZBJGDW 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 ...
css
CREATE TABLE table_31513 ( "Townland" text, "Area( acres )" real, "Barony" text, "Civil parish" text, "Poor law union" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the acreage of the Maghereen in the civil parish of Macroom?
SELECT COUNT("Area( acres )") FROM table_31513 WHERE "Civil parish" = 'Macroom' AND "Townland" = 'Maghereen'
wikisql
CREATE TABLE table_52839 ( "Week" real, "Date" text, "Opponent" text, "Result" text, "Game site" text, "Attendance" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- I want the result for week larger than 10 for opponent of new england patriots
SELECT "Result" FROM table_52839 WHERE "Week" > '10' AND "Opponent" = 'new england patriots'
wikisql
CREATE TABLE diagnoses ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) CREATE TABLE prescriptions ( subject_id text, hadm_id text, icustay_id text, drug_type text, drug text, formulary_drug_cd text, route text, drug_dose text ) C...
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.discharge_location = "SNF" AND demographic.admityear < "2146"
mimicsql_data
CREATE TABLE Bookings ( Booking_ID INTEGER, Customer_ID INTEGER, Workshop_Group_ID VARCHAR(100), Status_Code CHAR(15), Store_ID INTEGER, Order_Date DATETIME, Planned_Delivery_Date DATETIME, Actual_Delivery_Date DATETIME, Other_Order_Details VARCHAR(255) ) CREATE TABLE Order_Items ( ...
SELECT Service_Type_Description, COUNT(Service_Type_Description) FROM Ref_Service_Types AS T1 JOIN Services AS T2 ON T1.Service_Type_Code = T2.Service_Type_Code WHERE T2.Product_Price > 100 GROUP BY Service_Type_Description ORDER BY Service_Type_Description DESC
nvbench
CREATE TABLE diagnosis ( diagnosisid number, patientunitstayid number, diagnosisname text, diagnosistime time, icd9code text ) CREATE TABLE vitalperiodic ( vitalperiodicid number, patientunitstayid number, temperature number, sao2 number, heartrate number, respiration number...
SELECT vitalperiodic.observationtime FROM vitalperiodic WHERE vitalperiodic.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '021-25705')) AND NOT vitalperiodic.sao2 IS NULL AND...
eicu
CREATE TABLE table_24910737_1 ( written_by VARCHAR, us_viewers__millions_ VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Who wrote the episodes that had a viewership of 7.14?
SELECT written_by FROM table_24910737_1 WHERE us_viewers__millions_ = "7.14"
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 lab ( subject_id text, hadm_id text, itemid text, charttime text, flag text, value_unit text,...
SELECT demographic.gender, demographic.admission_location FROM demographic WHERE demographic.name = "Gwendolyn Hager"
mimicsql_data
CREATE TABLE hz_info ( KH text, KLX number, RYBH text, YLJGDM text ) CREATE TABLE zzmzjzjlb ( 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(hz_info.RYBH) FROM hz_info JOIN zzmzjzjlb ON hz_info.YLJGDM = zzmzjzjlb.YLJGDM AND hz_info.KH = zzmzjzjlb.KH AND hz_info.KLX = zzmzjzjlb.KLX WHERE zzmzjzjlb.ZZYSGH = '22158304' AND zzmzjzjlb.JZKSRQ BETWEEN '2003-05-25' AND '2013-08-20' UNION SELECT COUNT(hz_info.RYBH) FROM hz_info JOIN fzzmzjzjlb ON hz_inf...
css
CREATE TABLE PendingFlags ( Id number, FlagTypeId number, PostId number, CreationDate time, CloseReasonTypeId number, CloseAsOffTopicReasonTypeId number, DuplicateOfQuestionId number, BelongsOnBaseHostAddress text ) CREATE TABLE SuggestedEditVotes ( Id number, SuggestedEditId nu...
SELECT COUNT(Users.Id) FROM Users WHERE Users.Reputation >= 3000 AND MONTH(Users.LastAccessDate) = MONTH(CURRENT_TIMESTAMP()) AND YEAR(Users.LastAccessDate) = YEAR(CURRENT_TIMESTAMP())
sede
CREATE TABLE table_68826 ( "Date" text, "Location" text, "Nature of incident" text, "Circumstances" text, "Casualties" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the nature of the incident in Kabul on 2004-01-28?
SELECT "Nature of incident" FROM table_68826 WHERE "Location" = 'kabul' AND "Date" = '2004-01-28'
wikisql
CREATE TABLE jybgb ( BBCJBW text, BBDM text, BBMC text, BBZT number, BGDH text, BGJGDM text, BGJGMC text, BGRGH text, BGRQ time, BGRXM text, BGSJ time, CJRQ time, JSBBRQSJ time, JSBBSJ time, JYBBH text, JYJGMC text, JYJSGH text, JYJSQM text, JY...
SELECT mzjzjlb.JZLSH FROM person_info JOIN hz_info JOIN mzjzjlb JOIN hz_info_mzjzjlb ON person_info.RYBH = hz_info.RYBH AND hz_info.YLJGDM = hz_info_mzjzjlb.YLJGDM AND hz_info.KH = mzjzjlb.KH AND hz_info.KLX = mzjzjlb.KLX AND hz_info_mzjzjlb.JZLSH = mzjzjlb.JZLSH AND hz_info_mzjzjlb.YLJGDM = hz_info_mzjzjlb.YLJGDM AND ...
css
CREATE TABLE PendingFlags ( Id number, FlagTypeId number, PostId number, CreationDate time, CloseReasonTypeId number, CloseAsOffTopicReasonTypeId number, DuplicateOfQuestionId number, BelongsOnBaseHostAddress text ) CREATE TABLE CloseAsOffTopicReasonTypes ( Id number, IsUniversa...
SELECT TIME_TO_STR(CreationDate, '%I') AS Hours, COUNT(*) AS Total FROM Posts WHERE Posts.Tags LIKE '%a%' GROUP BY TIME_TO_STR(CreationDate, '%I')
sede
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, city_code VARCHAR(3) ) CREATE TABLE Has_Allergy ( StuID INTEGE...
SELECT Sex, AVG(Age) FROM Student GROUP BY Sex
nvbench
CREATE TABLE table_train_230 ( "id" int, "anemia" bool, "diabetic" string, "lactose_intolerance" bool, "hb" float, "body_mass_index_bmi" float, "NOUSE" float ) -- Using valid SQLite, answer the following questions for the tables provided above. -- diagnosis of type ii diabetes.
SELECT * FROM table_train_230 WHERE diabetic = 'ii'
criteria2sql
CREATE TABLE geographic ( city_name varchar, county varchar, region varchar ) CREATE TABLE restaurant ( id int, name varchar, food_type varchar, city_name varchar, rating "decimal ) CREATE TABLE location ( restaurant_id int, house_number int, street_name varchar, city_n...
SELECT location.house_number, restaurant.name FROM location, restaurant WHERE location.city_name = 'mountain view' AND restaurant.food_type = 'arabic' AND restaurant.id = location.restaurant_id AND restaurant.rating > 2.5
restaurants
CREATE TABLE table_74471 ( "Townland" text, "Area( acres )" real, "Barony" text, "Civil parish" text, "Poor law union" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the maximum area (in acres) of the Knockacullen townland?
SELECT MAX("Area( acres )") FROM table_74471 WHERE "Townland" = 'Knockacullen'
wikisql
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_NM = '王傲冬' AND t_kc22.STA_DATE BETWEEN '2004-09-08' AND '2020-02-21' AND t_kc22.MED_INV_ITEM_TYPE = '检查费' UNION SELECT COUNT(*) FROM fgwyjzb JOIN t_kc22 ON fgwyjzb.MED_CLINIC_ID = t_kc22.MED_CLINIC_ID WHERE fgwyjz...
css
CREATE TABLE table_37642 ( "Location (State, City)" text, "USN 2013" real, "BW 2013" real, "Forbes 2011" real, "Ec 2013" real, "FT 2011" real, "AE 2011" real, "CNN 2011" real, "BI 2013" real, "ARWU 2012" real ) -- Using valid SQLite, answer the following questions for the table...
SELECT "BW 2013" FROM table_37642 WHERE "ARWU 2012" > '51' AND "Location (State, City)" = 'washington, d.c.'
wikisql
CREATE TABLE table_name_58 ( capacity INTEGER, team VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the sum of Capacity, when Team is 'Denizlispor'?
SELECT SUM(capacity) FROM table_name_58 WHERE team = "denizlispor"
sql_create_context
CREATE TABLE table_54577 ( "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 large is the crowd with an Away team score o...
SELECT COUNT("Crowd") FROM table_54577 WHERE "Away team score" = '7.13 (55)'
wikisql
CREATE TABLE table_1342198_18 ( first_elected INTEGER, district VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- what is the minimum number first elected to district louisiana 5?
SELECT MIN(first_elected) FROM table_1342198_18 WHERE district = "Louisiana 5"
sql_create_context
CREATE TABLE table_203_758 ( id number, "no." number, "dub no." number, "english dubbed title / english subbed title\noriginal japanese title" text, "original air date" text, "english air date" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- how ...
SELECT COUNT("english dubbed title / english subbed title\noriginal japanese title") FROM table_203_758 WHERE "english air date" = 10
squall
CREATE TABLE table_name_69 ( team_1 VARCHAR, team_2 VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the Team 1 with a Team 2 with brest hc meshkov?
SELECT team_1 FROM table_name_69 WHERE team_2 = "brest hc meshkov"
sql_create_context
CREATE TABLE table_24987 ( "Year" real, "Date" text, "Driver" text, "Team" text, "Manufacturer" text, "Laps" text, "Miles (km)" text, "Race Time" text, "Average Speed (mph)" text, "Report" text ) -- Using valid SQLite, answer the following questions for the tables provided abov...
SELECT COUNT("Driver") FROM table_24987 WHERE "Manufacturer" = 'Toyota'
wikisql
CREATE TABLE trip ( id INTEGER, duration INTEGER, start_date TEXT, start_station_name TEXT, start_station_id INTEGER, end_date TEXT, end_station_name TEXT, end_station_id INTEGER, bike_id INTEGER, subscription_type TEXT, zip_code INTEGER ) CREATE TABLE weather ( date TEX...
SELECT date, COUNT(date) FROM weather WHERE min_dew_point_f < (SELECT MIN(min_dew_point_f) FROM weather WHERE zip_code = 94107)
nvbench
CREATE TABLE lab ( labid number, patientunitstayid number, labname text, labresult number, labresulttime time ) CREATE TABLE intakeoutput ( intakeoutputid number, patientunitstayid number, cellpath text, celllabel text, cellvaluenumeric number, intakeoutputtime time ) CREAT...
SELECT lab.labresulttime FROM lab WHERE lab.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '017-64510')) AND lab.labname = 'bedside glucose' AND STRFTIME('%y-%m', lab.labresul...
eicu
CREATE TABLE table_22736523_1 ( result VARCHAR, week__number VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- For week of top 9, what were the results?
SELECT result FROM table_22736523_1 WHERE week__number = "Top 9"
sql_create_context
CREATE TABLE table_75458 ( "High School" text, "Location" text, "Founded" real, "Affiliation" text, "Enrollment" real, "Nickname" text, "Division" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What High School with a nickname of S Eagle has...
SELECT "High School" FROM table_75458 WHERE "Division" = 'crest' AND "Nickname" = 's eagle'
wikisql
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 diagnoses ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) C...
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.discharge_location = "HOME HEALTH CARE" AND procedures.long_title = "Circumcision"
mimicsql_data
CREATE TABLE table_75191 ( "Surname" text, "First" text, "D.O.B." text, "Uni#" real, "Bats" text, "Throws" text, "Position" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which Uni # has a Surname of ough?
SELECT "Uni#" FROM table_75191 WHERE "Surname" = 'ough'
wikisql
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 COUNT(DISTINCT PERSON_ID) FROM t_kc21 WHERE IN_DIAG_DIS_NM = '儿童孤独症'
css
CREATE TABLE table_11715 ( "Week" real, "Date" text, "Opponent" text, "Result" text, "Attendance" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which Attendance has a Date of november 18, 1951?
SELECT "Attendance" FROM table_11715 WHERE "Date" = 'november 18, 1951'
wikisql
CREATE TABLE table_28368 ( "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 is the title of the episode written by daniel s...
SELECT "Title" FROM table_28368 WHERE "Directed by" = 'Daniel Sackheim'
wikisql
CREATE TABLE table_11875915_2 ( gt2_winning_team VARCHAR, gt3_winning_team VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Who was the GT2 winning team when the GT3 winning team was #1 PTG?
SELECT gt2_winning_team FROM table_11875915_2 WHERE gt3_winning_team = "#1 PTG"
sql_create_context
CREATE TABLE table_204_647 ( id number, "year" number, "film" text, "role" text, "language" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- how many films are in telugu ?
SELECT COUNT("film") FROM table_204_647 WHERE "language" = 'telugu'
squall
CREATE TABLE table_9469 ( "Date" text, "Home" text, "Score" text, "Away" text, "Attendance" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which Attendance has an Away of real juventud?
SELECT SUM("Attendance") FROM table_9469 WHERE "Away" = 'real juventud'
wikisql
CREATE TABLE code_description ( code varchar, description text ) CREATE TABLE city ( city_code varchar, city_name varchar, state_code varchar, country_name varchar, time_zone_code varchar ) CREATE TABLE flight_fare ( flight_id int, fare_id int ) CREATE TABLE food_service ( mea...
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 = 'BOSTON' AND CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_...
atis
CREATE TABLE table_18662026_1 ( parallel_bars VARCHAR, rings VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- If the rings are 60.500, what is the parallel bars number?
SELECT parallel_bars FROM table_18662026_1 WHERE rings = "60.500"
sql_create_context
CREATE TABLE t_kc21_t_kc22 ( MED_CLINIC_ID text, MED_EXP_DET_ID number ) 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, H...
SELECT t_kc21.MED_ORG_DEPT_CD, t_kc21.OUT_DIAG_DIS_NM, AVG(t_kc21.PERSON_AGE) FROM t_kc21 WHERE t_kc21.MED_SER_ORG_NO = '4355063' GROUP BY t_kc21.MED_ORG_DEPT_CD, t_kc21.OUT_DIAG_DIS_NM
css
CREATE TABLE vitalperiodic ( vitalperiodicid number, patientunitstayid number, temperature number, sao2 number, heartrate number, respiration number, systemicsystolic number, systemicdiastolic number, systemicmean number, observationtime time ) CREATE TABLE diagnosis ( diagn...
SELECT diagnosis.diagnosisname FROM diagnosis WHERE diagnosis.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '025-51980')) AND STRFTIME('%y', diagnosis.diagnosistime) = '2105'...
eicu
CREATE TABLE table_53784 ( "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 date of the game where Geelong was ...
SELECT "Date" FROM table_53784 WHERE "Home team" = 'geelong'
wikisql
CREATE TABLE table_52107 ( "Driver" text, "Car #" real, "Make" text, "Points" text, "Laps" real, "Winnings" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the highest number of laps completed by driver Joe Nemechek?
SELECT MAX("Laps") FROM table_52107 WHERE "Driver" = 'joe nemechek'
wikisql
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 prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE prescriptions.route = "BOTH EYES"
mimicsql_data
CREATE TABLE table_203_648 ( id number, "date" text, "opposition" text, "result" text, "score" text, "brazil scorers" text, "competition" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- what is the number of countries they have played ?
SELECT COUNT(DISTINCT "opposition") FROM table_203_648
squall
CREATE TABLE inst ( instid number, name text, country text ) CREATE TABLE papers ( paperid number, title text ) CREATE TABLE authorship ( authid number, instid number, paperid number, authorder number ) CREATE TABLE authors ( authid number, lname text, fname text ) -...
SELECT DISTINCT t3.name FROM authors AS t1 JOIN authorship AS t2 ON t1.authid = t2.authid JOIN inst AS t3 ON t2.instid = t3.instid WHERE t1.fname = "Matthias" AND t1.lname = "Blume"
spider
CREATE TABLE table_name_27 ( set_3 VARCHAR, total VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the Set 3 when the Total was 98 - 92?
SELECT set_3 FROM table_name_27 WHERE total = "98 - 92"
sql_create_context
CREATE TABLE chartevents ( row_id number, subject_id number, hadm_id number, icustay_id number, itemid number, charttime time, valuenum number, valueuom text ) CREATE TABLE outputevents ( row_id number, subject_id number, hadm_id number, icustay_id number, charttime ...
SELECT 24 * (STRFTIME('%j', CURRENT_TIME()) - STRFTIME('%j', inputevents_cv.charttime)) FROM inputevents_cv WHERE inputevents_cv.icustay_id IN (SELECT icustays.icustay_id FROM icustays WHERE icustays.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 12775) AND icustays.outtime IS NULL)...
mimic_iii
CREATE TABLE table_30869 ( "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 player is pick 64?
SELECT "Player" FROM table_30869 WHERE "Pick #" = '64'
wikisql
CREATE TABLE table_8636 ( "Game" real, "Date" text, "Team" text, "Score" text, "High points" text, "High rebounds" text, "High assists" text, "Location Attendance" text, "Record" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Can you...
SELECT "Score" FROM table_8636 WHERE "Game" = '40'
wikisql
CREATE TABLE table_76033 ( "Tournament" text, "Wins" real, "Top-25" real, "Events" real, "Cuts made" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the Wins of the Top-25 of 1 and 7 Events?
SELECT "Wins" FROM table_76033 WHERE "Top-25" = '1' AND "Events" = '7'
wikisql
CREATE TABLE table_test_26 ( "id" int, "bleeding" int, "left_ventricular_ejection_fraction_lvef" int, "left_main_coronary_artery_disease" bool, "uncontrolled_diabetes" bool, "hiv_infection" bool, "hemoglobin_a1c_hba1c" float, "hepatitis_b_infection" bool, "renal_disease" bool, "u...
SELECT * FROM table_test_26 WHERE unprotected_left_main_disease = 1 OR stenosis >= 50
criteria2sql
CREATE TABLE chartevents ( row_id number, subject_id number, hadm_id number, icustay_id number, itemid number, charttime time, valuenum number, valueuom text ) CREATE TABLE d_items ( row_id number, itemid number, label text, linksto text ) CREATE TABLE procedures_icd ( ...
SELECT 24 * (STRFTIME('%j', CURRENT_TIME()) - STRFTIME('%j', diagnoses_icd.charttime)) FROM diagnoses_icd WHERE diagnoses_icd.icd9_code = (SELECT d_icd_diagnoses.icd9_code FROM d_icd_diagnoses WHERE d_icd_diagnoses.short_title = 'crnry athrscl natve vssl') AND diagnoses_icd.hadm_id IN (SELECT admissions.hadm_id FROM ad...
mimic_iii
CREATE TABLE table_name_27 ( genre VARCHAR, airing_date VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which genre aired on 12 feb- 9 mar?
SELECT genre FROM table_name_27 WHERE airing_date = "12 feb- 9 mar"
sql_create_context
CREATE TABLE table_15095 ( "Date" text, "Opponent" text, "Score" text, "Loss" text, "Attendance" real, "Record" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What was the record of the game that went 3-5?
SELECT "Record" FROM table_15095 WHERE "Score" = '3-5'
wikisql
CREATE TABLE Video_games ( gtype VARCHAR, gname VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the type of video game Call of Destiny.
SELECT gtype FROM Video_games WHERE gname = "Call of Destiny"
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 prescriptions.route FROM prescriptions WHERE prescriptions.drug = "CefePIME"
mimicsql_data
CREATE TABLE table_17307 ( "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. -- What d...
SELECT "Date" FROM table_17307 WHERE "Score" = 'L 88–79'
wikisql
CREATE TABLE table_name_45 ( solo VARCHAR, sacks VARCHAR, team VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the total value for Solo, when the value of Sacks is 2, and when the Team is New York Jets?
SELECT COUNT(solo) FROM table_name_45 WHERE sacks = 2 AND team = "new york jets"
sql_create_context
CREATE TABLE airports ( city VARCHAR, country VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- How many different cities do have some airport in the country of Greenland?
SELECT COUNT(DISTINCT city) FROM airports WHERE country = 'Greenland'
sql_create_context
CREATE TABLE driverstandings ( driverid VARCHAR, position VARCHAR, wins VARCHAR ) CREATE TABLE drivers ( forename VARCHAR, driverid VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Find all the forenames of distinct drivers who was in position 1 a...
SELECT DISTINCT T1.forename FROM drivers AS T1 JOIN driverstandings AS T2 ON T1.driverid = T2.driverid WHERE T2.position = 1 AND T2.wins = 1
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 "attendance" FROM table_203_114 ORDER BY id DESC LIMIT 1
squall
CREATE TABLE table_name_74 ( chassis VARCHAR, points VARCHAR, entrant VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What was the chassis when the points were greater than 0 and the entrant was March Engineering?
SELECT chassis FROM table_name_74 WHERE points > 0 AND entrant = "march engineering"
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 procedures ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) CREATE TABLE demographic ...
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.religion = "JEHOVAH'S WITNESS" AND demographic.age < "59"
mimicsql_data
CREATE TABLE patient ( uniquepid text, patienthealthsystemstayid number, patientunitstayid number, gender text, age text, ethnicity text, hospitalid number, wardid number, admissionheight number, admissionweight number, dischargeweight number, hospitaladmittime time, ...
SELECT patient.hospitaladmittime FROM patient WHERE patient.uniquepid = '002-54808' AND STRFTIME('%y', patient.hospitaladmittime) <= '2104' ORDER BY patient.hospitaladmittime LIMIT 1
eicu
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 zyjzjlb ( CYBQDM text, CYBQMC...
SELECT wdmzjzjlb.JZZTDM, wdmzjzjlb.JZZTMC FROM wdmzjzjlb WHERE wdmzjzjlb.JZLSH = '34349699182' UNION SELECT bdmzjzjlb.JZZTDM, bdmzjzjlb.JZZTMC FROM bdmzjzjlb WHERE bdmzjzjlb.JZLSH = '34349699182'
css
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 employees ( EMPLOYEE_ID decimal(6,0), FIRST_NAME varchar(20), LAST_NAME varchar(25), EMAIL varchar(25), PHONE_NUMBER varchar(20), ...
SELECT DEPARTMENT_NAME, COUNT(*) FROM employees AS T1 JOIN departments AS T2 ON T1.DEPARTMENT_ID = T2.DEPARTMENT_ID GROUP BY DEPARTMENT_NAME ORDER BY DEPARTMENT_NAME
nvbench
CREATE TABLE table_name_26 ( crowd VARCHAR, away_team VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- How large was the crowd when Carlton was the away team?
SELECT COUNT(crowd) FROM table_name_26 WHERE away_team = "carlton"
sql_create_context
CREATE TABLE person_info ( RYBH text, XBDM number, XBMC text, XM text, CSRQ time, CSD text, MZDM text, MZMC text, GJDM text, GJMC text, JGDM text, JGMC text, XLDM text, XLMC text, ZYLBDM text, ZYMC text ) CREATE TABLE zyjzjlb ( YLJGDM text, JZLSH ...
SELECT zyjzjlb.JZLSH FROM person_info JOIN hz_info JOIN zyjzjlb ON person_info.RYBH = hz_info.RYBH AND hz_info.YLJGDM = zyjzjlb.YLJGDM AND hz_info.KH = zyjzjlb.KH AND hz_info.KLX = zyjzjlb.KLX WHERE person_info.XM = '水幼安' AND NOT zyjzjlb.JZLSH IN (SELECT JZLSH FROM jybgb WHERE BGRQ >= '2004-09-08')
css
CREATE TABLE manufacturers ( name VARCHAR, revenue INTEGER ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Find the total revenue for each manufacturer.
SELECT SUM(revenue), name FROM manufacturers GROUP BY name
sql_create_context
CREATE TABLE jybgb ( BBCJBW text, BBDM text, BBMC text, BBZT number, BGDH text, BGJGDM text, BGJGMC text, BGRGH text, BGRQ time, BGRXM text, BGSJ time, CJRQ time, JSBBRQSJ time, JSBBSJ time, JYBBH text, JYJGMC text, JYJSGH text, JYJSQM text, JY...
SELECT COUNT(*) FROM zzmzjzjlb WHERE zzmzjzjlb.YLJGDM = '0533965' AND zzmzjzjlb.JZKSRQ BETWEEN '2008-07-19' AND '2011-06-29' AND zzmzjzjlb.WDBZ > 0 UNION SELECT COUNT(*) FROM fzzmzjzjlb WHERE fzzmzjzjlb.YLJGDM = '0533965' AND fzzmzjzjlb.JZKSRQ BETWEEN '2008-07-19' AND '2011-06-29' AND fzzmzjzjlb.WDBZ > 0
css
CREATE TABLE table_26200084_1 ( production_code VARCHAR, rank__week_ VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What was the production code of the episode ranked 28?
SELECT production_code FROM table_26200084_1 WHERE rank__week_ = "28"
sql_create_context
CREATE TABLE table_name_60 ( governments VARCHAR, party VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which goverment had a party of yisrael beiteinu?
SELECT governments FROM table_name_60 WHERE party = "yisrael beiteinu"
sql_create_context
CREATE TABLE table_13994 ( "Medal" text, "Name" text, "Sport" text, "Event" text, "Date" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the earliest date for the bronze medal?
SELECT MIN("Date") FROM table_13994 WHERE "Medal" = 'bronze'
wikisql
CREATE TABLE table_name_37 ( year INTEGER, isbn VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What Year has an ISBN OF ISBN 4-06-182042-7?
SELECT AVG(year) FROM table_name_37 WHERE isbn = "isbn 4-06-182042-7"
sql_create_context
CREATE TABLE table_name_74 ( ast_avg INTEGER, total_assists VARCHAR, games VARCHAR, rank VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- WHAT IS THE AVG AST FOR GAMES LARGER THAN 101, RANK 5, TOTAL ASSISTS SMALLER THAN 331?
SELECT AVG(ast_avg) FROM table_name_74 WHERE games > 101 AND rank = 5 AND total_assists < 331
sql_create_context
CREATE TABLE table_name_62 ( frequency VARCHAR, magazine_run VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the frequency for the magazine that runs September 2, 2010?
SELECT frequency FROM table_name_62 WHERE magazine_run = "september 2, 2010"
sql_create_context
CREATE TABLE table_name_18 ( opponent VARCHAR, record VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Who was the opponent when the Seattle Seahawks had a record of 0-1?
SELECT opponent FROM table_name_18 WHERE record = "0-1"
sql_create_context
CREATE TABLE table_40994 ( "Position" real, "Team" text, "Points" real, "Played" real, "Drawn" real, "Lost" real, "Against" real, "Difference" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What's the number of losses where played was le...
SELECT COUNT("Lost") FROM table_40994 WHERE "Played" < '17'
wikisql
CREATE TABLE table_58701 ( "Game" text, "Date" text, "Home Team" text, "Result" text, "Road Team" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which Result that is on june 5?
SELECT "Result" FROM table_58701 WHERE "Date" = 'june 5'
wikisql
CREATE TABLE table_47514 ( "Place" text, "Player" text, "Country" text, "Score" text, "To par" text, "Money ( $ )" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What was the country of the player at +5?
SELECT "Country" FROM table_47514 WHERE "To par" = '+5'
wikisql
CREATE TABLE table_62205 ( "Date From" text, "Date To" text, "Pos." text, "Name" text, "Moving To" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- When was james chester loaned out until ?
SELECT "Date To" FROM table_62205 WHERE "Name" = 'james chester'
wikisql
CREATE TABLE jybgb ( BBCJBW text, BBDM text, BBMC text, BBZT number, BGDH text, BGJGDM text, BGJGMC text, BGRGH text, BGRQ time, BGRXM text, BGSJ time, CJRQ time, JSBBRQSJ time, JSBBSJ time, JYBBH text, JYJGMC text, JYJSGH text, JYJSQM text, JY...
SELECT jybgb.BGDH FROM hz_info JOIN mzjzjlb JOIN jybgb 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 WHERE hz_info.RYBH = '28140515' AND NOT jybgb.BGDH IN (SELECT jyjgzbb.BGDH FROM jyjgzbb WH...
css
CREATE TABLE Companies ( id int, name text, Headquarters text, Industry text, Sales_billion real, Profits_billion real, Assets_billion real, Market_Value_billion text ) CREATE TABLE Office_locations ( building_id int, company_id int, move_in_year int ) CREATE TABLE building...
SELECT T2.name, COUNT(T2.name) FROM Office_locations AS T1 JOIN buildings AS T2 ON T1.building_id = T2.id JOIN Companies AS T3 ON T1.company_id = T3.id GROUP BY T2.name ORDER BY T2.name DESC
nvbench
CREATE TABLE flight_fare ( flight_id int, fare_id int ) CREATE TABLE days ( days_code varchar, day_name varchar ) CREATE TABLE restriction ( restriction_code text, advance_purchase int, stopovers text, saturday_stay_required text, minimum_stay int, maximum_stay int, applica...
SELECT DISTINCT ground_service.transport_type FROM airport, airport_service, city, ground_service WHERE airport.airport_code = airport_service.airport_code AND city.city_code = airport_service.city_code AND city.city_name = 'BALTIMORE' AND ground_service.airport_code = airport.airport_code
atis
CREATE TABLE job_history ( employee_id number, start_date time, end_date time, job_id text, department_id number ) CREATE TABLE employees ( employee_id number, first_name text, last_name text, email text, phone_number text, hire_date time, job_id text, salary number,...
SELECT DISTINCT department_id FROM employees GROUP BY department_id, manager_id HAVING COUNT(employee_id) >= 4
spider
CREATE TABLE table_1341577_43 ( result VARCHAR, candidates VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What was the results for the candidates listed as bart gordon (d) 76.5% wallace embry (r) 23.5%?
SELECT result FROM table_1341577_43 WHERE candidates = "Bart Gordon (D) 76.5% Wallace Embry (R) 23.5%"
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 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 WHERE demographic.discharge_location = "SHORT TERM HOSPITAL" AND demographic.age < "68"
mimicsql_data
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_kc21.PERSON_NM, t_kc21.PERSON_SEX, t_kc21.PERSON_AGE, t_kc21.IDENTITY_CARD FROM t_kc21 WHERE t_kc21.MED_CLINIC_ID = '96681951393'
css
CREATE TABLE jobs ( job_id int, job_title varchar, description varchar, requirement varchar, city varchar, state varchar, country varchar, zip int ) CREATE TABLE program ( program_id int, name varchar, college varchar, introduction varchar ) CREATE TABLE requirement ( ...
SELECT DISTINCT instructor.name FROM course, course_offering, instructor, offering_instructor WHERE course.course_id = course_offering.course_id AND course.department = 'STATS' AND course.number = 550 AND offering_instructor.instructor_id = instructor.instructor_id AND offering_instructor.offering_id = course_offering....
advising
CREATE TABLE table_74859 ( "Tournament" text, "Wins" real, "Top-5" real, "Top-10" real, "Top-25" real, "Events" real, "Cuts made" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- How many vuts made for a player with 2 wins and under 7 top 5s?
SELECT AVG("Cuts made") FROM table_74859 WHERE "Wins" = '2' AND "Top-5" < '7'
wikisql
CREATE TABLE table_name_25 ( season VARCHAR, runs VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What season were the runs 310/9?
SELECT season FROM table_name_25 WHERE runs = "310/9"
sql_create_context
CREATE TABLE table_37641 ( "Date" text, "Visitor" text, "Score" text, "Home" text, "Decision" text, "Attendance" real, "Record" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What was the decision on November 26?
SELECT "Decision" FROM table_37641 WHERE "Date" = 'november 26'
wikisql