instruction stringlengths 151 7.46k | output stringlengths 2 4.44k | source stringclasses 26
values |
|---|---|---|
CREATE TABLE table_name_59 (
career_with_the_franchise_ VARCHAR,
b_ VARCHAR,
player VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is Career with the franchise [b ], when Player is 'Willie Anderson Category:Articles with hCards'?
| SELECT career_with_the_franchise_ AS "b_" FROM table_name_59 WHERE player = "willie anderson category:articles with hcards" | sql_create_context |
CREATE TABLE diagnoses (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE procedures (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE demographic (
subject_id text,
hadm_id t... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.admission_location = "TRSF WITHIN THIS FACILITY" AND demographic.discharge_location = "SNF" | mimicsql_data |
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 AVG(t_kc24.MED_AMOUT) FROM t_kc24 WHERE t_kc24.MED_CLINIC_ID IN (SELECT t_kc24.MED_CLINIC_ID FROM t_kc24 WHERE t_kc24.t_kc21_PERSON_AGE > 7) | css |
CREATE TABLE table_name_87 (
competition VARCHAR,
date VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Tell me the competition of 20 august 2008
| SELECT competition FROM table_name_87 WHERE date = "20 august 2008" | sql_create_context |
CREATE TABLE table_19363 (
"Application" text,
"Version" text,
"Cmdlets" text,
"Provider" text,
"Management GUI" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- How many of the cmdlets are the 2008 version?
| SELECT COUNT("Cmdlets") FROM table_19363 WHERE "Version" = '2008' | wikisql |
CREATE TABLE table_name_30 (
d_45_o VARCHAR,
d_46_o VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Name the D 45 O that has D 46 O of d 26
| SELECT d_45_o FROM table_name_30 WHERE d_46_o = "d 26" | sql_create_context |
CREATE TABLE table_61329 (
"Outcome" text,
"Date" real,
"Tournament" text,
"Surface" text,
"Partner" text,
"Opponents in the final" text,
"Score in the final" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Name the date of Tournament of pari... | SELECT SUM("Date") FROM table_61329 WHERE "Tournament" = 'paris indoor , france' | wikisql |
CREATE TABLE Candidate_Assessments (
candidate_id INTEGER,
qualification CHAR(15),
assessment_date DATETIME,
asessment_outcome_code CHAR(15)
)
CREATE TABLE Student_Course_Registrations (
student_id INTEGER,
course_id INTEGER,
registration_date DATETIME
)
CREATE TABLE Student_Course_Attenda... | SELECT last_name, COUNT(last_name) FROM People GROUP BY last_name | nvbench |
CREATE TABLE t_kc22 (
AMOUNT number,
CHA_ITEM_LEV number,
DATA_ID text,
DIRE_TYPE number,
DOSE_FORM text,
DOSE_UNIT text,
EACH_DOSAGE text,
EXP_OCC_DATE time,
FLX_MED_ORG_ID text,
FXBZ number,
HOSP_DOC_CD text,
HOSP_DOC_NM text,
MED_CLINIC_ID text,
MED_DIRE_CD tex... | SELECT SUM(t_kc24.PER_ACC_PAY) FROM t_kc24 WHERE t_kc24.t_kc21_PERSON_NM = '马曼丽' AND t_kc24.CLINIC_SLT_DATE BETWEEN '2011-03-22' AND '2019-04-16' | css |
CREATE TABLE table_27879 (
"Settlement" text,
"Cyrillic Name Other Names" text,
"Type" text,
"Population (2011)" real,
"Largest ethnic group (2002)" text,
"Dominant religion (2002)" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What was the lar... | SELECT "Largest ethnic group (2002)" FROM table_27879 WHERE "Cyrillic Name Other Names" = 'Банатски Карловац' | wikisql |
CREATE TABLE table_29202 (
"Rank" real,
"Rider" text,
"Sat 21 Aug" text,
"Mon 23 Aug" text,
"Tues 24 Aug" text,
"Wed 25 Aug" text,
"Thurs 26 Aug" text,
"Fri 27 Aug" text,
"Sat 28 Aug" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Wh... | SELECT "Wed 25 Aug" FROM table_29202 WHERE "Fri 27 Aug" = '22'' 23.97 101.065mph' | wikisql |
CREATE TABLE table_204_557 (
id number,
"#" number,
"date" text,
"visitor" text,
"score" text,
"home" text,
"record" text,
"pts" number
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- which month had the most games ?
| SELECT "date" FROM table_204_557 GROUP BY "date" ORDER BY COUNT(*) DESC LIMIT 1 | squall |
CREATE TABLE program (
program_id number,
name text,
origin text,
launch number,
owner text
)
CREATE TABLE broadcast (
channel_id number,
program_id number,
time_of_day text
)
CREATE TABLE broadcast_share (
channel_id number,
program_id number,
date text,
share_in_perce... | SELECT owner FROM channel ORDER BY rating_in_percent DESC LIMIT 1 | spider |
CREATE TABLE table_49473 (
"Tongan" text,
"Niuean" text,
"S\u0101moan" text,
"Takuu" text,
"Tahitian" text,
"Rarotongan" text,
"M\u0101ori" text,
"North Marquesan" text,
"South Marquesan" text,
"Hawai'ian" text,
"Mangarevan" text
)
-- Using valid SQLite, answer the followin... | SELECT "North Marquesan" FROM table_49473 WHERE "Takuu" = '/ɾani/' | wikisql |
CREATE TABLE hz_info (
KH text,
KLX number,
RYBH text,
YLJGDM text
)
CREATE TABLE bdmzjzjlb (
HXPLC number,
HZXM text,
JLSJ time,
JZJSSJ time,
JZKSBM text,
JZKSMC text,
JZKSRQ time,
JZLSH number,
JZZDBM text,
JZZDSM text,
JZZTDM number,
JZZTMC text,
K... | SELECT wdmzjzjlb.YLJGDM FROM hz_info JOIN wdmzjzjlb ON hz_info.YLJGDM = wdmzjzjlb.YLJGDM AND hz_info.KH = wdmzjzjlb.KH AND hz_info.KLX = wdmzjzjlb.KLX WHERE hz_info.RYBH = '69072554' UNION SELECT bdmzjzjlb.YLJGDM FROM hz_info JOIN bdmzjzjlb ON hz_info.YLJGDM = bdmzjzjlb.YLJGDM AND hz_info.KH = bdmzjzjlb.KH AND hz_info.... | css |
CREATE TABLE state (
state_code text,
state_name text,
country_name text
)
CREATE TABLE aircraft (
aircraft_code varchar,
aircraft_description varchar,
manufacturer varchar,
basic_type varchar,
engines int,
propulsion varchar,
wide_body varchar,
wing_span int,
length int... | 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 = 'MILWAUKEE' AND date_day.day_number = 20 AND date_day.month_number = 1 A... | atis |
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 d_items (
row_id number,
itemid number,
label text,
linksto text
)
CREATE TABLE diagn... | SELECT DISTINCT cost.cost FROM cost WHERE cost.event_type = 'procedures_icd' AND cost.event_id IN (SELECT procedures_icd.row_id FROM procedures_icd WHERE procedures_icd.icd9_code = (SELECT d_icd_procedures.icd9_code FROM d_icd_procedures WHERE d_icd_procedures.short_title = 'circumcision')) | mimic_iii |
CREATE TABLE table_name_31 (
ht VARCHAR,
venue VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What was the HT for the game at Stadio Luigi Ferraris?
| SELECT ht FROM table_name_31 WHERE venue = "stadio luigi ferraris" | sql_create_context |
CREATE TABLE table_23281862_6 (
score VARCHAR,
high_rebounds VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What's the end score of the game where Shane Battier (8) did the high rebounds?
| SELECT score FROM table_23281862_6 WHERE high_rebounds = "Shane Battier (8)" | sql_create_context |
CREATE TABLE inputevents_cv (
row_id number,
subject_id number,
hadm_id number,
icustay_id number,
charttime time,
itemid number,
amount number
)
CREATE TABLE labevents (
row_id number,
subject_id number,
hadm_id number,
itemid number,
charttime time,
valuenum number... | SELECT COUNT(*) > 0 FROM procedures_icd WHERE procedures_icd.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 12797) AND STRFTIME('%y', procedures_icd.charttime) <= '2102' | 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 jybgb.BGDH FROM hz_info JOIN mzjzjlb JOIN jybgb ON hz_info.YLJGDM = mzjzjlb.YLJGDM AND hz_info.KH = mzjzjlb.KH AND hz_info.KLX = mzjzjlb.KLX AND mzjzjlb.YLJGDM = jybgb.YLJGDM_MZJZJLB AND mzjzjlb.JZLSH = jybgb.JZLSH_MZJZJLB WHERE hz_info.RYBH = '33852265' AND NOT jybgb.BGDH IN (SELECT jyjgzbb.BGDH FROM jyjgzbb WH... | css |
CREATE TABLE table_name_47 (
year INTEGER,
saar VARCHAR,
hessen VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the average year for a Saar of FK Pirmasens and Hessen of Wormatia Worms?
| SELECT AVG(year) FROM table_name_47 WHERE saar = "fk pirmasens" AND hessen = "wormatia worms" | sql_create_context |
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 offering_instructor (
offering_instructor_id int,
offering_id int,
ins... | SELECT DISTINCT course.department, course.name, course.number FROM course, course_offering, semester WHERE course.course_id = course_offering.course_id AND course.department = 'EECS' AND semester.semester = 'Fall' AND semester.semester_id = course_offering.semester AND semester.year = 2016 | advising |
CREATE TABLE table_74601 (
"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 away team's score when Fitzroy's sc... | SELECT "Away team score" FROM table_74601 WHERE "Home team score" = '16.27 (123)' | wikisql |
CREATE TABLE table_25458 (
"#" real,
"Date" text,
"Visitor" text,
"Score" text,
"Arena Attendance" text,
"High Points" text,
"High Rebounds" text,
"High Assists" text,
"Record" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Name the ... | SELECT "High Rebounds" FROM table_25458 WHERE "Arena Attendance" = 'TD Garden 18,624' | wikisql |
CREATE TABLE table_name_49 (
minimum_height VARCHAR,
name_of_the_tunnel VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the minimum Height of the Little Switzerland Tunnel?
| SELECT minimum_height FROM table_name_49 WHERE name_of_the_tunnel = "little switzerland tunnel" | sql_create_context |
CREATE TABLE medicine_enzyme_interaction (
enzyme_id int,
medicine_id int,
interaction_type text
)
CREATE TABLE medicine (
id int,
name text,
Trade_Name text,
FDA_approved text
)
CREATE TABLE enzyme (
id int,
name text,
Location text,
Product text,
Chromosome text,
... | SELECT Trade_Name, id FROM medicine AS T1 JOIN medicine_enzyme_interaction AS T2 ON T2.medicine_id = T1.id | nvbench |
CREATE TABLE microbiologyevents (
row_id number,
subject_id number,
hadm_id number,
charttime time,
spec_type_desc text,
org_name text
)
CREATE TABLE admissions (
row_id number,
subject_id number,
hadm_id number,
admittime time,
dischtime time,
admission_type text,
a... | SELECT d_icd_procedures.short_title FROM d_icd_procedures WHERE d_icd_procedures.icd9_code IN (SELECT t1.icd9_code FROM (SELECT procedures_icd.icd9_code, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM procedures_icd WHERE procedures_icd.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.age B... | mimic_iii |
CREATE TABLE station (
Station_ID int,
Name text,
Annual_entry_exit real,
Annual_interchanges real,
Total_Passengers real,
Location text,
Main_Services text,
Number_of_Platforms int
)
CREATE TABLE train_station (
Train_ID int,
Station_ID int
)
CREATE TABLE train (
Train_ID ... | SELECT Name, COUNT(Name) FROM train GROUP BY Name ORDER BY COUNT(Name) | nvbench |
CREATE TABLE table_15873547_1 (
mascot VARCHAR,
colors VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the mascot with the colors green and navy?
| SELECT mascot FROM table_15873547_1 WHERE colors = "Green and Navy" | sql_create_context |
CREATE TABLE code_description (
code varchar,
description text
)
CREATE TABLE flight (
aircraft_code_sequence text,
airline_code varchar,
airline_flight text,
arrival_time int,
connections int,
departure_time int,
dual_carrier text,
flight_days text,
flight_id int,
fligh... | 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 = 'DENVER' AND CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'SAN FRA... | atis |
CREATE TABLE diagnoses_icd (
row_id number,
subject_id number,
hadm_id number,
icd9_code text,
charttime time
)
CREATE TABLE cost (
row_id number,
subject_id number,
hadm_id number,
event_type text,
event_id number,
chargetime time,
cost number
)
CREATE TABLE admissions... | SELECT admissions.dischtime FROM admissions WHERE admissions.subject_id = 84346 AND DATETIME(admissions.dischtime) >= DATETIME(CURRENT_TIME(), '-5 year') ORDER BY admissions.dischtime LIMIT 1 | mimic_iii |
CREATE TABLE table_70468 (
"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.
-- What was the tournament that resulted in a winning score of 4 (71-72-72-69=284)?... | SELECT "Tournament" FROM table_70468 WHERE "Winning score" = '–4 (71-72-72-69=284)' | wikisql |
CREATE TABLE table_204_193 (
id number,
"year" number,
"artist" text,
"album" text,
"chart position" text,
"role" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- what comes before donny hathaway
| SELECT "artist" FROM table_204_193 WHERE id = (SELECT id FROM table_204_193 WHERE "artist" = 'donny hathaway') - 1 | squall |
CREATE TABLE table_35947 (
"Nation" text,
"Skip" text,
"Third" text,
"Second" text,
"Lead" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Who was the second when Ilian Kirilov was the lead?
| SELECT "Second" FROM table_35947 WHERE "Lead" = 'ilian kirilov' | wikisql |
CREATE TABLE table_10966926_2 (
height VARCHAR,
weight VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the height of the person that weighs 320 pounds?
| SELECT height FROM table_10966926_2 WHERE weight = 320 | sql_create_context |
CREATE TABLE table_54191 (
"Season" text,
"Competition" text,
"Round" text,
"Opponent" text,
"Result" text,
"Venue" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which opponent has a Season of 2011/12?
| SELECT "Opponent" FROM table_54191 WHERE "Season" = '2011/12' | wikisql |
CREATE TABLE table_75926 (
"Player" text,
"Nationality" text,
"Position" text,
"Years in Orlando" text,
"School/Club Team" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What School/Club did Dominique Wilkins play for?
| SELECT "School/Club Team" FROM table_75926 WHERE "Player" = 'dominique wilkins' | wikisql |
CREATE TABLE table_46163 (
"Name" text,
"GP-GS" text,
"Gain" real,
"Loss" real,
"Long" real,
"Avg/G" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- WHAT IS THE LOSS WITH AN AVERAGE OF 89.9?
| SELECT SUM("Loss") FROM table_46163 WHERE "Avg/G" = '89.9' | wikisql |
CREATE TABLE table_16729930_18 (
socket VARCHAR,
frequency VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the socket for microprocessors with a frequency of 1.3 ghz?
| SELECT socket FROM table_16729930_18 WHERE frequency = "1.3 GHz" | sql_create_context |
CREATE TABLE table_78549 (
"District" real,
"County(s) Represented" text,
"Member Senator" text,
"Party" text,
"First Elected" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What district for ulysses currie?
| SELECT "District" FROM table_78549 WHERE "Member Senator" = 'ulysses currie' | wikisql |
CREATE TABLE food_service (
meal_code text,
meal_number int,
compartment text,
meal_description varchar
)
CREATE TABLE airport_service (
city_code varchar,
airport_code varchar,
miles_distant int,
direction varchar,
minutes_distant int
)
CREATE TABLE city (
city_code varchar,
... | 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 = 'DENVER' AND date_day.day_number = 1 AND date_day.month_number = 8 AND dat... | atis |
CREATE TABLE t_kc21 (
CLINIC_ID text,
CLINIC_TYPE text,
COMP_ID text,
DATA_ID text,
DIFF_PLACE_FLG number,
FERTILITY_STS number,
FLX_MED_ORG_ID text,
HOSP_LEV number,
HOSP_STS number,
IDENTITY_CARD text,
INPT_AREA_BED text,
INSURED_IDENTITY number,
INSURED_STS text,
... | SELECT COUNT(*) FROM t_kc22 WHERE t_kc22.MED_ORG_DEPT_CD = '923' AND t_kc22.STA_DATE BETWEEN '2001-01-19' AND '2021-03-03' AND t_kc22.SOC_SRT_DIRE_NM = '复合维生素B片' | css |
CREATE TABLE table_19886463_1 (
round_winner VARCHAR,
circuit VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Who is the round winner of the wanneroo park circuit?
| SELECT round_winner FROM table_19886463_1 WHERE circuit = "Wanneroo Park" | sql_create_context |
CREATE TABLE table_name_26 (
result VARCHAR,
game VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What was the result of game 1?
| SELECT result FROM table_name_26 WHERE game = "game 1" | sql_create_context |
CREATE TABLE country (
id number,
name text
)
CREATE TABLE league (
id number,
country_id number,
name text
)
CREATE TABLE sqlite_sequence (
name text,
seq text
)
CREATE TABLE player (
id number,
player_api_id number,
player_name text,
player_fifa_api_id number,
birthd... | SELECT player_api_id FROM player WHERE height >= 180 INTERSECT SELECT player_api_id FROM player_attributes WHERE overall_rating > 85 | spider |
CREATE TABLE table_37073 (
"Date" text,
"Opponent" text,
"Score" text,
"Loss" text,
"Save" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which opponent has a loss of trout (7-4)?
| SELECT "Opponent" FROM table_37073 WHERE "Loss" = 'trout (7-4)' | wikisql |
CREATE TABLE table_name_61 (
spins__since_1998__source VARCHAR,
ccm_chart VARCHAR,
peak_pos VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- How many Spins sources have a CCM Chart of CHR with a peak position less than 1?
| SELECT COUNT(spins__since_1998__source) AS :_mediabase FROM table_name_61 WHERE ccm_chart = "chr" AND peak_pos < 1 | sql_create_context |
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 (SELECT SUM(t_kc22.STA_FLG) 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 = '84294070811') = (SELECT COUNT(*) FROM t_kc22 WHERE t_kc21_t_kc22.MED_CLINIC_ID = '84294070811') | css |
CREATE TABLE table_57649 (
"CERCLIS ID" text,
"Name" text,
"County" text,
"Proposed" text,
"Listed" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What name has a listed of 03/31/1989 in spartanburg county?
| SELECT "Name" FROM table_57649 WHERE "Listed" = '03/31/1989' AND "County" = 'spartanburg' | wikisql |
CREATE TABLE table_49165 (
"Place" text,
"Player" text,
"Country" text,
"Score" text,
"To par" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What's the to par of the United States with the score of 71-71=142?
| SELECT "To par" FROM table_49165 WHERE "Country" = 'united states' AND "Score" = '71-71=142' | wikisql |
CREATE TABLE table_20962 (
"Solution" text,
"Other Name" text,
"[Na + ](mmol/L)" real,
"[Cl - ](mmol/L)" real,
"[Glucose](mmol/L)" real,
"[Glucose](mg/dl)" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Name the other name where na plus is 77
| SELECT "Other Name" FROM table_20962 WHERE "[Na + ](mmol/L)" = '77' | wikisql |
CREATE TABLE hz_info (
KH text,
KLX number,
RYBH text,
YLJGDM text,
person_info_CSD text,
person_info_CSRQ time,
person_info_GJDM text,
person_info_GJMC text,
person_info_JGDM text,
person_info_JGMC text,
person_info_MZDM text,
person_info_MZMC text,
person_info_XBDM ... | 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.person_info_XM = '秦傲雪' AND NOT zyjzjlb.JZLSH IN (SELECT jybgb.JZLSH FROM jybgb WHERE jybgb.BGRQ >= '2014-09-06') | css |
CREATE TABLE table_4163 (
"Province" text,
"Number of Dairy Farms" real,
"Number of Dairy Cows" real,
"Production (hectolitres)" real,
"Dairy Cows per Farm" real,
"Production (hectolitres) per Farm" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
--... | SELECT MIN("Number of Dairy Cows") FROM table_4163 | wikisql |
CREATE TABLE table_name_22 (
award VARCHAR,
category VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which award show had the category of best supporting actress?
| SELECT award FROM table_name_22 WHERE category = "best supporting actress" | sql_create_context |
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 Votes (
Id number,
PostId number,
... | SELECT * FROM Posts WHERE NOT 'ClosedDate' IS NULL | sede |
CREATE TABLE course_prerequisite (
pre_course_id int,
course_id int
)
CREATE TABLE jobs (
job_id int,
job_title varchar,
description varchar,
requirement varchar,
city varchar,
state varchar,
country varchar,
zip int
)
CREATE TABLE comment_instructor (
instructor_id int,
... | SELECT DISTINCT course.department, course.name, course.number FROM course, program_course WHERE course.department LIKE '%WOMENSTD%' AND program_course.category LIKE 'PreMajor' AND program_course.course_id = course.course_id | advising |
CREATE TABLE table_39738 (
"Tournament" text,
"Wins" real,
"Top-5" real,
"Top-10" real,
"Top-25" real,
"Events" real,
"Cuts made" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the lowest Top-25 for the open championship, with a Top-... | SELECT MIN("Top-25") FROM table_39738 WHERE "Tournament" = 'the open championship' AND "Top-10" > '3' | wikisql |
CREATE TABLE t_kc21 (
MED_CLINIC_ID text,
OVERALL_CD_ORG text,
OVERALL_CD_PERSON text,
COMP_ID text,
PERSON_ID text,
PERSON_NM text,
IDENTITY_CARD text,
SOC_SRT_CARD text,
PERSON_SEX number,
PERSON_AGE number,
IN_HOSP_DATE time,
OUT_HOSP_DATE time,
DIFF_PLACE_FLG numb... | SELECT MED_SER_ORG_NO FROM t_kc21 WHERE PERSON_NM = '谢昊昊' AND IN_HOSP_DATE BETWEEN '2005-01-27' AND '2014-08-11' GROUP BY MED_SER_ORG_NO ORDER BY COUNT(*) DESC LIMIT 1 | css |
CREATE TABLE table_18506 (
"District" text,
"Incumbent" text,
"Party" text,
"First elected" real,
"Result" text,
"Candidates" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What candidate was re-elected in the Louisiana 5 district?
| SELECT "Candidates" FROM table_18506 WHERE "Result" = 'Re-elected' AND "District" = 'Louisiana 5' | 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 diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE diagnoses.icd9_code = "27801" | mimicsql_data |
CREATE TABLE table_44957 (
"Place" text,
"Player" text,
"Country" text,
"Score" text,
"To par" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- WHAT PLACE DOES TOM LEHMAN HAVE?
| SELECT "Place" FROM table_44957 WHERE "Player" = 'tom lehman' | wikisql |
CREATE TABLE table_30159 (
"No. in series" real,
"No. in season" real,
"Title" text,
"Directed by" text,
"Written by" text,
"Original air date" text,
"Production" text,
"U.S. viewers (in millions)" text
)
-- Using valid SQLite, answer the following questions for the tables provided abo... | SELECT "Original air date" FROM table_30159 WHERE "Directed by" = 'Fred Toye' | wikisql |
CREATE TABLE jyjgzbb (
BGDH text,
BGRQ time,
CKZFWDX text,
CKZFWSX number,
CKZFWXX number,
JCFF text,
JCRGH text,
JCRXM text,
JCXMMC text,
JCZBDM text,
JCZBJGDL number,
JCZBJGDW text,
JCZBJGDX text,
JCZBMC text,
JLDW text,
JYRQ time,
JYZBLSH text,
... | SELECT jyjgzbb.JCRGH, jyjgzbb.JCRXM 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.... | 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 diagnoses (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
C... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.age < "45" AND procedures.long_title = "Open biopsy of liver" | mimicsql_data |
CREATE TABLE table_34307 (
"Round" real,
"Player" text,
"Position" text,
"Nationality" text,
"College/Junior/Club Team" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Can you tell me the College/Junior/Club Team that has the Position of defence, and... | SELECT "College/Junior/Club Team" FROM table_34307 WHERE "Position" = 'defence' AND "Nationality" = 'czechoslovakia' | 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 transfers (
row_id number,
subject_id number,
hadm_id number,
icustay_id number,
eventtype text,
careunit text,
war... | SELECT prescriptions.startdate FROM prescriptions WHERE prescriptions.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 78086) ORDER BY prescriptions.startdate DESC LIMIT 1 | mimic_iii |
CREATE TABLE table_name_48 (
identity VARCHAR,
builder VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the identity of the brighton works built train?
| SELECT identity FROM table_name_48 WHERE builder = "brighton works" | sql_create_context |
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 prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE demographic.admityear < "2163" AND prescriptions.drug = "traMADOL" | mimicsql_data |
CREATE TABLE table_202_122 (
id number,
"rank" number,
"title" text,
"studio" text,
"actor/actress" text,
"director" text,
"gross" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- how many films star eddie murphy ?
| SELECT COUNT("title") FROM table_202_122 WHERE "actor/actress" = 'eddie murphy' | squall |
CREATE TABLE jybgb (
YLJGDM text,
YLJGDM_MZJZJLB text,
YLJGDM_ZYJZJLB text,
BGDH text,
BGRQ time,
JYLX number,
JZLSH text,
JZLSH_MZJZJLB text,
JZLSH_ZYJZJLB text,
JZLX number,
KSBM text,
KSMC text,
SQRGH text,
SQRXM text,
BGRGH text,
BGRXM text,
SHRGH ... | SELECT * 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 = '37690817' AND hz_info.YLJGDM = '6843197' AND zyjzjlb.CYKSMC LIKE '%换药%' | css |
CREATE TABLE table_26805 (
"School" text,
"Mascot" text,
"Location" text,
"Founded" real,
"Entered ISL" real,
"Grades" text,
"Number of Students" text,
"Varsity Teams" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- how many places have 1... | SELECT COUNT("Location") FROM table_26805 WHERE "Varsity Teams" = '17' | wikisql |
CREATE TABLE table_name_89 (
source VARCHAR,
name VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What was the source for the person named Cresswell?
| SELECT source FROM table_name_89 WHERE name = "cresswell" | sql_create_context |
CREATE TABLE customers (
customer_id VARCHAR,
customer_name VARCHAR
)
CREATE TABLE customers_policies (
customer_id VARCHAR,
policy_id VARCHAR
)
CREATE TABLE available_policies (
policy_type_code VARCHAR,
policy_id VARCHAR
)
-- Using valid SQLite, answer the following questions for the table... | SELECT DISTINCT t3.policy_type_code FROM customers AS t1 JOIN customers_policies AS t2 ON t1.customer_id = t2.customer_id JOIN available_policies AS t3 ON t2.policy_id = t3.policy_id WHERE t1.customer_name = "Dayana Robel" | sql_create_context |
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(*) > 0 FROM medication WHERE medication.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '004-66442')) AND medication.drugname = '30 ml cup : alum & mag hydroxide-s... | eicu |
CREATE TABLE table_test_11 (
"id" int,
"left_ventricular_ejection_fraction_lvef" int,
"systolic_blood_pressure_sbp" int,
"tachycardia" int,
"bradycardia" int,
"renal_disease" bool,
"allergy_to_aspirin" bool,
"temperature" float,
"creatinine_clearance_cl" float,
"diastolic_blood_p... | SELECT * FROM table_test_11 WHERE bradycardia < 55 | criteria2sql |
CREATE TABLE table_69377 (
"Date" text,
"Opponent" text,
"Score" text,
"Loss" text,
"Attendance" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What was the opponent on August 29?
| SELECT "Opponent" FROM table_69377 WHERE "Date" = 'august 29' | wikisql |
CREATE TABLE table_38319 (
"Round" real,
"Circuit" text,
"State/Territory" text,
"Date" text,
"Winning driver" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the state the winning driver Jamie Whincup from in round 2?
| SELECT "State/Territory" FROM table_38319 WHERE "Winning driver" = 'jamie whincup' AND "Round" = '2' | wikisql |
CREATE TABLE schedule (
Cinema_ID int,
Film_ID int,
Date text,
Show_times_per_day int,
Price float
)
CREATE TABLE cinema (
Cinema_ID int,
Name text,
Openning_year int,
Capacity int,
Location text
)
CREATE TABLE film (
Film_ID int,
Rank_in_series int,
Number_in_seaso... | SELECT Directed_by, COUNT(Directed_by) FROM film GROUP BY Directed_by ORDER BY COUNT(Directed_by) | nvbench |
CREATE TABLE addresses (
address_id number,
line_1_number_building text,
city text,
zip_postcode text,
state_province_county text,
country text
)
CREATE TABLE lessons (
lesson_id number,
customer_id number,
lesson_status_code text,
staff_id number,
vehicle_id number,
les... | SELECT COUNT(*) FROM lessons WHERE lesson_status_code = "Cancelled" | spider |
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 ACC_Road, Team_ID FROM basketball_match GROUP BY ACC_Home, ACC_Road ORDER BY Team_ID DESC | nvbench |
CREATE TABLE table_9757 (
"Player" text,
"Country" text,
"Year(s) won" text,
"Total" real,
"To par" text,
"Finish" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What year or years did arnold palmer win?
| SELECT "Year(s) won" FROM table_9757 WHERE "Player" = 'arnold palmer' | wikisql |
CREATE TABLE table_51001 (
"Round" real,
"Pick" real,
"Player" text,
"Position" text,
"School/Club Team" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- In what round was a player from Michigan selected?
| SELECT MAX("Round") FROM table_51001 WHERE "School/Club Team" = 'michigan' | wikisql |
CREATE TABLE table_27941 (
"meas. num." real,
"passed" text,
"YES votes" real,
"NO votes" real,
"% YES" text,
"Const. Amd.?" text,
"type" text,
"description" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the description of the m... | SELECT "description" FROM table_27941 WHERE "% YES" = '78.27%' | wikisql |
CREATE TABLE table_67537 (
"Country" text,
"2012" real,
"2011" real,
"2010" real,
"2009" real,
"2008" real,
"2007" real,
"2006" real,
"2005" real,
"2004" real,
"2003" real,
"2002" real,
"2001" real,
"2000" real,
"1999" real,
"1998" real,
"1997" real,
... | SELECT MIN("2012") FROM table_67537 WHERE "2004" > '0' AND "2008" > '1' AND "1994" = '8' AND "2005" < '11' | wikisql |
CREATE TABLE table_78398 (
"Res." text,
"Record" text,
"Opponent" text,
"Method" text,
"Event" text,
"Round" real,
"Time" text,
"Location" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What was the method when the time was 1:01?
| SELECT "Method" FROM table_78398 WHERE "Time" = '1:01' | wikisql |
CREATE TABLE procedures (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
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 t... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.expire_flag = "0" AND procedures.long_title = "Endoscopic removal of stone(s) from biliary tract" | mimicsql_data |
CREATE TABLE table_42482 (
"Volume:Issue" text,
"Issue Date(s)" text,
"Weeks on Top" real,
"Song" text,
"Artist" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the Song with an Issue Date(s) that is 19 june?
| SELECT "Song" FROM table_42482 WHERE "Issue Date(s)" = '19 june' | wikisql |
CREATE TABLE table_29152820_1 (
no_in_season VARCHAR,
no_in_series VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- How many episodes are 122 in the series?
| SELECT COUNT(no_in_season) FROM table_29152820_1 WHERE no_in_series = 122 | sql_create_context |
CREATE TABLE table_name_24 (
result VARCHAR,
date VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the Result from the Date that is December 8, 1963?
| SELECT result FROM table_name_24 WHERE date = "december 8, 1963" | sql_create_context |
CREATE TABLE table_12070 (
"Year" real,
"Movie title" text,
"Role" text,
"Direction" text,
"Screenplay" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which role did joemon play before 1991?
| SELECT "Role" FROM table_12070 WHERE "Year" < '1991' AND "Direction" = 'joemon' | wikisql |
CREATE TABLE table_name_6 (
laps INTEGER,
driver VARCHAR,
grid VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- How many laps did Jo Bonnier driver when the grid number was smaller than 11?
| SELECT SUM(laps) FROM table_name_6 WHERE driver = "jo bonnier" AND grid < 11 | sql_create_context |
CREATE TABLE table_name_91 (
points VARCHAR,
chassis VARCHAR,
year VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the Point of Chassis of Lancia d50 in 1954
| SELECT points FROM table_name_91 WHERE chassis = "lancia d50" AND year = 1954 | sql_create_context |
CREATE TABLE Lessons (
lesson_id INTEGER,
customer_id INTEGER,
lesson_status_code VARCHAR(15),
staff_id INTEGER,
vehicle_id INTEGER,
lesson_date DATETIME,
lesson_time VARCHAR(10),
price DOUBLE
)
CREATE TABLE Addresses (
address_id INTEGER,
line_1_number_building VARCHAR(80),
... | SELECT customer_status_code, COUNT(*) FROM Customers GROUP BY customer_status_code ORDER BY customer_status_code | nvbench |
CREATE TABLE table_62305 (
"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.
-- Which Team 1, has Team 2, Slovan Liberec?
| SELECT "Team 1" FROM table_62305 WHERE "Team 2" = 'slovan liberec' | wikisql |
CREATE TABLE table_62464 (
"Parish (Prestegjeld)" text,
"Sub-Parish (Sokn)" text,
"Church Name" text,
"Year Built" text,
"Location of the Church" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the name of the church that is located in flor ?... | SELECT "Church Name" FROM table_62464 WHERE "Location of the Church" = 'florø' | wikisql |
CREATE TABLE table_name_99 (
money___ INTEGER,
country VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the highest amount of money a play from Scotland United States has?
| SELECT MAX(money___) AS $__ FROM table_name_99 WHERE country = "scotland united states" | sql_create_context |
CREATE TABLE table_50102 (
"Order" real,
"Name dates" text,
"Princess Royal from (date) to (date)" text,
"Parent" text,
"Date married" text,
"Husband dates" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Who was the husband date that was married... | SELECT "Husband dates" FROM table_50102 WHERE "Date married" = '1858' | wikisql |
CREATE TABLE table_76066 (
"Team #1" text,
"Points" 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 team #2 with Deport as team #1?
| SELECT "Team #2" FROM table_76066 WHERE "Team #1" = 'deport' | 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 demographic (
subject_id text,
hadm_id text,
name text,
marital_status text,
age text,
dob text,
gender text,
... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE demographic.age < "67" AND prescriptions.formulary_drug_cd = "BENZ100" | mimicsql_data |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.