instruction stringlengths 151 7.46k | output stringlengths 2 4.44k | source stringclasses 26
values |
|---|---|---|
CREATE TABLE table_name_74 (
competition VARCHAR,
score VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the Competition name of the competition that ended with a score of 2-1?
| SELECT competition FROM table_name_74 WHERE score = "2-1" | sql_create_context |
CREATE TABLE table_52000 (
"Home team" text,
"Home team score" text,
"Away team" text,
"Away team score" text,
"Venue" text,
"Crowd" real,
"Date" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What did the home team footscray score?
| SELECT "Home team score" FROM table_52000 WHERE "Home team" = 'footscray' | wikisql |
CREATE TABLE table_35265 (
"Name" text,
"Term start" real,
"Term end" text,
"Date of Birth" text,
"Date of Death" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What was the name of the leader whose term ended in 2013?
| SELECT "Name" FROM table_35265 WHERE "Term end" = '2013' | wikisql |
CREATE TABLE table_53661 (
"Entrant" text,
"Constructor" text,
"Chassis" text,
"Tyre" text,
"Driver" text,
"Rounds" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What tyre had Sergio Mantovani as a driver?
| SELECT "Tyre" FROM table_53661 WHERE "Driver" = 'sergio mantovani' | wikisql |
CREATE TABLE technician (
technician_id real,
Name text,
Team text,
Starting_Year real,
Age int
)
CREATE TABLE repair (
repair_ID int,
name text,
Launch_Date text,
Notes text
)
CREATE TABLE machine (
Machine_ID int,
Making_Year int,
Class text,
Team text,
Machin... | SELECT Name, COUNT(Name) FROM technician WHERE Team <> "NYY" GROUP BY Name ORDER BY COUNT(Name) | nvbench |
CREATE TABLE table_name_53 (
away_team VARCHAR,
home_team VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- When south Melbourne was the home team, what was the away team?
| SELECT away_team FROM table_name_53 WHERE home_team = "south melbourne" | sql_create_context |
CREATE TABLE t_kc22 (
AMOUNT number,
CHA_ITEM_LEV number,
DATA_ID text,
DIRE_TYPE number,
DOSE_FORM text,
DOSE_UNIT text,
EACH_DOSAGE text,
EXP_OCC_DATE time,
FLX_MED_ORG_ID text,
FXBZ number,
HOSP_DOC_CD text,
HOSP_DOC_NM text,
MED_DIRE_CD text,
MED_DIRE_NM text,... | SELECT t_kc21.CLINIC_ID FROM t_kc21 WHERE t_kc21.MED_CLINIC_ID = '98553609544' | css |
CREATE TABLE table_2335 (
"School" text,
"Location(s)" text,
"Control" text,
"Type" text,
"Enrollment (2005)" text,
"Founded" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- How many students enrolled in 2005 at New Hampshire Institute of Art?
| SELECT "Enrollment (2005)" FROM table_2335 WHERE "School" = 'New Hampshire Institute of Art' | wikisql |
CREATE TABLE table_512 (
"Series #" real,
"Season #" real,
"Title" text,
"Directed by" text,
"Written by" text,
"Original air date" text,
"Total viewers (in millions)" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Name the number of season ... | SELECT MIN("Season #") FROM table_512 WHERE "Written by" = 'Adam Milch' | wikisql |
CREATE TABLE table_name_36 (
television_service VARCHAR,
content VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the Television Service offering Cartomanzia?
| SELECT television_service FROM table_name_36 WHERE content = "cartomanzia" | sql_create_context |
CREATE TABLE table_name_3 (
tournament VARCHAR,
date VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What was the name of the tournament played on Jun 17, 1973?
| SELECT tournament FROM table_name_3 WHERE date = "jun 17, 1973" | sql_create_context |
CREATE TABLE course (
cid text,
cname text,
credits number,
instructor number,
days text,
hours text,
dno number
)
CREATE TABLE faculty (
facid number,
lname text,
fname text,
rank text,
sex text,
phone number,
room text,
building text
)
CREATE TABLE enrolle... | SELECT cname FROM course WHERE days = "MTW" | spider |
CREATE TABLE table_name_9 (
bronze INTEGER,
rank VARCHAR,
silver VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- How many Bronze medals for the Nation with a Rank of 11 and less than 1 Silver?
| SELECT MIN(bronze) FROM table_name_9 WHERE rank = "11" AND silver < 1 | 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 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 WHERE demographic.admission_location = "TRSF WITHIN THIS FACILITY" AND demographic.dob_year < "2092" | mimicsql_data |
CREATE TABLE table_1140105_6 (
constructor VARCHAR,
date VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is te name of the constructors dated 26 march?
| SELECT constructor FROM table_1140105_6 WHERE date = "26 March" | sql_create_context |
CREATE TABLE table_2215159_2 (
surface VARCHAR,
championship VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the surface of the French Championships?
| SELECT surface FROM table_2215159_2 WHERE championship = "French championships" | sql_create_context |
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 d_icd_procedures.short_title FROM d_icd_procedures WHERE d_icd_procedures.icd9_code IN (SELECT procedures_icd.icd9_code FROM procedures_icd WHERE procedures_icd.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 94912) AND DATETIME(procedures_icd.charttime, 'start of year') = DAT... | mimic_iii |
CREATE TABLE table_288 (
"Delegate" text,
"Interview" text,
"Swimsuit" text,
"Evening Gown" text,
"Average" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Name the number of swimsuit for israel
| SELECT COUNT("Swimsuit") FROM table_288 WHERE "Delegate" = 'Israel' | wikisql |
CREATE TABLE table_12407546_1 (
fencing VARCHAR,
running VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What's the fencing score of the player with 9:40.31 (1080 pts) in running?
| SELECT fencing FROM table_12407546_1 WHERE running = "9:40.31 (1080 pts)" | sql_create_context |
CREATE TABLE table_name_63 (
character VARCHAR,
german_voice_actor VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What character does German voice actor Dirk Fenselau play?
| SELECT character FROM table_name_63 WHERE german_voice_actor = "dirk fenselau" | sql_create_context |
CREATE TABLE table_name_94 (
year_joined INTEGER,
city VARCHAR,
mascot VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the year that the Gary team with mascot of the Tornado joined?
| SELECT MIN(year_joined) FROM table_name_94 WHERE city = "gary" AND mascot = "tornado" | sql_create_context |
CREATE TABLE diagnosis (
diagnosisid number,
patientunitstayid number,
diagnosisname text,
diagnosistime time,
icd9code text
)
CREATE TABLE cost (
costid number,
uniquepid text,
patienthealthsystemstayid number,
eventtype text,
eventid number,
chargetime time,
cost numbe... | SELECT 1 * (STRFTIME('%j', CURRENT_TIME()) - STRFTIME('%j', lab.labresulttime)) FROM lab WHERE lab.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '027-203413' AND patient.hosp... | eicu |
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 * FROM hz_info JOIN zyjzjlb JOIN hz_info_zyjzjlb ON hz_info.YLJGDM = hz_info_zyjzjlb.YLJGDM AND hz_info.KH = zyjzjlb.KH AND hz_info.KLX = zyjzjlb.KLX AND hz_info_zyjzjlb.JZLSH = zyjzjlb.JZLSH AND hz_info_zyjzjlb.YLJGDM = hz_info_zyjzjlb.YLJGDM AND hz_info_zyjzjlb.JZLSH = zyjzjlb.JZLSH AND hz_info_zyjzjlb.zyjzjlb... | css |
CREATE TABLE table_name_69 (
class VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What 1958 CIE is class s?
| SELECT 1958 AS _cié FROM table_name_69 WHERE class = "s" | sql_create_context |
CREATE TABLE table_63224 (
"Season" text,
"Pitcher" text,
"Decision" text,
"Opponent" text,
"Location" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What was the decision for the 1983 season for the game played against the New York Yankees?
| SELECT "Decision" FROM table_63224 WHERE "Opponent" = 'new york yankees' AND "Season" = '1983' | wikisql |
CREATE TABLE table_43563 (
"Year" text,
"Matches" real,
"Wins" real,
"Losses" real,
"No Result" real,
"Win %" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the number of losses for the game with a win % of 71.43%, and No Result is more ... | SELECT SUM("Losses") FROM table_43563 WHERE "Win %" = '71.43%' AND "No Result" > '0' | wikisql |
CREATE TABLE table_77179 (
"Season" real,
"League" text,
"Finish" text,
"Wins" real,
"Losses" real,
"Ties" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the lowest number of ties in the NFL, with less than 2 losses and less than 15 wins... | SELECT MIN("Ties") FROM table_77179 WHERE "League" = 'nfl' AND "Losses" < '2' AND "Wins" < '15' | wikisql |
CREATE TABLE date_day (
month_number int,
day_number int,
year int,
day_name varchar
)
CREATE TABLE state (
state_code text,
state_name text,
country_name text
)
CREATE TABLE restriction (
restriction_code text,
advance_purchase int,
stopovers text,
saturday_stay_required t... | 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_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'ATLANTA' AND flight.departure_time = (SELECT MIN(FLIGHTalias1.departure_time) FROM airpo... | atis |
CREATE TABLE jyjgzbb (
JYZBLSH text,
YLJGDM text,
BGDH text,
BGRQ time,
JYRQ time,
JCRGH text,
JCRXM text,
SHRGH text,
SHRXM text,
JCXMMC text,
JCZBDM text,
JCFF text,
JCZBMC text,
JCZBJGDX text,
JCZBJGDL number,
JCZBJGDW text,
SBBM text,
YQBH text... | SELECT (SELECT COUNT(*) 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 = '76779757' AND jybgb.BGRQ BETWEEN '2002-05-14' AND '2004-04-24'... | css |
CREATE TABLE table_3510 (
"Outcome" text,
"No." text,
"Date" text,
"Championship" text,
"Surface" text,
"Opponent in the final" text,
"Score in the final" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- How many outcomes occur for score in th... | SELECT COUNT("Outcome") FROM table_3510 WHERE "Score in the final" = '6–3, 6–4, 7–6 (13–11)' | wikisql |
CREATE TABLE allergy (
allergyid number,
patientunitstayid number,
drugname text,
allergyname text,
allergytime time
)
CREATE TABLE patient (
uniquepid text,
patienthealthsystemstayid number,
patientunitstayid number,
gender text,
age text,
ethnicity text,
hospitalid num... | SELECT t1.labname FROM (SELECT lab.labname, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM lab WHERE lab.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.age BETWEEN 30 AND 39) AND DATETIME(lab.labresulttime) >= DATETIME(CURRENT_TIME(), '-6 year') GROUP BY lab.labname) AS t1 WHER... | eicu |
CREATE TABLE regions (
REGION_ID decimal(5,0),
REGION_NAME varchar(25)
)
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,
JOB_ID varchar(10),
SALARY decimal(8,2),
CO... | SELECT HIRE_DATE, SUM(SALARY) FROM employees WHERE FIRST_NAME LIKE '%D%' OR FIRST_NAME LIKE '%S%' | 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 procedures (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE demographic ... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE demographic.gender = "M" AND prescriptions.drug = "Rosiglitazone Maleate" | mimicsql_data |
CREATE TABLE table_74851 (
"Round" real,
"Pick #" real,
"Overall" real,
"Name" text,
"Position" text,
"College" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which highest pick number had Akeem Dent as a name and where the overall was less than... | SELECT MAX("Pick #") FROM table_74851 WHERE "Name" = 'akeem dent' AND "Overall" < '91' | wikisql |
CREATE TABLE table_28995 (
"Dibrugarh" text,
"Kanyakumari" text,
"Vivek Express /15905/15906" text,
"Indian Railways" text,
"4286km" text,
"55" real,
"Weekly" text,
"82.30 hrs(~3.5 days)" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Wh... | SELECT "Vivek Express /15905/15906" FROM table_28995 WHERE "Kanyakumari" = 'Bhavnagar' | 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 demographic (... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.age < "56" AND lab.fluid = "Blood" | mimicsql_data |
CREATE TABLE allergy (
allergyid number,
patientunitstayid number,
drugname text,
allergyname text,
allergytime time
)
CREATE TABLE medication (
medicationid number,
patientunitstayid number,
drugname text,
dosage text,
routeadmin text,
drugstarttime time,
drugstoptime t... | SELECT 24 * (STRFTIME('%j', CURRENT_TIME()) - STRFTIME('%j', medication.drugstarttime)) FROM medication WHERE medication.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '006-13... | eicu |
CREATE TABLE table_47288 (
"Tournament" text,
"2005" text,
"2006" text,
"2007" text,
"2008" text,
"2009" text,
"2010" text,
"2011" text,
"2012" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the 2011 value of the 2012 grand s... | SELECT "2011" FROM table_47288 WHERE "2012" = 'grand slam tournaments' | wikisql |
CREATE TABLE table_9793 (
"Actor" text,
"Role" text,
"Status" text,
"Number Of Episodes" text,
"Notes" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is Actor, when Number Of Episodes is '117 Episodes'?
| SELECT "Actor" FROM table_9793 WHERE "Number Of Episodes" = '117 episodes' | wikisql |
CREATE TABLE table_27461 (
"Rank" real,
"Rider" text,
"Sat 29 May" text,
"Mon 31 May" text,
"Tues 1 June" text,
"Wed 2 June" text,
"Thurs 3 June" text,
"Fri 4 June" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the 2 June time f... | SELECT "Wed 2 June" FROM table_27461 WHERE "Thurs 3 June" = '17'' 48.58 127.111mph' | wikisql |
CREATE TABLE d_icd_diagnoses (
row_id number,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE chartevents (
row_id number,
subject_id number,
hadm_id number,
icustay_id number,
itemid number,
charttime time,
valuenum number,
valueuom text
)
CREATE TABLE... | SELECT 1 * (STRFTIME('%j', CURRENT_TIME()) - STRFTIME('%j', inputevents_cv.charttime)) FROM inputevents_cv WHERE inputevents_cv.icustay_id IN (SELECT icustays.icustay_id FROM icustays WHERE icustays.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 12726) AND icustays.outtime IS NULL) ... | mimic_iii |
CREATE TABLE table_10465 (
"Date" text,
"Opponent" text,
"Score" text,
"Loss" text,
"Attendance" text,
"Record" text,
"Boxscore" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which record has a Boxscore of w2, and a Loss of kline (2 3)?
| SELECT "Record" FROM table_10465 WHERE "Boxscore" = 'w2' AND "Loss" = 'kline (2–3)' | wikisql |
CREATE TABLE follows (
f1 int(11),
f2 int(11)
)
CREATE TABLE tweets (
id bigint(20),
uid int(11),
text char(140),
createdate datetime
)
CREATE TABLE user_profiles (
uid int(11),
name varchar(255),
email varchar(255),
partitionid int(11),
followers int(11)
)
-- Using valid... | SELECT name, COUNT(*) FROM user_profiles AS T1 JOIN tweets AS T2 ON T1.uid = T2.uid GROUP BY T2.uid ORDER BY COUNT(*) | nvbench |
CREATE TABLE chartevents (
row_id number,
subject_id number,
hadm_id number,
icustay_id number,
itemid number,
charttime time,
valuenum number,
valueuom text
)
CREATE TABLE inputevents_cv (
row_id number,
subject_id number,
hadm_id number,
icustay_id number,
charttim... | 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 = 'pros repair atria def-cl')) | mimic_iii |
CREATE TABLE table_63875 (
"Round" text,
"Date" text,
"Opponent" text,
"Score AUFC \u2013 Away" text,
"Attendance" real,
"Weekday" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which Attendance has an Opponent of perth glory, and a Round of 9?
| SELECT MIN("Attendance") FROM table_63875 WHERE "Opponent" = 'perth glory' AND "Round" = '9' | wikisql |
CREATE TABLE t_kc22 (
MED_EXP_DET_ID text,
OVERALL_CD_ORG text,
OVERALL_CD_PERSON text,
MED_CLINIC_ID text,
MED_EXP_BILL_ID text,
SOC_SRT_DIRE_CD text,
SOC_SRT_DIRE_NM text,
DIRE_TYPE number,
CHA_ITEM_LEV number,
MED_INV_ITEM_TYPE text,
MED_DIRE_CD text,
MED_DIRE_NM text,... | SELECT SUM(t_kc24.MED_AMOUT), SUM(t_kc24.OVE_PAY) FROM t_kc21 JOIN t_kc24 ON t_kc21.MED_CLINIC_ID = t_kc24.MED_CLINIC_ID WHERE t_kc21.MED_SER_ORG_NO = '8337353' AND t_kc24.CLINIC_SLT_DATE BETWEEN '2002-09-25' AND '2014-10-08' | css |
CREATE TABLE table_name_17 (
player VARCHAR,
round VARCHAR,
nationality VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Who is the player from Round 3 from Russia?
| SELECT player FROM table_name_17 WHERE round = 3 AND nationality = "russia" | sql_create_context |
CREATE TABLE dual_carrier (
main_airline varchar,
low_flight_number int,
high_flight_number int,
dual_airline varchar,
service_name text
)
CREATE TABLE class_of_service (
booking_class varchar,
rank int,
class_description text
)
CREATE TABLE restriction (
restriction_code text,
... | 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 = 'SAN FRANCISCO' AND date_day.day_number = 22 AND date_day.month_number = ... | atis |
CREATE TABLE table_71911 (
"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.
-- Played on Clay Surface, what was the Score of the Dortmund Tournament?
| SELECT "Score in the final" FROM table_71911 WHERE "Surface" = 'clay' AND "Tournament" = 'dortmund' | wikisql |
CREATE TABLE faculty (
facid number,
lname text,
fname text,
rank text,
sex text,
phone number,
room text,
building text
)
CREATE TABLE activity (
actid number,
activity_name text
)
CREATE TABLE student (
stuid number,
lname text,
fname text,
age number,
sex... | SELECT COUNT(*) FROM activity | spider |
CREATE TABLE table_48555 (
"Tournament" text,
"Surface" text,
"Week" text,
"Winner and score" text,
"Finalist" text,
"Semifinalists" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Who won on the week of August 10?
| SELECT "Winner and score" FROM table_48555 WHERE "Week" = 'august 10' | wikisql |
CREATE TABLE table_1886270_1 (
hr_no VARCHAR,
hr_name VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- When river ness is the hr name what is the hr number?
| SELECT hr_no FROM table_1886270_1 WHERE hr_name = "River Ness" | sql_create_context |
CREATE TABLE table_23483182_1 (
no_in_series INTEGER,
original_air_date VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the series number of the episode that aired March 25, 2010?
| SELECT MIN(no_in_series) FROM table_23483182_1 WHERE original_air_date = "March 25, 2010" | sql_create_context |
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 t_kc21.MED_SER_ORG_NO FROM t_kc21 WHERE t_kc21.PERSON_NM = '柏子萱' GROUP BY t_kc21.MED_SER_ORG_NO ORDER BY COUNT(*) DESC | css |
CREATE TABLE table_name_45 (
date_of_birth__age_ VARCHAR,
player VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the date of birth of Kameli Ratuvou?
| SELECT date_of_birth__age_ FROM table_name_45 WHERE player = "kameli ratuvou" | sql_create_context |
CREATE TABLE table_51455 (
"Opponent" text,
"Result" text,
"Score" text,
"Date" text,
"Venue" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Who scored 18-19?
| SELECT "Opponent" FROM table_51455 WHERE "Score" = '18-19' | wikisql |
CREATE TABLE table_13337302_16 (
rank VARCHAR,
dismissals VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- List the ranks of all dismissals with a value of 4
| SELECT rank FROM table_13337302_16 WHERE dismissals = 4 | sql_create_context |
CREATE TABLE match_season (
Season real,
Player text,
Position text,
Country int,
Team int,
Draft_Pick_Number int,
Draft_Class text,
College text
)
CREATE TABLE team (
Team_id int,
Name text
)
CREATE TABLE player (
Player_ID int,
Player text,
Years_Played text,
... | SELECT Position, COUNT(*) FROM match_season GROUP BY Position | nvbench |
CREATE TABLE table_15978 (
"#" real,
"City" text,
"1981 Census" real,
"1991 Census" real,
"2001 Census" real,
"2010 Est." real,
"Region" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What's the 1981 census of Livorno?
| SELECT "1981 Census" FROM table_15978 WHERE "City" = 'Livorno' | wikisql |
CREATE TABLE user_profiles (
uid number,
name text,
email text,
partitionid number,
followers number
)
CREATE TABLE tweets (
id number,
uid number,
text text,
createdate time
)
CREATE TABLE follows (
f1 number,
f2 number
)
-- Using valid SQLite, answer the following quest... | SELECT text FROM tweets ORDER BY createdate | spider |
CREATE TABLE table_22839669_1 (
opponent_in_the_final VARCHAR,
score_in_the_final VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Who is the opponent in the match with final score 3 6, 4 6, 7 5, 4 6?
| SELECT opponent_in_the_final FROM table_22839669_1 WHERE score_in_the_final = "3–6, 4–6, 7–5, 4–6" | sql_create_context |
CREATE TABLE table_name_63 (
round INTEGER,
pick INTEGER
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which Round has a Pick larger than 179?
| SELECT MAX(round) FROM table_name_63 WHERE pick > 179 | sql_create_context |
CREATE TABLE table_203_761 (
id number,
"pos" number,
"no" number,
"driver" text,
"team" text,
"laps" number,
"time/retired" text,
"grid" number,
"points" number
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- which drivers finished the 20... | SELECT "driver" FROM table_203_761 WHERE "pos" < (SELECT "pos" FROM table_203_761 WHERE "driver" = 'simon pagenaud') | squall |
CREATE TABLE Products (
Code INTEGER,
Name VARCHAR(255),
Price DECIMAL,
Manufacturer INTEGER
)
CREATE TABLE Manufacturers (
Code INTEGER,
Name VARCHAR(255),
Headquarter VARCHAR(255),
Founder VARCHAR(255),
Revenue REAL
)
-- Using valid SQLite, answer the following questions for the... | SELECT Founder, AVG(Price) FROM Products AS T1 JOIN Manufacturers AS T2 ON T1.Manufacturer = T2.Code GROUP BY Founder ORDER BY AVG(Price) DESC | nvbench |
CREATE TABLE table_62749 (
"Rank" real,
"Lane" real,
"Name" text,
"Nationality" text,
"Time" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What nationality has a lane less than 6, with 1 as the rank?
| SELECT "Nationality" FROM table_62749 WHERE "Lane" < '6' AND "Rank" = '1' | wikisql |
CREATE TABLE table_65547 (
"Rank" text,
"Nation" text,
"Gold" real,
"Silver" real,
"Bronze" real,
"Total" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- When the rank is 11, and bronze a smaller than 1 what is the lowest total?
| SELECT MIN("Total") FROM table_65547 WHERE "Rank" = '11' AND "Bronze" < '1' | wikisql |
CREATE TABLE table_49107 (
"Week" real,
"Date" text,
"Opponent" text,
"Score" text,
"Result" text,
"Attendance" text,
"Record" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is Attendance, when Opponent is Montreal Alouettes, and when D... | SELECT "Attendance" FROM table_49107 WHERE "Opponent" = 'montreal alouettes' AND "Date" = 'oct 4' | wikisql |
CREATE TABLE table_55494 (
"Driver" text,
"Constructor" text,
"Laps" real,
"Time/Retired" text,
"Grid" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- I want the driver for ferrari who made Laps less than 26 and grids more than 9
| SELECT "Driver" FROM table_55494 WHERE "Grid" > '9' AND "Laps" < '26' AND "Constructor" = 'ferrari' | wikisql |
CREATE TABLE table_name_51 (
team VARCHAR,
series VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What team did they play when the series was 1-1?
| SELECT team FROM table_name_51 WHERE series = "1-1" | sql_create_context |
CREATE TABLE equipment_sequence (
aircraft_code_sequence varchar,
aircraft_code varchar
)
CREATE TABLE fare (
fare_id int,
from_airport varchar,
to_airport varchar,
fare_basis_code text,
fare_airline text,
restriction_code text,
one_direction_cost int,
round_trip_cost int,
r... | 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 = 'BOSTON' AND CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'DENVER'... | atis |
CREATE TABLE table_name_53 (
Id VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Name the sum of 2010 for 2000 of 17 and 2005 more than 16
| SELECT SUM(2010) FROM table_name_53 WHERE 2000 = 17 AND 2005 > 16 | sql_create_context |
CREATE TABLE Products (
Code INTEGER,
Name VARCHAR(255),
Price DECIMAL,
Manufacturer INTEGER
)
CREATE TABLE Manufacturers (
Code INTEGER,
Name VARCHAR(255),
Headquarter VARCHAR(255),
Founder VARCHAR(255),
Revenue REAL
)
-- Using valid SQLite, answer the following questions for the... | SELECT Name, MIN(Price) FROM Products GROUP BY Name ORDER BY Name | nvbench |
CREATE TABLE table_52999 (
"Date" text,
"Venue" text,
"Score" text,
"Result" text,
"Competition" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What's the Result of the Competition of 1998 FIFA World Cup Qualification with the Venue of Bangkok?
| SELECT "Result" FROM table_52999 WHERE "Competition" = '1998 fifa world cup qualification' AND "Venue" = 'bangkok' | wikisql |
CREATE TABLE machine (
Machine_ID int,
Making_Year int,
Class text,
Team text,
Machine_series text,
value_points real,
quality_rank int
)
CREATE TABLE technician (
technician_id real,
Name text,
Team text,
Starting_Year real,
Age int
)
CREATE TABLE repair (
repair_I... | SELECT Name, COUNT(Name) FROM repair_assignment AS T1 JOIN machine AS T2 ON T1.Machine_ID = T2.Machine_ID JOIN technician AS T3 ON T1.technician_id = T3.technician_id WHERE T2.value_points > 70 GROUP BY Name | nvbench |
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 WHERE demographic.diagnosis = "STERNAL WOUND INFECTION" AND demographic.dob_year < "2120" | mimicsql_data |
CREATE TABLE table_26804 (
"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.
-- name the school locate... | SELECT "School" FROM table_26804 WHERE "Location" = 'Milton, MA' | wikisql |
CREATE TABLE table_21100348_10 (
period VARCHAR,
player VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- During what period did Ricky Ponting play?
| SELECT period FROM table_21100348_10 WHERE player = "Ricky Ponting" | sql_create_context |
CREATE TABLE table_name_58 (
visitor VARCHAR,
date VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the Visitor on January 1?
| SELECT visitor FROM table_name_58 WHERE date = "january 1" | sql_create_context |
CREATE TABLE submission (
Submission_ID int,
Scores real,
Author text,
College text
)
CREATE TABLE Acceptance (
Submission_ID int,
Workshop_ID int,
Result text
)
CREATE TABLE workshop (
Workshop_ID int,
Date text,
Venue text,
Name text
)
-- Using valid SQLite, answer the ... | SELECT Author, COUNT(DISTINCT T1.Workshop_ID) FROM Acceptance AS T1 JOIN submission AS T2 ON T1.Submission_ID = T2.Submission_ID ORDER BY COUNT(DISTINCT T1.Workshop_ID) | nvbench |
CREATE TABLE person_info (
CSD text,
CSRQ time,
GJDM text,
GJMC text,
JGDM text,
JGMC text,
MZDM text,
MZMC text,
RYBH text,
XBDM number,
XBMC text,
XLDM text,
XLMC text,
XM text,
ZYLBDM text,
ZYMC text
)
CREATE TABLE zzmzjzjlb (
HXPLC number,
HZX... | SELECT jyjgzbb.CKZFWXX, jyjgzbb.CKZFWSX FROM zzmzjzjlb JOIN jybgb JOIN jyjgzbb ON zzmzjzjlb.YLJGDM = jybgb.YLJGDM_MZJZJLB AND zzmzjzjlb.JZLSH = jybgb.JZLSH_MZJZJLB AND jybgb.YLJGDM = jyjgzbb.YLJGDM AND jybgb.BGDH = jyjgzbb.BGDH WHERE zzmzjzjlb.JZZDBM = 'Y85.622' AND jyjgzbb.JCZBMC = '低密度脂蛋白胆固醇' UNION SELECT jyjgzbb.CKZ... | css |
CREATE TABLE table_name_67 (
country VARCHAR,
stolen_ends VARCHAR,
skip VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Name the Country which has Stolen Ends larger than 7, and a Skip of david murdoch?
| SELECT country FROM table_name_67 WHERE stolen_ends > 7 AND skip = "david murdoch" | sql_create_context |
CREATE TABLE table_25135 (
"Position" real,
"1990\u20131991" text,
"1991\u20131992" text,
"1992\u20131993" text,
"1993\u20131994" text,
"1994\u20131995" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Who was ranked in the same position in 1991-1... | SELECT "1991\u20131992" FROM table_25135 WHERE "1994\u20131995" = 'Tim Doyle' | wikisql |
CREATE TABLE table_name_65 (
lundu__salako_ VARCHAR,
tagalog VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the Lundu (Salako) word for the Tagalog word pagkain?
| SELECT lundu__salako_ FROM table_name_65 WHERE tagalog = "pagkain" | sql_create_context |
CREATE TABLE table_204_671 (
id number,
"airing\ndate" text,
"english title\n(chinese title)" text,
"number of episodes" number,
"main cast" text,
"theme song (t)\nsub-theme song (st)" text,
"genre" text,
"notes" text,
"official website" text
)
-- Using valid SQLite, answer the fol... | SELECT COUNT(*) FROM table_204_671 WHERE "number of episodes" >= 20 | squall |
CREATE TABLE fgwyjzb (
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 gwyjzb.MED_CLINIC_ID FROM gwyjzb WHERE gwyjzb.PERSON_NM = '喻秀敏' AND gwyjzb.MED_CLINIC_ID IN (SELECT t_kc22.MED_CLINIC_ID FROM t_kc22 WHERE t_kc22.AMOUNT > 8393.94) UNION SELECT fgwyjzb.MED_CLINIC_ID FROM fgwyjzb WHERE fgwyjzb.PERSON_NM = '喻秀敏' AND fgwyjzb.MED_CLINIC_ID IN (SELECT t_kc22.MED_CLINIC_ID FROM t_kc22... | css |
CREATE TABLE chartevents (
row_id number,
subject_id number,
hadm_id number,
icustay_id number,
itemid number,
charttime time,
valuenum number,
valueuom text
)
CREATE TABLE microbiologyevents (
row_id number,
subject_id number,
hadm_id number,
charttime time,
spec_ty... | 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 = 30826)) AND chartevents.itemid IN (SELECT d_items.itemid FROM d_items WHERE d_items.label = 'temperature c (ca... | mimic_iii |
CREATE TABLE table_73670 (
"Season" real,
"Series" text,
"Team" text,
"Races" real,
"Wins" real,
"Poles" real,
"F/Laps" real,
"Podiums" real,
"Points" real,
"Position" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What team was ... | SELECT "Team" FROM table_73670 WHERE "Position" = '11th' | wikisql |
CREATE TABLE table_204_957 (
id number,
"year" number,
"team" text,
"games" number,
"combined tackles" number,
"tackles" number,
"assisted tackles" number,
"sacks" number,
"forced fumbles" number,
"fumble recoveries" number,
"fumble return yards" number,
"interceptions" n... | SELECT "year" FROM table_204_957 WHERE "games" >= 15 | squall |
CREATE TABLE table_25480 (
"Game" real,
"Date" text,
"Team" text,
"Score" text,
"High points" text,
"High rebounds" text,
"High assists" text,
"Location Attendance" text,
"Record" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- what i... | SELECT "Location Attendance" FROM table_25480 WHERE "Game" = '27' | wikisql |
CREATE TABLE countries (
COUNTRY_ID varchar(2),
COUNTRY_NAME varchar(40),
REGION_ID decimal(10,0)
)
CREATE TABLE departments (
DEPARTMENT_ID decimal(4,0),
DEPARTMENT_NAME varchar(30),
MANAGER_ID decimal(6,0),
LOCATION_ID decimal(4,0)
)
CREATE TABLE employees (
EMPLOYEE_ID decimal(6,0),... | SELECT COUNTRY_NAME, COUNT(COUNTRY_NAME) FROM countries GROUP BY COUNTRY_NAME ORDER BY COUNTRY_NAME DESC | nvbench |
CREATE TABLE table_75098 (
"Date" text,
"Opponent" text,
"Score" text,
"Loss" text,
"Save" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- The game with a loss of smith (2-4) ended with what score?
| SELECT "Score" FROM table_75098 WHERE "Loss" = 'smith (2-4)' | wikisql |
CREATE TABLE table_12740 (
"Home (1st leg)" text,
"Home (2nd leg)" text,
"1st Leg" text,
"2nd leg" text,
"Aggregate" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What was the first leg home that had a total aggregate of 3-1?
| SELECT "Home (1st leg)" FROM table_12740 WHERE "Aggregate" = '3-1' | wikisql |
CREATE TABLE CloseAsOffTopicReasonTypes (
Id number,
IsUniversal boolean,
InputTitle text,
MarkdownInputGuidance text,
MarkdownPostOwnerGuidance text,
MarkdownPrivilegedUserGuidance text,
MarkdownConcensusDescription text,
CreationDate time,
CreationModeratorId number,
ApprovalDa... | SELECT a.ParentId, MAX(a.Score) FROM Posts AS a JOIN Posts AS q ON a.ParentId = q.Id GROUP BY a.ParentId | sede |
CREATE TABLE table_name_10 (
copa_libertadores_1996 VARCHAR,
supercopa_1995 VARCHAR,
team VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- which Copa Libertadores 1996 has round 1 Supercopa 1995 and argentinos juniors team ?
| SELECT copa_libertadores_1996 FROM table_name_10 WHERE supercopa_1995 = "round 1" AND team = "argentinos juniors" | sql_create_context |
CREATE TABLE ReviewRejectionReasons (
Id number,
Name text,
Description text,
PostTypeId number
)
CREATE TABLE VoteTypes (
Id number,
Name text
)
CREATE TABLE PostTypes (
Id number,
Name text
)
CREATE TABLE TagSynonyms (
Id number,
SourceTagName text,
TargetTagName text,
... | SELECT p.Id AS "post_link", u.DisplayName, pht.Name, ph.CreationDate, p.Id AS PostId, p.Title FROM PostHistory AS ph JOIN PostHistoryTypes AS pht ON ph.PostHistoryTypeId = pht.Id JOIN Posts AS p ON ph.PostId = p.Id JOIN Users AS u ON ph.UserId = u.Id WHERE ph.UserId = '##userId##' AND p.OwnerUserId = '##userId2##' AND ... | sede |
CREATE TABLE table_24738 (
"Year (Ceremony)" text,
"Film title used in nomination" text,
"Original title" text,
"Language(s)" text,
"Director" text,
"Result" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What was the language for the movie 'Lat... | SELECT "Language(s)" FROM table_24738 WHERE "Film title used in nomination" = 'Late Bloomers' | wikisql |
CREATE TABLE table_name_38 (
democratic_ticket VARCHAR,
socialist_labor_ticket VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Who's the Democratic ticket with a Socialist Labor ticket of belle j. rosen?
| SELECT democratic_ticket FROM table_name_38 WHERE socialist_labor_ticket = "belle j. rosen" | 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 INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE procedures.long_title = "Open and other right hemicolectomy" AND lab.fluid = "Pleural" | mimicsql_data |
CREATE TABLE table_name_46 (
away_team VARCHAR,
tie_no VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- WHAT IS THE AWAY TEAM WITH A TIE NUMBER 1?
| SELECT away_team FROM table_name_46 WHERE tie_no = "1" | sql_create_context |
CREATE TABLE works_on (
Essn INTEGER,
Pno INTEGER,
Hours REAL
)
CREATE TABLE dependent (
Essn INTEGER,
Dependent_name TEXT,
Sex TEXT,
Bdate TEXT,
Relationship TEXT
)
CREATE TABLE project (
Pname Text,
Pnumber INTEGER,
Plocation TEXT,
Dnum INTEGER
)
CREATE TABLE employe... | SELECT Sex, COUNT(*) FROM employee WHERE Salary < 50000 GROUP BY Sex | nvbench |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.