instruction stringlengths 151 7.46k | output stringlengths 2 4.44k | source stringclasses 26
values |
|---|---|---|
CREATE TABLE table_name_99 (
year VARCHAR,
bb_ VARCHAR,
hbp VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- The year that has a BB + HBP of 51 is listed as?
| SELECT year FROM table_name_99 WHERE bb_ + hbp = 51 | sql_create_context |
CREATE TABLE table_16193 (
"Team" text,
"Outgoing manager" text,
"Manner of departure" text,
"Date of vacancy" text,
"Replaced by" text,
"Date of appointment" text,
"Position in table" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Who repla... | SELECT "Replaced by" FROM table_16193 WHERE "Position in table" = 'Pre-season' | wikisql |
CREATE TABLE table_52096 (
"Round" real,
"Pick" real,
"Name" text,
"Position" text,
"School" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the average round for Georgia Tech with a pick greater than 103?
| SELECT AVG("Round") FROM table_52096 WHERE "School" = 'georgia tech' AND "Pick" > '103' | wikisql |
CREATE TABLE table_name_21 (
total INTEGER,
event VARCHAR,
gold VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the Total with the Event 2004 Athens and Gold less than 20?
| SELECT SUM(total) FROM table_name_21 WHERE event = "2004 athens" AND gold < 20 | sql_create_context |
CREATE TABLE table_60145 (
"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 county won in 1991?
| SELECT "Country" FROM table_60145 WHERE "Year(s) won" = '1991' | wikisql |
CREATE TABLE table_name_43 (
school VARCHAR,
position VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the School of the quarterback?
| SELECT school FROM table_name_43 WHERE position = "quarterback" | sql_create_context |
CREATE TABLE cost (
costid number,
uniquepid text,
patienthealthsystemstayid number,
eventtype text,
eventid number,
chargetime time,
cost number
)
CREATE TABLE microlab (
microlabid number,
patientunitstayid number,
culturesite text,
organism text,
culturetakentime time... | SELECT patient.admissionweight FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '030-3372' AND NOT patient.hospitaldischargetime IS NULL ORDER BY patient.hospitaladmittime LIMIT 1) AND NOT patient.admissionweight IS NULL ORDER BY pa... | eicu |
CREATE TABLE table_204_812 (
id number,
"#" number,
"prime minister" text,
"date of birth" text,
"start date\nof (first) term" text,
"age at beginning\nof (first) term" text,
"end date\nof (final) term" text,
"total time in\noffice" text,
"date of death" text,
"lifespan" text
)
... | SELECT (SELECT "start date\nof (first) term" FROM table_204_812 WHERE "prime minister" = 'kevin rudd') < (SELECT "start date\nof (first) term" FROM table_204_812 WHERE "prime minister" = 'tony abbott') | squall |
CREATE TABLE table_name_68 (
location VARCHAR,
date VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the location of the tournament on Feb 10?
| SELECT location FROM table_name_68 WHERE date = "feb 10" | sql_create_context |
CREATE TABLE microlab (
microlabid number,
patientunitstayid number,
culturesite text,
organism text,
culturetakentime time
)
CREATE TABLE vitalperiodic (
vitalperiodicid number,
patientunitstayid number,
temperature number,
sao2 number,
heartrate number,
respiration number,... | SELECT SUM(cost.cost) FROM cost WHERE cost.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '006-168146' AND NOT patient.hospitaldischargetime IS NULL ORDER BY patient.hospitaladmittime DESC LIMIT 1) | eicu |
CREATE TABLE table_69762 (
"Value" real,
"Khmer" real,
"Word Form" text,
"UNGEGN" text,
"ALA-LC" text,
"Other" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What can you say is the word from of sam sep?
| SELECT "Word Form" FROM table_69762 WHERE "Other" = 'sam sep' | wikisql |
CREATE TABLE procedures (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE lab (
subject_id text,
hadm_id text,
itemid text,
charttime text,
flag text,
value_unit text,
label text,
fluid text
)
CREATE TABLE prescription... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE demographic.gender = "F" AND diagnoses.short_title = "Pleural effusion NOS" | mimicsql_data |
CREATE TABLE table_19753079_8 (
incumbent VARCHAR,
first_elected VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What incumbent was first elected in 2009?
| SELECT incumbent FROM table_19753079_8 WHERE first_elected = 2009 | sql_create_context |
CREATE TABLE table_name_86 (
competition VARCHAR,
score VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which competition had a 4-3 score?
| SELECT competition FROM table_name_86 WHERE score = "4-3" | sql_create_context |
CREATE TABLE admissions (
row_id number,
subject_id number,
hadm_id number,
admittime time,
dischtime time,
admission_type text,
admission_location text,
discharge_location text,
insurance text,
language text,
marital_status text,
ethnicity text,
age number
)
CREATE ... | SELECT prescriptions.startdate FROM prescriptions WHERE prescriptions.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 43735) AND DATETIME(prescriptions.startdate) <= DATETIME(CURRENT_TIME(), '-25 month') ORDER BY prescriptions.startdate LIMIT 1 | mimic_iii |
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 MIN(demographic.age) FROM demographic WHERE demographic.admission_type = "EMERGENCY" AND demographic.diagnosis = "PNEUMONIA;HUMAN IMMUNODEFIENCY VIRUS;RULE OUT TUBERCULOSIS" | mimicsql_data |
CREATE TABLE table_name_48 (
notes VARCHAR,
rank VARCHAR,
time VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What are the notes for the rower in ranks over 2 and having a time of 7:00:46?
| SELECT notes FROM table_name_48 WHERE rank > 2 AND time = "7:00:46" | 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 lab (
subject_id text,
hadm_id text,
itemid text,
charttime text,
flag text,
value_unit text,... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE demographic.age < "83" AND diagnoses.short_title = "Pneumococcal pneumonia" | mimicsql_data |
CREATE TABLE table_17693171_1 (
team VARCHAR,
points VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- If the points is 20, what was the team name?
| SELECT team FROM table_17693171_1 WHERE points = "20" | sql_create_context |
CREATE TABLE table_name_75 (
international_freight VARCHAR,
change VARCHAR,
international_mail VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- How much international freight has a change of +0,2% with more than 0 international mail?
| SELECT COUNT(international_freight) FROM table_name_75 WHERE change = "+0,2%" AND international_mail > 0 | sql_create_context |
CREATE TABLE table_56675 (
"Rank" real,
"Nation" text,
"Gold" real,
"Silver" real,
"Bronze" real,
"Total" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- how many times is the nation listed as united states with the total more than 1?
| SELECT COUNT("Silver") FROM table_56675 WHERE "Nation" = 'united states' AND "Total" > '1' | wikisql |
CREATE TABLE table_150340_3 (
rank INTEGER,
country VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the lowest rank for puerto rico?
| SELECT MIN(rank) FROM table_150340_3 WHERE country = "Puerto Rico" | sql_create_context |
CREATE TABLE table_32762 (
"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.
-- Who is the away side when collingwood is at home... | SELECT "Away team" FROM table_32762 WHERE "Home team" = 'collingwood' | wikisql |
CREATE TABLE table_49173 (
"Year" text,
"Winner" text,
"Jockey" text,
"Trainer" text,
"Owner" text,
"Time" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- which winner has a jockery containing jerry bailey and the owner of overbrook farm?
| SELECT "Winner" FROM table_49173 WHERE "Jockey" = 'jerry bailey' AND "Owner" = 'overbrook farm' | wikisql |
CREATE TABLE microlab (
microlabid number,
patientunitstayid number,
culturesite text,
organism text,
culturetakentime time
)
CREATE TABLE diagnosis (
diagnosisid number,
patientunitstayid number,
diagnosisname text,
diagnosistime time,
icd9code text
)
CREATE TABLE cost (
c... | SELECT treatment.treatmenttime FROM treatment WHERE treatment.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '025-56111')) AND treatment.treatmentname = 'glucose - d50' AND DA... | eicu |
CREATE TABLE code_description (
code varchar,
description text
)
CREATE TABLE time_interval (
period text,
begin_time int,
end_time int
)
CREATE TABLE state (
state_code text,
state_name text,
country_name text
)
CREATE TABLE airline (
airline_code varchar,
airline_name 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, flight WHERE CITY_0.city_code = AIRPORT_SERVICE_0.city_code AND CITY_0.city_name = 'TAMPA' AND CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'ST. LOUI... | atis |
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 t_kc21.MED_CLINIC_ID FROM t_kc24 JOIN t_kc21_t_kc24 JOIN t_kc21 ON t_kc21_t_kc24.MED_SAFE_PAY_ID = t_kc24.MED_SAFE_PAY_ID AND t_kc21_t_kc24.MED_CLINIC_ID = t_kc21.MED_CLINIC_ID WHERE t_kc24.PERSON_ID = '34900985' AND t_kc24.CLINIC_SLT_DATE BETWEEN '2002-01-17' AND '2010-03-04' | css |
CREATE TABLE PostHistoryTypes (
Id number,
Name text
)
CREATE TABLE Tags (
Id number,
TagName text,
Count number,
ExcerptPostId number,
WikiPostId number
)
CREATE TABLE PendingFlags (
Id number,
FlagTypeId number,
PostId number,
CreationDate time,
CloseReasonTypeId numb... | SELECT B.Name, B.UserId AS "user_link" FROM Badges AS B WHERE Class = 1 AND TagBased = 1 AND Id = (SELECT MIN(B2.Id) FROM Badges AS B2 WHERE B2.Name = B.Name AND B2.Class = 1 AND B2.TagBased = 1) GROUP BY B.Name, B.UserId ORDER BY B.Name | sede |
CREATE TABLE table_53638 (
"City" text,
"1970" real,
"1980" real,
"1990" real,
"2000" real,
"2010 est." real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Of 2000 growth less than 32,093 and 1980 growth over 64,975, what is the 1970 total number?
| SELECT COUNT("1970") FROM table_53638 WHERE "2000" < '32,093' AND "1980" > '64,975' | wikisql |
CREATE TABLE zyjzjlb (
CYBQDM text,
CYBQMC text,
CYCWH text,
CYKSDM text,
CYKSMC text,
CYSJ time,
CYZTDM number,
HZXM text,
JZKSDM text,
JZKSMC text,
JZLSH text,
KH text,
KLX number,
MZBMLX number,
MZJZLSH text,
MZZDBM text,
MZZDMC text,
MZZYZDZZBM... | SELECT jyjgzbb.JCZBJGDL, jyjgzbb.JCZBJGDW FROM person_info JOIN hz_info JOIN zzmzjzjlb JOIN jybgb JOIN jyjgzbb ON person_info.RYBH = hz_info.RYBH AND hz_info.YLJGDM = zzmzjzjlb.YLJGDM AND hz_info.KH = zzmzjzjlb.KH AND hz_info.KLX = zzmzjzjlb.KLX AND zzmzjzjlb.YLJGDM = jybgb.YLJGDM_MZJZJLB AND zzmzjzjlb.JZLSH = jybgb.JZ... | 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 procedures_icd (
row_id number,
subject_id number,
hadm_id number,
icd9_code text,
charttime t... | SELECT SUM(outputevents.value) 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 = 64538)) AND outputevents.itemid IN (SELECT d_items.itemid FROM d_items WHERE d_items.label = 'jp ... | mimic_iii |
CREATE TABLE table_name_88 (
silver INTEGER,
rank INTEGER
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the highest number of silvers for ranks over 7?
| SELECT MAX(silver) FROM table_name_88 WHERE rank > 7 | sql_create_context |
CREATE TABLE Documents_with_Expenses (
Document_ID INTEGER,
Budget_Type_Code CHAR(15),
Document_Details VARCHAR(255)
)
CREATE TABLE Ref_Document_Types (
Document_Type_Code CHAR(15),
Document_Type_Name VARCHAR(255),
Document_Type_Description VARCHAR(255)
)
CREATE TABLE Projects (
Project_ID... | SELECT Document_Type_Description, COUNT(Document_Type_Description) FROM Ref_Document_Types GROUP BY Document_Type_Description | nvbench |
CREATE TABLE table_1140085_2 (
date VARCHAR,
constructor VARCHAR,
location VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- what is the date where the constructor is ferrari and the location is anderstorp?
| SELECT date FROM table_1140085_2 WHERE constructor = "Ferrari" AND location = "Anderstorp" | sql_create_context |
CREATE TABLE exhibition_record (
exhibition_id number,
date text,
attendance number
)
CREATE TABLE artist (
artist_id number,
name text,
country text,
year_join number,
age number
)
CREATE TABLE exhibition (
exhibition_id number,
year number,
theme text,
artist_id numbe... | SELECT name FROM artist EXCEPT SELECT T2.name FROM exhibition AS T1 JOIN artist AS T2 ON T1.artist_id = T2.artist_id WHERE T1.year = 2004 | spider |
CREATE TABLE table_204_874 (
id number,
"year" number,
"winner" text,
"runner-up" text,
"final score" text,
"third" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- which team has the most championship wins ?
| SELECT "winner" FROM table_204_874 GROUP BY "winner" ORDER BY COUNT(*) DESC LIMIT 1 | squall |
CREATE TABLE locations (
LOCATION_ID decimal(4,0),
STREET_ADDRESS varchar(40),
POSTAL_CODE varchar(12),
CITY varchar(30),
STATE_PROVINCE varchar(25),
COUNTRY_ID varchar(2)
)
CREATE TABLE departments (
DEPARTMENT_ID decimal(4,0),
DEPARTMENT_NAME varchar(30),
MANAGER_ID decimal(6,0),
... | SELECT EMAIL, COMMISSION_PCT FROM employees WHERE NOT DEPARTMENT_ID IN (SELECT DEPARTMENT_ID FROM departments WHERE MANAGER_ID BETWEEN 100 AND 200) | nvbench |
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_procedures (
row_id number,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE admissions (
row_id num... | 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 DATETIME(procedures_icd.charttime, 'start of year') = DATETIME(CURRENT_TIME(), 'start of ye... | mimic_iii |
CREATE TABLE table_43976 (
"City" text,
"Korean" text,
"Hanja" text,
"Province" text,
"Population (2010)" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What's Korean for Hanja?
| SELECT "Korean" FROM table_43976 WHERE "Hanja" = '南楊州' | wikisql |
CREATE TABLE table_55987 (
"School's name" text,
"School's namesake" text,
"Year opened" text,
"Principal" text,
"Mascot" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the name of the school whose namesake is John F. Kennedy?
| SELECT "School's name" FROM table_55987 WHERE "School's namesake" = 'john f. kennedy' | wikisql |
CREATE TABLE table_12835 (
"2013" text,
"2012" text,
"2011" text,
"2010" text,
"2009" text,
"2008" text,
"2007" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What 2008 has 2013 for the year 2013?
| SELECT "2008" FROM table_12835 WHERE "2013" = '2013' | wikisql |
CREATE TABLE PostNotices (
Id number,
PostId number,
PostNoticeTypeId number,
CreationDate time,
DeletionDate time,
ExpiryDate time,
Body text,
OwnerUserId number,
DeletionUserId number
)
CREATE TABLE PostFeedback (
Id number,
PostId number,
IsAnonymous boolean,
Vote... | WITH Employee AS (SELECT 1 AS Emp_ID, 'Admin' AS Emp_Name, NULL AS Emp_Manager_ID UNION ALL SELECT 2, 'John', 1 UNION ALL SELECT 3, 'Sam', 2 UNION ALL SELECT 4, 'Mike', 2 UNION ALL SELECT 5, 'Jeff', 4 UNION ALL SELECT 6, 'Ben', 3 UNION ALL SELECT 7, 'Vicky', 5), Subordinates AS (SELECT e.Emp_ID, e.Emp_Name, e.Emp_Manag... | sede |
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 transfers (
row_id number,
subject_id number,
hadm_id number,
icustay_id number,
eventtype tex... | SELECT d_labitems.label FROM d_labitems WHERE d_labitems.itemid IN (SELECT t1.itemid FROM (SELECT labevents.itemid, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM labevents WHERE labevents.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.age BETWEEN 40 AND 49) AND DATETIME(labevents.chartti... | mimic_iii |
CREATE TABLE diagnoses_icd (
row_id number,
subject_id number,
hadm_id number,
icd9_code text,
charttime time
)
CREATE TABLE admissions (
row_id number,
subject_id number,
hadm_id number,
admittime time,
dischtime time,
admission_type text,
admission_location text,
d... | SELECT DISTINCT cost.cost FROM cost WHERE cost.event_type = 'labevents' AND cost.event_id IN (SELECT labevents.row_id FROM labevents WHERE labevents.itemid IN (SELECT d_labitems.itemid FROM d_labitems WHERE d_labitems.label = 'bicarbonate, stool')) | mimic_iii |
CREATE TABLE table_18600760_15 (
latitude VARCHAR,
water__sqmi_ VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- how many latitudes have 0.081 (sqmi) of water?
| SELECT COUNT(latitude) FROM table_18600760_15 WHERE water__sqmi_ = "0.081" | sql_create_context |
CREATE TABLE table_name_90 (
icao VARCHAR,
airport VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is ICAO, when Airport is 'Sibulan Airport'?
| SELECT icao FROM table_name_90 WHERE airport = "sibulan airport" | sql_create_context |
CREATE TABLE paperkeyphrase (
paperid int,
keyphraseid int
)
CREATE TABLE cite (
citingpaperid int,
citedpaperid int
)
CREATE TABLE paperfield (
fieldid int,
paperid int
)
CREATE TABLE paper (
paperid int,
title varchar,
venueid int,
year int,
numciting int,
numcitedby... | SELECT DISTINCT COUNT(cite.citedpaperid) FROM author, cite, writes WHERE author.authorname = 'Michael I. Jordan' AND writes.authorid = author.authorid AND writes.paperid = cite.citingpaperid | scholar |
CREATE TABLE table_name_87 (
position VARCHAR,
pick__number VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What position does pick number 12 play?
| SELECT position FROM table_name_87 WHERE pick__number = 12 | 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 diagnoses (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE demographic (... | SELECT MIN(demographic.age) FROM demographic WHERE demographic.admission_type = "EMERGENCY" AND demographic.days_stay = "1" | mimicsql_data |
CREATE TABLE jybgb (
BBCJBW text,
BBDM text,
BBMC text,
BBZT number,
BGDH text,
BGJGDM text,
BGJGMC text,
BGRGH text,
BGRQ time,
BGRXM text,
BGSJ time,
CJRQ time,
JSBBRQSJ time,
JSBBSJ time,
JYBBH text,
JYJGMC text,
JYJSGH text,
JYJSQM text,
JY... | SELECT * 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 hz_info.YLJGDM = '8433751' AND NOT zyjzjlb.CYKSMC LIKE '%角膜%' | css |
CREATE TABLE table_43775 (
"Place" real,
"Competitor" text,
"Downhill" real,
"Slalom" real,
"Average" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Where was the place that the downhill was 71.6 and the average was less than 90.06?
| SELECT SUM("Place") FROM table_43775 WHERE "Average" < '90.06' AND "Downhill" = '71.6' | wikisql |
CREATE TABLE table_train_54 (
"id" int,
"organ_transplantation" bool,
"severe_sepsis" bool,
"systolic_blood_pressure_sbp" int,
"hiv_infection" bool,
"thrombocytopenia" float,
"sepsis" bool,
"hypotension" bool,
"burn_injury" int,
"septic_shock" bool,
"age" float,
"NOUSE" f... | SELECT * FROM table_train_54 WHERE organ_transplantation = 1 | criteria2sql |
CREATE TABLE table_204_445 (
id number,
"year" number,
"competition" text,
"venue" text,
"position" text,
"notes" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- what peter widen 's is the highest finish in all indoor championships ?
| SELECT MIN("position") FROM table_204_445 | squall |
CREATE TABLE table_58027 (
"Year" real,
"Tournament" text,
"Venue" text,
"Result" text,
"Extra" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What tournament since 1973 has a result of 1st?
| SELECT "Tournament" FROM table_58027 WHERE "Result" = '1st' AND "Year" > '1973' | 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 diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE demographic.gender = "F" AND diagnoses.long_title = "Constipation, unspecified" | mimicsql_data |
CREATE TABLE table_45937 (
"Rank" text,
"Nation" text,
"Gold" real,
"Silver" real,
"Bronze" real,
"Total" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the average Total, when Nation is Soviet Union, and when Gold is greater than 9?
| SELECT AVG("Total") FROM table_45937 WHERE "Nation" = 'soviet union' AND "Gold" > '9' | wikisql |
CREATE TABLE table_name_81 (
rank INTEGER,
name VARCHAR,
points VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What was the rank for karen frohner with under 1266 points?
| SELECT AVG(rank) FROM table_name_81 WHERE name = "karen frohner" AND points < 1266 | sql_create_context |
CREATE TABLE table_name_14 (
administrative_panel INTEGER,
cultural_and_educational_panel VARCHAR,
industrial_and_commercial_panel VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the highest administrative panel with a cultural and educational pan... | SELECT MAX(administrative_panel) FROM table_name_14 WHERE cultural_and_educational_panel = 2 AND industrial_and_commercial_panel > 4 | sql_create_context |
CREATE TABLE table_31297 (
"Round" real,
"Country" text,
"Circuit" text,
"Date" text,
"Pole Position" text,
"Fastest Lap" text,
"Winning Rider" text,
"Winning Team" text,
"Report" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- what i... | SELECT "Round" FROM table_31297 WHERE "Fastest Lap" = 'Fabien Foret' AND "Pole Position" = 'David Salom' | wikisql |
CREATE TABLE table_18749 (
"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's... | SELECT "Game" FROM table_18749 WHERE "Record" = '29–3' | wikisql |
CREATE TABLE area (
course_id int,
area varchar
)
CREATE TABLE course_prerequisite (
pre_course_id int,
course_id int
)
CREATE TABLE semester (
semester_id int,
semester varchar,
year int
)
CREATE TABLE ta (
campus_job_id int,
student_id int,
location varchar
)
CREATE TABLE p... | SELECT COUNT(*) > 0 FROM course, course_offering, semester WHERE course.course_id = course_offering.course_id AND course.department = 'BUDDHST' AND course.number = 501 AND semester.semester = 'FA' AND semester.semester_id = course_offering.semester AND semester.year = 2016 | advising |
CREATE TABLE table_19925114_1 (
us_viewers__millions_ VARCHAR,
no_in_season VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- How many millions of people in the US watched the episode with season number 8?
| SELECT us_viewers__millions_ FROM table_19925114_1 WHERE no_in_season = 8 | sql_create_context |
CREATE TABLE course_offering (
offering_id int,
course_id int,
semester int,
section_number int,
start_time time,
end_time time,
monday varchar,
tuesday varchar,
wednesday varchar,
thursday varchar,
friday varchar,
saturday varchar,
sunday varchar,
has_final_proje... | SELECT DISTINCT course.department, course.name, course.number, program_course.category FROM course, course_offering, program_course, semester WHERE course.course_id = course_offering.course_id AND program_course.category IN ('PreMajor', 'MDE') AND program_course.course_id = course.course_id AND semester.semester = 'Win... | advising |
CREATE TABLE table_15681686_4 (
rank__timeslot_ VARCHAR,
rank__week_ VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- what is the total rank where the rank is 58?
| SELECT COUNT(rank__timeslot_) FROM table_15681686_4 WHERE rank__week_ = "58" | sql_create_context |
CREATE TABLE table_66594 (
"Round" real,
"Date" text,
"Home" text,
"Result" text,
"Visitor" text,
"Venue" text,
"Attendance" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- How much Attendance has a Result of 2 4, and a Visitor of bryn s if?
| SELECT SUM("Attendance") FROM table_66594 WHERE "Result" = '2–4' AND "Visitor" = 'brynäs if' | wikisql |
CREATE TABLE table_39232 (
"Nation" text,
"T Score" real,
"A Score" real,
"E Score" real,
"Total" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the average total score of Belarus, which had an E score less than 8.2?
| SELECT AVG("Total") FROM table_39232 WHERE "Nation" = 'belarus' AND "E Score" < '8.2' | wikisql |
CREATE TABLE table_55765 (
"Years" text,
"Displacement" text,
"Engine" text,
"Power" text,
"Torque" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What Torque has an AMC Power Tech I6 Engine?
| SELECT "Torque" FROM table_55765 WHERE "Engine" = 'amc power tech i6' | wikisql |
CREATE TABLE table_18164 (
"District" text,
"Incumbent" text,
"Party" text,
"First elected" real,
"Results" text,
"Candidates" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- When was the incumbent in the Tennessee 4 district first elected?
| SELECT "First elected" FROM table_18164 WHERE "District" = 'Tennessee 4' | wikisql |
CREATE TABLE mzjzjlb (
YLJGDM text,
JZLSH text,
KH text,
KLX number,
MJZH text,
HZXM text,
NLS number,
NLY number,
ZSEBZ number,
JZZTDM number,
JZZTMC text,
JZJSSJ time,
TXBZ number,
ZZBZ number,
WDBZ number,
JZKSBM text,
JZKSMC text,
JZKSRQ time,
... | (SELECT jybgb.BBCJBW 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 = '93103311' AND jybgb.BGRQ BETWEEN '2015-06-29' AND '2017-12-17') U... | css |
CREATE TABLE diagnosis (
diagnosisid number,
patientunitstayid number,
diagnosisname text,
diagnosistime time,
icd9code text
)
CREATE TABLE lab (
labid number,
patientunitstayid number,
labname text,
labresult number,
labresulttime time
)
CREATE TABLE cost (
costid number,
... | SELECT patient.hospitaldischargetime FROM patient WHERE patient.uniquepid = '013-9268' ORDER BY patient.hospitaldischargetime LIMIT 1 | eicu |
CREATE TABLE month (
month_number int,
month_name text
)
CREATE TABLE flight_fare (
flight_id int,
fare_id int
)
CREATE TABLE flight_leg (
flight_id int,
leg_number int,
leg_flight int
)
CREATE TABLE time_zone (
time_zone_code text,
time_zone_name text,
hours_from_gmt int
)
C... | SELECT DISTINCT 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 ((((flight.arrival_time <= 2400 AND flight.arrival_time >= 1800) AND date_day.day_number = 21 AND date_day.month_number = 2 AND date_day.year = 1... | atis |
CREATE TABLE table_23901 (
"Central-Southern Calabrian" text,
"Phonetic Greek" text,
"Italian" text,
"French" text,
"English" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the Italian word for 'orange' in English?
| SELECT "Italian" FROM table_23901 WHERE "English" = 'orange' | wikisql |
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_kc22.SOC_SRT_DIRE_CD, t_kc22.SOC_SRT_DIRE_NM, t_kc22.UNIVALENT FROM t_kc22 WHERE t_kc21_t_kc22.MED_CLINIC_ID IN (SELECT t_kc21.MED_CLINIC_ID FROM t_kc21 WHERE t_kc21.PERSON_NM = '戚霞辉' AND t_kc21.MED_SER_ORG_NO = '0335466') ORDER BY t_kc22.UNIVALENT DESC LIMIT 1 | css |
CREATE TABLE VoteTypes (
Id number,
Name text
)
CREATE TABLE PostsWithDeleted (
Id number,
PostTypeId number,
AcceptedAnswerId number,
ParentId number,
CreationDate time,
DeletionDate time,
Score number,
ViewCount number,
Body text,
OwnerUserId number,
OwnerDisplayNa... | SELECT CloseReasonTypes.Name, Comment, AVG(Reputation) AS AverageReputation FROM (SELECT DISTINCT Users.Id, PostHistory.Comment, Users.Reputation FROM Users INNER JOIN Posts ON Users.Id = Posts.OwnerUserId INNER JOIN PostHistory ON Posts.Id = PostHistory.PostId WHERE PostHistory.PostHistoryTypeId = 10) AS Data INNER JO... | sede |
CREATE TABLE departments (
DEPARTMENT_ID decimal(4,0),
DEPARTMENT_NAME varchar(30),
MANAGER_ID decimal(6,0),
LOCATION_ID decimal(4,0)
)
CREATE TABLE countries (
COUNTRY_ID varchar(2),
COUNTRY_NAME varchar(40),
REGION_ID decimal(10,0)
)
CREATE TABLE locations (
LOCATION_ID decimal(4,0),... | SELECT HIRE_DATE, AVG(EMPLOYEE_ID) FROM employees WHERE NOT DEPARTMENT_ID IN (SELECT DEPARTMENT_ID FROM departments WHERE MANAGER_ID BETWEEN 100 AND 200) ORDER BY AVG(EMPLOYEE_ID) DESC | nvbench |
CREATE TABLE intakeoutput (
intakeoutputid number,
patientunitstayid number,
cellpath text,
celllabel text,
cellvaluenumeric number,
intakeoutputtime time
)
CREATE TABLE microlab (
microlabid number,
patientunitstayid number,
culturesite text,
organism text,
culturetakentime... | SELECT patient.uniquepid FROM patient WHERE patient.patientunitstayid IN (SELECT diagnosis.patientunitstayid FROM diagnosis WHERE diagnosis.diagnosisname = 'transfusion reaction' AND DATETIME(diagnosis.diagnosistime) <= DATETIME(CURRENT_TIME(), '-1 year')) | eicu |
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 prescription... | SELECT demographic.days_stay, prescriptions.route FROM demographic INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE demographic.name = "Gus Marques" | mimicsql_data |
CREATE TABLE table_38915 (
"Date" text,
"Visitor" text,
"Score" text,
"Home" text,
"Record" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What record has march 30 as the date?
| SELECT "Record" FROM table_38915 WHERE "Date" = 'march 30' | wikisql |
CREATE TABLE song (
song_name text,
artist_name text,
country text,
f_id number,
genre_is text,
rating number,
languages text,
releasedate time,
resolution number
)
CREATE TABLE files (
f_id number,
artist_name text,
file_size text,
duration text,
formats text
)
... | SELECT T1.artist_name, COUNT(*) FROM artist AS T1 JOIN song AS T2 ON T1.artist_name = T2.artist_name GROUP BY T2.artist_name ORDER BY COUNT(*) DESC LIMIT 3 | spider |
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.JCZBJGDL, jyjgzbb.JCZBJGDW FROM person_info JOIN hz_info JOIN mzjzjlb JOIN jybgb JOIN jyjgzbb JOIN mzjzjlb_jybgb 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 = mzjzjlb_jybgb.YLJGDM_MZJZJLB AND mzjzjlb.J... | css |
CREATE TABLE labevents (
row_id number,
subject_id number,
hadm_id number,
itemid number,
charttime time,
valuenum number,
valueuom text
)
CREATE TABLE chartevents (
row_id number,
subject_id number,
hadm_id number,
icustay_id number,
itemid number,
charttime time,
... | 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 = 'neonatal hypoglyce... | mimic_iii |
CREATE TABLE table_name_47 (
record VARCHAR,
game VARCHAR,
result VARCHAR,
streak VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which Record has a Result of win, and a Streak of won 1, and a Game of 47?
| SELECT record FROM table_name_47 WHERE result = "win" AND streak = "won 1" AND game = 47 | sql_create_context |
CREATE TABLE table_name_64 (
displacement VARCHAR,
model VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the displacement for the petrol engines model?
| SELECT displacement FROM table_name_64 WHERE model = "petrol engines" | sql_create_context |
CREATE TABLE table_76477 (
"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 is the Player in Round 5?
| SELECT "Player" FROM table_76477 WHERE "Round" = '5' | 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 diagnoses_icd (
row_id number,
subject_id number,
hadm_id number,
icd9_code text,
charttime time
)
CREATE TABLE microbiolo... | SELECT MAX(inputevents_cv.amount) 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 = 25493)) AND inputevents_cv.itemid IN (SELECT d_items.itemid FROM d_items WHERE d_items.lab... | mimic_iii |
CREATE TABLE procedures (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE lab (
subject_id text,
hadm_id text,
itemid text,
charttime text,
flag text,
value_unit text,
label text,
fluid text
)
CREATE TABLE demographic ... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE diagnoses.long_title = "Unspecified congenital anomaly of heart" AND lab."CATEGORY" = "Blood Gas" | 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 T1.Name, T2.Revenue FROM Products AS T1 JOIN Manufacturers AS T2 ON T1.Manufacturer = T2.Code GROUP BY T1.Name, T1.Name ORDER BY T1.Name DESC | nvbench |
CREATE TABLE table_5925 (
"Games" real,
"Drawn" real,
"Lost" real,
"Points difference" text,
"Points" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Name the most points with lost of 2 and games more than 7
| SELECT MAX("Points") FROM table_5925 WHERE "Lost" = '2' AND "Games" > '7' | wikisql |
CREATE TABLE table_204_64 (
id number,
"place" text,
"code" number,
"area (km2)" number,
"population" number,
"most spoken language" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- how many people live in beatrix mine ?
| SELECT "population" FROM table_204_64 WHERE "place" = 'beatrix mine' | squall |
CREATE TABLE table_56246 (
"Locomotive" text,
"Name" text,
"Serial No" text,
"Entered service" text,
"Owner" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the locomotive for the city of Benalla?
| SELECT "Locomotive" FROM table_56246 WHERE "Name" = 'city of benalla' | wikisql |
CREATE TABLE table_23647668_2 (
third_place VARCHAR,
season VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Who was in third place in the 1980 season?
| SELECT third_place FROM table_23647668_2 WHERE season = 1980 | sql_create_context |
CREATE TABLE microlab (
microlabid number,
patientunitstayid number,
culturesite text,
organism text,
culturetakentime time
)
CREATE TABLE vitalperiodic (
vitalperiodicid number,
patientunitstayid number,
temperature number,
sao2 number,
heartrate number,
respiration number,... | SELECT t2.drugname FROM (SELECT patient.uniquepid, diagnosis.diagnosistime FROM diagnosis JOIN patient ON diagnosis.patientunitstayid = patient.patientunitstayid WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '006-216719') AND diagnosis.diagno... | eicu |
CREATE TABLE ReviewTaskResultTypes (
Id number,
Name text,
Description text
)
CREATE TABLE PostFeedback (
Id number,
PostId number,
IsAnonymous boolean,
VoteTypeId number,
CreationDate time
)
CREATE TABLE SuggestedEditVotes (
Id number,
SuggestedEditId number,
UserId number... | SELECT max_cnt_one_day, COUNT(*) FROM (SELECT UserId, MAX(ph_count) AS max_cnt_one_day FROM (SELECT b.UserId, DATEDIFF(day, b.Date, CreationDate) AS days, COUNT(DATEDIFF(day, b.Date, CreationDate)) AS ph_count FROM Badges AS b INNER JOIN PostHistory AS ph ON (b.Name IN ('Strunk & White', 'Copy Editor') AND b.UserId = p... | sede |
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 zyjzjlb (
CYBQDM text,
CYBQMC... | SELECT jyjgzbb.JCZBJGDL, jyjgzbb.JCZBJGDW FROM person_info JOIN hz_info JOIN mzjzjlb JOIN jybgb JOIN jyjgzbb JOIN person_info_hz_info ON person_info.RYBH = person_info_hz_info.RYBH AND hz_info.YLJGDM = mzjzjlb.YLJGDM AND hz_info.KH = mzjzjlb.KH AND hz_info.KLX = mzjzjlb.KLX AND mzjzjlb.YLJGDM = jybgb.YLJGDM_MZJZJLB AND... | css |
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 procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.religion = "PROTESTANT QUAKER" AND procedures.short_title = "Cont inv mec ven 96+ hrs" | mimicsql_data |
CREATE TABLE table_204_161 (
id number,
"name" text,
"1968 cf\ndesignator" text,
"place of\nmanufacture" text,
"primary\nrole(s)" text,
"service\nperiod" text,
"#\nused" number
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- did the uk or the us m... | SELECT "place of\nmanufacture" FROM table_204_161 WHERE "place of\nmanufacture" IN ('uk', 'us') GROUP BY "place of\nmanufacture" ORDER BY COUNT(*) DESC LIMIT 1 | squall |
CREATE TABLE table_name_48 (
record VARCHAR,
method VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What record has decision (majority) as the method?
| SELECT record FROM table_name_48 WHERE method = "decision (majority)" | sql_create_context |
CREATE TABLE vehicles (
vehicle_id number,
vehicle_details text
)
CREATE TABLE customers (
customer_id number,
customer_address_id number,
customer_status_code text,
date_became_customer time,
date_of_birth time,
first_name text,
last_name text,
amount_outstanding number,
em... | SELECT T1.state_province_county FROM addresses AS T1 JOIN staff AS T2 ON T1.address_id = T2.staff_address_id GROUP BY T1.state_province_county HAVING COUNT(*) BETWEEN 2 AND 4 | spider |
CREATE TABLE table_58245 (
"Entrant" text,
"Constructor" text,
"Chassis" text,
"Engine" text,
"Tyre" text,
"Driver" text,
"Rounds" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which entrant has Ferrari 038 3.5 v12 engine?
| SELECT "Entrant" FROM table_58245 WHERE "Engine" = 'ferrari 038 3.5 v12' | wikisql |
CREATE TABLE table_16465 (
"No. in season" real,
"No. in series" real,
"Title" text,
"Directed by" text,
"Written by" text,
"Original air date" text,
"U.S. viewers (million)" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- The episode written... | SELECT "Original air date" FROM table_16465 WHERE "Written by" = 'Rebecca Dameron' | wikisql |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.