instruction stringlengths 151 7.46k | output stringlengths 2 4.44k | source stringclasses 26
values |
|---|---|---|
CREATE TABLE table_74062 (
"Team" text,
"Outgoing manager" text,
"Manner of departure" text,
"Date of vacancy" text,
"Replaced by" text,
"Date of appointment" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Who replaced the manager of Akhisar B.G... | SELECT "Replaced by" FROM table_74062 WHERE "Team" = 'Akhisar B.G.S.' | wikisql |
CREATE TABLE table_17471 (
"Year" real,
"Division" text,
"League" text,
"Regular Season" text,
"Playoffs" text,
"Open Cup" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- For which league is the open cup the quarter finals
| SELECT "League" FROM table_17471 WHERE "Open Cup" = 'Quarter Finals' | wikisql |
CREATE TABLE table_train_235 (
"id" int,
"urinary_protein" float,
"nephrotic_range_proteinuria" bool,
"hepatic_disease" bool,
"estimated_glomerular_filtration_rate_egfr" int,
"kidney_disease" bool,
"renal_transplantation" bool,
"NOUSE" float
)
-- Using valid SQLite, answer the followin... | SELECT * FROM table_train_235 WHERE estimated_glomerular_filtration_rate_egfr > 30 | criteria2sql |
CREATE TABLE zyjzjlb (
YLJGDM text,
JZLSH text,
MZJZLSH text,
KH text,
KLX number,
HZXM text,
WDBZ number,
RYDJSJ time,
RYTJDM number,
RYTJMC text,
JZKSDM text,
JZKSMC text,
RZBQDM text,
RZBQMC text,
RYCWH text,
CYKSDM text,
CYKSMC text,
CYBQDM tex... | SELECT zyjzjlb.JZLSH FROM hz_info JOIN zyjzjlb ON hz_info.YLJGDM = zyjzjlb.YLJGDM AND hz_info.KH = zyjzjlb.KH AND hz_info.KLX = zyjzjlb.KLX WHERE hz_info.RYBH = '42116254' AND NOT zyjzjlb.JZLSH IN (SELECT JZLSH FROM jybgb WHERE BGRQ >= '2019-05-06') | css |
CREATE TABLE month (
month_number int,
month_name text
)
CREATE TABLE flight_fare (
flight_id int,
fare_id int
)
CREATE TABLE flight_leg (
flight_id int,
leg_number int,
leg_flight int
)
CREATE TABLE time_zone (
time_zone_code text,
time_zone_name text,
hours_from_gmt int
)
C... | SELECT DISTINCT fare.fare_id FROM aircraft, airport_service AS AIRPORT_SERVICE_0, airport_service AS AIRPORT_SERVICE_1, city AS CITY_0, city AS CITY_1, date_day AS DATE_DAY_0, date_day AS DATE_DAY_1, days AS DAYS_0, days AS DAYS_1, equipment_sequence, fare, fare_basis, flight, flight_fare WHERE ((aircraft.basic_type = ... | atis |
CREATE TABLE table_204_301 (
id number,
"nationality" text,
"name" text,
"term as a deputy judge" text,
"reason for termination" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- did yugoslavia have more , less , or equal deputy judges to china ?
| SELECT (SELECT COUNT("name") FROM table_204_301 WHERE "nationality" = 'yugoslavia') > (SELECT COUNT("name") FROM table_204_301 WHERE "nationality" = 'china') | squall |
CREATE TABLE table_name_93 (
population VARCHAR,
area_km_2 VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the population when the area km2 is 173.4?
| SELECT population FROM table_name_93 WHERE area_km_2 = 173.4 | sql_create_context |
CREATE TABLE table_6138 (
"Surname" text,
"First" text,
"D.O.B." text,
"Uni#" real,
"Bats" text,
"Throws" text,
"Position" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which position has L bats and Anderson as a surname?
| SELECT "Position" FROM table_6138 WHERE "Bats" = 'l' AND "Surname" = 'anderson' | wikisql |
CREATE TABLE table_25082 (
"Year" real,
"Network" text,
"Race caller" text,
"s Host" text,
"s Analyst" text,
"Reporters" text,
"Trophy presentation" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Name the race caller for jim mckay and howard... | SELECT "Race caller" FROM table_25082 WHERE "s Host" = 'Jim McKay' AND "Reporters" = 'Howard Cosell' | wikisql |
CREATE TABLE cost (
row_id number,
subject_id number,
hadm_id number,
event_type text,
event_id number,
chargetime time,
cost number
)
CREATE TABLE d_items (
row_id number,
itemid number,
label text,
linksto text
)
CREATE TABLE labevents (
row_id number,
subject_id ... | SELECT d_icd_diagnoses.short_title FROM d_icd_diagnoses WHERE d_icd_diagnoses.icd9_code IN (SELECT t3.icd9_code FROM (SELECT t2.icd9_code, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM (SELECT admissions.subject_id, procedures_icd.charttime FROM procedures_icd JOIN admissions ON procedures_icd.hadm_id = admissi... | mimic_iii |
CREATE TABLE table_name_89 (
week VARCHAR,
date VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- The game on September 2, 1979 was during which week of the season?
| SELECT COUNT(week) FROM table_name_89 WHERE date = "september 2, 1979" | sql_create_context |
CREATE TABLE section (
course_id varchar(8),
sec_id varchar(8),
semester varchar(6),
year numeric(4,0),
building varchar(15),
room_number varchar(7),
time_slot_id varchar(4)
)
CREATE TABLE department (
dept_name varchar(20),
building varchar(15),
budget numeric(12,2)
)
CREATE T... | SELECT building, COUNT(building) FROM department GROUP BY building ORDER BY COUNT(building) | nvbench |
CREATE TABLE table_name_76 (
mascot VARCHAR,
school VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which Mascot has a School of logansport community?
| SELECT mascot FROM table_name_76 WHERE school = "logansport community" | sql_create_context |
CREATE TABLE table_67353 (
"Date" text,
"City" text,
"Event" text,
"Winner" text,
"Prize" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Who is the Winner, when the Prize is 880,000?
| SELECT "Winner" FROM table_67353 WHERE "Prize" = '€880,000' | wikisql |
CREATE TABLE table_1139835_3 (
winners VARCHAR,
season_result VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- who is the winners where season result is 9th
| SELECT winners FROM table_1139835_3 WHERE season_result = "9th" | sql_create_context |
CREATE TABLE table_17360840_4 (
attendance VARCHAR,
opponent VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- How many attended on mathches against atlanta thrashers
| SELECT COUNT(attendance) FROM table_17360840_4 WHERE opponent = "Atlanta Thrashers" | sql_create_context |
CREATE TABLE PostNoticeTypes (
Id number,
ClassId number,
Name text,
Body text,
IsHidden boolean,
Predefined boolean,
PostNoticeDurationId number
)
CREATE TABLE CloseAsOffTopicReasonTypes (
Id number,
IsUniversal boolean,
InputTitle text,
MarkdownInputGuidance text,
Mark... | SELECT COUNT(q.Id) FROM Posts AS q INNER JOIN Posts AS a ON q.AcceptedAnswerId = a.Id WHERE q.PostTypeId = 1 | sede |
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 INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.dob_year < "2076" AND lab.label = "Phosphate, Urine" | mimicsql_data |
CREATE TABLE table_27169029_1 (
written_by VARCHAR,
original_air_date VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Who wrote the episode that aired on September 26, 2010?
| SELECT written_by FROM table_27169029_1 WHERE original_air_date = "September 26, 2010" | sql_create_context |
CREATE TABLE countries (
COUNTRY_ID varchar(2),
COUNTRY_NAME varchar(40),
REGION_ID decimal(10,0)
)
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 ... | SELECT HIRE_DATE, EMPLOYEE_ID FROM employees WHERE NOT DEPARTMENT_ID IN (SELECT DEPARTMENT_ID FROM departments WHERE MANAGER_ID BETWEEN 100 AND 200) ORDER BY HIRE_DATE | nvbench |
CREATE TABLE mzjzjlb (
HXPLC number,
HZXM text,
JLSJ time,
JZJSSJ time,
JZKSBM text,
JZKSMC text,
JZKSRQ time,
JZLSH text,
JZZDBM text,
JZZDSM text,
JZZTDM number,
JZZTMC text,
KH text,
KLX number,
MJZH text,
ML number,
MZZYZDZZBM text,
MZZYZDZZMC ... | SELECT jyjgzbb.JCRGH, jyjgzbb.JCRXM FROM hz_info JOIN mzjzjlb JOIN jybgb JOIN jyjgzbb JOIN mzjzjlb_jybgb ON hz_info.YLJGDM = mzjzjlb.YLJGDM AND hz_info.KH = mzjzjlb.KH AND hz_info.KLX = mzjzjlb.KLX AND mzjzjlb.YLJGDM = mzjzjlb_jybgb.YLJGDM_MZJZJLB AND mzjzjlb.JZLSH = jybgb.JZLSH_MZJZJLB AND jybgb.YLJGDM = jyjgzbb.YLJGD... | css |
CREATE TABLE zyjzjlb_jybgb (
YLJGDM_ZYJZJLB text,
BGDH number,
YLJGDM number
)
CREATE TABLE zyjzjlb (
CYBQDM text,
CYBQMC text,
CYCWH text,
CYKSDM text,
CYKSMC text,
CYSJ time,
CYZTDM number,
HZXM text,
JZKSDM text,
JZKSMC text,
JZLSH text,
KH text,
KLX n... | SELECT zyjzjlb.JZLSH FROM hz_info JOIN zyjzjlb ON hz_info.YLJGDM = zyjzjlb.YLJGDM AND hz_info.KH = zyjzjlb.KH AND hz_info.KLX = zyjzjlb.KLX WHERE hz_info.RYBH = '90180222' AND NOT zyjzjlb.JZLSH IN (SELECT jybgb.JZLSH FROM jybgb WHERE jybgb.BGRQ <= '2021-06-07') | css |
CREATE TABLE table_24198 (
"Round" real,
"Country" text,
"Circuit" text,
"Date" text,
"Pole Position" text,
"Fastest Lap" text,
"Winning Rider" text,
"Winning Team" text,
"Report" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- When a... | SELECT "Report" FROM table_24198 WHERE "Circuit" = 'Autodromo Nazionale Monza' | wikisql |
CREATE TABLE table_14701 (
"Name" text,
"Country" text,
"Loan Club" text,
"Started" text,
"Ended" text,
"Start Source" text,
"End Source" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What was the start source that ended on 4 May?
| SELECT "Start Source" FROM table_14701 WHERE "Ended" = '4 may' | wikisql |
CREATE TABLE branch (
Branch_ID int,
Name text,
Open_year text,
Address_road text,
City text,
membership_amount text
)
CREATE TABLE membership_register_branch (
Member_ID int,
Branch_ID text,
Register_Year text
)
CREATE TABLE member (
Member_ID int,
Card_Number text,
Na... | SELECT City, COUNT(City) FROM branch GROUP BY City ORDER BY Open_year | nvbench |
CREATE TABLE table_15187735_10 (
segment_d VARCHAR,
segment_a VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Name the total number of segment d for wooden s barrel
| SELECT COUNT(segment_d) FROM table_15187735_10 WHERE segment_a = "Wooden s Barrel" | sql_create_context |
CREATE TABLE table_47445 (
"Series Sorted" text,
"Title" text,
"Doctor" text,
"Featuring" text,
"Released" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- what is the series sorted when the released is may 2012?
| SELECT "Series Sorted" FROM table_47445 WHERE "Released" = 'may 2012' | wikisql |
CREATE TABLE table_name_24 (
actor_required VARCHAR,
flatspin VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Who is the actor required when Edna Stricken is the FlatSpin actor?
| SELECT actor_required FROM table_name_24 WHERE flatspin = "edna stricken" | 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 prescriptions.formulary_drug_cd = "NS50" | mimicsql_data |
CREATE TABLE table_name_5 (
date VARCHAR,
loss VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What was the date of the game that had a loss of Geisel (0-1)?
| SELECT date FROM table_name_5 WHERE loss = "geisel (0-1)" | 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 procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.dob_year < "1821" AND procedures.long_title = "Other gastroenterostomy without gastrectomy" | mimicsql_data |
CREATE TABLE table_33356 (
"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 is the venue for the game on 1 June 1929 wh... | SELECT "Venue" FROM table_33356 WHERE "Date" = '1 june 1929' AND "Away team" = 'richmond' | wikisql |
CREATE TABLE table_12077540_1 (
year INTEGER
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- The earliest year is 1996.
| SELECT MIN(year) FROM table_12077540_1 | sql_create_context |
CREATE TABLE table_2240 (
"English name" text,
"Thai name" text,
"Abbr." text,
"Transcription" text,
"Sanskrit word" text,
"Zodiac sign" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What's the zodiac sign for the month with Thai name ?
| SELECT "Zodiac sign" FROM table_2240 WHERE "Thai name" = 'มกราคม' | wikisql |
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,
MZBMLX number,
MZJZLSH text,
MZZDBM text,
MZZDMC text,
MZZYZDZZBM... | SELECT mzjzjlb.JZLSH FROM person_info JOIN hz_info JOIN mzjzjlb ON person_info.RYBH = hz_info.RYBH AND hz_info.YLJGDM = mzjzjlb.YLJGDM AND hz_info.KH = mzjzjlb.KH AND hz_info.KLX = mzjzjlb.KLX WHERE person_info.XM = '褚芳芳' AND NOT mzjzjlb.JZLSH IN (SELECT jybgb.JZLSH FROM jybgb WHERE jybgb.BGRQ <= '2013-05-19') | css |
CREATE TABLE table_75466 (
"Date" text,
"Venue" text,
"Opponents" text,
"Score" text,
"Competition" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which Competition has Opponents of pkns fc, and a Score of 0-0?
| SELECT "Competition" FROM table_75466 WHERE "Opponents" = 'pkns fc' AND "Score" = '0-0' | 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 T2.Name, COUNT(*) FROM Products AS T1 JOIN Manufacturers AS T2 ON T1.Manufacturer = T2.Code GROUP BY T2.Name ORDER BY COUNT(*) | nvbench |
CREATE TABLE person_info_hz_info (
RYBH text,
KH number,
KLX number,
YLJGDM number
)
CREATE TABLE zyjzjlb (
CYBQDM text,
CYBQMC text,
CYCWH text,
CYKSDM text,
CYKSMC text,
CYSJ time,
CYZTDM number,
HZXM text,
JZKSDM text,
JZKSMC text,
JZLSH text,
KH text,... | SELECT mzjzjlb.JZLSH FROM person_info JOIN hz_info JOIN mzjzjlb JOIN person_info_hz_info ON person_info.RYBH = person_info_hz_info.RYBH AND hz_info.YLJGDM = mzjzjlb.YLJGDM AND hz_info.KH = mzjzjlb.KH AND hz_info.KLX = mzjzjlb.KLX AND person_info_hz_info.KH = hz_info.KH AND person_info_hz_info.KLX = hz_info.KLX AND pers... | css |
CREATE TABLE ReviewTasks (
Id number,
ReviewTaskTypeId number,
CreationDate time,
DeletionDate time,
ReviewTaskStateId number,
PostId number,
SuggestedEditId number,
CompletedByReviewTaskId number
)
CREATE TABLE PostFeedback (
Id number,
PostId number,
IsAnonymous boolean,
... | SELECT COUNT(DISTINCT CASE WHEN 'date_diff' < 24 THEN OwnerUserId END) AS "first_day_multiposters", COUNT(DISTINCT CASE WHEN 'date_diff' < 72 THEN OwnerUserId END) AS "first_3_days_multiposters", COUNT(DISTINCT CASE WHEN 'date_diff' < 168 THEN OwnerUserId END) AS "first_week_multiposters", COUNT(OwnerUserId) AS "total_... | sede |
CREATE TABLE table_train_228 (
"id" int,
"ejection_fraction_ef" int,
"hiv_infection" bool,
"heart_disease" bool,
"body_weight" float,
"body_mass_index_bmi" float,
"allergy_to_beef" bool,
"NOUSE" float
)
-- Using valid SQLite, answer the following questions for the tables provided above... | SELECT * FROM table_train_228 WHERE body_mass_index_bmi > 18.5 AND body_mass_index_bmi < 40 | criteria2sql |
CREATE TABLE table_name_37 (
date VARCHAR,
catalogue__number VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the date with the catalogue # cocy-80093?
| SELECT date FROM table_name_37 WHERE catalogue__number = "cocy-80093" | sql_create_context |
CREATE TABLE table_63177 (
"Number" text,
"Previous Number(s)" real,
"Previous Class" text,
"Converted" real,
"Withdrawn" real,
"Disposal" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- How much Converted has a Number of 35, and a Withdrawn smal... | SELECT COUNT("Converted") FROM table_63177 WHERE "Number" = '35' AND "Withdrawn" < '1952' | wikisql |
CREATE TABLE table_21384 (
"DVD Name" text,
"Ep #" real,
"Region 1" text,
"Region 2 (Scandinavia)" text,
"Region 2 (UK)" text,
"Region 4" text,
"Special features" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Name the region 1 for episode n... | SELECT "Region 1" FROM table_21384 WHERE "Ep #" = '13' | wikisql |
CREATE TABLE diagnoses (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE lab (
subject_id text,
hadm_id text,
itemid text,
charttime text,
flag text,
value_unit text,
label text,
fluid text
)
CREATE TABLE demographic (... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.diagnosis = "GUILLAIN BARRE SYNDROME" AND procedures.icd9_code = "5781" | mimicsql_data |
CREATE TABLE table_78517 (
"Date" text,
"Visiting Team" text,
"Final Score" text,
"Host Team" text,
"Stadium" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- I want to know the stadium for tennessee titans visiting
| SELECT "Stadium" FROM table_78517 WHERE "Visiting Team" = 'tennessee titans' | wikisql |
CREATE TABLE table_name_11 (
date VARCHAR,
record VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the Date of the game with a Record of 27 21 13?
| SELECT date FROM table_name_11 WHERE record = "27–21–13" | sql_create_context |
CREATE TABLE table_64227 (
"Rank" real,
"Lane" real,
"Athlete" text,
"Nationality" text,
"Time" real,
"React" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the total rank for the lane before 2?
| SELECT SUM("Rank") FROM table_64227 WHERE "Lane" < '2' | wikisql |
CREATE TABLE table_39394 (
"Call sign" text,
"Frequency MHz" real,
"City of license" text,
"ERP W" real,
"Class" text,
"FCC info" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the ERP W with a call sign at w261cq?
| SELECT "ERP W" FROM table_39394 WHERE "Call sign" = 'w261cq' | wikisql |
CREATE TABLE table_name_93 (
population VARCHAR,
county VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the population of Tioga county?
| SELECT population FROM table_name_93 WHERE county = "tioga" | sql_create_context |
CREATE TABLE table_33491 (
"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 was the sum of the crowd sizes when the hom... | SELECT SUM("Crowd") FROM table_33491 WHERE "Home team score" = '9.17 (71)' | wikisql |
CREATE TABLE table_name_64 (
date VARCHAR,
away_team VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What date was the away team, team Gillingham?
| SELECT date FROM table_name_64 WHERE away_team = "gillingham" | sql_create_context |
CREATE TABLE diagnoses (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE lab (
subject_id text,
hadm_id text,
itemid text,
charttime text,
flag text,
value_unit text,
label text,
fluid text
)
CREATE TABLE demographic (... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.dod_year <= "2115.0" AND procedures.long_title = "Other endoscopy of small intestine" | mimicsql_data |
CREATE TABLE table_name_86 (
pos VARCHAR,
college VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What position did athlete play from Tennessee state?
| SELECT pos FROM table_name_86 WHERE college = "tennessee state" | sql_create_context |
CREATE TABLE table_48301 (
"Round" text,
"Team #1" text,
"Agg." text,
"Team #2" text,
"1st leg" text,
"2nd leg" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the 2nd leg when team #1 is Rubin Kazan?
| SELECT "2nd leg" FROM table_48301 WHERE "Team #1" = 'rubin kazan' | wikisql |
CREATE TABLE table_4630 (
"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 is the average crowd size when the home side... | SELECT AVG("Crowd") FROM table_4630 WHERE "Home team score" = '9.8 (62)' | wikisql |
CREATE TABLE table_20872722_1 (
weight VARCHAR,
college VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the weight for western ontario college?
| SELECT weight FROM table_20872722_1 WHERE college = "Western Ontario" | sql_create_context |
CREATE TABLE table_name_58 (
dissolved VARCHAR,
assembled VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the dissolved date of the parliament assembled on 4 November 1461?
| SELECT dissolved FROM table_name_58 WHERE assembled = "4 november 1461" | sql_create_context |
CREATE TABLE FlagTypes (
Id number,
Name text,
Description text
)
CREATE TABLE ReviewTasks (
Id number,
ReviewTaskTypeId number,
CreationDate time,
DeletionDate time,
ReviewTaskStateId number,
PostId number,
SuggestedEditId number,
CompletedByReviewTaskId number
)
CREATE TA... | SELECT LENGTH(Text), COUNT(LENGTH(Text)) FROM Comments WHERE Text LIKE '%thank%' GROUP BY LENGTH(Text) ORDER BY LENGTH(Text) | sede |
CREATE TABLE table_61746 (
"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.
-- Which country scored 70-68-71-71=280?
| SELECT "Country" FROM table_61746 WHERE "Score" = '70-68-71-71=280' | wikisql |
CREATE TABLE table_65960 (
"Township" text,
"County" text,
"Pop. (2010)" real,
"Land ( sqmi )" real,
"Water (sqmi)" real,
"Latitude" real,
"Longitude" real,
"GEO ID" real,
"ANSI code" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Wh... | SELECT MIN("ANSI code") FROM table_65960 WHERE "GEO ID" > '3809927140' AND "Water (sqmi)" < '0.492' AND "Pop. (2010)" = '37' AND "Latitude" > '48.245979' | wikisql |
CREATE TABLE table_10714 (
"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 was the score for the away team at Collingw... | SELECT "Home team score" FROM table_10714 WHERE "Away team" = 'collingwood' | wikisql |
CREATE TABLE table_name_34 (
verb VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the 2nd verb for Khola?
| SELECT 2 AS __f_ FROM table_name_34 WHERE verb = "khola" | 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 WHERE demographic.diagnosis = "ANGIOEDEMA" AND demographic.admityear < "2182" | mimicsql_data |
CREATE TABLE table_31251 (
"No. in series" real,
"No. in season" real,
"Title" text,
"Directed by" text,
"Written by" text,
"Original air date" text,
"Production code" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Who wrote the episode titl... | SELECT "Written by" FROM table_31251 WHERE "Title" = 'Goliath (Part 2)' | wikisql |
CREATE TABLE table_46967 (
"Date" text,
"Venue" text,
"Score" text,
"Result" text,
"Competition" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What was the competition on 29 November 1997 that resulted in a draw?
| SELECT "Competition" FROM table_46967 WHERE "Result" = 'draw' AND "Date" = '29 november 1997' | wikisql |
CREATE TABLE TagSynonyms (
Id number,
SourceTagName text,
TargetTagName text,
CreationDate time,
OwnerUserId number,
AutoRenameCount number,
LastAutoRename time,
Score number,
ApprovedByUserId number,
ApprovalDate time
)
CREATE TABLE Tags (
Id number,
TagName text,
C... | SELECT p.Id AS "post_link", p.CreationDate, p.LastActivityDate, p.Score, p.ViewCount, p.Tags FROM Posts AS p WHERE p.Tags = '<vba>' AND p.Body LIKE '%excel%' AND p.DeletionDate IS NULL AND p.ClosedDate IS NULL AND p.PostTypeId = 1 ORDER BY CreationDate DESC | sede |
CREATE TABLE hz_info (
KH text,
KLX number,
RYBH text,
YLJGDM text
)
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,
... | SELECT COUNT(txmzjzjlb.ZZYSGH) FROM hz_info JOIN txmzjzjlb ON hz_info.YLJGDM = txmzjzjlb.YLJGDM AND hz_info.KH = txmzjzjlb.KH AND hz_info.KLX = txmzjzjlb.KLX WHERE hz_info.RYBH = '57563510' AND txmzjzjlb.JZKSRQ BETWEEN '2013-11-07' AND '2018-12-02' UNION SELECT COUNT(ftxmzjzjlb.ZZYSGH) FROM hz_info JOIN ftxmzjzjlb ON h... | css |
CREATE TABLE Apartments (
apt_id INTEGER,
building_id INTEGER,
apt_type_code CHAR(15),
apt_number CHAR(10),
bathroom_count INTEGER,
bedroom_count INTEGER,
room_count CHAR(5)
)
CREATE TABLE Guests (
guest_id INTEGER,
gender_code CHAR(1),
guest_first_name VARCHAR(80),
guest_la... | SELECT booking_status_code, COUNT(*) FROM Apartment_Bookings GROUP BY booking_status_code | nvbench |
CREATE TABLE table_62885 (
"Year" real,
"Competition" text,
"Venue" text,
"Position" text,
"Notes" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- In what year did Ilju t enko compete in Barcelona, Spain?
| SELECT "Year" FROM table_62885 WHERE "Venue" = 'barcelona, spain' | wikisql |
CREATE TABLE table_68209 (
"Number" real,
"Name of the song" text,
"Singer" text,
"Drama" text,
"Kind of the song" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What type of song is larger than 8 and named ?
| SELECT "Kind of the song" FROM table_68209 WHERE "Number" > '8' AND "Name of the song" = '實情' | wikisql |
CREATE TABLE fare_basis (
fare_basis_code text,
booking_class text,
class_type text,
premium text,
economy text,
discounted text,
night text,
season text,
basis_days text
)
CREATE TABLE dual_carrier (
main_airline varchar,
low_flight_number int,
high_flight_number int,
... | SELECT DISTINCT ground_service.transport_type FROM airport, ground_service WHERE airport.airport_code = 'PHL' AND ground_service.airport_code = airport.airport_code | atis |
CREATE TABLE t_kc21_t_kc22 (
MED_CLINIC_ID text,
MED_EXP_DET_ID number
)
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,
H... | SELECT COUNT(t_kc21.IN_DIAG_DIS_CD) FROM t_kc21 WHERE t_kc21.PERSON_NM = '朱高达' AND t_kc21.IN_HOSP_DATE BETWEEN '2010-07-13' AND '2014-04-10' | css |
CREATE TABLE table_67282 (
"Date" text,
"Opponent" text,
"Score" text,
"Loss" text,
"Attendance" text,
"Record" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Who was the opponent at the game attended by 23,203?
| SELECT "Opponent" FROM table_67282 WHERE "Attendance" = '23,203' | wikisql |
CREATE TABLE table_51719 (
"Player" text,
"Height" text,
"School" text,
"Hometown" text,
"College" text,
"NBA Draft" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- For the player with a Height of 6-9 and College of Kentucky what was their NBA Dr... | SELECT "NBA Draft" FROM table_51719 WHERE "Height" = '6-9' AND "College" = 'kentucky' | wikisql |
CREATE TABLE table_name_38 (
nuts_3_region VARCHAR,
area__km²_ VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the NUT 3 region with area of 41.58?
| SELECT nuts_3_region FROM table_name_38 WHERE area__km²_ = "41.58" | sql_create_context |
CREATE TABLE table_22815568_12 (
status VARCHAR,
unemployment_rate VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Name the status for unemployment rate being 6.7%
| SELECT status FROM table_22815568_12 WHERE unemployment_rate = "6.7%" | sql_create_context |
CREATE TABLE table_name_45 (
extra_points INTEGER,
touchdowns VARCHAR,
points VARCHAR,
player VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which Extra points has Points smaller than 12, and a Player of chuck bernard, and Touchdowns larger than 1?
| SELECT SUM(extra_points) FROM table_name_45 WHERE points < 12 AND player = "chuck bernard" AND touchdowns > 1 | sql_create_context |
CREATE TABLE mzjzjlb_jybgb (
YLJGDM_MZJZJLB text,
BGDH number,
YLJGDM number
)
CREATE TABLE mzjzjlb (
HXPLC number,
HZXM text,
JLSJ time,
JZJSSJ time,
JZKSBM text,
JZKSMC text,
JZKSRQ time,
JZLSH text,
JZZDBM text,
JZZDSM text,
JZZTDM number,
JZZTMC text,
... | SELECT jyjgzbb.CKZFWXX, jyjgzbb.CKZFWSX FROM mzjzjlb JOIN jybgb JOIN jyjgzbb JOIN mzjzjlb_jybgb ON mzjzjlb.YLJGDM = mzjzjlb_jybgb.YLJGDM_MZJZJLB AND mzjzjlb.JZLSH = jybgb.JZLSH_MZJZJLB AND jybgb.YLJGDM = jyjgzbb.YLJGDM AND jybgb.BGDH = jyjgzbb.BGDH AND mzjzjlb_jybgb.YLJGDM = jybgb.YLJGDM AND mzjzjlb_jybgb.BGDH = jybgb.... | css |
CREATE TABLE table_6766 (
"SANSKRT" text,
"CHINESE" text,
"VIETNAMESE" text,
"JAPANESE" text,
"KOREAN" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which JAPANESE has a KOREAN of / sanahwasa?
| SELECT "JAPANESE" FROM table_6766 WHERE "KOREAN" = '상나화수 / sanahwasa' | wikisql |
CREATE TABLE table_204_814 (
id number,
"date" text,
"opposition" text,
"result" text,
"score" text,
"brazil scorers" text,
"competition" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- how many games did zico end up scoring in during this se... | SELECT COUNT(*) FROM table_204_814 WHERE "brazil scorers" = 'zico' | squall |
CREATE TABLE table_10548224_1 (
final_score VARCHAR,
date_contested VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What was the final score for the game that was contested on February 1, 2009?
| SELECT final_score FROM table_10548224_1 WHERE date_contested = "February 1, 2009" | sql_create_context |
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 lab (
labid numbe... | SELECT AVG(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 treatment.patientunitstayid FROM treatment WHERE treatment.treatmentname = 'intracranial/cerebral perfusion pressure mon... | eicu |
CREATE TABLE table_74164 (
"Warrior" text,
"Close ranged weapons" text,
"Mid ranged weapons" text,
"Long ranged weapons" text,
"Armor" text,
"Special weapon" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- If the armor is bronze cuirass , linotho... | SELECT "Close ranged weapons" FROM table_74164 WHERE "Armor" = 'Bronze cuirass , Linothorax' | wikisql |
CREATE TABLE outputevents (
row_id number,
subject_id number,
hadm_id number,
icustay_id number,
charttime time,
itemid number,
value number
)
CREATE TABLE procedures_icd (
row_id number,
subject_id number,
hadm_id number,
icd9_code text,
charttime time
)
CREATE TABLE c... | SELECT COUNT(*) > 0 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 = 28447)) AND chartevents.itemid IN (SELECT d_items.itemid FROM d_items WHERE d_items.label = 'respiratory rate'... | mimic_iii |
CREATE TABLE Tags (
Id number,
TagName text,
Count number,
ExcerptPostId number,
WikiPostId number
)
CREATE TABLE PostFeedback (
Id number,
PostId number,
IsAnonymous boolean,
VoteTypeId number,
CreationDate time
)
CREATE TABLE ReviewTaskResultTypes (
Id number,
Name te... | SELECT i.PostId AS "post_link" FROM PostHistory AS i INNER JOIN PostHistory AS c ON i.PostId = c.PostId AND i.PostHistoryTypeId = 1 AND c.PostHistoryTypeId = 10 INNER JOIN PostHistory AS e ON c.PostId = e.PostId AND e.PostHistoryTypeId = 5 AND c.CreationDate < e.CreationDate AND i.UserId = e.UserId INNER JOIN PostHisto... | sede |
CREATE TABLE table_47128 (
"Institution" text,
"Wins" real,
"Loss" real,
"Home Wins" real,
"Home Losses" real,
"Away Wins" real,
"Away Losses" real,
"Neutral Wins" real,
"Neutral Losses" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
--... | SELECT MAX("Neutral Losses") FROM table_47128 WHERE "Neutral Wins" = '0' AND "Home Losses" = '0' AND "Away Losses" < '0' | wikisql |
CREATE TABLE table_name_94 (
points VARCHAR,
engine VARCHAR,
year VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the number of points for the maserati straight-4 engine, later than 1959?
| SELECT COUNT(points) FROM table_name_94 WHERE engine = "maserati straight-4" AND year > 1959 | sql_create_context |
CREATE TABLE table_name_87 (
venue VARCHAR,
score VARCHAR,
result VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the Venue when the score was 1 1, and the result was 2 2?
| SELECT venue FROM table_name_87 WHERE score = "1 – 1" AND result = "2 – 2" | sql_create_context |
CREATE TABLE table_78206 (
"Date(s) conducted" text,
"Polling organisation/client" text,
"Cons" text,
"Plaid Cymru" text,
"Lib Dem" text,
"Others" text,
"Lead" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- I want the plaid cymru for 4 may 2... | SELECT "Plaid Cymru" FROM table_78206 WHERE "Date(s) conducted" = '4 may 2011' | wikisql |
CREATE TABLE table_27285 (
"Model" text,
"Power" text,
"Torque" text,
"Gearbox" text,
"Weight" text,
"Seating" text,
"Brakes" text,
"Wheels" text,
"Tyres" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What brakes for the 4-speed aut... | SELECT "Brakes" FROM table_27285 WHERE "Gearbox" = '4-speed automatic' | wikisql |
CREATE TABLE table_11405 (
"Game" real,
"Date" text,
"Score" text,
"Location" text,
"Time" text,
"Attendance" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- how many games have a location of memorial stadium and a time of 2:27?
| SELECT COUNT("Game") FROM table_11405 WHERE "Location" = 'memorial stadium' AND "Time" = '2:27' | wikisql |
CREATE TABLE table_name_25 (
tournament VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which tournament had a 2012 of a and a 2011 of 2r?
| SELECT tournament FROM table_name_25 WHERE 2012 = "a" AND 2011 = "2r" | sql_create_context |
CREATE TABLE table_name_38 (
title VARCHAR,
transliteration VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What Title's Transliteration is Fal'shivaya Nota?
| SELECT title FROM table_name_38 WHERE transliteration = "fal'shivaya nota" | sql_create_context |
CREATE TABLE medication (
medicationid number,
patientunitstayid number,
drugname text,
dosage text,
routeadmin text,
drugstarttime time,
drugstoptime time
)
CREATE TABLE treatment (
treatmentid number,
patientunitstayid number,
treatmentname text,
treatmenttime time
)
CREA... | SELECT t1.drugstarttime FROM (SELECT patient.uniquepid, medication.drugstarttime FROM medication JOIN patient ON medication.patientunitstayid = patient.patientunitstayid WHERE medication.drugname = 'sodium bicarbonate 8.4%' AND patient.uniquepid = '002-58565' AND STRFTIME('%y-%m', medication.drugstarttime) = '2104-02')... | eicu |
CREATE TABLE table_72936 (
"Season" text,
"Date Released" text,
"# Of Episodes" real,
"# Of Discs" real,
"Special Features" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- On how many dates was the complete 4th series released?
| SELECT COUNT("Date Released") FROM table_72936 WHERE "Season" = 'The Complete 4th Series' | wikisql |
CREATE TABLE PostHistoryTypes (
Id number,
Name text
)
CREATE TABLE Votes (
Id number,
PostId number,
VoteTypeId number,
UserId number,
CreationDate time,
BountyAmount number
)
CREATE TABLE PostNoticeTypes (
Id number,
ClassId number,
Name text,
Body text,
IsHidden ... | SELECT p.Title, p.Body, COUNT(v.PostId), v.PostId AS "post_link", p.Tags FROM Posts AS P JOIN Votes AS V ON p.Id = v.PostId WHERE PostTypeId = 1 AND VoteTypeId = 2 AND p.Tags LIKE '%android%' GROUP BY p.Title, p.Body, v.PostId, p.Tags ORDER BY COUNT(v.PostId) DESC LIMIT 20 | sede |
CREATE TABLE table_204_57 (
id number,
"year" number,
"film" text,
"role" text,
"language" text,
"notes" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- how many films was madhurima in during 2012 ?
| SELECT COUNT("film") FROM table_204_57 WHERE "year" = 2012 | squall |
CREATE TABLE table_979 (
"Year" real,
"Team Name" text,
"Division" text,
"League" text,
"Regular Season" text,
"Playoffs" text,
"Open Cup" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What was the playoff result for the team name of bay ar... | SELECT "Playoffs" FROM table_979 WHERE "Team Name" = 'Bay Area Seals' | wikisql |
CREATE TABLE table_3478 (
"District" real,
"Representative" text,
"Party" text,
"Residence" text,
"First Elected" text,
"Term Limited" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- In which district is the residence Dublin?
| SELECT "District" FROM table_3478 WHERE "Residence" = 'Dublin' | 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 diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE demographic.days_stay > "27" AND diagnoses.icd9_code = "430" | mimicsql_data |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.