instruction stringlengths 151 7.46k | output stringlengths 2 4.44k | source stringclasses 26
values |
|---|---|---|
CREATE TABLE regions (
REGION_ID decimal(5,0),
REGION_NAME varchar(25)
)
CREATE TABLE job_history (
EMPLOYEE_ID decimal(6,0),
START_DATE date,
END_DATE date,
JOB_ID varchar(10),
DEPARTMENT_ID decimal(4,0)
)
CREATE TABLE jobs (
JOB_ID varchar(10),
JOB_TITLE varchar(35),
MIN_SALA... | SELECT EMAIL, MANAGER_ID FROM employees WHERE NOT DEPARTMENT_ID IN (SELECT DEPARTMENT_ID FROM departments WHERE MANAGER_ID BETWEEN 100 AND 200) | nvbench |
CREATE TABLE PersonFriend (
name varchar(20),
friend varchar(20),
year INTEGER
)
CREATE TABLE Person (
name varchar(20),
age INTEGER,
city TEXT,
gender TEXT,
job TEXT
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is average age of male... | SELECT job, AVG(age) FROM Person WHERE gender = 'male' GROUP BY job ORDER BY job DESC | nvbench |
CREATE TABLE table_37672 (
"Driver" text,
"Team" text,
"Laps" real,
"Time/Retired" text,
"Grid" real,
"Points" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the time/retired of the team with a grid of 14?
| SELECT "Time/Retired" FROM table_37672 WHERE "Grid" = '14' | wikisql |
CREATE TABLE table_203_133 (
id number,
"year" number,
"japanese title" text,
"english title" text,
"role" text,
"network" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- how many titles were made under the network of fuji tv ?
| SELECT COUNT("japanese title") FROM table_203_133 WHERE "network" = 'fuji tv' | 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_DIRE_CD text,
MED_DIRE_NM text,... | SELECT t_kc22.HOSP_DOC_CD, t_kc22.HOSP_DOC_NM FROM t_kc22 JOIN t_kc21_t_kc22 JOIN t_kc21 ON t_kc21_t_kc22.MED_EXP_DET_ID = t_kc22.MED_EXP_DET_ID AND t_kc21_t_kc22.MED_CLINIC_ID = t_kc21.MED_CLINIC_ID WHERE t_kc21.MED_CLINIC_ID = '56812320084' | css |
CREATE TABLE table_1682865_1 (
introduction VARCHAR,
numeral VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What date was the 6d introduced?
| SELECT introduction FROM table_1682865_1 WHERE numeral = "6d" | sql_create_context |
CREATE TABLE mzb (
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 t_kc22.SOC_SRT_DIRE_CD, t_kc22.SOC_SRT_DIRE_NM FROM qtb JOIN t_kc22 ON qtb.MED_CLINIC_ID = t_kc22.MED_CLINIC_ID WHERE qtb.MED_SER_ORG_NO = '9250851' GROUP BY t_kc22.SOC_SRT_DIRE_CD ORDER BY COUNT(*) DESC LIMIT 10 UNION SELECT t_kc22.SOC_SRT_DIRE_CD, t_kc22.SOC_SRT_DIRE_NM FROM gyb JOIN t_kc22 ON gyb.MED_CLINIC_I... | css |
CREATE TABLE weekly_weather (
station_id int,
day_of_week text,
high_temperature int,
low_temperature int,
precipitation real,
wind_speed_mph int
)
CREATE TABLE train (
id int,
train_number int,
name text,
origin text,
destination text,
time text,
interval text
)
CR... | SELECT origin, COUNT(*) FROM train GROUP BY origin ORDER BY origin DESC | nvbench |
CREATE TABLE book (
Book_ID int,
Title text,
Issues real,
Writer text
)
CREATE TABLE publication (
Publication_ID int,
Book_ID int,
Publisher text,
Publication_Date text,
Price real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Show dif... | SELECT Publisher, COUNT(*) FROM publication GROUP BY Publisher ORDER BY COUNT(*) | nvbench |
CREATE TABLE table_14690 (
"Year" text,
"Start" text,
"Qual" text,
"Rank" text,
"Finish" text,
"Laps" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- In what year did a Qual of 141.105 with a Start of 25 happen?
| SELECT "Year" FROM table_14690 WHERE "Start" = '25' AND "Qual" = '141.105' | wikisql |
CREATE TABLE table_name_96 (
ticket_price_s_ VARCHAR,
venue VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What was the ticket price at Red Rocks Amphitheatre?
| SELECT ticket_price_s_ FROM table_name_96 WHERE venue = "red rocks amphitheatre" | sql_create_context |
CREATE TABLE table_name_94 (
scorers VARCHAR,
result_f_a VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Who were F A of 1 0 scorers?
| SELECT scorers FROM table_name_94 WHERE result_f_a = "1–0" | sql_create_context |
CREATE TABLE cost (
costid number,
uniquepid text,
patienthealthsystemstayid number,
eventtype text,
eventid number,
chargetime time,
cost number
)
CREATE TABLE diagnosis (
diagnosisid number,
patientunitstayid number,
diagnosisname text,
diagnosistime time,
icd9code tex... | SELECT SUM(intakeoutput.cellvaluenumeric) FROM intakeoutput WHERE intakeoutput.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '002-41152')) AND intakeoutput.celllabel = 'urine... | eicu |
CREATE TABLE table_name_85 (
opponent VARCHAR,
game VARCHAR,
date VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Who is the opponent of the game with a game number larger than 5 on June 22?
| SELECT opponent FROM table_name_85 WHERE game > 5 AND date = "june 22" | sql_create_context |
CREATE TABLE mzb (
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 t_kc22.SOC_SRT_DIRE_CD, t_kc22.SOC_SRT_DIRE_NM FROM qtb JOIN t_kc22 ON qtb.MED_CLINIC_ID = t_kc22.MED_CLINIC_ID WHERE qtb.PERSON_ID = '77965758' AND t_kc22.MED_INV_ITEM_TYPE = '治疗费' UNION SELECT t_kc22.SOC_SRT_DIRE_CD, t_kc22.SOC_SRT_DIRE_NM FROM gyb JOIN t_kc22 ON gyb.MED_CLINIC_ID = t_kc22.MED_CLINIC_ID WHERE ... | css |
CREATE TABLE table_21815 (
"Season" text,
"Timeslot" text,
"Premiere" text,
"Finale" text,
"TV season" text,
"Ranking" text,
"Viewers (in millions)" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What premieres had a finale on May 25, 2004?
| SELECT "Premiere" FROM table_21815 WHERE "Finale" = 'May 25, 2004' | wikisql |
CREATE TABLE table_29102100_1 (
season__number INTEGER,
prod_code VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What number episode in the season had a production code of 334?
| SELECT MAX(season__number) FROM table_29102100_1 WHERE prod_code = 334 | sql_create_context |
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 OUT_DIAG_DIS_CD, OUT_DIAG_DIS_NM FROM t_kc21 WHERE MED_CLINIC_ID = '78262122998' | css |
CREATE TABLE jyjgzbb (
JYZBLSH text,
YLJGDM text,
BGDH text,
BGRQ time,
JYRQ time,
JCRGH text,
JCRXM text,
SHRGH text,
SHRXM text,
JCXMMC text,
JCZBDM text,
JCFF text,
JCZBMC text,
JCZBJGDX text,
JCZBJGDL number,
JCZBJGDW text,
SBBM text,
YQBH text... | SELECT COUNT(*) FROM mzjzjlb WHERE YLJGDM = '1782032' AND JZKSRQ BETWEEN '2009-09-13' AND '2015-11-11' AND ZSEBZ > 0 | css |
CREATE TABLE patient (
uniquepid text,
patienthealthsystemstayid number,
patientunitstayid number,
gender text,
age text,
ethnicity text,
hospitalid number,
wardid number,
admissionheight number,
admissionweight number,
dischargeweight number,
hospitaladmittime time,
... | SELECT COUNT(DISTINCT patient.uniquepid) FROM patient | eicu |
CREATE TABLE prescriptions (
subject_id text,
hadm_id text,
icustay_id text,
drug_type text,
drug text,
formulary_drug_cd text,
route text,
drug_dose text
)
CREATE TABLE procedures (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.admityear < "2170" AND procedures.long_title = "Percutaneous [endoscopic] gastrojejunostomy" | mimicsql_data |
CREATE TABLE table_59975 (
"Place" text,
"Player" text,
"Country" text,
"Score" text,
"To par" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What country is Retief Goosen from?
| SELECT "Country" FROM table_59975 WHERE "Player" = 'retief goosen' | 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 COUNT(*) FROM (SELECT t_kc21.MED_ORG_DEPT_CD FROM t_kc21 JOIN t_kc24 ON t_kc21.MED_CLINIC_ID = t_kc24.MED_CLINIC_ID WHERE t_kc21.MED_SER_ORG_NO = '7452450' AND t_kc24.CLINIC_SLT_DATE BETWEEN '2006-09-03' AND '2007-05-05' GROUP BY t_kc21.MED_ORG_DEPT_CD HAVING SUM(t_kc24.MED_AMOUT) > 5876.89) AS T | css |
CREATE TABLE table_77406 (
"Place" text,
"Player" text,
"Country" text,
"Score" text,
"To par" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is To Par, when Place is 'T5', and when Country is 'United States'?
| SELECT "To par" FROM table_77406 WHERE "Place" = 't5' AND "Country" = 'united states' | wikisql |
CREATE TABLE demographic (
subject_id text,
hadm_id text,
name text,
marital_status text,
age text,
dob text,
gender text,
language text,
religion text,
admission_type text,
days_stay text,
insurance text,
ethnicity text,
expire_flag text,
admission_location t... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.discharge_location = "HOME" AND procedures.icd9_code = "3607" | mimicsql_data |
CREATE TABLE table_7590 (
"Rank" real,
"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 average Total that has a Gold of 0, when the rank is less than 16, the nation is ... | SELECT AVG("Total") FROM table_7590 WHERE "Gold" = '0' AND "Rank" < '16' AND "Nation" = 'georgia' AND "Bronze" > '2' | wikisql |
CREATE TABLE table_10853 (
"Race" text,
"Circuit" text,
"Date" text,
"Pole position" text,
"Fastest lap" text,
"Winning driver" text,
"Constructor" text,
"Tyre" text,
"Report" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What was t... | SELECT "Tyre" FROM table_10853 WHERE "Date" = '19 january' | wikisql |
CREATE TABLE Manufacturers (
Code INTEGER,
Name VARCHAR(255),
Headquarter VARCHAR(255),
Founder VARCHAR(255),
Revenue REAL
)
CREATE TABLE Products (
Code INTEGER,
Name VARCHAR(255),
Price DECIMAL,
Manufacturer INTEGER
)
-- Using valid SQLite, answer the following questions for the... | SELECT T1.Name, T1.Code FROM Products AS T1 JOIN Manufacturers AS T2 ON T1.Manufacturer = T2.Code GROUP BY T1.Name, T1.Name ORDER BY T1.Code | nvbench |
CREATE TABLE table_name_29 (
player VARCHAR,
score VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Who is the player with a 68-67-75=210 score?
| SELECT player FROM table_name_29 WHERE score = 68 - 67 - 75 = 210 | sql_create_context |
CREATE TABLE table_15352382_1 (
drawn VARCHAR,
team VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- How many Drawn does the team Portuguesa Santista have?
| SELECT drawn FROM table_15352382_1 WHERE team = "Portuguesa Santista" | sql_create_context |
CREATE TABLE CloseAsOffTopicReasonTypes (
Id number,
IsUniversal boolean,
InputTitle text,
MarkdownInputGuidance text,
MarkdownPostOwnerGuidance text,
MarkdownPrivilegedUserGuidance text,
MarkdownConcensusDescription text,
CreationDate time,
CreationModeratorId number,
ApprovalDa... | SELECT AVG(AnswerRevisionCount) AS avg_AnswerRevisionCount, MAX(AnswerRevisionCount) AS max_AnswerRevisionCount, STDEV(AnswerRevisionCount) AS stdev_AnswerRevisionCount FROM (SELECT q.OwnerUserId, CAST(COUNT(*) AS FLOAT(15, 5)) AS AnswerRevisionCount FROM Posts AS q INNER JOIN Posts AS a ON q.Id = a.ParentId LEFT JOIN ... | sede |
CREATE TABLE table_22547 (
"Fuel gas" text,
"Upper index Kcal/ Nm 3" real,
"Lower index Kcal/ Nm 3" real,
"Upper index MJ/ Nm 3" text,
"Lower index MJ/ Nm 3" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Name the lower index kcal/ nm3 for 61.32
| SELECT "Lower index Kcal/ Nm 3" FROM table_22547 WHERE "Upper index MJ/ Nm 3" = '61.32' | wikisql |
CREATE TABLE table_21297652_1 (
series VARCHAR,
position VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What series is at the position 7?
| SELECT series FROM table_21297652_1 WHERE position = 7 | sql_create_context |
CREATE TABLE table_30834 (
"Round" real,
"Date" text,
"Grand Prix" text,
"Circuit" text,
"Pole Position" text,
"Fastest Lap" text,
"Race Winner" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- How many dates did Daniel Ruiz win the Spanish Gr... | SELECT COUNT("Date") FROM table_30834 WHERE "Grand Prix" = 'Spanish Grand Prix' AND "Race Winner" = 'Daniel Ruiz' | wikisql |
CREATE TABLE table_name_42 (
score VARCHAR,
city VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the score in Leicester?
| SELECT score FROM table_name_42 WHERE city = "leicester" | 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 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.icd9_code = "78909" AND prescriptions.route = "PR" | mimicsql_data |
CREATE TABLE mzjzjlb (
YLJGDM text,
JZLSH text,
KH text,
KLX number,
MJZH text,
HZXM text,
NLS number,
NLY number,
ZSEBZ number,
JZZTDM number,
JZZTMC text,
JZJSSJ time,
TXBZ number,
ZZBZ number,
WDBZ number,
JZKSBM text,
JZKSMC text,
JZKSRQ time,
... | (SELECT * FROM hz_info JOIN mzjzjlb JOIN jybgb JOIN 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 = jyjgzbb.YLJGDM AND jybgb.BGDH = jyjgzbb.BGDH WHERE hz_info.RYBH = ... | css |
CREATE TABLE time_zone (
time_zone_code text,
time_zone_name text,
hours_from_gmt int
)
CREATE TABLE dual_carrier (
main_airline varchar,
low_flight_number int,
high_flight_number int,
dual_airline varchar,
service_name text
)
CREATE TABLE food_service (
meal_code text,
meal_nu... | SELECT DISTINCT fare_basis_code FROM fare_basis WHERE fare_basis_code = 'QW' | atis |
CREATE TABLE documents (
document_name VARCHAR,
document_type_code VARCHAR,
document_structure_code VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Find the list of documents that are both in the most three popular type and have the most three popular str... | SELECT document_name FROM documents GROUP BY document_type_code ORDER BY COUNT(*) DESC LIMIT 3 INTERSECT SELECT document_name FROM documents GROUP BY document_structure_code ORDER BY COUNT(*) DESC LIMIT 3 | sql_create_context |
CREATE TABLE table_2472711_32 (
up_down VARCHAR,
total VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- How many values of up/down have a total value of exactly 301470?
| SELECT COUNT(up_down) FROM table_2472711_32 WHERE total = 301470 | sql_create_context |
CREATE TABLE table_21752 (
"Gatchaman" text,
"Battle of the Planets" text,
"G-Force" text,
"Eagle Riders" text,
"OVA (Harmony Gold Dub)" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which eagle riders whose ova (harmony gold dub) is dr. kozaburo n... | SELECT "Eagle Riders" FROM table_21752 WHERE "OVA (Harmony Gold Dub)" = 'Dr. Kozaburo Nambu' | wikisql |
CREATE TABLE table_59329 (
"Years" text,
"Type" text,
"Original code" text,
"Current code" text,
"Location" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the location for the club trophy from the year 1867 only?
| SELECT "Location" FROM table_59329 WHERE "Type" = 'club trophy' AND "Years" = '1867 only' | wikisql |
CREATE TABLE table_name_36 (
record VARCHAR,
game INTEGER
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- WHAT IS THE RECORD FOR THE GAME SMALLER THAN 31?
| SELECT record FROM table_name_36 WHERE game < 31 | sql_create_context |
CREATE TABLE table_256286_14 (
_percentage_yes VARCHAR,
yes_votes VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Name the % yes for yes votes for 78961
| SELECT _percentage_yes FROM table_256286_14 WHERE yes_votes = 78961 | sql_create_context |
CREATE TABLE university (
School_ID int,
School text,
Location text,
Founded real,
Affiliation text,
Enrollment real,
Nickname text,
Primary_conference text
)
CREATE TABLE basketball_match (
Team_ID int,
School_ID int,
Team_Name text,
ACC_Regular_Season text,
ACC_Per... | SELECT All_Neutral, School_ID FROM basketball_match ORDER BY School_ID | nvbench |
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 MAX(demographic.age) FROM demographic WHERE demographic.marital_status = "SINGLE" AND demographic.dob_year > "2094" | mimicsql_data |
CREATE TABLE table_name_5 (
home_team VARCHAR,
crowd INTEGER
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Who was the home team when the attendance was more than 20,283?
| SELECT home_team FROM table_name_5 WHERE crowd > 20 OFFSET 283 | sql_create_context |
CREATE TABLE labevents (
row_id number,
subject_id number,
hadm_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 time
)
CREATE TABLE charte... | SELECT COUNT(*) > 0 FROM prescriptions WHERE prescriptions.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 1372) AND prescriptions.drug IN ('quetiapine fumarate', 'potassium chloride', 'furosemide') | mimic_iii |
CREATE TABLE table_25370 (
"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 d... | SELECT "Date" FROM table_25370 WHERE "Record" = '23-47' | wikisql |
CREATE TABLE table_name_50 (
november VARCHAR,
game VARCHAR,
opponent VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- How many Novembers have a Game larger than 14, and an Opponent of minnesota wild?
| SELECT COUNT(november) FROM table_name_50 WHERE game > 14 AND opponent = "minnesota wild" | sql_create_context |
CREATE TABLE table_30489 (
"No." real,
"#" real,
"Title" text,
"Directed by" text,
"Written by" text,
"Original air date" text,
"Production code" text,
"U.S. viewers (million)" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- what are the ... | SELECT "#" FROM table_30489 WHERE "U.S. viewers (million)" = '0.79' | wikisql |
CREATE TABLE table_34134 (
"Year" text,
"Title" text,
"Director" text,
"Distributor(s)" text,
"Box office" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- The box office was $961,147 in what year?
| SELECT "Year" FROM table_34134 WHERE "Box office" = '$961,147' | wikisql |
CREATE TABLE table_name_28 (
club VARCHAR,
runners_up VARCHAR,
last_final_won VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What club has over 1 runners-up and last won the final in 2010?
| SELECT club FROM table_name_28 WHERE runners_up > 1 AND last_final_won = "2010" | sql_create_context |
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 Team_ID, All_Games_Percent FROM basketball_match | nvbench |
CREATE TABLE table_34198 (
"Game" real,
"January" real,
"Opponent" text,
"Score" text,
"Record" text,
"Points" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which highest Points has a Score of 1 1 ot?
| SELECT MAX("Points") FROM table_34198 WHERE "Score" = '1–1 ot' | wikisql |
CREATE TABLE event (
ID int,
Name text,
Stadium_ID int,
Year text
)
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_40... | SELECT meter_300, meter_100 FROM swimmer ORDER BY meter_100 | nvbench |
CREATE TABLE table_17104539_10 (
opponent VARCHAR,
score VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Who was the oppenent what the score was L 68-60?
| SELECT opponent FROM table_17104539_10 WHERE score = "L 68-60" | sql_create_context |
CREATE TABLE table_24809 (
"Tournament" real,
"Conference" text,
"Championship Game Opponent" text,
"Score" text,
"Location" text,
"Head Coach" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Who is the head coach when Miami University is the cha... | SELECT "Head Coach" FROM table_24809 WHERE "Championship Game Opponent" = 'Miami University' | wikisql |
CREATE TABLE diagnoses_icd (
row_id number,
subject_id number,
hadm_id number,
icd9_code text,
charttime time
)
CREATE TABLE d_icd_procedures (
row_id number,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE chartevents (
row_id number,
subject_id number,
... | SELECT d_icd_procedures.short_title FROM d_icd_procedures WHERE d_icd_procedures.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, procedures_icd.charttime FROM procedures_icd JOIN admissions ON procedures_icd.hadm_id = admi... | mimic_iii |
CREATE TABLE table_name_95 (
date VARCHAR,
circuit VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What's the date of Bahrain International Circuit?
| SELECT date FROM table_name_95 WHERE circuit = "bahrain international circuit" | sql_create_context |
CREATE TABLE lab (
labid number,
patientunitstayid number,
labname text,
labresult number,
labresulttime time
)
CREATE TABLE vitalperiodic (
vitalperiodicid number,
patientunitstayid number,
temperature number,
sao2 number,
heartrate number,
respiration number,
systemics... | SELECT MIN(t1.c1) FROM (SELECT SUM(cost.cost) AS c1 FROM cost WHERE cost.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.patientunitstayid IN (SELECT lab.patientunitstayid FROM lab WHERE lab.labname = 'mpv')) AND STRFTIME('%y', cost.chargetime) <= '2104' GROUP BY cost.p... | eicu |
CREATE TABLE table_203_136 (
id number,
"year" number,
"ibm model number" text,
"name" text,
"processor" text,
"bus" text,
"hd interface" text,
"case" text,
"notes" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- what is the name of t... | SELECT "name" FROM table_203_136 ORDER BY id DESC LIMIT 1 | squall |
CREATE TABLE table_38093 (
"7:00" text,
"7:30" text,
"8:00" text,
"8:30" text,
"9:00" text,
"9:30" text,
"10:00" text,
"10:30" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the 10:30 feature with Hercule as the 7:30 feature?
| SELECT "10:30" FROM table_38093 WHERE "7:30" = 'hercule' | wikisql |
CREATE TABLE regions (
REGION_ID decimal(5,0),
REGION_NAME varchar(25)
)
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 varchar(2)
)
CREATE TABLE countries (
COUNTRY_ID... | SELECT JOB_ID, SUM(EMPLOYEE_ID) FROM employees WHERE SALARY BETWEEN 8000 AND 12000 AND COMMISSION_PCT <> "null" OR DEPARTMENT_ID <> 40 GROUP BY JOB_ID ORDER BY JOB_ID | nvbench |
CREATE TABLE table_41778 (
"Date" text,
"Score" text,
"Set 1" text,
"Set 2" text,
"Set 3" text,
"Set 4" text,
"Set 5" text,
"Total" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is Set 4, when Date is Jun 27, and when Set 3 is 17-2... | SELECT "Set 4" FROM table_41778 WHERE "Date" = 'jun 27' AND "Set 3" = '17-25' | wikisql |
CREATE TABLE table_45341 (
"Date" text,
"Venue" text,
"Score" text,
"Result" text,
"Competition" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- what is the competition when the date is 16 january 1996?
| SELECT "Competition" FROM table_45341 WHERE "Date" = '16 january 1996' | wikisql |
CREATE TABLE table_name_3 (
aircraft VARCHAR,
location VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What aircraft is located at S of Avion?
| SELECT aircraft FROM table_name_3 WHERE location = "s of avion" | sql_create_context |
CREATE TABLE table_name_3 (
away_team VARCHAR,
home_team VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which Away team has a Home team of walsall?
| SELECT away_team FROM table_name_3 WHERE home_team = "walsall" | 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.dod_year <= "2164.0" AND prescriptions.drug = "Labetalol HCl" | mimicsql_data |
CREATE TABLE table_38050 (
"Week" text,
"Date" text,
"Kickoff" text,
"Opponent" text,
"Result" text,
"Record" text,
"Game Site" text,
"NFL Recap" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which Date had an Opponent of buffalo bills?... | SELECT "Date" FROM table_38050 WHERE "Opponent" = 'buffalo bills' | wikisql |
CREATE TABLE CloseReasonTypes (
Id number,
Name text,
Description text
)
CREATE TABLE ReviewTaskTypes (
Id number,
Name text,
Description text
)
CREATE TABLE ReviewTaskStates (
Id number,
Name text,
Description text
)
CREATE TABLE Tags (
Id number,
TagName text,
Count ... | SELECT 'lastactivitydate', Posts.CreationDate, 'lasteditdate' FROM Posts RIGHT JOIN PostFeedback ON 'postfeedback'."postid" = 'posts'."id" WHERE 'posttypeid' = 1 AND 'answercount' > 0 AND 'lasteditoruserid' = 'owneruserid' AND ('posttypeid' = 2 AND Posts.ParentId = 'postfeedback'."postid" AND Posts.CreationDate < 'last... | sede |
CREATE TABLE table_62691 (
"Date" text,
"Tournament" text,
"Surface" text,
"Partner" text,
"Opponents" text,
"Score" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the Date of the Match with a Score of 6 4, 7 5?
| SELECT "Date" FROM table_62691 WHERE "Score" = '6–4, 7–5' | wikisql |
CREATE TABLE regions (
REGION_ID decimal(5,0),
REGION_NAME varchar(25)
)
CREATE TABLE departments (
DEPARTMENT_ID decimal(4,0),
DEPARTMENT_NAME varchar(30),
MANAGER_ID decimal(6,0),
LOCATION_ID decimal(4,0)
)
CREATE TABLE employees (
EMPLOYEE_ID decimal(6,0),
FIRST_NAME varchar(20),
... | SELECT HIRE_DATE, SUM(DEPARTMENT_ID) FROM employees WHERE NOT DEPARTMENT_ID IN (SELECT DEPARTMENT_ID FROM departments WHERE MANAGER_ID BETWEEN 100 AND 200) ORDER BY SUM(DEPARTMENT_ID) | nvbench |
CREATE TABLE table_70312 (
"Classification" text,
"Fastest time (s)" real,
"Athlete" text,
"Country" text,
"Date" text,
"Location" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the fastest time for athlete Jason Smyth?
| SELECT "Fastest time (s)" FROM table_70312 WHERE "Athlete" = 'jason smyth' | wikisql |
CREATE TABLE nuclear_power_plants (
id text,
name text,
latitude text,
longitude text,
country text,
status text,
reactortype text,
reactormodel text,
constructionstartat text,
operationalfrom text,
operationalto text,
capacity text,
lastupdatedat text,
source tex... | SELECT COUNT(DISTINCT reactormodel) FROM nuclear_power_plants | geonucleardata |
CREATE TABLE table_55315 (
"Home team" text,
"Home team score" text,
"Away team" text,
"Away team score" text,
"Venue" text,
"Crowd" real,
"Date" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What did the Melbourne team score in their away ... | SELECT "Away team score" FROM table_55315 WHERE "Away team" = 'melbourne' | wikisql |
CREATE TABLE table_56901 (
"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.
-- Which home team had a crowd larger than 20,822 a... | SELECT "Home team" FROM table_56901 WHERE "Crowd" > '20,822' AND "Venue" = 'vfl park' | wikisql |
CREATE TABLE table_name_67 (
draw VARCHAR,
place INTEGER
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- How many draw is in a place that is less than 1?
| SELECT COUNT(draw) FROM table_name_67 WHERE place < 1 | sql_create_context |
CREATE TABLE table_name_81 (
birthplace VARCHAR,
agency VARCHAR,
generation VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What's the birthplace of the third (2009) generation member from the lespros entertainment agency?
| SELECT birthplace FROM table_name_81 WHERE agency = "lespros entertainment" AND generation = "third (2009)" | sql_create_context |
CREATE TABLE table_47264 (
"Year" real,
"Date" text,
"Winner" text,
"Result" text,
"Location" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- what is the location when the year is before 1979 and the result is 19-17?
| SELECT "Location" FROM table_47264 WHERE "Year" < '1979' AND "Result" = '19-17' | wikisql |
CREATE TABLE table_name_36 (
shooter VARCHAR,
rank_points VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What was the shooter when the rank points was olympic bronze medalist?
| SELECT shooter FROM table_name_36 WHERE rank_points = "olympic bronze medalist" | sql_create_context |
CREATE TABLE flight_fare (
flight_id int,
fare_id int
)
CREATE TABLE airport_service (
city_code varchar,
airport_code varchar,
miles_distant int,
direction varchar,
minutes_distant int
)
CREATE TABLE flight (
aircraft_code_sequence text,
airline_code varchar,
airline_flight te... | 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, flight WHERE CITY_0.city_code = AIRPORT_SERVICE_0.city_code AND CITY_0.city_name = 'SAN FRANCISCO' AND CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = '... | atis |
CREATE TABLE Courses (
course_id INTEGER,
author_id INTEGER,
subject_id INTEGER,
course_name VARCHAR(120),
course_description VARCHAR(255)
)
CREATE TABLE Students (
student_id INTEGER,
date_of_registration DATETIME,
date_of_latest_logon DATETIME,
login_name VARCHAR(40),
password... | SELECT date_of_enrolment, COUNT(date_of_enrolment) FROM Student_Course_Enrolment AS T1 JOIN Student_Tests_Taken AS T2 ON T1.registration_id = T2.registration_id WHERE T2.test_result = "Pass" GROUP BY date_of_enrolment ORDER BY date_of_enrolment | nvbench |
CREATE TABLE table_60008 (
"Place" text,
"Player" text,
"Country" text,
"Score" text,
"To par" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What To par has a Score of 68-66=134?
| SELECT "To par" FROM table_60008 WHERE "Score" = '68-66=134' | wikisql |
CREATE TABLE table_66831 (
"Club" text,
"Played" 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 following questions f... | SELECT "Try bonus" FROM table_66831 WHERE "Points for" = '332' | wikisql |
CREATE TABLE hz_info (
KH text,
KLX number,
RYBH text,
YLJGDM text
)
CREATE TABLE hz_info_zyjzjlb (
JZLSH number,
YLJGDM number,
zyjzjlb_id number
)
CREATE TABLE mzjzjlb (
HXPLC number,
HZXM text,
JLSJ time,
JZJSSJ time,
JZKSBM text,
JZKSMC text,
JZKSRQ time,
... | SELECT jyjgzbb.JCZBJGDL, jyjgzbb.JCZBJGDW FROM person_info JOIN hz_info JOIN mzjzjlb JOIN jybgb JOIN jyjgzbb ON person_info.RYBH = hz_info.RYBH AND hz_info.YLJGDM = mzjzjlb.YLJGDM AND hz_info.KH = mzjzjlb.KH AND hz_info.KLX = mzjzjlb.KLX AND mzjzjlb.YLJGDM = jybgb.YLJGDM_MZJZJLB AND mzjzjlb.JZLSH = jybgb.JZLSH_MZJZJLB ... | css |
CREATE TABLE table_64894 (
"Size" text,
"Density" text,
"Tracks" real,
"Coercivity" text,
"Unformatted capacity per side" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- How many tracks have a single density?
| SELECT COUNT("Tracks") FROM table_64894 WHERE "Density" = 'single' | wikisql |
CREATE TABLE table_66017 (
"Name" text,
"Nation" text,
"Position" text,
"League Apps" text,
"League Goals" real,
"FA Cup Apps" text,
"FA Cup Goals" real,
"League Cup Apps" text,
"League Cup Goals" real,
"FLT Apps" text,
"FLT Goals" real,
"Total Apps" text,
"Total Goal... | SELECT "FA Cup Apps" FROM table_66017 WHERE "Total Goals" > '6' AND "FA Cup Goals" < '1' | wikisql |
CREATE TABLE table_name_16 (
date VARCHAR,
type VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the Date of the Courtyard Castle?
| SELECT date FROM table_name_16 WHERE type = "courtyard castle" | sql_create_context |
CREATE TABLE departments (
DEPARTMENT_ID decimal(4,0),
DEPARTMENT_NAME varchar(30),
MANAGER_ID decimal(6,0),
LOCATION_ID decimal(4,0)
)
CREATE TABLE countries (
COUNTRY_ID varchar(2),
COUNTRY_NAME varchar(40),
REGION_ID decimal(10,0)
)
CREATE TABLE employees (
EMPLOYEE_ID decimal(6,0),... | SELECT JOB_ID, AVG(SALARY) FROM employees WHERE NOT EMPLOYEE_ID IN (SELECT EMPLOYEE_ID FROM job_history) GROUP BY JOB_ID | nvbench |
CREATE TABLE table_65674 (
"Country" text,
"Matches" real,
"Wins" real,
"Wins %" text,
"Draws" real,
"Draws %" text,
"Loses" real,
"Loses %" text,
"Against" real,
"For & Against Ratio" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
... | SELECT MAX("Matches") FROM table_65674 WHERE "Loses %" = '26.67%' AND "Draws" < '90' | wikisql |
CREATE TABLE intakeoutput (
intakeoutputid number,
patientunitstayid number,
cellpath text,
celllabel text,
cellvaluenumeric number,
intakeoutputtime time
)
CREATE TABLE microlab (
microlabid number,
patientunitstayid number,
culturesite text,
organism text,
culturetakentime... | SELECT t1.treatmentname FROM (SELECT treatment.treatmentname, COUNT(treatment.treatmenttime) AS c1 FROM treatment WHERE treatment.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid ... | eicu |
CREATE TABLE table_5869 (
"Pick #" text,
"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.
-- What Nationality had a Pick # of 117?
| SELECT "Nationality" FROM table_5869 WHERE "Pick #" = '117' | wikisql |
CREATE TABLE table_test_20 (
"id" int,
"ejection_fraction_ef" int,
"anemia" bool,
"gender" string,
"bleeding" int,
"systolic_blood_pressure_sbp" int,
"left_main_coronary_artery_stenosis" int,
"hemoglobin_a1c_hba1c" float,
"renal_disease" bool,
"creatinine_clearance_cl" float,
... | SELECT * FROM table_test_20 WHERE renal_disease = 1 OR creatinine_clearance_cl < 30 | criteria2sql |
CREATE TABLE phone (
Name text,
Phone_ID int,
Memory_in_G int,
Carrier text,
Price real
)
CREATE TABLE phone_market (
Market_ID int,
Phone_ID text,
Num_of_stock int
)
CREATE TABLE market (
Market_ID int,
District text,
Num_of_employees int,
Num_of_shops real,
Rankin... | SELECT Name, SUM(T1.Num_of_stock) FROM phone_market AS T1 JOIN phone AS T2 ON T1.Phone_ID = T2.Phone_ID GROUP BY T2.Name | nvbench |
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 * 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 = jyjgzbb.YLJGDM... | css |
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 demographic (
subject_id text,
hadm_id text,
name text,
marital_status text,
age text,
dob te... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.dob_year < "2098" AND lab.flag = "delta" | mimicsql_data |
CREATE TABLE table_47473 (
"Subclass" text,
"Part 1" text,
"Part 2" text,
"Part 3" text,
"Part 4" text,
"Verb meaning" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the part 4 with *hlaupan *stautan in part 1?
| SELECT "Part 4" FROM table_47473 WHERE "Part 1" = '*hlaupaną *stautaną' | wikisql |
CREATE TABLE captain (
Captain_ID int,
Name text,
Ship_ID int,
age text,
Class text,
Rank text
)
CREATE TABLE Ship (
Ship_ID int,
Name text,
Type text,
Built_Year real,
Class text,
Flag text
)
-- Using valid SQLite, answer the following questions for the tables provide... | SELECT Rank, COUNT(*) FROM captain GROUP BY Rank ORDER BY COUNT(*) DESC | nvbench |
CREATE TABLE table_51772 (
"Season" text,
"# of Stars" real,
"# of Weeks" real,
"Season Premiere Date" text,
"Season Finale Date" text,
"Winner" text,
"Runner-up" text,
"Third place" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- How man... | SELECT COUNT("# of Weeks") FROM table_51772 WHERE "Season" = '3 – spring 2008' | wikisql |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.