instruction
stringlengths
151
7.46k
output
stringlengths
2
4.44k
source
stringclasses
26 values
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 zyjzjlb.RZBQDM, zyjzjlb.RZBQMC, zyjzjlb.RYCWH FROM zyjzjlb WHERE zyjzjlb.JZLSH = '57073431477'
css
CREATE TABLE table_name_30 ( not_usable INTEGER, block VARCHAR, launch_failures VARCHAR, retired VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the highest number of not usable satellites when there are more than 0 launch failures, less than ...
SELECT MAX(not_usable) FROM table_name_30 WHERE launch_failures > 0 AND retired < 30 AND block = "block i"
sql_create_context
CREATE TABLE people ( People_ID int, Name text, Country text, Is_Male text, Age int ) CREATE TABLE wedding ( Church_ID int, Male_ID int, Female_ID int, Year int ) CREATE TABLE church ( Church_ID int, Name text, Organized_by text, Open_Date int, Continuation_of t...
SELECT Country, COUNT(*) FROM people GROUP BY Country ORDER BY COUNT(*) DESC
nvbench
CREATE TABLE table_25939 ( "SF Round" real, "Country" text, "Location" text, "Date" text, "Driver" text, "Race 1(pts)" real, "Race 2(pts)" real, "Race Total(pts)" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- How many dates have a total...
SELECT COUNT("Date") FROM table_25939 WHERE "Race Total(pts)" = '180'
wikisql
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 prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE demographic.gender = "F" AND prescriptions.formulary_drug_cd = "AMIO150I"
mimicsql_data
CREATE TABLE table_204_790 ( id number, "year" number, "nw rank" number, "venue" text, "opp rank" number, "opponent" text, "score" text, "w/l" text, "round" text, "notes" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- what was th...
SELECT ABS("score" - "score") FROM table_204_790 WHERE "year" = 1996
squall
CREATE TABLE product_suppliers ( product_id number, supplier_id number, date_supplied_from time, date_supplied_to time, total_amount_purchased text, total_value_purchased number ) CREATE TABLE supplier_addresses ( supplier_id number, address_id number, date_from time, date_to ti...
SELECT AVG(product_price) FROM products WHERE product_type_code = 'Clothes'
spider
CREATE TABLE table_68288 ( "Place" text, "Player" text, "Country" text, "Score" text, "To par" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which score has t3 as the place?
SELECT "Score" FROM table_68288 WHERE "Place" = 't3'
wikisql
CREATE TABLE t_kc22 ( MED_EXP_DET_ID text, OVERALL_CD_ORG text, OVERALL_CD_PERSON text, MED_CLINIC_ID text, MED_EXP_BILL_ID text, SOC_SRT_DIRE_CD text, SOC_SRT_DIRE_NM text, DIRE_TYPE number, CHA_ITEM_LEV number, MED_INV_ITEM_TYPE text, MED_DIRE_CD text, MED_DIRE_NM text,...
SELECT t_kc22.SOC_SRT_DIRE_CD, t_kc22.SOC_SRT_DIRE_NM, t_kc22.QTY, t_kc22.UNIVALENT, t_kc22.AMOUNT FROM t_kc21 JOIN t_kc22 ON t_kc21.MED_CLINIC_ID = t_kc22.MED_CLINIC_ID WHERE t_kc21.PERSON_ID = '40176918' AND t_kc21.IN_HOSP_DATE BETWEEN '2002-08-23' AND '2002-12-05'
css
CREATE TABLE table_52685 ( "Driver" text, "Constructor" text, "Laps" real, "Time/Retired" text, "Grid" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the average grid for piers courage?
SELECT AVG("Grid") FROM table_52685 WHERE "Driver" = 'piers courage'
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 lab ( subject_id text, hadm_id text, itemid text, charttime text, flag text, value_unit text,...
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE diagnoses.long_title = "Other shock without mention of trauma" AND lab.flag = "abnormal"
mimicsql_data
CREATE TABLE table_dev_36 ( "id" int, "gender" string, "prediabetes" bool, "leukopenia" int, "hemoglobin_a1c_hba1c" float, "cd4_count" int, "platelets" int, "hematocrit_hct" float, "fasting_triglycerides" int, "hyperlipidemia" bool, "lymphopenia" int, "fasting_ldl_cholest...
SELECT * FROM table_dev_36 WHERE (fasting_glucose >= 100 AND fasting_glucose <= 125) OR (hemoglobin_a1c_hba1c >= 5.7 AND hemoglobin_a1c_hba1c <= 6.4) OR (prediabetes = 1 OR impaired_fasting_glucose = 1)
criteria2sql
CREATE TABLE demographic ( subject_id text, hadm_id text, name text, marital_status text, age text, dob text, gender text, language text, religion text, admission_type text, days_stay text, insurance text, ethnicity text, expire_flag text, admission_location t...
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.marital_status = "SINGLE" AND lab.itemid = "51250"
mimicsql_data
CREATE TABLE table_name_73 ( player VARCHAR, total VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is Player, when Total is '154'?
SELECT player FROM table_name_73 WHERE total = "154"
sql_create_context
CREATE TABLE jobs ( JOB_ID varchar(10), JOB_TITLE varchar(35), MIN_SALARY decimal(6,0), MAX_SALARY decimal(6,0) ) CREATE TABLE locations ( LOCATION_ID decimal(4,0), STREET_ADDRESS varchar(40), POSTAL_CODE varchar(12), CITY varchar(30), STATE_PROVINCE varchar(25), COUNTRY_ID varc...
SELECT PHONE_NUMBER, SALARY FROM employees WHERE NOT DEPARTMENT_ID IN (SELECT DEPARTMENT_ID FROM departments WHERE MANAGER_ID BETWEEN 100 AND 200) ORDER BY PHONE_NUMBER
nvbench
CREATE TABLE table_39143 ( "FOURCC" text, "DX 10 Name" text, "Description" text, "Alpha premultiplied?" text, "Compression ratio" text, "Texture Type" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which DX 10 Name that has a No Alpha premultipl...
SELECT "DX 10 Name" FROM table_39143 WHERE "Alpha premultiplied?" = 'no' AND "Description" = 'explicit alpha'
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 hz_info JOIN mzjzjlb JOIN jybgb JOIN jyjgzbb JOIN jybgb_jyjgzbb ON hz_info.YLJGDM = mzjzjlb.YLJGDM AND hz_info.KH = mzjzjlb.KH AND hz_info.KLX = mzjzjlb.KLX AND mzjzjlb.YLJGDM = jybgb.YLJGDM_MZJZJLB AND mzjzjlb.JZLSH = jybgb.JZLSH_MZJZJLB AND jybgb.YLJGDM = jybgb_jyjgzbb.Y...
css
CREATE TABLE table_name_8 ( Id VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the sum of 1938 values where 1933 values are under 68.3 and 1940 valures are under 4.02?
SELECT SUM(1938) FROM table_name_8 WHERE 1933 < 68.3 AND 1940 < 4.02
sql_create_context
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.ethnicity = "AMERICAN INDIAN/ALASKA NATIVE" AND prescriptions.drug = "Syringe (Neonatal) *D5W*"
mimicsql_data
CREATE TABLE course_prerequisite ( pre_course_id int, course_id int ) CREATE TABLE area ( course_id int, area varchar ) CREATE TABLE offering_instructor ( offering_instructor_id int, offering_id int, instructor_id int ) CREATE TABLE student ( student_id int, lastname varchar, ...
SELECT DISTINCT course_offering.friday, course_offering.monday, course_offering.saturday, course_offering.sunday, course_offering.thursday, course_offering.tuesday, course_offering.wednesday, semester.semester, semester.year FROM course, course_offering, semester WHERE course.course_id = course_offering.course_id AND c...
advising
CREATE TABLE table_203_405 ( id number, "week" number, "date" text, "opponent" text, "result" text, "attendance" number ) -- Using valid SQLite, answer the following questions for the tables provided above. -- what was the difference between the attendance in week two and the attendance in we...
SELECT (SELECT "attendance" FROM table_203_405 WHERE "week" = 2) - (SELECT "attendance" FROM table_203_405 WHERE "week" = 1)
squall
CREATE TABLE table_5242 ( "Years" text, "Building" text, "City" text, "Height" text, "Storeys" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which building has 26 storeys?
SELECT "Building" FROM table_5242 WHERE "Storeys" = '26'
wikisql
CREATE TABLE Roles ( role_code CHAR(15), role_description VARCHAR(255) ) CREATE TABLE Addresses ( address_id INTEGER, address_details VARCHAR(255) ) CREATE TABLE Documents_Mailed ( document_id INTEGER, mailed_to_address_id INTEGER, mailing_date DATETIME ) CREATE TABLE Circulation_History ...
SELECT T1.role_code, COUNT(*) FROM Roles AS T1 JOIN Employees AS T2 ON T1.role_code = T2.role_code GROUP BY T2.role_code ORDER BY COUNT(*)
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 demographic ( subject_id text, hadm_id t...
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE diagnoses.short_title = "Neutropenia NOS" AND prescriptions.drug_type = "MAIN"
mimicsql_data
CREATE TABLE table_57196 ( "Date" text, "Course" text, "Distance" text, "Type" text, "Winner" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What was the date with a hilly stage?
SELECT "Date" FROM table_57196 WHERE "Type" = 'hilly stage'
wikisql
CREATE TABLE table_17855 ( "Club" text, "Played" text, "Won" text, "Drawn" text, "Lost" text, "Points for" text, "Points against" text, "Tries for" text, "Tries against" text, "Try bonus" text, "Losing bonus" text, "Points" text ) -- Using valid SQLite, answer the follo...
SELECT COUNT("Try bonus") FROM table_17855 WHERE "Tries against" = '41'
wikisql
CREATE TABLE table_21775 ( "Club" text, "Played" text, "Won" text, "Drawn" text, "Lost" text, "Points for" text, "Points against" text, "Points difference" text, "Bonus Points" text, "Points" text ) -- Using valid SQLite, answer the following questions for the tables provided a...
SELECT COUNT("Won") FROM table_21775 WHERE "Points against" = '410'
wikisql
CREATE TABLE basketball_match ( Team_ID int, School_ID int, Team_Name text, ACC_Regular_Season text, ACC_Percent text, ACC_Home text, ACC_Road text, All_Games text, All_Games_Percent int, All_Home text, All_Road text, All_Neutral text ) CREATE TABLE university ( Scho...
SELECT All_Home, School_ID FROM basketball_match GROUP BY ACC_Home, All_Home ORDER BY All_Home DESC
nvbench
CREATE TABLE table_64723 ( "Date" text, "Tournament" text, "Surface" text, "Opponent" text, "Score" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What was the date of the tournament with a clay surface and an opponent of Irina Falconi?
SELECT "Date" FROM table_64723 WHERE "Surface" = 'clay' AND "Opponent" = 'irina falconi'
wikisql
CREATE TABLE table_47369 ( "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. -- Who ha...
SELECT "High rebounds" FROM table_47369 WHERE "Score" = 'l 85–102 (ot)'
wikisql
CREATE TABLE county_public_safety ( County_ID int, Name text, Population int, Police_officers int, Residents_per_officer int, Case_burden int, Crime_rate real, Police_force text, Location text ) CREATE TABLE city ( City_ID int, County_ID int, Name text, White real, ...
SELECT White, Crime_rate FROM city AS T1 JOIN county_public_safety AS T2 ON T1.County_ID = T2.County_ID
nvbench
CREATE TABLE table_52452 ( "Round" real, "Grand Prix" text, "Pole Position" text, "Fastest Lap" text, "Winning Driver" text, "Winning Constructor" text, "Report" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Who had the fastest lap at the A...
SELECT "Fastest Lap" FROM table_52452 WHERE "Grand Prix" = 'australian grand prix'
wikisql
CREATE TABLE table_name_31 ( goals INTEGER, matches INTEGER ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the sum of Goals, when Matches is less than 29?
SELECT SUM(goals) FROM table_name_31 WHERE matches < 29
sql_create_context
CREATE TABLE table_20989 ( "Year" real, "Starts" real, "Wins" real, "Top 5" real, "Top 10" real, "Poles" real, "Avg. Start" text, "Avg. Finish" text, "Winnings" text, "Position" text, "Team(s)" text ) -- Using valid SQLite, answer the following questions for the tables prov...
SELECT "Winnings" FROM table_20989 WHERE "Starts" = '7'
wikisql
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 diagnoses_icd ( row_id number, subject_id number, hadm_id number, icd9_code text, charttime ti...
SELECT COUNT(DISTINCT icustays.icustay_id) FROM icustays WHERE icustays.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 57023) AND DATETIME(icustays.intime, 'start of year') = DATETIME(CURRENT_TIME(), 'start of year', '-0 year')
mimic_iii
CREATE TABLE table_name_90 ( manager VARCHAR, shirt_sponsor VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which manager sponsor arke shirt?
SELECT manager FROM table_name_90 WHERE shirt_sponsor = "arke"
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 AVG(demographic.age) FROM demographic WHERE demographic.marital_status = "SINGLE" AND demographic.diagnosis = "BRADYCARDIA"
mimicsql_data
CREATE TABLE zyjybgb ( BBCJBW text, BBDM text, BBMC text, BBZT number, BGDH number, 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, ...
SELECT * FROM zyjybgb WHERE zyjybgb.JZLSH = '86486560437' UNION SELECT * FROM mzjybgb WHERE mzjybgb.JZLSH = '86486560437'
css
CREATE TABLE Votes ( Id number, PostId number, VoteTypeId number, UserId number, CreationDate time, BountyAmount number ) CREATE TABLE Users ( Id number, Reputation number, CreationDate time, DisplayName text, LastAccessDate time, WebsiteUrl text, Location text, ...
SELECT * FROM (SELECT UserId FROM Badges GROUP BY UserId) AS data
sede
CREATE TABLE table_name_33 ( week INTEGER, result VARCHAR, attendance VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What's the week when the result was W 38-24 and attendance was less than 43,449?
SELECT SUM(week) FROM table_name_33 WHERE result = "w 38-24" AND attendance < 43 OFFSET 449
sql_create_context
CREATE TABLE table_880 ( "Position" real, "Artist" text, "Song title" text, "Highest position" real, "Points" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- what's the highest position with artbeingt being frankie avalon
SELECT "Highest position" FROM table_880 WHERE "Artist" = 'Frankie Avalon'
wikisql
CREATE TABLE table_name_34 ( area INTEGER, capital VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the average area with valpara so as the capital?
SELECT AVG(area) FROM table_name_34 WHERE capital = "valparaíso"
sql_create_context
CREATE TABLE table_name_20 ( score VARCHAR, time VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Name the score for 1:36 time
SELECT score FROM table_name_20 WHERE time = "1:36"
sql_create_context
CREATE TABLE table_name_42 ( gold INTEGER, silver VARCHAR, total VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the smallest number of gold where the total is less than 3 and the silver count is 2?
SELECT MIN(gold) FROM table_name_42 WHERE silver = 2 AND total < 3
sql_create_context
CREATE TABLE table_name_87 ( country VARCHAR, killed VARCHAR, year VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is Country, when Killed is '100.9', and when Year is greater than 1939.9?
SELECT country FROM table_name_87 WHERE killed = 100.9 AND year > 1939.9
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.OUT_DIAG_DOC_CD, qtb.OUT_DIAG_DOC_NM FROM qtb WHERE qtb.PERSON_NM = '葛玉山' GROUP BY qtb.OUT_DIAG_DOC_CD ORDER BY COUNT(*) DESC UNION SELECT gyb.OUT_DIAG_DOC_CD, gyb.OUT_DIAG_DOC_NM FROM gyb WHERE gyb.PERSON_NM = '葛玉山' GROUP BY gyb.OUT_DIAG_DOC_CD ORDER BY COUNT(*) DESC UNION SELECT zyb.OUT_DIAG_DOC_CD, zyb.OU...
css
CREATE TABLE culture_company ( Company_name text, Type text, Incorporated_in text, Group_Equity_Shareholding real, book_club_id text, movie_id text ) CREATE TABLE movie ( movie_id int, Title text, Year int, Director text, Budget_million real, Gross_worldwide int ) CREAT...
SELECT Category, COUNT(*) FROM book_club GROUP BY Category ORDER BY COUNT(*)
nvbench
CREATE TABLE table_30264 ( "Pick #" real, "CFL Team" text, "Player" text, "Position" text, "College" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- How many positions does Trent Bagnail play?
SELECT COUNT("Position") FROM table_30264 WHERE "Player" = 'Trent Bagnail'
wikisql
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 lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.days_stay > "3" AND lab.fluid = "Pleural"
mimicsql_data
CREATE TABLE lab ( subject_id text, hadm_id text, itemid text, charttime text, flag text, value_unit text, label text, fluid text ) CREATE TABLE procedures ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) CREATE TABLE prescription...
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.diagnosis = "ABDOMINAL PAIN" AND demographic.age < "72"
mimicsql_data
CREATE TABLE table_19753079_35 ( party VARCHAR, candidates VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Name the party for yvette clarke (d) 90.6% hugh carr (r) 9.4%
SELECT party FROM table_19753079_35 WHERE candidates = "Yvette Clarke (D) 90.6% Hugh Carr (R) 9.4%"
sql_create_context
CREATE TABLE PostNotices ( Id number, PostId number, PostNoticeTypeId number, CreationDate time, DeletionDate time, ExpiryDate time, Body text, OwnerUserId number, DeletionUserId number ) CREATE TABLE PostHistoryTypes ( Id number, Name text ) CREATE TABLE SuggestedEdits ( ...
SELECT p.Id, p.Title, p.Body, p.Tags, p.CreationDate FROM Posts AS p INNER JOIN PostTags AS pt ON pt.PostId = p.Id INNER JOIN Tags AS t ON pt.TagId = t.Id WHERE p.PostTypeId = 1 AND p.CreationDate <= '2016-08-31 23:59:00.000' AND t.TagName IN ('security')
sede
CREATE TABLE hz_info ( KH text, KLX number, RYBH text, YLJGDM text ) CREATE TABLE zyjzjlb ( CYBQDM text, CYBQMC text, CYCWH text, CYKSDM text, CYKSMC text, CYSJ time, CYZTDM number, HZXM text, JZKSDM text, JZKSMC text, JZLSH text, KH text, KLX number,...
SELECT mzjzjlb.SG, mzjzjlb.TZ 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 = '陶雅昶'
css
CREATE TABLE table_name_77 ( points INTEGER, played INTEGER ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the average points with less than 30 played?
SELECT AVG(points) FROM table_name_77 WHERE played < 30
sql_create_context
CREATE TABLE table_20360 ( "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 t...
SELECT "Team" FROM table_20360 WHERE "High assists" = 'Rafer Alston (5)'
wikisql
CREATE TABLE fires ( fire_year number, discovery_date number, discovery_doy number, discovery_time text, stat_cause_code number, stat_cause_descr text, cont_date text, cont_doy text, cont_time text, fire_size number, fire_size_class text, latitude number, longitude nu...
SELECT stat_cause_descr FROM fires WHERE fire_year BETWEEN 2000 AND 2005 GROUP BY stat_cause_descr ORDER BY COUNT(*) DESC LIMIT 1
uswildfires
CREATE TABLE t_kc22 ( MED_EXP_DET_ID text, OVERALL_CD_ORG text, OVERALL_CD_PERSON text, MED_CLINIC_ID text, MED_EXP_BILL_ID text, SOC_SRT_DIRE_CD text, SOC_SRT_DIRE_NM text, DIRE_TYPE number, CHA_ITEM_LEV number, MED_INV_ITEM_TYPE text, MED_DIRE_CD text, MED_DIRE_NM text,...
SELECT t_kc21.MED_ORG_DEPT_NM, AVG(t_kc24.OVE_PAY / t_kc24.MED_AMOUT) FROM t_kc21 JOIN t_kc24 ON t_kc21.MED_CLINIC_ID = t_kc24.MED_CLINIC_ID WHERE t_kc21.MED_SER_ORG_NO = '9886124' GROUP BY t_kc21.MED_ORG_DEPT_NM
css
CREATE TABLE table_26976615_3 ( date_of_appointment VARCHAR, date_of_vacancy VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- How many date of appointments are there when the date of vacancy was 2 october 2010?
SELECT COUNT(date_of_appointment) FROM table_26976615_3 WHERE date_of_vacancy = "2 October 2010"
sql_create_context
CREATE TABLE hz_info ( KH text, KLX number, YLJGDM text, RYBH text ) 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, ...
(SELECT jybgb.SHSJ 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 = '16591301' AND jybgb.BGRQ BETWEEN '2004-05-15' AND '2008-03-25') UNI...
css
CREATE TABLE record ( ID int, Result text, Swimmer_ID int, Event_ID int ) CREATE TABLE swimmer ( ID int, name text, Nationality text, meter_100 real, meter_200 text, meter_300 text, meter_400 text, meter_500 text, meter_600 text, meter_700 text, Time text ) ...
SELECT meter_700, ID FROM swimmer
nvbench
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 allergy ( allergy...
SELECT DISTINCT cost.cost FROM cost WHERE cost.eventtype = 'diagnosis' AND cost.eventid IN (SELECT diagnosis.diagnosisid FROM diagnosis WHERE diagnosis.diagnosisname = 'oliguria - kidney transplant')
eicu
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 ACC_Road, Team_ID FROM basketball_match GROUP BY ACC_Home, ACC_Road ORDER BY ACC_Road DESC
nvbench
CREATE TABLE table_69554 ( "Year" real, "Song" text, "Work done" text, "Artist(s)" text, "Album" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which 2006 Cobra Starship song has work done of guest vocals?
SELECT "Song" FROM table_69554 WHERE "Work done" = 'guest vocals' AND "Year" = '2006' AND "Artist(s)" = 'cobra starship'
wikisql
CREATE TABLE table_48324 ( "Year" real, "Venue" text, "Winner" text, "Runner Up" text, "Third Place" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- In what year was this event held in Oslo, Norway?
SELECT "Year" FROM table_48324 WHERE "Venue" = 'oslo, norway'
wikisql
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 prescriptions.drug_dose FROM prescriptions WHERE prescriptions.drug = "Miconazole Powder 2%"
mimicsql_data
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 prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE demographic.dob_year < "2182" AND prescriptions.drug_type = "ADDITIVE"
mimicsql_data
CREATE TABLE table_train_110 ( "id" int, "cholesterol" float, "body_weight" float, "creatinine_clearance_cl" float, "triglyceride_tg" float, "age" float, "NOUSE" float ) -- Using valid SQLite, answer the following questions for the tables provided above. -- creatinine > 1.99 mg / dl at ba...
SELECT * FROM table_train_110 WHERE creatinine_clearance_cl > 1.99
criteria2sql
CREATE TABLE table_15094 ( "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 day did the Diamondbacks go 2-7?
SELECT "Date" FROM table_15094 WHERE "Opponent" = 'diamondbacks' AND "Score" = '2-7'
wikisql
CREATE TABLE table_name_21 ( area__km_2__ INTEGER, area__sq_mi_ VARCHAR, location VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the average area in New York that is larger than 55 sq mi?
SELECT AVG(area__km_2__) FROM table_name_21 WHERE area__sq_mi_ > 55 AND location = "new york"
sql_create_context
CREATE TABLE table_71757 ( "Date" real, "Category" text, "Team" text, "Rider 1" text, "Rider 2" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which category earlier than 2006 has Bart Brentjens as rider 2?
SELECT "Category" FROM table_71757 WHERE "Date" < '2006' AND "Rider 2" = 'bart brentjens'
wikisql
CREATE TABLE conference ( cid int, homepage varchar, name varchar ) CREATE TABLE domain_author ( aid int, did int ) CREATE TABLE publication ( abstract varchar, cid int, citation_num int, jid int, pid int, reference_num int, title varchar, year int ) CREATE TABLE d...
SELECT homepage FROM conference WHERE name = 'VLDB'
academic
CREATE TABLE table_name_47 ( entrant VARCHAR, engine VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which Entrant has a vanwall straight-4 engine?
SELECT entrant FROM table_name_47 WHERE engine = "vanwall straight-4"
sql_create_context
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 demographic.admission_location, demographic.admittime FROM demographic WHERE demographic.subject_id = "31066"
mimicsql_data
CREATE TABLE Ref_Locations ( Location_Code CHAR(15), Location_Name VARCHAR(255), Location_Description VARCHAR(255) ) CREATE TABLE Ref_Document_Types ( Document_Type_Code CHAR(15), Document_Type_Name VARCHAR(255), Document_Type_Description VARCHAR(255) ) CREATE TABLE Documents_to_be_Destroyed (...
SELECT Date_in_Locaton_To, COUNT(Date_in_Locaton_To) FROM Document_Locations
nvbench
CREATE TABLE table_name_97 ( position INTEGER, speed VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the average Position, when Speed is '143.5km/h'?
SELECT AVG(position) FROM table_name_97 WHERE speed = "143.5km/h"
sql_create_context
CREATE TABLE table_49679 ( "Player" text, "Country" text, "Year(s) won" text, "Total" real, "To par" text, "Finish" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which years was there a To par of +1?
SELECT "Year(s) won" FROM table_49679 WHERE "To par" = '+1'
wikisql
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.admityear < "2170" AND prescriptions.route = "IV BOLUS"
mimicsql_data
CREATE TABLE table_name_42 ( nickname VARCHAR, colors VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the nickname of the team that has the colors blue and gold?
SELECT nickname FROM table_name_42 WHERE colors = "blue and gold"
sql_create_context
CREATE TABLE requirement ( requirement_id int, requirement varchar, college varchar ) CREATE TABLE semester ( semester_id int, semester varchar, year int ) CREATE TABLE program_requirement ( program_id int, category varchar, min_credit int, additional_req varchar ) CREATE TABL...
SELECT DISTINCT name, number FROM course WHERE credits = 4 AND department = 'EECS'
advising
CREATE TABLE table_21350772_2 ( gas_name VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the 20 year for Nitrous Oxide?
SELECT 20 AS _yr FROM table_21350772_2 WHERE gas_name = "Nitrous oxide"
sql_create_context
CREATE TABLE table_20046379_3 ( title VARCHAR, us_viewers__millions_ VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What's the title of the episode seen by 3.8 million people in the US?
SELECT title FROM table_20046379_3 WHERE us_viewers__millions_ = "3.8"
sql_create_context
CREATE TABLE table_8425 ( "Date" text, "Visitor" text, "Score" text, "Home" text, "Record" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What was the home team when the visiting team was Chicago Black Hawks, a game with a record of 0-2?
SELECT "Home" FROM table_8425 WHERE "Visitor" = 'chicago black hawks' AND "Record" = '0-2'
wikisql
CREATE TABLE table_41884 ( "Month, year" text, "Sunk by U-Boat" real, "Sunk by aircraft" real, "Sunk by warship or raider" real, "Sunk by mines" real, "German submarines lost" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the total numb...
SELECT COUNT("Sunk by U-Boat") FROM table_41884 WHERE "German submarines lost" < '2' AND "Sunk by aircraft" = '56328' AND "Sunk by mines" > '8269'
wikisql
CREATE TABLE table_6344 ( "Name" text, "Circuit" text, "Date" text, "Winning driver" text, "Winning constructor" text, "Report" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- When is vanderbilt cup in?
SELECT "Date" FROM table_6344 WHERE "Name" = 'vanderbilt cup'
wikisql
CREATE TABLE table_name_89 ( seats VARCHAR, vote__percentage INTEGER ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Name the total number of seats for votes % more than 19.5
SELECT COUNT(seats) FROM table_name_89 WHERE vote__percentage > 19.5
sql_create_context
CREATE TABLE table_203_247 ( id number, "district" text, "counties represented" text, "delegate" text, "party" text, "first elected" number, "committee" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- what is the total amount of times the jud...
SELECT COUNT(*) FROM table_203_247 WHERE "committee" = 'judiciary' AND "party" = 'republican'
squall
CREATE TABLE table_46877 ( "Player" text, "Country" text, "Year(s) won" text, "Total" real, "To par" real, "Finish" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the total number of To Par, when Player is 'Julius Boros', and when Total ...
SELECT COUNT("To par") FROM table_46877 WHERE "Player" = 'julius boros' AND "Total" > '295'
wikisql
CREATE TABLE table_15612 ( "Location" text, "Nickname" text, "Founded" real, "Type" text, "Enrollment" real, "Joined" real, "Left" real, "Current Conference" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the average Joined with ...
SELECT AVG("Joined") FROM table_15612 WHERE "Nickname" = 'wildcats' AND "Location" = 'longmeadow, massachusetts'
wikisql
CREATE TABLE transfers ( row_id number, subject_id number, hadm_id number, icustay_id number, eventtype text, careunit text, wardid number, intime time, outtime time ) CREATE TABLE labevents ( row_id number, subject_id number, hadm_id number, itemid number, chart...
SELECT COUNT(*) > 0 FROM microbiologyevents WHERE microbiologyevents.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 20165 AND NOT admissions.dischtime IS NULL ORDER BY admissions.admittime DESC LIMIT 1) AND microbiologyevents.spec_type_desc = 'tissue'
mimic_iii
CREATE TABLE table_name_84 ( position VARCHAR, player VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is Van Waiters position?
SELECT position FROM table_name_84 WHERE player = "van waiters"
sql_create_context
CREATE TABLE table_name_18 ( score VARCHAR, date VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What was the Score on March 1?
SELECT score FROM table_name_18 WHERE date = "march 1"
sql_create_context
CREATE TABLE table_15585 ( "Date" text, "Location" text, "Nature of incident" text, "Circumstances" text, "Casualties" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- How many casualties were from the IED circumstance?
SELECT "Casualties" FROM table_15585 WHERE "Circumstances" = 'ied'
wikisql
CREATE TABLE lab ( subject_id text, hadm_id text, itemid text, charttime text, flag text, value_unit text, label text, fluid text ) CREATE TABLE procedures ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) CREATE TABLE prescription...
SELECT procedures.icd9_code, procedures.short_title FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.name = "Alice Nixon"
mimicsql_data
CREATE TABLE table_24575253_4 ( division_one VARCHAR, division_four VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- When real holmesdale reserves is division four who is in division one?
SELECT division_one FROM table_24575253_4 WHERE division_four = "Real Holmesdale Reserves"
sql_create_context
CREATE TABLE table_6233 ( "Date" text, "Opponent" text, "Score" text, "Loss" text, "Attendance" real, "Record" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which average attendance has stoneman (0-2) as the loss?
SELECT AVG("Attendance") FROM table_6233 WHERE "Loss" = 'stoneman (0-2)'
wikisql
CREATE TABLE course ( course_id int, name varchar, department varchar, number varchar, credits varchar, advisory_requirement varchar, enforced_requirement varchar, description varchar, num_semesters int, num_enrolled int, has_discussion varchar, has_lab varchar, has_p...
SELECT DISTINCT course.department, course.name, course.number, program_course.workload, program_course.workload FROM course, program_course WHERE program_course.category LIKE '%Other%' AND program_course.course_id = course.course_id AND program_course.workload = (SELECT MIN(PROGRAM_COURSEalias1.workload) FROM program_c...
advising
CREATE TABLE table_203_449 ( id number, "name" text, "lifetime" text, "nationality" text, "notable as" text, "notes" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- who was the first to die after elisabeth irwin ?
SELECT "name" FROM table_203_449 WHERE "lifetime" > (SELECT "lifetime" FROM table_203_449 WHERE "name" = 'elisabeth irwin') ORDER BY "lifetime" LIMIT 1
squall
CREATE TABLE table_29770377_1 ( destination VARCHAR, route_via VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the destination of the route kulitthurai,neyyattinkara?
SELECT destination FROM table_29770377_1 WHERE route_via = "Kulitthurai,Neyyattinkara"
sql_create_context
CREATE TABLE date_day ( month_number int, day_number int, year int, day_name varchar ) CREATE TABLE flight_stop ( flight_id int, stop_number int, stop_days text, stop_airport text, arrival_time int, arrival_airline text, arrival_flight_number int, departure_time int, ...
SELECT DISTINCT airline.airline_code FROM airline, airport_service, city, flight WHERE city.city_code = airport_service.city_code AND city.city_name = 'PITTSBURGH' AND flight.airline_code = airline.airline_code AND flight.from_airport = airport_service.airport_code
atis
CREATE TABLE table_name_25 ( loss VARCHAR, record VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Who was the loss in the game with the record of 65-53?
SELECT loss FROM table_name_25 WHERE record = "65-53"
sql_create_context