instruction stringlengths 151 7.46k | output stringlengths 2 4.44k | source stringclasses 26
values |
|---|---|---|
CREATE TABLE table_72918 (
"Official Name" text,
"Status" text,
"Area km 2" text,
"Population" real,
"Census Ranking" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the status(es) of the place with an area of 304.06 km2?
| SELECT "Status" FROM table_72918 WHERE "Area km 2" = '304.06' | wikisql |
CREATE TABLE table_name_38 (
average_ratings VARCHAR,
episodes VARCHAR,
japanese_title VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is average ratings for Japanese title of , with episodes larger than 9?
| SELECT average_ratings FROM table_name_38 WHERE episodes > 9 AND japanese_title = "ホタルノヒカリ" | sql_create_context |
CREATE TABLE intakeoutput (
intakeoutputid number,
patientunitstayid number,
cellpath text,
celllabel text,
cellvaluenumeric number,
intakeoutputtime time
)
CREATE TABLE diagnosis (
diagnosisid number,
patientunitstayid number,
diagnosisname text,
diagnosistime time,
icd9cod... | SELECT intakeoutput.celllabel FROM intakeoutput WHERE intakeoutput.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '027-82318')) AND intakeoutput.cellpath LIKE '%output%' AND D... | eicu |
CREATE TABLE table_22728 (
"Name" text,
"Population (2011)" real,
"Population (2006)" real,
"Change (%)" text,
"Land area (km\u00b2)" text,
"Population density (per km\u00b2)" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- When 4.5 is the percen... | SELECT COUNT("Population (2011)") FROM table_22728 WHERE "Change (%)" = '4.5' | wikisql |
CREATE TABLE table_204_659 (
id number,
"seat" text,
"state" text,
"majority" number,
"member" text,
"party" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- what is the name of the last seat ?
| SELECT "seat" FROM table_204_659 ORDER BY id DESC LIMIT 1 | squall |
CREATE TABLE PostNoticeTypes (
Id number,
ClassId number,
Name text,
Body text,
IsHidden boolean,
Predefined boolean,
PostNoticeDurationId number
)
CREATE TABLE Tags (
Id number,
TagName text,
Count number,
ExcerptPostId number,
WikiPostId number
)
CREATE TABLE PostsWit... | SELECT ROW_NUMBER() OVER (ORDER BY Reputation DESC) AS "#", u.Id AS "user_link", DisplayName, WebsiteUrl, Reputation FROM Users AS u INNER JOIN Comments AS c ON c.UserId = u.Id INNER JOIN Posts AS p ON p.Id = c.PostId INNER JOIN PostTags AS pt ON p.Id = pt.PostId INNER JOIN Tags AS t ON t.Id = pt.TagId WHERE (UPPER(Tag... | sede |
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 COUNT(t_kc21.PERSON_ID) FROM t_kc21 WHERE t_kc21.IN_DIAG_DIS_NM = '脑梗死后遗症' | css |
CREATE TABLE table_name_52 (
directed_by VARCHAR,
written_by VARCHAR,
original_airdate VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Who directed the episode written by Dan Serafin and aired on July 23, 2008?
| SELECT directed_by FROM table_name_52 WHERE written_by = "dan serafin" AND original_airdate = "july 23, 2008" | sql_create_context |
CREATE TABLE course_prerequisite (
pre_course_id int,
course_id int
)
CREATE TABLE program_requirement (
program_id int,
category varchar,
min_credit int,
additional_req varchar
)
CREATE TABLE area (
course_id int,
area varchar
)
CREATE TABLE comment_instructor (
instructor_id int... | SELECT DISTINCT course.department, course.name, course.number FROM program_course INNER JOIN course ON program_course.course_id = course.course_id WHERE course.department = 'NEAREAST' | advising |
CREATE TABLE table_36233 (
"Frequency" real,
"Callsign" text,
"Brand" text,
"City of License" text,
"Website" text,
"Webcast" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which Callsign includes a frequency under 1210, Newsradio 740 KTRH, and ... | SELECT "Callsign" FROM table_36233 WHERE "Webcast" = 'listen live' AND "Frequency" < '1210' AND "Brand" = 'newsradio 740 ktrh' | wikisql |
CREATE TABLE d_items (
row_id number,
itemid number,
label text,
linksto text
)
CREATE TABLE cost (
row_id number,
subject_id number,
hadm_id number,
event_type text,
event_id number,
chargetime time,
cost number
)
CREATE TABLE chartevents (
row_id number,
subject_i... | SELECT COUNT(DISTINCT admissions.subject_id) FROM admissions WHERE admissions.hadm_id IN (SELECT transfers.hadm_id FROM transfers WHERE transfers.wardid = 45 AND STRFTIME('%y', transfers.intime) <= '2100') | mimic_iii |
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 (SELECT COUNT(*) FROM person_info JOIN hz_info JOIN txmzjzjlb ON person_info.RYBH = hz_info.RYBH AND hz_info.YLJGDM = txmzjzjlb.YLJGDM AND hz_info.KH = txmzjzjlb.KH AND hz_info.KLX = txmzjzjlb.KLX WHERE person_info.XM = '水光耀' AND txmzjzjlb.JZKSRQ BETWEEN '2005-01-09' AND '2013-08-02' UNION SELECT COUNT(*) FROM p... | css |
CREATE TABLE d_icd_procedures (
row_id number,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE admissions (
row_id number,
subject_id number,
hadm_id number,
admittime time,
dischtime time,
admission_type text,
admission_location text,
discharge_location... | SELECT t3.drug FROM (SELECT t2.drug, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM (SELECT admissions.subject_id, diagnoses_icd.charttime FROM diagnoses_icd JOIN admissions ON diagnoses_icd.hadm_id = admissions.hadm_id WHERE diagnoses_icd.icd9_code = (SELECT d_icd_diagnoses.icd9_code FROM d_icd_diagnoses WHERE ... | mimic_iii |
CREATE TABLE table_36757 (
"Games" real,
"Drawn" real,
"Lost" real,
"Points difference" text,
"Points" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What are the highest number of games drawn for games numbered under 6?
| SELECT MAX("Drawn") FROM table_36757 WHERE "Games" < '6' | wikisql |
CREATE TABLE student_record (
student_id int,
course_id int,
semester int,
grade varchar,
how varchar,
transfer_source varchar,
earn_credit varchar,
repeat_term varchar,
test_id varchar
)
CREATE TABLE ta (
campus_job_id int,
student_id int,
location varchar
)
CREATE TAB... | SELECT COUNT(*) = 0 FROM course, program_course WHERE course.credits <> 17 AND course.department = 'EECS' AND program_course.category LIKE '%ULCS%' AND program_course.course_id = course.course_id | advising |
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 PER_EXP FROM t_kc24 WHERE MED_CLINIC_ID = '91446888857' | css |
CREATE TABLE Customers (
customer_id INTEGER,
payment_method_code VARCHAR(15),
customer_number VARCHAR(20),
customer_name VARCHAR(80),
customer_address VARCHAR(255),
customer_phone VARCHAR(80),
customer_email VARCHAR(80)
)
CREATE TABLE Contacts (
contact_id INTEGER,
customer_id INTE... | SELECT date_to, COUNT(date_to) FROM Customer_Address_History AS T1 JOIN Customers AS T2 ON T1.customer_id = T2.customer_id JOIN Addresses AS T3 ON T1.address_id = T3.address_id | nvbench |
CREATE TABLE table_30049462_8 (
game VARCHAR,
score VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Name the game for l 111 126
| SELECT game FROM table_30049462_8 WHERE score = "L 111–126" | sql_create_context |
CREATE TABLE table_name_34 (
opponent VARCHAR,
attendance VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Who was the opponent at the game attended by 62,657?
| SELECT opponent FROM table_name_34 WHERE attendance = "62,657" | sql_create_context |
CREATE TABLE table_12564633_1 (
series__number INTEGER,
season__number VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the series number for Season #18?
| SELECT MIN(series__number) FROM table_12564633_1 WHERE season__number = 18 | sql_create_context |
CREATE TABLE lab (
subject_id text,
hadm_id text,
itemid text,
charttime text,
flag text,
value_unit text,
label text,
fluid text
)
CREATE TABLE prescriptions (
subject_id text,
hadm_id text,
icustay_id text,
drug_type text,
drug text,
formulary_drug_cd text,
... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.days_stay > "29" AND lab.itemid = "50995" | mimicsql_data |
CREATE TABLE table_41592 (
"Animal" text,
"Cell type" text,
"Resting potential (mV)" text,
"AP increase (mV)" text,
"AP duration (ms)" text,
"Conduction speed (m/s)" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which animal has an AP duration ... | SELECT "Animal" FROM table_41592 WHERE "AP duration (ms)" = '1.0' AND "Conduction speed (m/s)" = '7–30' | wikisql |
CREATE TABLE jybgb (
BBCJBW text,
BBDM text,
BBMC text,
BBZT number,
BGDH text,
BGJGDM text,
BGJGMC text,
BGRGH text,
BGRQ time,
BGRXM text,
BGSJ time,
CJRQ time,
JSBBRQSJ time,
JSBBSJ time,
JYBBH text,
JYJGMC text,
JYJSGH text,
JYJSQM text,
JY... | SELECT mzjzjlb.JZZDBM, mzjzjlb.JZZDSM FROM hz_info JOIN mzjzjlb ON hz_info.YLJGDM = mzjzjlb.YLJGDM AND hz_info.KH = mzjzjlb.KH AND hz_info.KLX = mzjzjlb.KLX WHERE hz_info.RYBH = '79096915' | css |
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 COUNT(*) FROM (SELECT t_kc21.MED_ORG_DEPT_CD FROM t_kc21 WHERE t_kc21.MED_SER_ORG_NO = '4217937' GROUP BY t_kc21.MED_ORG_DEPT_CD HAVING MIN(t_kc21.IN_HOSP_DAYS) > 3) AS T | css |
CREATE TABLE table_name_72 (
score VARCHAR,
place VARCHAR,
player VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What was Laura Diaz's score for place t9?
| SELECT score FROM table_name_72 WHERE place = "t9" AND player = "laura diaz" | sql_create_context |
CREATE TABLE diagnoses (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE prescriptions (
subject_id text,
hadm_id text,
icustay_id text,
drug_type text,
drug text,
formulary_drug_cd text,
route text,
drug_dose text
)
C... | SELECT prescriptions.drug_type FROM prescriptions WHERE prescriptions.drug = "LR" | mimicsql_data |
CREATE TABLE table_2201724_1 (
year INTEGER
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is Fred Stolle's final year of competing in a championship?
| SELECT MAX(year) FROM table_2201724_1 | sql_create_context |
CREATE TABLE course_offering (
offering_id int,
course_id int,
semester int,
section_number int,
start_time time,
end_time time,
monday varchar,
tuesday varchar,
wednesday varchar,
thursday varchar,
friday varchar,
saturday varchar,
sunday varchar,
has_final_proje... | SELECT COUNT(*) = 0 FROM course INNER JOIN program_course ON program_course.course_id = course.course_id WHERE course.has_exams = 'N' AND program_course.category LIKE '%ULCS%' | advising |
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 prescriptions (
row_id number,
subject_id number,
hadm_id number,
startdate time,
... | SELECT COUNT(*) > 0 FROM labevents WHERE labevents.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 83499) AND DATETIME(labevents.charttime) >= DATETIME(CURRENT_TIME(), '-1 year') | mimic_iii |
CREATE TABLE Ref_Document_Types (
Document_Type_Code CHAR(15),
Document_Type_Name VARCHAR(255),
Document_Type_Description VARCHAR(255)
)
CREATE TABLE Employees (
Employee_ID INTEGER,
Role_Code CHAR(15),
Employee_Name VARCHAR(255),
Gender_MFU CHAR(1),
Date_of_Birth DATETIME,
Other_De... | SELECT Destruction_Authorised_by_Employee_ID, COUNT(*) FROM Documents_to_be_Destroyed GROUP BY Destruction_Authorised_by_Employee_ID | nvbench |
CREATE TABLE table_22647 (
"Game" real,
"Date" text,
"Opponent" text,
"Result" text,
"Dolphins points" real,
"Opponents" real,
"Record" text,
"Attendance" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the date when the opponent ... | SELECT "Date" FROM table_22647 WHERE "Opponent" = 'New England Patriots' | wikisql |
CREATE TABLE table_name_69 (
year VARCHAR,
hungarian_top_40_album_charts VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What year had the Hungarian top 40 album charts of 3?
| SELECT year FROM table_name_69 WHERE hungarian_top_40_album_charts = "3" | sql_create_context |
CREATE TABLE table_3359 (
"Total" real,
"#" real,
"Title" text,
"Directed by" text,
"Written by" text,
"Canadian air date" text,
"UK air date" text,
"Canadian Viewers (millions)" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- If the dire... | SELECT COUNT("Canadian Viewers (millions)") FROM table_3359 WHERE "Directed by" = 'Yannick Bisson' | wikisql |
CREATE TABLE table_20391799_1 (
withdrawn INTEGER,
ltsr_no VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Name the most withdrawn for 37 lstr no.
| SELECT MAX(withdrawn) FROM table_20391799_1 WHERE ltsr_no = 37 | sql_create_context |
CREATE TABLE table_name_17 (
top_25 INTEGER,
top_10 VARCHAR,
events VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the highest top-25 with more than 9 top-10 but less than 29 events?
| SELECT MAX(top_25) FROM table_name_17 WHERE top_10 > 9 AND events < 29 | sql_create_context |
CREATE TABLE table_name_13 (
free VARCHAR,
ku VARCHAR,
genitive_1 VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which Free polite has a Genitive 1 of *=ku?
| SELECT free AS polite FROM table_name_13 WHERE genitive_1 = * = ku | sql_create_context |
CREATE TABLE state (
state_code text,
state_name text,
country_name text
)
CREATE TABLE time_interval (
period text,
begin_time int,
end_time int
)
CREATE TABLE dual_carrier (
main_airline varchar,
low_flight_number int,
high_flight_number int,
dual_airline varchar,
service... | 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 = 'PITTSBURGH' AND date_day.day_number = 24 AND date_day.month_number = 5 AN... | atis |
CREATE TABLE table_10915 (
"Matches" real,
"Innings" real,
"Not Outs" real,
"Runs" real,
"Average" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the lowest number of Not Outs when there were more than 25 innings?
| SELECT MIN("Not Outs") FROM table_10915 WHERE "Innings" > '25' | wikisql |
CREATE TABLE constructors (
constructorId INTEGER,
constructorRef TEXT,
name TEXT,
nationality TEXT,
url TEXT
)
CREATE TABLE lapTimes (
raceId INTEGER,
driverId INTEGER,
lap INTEGER,
position INTEGER,
time TEXT,
milliseconds INTEGER
)
CREATE TABLE driverStandings (
driv... | SELECT location, circuitId FROM circuits WHERE country = "France" OR country = "Belgium" ORDER BY circuitId | nvbench |
CREATE TABLE table_1341663_44 (
incumbent VARCHAR,
district VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What was the incumbent for texas 19?
| SELECT incumbent FROM table_1341663_44 WHERE district = "Texas 19" | sql_create_context |
CREATE TABLE table_54299 (
"Date" text,
"Tournament" text,
"Winning score" text,
"Margin of victory" text,
"Runner(s)-up" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Who is the runner(s)-up for a winning score of 3 (71-74-66-66=277)?
| SELECT "Runner(s)-up" FROM table_54299 WHERE "Winning score" = '−3 (71-74-66-66=277)' | wikisql |
CREATE TABLE table_14558 (
"Opponent" text,
"OVERALL" text,
"HOME" text,
"AWAY" text,
"PLYFF" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which team has an overall playoff of (0-0), a home record of (0-1) and played the Green Bay Blizzard team?
| SELECT "OVERALL" FROM table_14558 WHERE "PLYFF" = '(0-0)' AND "HOME" = '(0-1)' AND "Opponent" = 'green bay blizzard' | wikisql |
CREATE TABLE competition (
competition_id number,
year number,
competition_type text,
country text
)
CREATE TABLE competition_result (
competition_id number,
club_id_1 number,
club_id_2 number,
score text
)
CREATE TABLE player (
player_id number,
name text,
position text,
... | SELECT competition_type FROM competition GROUP BY competition_type HAVING COUNT(*) <= 5 | spider |
CREATE TABLE prescriptions (
subject_id text,
hadm_id text,
icustay_id text,
drug_type text,
drug text,
formulary_drug_cd text,
route text,
drug_dose text
)
CREATE TABLE procedures (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE demographic.admission_type = "EMERGENCY" AND prescriptions.route = "IH" | mimicsql_data |
CREATE TABLE table_name_35 (
attendance INTEGER,
loss VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the largest Attendance with a Loss of darling (0 1)?
| SELECT MAX(attendance) FROM table_name_35 WHERE loss = "darling (0–1)" | sql_create_context |
CREATE TABLE admissions (
row_id number,
subject_id number,
hadm_id number,
admittime time,
dischtime time,
admission_type text,
admission_location text,
discharge_location text,
insurance text,
language text,
marital_status text,
ethnicity text,
age number
)
CREATE ... | SELECT (SELECT chartevents.valuenum FROM chartevents WHERE chartevents.icustay_id IN (SELECT icustays.icustay_id FROM icustays WHERE icustays.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 6536 AND NOT admissions.dischtime IS NULL ORDER BY admissions.admittime DESC LIMIT 1)) AND cha... | mimic_iii |
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 diagnoses (
... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.insurance = "Self Pay" AND demographic.days_stay > "26" | mimicsql_data |
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_NM = '窦霞月' AND t_kc22.STA_DATE BETWEEN '2006-06-24' AND '2013-02-13' AND t_kc22.t_kc21_MED_SER_ORG_NO = '1539337' AND t_kc22.MED_INV_ITEM_TYPE = '检查费' | css |
CREATE TABLE table_name_61 (
try_bonus VARCHAR,
points_against VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What Try bonus has a Points against of 488?
| SELECT try_bonus FROM table_name_61 WHERE points_against = "488" | sql_create_context |
CREATE TABLE table_name_18 (
coach VARCHAR,
ncaa VARCHAR,
losses VARCHAR,
conference_titles VARCHAR,
seasons VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which coach has 0 conference titles, more than 2 seasons, higher than 87 losses and 0 NCAA... | SELECT coach FROM table_name_18 WHERE conference_titles = "0" AND seasons > 2 AND losses > 87 AND ncaa = "0" | sql_create_context |
CREATE TABLE table_24329520_8 (
county VARCHAR,
borough VARCHAR,
members VARCHAR,
franchise_type VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which county has a membership of 1, a franchise type of corporation and a borough of Ennis?
| SELECT county FROM table_24329520_8 WHERE members = 1 AND franchise_type = "Corporation" AND borough = "Ennis" | sql_create_context |
CREATE TABLE Votes (
Id number,
PostId number,
VoteTypeId number,
UserId number,
CreationDate time,
BountyAmount number
)
CREATE TABLE CloseReasonTypes (
Id number,
Name text,
Description text
)
CREATE TABLE ReviewTaskResults (
Id number,
ReviewTaskId number,
ReviewTask... | SELECT * FROM TagSynonyms WHERE Score >= 4 | sede |
CREATE TABLE table_name_67 (
player VARCHAR,
money___$__ VARCHAR,
score VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which player has $450 and a score of 76-74-74-72=296?
| SELECT player FROM table_name_67 WHERE money___$__ = "450" AND score = 76 - 74 - 74 - 72 = 296 | sql_create_context |
CREATE TABLE table_1397655_1 (
city VARCHAR,
station VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- where is citv located
| SELECT city FROM table_1397655_1 WHERE station = "CITV" | sql_create_context |
CREATE TABLE table_55487 (
"Outcome" text,
"Date" text,
"Tournament" text,
"Surface" text,
"Opponent" text,
"Score" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- When was andrea g miz the opponent?
| SELECT "Date" FROM table_55487 WHERE "Opponent" = 'andrea gámiz' | wikisql |
CREATE TABLE table_name_7 (
opponent VARCHAR,
score VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Name the opponent with score of 1 6, 6 4, 6 4
| SELECT opponent FROM table_name_7 WHERE score = "1–6, 6–4, 6–4" | sql_create_context |
CREATE TABLE table_10428 (
"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 mean number of laps where time/retired was +1:05.564?
| SELECT AVG("Laps") FROM table_10428 WHERE "Time/Retired" = '+1:05.564' | wikisql |
CREATE TABLE wdmzjzjlb (
HXPLC number,
HZXM text,
JLSJ time,
JZJSSJ time,
JZKSBM text,
JZKSMC text,
JZKSRQ time,
JZLSH number,
JZZDBM text,
JZZDSM text,
JZZTDM number,
JZZTMC text,
KH text,
KLX number,
MJZH text,
ML number,
MZZYZDZZBM text,
MZZYZDZ... | SELECT jybgb.BGDH FROM person_info JOIN hz_info JOIN wdmzjzjlb JOIN jybgb ON person_info.RYBH = hz_info.RYBH AND hz_info.YLJGDM = wdmzjzjlb.YLJGDM AND hz_info.KH = wdmzjzjlb.KH AND hz_info.KLX = wdmzjzjlb.KLX AND wdmzjzjlb.YLJGDM = jybgb.YLJGDM_MZJZJLB AND wdmzjzjlb.JZLSH = jybgb.JZLSH_MZJZJLB WHERE person_info.XM = '何... | css |
CREATE TABLE table_27116696_1 (
us_viewers__million_ VARCHAR,
directed_by VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- How many U.S. viewers (million) watched the episode directed by Allison Liddi-Brown?
| SELECT us_viewers__million_ FROM table_27116696_1 WHERE directed_by = "Allison Liddi-Brown" | sql_create_context |
CREATE TABLE table_11634 (
"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.
-- When playing at the Kardinia Park; what was the ... | SELECT "Home team score" FROM table_11634 WHERE "Venue" = 'kardinia park' | wikisql |
CREATE TABLE ship (
ship_id number,
name text,
type text,
built_year number,
class text,
flag text
)
CREATE TABLE captain (
captain_id number,
name text,
ship_id number,
age text,
class text,
rank text
)
-- Using valid SQLite, answer the following questions for the tab... | SELECT rank FROM captain EXCEPT SELECT rank FROM captain WHERE class = 'Third-rate ship of the line' | spider |
CREATE TABLE table_2715355_1 (
total_prize_pool VARCHAR,
location VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What was the prize pool in New Orleans?
| SELECT total_prize_pool FROM table_2715355_1 WHERE location = "New Orleans" | sql_create_context |
CREATE TABLE Addresses (
Address_ID VARCHAR(100),
Line_1 VARCHAR(255),
Line_2 VARCHAR(255),
City_Town VARCHAR(255),
State_County VARCHAR(255),
Other_Details VARCHAR(255)
)
CREATE TABLE Ref_Service_Types (
Service_Type_Code CHAR(15),
Parent_Service_Type_Code CHAR(15),
Service_Type_De... | SELECT Order_Date, COUNT(Order_Date) FROM Customer_Orders AS T1 JOIN Order_Items AS T2 ON T1.Order_ID = T2.Order_ID JOIN Products AS T3 ON T2.Product_ID = T3.Product_ID WHERE T3.Product_Price > 1000 | nvbench |
CREATE TABLE regions (
REGION_ID decimal(5,0),
REGION_NAME varchar(25)
)
CREATE TABLE countries (
COUNTRY_ID varchar(2),
COUNTRY_NAME varchar(40),
REGION_ID decimal(10,0)
)
CREATE TABLE job_history (
EMPLOYEE_ID decimal(6,0),
START_DATE date,
END_DATE date,
JOB_ID varchar(10),
... | SELECT FIRST_NAME, MANAGER_ID FROM employees ORDER BY MANAGER_ID DESC | nvbench |
CREATE TABLE table_33527 (
"Name" text,
"Team" text,
"Qual 1" text,
"Qual 2" text,
"Best" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What was CTE Racing-hvm's Best with a Qual 2 of 50.312?
| SELECT "Best" FROM table_33527 WHERE "Team" = 'cte racing-hvm' AND "Qual 2" = '50.312' | wikisql |
CREATE TABLE table_25352324_5 (
points VARCHAR,
rebounds VARCHAR,
blocks VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is every value for points if rebounds is 6 and blocks is 0?
| SELECT points FROM table_25352324_5 WHERE rebounds = 6 AND blocks = 0 | sql_create_context |
CREATE TABLE table_77328 (
"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 TO PAR WITH A FINISH OF T11, FOR DAVID GRAHAM?
| SELECT "To par" FROM table_77328 WHERE "Finish" = 't11' AND "Player" = 'david graham' | wikisql |
CREATE TABLE table_76537 (
"Scorer" text,
"Club" text,
"League goals" text,
"FA Cup goals" text,
"League Cup goals" real,
"Texaco Cup goals" text,
"Euro competitions" text,
"Total" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is t... | SELECT COUNT("Total") FROM table_76537 WHERE "Club" = 'leeds united' AND "League goals" = '13' | wikisql |
CREATE TABLE table_54804 (
"Frequency" text,
"Call sign" text,
"Name" text,
"Format" text,
"Owner" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which owner has the frequency of 103.3 FM?
| SELECT "Owner" FROM table_54804 WHERE "Frequency" = '103.3 fm' | wikisql |
CREATE TABLE table_7905 (
"Date" text,
"Opponent" text,
"Venue" text,
"Result" text,
"Attendance" text,
"Competition" text,
"Man of the Match" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What Away Competition had a Result of lost 2-4?
| SELECT "Competition" FROM table_7905 WHERE "Venue" = 'away' AND "Result" = 'lost 2-4' | wikisql |
CREATE TABLE table_17582 (
"Season" text,
"Mens singles" text,
"Womens singles" text,
"Mens doubles" text,
"Womens doubles" text,
"Mixed doubles" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Who won the Mens Singles when the Mixed doubles went... | SELECT "Mens singles" FROM table_17582 WHERE "Mixed doubles" = 'Stellan Mohlin Kerstin Ståhl , AIK' | wikisql |
CREATE TABLE microlab (
microlabid number,
patientunitstayid number,
culturesite text,
organism text,
culturetakentime time
)
CREATE TABLE cost (
costid number,
uniquepid text,
patienthealthsystemstayid number,
eventtype text,
eventid number,
chargetime time,
cost number... | SELECT COUNT(DISTINCT patient.uniquepid) FROM patient WHERE patient.patientunitstayid IN (SELECT medication.patientunitstayid FROM medication WHERE medication.drugname = 'potassium chloride inj' AND DATETIME(medication.drugstarttime, 'start of year') = DATETIME(CURRENT_TIME(), 'start of year', '-0 year')) | eicu |
CREATE TABLE table_train_198 (
"id" int,
"hemoglobin_a1c_hba1c" float,
"fasting_plasma_glucose" int,
"diabetes" bool,
"body_mass_index_bmi" float,
"type_1_patients" bool,
"NOUSE" float
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- no type i pati... | SELECT * FROM table_train_198 WHERE type_1_patients = 0 | criteria2sql |
CREATE TABLE table_name_38 (
minoru VARCHAR,
block_a VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Name the minoru for block A being koji kanemoto
| SELECT minoru FROM table_name_38 WHERE block_a = "koji kanemoto" | sql_create_context |
CREATE TABLE table_261895_1 (
institution VARCHAR,
type VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- which institutions can be categorized as private/united church of christ?
| SELECT institution FROM table_261895_1 WHERE type = "Private/United Church of Christ" | sql_create_context |
CREATE TABLE time_zone (
time_zone_code text,
time_zone_name text,
hours_from_gmt int
)
CREATE TABLE flight_leg (
flight_id int,
leg_number int,
leg_flight int
)
CREATE TABLE airline (
airline_code varchar,
airline_name text,
note text
)
CREATE TABLE flight_stop (
flight_id in... | 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, days, fare, flight, flight_fare WHERE ((((((flight.arrival_time < flight.departure_time) AND days.day_name = 'MONDAY' AND flight.flight_days = days.days_code) OR (days.day_na... | atis |
CREATE TABLE table_12125069_2 (
winning_pitcher VARCHAR,
attendance VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Who is the winning pitcher when attendance is 38109?
| SELECT winning_pitcher FROM table_12125069_2 WHERE attendance = 38109 | sql_create_context |
CREATE TABLE table_name_20 (
score VARCHAR,
place VARCHAR,
player VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is score of the game played in place t8 with Byron Nelson playing?
| SELECT score FROM table_name_20 WHERE place = "t8" AND player = "byron nelson" | sql_create_context |
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 microbiologyevents (
row_id number,
subject_id number,
hadm_id number,
charttime time,... | SELECT d_items.label FROM d_items WHERE d_items.itemid IN (SELECT t1.itemid FROM (SELECT outputevents.itemid, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM outputevents WHERE DATETIME(outputevents.charttime, 'start of year') = DATETIME(CURRENT_TIME(), 'start of year', '-1 year') GROUP BY outputevents.itemid) AS... | mimic_iii |
CREATE TABLE table_25319 (
"Game" text,
"Date" text,
"Champion" text,
"Score" text,
"Runner Up" text,
"Stadium" text,
"City" text,
"Ted Morris Memorial Trophy (Game MVP)" text,
"Bruce Coulter Award" text
)
-- Using valid SQLite, answer the following questions for the tables provide... | SELECT "Ted Morris Memorial Trophy (Game MVP)" FROM table_25319 WHERE "Game" = '34th' | wikisql |
CREATE TABLE keyphrase (
keyphraseid int,
keyphrasename varchar
)
CREATE TABLE paper (
paperid int,
title varchar,
venueid int,
year int,
numciting int,
numcitedby int,
journalid int
)
CREATE TABLE journal (
journalid int,
journalname varchar
)
CREATE TABLE field (
fie... | SELECT DISTINCT AUTHOR_1.authorid FROM author AS AUTHOR_0, author AS AUTHOR_1, writes AS WRITES_0, writes AS WRITES_1 WHERE AUTHOR_0.authorname = 'Noah A Smith' AND WRITES_0.authorid = AUTHOR_0.authorid AND WRITES_1.authorid = AUTHOR_1.authorid AND WRITES_1.paperid = WRITES_0.paperid | scholar |
CREATE TABLE PostNoticeTypes (
Id number,
ClassId number,
Name text,
Body text,
IsHidden boolean,
Predefined boolean,
PostNoticeDurationId number
)
CREATE TABLE ReviewTaskResults (
Id number,
ReviewTaskId number,
ReviewTaskResultTypeId number,
CreationDate time,
Rejectio... | SELECT Users.DisplayName, Users.Reputation, Users.Id AS ID, Users.WebsiteUrl FROM Users JOIN (SELECT Users.Id AS UserId FROM Posts JOIN PostTags ON Posts.Id = PostTags.PostId JOIN Users ON Users.Id = Posts.OwnerUserId WHERE (PostTags.TagId = 10 OR PostTags.TagId = 9) GROUP BY Users.Id) AS TopicUsers ON UserId = Users.I... | sede |
CREATE TABLE table_49338 (
"Place" text,
"Player" text,
"Country" text,
"Score" text,
"To par" text,
"Money ( $ )" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- what is the to par for Dave hill?
| SELECT "To par" FROM table_49338 WHERE "Player" = 'dave hill' | wikisql |
CREATE TABLE table_60943 (
"Place" real,
"Nation" text,
"All Around" real,
"Final" real,
"Total" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the average final with an all around greater than 19.35 and a total over 40?
| SELECT AVG("Final") FROM table_60943 WHERE "All Around" > '19.35' AND "Total" > '40' | wikisql |
CREATE TABLE jybgb (
BBCJBW text,
BBDM text,
BBMC text,
BBZT number,
BGDH text,
BGJGDM text,
BGJGMC text,
BGRGH text,
BGRQ time,
BGRXM text,
BGSJ time,
CJRQ time,
JSBBRQSJ time,
JSBBSJ time,
JYBBH text,
JYJGMC text,
JYJSGH text,
JYJSQM text,
JY... | SELECT COUNT(*) FROM wdmzjzjlb WHERE wdmzjzjlb.JZKSDM = '19305' AND wdmzjzjlb.RYDJSJ BETWEEN '2002-04-26' AND '2011-01-19' UNION SELECT COUNT(*) FROM bdmzjzjlb WHERE bdmzjzjlb.JZKSDM = '19305' AND bdmzjzjlb.RYDJSJ BETWEEN '2002-04-26' AND '2011-01-19' | css |
CREATE TABLE table_name_86 (
opponent VARCHAR,
score VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- who is the opponent when the score is 7 5, 7 6 (8 6)?
| SELECT opponent FROM table_name_86 WHERE score = "7–5, 7–6 (8–6)" | sql_create_context |
CREATE TABLE area (
course_id int,
area varchar
)
CREATE TABLE instructor (
instructor_id int,
name varchar,
uniqname varchar
)
CREATE TABLE jobs (
job_id int,
job_title varchar,
description varchar,
requirement varchar,
city varchar,
state varchar,
country varchar,
... | SELECT DISTINCT instructor.name FROM course INNER JOIN course_offering ON course.course_id = course_offering.course_id INNER JOIN semester ON semester.semester_id = course_offering.semester INNER JOIN program_course ON program_course.course_id = course_offering.course_id INNER JOIN offering_instructor ON offering_instr... | advising |
CREATE TABLE grapes (
id number,
grape text,
color text
)
CREATE TABLE wine (
no number,
grape text,
winery text,
appelation text,
state text,
name text,
year number,
price number,
score number,
cases number,
drink text
)
CREATE TABLE appellations (
no numbe... | SELECT MAX(price), MAX(score) FROM wine WHERE appelation = "St. Helena" | spider |
CREATE TABLE table_22083 (
"Birth Name" text,
"Birth Name As Announced in Latin (Accusative case Forename Undeclined Surname)" text,
"Papal Name" text,
"Papal Name As Announced in Latin" text,
"Latin declension of Papal Name" text,
"Numeral in Papal Name" text
)
-- Using valid SQLite, answer t... | SELECT "Papal Name" FROM table_22083 WHERE "Papal Name As Announced in Latin" = 'Ioannis Pauli primi' | wikisql |
CREATE TABLE table_name_24 (
attendance VARCHAR,
home_team VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the attendance of the match with F.C. central chugoku as the home team?
| SELECT attendance FROM table_name_24 WHERE home_team = "f.c. central chugoku" | 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 employees (
EMPLOYEE_ID decimal(6,0),
FIRST_NAME varchar(20),
LAST_NAME varchar(25),
EMAIL varchar(25),
PHONE_NUMBER varchar(20),
HIRE_DATE date,
JO... | SELECT HIRE_DATE, AVG(DEPARTMENT_ID) FROM employees WHERE SALARY BETWEEN 8000 AND 12000 AND COMMISSION_PCT <> "null" OR DEPARTMENT_ID <> 40 | nvbench |
CREATE TABLE table_49040 (
"Name (English)" text,
"Name (German)" text,
"Abbr." text,
"Ideology" text,
"Position" text,
"Votes (2011)" text,
"Seats in Hamburgische B\u00fcrgerschaft" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- WHAT IS THE... | SELECT "Abbr." FROM table_49040 WHERE "Votes (2011)" = '11.2%' | wikisql |
CREATE TABLE table_name_55 (
athlete VARCHAR,
punishment VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which athlete had a six month suspension from IIHF?
| SELECT athlete FROM table_name_55 WHERE punishment = "six month suspension from iihf" | sql_create_context |
CREATE TABLE table_12086 (
"Place" text,
"Player" text,
"Country" text,
"Score" text,
"To par" text,
"Money ( $ )" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Can you tell me the sum of Money ($) that has the Score of 69-72-67-71=279, and the... | SELECT SUM("Money ( $ )") FROM table_12086 WHERE "Score" = '69-72-67-71=279' AND "Player" = 'loren roberts' | 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 diagnoses (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE prescriptions... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE demographic.admityear < "2155" AND prescriptions.route = "PR" | mimicsql_data |
CREATE TABLE table_name_6 (
location_attendance VARCHAR,
record VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the location and attendance of the game with a 3-1-0 record?
| SELECT location_attendance FROM table_name_6 WHERE record = "3-1-0" | sql_create_context |
CREATE TABLE table_27768 (
"Series #" real,
"Season #" real,
"Title" text,
"Directed by" text,
"Written by" text,
"Original air date" text,
"Production code" real,
"U.S. viewers (millions)" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- ... | SELECT "Title" FROM table_27768 WHERE "Directed by" = 'Linda Mendoza' | wikisql |
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 jyjgzbb.JCZBMC, jyjgzbb.JCZBJGDL, jyjgzbb.JCZBJGDW FROM zyjybgb JOIN jyjgzbb ON zyjybgb.YLJGDM = jyjgzbb.YLJGDM AND zyjybgb.BGDH = jyjgzbb.BGDH WHERE zyjybgb.JZLSH = '81824209749' AND jyjgzbb.JCRXM LIKE '曹%' UNION SELECT jyjgzbb.JCZBMC, jyjgzbb.JCZBJGDL, jyjgzbb.JCZBJGDW FROM mzjybgb JOIN jyjgzbb ON mzjybgb.YLJG... | css |
CREATE TABLE Guests (
guest_id INTEGER,
gender_code CHAR(1),
guest_first_name VARCHAR(80),
guest_last_name VARCHAR(80),
date_of_birth DATETIME
)
CREATE TABLE Apartment_Bookings (
apt_booking_id INTEGER,
apt_id INTEGER,
guest_id INTEGER,
booking_status_code CHAR(15),
booking_star... | 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.apt_type_code = "Duplex" ORDER BY COUNT(booking_start_date) | nvbench |
CREATE TABLE lab (
subject_id text,
hadm_id text,
itemid text,
charttime text,
flag text,
value_unit text,
label text,
fluid text
)
CREATE TABLE prescriptions (
subject_id text,
hadm_id text,
icustay_id text,
drug_type text,
drug text,
formulary_drug_cd text,
... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.admityear < "2167" AND procedures.icd9_code = "3532" | mimicsql_data |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.