instruction
stringlengths
151
7.46k
output
stringlengths
2
4.44k
source
stringclasses
26 values
CREATE TABLE table_47847 ( "Name" text, "Chinese" text, "Hanyu Pinyin" text, "Wade\u2013Giles" text, "Hokkien Pe\u030dh-\u014de-j\u012b" text, "English meaning" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What Hanyu Pinyin is in the Jinning T...
SELECT "Hanyu Pinyin" FROM table_47847 WHERE "Name" = 'jinning township'
wikisql
CREATE TABLE table_name_11 ( december VARCHAR, opponent VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the day in December of the game against the Boston Bruins?
SELECT COUNT(december) FROM table_name_11 WHERE opponent = "boston bruins"
sql_create_context
CREATE TABLE Apartment_Bookings ( apt_booking_id INTEGER, apt_id INTEGER, guest_id INTEGER, booking_status_code CHAR(15), booking_start_date DATETIME, booking_end_date DATETIME ) CREATE TABLE Apartments ( apt_id INTEGER, building_id INTEGER, apt_type_code CHAR(15), apt_number CH...
SELECT booking_start_date, COUNT(booking_start_date) FROM Apartment_Bookings AS T1 JOIN Apartments AS T2 ON T1.apt_id = T2.apt_id WHERE T2.bedroom_count > 2 ORDER BY COUNT(booking_start_date)
nvbench
CREATE TABLE table_24865763_2 ( lmp1_winning_team VARCHAR, rnd VARCHAR, lmp2_winning_team VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- How many won the LMP1 on round 4 if No. 42 Strakka Racing was the LMP2 Winning Team?
SELECT COUNT(lmp1_winning_team) FROM table_24865763_2 WHERE rnd = 4 AND lmp2_winning_team = "No. 42 Strakka Racing"
sql_create_context
CREATE TABLE exhibition_record ( Exhibition_ID int, Date text, Attendance int ) CREATE TABLE artist ( Artist_ID int, Name text, Country text, Year_Join int, Age int ) CREATE TABLE exhibition ( Exhibition_ID int, Year int, Theme text, Artist_ID int, Ticket_Price real...
SELECT Country, AVG(Age) FROM artist GROUP BY Country ORDER BY Country
nvbench
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.dob, demographic.admittime FROM demographic WHERE demographic.name = "Lue White"
mimicsql_data
CREATE TABLE table_28115 ( "Series #" real, "Season #" real, "Title" text, "Director" text, "Writer(s)" text, "Airdate" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Who directed episode number 626 in the series?
SELECT "Director" FROM table_28115 WHERE "Series #" = '626'
wikisql
CREATE TABLE table_name_25 ( opponent VARCHAR, date VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Who was the opponent on april 26, 2003?
SELECT opponent FROM table_name_25 WHERE date = "april 26, 2003"
sql_create_context
CREATE TABLE table_name_50 ( lane INTEGER, time VARCHAR, react VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the lowest lane in which an athlete got a time larger than 20.75 and a react smaller than 0.166?
SELECT MIN(lane) FROM table_name_50 WHERE time > 20.75 AND react < 0.166
sql_create_context
CREATE TABLE table_1473672_2 ( pick__number INTEGER ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Lorne Henning has the lowest pick# of?
SELECT MIN(pick__number) FROM table_1473672_2
sql_create_context
CREATE TABLE t_kc21_t_kc24 ( MED_CLINIC_ID text, MED_SAFE_PAY_ID number ) CREATE TABLE t_kc21 ( 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...
SELECT SUM(t_kc24.MED_AMOUT) FROM t_kc21 JOIN t_kc24 JOIN t_kc21_t_kc24 ON t_kc21.MED_CLINIC_ID = t_kc21_t_kc24.MED_CLINIC_ID AND t_kc21_t_kc24.MED_SAFE_PAY_ID = t_kc24.MED_SAFE_PAY_ID WHERE t_kc21.MED_SER_ORG_NO = '8958826' AND t_kc24.CLINIC_SLT_DATE BETWEEN '2000-02-01' AND '2003-04-23'
css
CREATE TABLE table_63096 ( "Date" text, "Opponent" text, "Venue" text, "Result" text, "Attendance" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which Opponent has a Venue of h, and a Result of 0 1, and a Date of 29 august 1998?
SELECT "Opponent" FROM table_63096 WHERE "Venue" = 'h' AND "Result" = '0–1' AND "Date" = '29 august 1998'
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 CHA_ITEM_LEV FROM t_kc22 WHERE MED_CLINIC_ID = '12704839243' AND SOC_SRT_DIRE_NM = '葡醛内酯片'
css
CREATE TABLE table_17427004_7 ( semifinals VARCHAR, athlete VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- How did Hamza Kramou fare in the semifinals?
SELECT semifinals FROM table_17427004_7 WHERE athlete = "Hamza Kramou"
sql_create_context
CREATE TABLE table_1427998_1 ( division VARCHAR, playoffs VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- How many divisions have been won when the playoff result is conference quarterfinals.
SELECT COUNT(division) FROM table_1427998_1 WHERE playoffs = "Conference Quarterfinals"
sql_create_context
CREATE TABLE store_district ( Store_ID int, District_ID int ) CREATE TABLE product ( product_id int, product text, dimensions text, dpi real, pages_per_minute_color real, max_page_size text, interface text ) CREATE TABLE store ( Store_ID int, Store_Name text, Type text,...
SELECT District_name, City_Population FROM district WHERE City_Population BETWEEN 200000 AND 2000000 ORDER BY District_name
nvbench
CREATE TABLE t_kc24 ( MED_SAFE_PAY_ID text, OVERALL_CD_ORG text, OVERALL_CD_PERSON text, MED_CLINIC_ID text, REF_SLT_FLG number, CLINIC_SLT_DATE time, COMP_ID text, PERSON_ID text, FLX_MED_ORG_ID text, INSU_TYPE text, MED_AMOUT number, PER_ACC_PAY number, OVE_PAY numb...
SELECT MED_CLINIC_ID FROM t_kc21 WHERE PERSON_NM = '冯明远' AND MED_SER_ORG_NO = '9007676' AND NOT IN_DIAG_DIS_NM LIKE '%化脓性%'
css
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 inputevents_cv ( row_id number, subject_id number, hadm_id number, icustay_id number, charttim...
SELECT MAX(t1.c1) FROM (SELECT COUNT(DISTINCT diagnoses_icd.hadm_id) AS c1 FROM diagnoses_icd WHERE diagnoses_icd.icd9_code = (SELECT d_icd_diagnoses.icd9_code FROM d_icd_diagnoses WHERE d_icd_diagnoses.short_title = 'intestinal adhes w obstr') AND STRFTIME('%y', diagnoses_icd.charttime) <= '2101' GROUP BY STRFTIME('%y...
mimic_iii
CREATE TABLE table_train_238 ( "id" int, "hemoglobin_a1c_hba1c" float, "fasting_c_peptide" float, "hba1c" float, "allergy_to_mammalian_derived_drug_preparations" bool, "body_mass_index_bmi" float, "renal_transplantation" bool, "NOUSE" float ) -- Using valid SQLite, answer the following...
SELECT * FROM table_train_238 WHERE hba1c >= 6 AND hemoglobin_a1c_hba1c <= 10
criteria2sql
CREATE TABLE table_name_92 ( plural VARCHAR, plural_gender VARCHAR, meaning VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the plural if the meaning is python and the plural gender is n?
SELECT plural FROM table_name_92 WHERE plural_gender = "n" AND meaning = "python"
sql_create_context
CREATE TABLE table_name_43 ( joined INTEGER, division VARCHAR, location VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What was the most recent year that a team located in Highland Township and a member of the West Division joined the Kensington Lakes Ac...
SELECT MAX(joined) FROM table_name_43 WHERE division = "west" AND location = "highland township"
sql_create_context
CREATE TABLE table_63036 ( "Player" text, "County" text, "Tally" text, "Total" real, "Matches" real, "Average" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which player was from Fermanagh and had an average score of 22?
SELECT AVG("Average") FROM table_63036 WHERE "Total" = '22' AND "County" = 'fermanagh'
wikisql
CREATE TABLE table_name_28 ( total_passengers VARCHAR, annual_change VARCHAR, rank VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the total number of Total Passengers when the annual change is 28.8% and the rank is less than 8?
SELECT COUNT(total_passengers) FROM table_name_28 WHERE annual_change = "28.8%" AND rank < 8
sql_create_context
CREATE TABLE hz_info ( KH text, KLX number, RYBH text, YLJGDM text ) CREATE TABLE zyjzjlb_jybgb ( YLJGDM_ZYJZJLB text, BGDH number, YLJGDM number ) CREATE TABLE person_info ( CSD text, CSRQ time, GJDM text, GJMC text, JGDM text, JGMC text, MZDM text, MZMC te...
SELECT mzjzjlb.JZLSH FROM person_info JOIN hz_info JOIN mzjzjlb 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 WHERE person_info.XM = '吴映秋' AND NOT mzjzjlb.JZLSH IN (SELECT jybgb.JZLSH FROM jybgb WHERE jybgb.BGRQ >= '2009-10-09')
css
CREATE TABLE table_name_36 ( home_team VARCHAR, away_team VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which home team had an away team of the Brisbane Lions?
SELECT home_team FROM table_name_36 WHERE away_team = "brisbane lions"
sql_create_context
CREATE TABLE table_4699 ( "Tournament" text, "2007" text, "2009" text, "2010" text, "2011" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which tournament had the result of a W in 2009?
SELECT "Tournament" FROM table_4699 WHERE "2009" = 'w'
wikisql
CREATE TABLE table_name_75 ( fa_cup_goals INTEGER, total_goals VARCHAR, total_apps VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- what is the highest fa cup goals when the total goals is more than 3 and total apps is 31 (1)?
SELECT MAX(fa_cup_goals) FROM table_name_75 WHERE total_goals > 3 AND total_apps = "31 (1)"
sql_create_context
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 patient.admissionheight FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '021-25705') AND NOT patient.admissionheight IS NULL AND DATETIME(patient.unitadmittime, 'start of month') = DATETIME(CURRENT_TIME(), 'start of month', ...
eicu
CREATE TABLE table_10495 ( "Date" text, "Champion" text, "2nd Place" text, "Score" text, "Stadium" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which Stadium was played in when Seven Six was second place?
SELECT "Stadium" FROM table_10495 WHERE "2nd Place" = 'seven six'
wikisql
CREATE TABLE table_name_67 ( room_temperature VARCHAR, in_production VARCHAR, toxic_materials VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What's the room temperature with no toxic materials and no ln production?
SELECT room_temperature FROM table_name_67 WHERE in_production = "no" AND toxic_materials = "no"
sql_create_context
CREATE TABLE table_name_54 ( silver INTEGER, total VARCHAR, rank VARCHAR, gold VARCHAR, bronze VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the most silver won by the country with more than 1 gold, 3 bronze, ranked 1, and less than 12 a...
SELECT MAX(silver) FROM table_name_54 WHERE gold > "1" AND bronze = 3 AND rank = "1" AND total < 12
sql_create_context
CREATE TABLE table_50436 ( "Date" text, "Home" text, "Score" text, "Away" text, "Attendance" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the maximum number of people in attendance on 16 August 2008 when the home team was Deportes Savio?
SELECT MAX("Attendance") FROM table_50436 WHERE "Date" = '16 august 2008' AND "Home" = 'deportes savio'
wikisql
CREATE TABLE table_49367 ( "Rider" text, "Manufacturer" text, "Laps" real, "Time" text, "Grid" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the Manufacturer, when Laps is 26, and when Rider is Aleix Espargaro?
SELECT "Manufacturer" FROM table_49367 WHERE "Laps" = '26' AND "Rider" = 'aleix espargaro'
wikisql
CREATE TABLE procedures ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) CREATE TABLE lab ( subject_id text, hadm_id text, itemid text, charttime text, flag text, value_unit text, label text, fluid text ) CREATE TABLE diagnoses ( ...
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE demographic.age < "44" AND prescriptions.route = "NU"
mimicsql_data
CREATE TABLE table_name_22 ( nationality VARCHAR, player VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What country is Eugene McDowell from?
SELECT nationality FROM table_name_22 WHERE player = "eugene mcdowell"
sql_create_context
CREATE TABLE table_19908313_2 ( team VARCHAR, primary_sponsor_s_ VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What team is sponsored by d3 Outdoors?
SELECT team FROM table_19908313_2 WHERE primary_sponsor_s_ = "D3 Outdoors"
sql_create_context
CREATE TABLE table_67808 ( "Date" text, "Opponent" text, "Score" text, "Loss" text, "Attendance" text, "Record" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Can you tell me the Score that has the Attendance of 4,567?
SELECT "Score" FROM table_67808 WHERE "Attendance" = '4,567'
wikisql
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 * FROM t_kc21 WHERE t_kc21.MED_SER_ORG_NO = '1407398' AND t_kc21.IN_HOSP_DATE BETWEEN '2007-08-14' AND '2011-07-31' EXCEPT SELECT * FROM t_kc21 WHERE t_kc21.MED_SER_ORG_NO = '1407398' AND t_kc21.IN_HOSP_DATE BETWEEN '2007-08-14' AND '2011-07-31' AND t_kc21.MED_ORG_DEPT_CD = '675'
css
CREATE TABLE table_name_49 ( away_team VARCHAR, venue VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the away team's score at princes park?
SELECT away_team AS score FROM table_name_49 WHERE venue = "princes park"
sql_create_context
CREATE TABLE t_kc21_t_kc22 ( MED_CLINIC_ID text, MED_EXP_DET_ID number ) CREATE TABLE t_kc24 ( ACCOUNT_DASH_DATE time, ACCOUNT_DASH_FLG number, CASH_PAY number, CIVIL_SUBSIDY number, CKC102 number, CLINIC_ID text, CLINIC_SLT_DATE time, COMP_ID text, COM_ACC_PAY number, C...
SELECT t_kc21.IN_DIAG_DIS_CD, t_kc21.IN_DIAG_DIS_NM FROM t_kc21 WHERE t_kc21.PERSON_ID = '32981516'
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 demographic.language FROM demographic WHERE demographic.subject_id = "91588"
mimicsql_data
CREATE TABLE table_1046454_1 ( year INTEGER, regular_season VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- what being the maximum year where regular season is 4th, northwest
SELECT MAX(year) FROM table_1046454_1 WHERE regular_season = "4th, Northwest"
sql_create_context
CREATE TABLE table_41002 ( "Tie no" text, "Home team" text, "Score" text, "Away team" text, "Date" text, "Attendance" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is Home Team, when Tie No is Replay, and when Attendance is 2,048?
SELECT "Home team" FROM table_41002 WHERE "Tie no" = 'replay' AND "Attendance" = '2,048'
wikisql
CREATE TABLE d_icd_diagnoses ( row_id number, icd9_code text, short_title text, long_title text ) CREATE TABLE inputevents_cv ( row_id number, subject_id number, hadm_id number, icustay_id number, charttime time, itemid number, amount number ) CREATE TABLE chartevents ( ...
SELECT prescriptions.drug FROM prescriptions WHERE prescriptions.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 8116) 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_52826 ( "Player" text, "Nationality" text, "Position" text, "Years for Jazz" text, "School/Club Team" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What Nationality is the Colorado State team?
SELECT "Nationality" FROM table_52826 WHERE "School/Club Team" = 'colorado'
wikisql
CREATE TABLE table_21462 ( "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. -- What w...
SELECT "Record" FROM table_21462 WHERE "Team" = 'Cleveland'
wikisql
CREATE TABLE table_name_60 ( country VARCHAR, play VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the Country of the Play Electra?
SELECT country FROM table_name_60 WHERE play = "electra"
sql_create_context
CREATE TABLE table_name_53 ( week_of VARCHAR, semi_finalists VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is Week, when Semi Finalists is Sandrine Testud Yone Kamio?
SELECT week_of FROM table_name_53 WHERE semi_finalists = "sandrine testud yone kamio"
sql_create_context
CREATE TABLE diagnoses ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) CREATE TABLE lab ( subject_id text, hadm_id text, itemid text, charttime text, flag text, value_unit text, label text, fluid text ) CREATE TABLE prescriptions...
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.admission_type = "ELECTIVE" AND demographic.dob_year < "2076"
mimicsql_data
CREATE TABLE table_24798489_2 ( original_airdate VARCHAR, location VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- How many dates originally aired episodes located in Philadelphia, pennsylvania?
SELECT COUNT(original_airdate) FROM table_24798489_2 WHERE location = "Philadelphia, Pennsylvania"
sql_create_context
CREATE TABLE table_4263 ( "Material" text, "Type" text, "Geometry" text, "Output voltage" text, "Output power" text, "Synthesis" text, "Researched at" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Where was d: ~50nm, l: ~600nm geometry rese...
SELECT "Researched at" FROM table_4263 WHERE "Geometry" = 'D: ~50nm, L: ~600nm'
wikisql
CREATE TABLE table_name_80 ( versions VARCHAR, origin VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Tell me the versions for czechoslovakia?
SELECT versions FROM table_name_80 WHERE origin = "czechoslovakia"
sql_create_context
CREATE TABLE table_204_585 ( id number, "year" text, "player" text, "high school" text, "college" text, "nba/aba draft" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- who won the first one ?
SELECT "player" FROM table_204_585 ORDER BY "year" LIMIT 1
squall
CREATE TABLE table_18546 ( "District" text, "Incumbent" text, "Party" text, "First elected" real, "Result" text, "Candidates" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- How many people on this list are named thomas abernethy?
SELECT COUNT("Candidates") FROM table_18546 WHERE "Incumbent" = 'Thomas Abernethy'
wikisql
CREATE TABLE t_kc22 ( AMOUNT number, CHA_ITEM_LEV number, DATA_ID text, DIRE_TYPE number, DOSE_FORM text, DOSE_UNIT text, EACH_DOSAGE text, EXP_OCC_DATE time, FLX_MED_ORG_ID text, FXBZ number, HOSP_DOC_CD text, HOSP_DOC_NM text, MED_CLINIC_ID text, MED_DIRE_CD tex...
SELECT SUM(t_kc24.PER_ACC_PAY) FROM t_kc24 WHERE t_kc24.PERSON_ID = '72132920' AND t_kc24.CLINIC_SLT_DATE BETWEEN '2012-06-13' AND '2015-07-04'
css
CREATE TABLE Catalogs ( catalog_id INTEGER, catalog_name VARCHAR(50), catalog_publisher VARCHAR(80), date_of_publication DATETIME, date_of_latest_revision DATETIME ) CREATE TABLE Catalog_Contents_Additional_Attributes ( catalog_entry_id INTEGER, catalog_level_number INTEGER, attribute_i...
SELECT catalog_level_name, catalog_level_number FROM Catalog_Structure WHERE catalog_level_number BETWEEN 5 AND 10
nvbench
CREATE TABLE table_name_6 ( model VARCHAR, mpg_uk_combined VARCHAR, l_100km_urban__cold_ VARCHAR, green_rating VARCHAR, manufacturer VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What model has a g green rating, has chrysler jeep as a manufactur...
SELECT model FROM table_name_6 WHERE green_rating = "g" AND manufacturer = "chrysler jeep" AND l_100km_urban__cold_ < 18 AND mpg_uk_combined = 27.7
sql_create_context
CREATE TABLE table_name_13 ( event VARCHAR, time VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What event has a 0:49 time?
SELECT event FROM table_name_13 WHERE time = "0:49"
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 jybgb.BGDH FROM hz_info JOIN mzjzjlb JOIN jybgb JOIN mzjzjlb_jybgb ON hz_info.YLJGDM = mzjzjlb.YLJGDM AND hz_info.KH = mzjzjlb.KH AND hz_info.KLX = mzjzjlb.KLX AND mzjzjlb.YLJGDM = mzjzjlb_jybgb.YLJGDM_MZJZJLB AND mzjzjlb.JZLSH = jybgb.JZLSH_MZJZJLB AND mzjzjlb_jybgb.YLJGDM = jybgb.YLJGDM AND mzjzjlb_jybgb.BGDH ...
css
CREATE TABLE table_65724 ( "School" text, "Location" text, "Mascot" text, "Enrollment" real, "IHSAA Class" text, "# / County" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What's the location of the school having the panthers as a mascot with a...
SELECT "Location" FROM table_65724 WHERE "IHSAA Class" = 'aaa' AND "Mascot" = 'panthers'
wikisql
CREATE TABLE fare ( fare_id int, from_airport varchar, to_airport varchar, fare_basis_code text, fare_airline text, restriction_code text, one_direction_cost int, round_trip_cost int, round_trip_required varchar ) CREATE TABLE dual_carrier ( main_airline varchar, low_flight_...
SELECT DISTINCT flight.flight_id FROM airport_service AS AIRPORT_SERVICE_0, airport_service AS AIRPORT_SERVICE_1, city AS CITY_0, city AS CITY_1, date_day, days, flight WHERE ((CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'DALLAS' AND date_day.day_number = 27 AND date_day.month_number = 8 AND d...
atis
CREATE TABLE stadium ( capacity INTEGER, opening_year VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the average capacity of the stadiums that were opened in year 2005?
SELECT AVG(capacity) FROM stadium WHERE opening_year = 2005
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 lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.diagnosis = "MORBID OBESITY/SDA" AND lab.fluid = "Cerebrospinal Fluid (CSF)"
mimicsql_data
CREATE TABLE table_72758 ( "Appearances" real, "School" text, "Wins" real, "Losses" real, "Percent" text, "Last Appearance" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- How many wins did Baylor have?
SELECT COUNT("Wins") FROM table_72758 WHERE "School" = 'Baylor'
wikisql
CREATE TABLE table_43754 ( "Place" text, "Player" text, "Country" text, "Score" text, "To par" text, "Hole" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What was the score for United States when the player was Mike Reid and the To par was e?
SELECT "Score" FROM table_43754 WHERE "Country" = 'united states' AND "To par" = 'e' AND "Player" = 'mike reid'
wikisql
CREATE TABLE treatment ( treatmentid number, patientunitstayid number, treatmentname text, treatmenttime time ) CREATE TABLE cost ( costid number, uniquepid text, patienthealthsystemstayid number, eventtype text, eventid number, chargetime time, cost number ) CREATE TABLE p...
SELECT COUNT(DISTINCT t1.uniquepid) FROM (SELECT patient.uniquepid, treatment.treatmenttime, patient.patienthealthsystemstayid FROM treatment JOIN patient ON treatment.patientunitstayid = patient.patientunitstayid WHERE treatment.treatmentname = 'beta blocker - esmolol' AND STRFTIME('%y', treatment.treatmenttime) >= '2...
eicu
CREATE TABLE table_203_299 ( id number, "year" number, "competition" text, "venue" text, "position" text, "notes" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- how many 4x 100m relays were run ?
SELECT COUNT(*) FROM table_203_299 WHERE "notes" = '4x100m relay'
squall
CREATE TABLE table_8961 ( "Tournament" text, "Country" text, "Location" text, "Began" real, "Court surface" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- what is the court surface when the tournament is paris masters?
SELECT "Court surface" FROM table_8961 WHERE "Tournament" = 'paris masters'
wikisql
CREATE TABLE table_204_379 ( id number, "year" text, "title" text, "hangul" text, "network" text, "further info" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- what is the name of the last network listed on this chart ?
SELECT "network" FROM table_204_379 ORDER BY id DESC LIMIT 1
squall
CREATE TABLE lab ( labid number, patientunitstayid number, labname text, labresult number, labresulttime time ) CREATE TABLE cost ( costid number, uniquepid text, patienthealthsystemstayid number, eventtype text, eventid number, chargetime time, cost number ) CREATE TAB...
SELECT t3.diagnosisname FROM (SELECT t2.diagnosisname, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM (SELECT patient.uniquepid, treatment.treatmenttime, patient.patienthealthsystemstayid FROM treatment JOIN patient ON treatment.patientunitstayid = patient.patientunitstayid WHERE treatment.treatmentname = 'antip...
eicu
CREATE TABLE table_203_204 ( id number, "year" number, "film" text, "language" text, "actors" text, "music" text, "banner" text, "note" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- how many films were directed by sridhar after the year...
SELECT COUNT("film") FROM table_203_204 WHERE "year" > 1961
squall
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 t_kc22 WHERE t_kc22.t_kc21_PERSON_ID = '55722979' AND t_kc22.STA_DATE BETWEEN '2001-09-01' AND '2015-06-25' AND t_kc22.t_kc21_MED_SER_ORG_NO = '5394717' AND t_kc22.MED_INV_ITEM_TYPE = '检查费'
css
CREATE TABLE table_name_37 ( week VARCHAR, result VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- How many weeks do they have a bye?
SELECT COUNT(week) FROM table_name_37 WHERE result = "bye"
sql_create_context
CREATE TABLE table_17839_1 ( length VARCHAR, map_colour VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- When turquoise is the map colour what is the length?
SELECT length FROM table_17839_1 WHERE map_colour = "Turquoise"
sql_create_context
CREATE TABLE table_2679061_4 ( nationality VARCHAR, player VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the nationality of Bob Essensa?
SELECT nationality FROM table_2679061_4 WHERE player = "Bob Essensa"
sql_create_context
CREATE TABLE table_204_461 ( id number, "res." text, "record" text, "opponent" text, "method" text, "event" text, "date" text, "round" number, "time" text, "location" text, "notes" text ) -- Using valid SQLite, answer the following questions for the tables provided above. ...
SELECT COUNT(*) FROM table_204_461 WHERE "res." = 'loss'
squall
CREATE TABLE table_name_56 ( tournament VARCHAR, margin_of_victory VARCHAR, date VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the name of the tournament played on Sep 20, 1981, ending with a margin of vicroty of 2 strokes?
SELECT tournament FROM table_name_56 WHERE margin_of_victory = "2 strokes" AND date = "sep 20, 1981"
sql_create_context
CREATE TABLE table_74042 ( "Position" text, "Name" text, "Rider" text, "Age" real, "Weight" text, "Starting price" text, "Distance" text, "Prize money" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- How much did Nina Carberry win?
SELECT "Prize money" FROM table_74042 WHERE "Rider" = 'Nina Carberry'
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 demographic.gender, diagnoses.long_title FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE demographic.subject_id = "2110"
mimicsql_data
CREATE TABLE table_71605 ( "Date" text, "Round" text, "Opponents" text, "H / A" text, "Result F\u2013A" text, "Attendance" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the sum of attendance for H/A values of 'n'?
SELECT SUM("Attendance") FROM table_71605 WHERE "H / A" = 'n'
wikisql
CREATE TABLE procedures ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) CREATE TABLE demographic ( subject_id text, hadm_id text, name text, marital_status text, age text, dob text, gender text, language text, religion text, ...
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.admityear < "2146" AND procedures.short_title = "Cardiopulm resuscita NOS"
mimicsql_data
CREATE TABLE table_34121 ( "Game" real, "Date" text, "Opponent" text, "Result" text, "Bulls score" real, "Opponent score" real, "Record" text, "Streak" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which Record has an Opponent score sma...
SELECT "Record" FROM table_34121 WHERE "Opponent score" < '100' AND "Date" = 'december 6'
wikisql
CREATE TABLE PostNoticeTypes ( Id number, ClassId number, Name text, Body text, IsHidden boolean, Predefined boolean, PostNoticeDurationId number ) CREATE TABLE SuggestedEditVotes ( Id number, SuggestedEditId number, UserId number, VoteTypeId number, CreationDate time, ...
SELECT DATEDIFF(month, u.CreationDate, CAST(GETDATE() AS DATE)) AS Months, AVG(CAST(u.Reputation AS DECIMAL)) FROM Users AS u GROUP BY DATEDIFF(month, u.CreationDate, CAST(GETDATE() AS DATE)) ORDER BY DATEDIFF(month, u.CreationDate, CAST(GETDATE() AS DATE))
sede
CREATE TABLE table_28634206_1 ( miss_universe VARCHAR, country VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- How many miss universes did south africa have?
SELECT COUNT(miss_universe) FROM table_28634206_1 WHERE country = "South Africa"
sql_create_context
CREATE TABLE table_13941 ( "Rank" real, "Athlete" text, "Country" text, "Time" text, "Notes" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What are the notes for Zimbabwe?
SELECT "Notes" FROM table_13941 WHERE "Country" = 'zimbabwe'
wikisql
CREATE TABLE table_name_91 ( tv_time VARCHAR, date VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is TV Time, when Date is December 22, 1996?
SELECT tv_time FROM table_name_91 WHERE date = "december 22, 1996"
sql_create_context
CREATE TABLE table_name_44 ( winners VARCHAR, runners_up VARCHAR, third VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Who was the winner in the competition in which Lyn took third place and Lillestr m was the runner-up?
SELECT winners FROM table_name_44 WHERE runners_up = "lillestrøm" AND third = "lyn"
sql_create_context
CREATE TABLE table_45566 ( "City" text, "Country" text, "IATA" text, "ICAO" text, "Airport" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the Airport in Singapore?
SELECT "Airport" FROM table_45566 WHERE "Country" = 'singapore'
wikisql
CREATE TABLE table_65648 ( "Rank" text, "Nation" text, "Gold" real, "Silver" real, "Bronze" real, "Total" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the fewest gold medals when there is 0 bronze medals, and the rank is 19, and silver...
SELECT MIN("Gold") FROM table_65648 WHERE "Bronze" = '0' AND "Rank" = '19' AND "Silver" < '1'
wikisql
CREATE TABLE table_5489 ( "Frequency" real, "Callsign" text, "Brand" text, "Format" text, "City of License" text, "Website" text, "Webcast" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which Webcast has the digital1073.com website?
SELECT "Webcast" FROM table_5489 WHERE "Website" = 'digital1073.com'
wikisql
CREATE TABLE table_name_71 ( to_par VARCHAR, country VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is Top Par, when Country is Sweden?
SELECT to_par FROM table_name_71 WHERE country = "sweden"
sql_create_context
CREATE TABLE table_38727 ( "Res." text, "Record" text, "Opponent" text, "Method" text, "Event" text, "Round" real, "Time" text, "Location" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which opponent has a time of 1:50?
SELECT "Opponent" FROM table_38727 WHERE "Time" = '1:50'
wikisql
CREATE TABLE table_35227 ( "Res." text, "Record" text, "Opponent" text, "Method" text, "Event" text, "Round" real, "Time" text, "Location" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which Time has an Opponent of shamil abdurahimov?
SELECT "Time" FROM table_35227 WHERE "Opponent" = 'shamil abdurahimov'
wikisql
CREATE TABLE table_10648 ( "Tournament" text, "Winner" text, "Runner-up" text, "Score" text, "Third Place" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Tell me the runner-up for majorca
SELECT "Runner-up" FROM table_10648 WHERE "Tournament" = 'majorca'
wikisql
CREATE TABLE TRANSACTIONS ( amount_of_transaction INTEGER ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Show the maximum amount of transaction.
SELECT MAX(amount_of_transaction) FROM TRANSACTIONS
sql_create_context
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, demographic.discharge_location FROM demographic WHERE demographic.subject_id = "17772"
mimicsql_data
CREATE TABLE table_name_2 ( date VARCHAR, tie_no VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What was the date of tie number 5?
SELECT date FROM table_name_2 WHERE tie_no = "5"
sql_create_context
CREATE TABLE artists ( id INTEGER, name VARCHAR(120) ) CREATE TABLE sqlite_sequence ( name any, seq any ) CREATE TABLE tracks ( id INTEGER, name VARCHAR(200), album_id INTEGER, media_type_id INTEGER, genre_id INTEGER, composer VARCHAR(220), milliseconds INTEGER, bytes I...
SELECT T1.name, COUNT(*) FROM genres AS T1 JOIN tracks AS T2 ON T2.genre_id = T1.id GROUP BY T1.id ORDER BY COUNT(*) DESC LIMIT 5
nvbench
CREATE TABLE employees ( EMPLOYEE_ID decimal(6,0), FIRST_NAME varchar(20), LAST_NAME varchar(25), EMAIL varchar(25), PHONE_NUMBER varchar(20), HIRE_DATE date, JOB_ID varchar(10), SALARY decimal(8,2), COMMISSION_PCT decimal(2,2), MANAGER_ID decimal(6,0), DEPARTMENT_ID decimal(...
SELECT JOB_ID, EMPLOYEE_ID FROM employees WHERE NOT DEPARTMENT_ID IN (SELECT DEPARTMENT_ID FROM departments WHERE MANAGER_ID BETWEEN 100 AND 200) ORDER BY JOB_ID DESC
nvbench
CREATE TABLE table_14006_1 ( bleeding_time VARCHAR, platelet_count VARCHAR, prothrombin_time VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- what's the bleeding time with platelet count being decreased and prothrombin time being prolonged
SELECT bleeding_time FROM table_14006_1 WHERE platelet_count = "Decreased" AND prothrombin_time = "Prolonged"
sql_create_context