instruction stringlengths 151 7.46k | output stringlengths 2 4.44k | source stringclasses 26
values |
|---|---|---|
CREATE TABLE table_name_60 (
incumbent VARCHAR,
district VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which incumbent was in the 24th district?
| SELECT incumbent FROM table_name_60 WHERE district = "24th" | sql_create_context |
CREATE TABLE authorship (
authid VARCHAR,
paperid VARCHAR
)
CREATE TABLE papers (
title VARCHAR,
paperid VARCHAR
)
CREATE TABLE authors (
authid VARCHAR,
fname VARCHAR,
lname VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which papers h... | SELECT t3.title FROM authors AS t1 JOIN authorship AS t2 ON t1.authid = t2.authid JOIN papers AS t3 ON t2.paperid = t3.paperid WHERE t1.fname = "Stephanie" AND t1.lname = "Weirich" | sql_create_context |
CREATE TABLE table_name_90 (
name VARCHAR,
total VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Who had a total of 34?
| SELECT name FROM table_name_90 WHERE total = 34 | sql_create_context |
CREATE TABLE language (
language_id TINYINT UNSIGNED,
name CHAR(20),
last_update TIMESTAMP
)
CREATE TABLE film_actor (
actor_id SMALLINT UNSIGNED,
film_id SMALLINT UNSIGNED,
last_update TIMESTAMP
)
CREATE TABLE category (
category_id TINYINT UNSIGNED,
name VARCHAR(25),
last_update ... | SELECT T2.name, T1.category_id FROM film_category AS T1 JOIN category AS T2 ON T1.category_id = T2.category_id ORDER BY T1.category_id | nvbench |
CREATE TABLE table_name_26 (
date VARCHAR,
name VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What Date has a Name of thuin circuit?
| SELECT date FROM table_name_26 WHERE name = "thuin circuit" | sql_create_context |
CREATE TABLE table_name_70 (
current_status VARCHAR,
livery VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the Current status of Callander Coal company grey?
| SELECT current_status FROM table_name_70 WHERE livery = "callander coal company grey" | sql_create_context |
CREATE TABLE labevents (
row_id number,
subject_id number,
hadm_id number,
itemid number,
charttime time,
valuenum number,
valueuom text
)
CREATE TABLE d_icd_diagnoses (
row_id number,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE cost (
row_id number... | SELECT d_items.label FROM d_items WHERE d_items.itemid IN (SELECT outputevents.itemid FROM outputevents WHERE outputevents.icustay_id IN (SELECT icustays.icustay_id FROM icustays WHERE icustays.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 55360)) AND DATETIME(outputevents.charttim... | mimic_iii |
CREATE TABLE table_name_87 (
engine VARCHAR,
model VARCHAR,
torque VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the engine for model 2.0 bitdi (cr) dpf, with a Torque of n m (lb ft) @ 1500 2000 rpm?
| SELECT engine FROM table_name_87 WHERE model = "2.0 bitdi (cr) dpf" AND torque = "n·m (lb·ft) @ 1500–2000 rpm" | sql_create_context |
CREATE TABLE table_203_780 (
id number,
"rank" number,
"diver" text,
"preliminary\npoints" number,
"preliminary\nrank" number,
"final\npoints" number,
"final\nrank" number,
"final\ntotal" number
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- ... | SELECT COUNT("diver") FROM table_203_780 WHERE "diver" = 'jpn' | squall |
CREATE TABLE table_name_15 (
min_press___mbar__ VARCHAR,
storm_name VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- what is the minimum force of storm Adrian
| SELECT min_press___mbar__ FROM table_name_15 WHERE storm_name = "adrian" | sql_create_context |
CREATE TABLE film (
film_id number,
title text,
studio text,
director text,
gross_in_dollar number
)
CREATE TABLE film_market_estimation (
estimation_id number,
low_estimate number,
high_estimate number,
film_id number,
type text,
market_id number,
year number
)
CREATE ... | SELECT COUNT(*) FROM film | spider |
CREATE TABLE table_1637041_2 (
starts VARCHAR,
year VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- How many instances do you see the year 2003?
| SELECT COUNT(starts) FROM table_1637041_2 WHERE year = 2003 | sql_create_context |
CREATE TABLE table_2562572_26 (
type VARCHAR,
population__2011_ VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What type of settlement has a population of 1441?
| SELECT type FROM table_2562572_26 WHERE population__2011_ = 1441 | sql_create_context |
CREATE TABLE treatment (
treatmentid number,
patientunitstayid number,
treatmentname text,
treatmenttime time
)
CREATE TABLE microlab (
microlabid number,
patientunitstayid number,
culturesite text,
organism text,
culturetakentime time
)
CREATE TABLE medication (
medicationid n... | SELECT DISTINCT cost.cost FROM cost WHERE cost.eventtype = 'lab' AND cost.eventid IN (SELECT lab.labid FROM lab WHERE lab.labname = 'ph') | eicu |
CREATE TABLE jobs (
JOB_ID varchar(10),
JOB_TITLE varchar(35),
MIN_SALARY decimal(6,0),
MAX_SALARY decimal(6,0)
)
CREATE TABLE regions (
REGION_ID decimal(5,0),
REGION_NAME varchar(25)
)
CREATE TABLE job_history (
EMPLOYEE_ID decimal(6,0),
START_DATE date,
END_DATE date,
JOB_ID... | SELECT JOB_ID, EMPLOYEE_ID FROM employees WHERE NOT DEPARTMENT_ID IN (SELECT DEPARTMENT_ID FROM departments WHERE MANAGER_ID BETWEEN 100 AND 200) | nvbench |
CREATE TABLE table_38610 (
"Week" real,
"Date" text,
"Opponent" text,
"Result" text,
"Record" text,
"Game Site" text,
"TV Time" text,
"Attendance" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which TV Time has a Date of december 26, 19... | SELECT "TV Time" FROM table_38610 WHERE "Date" = 'december 26, 1999' | wikisql |
CREATE TABLE table_77273 (
"Tie no" text,
"Home team" text,
"Score" text,
"Away team" text,
"Attendance" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What was the attendance for the game where the away team was Stockport County?
| SELECT "Attendance" FROM table_77273 WHERE "Away team" = 'stockport county' | 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 WHERE demographic.ethnicity = "ASIAN" AND demographic.dod_year <= "2155.0" | mimicsql_data |
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 T2.Headquarter, T1.Code FROM Products AS T1 JOIN Manufacturers AS T2 ON T1.Manufacturer = T2.Code GROUP BY T2.Headquarter ORDER BY T1.Code DESC | 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 lab (
subject_id text,
hadm_id text,
itemid text,
charttime text,
flag text,
value_unit text,... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.marital_status = "SINGLE" AND demographic.admityear < "2176" | mimicsql_data |
CREATE TABLE table_name_77 (
Id VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What shows for 2013 when the 2008 is 1r?
| SELECT 2013 FROM table_name_77 WHERE 2008 = "1r" | sql_create_context |
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 jyjgzbb.JCRGH, jyjgzbb.JCRXM FROM hz_info JOIN txmzjzjlb JOIN jybgb JOIN jyjgzbb ON hz_info.YLJGDM = txmzjzjlb.YLJGDM AND hz_info.KH = txmzjzjlb.KH AND hz_info.KLX = txmzjzjlb.KLX AND txmzjzjlb.YLJGDM = jybgb.YLJGDM_MZJZJLB AND txmzjzjlb.JZLSH = jybgb.JZLSH_MZJZJLB AND jybgb.YLJGDM = jyjgzbb.YLJGDM AND jybgb.BGD... | css |
CREATE TABLE CloseAsOffTopicReasonTypes (
Id number,
IsUniversal boolean,
InputTitle text,
MarkdownInputGuidance text,
MarkdownPostOwnerGuidance text,
MarkdownPrivilegedUserGuidance text,
MarkdownConcensusDescription text,
CreationDate time,
CreationModeratorId number,
ApprovalDa... | SELECT u.Location, COUNT(*) AS theCount FROM Users AS u INNER JOIN Posts AS p ON p.OwnerUserId = u.Id INNER JOIN PostTags AS pt ON p.ParentId = pt.PostId INNER JOIN Tags AS t ON t.Id = pt.TagId GROUP BY u.Location ORDER BY theCount DESC | sede |
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 COUNT(*) FROM wdmzjzjlb WHERE wdmzjzjlb.YLJGDM = '8183928' AND wdmzjzjlb.JZKSRQ BETWEEN '2004-05-16' AND '2020-12-13' AND wdmzjzjlb.ZZBZ > 0 UNION SELECT COUNT(*) FROM bdmzjzjlb WHERE bdmzjzjlb.YLJGDM = '8183928' AND bdmzjzjlb.JZKSRQ BETWEEN '2004-05-16' AND '2020-12-13' AND bdmzjzjlb.ZZBZ > 0 | css |
CREATE TABLE diagnoses (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE demographic (
subject_id text,
hadm_id text,
name text,
marital_status text,
age text,
dob text,
gender text,
language text,
religion text,
... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE demographic.ethnicity = "HISPANIC OR LATINO" AND prescriptions.drug = "Alprazolam" | mimicsql_data |
CREATE TABLE table_69225 (
"Pick" real,
"Player" text,
"Team" text,
"Position" text,
"School" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What's the total number of picks for mckinney high school?
| SELECT SUM("Pick") FROM table_69225 WHERE "School" = 'mckinney high school' | wikisql |
CREATE TABLE table_13054 (
"Opposing Teams" text,
"Against" real,
"Date" text,
"Venue" text,
"Status" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What status is on 21/08/1999?
| SELECT "Status" FROM table_13054 WHERE "Date" = '21/08/1999' | wikisql |
CREATE TABLE table_name_86 (
score VARCHAR,
date VARCHAR,
home_team VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the score for the game where Birmingham City was the home team on 10 March 1984?
| SELECT score FROM table_name_86 WHERE date = "10 march 1984" AND home_team = "birmingham city" | sql_create_context |
CREATE TABLE table_name_8 (
lince VARCHAR,
leclerc VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What's the lince when Leclerc was Hp (kw)?
| SELECT lince FROM table_name_8 WHERE leclerc = "hp (kw)" | sql_create_context |
CREATE TABLE t_kc24 (
MED_SAFE_PAY_ID text,
OVERALL_CD_ORG text,
OVERALL_CD_PERSON text,
MED_CLINIC_ID text,
REF_SLT_FLG number,
CLINIC_SLT_DATE time,
COMP_ID text,
PERSON_ID text,
FLX_MED_ORG_ID text,
INSU_TYPE text,
MED_AMOUT number,
PER_ACC_PAY number,
OVE_PAY numb... | SELECT MED_CLINIC_ID FROM t_kc21 WHERE PERSON_NM = '章浩然' AND MED_SER_ORG_NO = '4333598' AND NOT IN_DIAG_DIS_NM LIKE '%癫痫%' | css |
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 jybgb (
BBCJBW text,
BBDM tex... | SELECT jybgb.JYKSBM, jybgb.JYKSMC FROM jybgb WHERE jybgb.JZLSH = '04419107006' | css |
CREATE TABLE ground_service (
city_code text,
airport_code text,
transport_type text,
ground_fare int
)
CREATE TABLE time_interval (
period text,
begin_time int,
end_time int
)
CREATE TABLE flight_fare (
flight_id int,
fare_id int
)
CREATE TABLE flight (
aircraft_code_sequence... | SELECT DISTINCT flight.flight_id FROM airport AS AIRPORT_0, airport AS AIRPORT_1, flight WHERE ((AIRPORT_0.airport_code = 'BOS' AND AIRPORT_1.airport_code = 'BWI' AND flight.from_airport = AIRPORT_0.airport_code AND flight.to_airport = AIRPORT_1.airport_code) AND flight.airline_code = 'EA') AND flight.departure_time BE... | atis |
CREATE TABLE table_49001 (
"Game" real,
"Date" text,
"Team" text,
"Score" text,
"High points" text,
"High rebounds" text,
"High assists" text,
"Location Attendance" text,
"Series" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What i... | SELECT "High rebounds" FROM table_49001 WHERE "High assists" = 'rafer alston , rashard lewis , hedo türkoğlu (3)' | wikisql |
CREATE TABLE table_36620 (
"Fraction" text,
"Ellipsis" text,
"Vinculum" text,
"Dots" text,
"Parentheses" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- How much is vinculum when the parentheses are 0.(81)?
| SELECT "Vinculum" FROM table_36620 WHERE "Parentheses" = '0.(81)' | wikisql |
CREATE TABLE table_59919 (
"Driver" text,
"Team" text,
"Laps" real,
"Time/Retired" text,
"Grid" real,
"Points" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- How many points for Newman/Haas Racing with fewer than 40 laps?
| SELECT AVG("Points") FROM table_59919 WHERE "Team" = 'newman/haas racing' AND "Laps" < '40' | wikisql |
CREATE TABLE table_58185 (
"Year" real,
"Award Ceremony" text,
"Category" text,
"Nominee" text,
"Result" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Who was nominated for best female performer?
| SELECT "Nominee" FROM table_58185 WHERE "Category" = 'best female performer' | wikisql |
CREATE TABLE table_80388 (
"Team" text,
"Manager" text,
"Captain" text,
"Kit manufacturer" text,
"Shirt sponsor" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the kit manufacturer that has billy bonds as the manager?
| SELECT "Kit manufacturer" FROM table_80388 WHERE "Manager" = 'billy bonds' | wikisql |
CREATE TABLE person_info (
RYBH text,
XBDM number,
XBMC text,
XM text,
CSRQ time,
CSD text,
MZDM text,
MZMC text,
GJDM text,
GJMC text,
JGDM text,
JGMC text,
XLDM text,
XLMC text,
ZYLBDM text,
ZYMC text
)
CREATE TABLE jybgb (
YLJGDM text,
YLJGDM_M... | (SELECT JCZBMC FROM jyjgzbb WHERE BGDH = '40185156362') INTERSECT (SELECT JCZBMC FROM jyjgzbb WHERE BGDH = '73215466406') | css |
CREATE TABLE first_notification_of_loss (
fnol_id number,
customer_id number,
policy_id number,
service_id number
)
CREATE TABLE available_policies (
policy_id number,
policy_type_code text,
customer_phone text
)
CREATE TABLE settlements (
settlement_id number,
claim_id number,
... | SELECT customer_name FROM customers EXCEPT SELECT t1.customer_name FROM customers AS t1 JOIN first_notification_of_loss AS t2 ON t1.customer_id = t2.customer_id | spider |
CREATE TABLE table_name_89 (
bronze VARCHAR,
total VARCHAR,
silver VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the total number of bronze medals of the nation with 4 total medals and 1 silver?
| SELECT COUNT(bronze) FROM table_name_89 WHERE total = 4 AND silver = 1 | 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 d_icd_diagnoses (
row_id number,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE labevents (
row_id numbe... | SELECT (SELECT COUNT(DISTINCT t1.subject_id) FROM (SELECT admissions.subject_id, diagnoses_icd.charttime FROM diagnoses_icd JOIN admissions ON diagnoses_icd.hadm_id = admissions.hadm_id WHERE diagnoses_icd.icd9_code = (SELECT d_icd_diagnoses.icd9_code FROM d_icd_diagnoses WHERE d_icd_diagnoses.short_title = 'patent duc... | mimic_iii |
CREATE TABLE table_name_26 (
games INTEGER,
drawn INTEGER
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the lowest game that has a drawn less than 0?
| SELECT MIN(games) FROM table_name_26 WHERE drawn < 0 | sql_create_context |
CREATE TABLE table_name_94 (
hometown_school VARCHAR,
team VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which Hometown/School has a Team of cleveland indians?
| SELECT hometown_school FROM table_name_94 WHERE team = "cleveland indians" | sql_create_context |
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 jyjgzbb.JYZBLSH FROM person_info JOIN hz_info JOIN mzjzjlb JOIN jybgb JOIN jyjgzbb ON person_info.RYBH = hz_info.RYBH AND hz_info.YLJGDM = mzjzjlb.YLJGDM AND hz_info.KH = mzjzjlb.KH AND hz_info.KLX = mzjzjlb.KLX AND mzjzjlb.YLJGDM = jybgb.YLJGDM_MZJZJLB AND mzjzjlb.JZLSH = jybgb.JZLSH_MZJZJLB AND jybgb.YLJGDM = ... | css |
CREATE TABLE table_6577 (
"Round" real,
"Player" text,
"Position" text,
"Nationality" text,
"College/Junior/Club Team (League)" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What was the nationality for the player in Round 1?
| SELECT "Nationality" FROM table_6577 WHERE "Round" = '1' | wikisql |
CREATE TABLE table_21424 (
"Fin. Pos" real,
"Car No." real,
"Driver" text,
"Team" text,
"Laps" real,
"Time/Retired" text,
"Grid" real,
"Laps Led" real,
"Points" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Car number 15 earned what... | SELECT "Time/Retired" FROM table_21424 WHERE "Car No." = '15' | wikisql |
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 admissions (
row_id number,
subject_id number,
hadm_id number,
admittime time,
dis... | SELECT COUNT(*) > 0 FROM prescriptions WHERE prescriptions.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 1372) AND prescriptions.drug = 'furosemide' AND STRFTIME('%y-%m', prescriptions.startdate) <= '2101-07' | mimic_iii |
CREATE TABLE table_21596 (
"Year (Ceremony)" text,
"Film title used in nomination" text,
"Original title" text,
"Director" text,
"Result" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Old Mo's Second Spring was the film title used in nomination in ... | SELECT "Year (Ceremony)" FROM table_21596 WHERE "Film title used in nomination" = 'Old Mo''s Second Spring' | wikisql |
CREATE TABLE table_24857 (
"Year (Ceremony)" text,
"Film title used in nomination" text,
"Original title" text,
"Director" text,
"Result" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Who directed the film with the title three summer days?
| SELECT "Director" FROM table_24857 WHERE "Film title used in nomination" = 'Three Summer Days' | wikisql |
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 ground_service.transport_type FROM city, ground_service WHERE city.city_name = 'INDIANAPOLIS' AND ground_service.city_code = city.city_code | atis |
CREATE TABLE table_19188 (
"Cast" text,
"1951 ( BBC )" text,
"1957 (BBC)" text,
"1968 (BBC)" text,
"1970 (film)" text,
"2000 ( Carlton Television )" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Name the cast for 1951 bbc being carole lorimer
| SELECT "Cast" FROM table_19188 WHERE "1951 ( BBC )" = 'Carole Lorimer' | wikisql |
CREATE TABLE table_name_62 (
circuit VARCHAR,
winning_driver VARCHAR,
name VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What circuit did emilio de villota win on at the pace petroleum trophy?
| SELECT circuit FROM table_name_62 WHERE winning_driver = "emilio de villota" AND name = "pace petroleum trophy" | sql_create_context |
CREATE TABLE table_name_67 (
make_and_model VARCHAR,
quantity VARCHAR,
bicycle_capacity† VARCHAR,
fuel_propulsion VARCHAR,
floor_type VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What make and model of the diesel vehicle with a high floor type,... | SELECT make_and_model FROM table_name_67 WHERE fuel_propulsion = "diesel" AND floor_type = "high" AND bicycle_capacity† < 3 AND quantity = 4 | sql_create_context |
CREATE TABLE player_college (
player_id text,
college_id text,
year number
)
CREATE TABLE fielding (
player_id text,
year number,
stint number,
team_id text,
league_id text,
pos text,
g number,
gs number,
inn_outs number,
po number,
a number,
e number,
dp... | SELECT SUM(T1.attendance) FROM home_game AS T1 JOIN team AS T2 ON T1.team_id = T2.team_id_br WHERE T2.name = 'Boston Red Stockings' AND T1.year BETWEEN 2000 AND 2010 | spider |
CREATE TABLE table_65769 (
"Year" real,
"Competition" text,
"Venue" text,
"Position" text,
"Event" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- what is the venue when the year is 2006, the competition is asian games and the event is 400 m?
| SELECT "Venue" FROM table_65769 WHERE "Year" = '2006' AND "Competition" = 'asian games' AND "Event" = '400 m' | wikisql |
CREATE TABLE authorship (
authid VARCHAR,
paperid VARCHAR
)
CREATE TABLE authors (
authid VARCHAR,
fname VARCHAR,
lname VARCHAR
)
CREATE TABLE papers (
title VARCHAR,
paperid VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Find the paper... | SELECT t3.title FROM authors AS t1 JOIN authorship AS t2 ON t1.authid = t2.authid JOIN papers AS t3 ON t2.paperid = t3.paperid WHERE t1.fname = "Olin" AND t1.lname = "Shivers" | sql_create_context |
CREATE TABLE table_57868 (
"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 date did an Away team score 14.16 (100)?
| SELECT "Date" FROM table_57868 WHERE "Away team score" = '14.16 (100)' | wikisql |
CREATE TABLE table_7781 (
"Year" real,
"Tournament" text,
"Surface" text,
"Round" text,
"Winner" text,
"Score" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the lowest Year, when Tournament is 'Beijing'?
| SELECT MIN("Year") FROM table_7781 WHERE "Tournament" = 'beijing' | wikisql |
CREATE TABLE table_name_67 (
trainer VARCHAR,
winner VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Who was the trainer when Crowd Pleaser won?
| SELECT trainer FROM table_name_67 WHERE winner = "crowd pleaser" | sql_create_context |
CREATE TABLE table_79226 (
"Rank" real,
"Rider" text,
"Team" text,
"Speed" text,
"Time" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- How many ranks have michael russell as the rider?
| SELECT SUM("Rank") FROM table_79226 WHERE "Rider" = 'michael russell' | wikisql |
CREATE TABLE university (
School_ID int,
School text,
Location text,
Founded real,
Affiliation text,
Enrollment real,
Nickname text,
Primary_conference text
)
CREATE TABLE basketball_match (
Team_ID int,
School_ID int,
Team_Name text,
ACC_Regular_Season text,
ACC_Per... | SELECT Team_ID, ACC_Percent FROM basketball_match GROUP BY ACC_Road | nvbench |
CREATE TABLE table_45847 (
"Game" real,
"Date" text,
"Opponent" text,
"Score" text,
"Location" text,
"Record" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which team has a record of 7-1?
| SELECT "Opponent" FROM table_45847 WHERE "Record" = '7-1' | wikisql |
CREATE TABLE PostNoticeTypes (
Id number,
ClassId number,
Name text,
Body text,
IsHidden boolean,
Predefined boolean,
PostNoticeDurationId number
)
CREATE TABLE ReviewRejectionReasons (
Id number,
Name text,
Description text,
PostTypeId number
)
CREATE TABLE Badges (
Id... | SELECT P.Id AS "post_link", P.AnswerCount, P.Tags FROM Posts AS P, PostTags AS Pt, Tags AS T WHERE P.Id = Pt.PostId AND T.Id = Pt.TagId AND T.TagName = '##tag1##' AND P.PostTypeId = 1 AND (SELECT COUNT(Pt.TagId) FROM PostTags AS Pt WHERE Pt.PostId = P.Id) = 1 | sede |
CREATE TABLE table_60252 (
"Name" text,
"Volume" text,
"Engine" text,
"Fuel" text,
"Output" text,
"Torque" text,
"Engine ID code(s)" text,
"0\u2013100km/h,s" real,
"Top speed" text,
"Years" text
)
-- Using valid SQLite, answer the following questions for the tables provided abo... | SELECT "Output" FROM table_60252 WHERE "Fuel" = 'petrol' AND "Engine ID code(s)" = 'aex/apq' | wikisql |
CREATE TABLE table_name_61 (
opponent VARCHAR,
zone VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Who was the Europe/Africa group i's opponent?
| SELECT opponent FROM table_name_61 WHERE zone = "europe/africa group i" | sql_create_context |
CREATE TABLE table_60308 (
"Shooter" text,
"Event" text,
"Rank points" text,
"Score points" text,
"Total" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Name Event of wc milan and a Total of 23?
| SELECT "Score points" FROM table_60308 WHERE "Event" = 'wc milan' AND "Total" = '23' | wikisql |
CREATE TABLE table_27634 (
"Locale" text,
"Skip" text,
"W" real,
"L" real,
"PF" real,
"PA" real,
"Ends Won" real,
"Ends Lost" real,
"Blank Ends" real,
"Stolen Ends" real,
"Shot Pct." real
)
-- Using valid SQLite, answer the following questions for the tables provided above.... | SELECT "Locale" FROM table_27634 WHERE "Stolen Ends" = '15' | wikisql |
CREATE TABLE diagnoses (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE demographic (
subject_id text,
hadm_id text,
name text,
marital_status text,
age text,
dob text,
gender text,
language text,
religion text,
... | SELECT prescriptions.drug_type, prescriptions.drug FROM prescriptions WHERE prescriptions.formulary_drug_cd = "HYDZ20I" | 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 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 = '0655890' AND t_kc24.CLINIC_SLT_DATE BETWEEN '2013-01-21' AND '2020-01-10' | css |
CREATE TABLE table_name_23 (
operating_income_ INTEGER,
_percentage_change_on_year VARCHAR,
value__$m_ VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the highest operating income that change by 2% and is less than $1,036m?
| SELECT MAX(operating_income_) AS $m_ FROM table_name_23 WHERE _percentage_change_on_year = "2" AND value__$m_ < 1 OFFSET 036 | sql_create_context |
CREATE TABLE table_24523 (
"No." real,
"Date" text,
"Tournament" text,
"Winning score" text,
"To par" text,
"Margin of victory" text,
"Runner(s)-up" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- How many tournaments were at sime darby lpga ... | SELECT COUNT("No.") FROM table_24523 WHERE "Tournament" = 'Sime Darby LPGA Malaysia' | wikisql |
CREATE TABLE shop (
Shop_ID int,
Shop_Name text,
Location text,
Open_Date text,
Open_Year int
)
CREATE TABLE device (
Device_ID int,
Device text,
Carrier text,
Package_Version text,
Applications text,
Software_Platform text
)
CREATE TABLE stock (
Shop_ID int,
Device... | SELECT Shop_Name, COUNT(Shop_Name) FROM stock AS T1 JOIN device AS T2 ON T1.Device_ID = T2.Device_ID JOIN shop AS T3 ON T1.Shop_ID = T3.Shop_ID GROUP BY Shop_Name ORDER BY COUNT(Shop_Name) DESC | nvbench |
CREATE TABLE table_11727969_1 (
species_in_the_peruvian_amazon INTEGER,
species_in_peru VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- what's the minimum species in the peruvian amazon with species in peru of 1000
| SELECT MIN(species_in_the_peruvian_amazon) FROM table_11727969_1 WHERE species_in_peru = 1000 | sql_create_context |
CREATE TABLE table_name_46 (
rank VARCHAR,
name VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What was the rank of Svetlana Fedorenko?
| SELECT rank FROM table_name_46 WHERE name = "svetlana fedorenko" | sql_create_context |
CREATE TABLE table_1341897_6 (
first_elected VARCHAR,
district VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- When was Dale Alford first elected in the Arkansas 5 district?
| SELECT first_elected FROM table_1341897_6 WHERE district = "Arkansas 5" | sql_create_context |
CREATE TABLE table_name_76 (
date VARCHAR,
opponent VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- On what Date was Wales the Opponent?
| SELECT date FROM table_name_76 WHERE opponent = "wales" | sql_create_context |
CREATE TABLE table_name_80 (
points INTEGER,
position VARCHAR,
played VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which Points is the highest one that has a Position of 5, and a Played smaller than 18?
| SELECT MAX(points) FROM table_name_80 WHERE position = 5 AND played < 18 | sql_create_context |
CREATE TABLE table_203_506 (
id number,
"opponent" text,
"played" number,
"won" number,
"lost" number,
"drawn" number,
"% won overall" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- of the teams with 100 % wins , which team played the most g... | SELECT "opponent" FROM table_203_506 WHERE "% won overall" = 100 ORDER BY "played" DESC LIMIT 1 | squall |
CREATE TABLE table_9982 (
"Tournament" 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 2008 when 2007 is a, 2011 is a, 2010 is a and tournament is china?
| SELECT "2008" FROM table_9982 WHERE "2007" = 'a' AND "2011" = 'a' AND "2010" = 'a' AND "Tournament" = 'china' | wikisql |
CREATE TABLE table_name_26 (
character VARCHAR,
category VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What character won the best dramatic performance award?
| SELECT character FROM table_name_26 WHERE category = "best dramatic performance" | sql_create_context |
CREATE TABLE Manufacturers (
Code INTEGER,
Name VARCHAR(255),
Headquarter VARCHAR(255),
Founder VARCHAR(255),
Revenue REAL
)
CREATE TABLE Products (
Code INTEGER,
Name VARCHAR(255),
Price DECIMAL,
Manufacturer INTEGER
)
-- Using valid SQLite, answer the following questions for the... | SELECT T1.Code, T1.Manufacturer FROM Products AS T1 JOIN Manufacturers AS T2 ON T1.Manufacturer = T2.Code GROUP BY Name | 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 jybgb (
BBCJBW text,
BBDM tex... | SELECT jyjgzbb.BGDH FROM jyjgzbb WHERE jyjgzbb.JYZBLSH = '38194766838' | css |
CREATE TABLE table_2679061_4 (
position VARCHAR,
college_junior_club_team VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What position is the player from the Regina Pats (WHL)?
| SELECT position FROM table_2679061_4 WHERE college_junior_club_team = "Regina Pats (WHL)" | sql_create_context |
CREATE TABLE table_36097 (
"Tournament" text,
"1998" text,
"1999" text,
"2001" text,
"2002" text,
"2003" text,
"2004" text,
"2005" text,
"2006" text,
"2007" text,
"2008" text,
"2009" text,
"2010" text,
"2011" text,
"2012" text,
"Career SR" text,
"Caree... | SELECT "2003" FROM table_36097 WHERE "2012" = '1–4' | wikisql |
CREATE TABLE table_9178 (
"Tie no" text,
"Home team" text,
"Score" text,
"Away team" text,
"Date" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Name the Home team of tranmere rovers?
| SELECT "Date" FROM table_9178 WHERE "Home team" = 'tranmere rovers' | wikisql |
CREATE TABLE table_11545282_18 (
player VARCHAR,
years_for_jazz VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which player played for years 2000-02
| SELECT player FROM table_11545282_18 WHERE years_for_jazz = "2000-02" | sql_create_context |
CREATE TABLE table_69032 (
"Riding" text,
"Candidate's Name" text,
"Gender" text,
"Residence" text,
"Occupation" text,
"Votes" real,
"Rank" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What Occupation has the Rank of 5th and has a Candidat... | SELECT "Occupation" FROM table_69032 WHERE "Rank" = '5th' AND "Candidate's Name" = 'henry zekveld' | wikisql |
CREATE TABLE table_68313 (
"Year" real,
"Class" text,
"Tyres" text,
"Team" text,
"Co-Drivers" text,
"Laps" real,
"Pos." text,
"Class Pos." text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Name the average year with Laps of 6
| SELECT AVG("Year") FROM table_68313 WHERE "Laps" = '6' | wikisql |
CREATE TABLE table_name_40 (
res VARCHAR,
event VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which Res has an Event of UFC 122?
| SELECT res FROM table_name_40 WHERE event = "ufc 122" | sql_create_context |
CREATE TABLE table_train_142 (
"id" int,
"allergy_to_monoclonal_antibodies" bool,
"allergic_reactions" bool,
"allergy_to_methylprednisolone" bool,
"mini_mental_state_examination_mmse" int,
"depressed_mood" bool,
"urea_cycle_disorder" bool,
"clinical_contraindication_use_valproate" bool,
... | SELECT * FROM table_train_142 WHERE mild_cognitive_impairment_mci = 1 OR (clinical_dementia_rating_cdr = 0.5 AND nyu_delayed_paragraph_recall < 9 AND ham_d_item_17 < 13 AND (ham_d_item_1 = 1 OR depressed_mood = 1)) | criteria2sql |
CREATE TABLE table_name_62 (
played VARCHAR,
points_against VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is Played, when Points Against is '374'?
| SELECT played FROM table_name_62 WHERE points_against = "374" | sql_create_context |
CREATE TABLE table_14658 (
"Year" text,
"Start" text,
"Qual" text,
"Rank" text,
"Finish" text,
"Laps" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- When completing 182 laps, what was the qual.?
| SELECT "Qual" FROM table_14658 WHERE "Laps" = '182' | wikisql |
CREATE TABLE table_29323 (
"Team" text,
"Outgoing head coach" text,
"Manner of departure" text,
"Date of vacancy" text,
"Position in table" text,
"Incoming head coach" text,
"Date of appointment" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-... | SELECT "Date of appointment" FROM table_29323 WHERE "Team" = 'União de Leiria' | wikisql |
CREATE TABLE table_203_701 (
id number,
"#" number,
"title" text,
"featured guest(s)" text,
"producer(s)" text,
"length" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- what track came after our time ?
| SELECT "title" FROM table_203_701 WHERE "#" = (SELECT "#" FROM table_203_701 WHERE "title" = '"our time"') + 1 | squall |
CREATE TABLE treatment (
treatmentid number,
patientunitstayid number,
treatmentname text,
treatmenttime time
)
CREATE TABLE cost (
costid number,
uniquepid text,
patienthealthsystemstayid number,
eventtype text,
eventid number,
chargetime time,
cost number
)
CREATE TABLE d... | SELECT vitalperiodic.sao2 FROM vitalperiodic WHERE vitalperiodic.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '027-77260') AND NOT patient.unitdischargetime IS NULL ORDER BY... | eicu |
CREATE TABLE table_name_32 (
series VARCHAR,
high_points VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What series had a high points of Prince (23)?
| SELECT series FROM table_name_32 WHERE high_points = "prince (23)" | sql_create_context |
CREATE TABLE table_name_59 (
pick INTEGER,
player VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the average pick for clarence mason?
| SELECT AVG(pick) FROM table_name_59 WHERE player = "clarence mason" | sql_create_context |
CREATE TABLE table_name_33 (
to_par VARCHAR,
player VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is Scott Hoch's to par?
| SELECT to_par FROM table_name_33 WHERE player = "scott hoch" | sql_create_context |
CREATE TABLE cinema (
cinema_id number,
name text,
openning_year number,
capacity number,
location text
)
CREATE TABLE schedule (
cinema_id number,
film_id number,
date text,
show_times_per_day number,
price number
)
CREATE TABLE film (
film_id number,
rank_in_series nu... | SELECT name, openning_year, capacity FROM cinema | spider |
CREATE TABLE hz_info (
KH text,
KLX number,
RYBH text,
YLJGDM text
)
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,... | SELECT jyjgzbb.YQBH, jyjgzbb.YQMC FROM person_info JOIN hz_info JOIN mzjzjlb JOIN jybgb JOIN jyjgzbb ON person_info.RYBH = hz_info.RYBH AND hz_info.YLJGDM = mzjzjlb.YLJGDM AND hz_info.KH = mzjzjlb.KH AND hz_info.KLX = mzjzjlb.KLX AND mzjzjlb.YLJGDM = jybgb.YLJGDM_MZJZJLB AND mzjzjlb.JZLSH = jybgb.JZLSH_MZJZJLB AND jybg... | css |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.