instruction
stringlengths
151
7.46k
output
stringlengths
2
4.44k
source
stringclasses
26 values
CREATE TABLE table_name_80 ( date VARCHAR, score VARCHAR, home VARCHAR, venue VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What date were Romania at Home at the Bucharest Venue with a Score of 13-19?
SELECT date FROM table_name_80 WHERE home = "romania" AND venue = "bucharest" AND score = "13-19"
sql_create_context
CREATE TABLE film ( film_id number, rank_in_series number, number_in_season number, title text, directed_by text, original_air_date text, production_code text ) CREATE TABLE schedule ( cinema_id number, film_id number, date text, show_times_per_day number, price number )...
SELECT location FROM cinema WHERE capacity > 300 GROUP BY location HAVING COUNT(*) > 1
spider
CREATE TABLE t_kc22 ( AMOUNT number, CHA_ITEM_LEV number, DATA_ID text, DIRE_TYPE number, DOSE_FORM text, DOSE_UNIT text, EACH_DOSAGE text, EXP_OCC_DATE time, FLX_MED_ORG_ID text, FXBZ number, HOSP_DOC_CD text, HOSP_DOC_NM text, MED_DIRE_CD text, MED_DIRE_NM text,...
SELECT t_kc21.MED_SER_ORG_NO FROM t_kc21 WHERE t_kc21.PERSON_NM = '彭清舒' AND t_kc21.IN_HOSP_DATE BETWEEN '2008-01-14' AND '2019-02-22' GROUP BY t_kc21.MED_SER_ORG_NO ORDER BY COUNT(*) DESC LIMIT 1
css
CREATE TABLE competition_record ( Competition_ID int, Farm_ID int, Rank int ) CREATE TABLE city ( City_ID int, Official_Name text, Status text, Area_km_2 real, Population real, Census_Ranking text ) CREATE TABLE farm_competition ( Competition_ID int, Year int, Theme tex...
SELECT Status, AVG(Population) FROM city GROUP BY Status ORDER BY Status
nvbench
CREATE TABLE table_name_64 ( date VARCHAR, tournament VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the Date of the Kroger Classic Tournament?
SELECT date FROM table_name_64 WHERE tournament = "kroger classic"
sql_create_context
CREATE TABLE zyb ( CLINIC_ID text, COMP_ID text, DATA_ID text, DIFF_PLACE_FLG number, FERTILITY_STS number, FLX_MED_ORG_ID text, HOSP_LEV number, HOSP_STS number, IDENTITY_CARD text, INPT_AREA_BED text, INSURED_IDENTITY number, INSURED_STS text, INSU_TYPE text, IN...
SELECT * FROM qtb WHERE qtb.PERSON_ID = '24171615' AND qtb.MED_SER_ORG_NO = '6541262' AND NOT qtb.MED_ORG_DEPT_NM LIKE '%正骨科%' UNION SELECT * FROM gyb WHERE gyb.PERSON_ID = '24171615' AND gyb.MED_SER_ORG_NO = '6541262' AND NOT gyb.MED_ORG_DEPT_NM LIKE '%正骨科%' UNION SELECT * FROM zyb WHERE zyb.PERSON_ID = '24171615' AND...
css
CREATE TABLE treatment ( treatmentid number, patientunitstayid number, treatmentname text, treatmenttime time ) CREATE TABLE diagnosis ( diagnosisid number, patientunitstayid number, diagnosisname text, diagnosistime time, icd9code text ) CREATE TABLE lab ( labid number, pa...
SELECT DISTINCT cost.cost FROM cost WHERE cost.eventtype = 'lab' AND cost.eventid IN (SELECT lab.labid FROM lab WHERE lab.labname = 'urinary sodium')
eicu
CREATE TABLE table_34083 ( "Week" real, "Date" text, "Opponent" text, "Time / Time Zone" text, "Game Site" text, "Final Score" text, "Record" text, "Match Report" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the match report fo...
SELECT "Match Report" FROM table_34083 WHERE "Opponent" = 'houston'
wikisql
CREATE TABLE club ( Club_ID int, name text, Region text, Start_year text ) CREATE TABLE competition ( Competition_ID int, Year real, Competition_type text, Country text ) CREATE TABLE competition_result ( Competition_ID int, Club_ID_1 int, Club_ID_2 int, Score text ) C...
SELECT Country, COUNT(Country) FROM competition GROUP BY Competition_type, Country ORDER BY COUNT(Country)
nvbench
CREATE TABLE diagnoses ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) CREATE TABLE procedures ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) CREATE TABLE prescriptions ( subject_id text, hadm_id...
SELECT MIN(demographic.age) FROM demographic WHERE demographic.gender = "F" AND demographic.age >= "20"
mimicsql_data
CREATE TABLE table_28775 ( "Season #" real, "Series #" real, "Episode title" text, "Original air date" text, "Nick prod. #" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- How many season # where episode title is ' Avril Lavigne '?
SELECT "Season #" FROM table_28775 WHERE "Episode title" = ' Avril Lavigne '
wikisql
CREATE TABLE table_1356555_2 ( median_household_income VARCHAR, county VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the median household income of butte?
SELECT median_household_income FROM table_1356555_2 WHERE county = "Butte"
sql_create_context
CREATE TABLE procedures ( 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 ) ...
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.expire_flag = "0" AND procedures.short_title = "Atrial cardioversion"
mimicsql_data
CREATE TABLE table_7509 ( "8:00" text, "8:30" text, "9:00" text, "9:30" text, "10:00" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is airing at 9:00 on the channel that airs House at 8:00?
SELECT "9:00" FROM table_7509 WHERE "8:00" = 'house'
wikisql
CREATE TABLE labevents ( row_id number, subject_id number, hadm_id number, itemid number, charttime time, valuenum number, valueuom text ) CREATE TABLE inputevents_cv ( row_id number, subject_id number, hadm_id number, icustay_id number, charttime time, itemid number...
SELECT d_icd_diagnoses.short_title FROM d_icd_diagnoses WHERE d_icd_diagnoses.icd9_code IN (SELECT t3.icd9_code FROM (SELECT t2.icd9_code, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM (SELECT admissions.subject_id, diagnoses_icd.charttime FROM diagnoses_icd JOIN admissions ON diagnoses_icd.hadm_id = admissions...
mimic_iii
CREATE TABLE Dorm_amenity ( amenid INTEGER, amenity_name VARCHAR(25) ) CREATE TABLE Lives_in ( stuid INTEGER, dormid INTEGER, room_number INTEGER ) CREATE TABLE Dorm ( dormid INTEGER, dorm_name VARCHAR(20), student_capacity INTEGER, gender VARCHAR(1) ) CREATE TABLE Student ( S...
SELECT Fname, COUNT(Fname) FROM Student WHERE Major <> (SELECT Major FROM Student) GROUP BY Fname ORDER BY Fname DESC
nvbench
CREATE TABLE table_name_85 ( rr_romaja VARCHAR, hangul_chosongul VARCHAR, capital VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the RR Romaja for the province that has Hangul of and capital of Wonsan?
SELECT rr_romaja FROM table_name_85 WHERE hangul_chosongul = "강원도" AND capital = "wonsan"
sql_create_context
CREATE TABLE table_36939 ( "Year" text, "Men's singles" text, "Women's singles" text, "Men's doubles" text, "Women's doubles" text, "Mixed doubles" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which Men's doubles has a Women's doubles of pam b...
SELECT "Men's doubles" FROM table_36939 WHERE "Women's doubles" = 'pam brady rosine lemon'
wikisql
CREATE TABLE table_21457754_2 ( rr1_pts INTEGER ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Name the most rr 1 pts
SELECT MAX(rr1_pts) FROM table_21457754_2
sql_create_context
CREATE TABLE table_59204 ( "Place" text, "Player" text, "Country" text, "Score" real, "To par" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Who scored a 68?
SELECT "Player" FROM table_59204 WHERE "Score" = '68'
wikisql
CREATE TABLE table_28759261_5 ( dadar_xi_‘b’ VARCHAR, pifa_colaba_fc_u_17 VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- what is the dadar xi b where pifa colaba is sporting options?
SELECT dadar_xi_‘b’ FROM table_28759261_5 WHERE pifa_colaba_fc_u_17 = "Sporting Options"
sql_create_context
CREATE TABLE table_32495 ( "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. -- Who was the home team of the game where Footscra...
SELECT "Home team score" FROM table_32495 WHERE "Away team" = 'footscray'
wikisql
CREATE TABLE table_name_14 ( position VARCHAR, podiums VARCHAR, f_laps VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which position had 3 podiums and F/laps of 4?
SELECT position FROM table_name_14 WHERE podiums = "3" AND f_laps = "4"
sql_create_context
CREATE TABLE table_50816 ( "Number" real, "Player" text, "Position" text, "Height" text, "Weight" real, "Years Exp" text, "College" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the lowest Number, when College is 'University of Alab...
SELECT MIN("Number") FROM table_50816 WHERE "College" = 'university of alabama'
wikisql
CREATE TABLE table_17120964_9 ( venue VARCHAR, date VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- what was the venue where the date was the 22nd?
SELECT venue FROM table_17120964_9 WHERE date = "22nd"
sql_create_context
CREATE TABLE table_272 ( "Series no." real, "Season no." 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 series number for the ...
SELECT MAX("Series no.") FROM table_272 WHERE "Title" = 'Bad Influence'
wikisql
CREATE TABLE weather ( date TEXT, max_temperature_f INTEGER, mean_temperature_f INTEGER, min_temperature_f INTEGER, max_dew_point_f INTEGER, mean_dew_point_f INTEGER, min_dew_point_f INTEGER, max_humidity INTEGER, mean_humidity INTEGER, min_humidity INTEGER, max_sea_level_pre...
SELECT date, AVG(cloud_cover) FROM weather
nvbench
CREATE TABLE table_31136 ( "Year" real, "Network" text, "Play-by-play announcer" text, "Color commentator" text, "s Field reporter" text, "Pregame hosts" text, "Pregame analysts" text, "Trophy presentation" text ) -- Using valid SQLite, answer the following questions for the tables pro...
SELECT MAX("Year") FROM table_31136 WHERE "s Field reporter" = 'Steve Lyons'
wikisql
CREATE TABLE table_203_683 ( id number, "season" text, "league" text, "gold" text, "silver" text, "bronze" text, "winning manager" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- who won bronze before valeranga in 1960-61 ?
SELECT "bronze" FROM table_203_683 WHERE "season" < (SELECT "season" FROM table_203_683 WHERE "bronze" = 'valerenga' AND "season" = '1960-61') ORDER BY "season" DESC LIMIT 1
squall
CREATE TABLE table_25538763_1 ( season INTEGER ) -- Using valid SQLite, answer the following questions for the tables provided above. -- When was the earliest season of Juncadella's career?
SELECT MIN(season) FROM table_25538763_1
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 prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE demographic.expire_flag = "0" AND prescriptions.drug = "nifed"
mimicsql_data
CREATE TABLE table_name_14 ( name VARCHAR, date VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What tour was cancelled?
SELECT name FROM table_name_14 WHERE date = "cancelled"
sql_create_context
CREATE TABLE table_name_39 ( result VARCHAR, game_site VARCHAR, opponent VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What's the result at psinet stadium when the cincinnati bengals are the opponent?
SELECT result FROM table_name_39 WHERE game_site = "psinet stadium" AND opponent = "cincinnati bengals"
sql_create_context
CREATE TABLE lab ( labid number, patientunitstayid number, labname text, labresult number, labresulttime time ) CREATE TABLE treatment ( treatmentid number, patientunitstayid number, treatmentname text, treatmenttime time ) CREATE TABLE vitalperiodic ( vitalperiodicid number, ...
SELECT DISTINCT medication.routeadmin FROM medication WHERE medication.drugname = 'magnesium sulfate 2g/50ml sso'
eicu
CREATE TABLE Products ( product_id INTEGER, product_type_code VARCHAR(15), product_name VARCHAR(80), product_price DOUBLE ) CREATE TABLE Customer_Orders ( order_id INTEGER, customer_id INTEGER, order_date DATETIME, order_status_code VARCHAR(15) ) CREATE TABLE Contacts ( contact_id ...
SELECT product_type_code, COUNT(product_type_code) FROM Products WHERE product_price > 1000 OR product_price < 500 GROUP BY product_type_code
nvbench
CREATE TABLE table_34605 ( "Year" real, "Entrant" text, "Chassis" text, "Engine" text, "Points" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- with year greater than 1988 what is the total number of points?
SELECT COUNT("Points") FROM table_34605 WHERE "Year" > '1988'
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.admission_type FROM demographic WHERE demographic.subject_id = "64208"
mimicsql_data
CREATE TABLE table_204_385 ( id number, "round" number, "pick" number, "player" text, "nationality" text, "college/junior/club team" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- how many canadian players are there in the 1974 nhl amateur draft...
SELECT COUNT("player") FROM table_204_385 WHERE "nationality" = 'canada'
squall
CREATE TABLE table_38748 ( "Home team" text, "Home team score" text, "Away team" text, "Away team score" text, "Ground" text, "Crowd" real, "Date" text, "Report" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What day was the ground subi...
SELECT "Date" FROM table_38748 WHERE "Ground" = 'subiaco'
wikisql
CREATE TABLE table_2268216_1 ( manufacturer VARCHAR, team VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Whose is the manufacturer for team Ranier-Lundy?
SELECT manufacturer FROM table_2268216_1 WHERE team = "Ranier-Lundy"
sql_create_context
CREATE TABLE table_name_62 ( ends_lost VARCHAR, skip VARCHAR, stolen_ends VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- How many ends lost when skip is Kevin Koe and stolen ends are more than 6?
SELECT COUNT(ends_lost) FROM table_name_62 WHERE skip = "kevin koe" AND stolen_ends > 6
sql_create_context
CREATE TABLE Restaurant ( ResName VARCHAR, Rating VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which restaurants have highest rating? List the restaurant name and its rating.
SELECT ResName, Rating FROM Restaurant ORDER BY Rating DESC LIMIT 1
sql_create_context
CREATE TABLE lab ( labid number, patientunitstayid number, labname text, labresult number, labresulttime time ) CREATE TABLE allergy ( allergyid number, patientunitstayid number, drugname text, allergyname text, allergytime time ) CREATE TABLE diagnosis ( diagnosisid number...
SELECT intakeoutput.celllabel FROM intakeoutput WHERE intakeoutput.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '007-4371')) AND intakeoutput.cellpath LIKE '%output%' ORDER ...
eicu
CREATE TABLE intakeoutput ( intakeoutputid number, patientunitstayid number, cellpath text, celllabel text, cellvaluenumeric number, intakeoutputtime time ) CREATE TABLE patient ( uniquepid text, patienthealthsystemstayid number, patientunitstayid number, gender text, age te...
SELECT patient.hospitaladmittime FROM patient WHERE patient.uniquepid = '006-188114' AND STRFTIME('%y', patient.hospitaladmittime) >= '2105'
eicu
CREATE TABLE table_name_74 ( laps VARCHAR, grid VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- How many laps does grid 4 have?
SELECT laps FROM table_name_74 WHERE grid = "4"
sql_create_context
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 SUM(MED_AMOUT) FROM t_kc21 WHERE PERSON_ID = '89294876' AND CLINIC_TYPE = '门诊'
css
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 MAX(demographic.age) FROM demographic WHERE demographic.discharge_location = "SHORT TERM HOSPITAL" AND demographic.days_stay = "15"
mimicsql_data
CREATE TABLE table_name_46 ( Id VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is 1994 when 1996 is 3R?
SELECT 1994 FROM table_name_46 WHERE 1996 = "3r"
sql_create_context
CREATE TABLE gyb ( CLINIC_ID text, COMP_ID text, DATA_ID text, DIFF_PLACE_FLG number, FERTILITY_STS number, FLX_MED_ORG_ID text, HOSP_LEV number, HOSP_STS number, IDENTITY_CARD text, INPT_AREA_BED text, INSURED_IDENTITY number, INSURED_STS text, INSU_TYPE text, IN...
SELECT qtb.MED_CLINIC_ID FROM qtb WHERE qtb.PERSON_NM = '张晴霞' AND qtb.MED_SER_ORG_NO = '1657281' AND NOT qtb.IN_DIAG_DIS_NM LIKE '%煤工%' UNION SELECT gyb.MED_CLINIC_ID FROM gyb WHERE gyb.PERSON_NM = '张晴霞' AND gyb.MED_SER_ORG_NO = '1657281' AND NOT gyb.IN_DIAG_DIS_NM LIKE '%煤工%' UNION SELECT zyb.MED_CLINIC_ID FROM zyb WH...
css
CREATE TABLE table_name_26 ( name VARCHAR, first_performance VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- who had the first performance on 3 july 2011?
SELECT name FROM table_name_26 WHERE first_performance = "3 july 2011"
sql_create_context
CREATE TABLE table_24697604_1 ( university VARCHAR, year_founded VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What university was founded in 1898?
SELECT university FROM table_24697604_1 WHERE year_founded = 1898
sql_create_context
CREATE TABLE table_10875694_11 ( title VARCHAR, product_no VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- How many titles have the product number SCUS-97330?
SELECT COUNT(title) FROM table_10875694_11 WHERE product_no = "SCUS-97330"
sql_create_context
CREATE TABLE teachers ( firstname VARCHAR, classroom VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Find the first names of all the teachers that teach in classroom 110.
SELECT firstname FROM teachers WHERE classroom = 110
sql_create_context
CREATE TABLE t_kc22 ( AMOUNT number, CHA_ITEM_LEV number, DATA_ID text, DIRE_TYPE number, DOSE_FORM text, DOSE_UNIT text, EACH_DOSAGE text, EXP_OCC_DATE time, FLX_MED_ORG_ID text, FXBZ number, HOSP_DOC_CD text, HOSP_DOC_NM text, MED_CLINIC_ID text, MED_DIRE_CD tex...
SELECT COUNT(*) FROM gwyjzb WHERE gwyjzb.PERSON_NM = '秦鹏赋' AND gwyjzb.IN_HOSP_DATE BETWEEN '2003-08-17' AND '2014-05-16' AND gwyjzb.CLINIC_TYPE = '住院' UNION SELECT COUNT(*) FROM fgwyjzb WHERE fgwyjzb.PERSON_NM = '秦鹏赋' AND fgwyjzb.IN_HOSP_DATE BETWEEN '2003-08-17' AND '2014-05-16' AND fgwyjzb.CLINIC_TYPE = '住院'
css
CREATE TABLE table_16099 ( "No. in series" real, "No. in season" real, "Title" text, "Setting" text, "Directed by" text, "Written by" text, "U.S. viewers (million)" text, "Original air date" text ) -- Using valid SQLite, answer the following questions for the tables provided above. --...
SELECT "Original air date" FROM table_16099 WHERE "Setting" = '1544'
wikisql
CREATE TABLE table_19810459_1 ( result VARCHAR, background VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What was the result for the contestant who was a small business owner?
SELECT result FROM table_19810459_1 WHERE background = "Small business owner"
sql_create_context
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 DEPARTMENT ( DEPT_CODE varchar(10), DEPT_NAME varchar(30), SCHOOL_CODE varchar(8), EMP_NUM int, DEPT_ADDRESS varchar(20), ...
SELECT EMP_HIREDATE, COUNT(EMP_HIREDATE) FROM EMPLOYEE AS T1 JOIN PROFESSOR AS T2 ON T1.EMP_NUM = T2.EMP_NUM WHERE T2.PROF_OFFICE = 'DRE 102' ORDER BY COUNT(EMP_HIREDATE) DESC
nvbench
CREATE TABLE zyjzjlb ( YLJGDM text, JZLSH text, MZJZLSH text, KH text, KLX number, HZXM text, WDBZ number, RYDJSJ time, RYTJDM number, RYTJMC text, JZKSDM text, JZKSMC text, RZBQDM text, RZBQMC text, RYCWH text, CYKSDM text, CYKSMC text, CYBQDM tex...
(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 dual_carrier ( main_airline varchar, low_flight_number int, high_flight_number int, dual_airline varchar, service_name text ) CREATE TABLE equipment_sequence ( aircraft_code_sequence varchar, aircraft_code varchar ) CREATE TABLE compartment_class ( compartment varchar, ...
SELECT DISTINCT fare_basis_code FROM fare_basis WHERE fare_basis_code = 'QX'
atis
CREATE TABLE table_19545 ( "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 college/junior/club team did the player play on that p...
SELECT "College/junior/club team" FROM table_19545 WHERE "NHL team" = 'Buffalo Sabres'
wikisql
CREATE TABLE table_75359 ( "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. -- Name the FCC info for frequency Mhz less than 97.3 and call sign of ...
SELECT "FCC info" FROM table_75359 WHERE "Frequency MHz" < '97.3' AND "Call sign" = 'w237br'
wikisql
CREATE TABLE jybgb ( YLJGDM text, YLJGDM_MZJZJLB text, YLJGDM_ZYJZJLB text, BGDH text, BGRQ time, JYLX number, JZLSH text, JZLSH_MZJZJLB text, JZLSH_ZYJZJLB text, JZLX number, KSBM text, KSMC text, SQRGH text, SQRXM text, BGRGH text, BGRXM text, SHRGH ...
SELECT BGDH FROM jybgb WHERE JZLSH = '65133267001' AND NOT KSMC LIKE '%影像%'
css
CREATE TABLE diagnoses ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) 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 t...
SELECT demographic.dob, demographic.gender FROM demographic WHERE demographic.subject_id = "18372"
mimicsql_data
CREATE TABLE hz_info ( KH text, KLX number, RYBH text, YLJGDM text ) CREATE TABLE ftxmzjzjlb ( HXPLC number, HZXM text, JLSJ time, JZJSSJ time, JZKSBM text, JZKSMC text, JZKSRQ time, JZLSH number, JZZDBM text, JZZDSM text, JZZTDM number, JZZTMC text, ...
SELECT jybgb.BGDH FROM hz_info JOIN txmzjzjlb JOIN jybgb ON hz_info.YLJGDM = txmzjzjlb.YLJGDM AND hz_info.KH = txmzjzjlb.KH AND hz_info.KLX = txmzjzjlb.KLX AND txmzjzjlb.YLJGDM = jybgb.YLJGDM_MZJZJLB AND txmzjzjlb.JZLSH = jybgb.JZLSH_MZJZJLB WHERE hz_info.RYBH = '62645586' AND NOT jybgb.BGDH IN (SELECT jyjgzbb.BGDH FRO...
css
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 COUNT(*) FROM qtb WHERE qtb.MED_SER_ORG_NO = '4702340' AND qtb.IN_HOSP_DATE BETWEEN '2005-04-07' AND '2020-06-11' AND qtb.REMOTE_SETTLE_FLG = '异地1' OR qtb.REMOTE_SETTLE_FLG = '异地2' UNION SELECT COUNT(*) FROM gyb WHERE gyb.MED_SER_ORG_NO = '4702340' AND gyb.IN_HOSP_DATE BETWEEN '2005-04-07' AND '2020-06-11' AND g...
css
CREATE TABLE table_68586 ( "Game" real, "Date" text, "Score" text, "Location" text, "Time" text, "Attendance" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- brooklyn dodgers 3, new york yankees 5, and a Game larger than 1 had what attendance fig...
SELECT SUM("Attendance") FROM table_68586 WHERE "Score" = 'brooklyn dodgers – 3, new york yankees – 5' AND "Game" > '1'
wikisql
CREATE TABLE table_name_1 ( home VARCHAR, visitor VARCHAR, date VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What home has Philadelphia as the visitor, and december 4 as the date?
SELECT home FROM table_name_1 WHERE visitor = "philadelphia" AND date = "december 4"
sql_create_context
CREATE TABLE jybgb ( YLJGDM text, YLJGDM_MZJZJLB text, YLJGDM_ZYJZJLB text, BGDH text, BGRQ time, JYLX number, JZLSH text, JZLSH_MZJZJLB text, JZLSH_ZYJZJLB text, JZLX number, KSBM text, KSMC text, SQRGH text, SQRXM text, BGRGH text, BGRXM text, SHRGH ...
SELECT * FROM jyjgzbb WHERE JCZBMC = (SELECT JCZBMC FROM jyjgzbb WHERE JYZBLSH = '70091452455') AND JCZBJGDW = (SELECT JCZBJGDW FROM jyjgzbb WHERE JYZBLSH = '70091452455') AND JCZBJGDL <> (SELECT JCZBJGDL FROM jyjgzbb WHERE JYZBLSH = '70091452455')
css
CREATE TABLE semester ( semester_id int, semester varchar, year int ) CREATE TABLE comment_instructor ( instructor_id int, student_id int, score int, comment_text varchar ) CREATE TABLE program ( program_id int, name varchar, college varchar, introduction varchar ) CREATE ...
SELECT DISTINCT course.department, course.name, course.number, program_course.workload, program_course.workload FROM course, program_course WHERE program_course.category LIKE '%ULCS%' AND program_course.course_id = course.course_id AND program_course.workload = (SELECT MIN(PROGRAM_COURSEalias1.workload) FROM program_co...
advising
CREATE TABLE table_name_67 ( nationality VARCHAR, position VARCHAR, player VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Where does center Joakim Andersson come from?
SELECT nationality FROM table_name_67 WHERE position = "center" AND player = "joakim andersson"
sql_create_context
CREATE TABLE table_59586 ( "Date" text, "Visitor" text, "Score" text, "Home" text, "Record" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the score of the game with the chicago black hawks as the visitor and a 3-1 record?
SELECT "Score" FROM table_59586 WHERE "Visitor" = 'chicago black hawks' AND "Record" = '3-1'
wikisql
CREATE TABLE table_64648 ( "Year" real, "Title" text, "From album" text, "Label" text, "Label-Nr" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which Year has a Label-Nr of 88146?
SELECT "Year" FROM table_64648 WHERE "Label-Nr" = '88146'
wikisql
CREATE TABLE table_name_28 ( category VARCHAR, team VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which category has a team of Cannondale Vredestein?
SELECT category FROM table_name_28 WHERE team = "cannondale vredestein"
sql_create_context
CREATE TABLE table_name_42 ( player VARCHAR, height VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What Player(s) have a Height of 6-3?
SELECT player FROM table_name_42 WHERE height = "6-3"
sql_create_context
CREATE TABLE table_25036 ( "Year" text, "Network" text, "Play-by-play" text, "Color commentator(s)" text, "Ice level reporters" text, "Studio host" text, "Studio analysts" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Who is the play-by-pla...
SELECT "Play-by-play" FROM table_25036 WHERE "Network" = 'NBC' AND "Ice level reporters" = 'Darren Pang'
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.admission_location = "CLINIC REFERRAL/PREMATURE" AND demographic.discharge_location = "LONG TERM CARE HOSPITAL"
mimicsql_data
CREATE TABLE table_name_75 ( best_supported_club VARCHAR, goals VARCHAR, per_game VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- what is the best supported club with a 25 Goal and a per game larger than 1,156?
SELECT best_supported_club FROM table_name_75 WHERE goals = 25 AND per_game > 1 OFFSET 156
sql_create_context
CREATE TABLE table_27552 ( "Player" text, "Games Played" real, "Rebounds" real, "Assists" real, "Steals" real, "Blocks" real, "Points" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- If the rebounds are at 87, what are the amount of steals?
SELECT "Steals" FROM table_27552 WHERE "Rebounds" = '87'
wikisql
CREATE TABLE table_35458 ( "Year" real, "Class" text, "Team" text, "Points" real, "Wins" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the mean number of wins for the norton team in 1966, when there are 8 points?
SELECT AVG("Wins") FROM table_35458 WHERE "Team" = 'norton' AND "Year" = '1966' AND "Points" = '8'
wikisql
CREATE TABLE table_28037619_2 ( production_code VARCHAR, us_viewers__million_ VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- How many production codes are there for the episode that had 4.36 million u.s. viewers?
SELECT COUNT(production_code) FROM table_28037619_2 WHERE us_viewers__million_ = "4.36"
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 COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE prescriptions.formulary_drug_cd = "KETR30I" AND lab.fluid = "Joint Fluid"
mimicsql_data
CREATE TABLE table_78536 ( "Goal" real, "Date" text, "Score" text, "Result" text, "Competition" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- How many goals when the score is 3-0 in the euro 2012 q?
SELECT COUNT("Goal") FROM table_78536 WHERE "Competition" = 'euro 2012 q' AND "Score" = '3-0'
wikisql
CREATE TABLE table_3718 ( "season" text, "division" text, "date" text, "home team" text, "result" text, "away team" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- How many dates are shown for the home team of orlando pirates and result of 1 3?
SELECT COUNT("date") FROM table_3718 WHERE "home team" = 'Orlando Pirates' AND "result" = '1–3'
wikisql
CREATE TABLE table_name_42 ( election VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which 1st Party has an Election of 1849 by-election?
SELECT 1 AS st_party FROM table_name_42 WHERE election = "1849 by-election"
sql_create_context
CREATE TABLE table_21297652_1 ( series VARCHAR, points VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- In what series did the driver get 30 points?
SELECT series FROM table_21297652_1 WHERE points = 30
sql_create_context
CREATE TABLE table_1431467_4 ( incumbent VARCHAR, district VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- How many incumbents for the district of South Carolina 5?
SELECT COUNT(incumbent) FROM table_1431467_4 WHERE district = "South Carolina 5"
sql_create_context
CREATE TABLE table_63040 ( "Heat" real, "Lane" real, "Name" text, "Nationality" text, "Time" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Who is from south korea and has a heat less than 3?
SELECT "Name" FROM table_63040 WHERE "Heat" < '3' AND "Nationality" = 'south korea'
wikisql
CREATE TABLE table_203_828 ( id number, "date" text, "opponent#" text, "rank#" text, "site" text, "result" text, "attendance" number ) -- Using valid SQLite, answer the following questions for the tables provided above. -- how many games had an attendance less than 45,000 people
SELECT COUNT(*) FROM table_203_828 WHERE "attendance" < 45000
squall
CREATE TABLE table_60329 ( "Location" text, "Year" real, "Champion" text, "Runner-up" text, "Score" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which Champion has a Runner-up of florian mayer, and a Score of 7 6(6), 4 6, 7 5?
SELECT "Champion" FROM table_60329 WHERE "Runner-up" = 'florian mayer' AND "Score" = '7–6(6), 4–6, 7–5'
wikisql
CREATE TABLE table_24788 ( "Year (Ceremony)" text, "English Title" text, "Vietnamese title" text, "Director" text, "Result" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is every English title for the result of nominee?
SELECT "English Title" FROM table_24788 WHERE "Result" = 'Nominee'
wikisql
CREATE TABLE qtb ( CLINIC_ID text, COMP_ID text, DATA_ID text, DIFF_PLACE_FLG number, FERTILITY_STS number, FLX_MED_ORG_ID text, HOSP_LEV number, HOSP_STS number, IDENTITY_CARD text, INPT_AREA_BED text, INSURED_IDENTITY number, INSURED_STS text, INSU_TYPE text, IN...
SELECT qtb.OUT_HOSP_DATE FROM qtb WHERE qtb.MED_CLINIC_ID = '08917686657' UNION SELECT gyb.OUT_HOSP_DATE FROM gyb WHERE gyb.MED_CLINIC_ID = '08917686657' UNION SELECT zyb.OUT_HOSP_DATE FROM zyb WHERE zyb.MED_CLINIC_ID = '08917686657' UNION SELECT mzb.OUT_HOSP_DATE FROM mzb WHERE mzb.MED_CLINIC_ID = '08917686657'
css
CREATE TABLE table_16575609_4 ( pick__number INTEGER, cfl_team VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Name the most pick number for cfl team being edmonton eskimos
SELECT MAX(pick__number) FROM table_16575609_4 WHERE cfl_team = "Edmonton Eskimos"
sql_create_context
CREATE TABLE table_name_49 ( bronze INTEGER, rank VARCHAR, gold VARCHAR, total VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the sum of Bronze, when Gold is less than 1, when Total is greater than 1, and when Rank is 10?
SELECT SUM(bronze) FROM table_name_49 WHERE gold < 1 AND total > 1 AND rank = 10
sql_create_context
CREATE TABLE table_name_21 ( drivers VARCHAR, year VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Who drove in races in 1949?
SELECT drivers FROM table_name_21 WHERE year = 1949
sql_create_context
CREATE TABLE hz_info_mzjzjlb ( JZLSH number, YLJGDM number, mzjzjlb_id number ) 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 ...
SELECT COUNT(*) FROM mzjzjlb WHERE mzjzjlb.JZKSMC = '小儿肿瘤科' AND mzjzjlb.JZKSRQ BETWEEN '2014-10-06' AND '2018-12-28'
css
CREATE TABLE table_5506 ( "Date" text, "Visitor" text, "Score" text, "Home" text, "Record" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- what visitor came on november 27
SELECT "Visitor" FROM table_5506 WHERE "Date" = 'november 27'
wikisql
CREATE TABLE table_name_51 ( year VARCHAR, chassis VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- How many years was the chassis a Coloni C3?
SELECT COUNT(year) FROM table_name_51 WHERE chassis = "coloni c3"
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 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_19072602_5 ( match_no VARCHAR, team_europe VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- When osku palermaa is on the europe team how many match numbers are there?
SELECT COUNT(match_no) FROM table_19072602_5 WHERE team_europe = "Osku Palermaa"
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 INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE lab.flag = "abnormal" AND lab.label = "Red Blood Cells"
mimicsql_data