instruction stringlengths 151 7.46k | output stringlengths 2 4.44k | source stringclasses 26
values |
|---|---|---|
CREATE TABLE table_name_26 (
pick INTEGER,
name VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What Pick number is Rich Burtness?
| SELECT AVG(pick) FROM table_name_26 WHERE name = "rich burtness" | sql_create_context |
CREATE TABLE table_name_75 (
time VARCHAR,
round VARCHAR,
opponent VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What's the time for a round of n/a when the opponent is mikhail ilyukhin?
| SELECT time FROM table_name_75 WHERE round = "n/a" AND opponent = "mikhail ilyukhin" | sql_create_context |
CREATE TABLE diagnoses (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE procedures (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE prescriptions (
subject_id text,
hadm_id... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.ethnicity = "AMERICAN INDIAN/ALASKA NATIVE" AND demographic.dob_year < "2129" | mimicsql_data |
CREATE TABLE table_name_66 (
date VARCHAR,
catalog VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- When was Catalog CHD-9192 published?
| SELECT date FROM table_name_66 WHERE catalog = "chd-9192" | sql_create_context |
CREATE TABLE student (
ID varchar(5),
name varchar(20),
dept_name varchar(20),
tot_cred numeric(3,0)
)
CREATE TABLE prereq (
course_id varchar(8),
prereq_id varchar(8)
)
CREATE TABLE time_slot (
time_slot_id varchar(4),
day varchar(1),
start_hr numeric(2),
start_min numeric(2),... | SELECT dept_name, MIN(salary) FROM instructor GROUP BY dept_name ORDER BY dept_name DESC | nvbench |
CREATE TABLE Subjects (
subject_id INTEGER,
subject_name VARCHAR(120)
)
CREATE TABLE Student_Course_Enrolment (
registration_id INTEGER,
student_id INTEGER,
course_id INTEGER,
date_of_enrolment DATETIME,
date_of_completion DATETIME
)
CREATE TABLE Student_Tests_Taken (
registration_id I... | SELECT family_name, gender_mf FROM Course_Authors_and_Tutors ORDER BY personal_name | 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 demographic (
subject_id text,
hadm_id text,
name text,
marital_status text,
age text,
dob text,
gender text,
... | SELECT diagnoses.short_title, diagnoses.long_title FROM diagnoses WHERE diagnoses.icd9_code = "1918" | mimicsql_data |
CREATE TABLE table_55267 (
"English" text,
"Space Crusade" text,
"Aliens" text,
"Chaos Marines" text,
"Genestealers" text,
"Imperial Fists" text,
"Ultramarines" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Name the space crusade which has ... | SELECT "Space Crusade" FROM table_55267 WHERE "Genestealers" = 'genrøvere (gene robbers)' | wikisql |
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, T1.Code FROM Products AS T1 JOIN Manufacturers AS T2 ON T1.Manufacturer = T2.Code GROUP BY T1.Name ORDER BY T1.Name | nvbench |
CREATE TABLE table_5510 (
"RBIs" real,
"Player" text,
"Team" text,
"Date" text,
"Opponent" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which player is associated with the date July 6, 1949?
| SELECT "Player" FROM table_5510 WHERE "Date" = 'july 6, 1949' | wikisql |
CREATE TABLE jobs (
JOB_ID varchar(10),
JOB_TITLE varchar(35),
MIN_SALARY decimal(6,0),
MAX_SALARY decimal(6,0)
)
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,
JO... | SELECT JOB_ID, SUM(EMPLOYEE_ID) FROM employees WHERE SALARY BETWEEN 8000 AND 12000 AND COMMISSION_PCT <> "null" OR DEPARTMENT_ID <> 40 GROUP BY JOB_ID ORDER BY SUM(EMPLOYEE_ID) | nvbench |
CREATE TABLE table_name_13 (
manufacturer VARCHAR,
grid VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the manufacturer with a 14 grid?
| SELECT manufacturer FROM table_name_13 WHERE grid = "14" | sql_create_context |
CREATE TABLE table_train_173 (
"id" int,
"hiv_infection" bool,
"hemoglobin_a1c_hba1c" float,
"hepatitis_c" bool,
"hepatitis_b" bool,
"cirrhosis" bool,
"renal_disease" bool,
"hepatic_disease" bool,
"allergy_to_egg" bool,
"estimated_glomerular_filtration_rate_egfr" int,
"NOUSE"... | SELECT * FROM table_train_173 WHERE renal_disease = 1 OR estimated_glomerular_filtration_rate_egfr < 30 | criteria2sql |
CREATE TABLE table_58607 (
"Year" real,
"Tournament" text,
"Venue" text,
"Result" text,
"Extra" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What's the latest year that Doha, Qatar hosted a tournament?
| SELECT MAX("Year") FROM table_58607 WHERE "Venue" = 'doha, qatar' | 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 regions (
REGION_ID decimal(5,0),
... | SELECT HIRE_DATE, AVG(DEPARTMENT_ID) FROM employees WHERE HIRE_DATE < '2002-06-21' ORDER BY AVG(DEPARTMENT_ID) | nvbench |
CREATE TABLE jyjgzbb (
BGDH text,
BGRQ time,
CKZFWDX text,
CKZFWSX number,
CKZFWXX number,
JCFF text,
JCRGH text,
JCRXM text,
JCXMMC text,
JCZBDM text,
JCZBJGDL number,
JCZBJGDW text,
JCZBJGDX text,
JCZBMC text,
JLDW text,
JYRQ time,
JYZBLSH text,
... | SELECT * FROM person_info JOIN hz_info JOIN wdmzjzjlb JOIN jybgb JOIN jyjgzbb ON person_info.RYBH = hz_info.RYBH AND hz_info.YLJGDM = wdmzjzjlb.YLJGDM AND hz_info.KH = wdmzjzjlb.KH AND hz_info.KLX = wdmzjzjlb.KLX AND wdmzjzjlb.YLJGDM = jybgb.YLJGDM_MZJZJLB AND wdmzjzjlb.JZLSH = jybgb.JZLSH_MZJZJLB AND jybgb.YLJGDM = jy... | css |
CREATE TABLE icustays (
row_id number,
subject_id number,
hadm_id number,
icustay_id number,
first_careunit text,
last_careunit text,
first_wardid number,
last_wardid number,
intime time,
outtime time
)
CREATE TABLE d_labitems (
row_id number,
itemid number,
label te... | SELECT (SELECT labevents.valuenum FROM labevents WHERE labevents.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 84346 AND NOT admissions.dischtime IS NULL ORDER BY admissions.admittime DESC LIMIT 1) AND labevents.itemid IN (SELECT d_labitems.itemid FROM d_labitems WHERE d_labitems.l... | mimic_iii |
CREATE TABLE table_21626 (
"Series #" real,
"Season #" real,
"Title" text,
"Directed by" text,
"Written by" text,
"Original air date" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- How many titles are given for the episode directed by Joanna Ker... | SELECT COUNT("Title") FROM table_21626 WHERE "Directed by" = 'Joanna Kerns' | wikisql |
CREATE TABLE manufacturer (
Manufacturer_ID int,
Open_Year real,
Name text,
Num_of_Factories int,
Num_of_Shops int
)
CREATE TABLE furniture (
Furniture_ID int,
Name text,
Num_of_Component int,
Market_Rate real
)
CREATE TABLE furniture_manufacte (
Manufacturer_ID int,
Furnit... | SELECT Name, Price_in_Dollar FROM furniture AS t1 JOIN furniture_manufacte AS t2 ON t1.Furniture_ID = t2.Furniture_ID ORDER BY Price_in_Dollar | nvbench |
CREATE TABLE table_42398 (
"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.
-- In the 2012 (85th) Ceremony, what was the Original title of the ... | SELECT "Original title" FROM table_42398 WHERE "Result" = 'not nominated' AND "Year (Ceremony)" = '2012 (85th)' | wikisql |
CREATE TABLE table_name_58 (
badge_serial_number VARCHAR,
date_of_death VARCHAR,
rank VARCHAR,
cause_of_death VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the Badge/Serial Number of the Policeman who died in Gunfire on 1919-02-18?
| SELECT badge_serial_number FROM table_name_58 WHERE rank = "policeman" AND cause_of_death = "gunfire" AND date_of_death = "1919-02-18" | sql_create_context |
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 outputevents (
row_id number,
subject_id number,
hadm_id number,
icustay_id number,
charttime ... | SELECT COUNT(*) > 0 FROM labevents WHERE labevents.itemid IN (SELECT d_labitems.itemid FROM d_labitems WHERE d_labitems.label = 'nucleated rbc') AND labevents.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 23070) AND DATETIME(labevents.charttime) >= DATETIME(CURRENT_TIME(), '-1 year... | mimic_iii |
CREATE TABLE table_25145 (
"Season" text,
"Games" real,
"Won" real,
"Lost" real,
"Tied" real,
"Points" real,
"Winning Pct. %" text,
"Goals for" real,
"Goals against" real,
"Standing" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
--... | SELECT "Winning Pct. %" FROM table_25145 WHERE "Goals for" = '229' | wikisql |
CREATE TABLE table_22904707_1 (
us_viewers__million_ VARCHAR,
no VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- How many million viewers did episode number 63 have?
| SELECT us_viewers__million_ FROM table_22904707_1 WHERE no = 63 | sql_create_context |
CREATE TABLE table_8443 (
"Name" text,
"Country" text,
"Role" text,
"Period" text,
"Teams" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What role has the team of Troyes AC Grenoble Foot?
| SELECT "Role" FROM table_8443 WHERE "Teams" = 'troyes ac grenoble foot' | wikisql |
CREATE TABLE table_35039 (
"Name" text,
"County" text,
"Location" text,
"Built" text,
"Length (ft)" real,
"Spans" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Where was the county of rockingham?
| SELECT "Location" FROM table_35039 WHERE "County" = 'rockingham' | wikisql |
CREATE TABLE table_name_67 (
year_made VARCHAR,
class VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What year was class of undine?
| SELECT year_made FROM table_name_67 WHERE class = "undine" | sql_create_context |
CREATE TABLE table_3850 (
"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 ga... | SELECT "Game" FROM table_3850 WHERE "Date" = 'January 14' | wikisql |
CREATE TABLE patient (
uniquepid text,
patienthealthsystemstayid number,
patientunitstayid number,
gender text,
age text,
ethnicity text,
hospitalid number,
wardid number,
admissionheight number,
admissionweight number,
dischargeweight number,
hospitaladmittime time,
... | SELECT 1 * (STRFTIME('%j', CURRENT_TIME()) - STRFTIME('%j', 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 = '016-27397'... | eicu |
CREATE TABLE table_name_40 (
attendance INTEGER,
date VARCHAR,
week VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the highest attendance for December 14, 1958 for after week 12
| SELECT MAX(attendance) FROM table_name_40 WHERE date = "december 14, 1958" AND week > 12 | sql_create_context |
CREATE TABLE mzjzjlb (
HXPLC number,
HZXM text,
JLSJ time,
JZJSSJ time,
JZKSBM text,
JZKSMC text,
JZKSRQ time,
JZLSH text,
JZZDBM text,
JZZDSM text,
JZZTDM number,
JZZTMC text,
KH text,
KLX number,
MJZH text,
ML number,
MZZYZDZZBM text,
MZZYZDZZMC ... | SELECT zyjzjlb.ZYZDBM, zyjzjlb.ZYZDMC FROM hz_info JOIN zyjzjlb ON hz_info.YLJGDM = zyjzjlb.YLJGDM AND hz_info.KH = zyjzjlb.KH AND hz_info.KLX = zyjzjlb.KLX WHERE hz_info.RYBH = '72383681' | css |
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, T1.Code FROM Products AS T1 JOIN Manufacturers AS T2 ON T1.Manufacturer = T2.Code GROUP BY T1.Name ORDER BY T1.Code DESC | nvbench |
CREATE TABLE airport (
airport_code varchar,
airport_name text,
airport_location text,
state_code varchar,
country_name varchar,
time_zone_code varchar,
minimum_connect_time int
)
CREATE TABLE dual_carrier (
main_airline varchar,
low_flight_number int,
high_flight_number int,
... | SELECT DISTINCT flight.flight_id FROM airport_service AS AIRPORT_SERVICE_0, airport_service AS AIRPORT_SERVICE_1, city AS CITY_0, city AS CITY_1, flight WHERE (CITY_0.city_code = AIRPORT_SERVICE_0.city_code AND CITY_0.city_name = 'BURBANK' AND CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND flight.from_airport = AIR... | atis |
CREATE TABLE table_47559 (
"Malayalam" text,
"\u0d2e\u0d32\u0d2f\u0d3e\u0d33\u0d02" text,
"English" text,
"Kannada" text,
"Tamil" text,
"Hindi" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- WHAT IS THE TAMIL WITH A SUKRAVAR ?
| SELECT "Tamil" FROM table_47559 WHERE "Hindi" = 'sukravar' | wikisql |
CREATE TABLE Claims (
Claim_ID INTEGER,
Policy_ID INTEGER,
Date_Claim_Made DATE,
Date_Claim_Settled DATE,
Amount_Claimed INTEGER,
Amount_Settled INTEGER
)
CREATE TABLE Settlements (
Settlement_ID INTEGER,
Claim_ID INTEGER,
Date_Claim_Made DATE,
Date_Claim_Settled DATE,
Amoun... | SELECT Date_Claim_Settled, COUNT(Date_Claim_Settled) FROM Settlements ORDER BY COUNT(Date_Claim_Settled) | nvbench |
CREATE TABLE ReviewRejectionReasons (
Id number,
Name text,
Description text,
PostTypeId number
)
CREATE TABLE PendingFlags (
Id number,
FlagTypeId number,
PostId number,
CreationDate time,
CloseReasonTypeId number,
CloseAsOffTopicReasonTypeId number,
DuplicateOfQuestionId n... | SELECT Id AS "post_link", Title, ViewCount, Score, AnswerCount FROM Posts WHERE AnswerCount > 50 ORDER BY AnswerCount DESC LIMIT 50 | sede |
CREATE TABLE table_name_96 (
year VARCHAR,
attempts VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- In what year was the number of attempts 888?
| SELECT year FROM table_name_96 WHERE attempts = "888" | sql_create_context |
CREATE TABLE pilot (
Pilot_name VARCHAR,
Rank VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- List the names of pilots in ascending order of rank.
| SELECT Pilot_name FROM pilot ORDER BY Rank | sql_create_context |
CREATE TABLE table_25782 (
"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 w... | SELECT "Record" FROM table_25782 WHERE "High rebounds" = 'David Lee (8)' | wikisql |
CREATE TABLE table_name_36 (
pick INTEGER,
overall VARCHAR,
round VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the average pick with 85 overall in a round lower than 3?
| SELECT AVG(pick) FROM table_name_36 WHERE overall = 85 AND round < 3 | sql_create_context |
CREATE TABLE table_14871601_2 (
scored INTEGER,
points VARCHAR,
team VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the value scored when there were 19 points for the team 3 de Febrero?
| SELECT MAX(scored) FROM table_14871601_2 WHERE points = 19 AND team = "3 de Febrero" | 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 procedures (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE demographic.insurance = "Government" AND diagnoses.long_title = "Other specified perinatal disorders of digestive system" | mimicsql_data |
CREATE TABLE program (
program_id int,
name varchar,
college varchar,
introduction varchar
)
CREATE TABLE student_record (
student_id int,
course_id int,
semester int,
grade varchar,
how varchar,
transfer_source varchar,
earn_credit varchar,
repeat_term varchar,
test... | SELECT DISTINCT course.department, course.name, course.number FROM course INNER JOIN course_offering ON course.course_id = course_offering.course_id INNER JOIN semester ON semester.semester_id = course_offering.semester WHERE course_offering.friday = 'N' AND course.department = 'AAS' AND semester.semester = 'WN' AND se... | advising |
CREATE TABLE table_25929 (
"SF Round" real,
"Country" text,
"Location" text,
"Date" text,
"Driver" text,
"Race 1(pts)" real,
"Race 2(pts)" real,
"Race 3" text,
"Race Total(pts)" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- How many... | SELECT "Race 2(pts)" FROM table_25929 WHERE "Race 1(pts)" = '12' | wikisql |
CREATE TABLE procedures_icd (
row_id number,
subject_id number,
hadm_id number,
icd9_code text,
charttime time
)
CREATE TABLE d_icd_procedures (
row_id number,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE diagnoses_icd (
row_id number,
subject_id number,... | SELECT (SELECT SUM(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 = 27451)) AND STRFTIME('%y-%m-%d', inputevents_cv.charttime) <= '2103-10-06') - (SEL... | mimic_iii |
CREATE TABLE treatment (
treatmentid number,
patientunitstayid number,
treatmentname text,
treatmenttime time
)
CREATE TABLE lab (
labid number,
patientunitstayid number,
labname text,
labresult number,
labresulttime time
)
CREATE TABLE cost (
costid number,
uniquepid text,... | SELECT COUNT(*) > 0 FROM lab WHERE lab.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '007-2065')) AND DATETIME(lab.labresulttime) <= DATETIME(CURRENT_TIME(), '-2 year') | eicu |
CREATE TABLE table_name_78 (
crowd INTEGER,
venue VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What was the crowd size at Junction Oval?
| SELECT MAX(crowd) FROM table_name_78 WHERE venue = "junction oval" | sql_create_context |
CREATE TABLE table_67658 (
"Date" text,
"Round" text,
"Opponent" text,
"Venue" text,
"Result" text,
"Attendance" real,
"Scorers" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which opponent has a Round of r5?
| SELECT "Opponent" FROM table_67658 WHERE "Round" = 'r5' | wikisql |
CREATE TABLE ReviewTaskResults (
Id number,
ReviewTaskId number,
ReviewTaskResultTypeId number,
CreationDate time,
RejectionReasonId number,
Comment text
)
CREATE TABLE FlagTypes (
Id number,
Name text,
Description text
)
CREATE TABLE SuggestedEdits (
Id number,
PostId numb... | SELECT TagName, COUNT(*) AS total FROM Tags GROUP BY TagName ORDER BY total DESC | sede |
CREATE TABLE organisations (
organisation_id number,
organisation_type text,
organisation_details text
)
CREATE TABLE documents (
document_id number,
document_type_code text,
grant_id number,
sent_date time,
response_received_date time,
other_details text
)
CREATE TABLE research_ou... | SELECT T1.response_received_date FROM documents AS T1 JOIN document_types AS T2 ON T1.document_type_code = T2.document_type_code JOIN grants AS T3 ON T1.grant_id = T3.grant_id WHERE T2.document_description = 'Regular' OR T3.grant_amount > 100 | spider |
CREATE TABLE table_name_32 (
evening_gown INTEGER,
average VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the mean evening gown number when the average is 8.686?
| SELECT AVG(evening_gown) FROM table_name_32 WHERE average = 8.686 | sql_create_context |
CREATE TABLE table_63607 (
"Week" real,
"Date" text,
"Opponent" text,
"Result" text,
"Attendance" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the Attendance of the game against Jacksonville Jaguars?
| SELECT "Attendance" FROM table_63607 WHERE "Opponent" = 'jacksonville jaguars' | wikisql |
CREATE TABLE Courses (
course_id VARCHAR,
course_name VARCHAR
)
CREATE TABLE Student_Course_Enrolment (
date_of_enrolment VARCHAR,
course_id VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the date of enrollment of the course named 'Spanish'?... | SELECT T2.date_of_enrolment FROM Courses AS T1 JOIN Student_Course_Enrolment AS T2 ON T1.course_id = T2.course_id WHERE T1.course_name = "Spanish" | sql_create_context |
CREATE TABLE table_14986292_1 (
administrative_division VARCHAR,
population__2010_census_ VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Name the administrative division for 95391
| SELECT administrative_division FROM table_14986292_1 WHERE population__2010_census_ = 95391 | sql_create_context |
CREATE TABLE table_name_63 (
score VARCHAR,
attendance VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Name the score for attendance of 13,617
| SELECT score FROM table_name_63 WHERE attendance = "13,617" | sql_create_context |
CREATE TABLE t_kc24 (
ACCOUNT_DASH_DATE time,
ACCOUNT_DASH_FLG number,
CASH_PAY number,
CIVIL_SUBSIDY number,
CKC102 number,
CLINIC_ID text,
CLINIC_SLT_DATE time,
COMP_ID text,
COM_ACC_PAY number,
COM_PAY number,
DATA_ID text,
ENT_ACC_PAY number,
ENT_PAY number,
F... | SELECT COUNT(*) FROM t_kc22 WHERE t_kc22.t_kc21_PERSON_ID = '86561769' AND t_kc22.STA_DATE BETWEEN '2002-01-19' AND '2019-07-05' AND t_kc22.SOC_SRT_DIRE_NM = '盐酸文拉法辛缓释片' | css |
CREATE TABLE table_2077 (
"Year" real,
"Date" text,
"Driver" text,
"Team" text,
"Manufacturer" text,
"Laps" text,
"Miles (km)" text,
"Race Time" text,
"Average Speed (mph)" text,
"Report" text
)
-- Using valid SQLite, answer the following questions for the tables provided above... | SELECT "Team" FROM table_2077 WHERE "Manufacturer" = 'Toyota' | wikisql |
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 lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.dod_year <= "2133.0" AND lab.itemid = "50976" | mimicsql_data |
CREATE TABLE Faculty_participates_in (
facID VARCHAR
)
CREATE TABLE Faculty (
facID VARCHAR,
fname VARCHAR,
lname VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- How many activities does Mark Giuliano participate in?
| SELECT COUNT(*) FROM Faculty AS T1 JOIN Faculty_participates_in AS T2 ON T1.facID = T2.facID WHERE T1.fname = "Mark" AND T1.lname = "Giuliano" | sql_create_context |
CREATE TABLE table_38490 (
"Gloss" text,
"Cholim" text,
"Lungchang" text,
"Rera" text,
"Tikhak" text,
"Yonguk" text,
"Muklom" text,
"Hakhun" text,
"Halang" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which Muklom has a Halang of w... | SELECT "Muklom" FROM table_38490 WHERE "Halang" = 'wɯ¹cʰi¹' | wikisql |
CREATE TABLE airport (
airport_code varchar,
airport_name text,
airport_location text,
state_code varchar,
country_name varchar,
time_zone_code varchar,
minimum_connect_time int
)
CREATE TABLE compartment_class (
compartment varchar,
class_type varchar
)
CREATE TABLE restriction (
... | SELECT DISTINCT flight.flight_id FROM airport_service, city, flight WHERE (city.city_code = airport_service.city_code AND city.city_name = 'DENVER' AND flight.departure_time < 1200 AND flight.from_airport = airport_service.airport_code) AND flight.airline_code = 'NW' | atis |
CREATE TABLE table_52344 (
"Home team" text,
"Home team score" text,
"Away team" text,
"Away team score" text,
"Venue" text,
"Crowd" real,
"Date" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What was the attendance when Fitzroy played as t... | SELECT COUNT("Crowd") FROM table_52344 WHERE "Away team" = 'fitzroy' | wikisql |
CREATE TABLE table_name_43 (
score VARCHAR,
year VARCHAR,
runner_up VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Name the Score of the Year larger than 2004 and a Runner-up of northeastern?
| SELECT score FROM table_name_43 WHERE year > 2004 AND runner_up = "northeastern" | sql_create_context |
CREATE TABLE table_78459 (
"Name" text,
"Nation" text,
"Points" real,
"Games" real,
"Pts/game" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Can you tell me the lowest Pts/game that has the Games larger than 6?
| SELECT MIN("Pts/game") FROM table_78459 WHERE "Games" > '6' | wikisql |
CREATE TABLE Apartment_Buildings (
building_id INTEGER,
building_short_name CHAR(15),
building_full_name VARCHAR(80),
building_description VARCHAR(255),
building_address VARCHAR(255),
building_manager VARCHAR(50),
building_phone VARCHAR(80)
)
CREATE TABLE Guests (
guest_id INTEGER,
... | SELECT apt_type_code, MIN(room_count) FROM Apartments GROUP BY apt_type_code ORDER BY apt_type_code | nvbench |
CREATE TABLE table_name_99 (
bronze VARCHAR,
gold VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Who won the bronze when jin kanno won the gold?
| SELECT bronze FROM table_name_99 WHERE gold = "jin kanno" | sql_create_context |
CREATE TABLE aircraft (
aircraft_code varchar,
aircraft_description varchar,
manufacturer varchar,
basic_type varchar,
engines int,
propulsion varchar,
wide_body varchar,
wing_span int,
length int,
weight int,
capacity int,
pay_load int,
cruising_speed int,
range_... | SELECT DISTINCT fare.fare_id FROM airport_service AS AIRPORT_SERVICE_0, airport_service AS AIRPORT_SERVICE_1, airport_service AS AIRPORT_SERVICE_2, city AS CITY_0, city AS CITY_1, city AS CITY_2, fare, flight, flight_fare WHERE (((CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'DALLAS' AND CITY_2... | atis |
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 MIN(demographic.age) FROM demographic WHERE demographic.admission_type = "EMERGENCY" AND demographic.diagnosis = "BRADYCARDIA" | mimicsql_data |
CREATE TABLE table_547 (
"Rank (CSA)" text,
"Combined Statistical Area (or Metropolitan Statistical Area if noted)" text,
"State(s)" text,
"2007 Estimate" text,
"2000 Population" text,
"Percent Change (1990\u20132000)" text
)
-- Using valid SQLite, answer the following questions for the tables... | SELECT "Rank (CSA)" FROM table_547 WHERE "Percent Change (1990\u20132000)" = 'A034 +8.71%' | wikisql |
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.gender = "M" AND demographic.admission_type = "ELECTIVE" | mimicsql_data |
CREATE TABLE intakeoutput (
intakeoutputid number,
patientunitstayid number,
cellpath text,
celllabel text,
cellvaluenumeric number,
intakeoutputtime time
)
CREATE TABLE cost (
costid number,
uniquepid text,
patienthealthsystemstayid number,
eventtype text,
eventid number,
... | SELECT t3.drugname FROM (SELECT t2.drugname, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM (SELECT patient.uniquepid, medication.drugstarttime FROM medication JOIN patient ON medication.patientunitstayid = patient.patientunitstayid WHERE medication.drugname = 'magnesium sulfate 50 % (4 meq/ml) inj' AND STRFTIME... | eicu |
CREATE TABLE table_17366952_1 (
team VARCHAR,
goal_average_1 VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which team had goal averages of 1.34?
| SELECT team FROM table_17366952_1 WHERE goal_average_1 = "1.34" | sql_create_context |
CREATE TABLE table_name_40 (
pos VARCHAR,
player VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What position does Brian Butch play?
| SELECT pos FROM table_name_40 WHERE player = "brian butch" | sql_create_context |
CREATE TABLE table_203_683 (
id number,
"season" text,
"league" text,
"gold" text,
"silver" text,
"bronze" text,
"winning manager" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- what number of times did lillestr m win gold ?
| SELECT COUNT(*) FROM table_203_683 WHERE "gold" = 'lillestrøm' | squall |
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 t_kc21.MED_ORG_DEPT_CD, t_kc21.IN_DIAG_DIS_CD, MIN(t_kc24.ILL_PAY / t_kc24.MED_AMOUT) FROM t_kc21 JOIN t_kc24 ON t_kc21.MED_CLINIC_ID = t_kc24.MED_CLINIC_ID WHERE t_kc21.MED_SER_ORG_NO = '9742956' GROUP BY t_kc21.MED_ORG_DEPT_CD, t_kc21.IN_DIAG_DIS_CD | 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 prescriptions (
subject_id text,
hadm_id text,
icustay_id text,
drug_type text,
drug text,
formulary_drug_cd text,
... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.dob_year < "2138" AND procedures.icd9_code = "17" | mimicsql_data |
CREATE TABLE table_name_26 (
away_team VARCHAR,
venue VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the Away team score for mcg?
| SELECT away_team AS score FROM table_name_26 WHERE venue = "mcg" | sql_create_context |
CREATE TABLE table_name_22 (
city VARCHAR,
event VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What city was the Dick Weber Open in?
| SELECT city FROM table_name_22 WHERE event = "dick weber open" | sql_create_context |
CREATE TABLE cost (
costid number,
uniquepid text,
patienthealthsystemstayid number,
eventtype text,
eventid number,
chargetime time,
cost number
)
CREATE TABLE lab (
labid number,
patientunitstayid number,
labname text,
labresult number,
labresulttime time
)
CREATE TAB... | SELECT COUNT(*) FROM intakeoutput WHERE intakeoutput.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '005-87465') AND patient.unitdischargetime IS NULL) AND intakeoutput.cellpa... | eicu |
CREATE TABLE vitalperiodic (
vitalperiodicid number,
patientunitstayid number,
temperature number,
sao2 number,
heartrate number,
respiration number,
systemicsystolic number,
systemicdiastolic number,
systemicmean number,
observationtime time
)
CREATE TABLE allergy (
allergy... | SELECT t3.drugname FROM (SELECT t2.drugname, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM (SELECT patient.uniquepid, diagnosis.diagnosistime FROM diagnosis JOIN patient ON diagnosis.patientunitstayid = patient.patientunitstayid WHERE diagnosis.diagnosisname = 'acute respiratory failure' AND DATETIME(diagnosis.... | eicu |
CREATE TABLE course (
crs_code text,
dept_code text,
crs_description text,
crs_credit number
)
CREATE TABLE student (
stu_num number,
stu_lname text,
stu_fname text,
stu_init text,
stu_dob time,
stu_hrs number,
stu_class text,
stu_gpa number,
stu_transfer number,
... | SELECT T1.stu_lname FROM student AS T1 JOIN enroll AS T2 ON T1.stu_num = T2.stu_num WHERE T2.enroll_grade = 'A' AND T2.class_code = 10018 | spider |
CREATE TABLE table_name_97 (
outcome VARCHAR,
date VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is Outcome, when Date is '19 September 2012'?
| SELECT outcome FROM table_name_97 WHERE date = "19 september 2012" | sql_create_context |
CREATE TABLE table_43433 (
"Year" text,
"Award" text,
"Production" text,
"Role" text,
"Result" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- During what year was Wicked associated with the Green Room Awards?
| SELECT "Year" FROM table_43433 WHERE "Production" = 'wicked' AND "Award" = 'green room awards' | wikisql |
CREATE TABLE table_name_95 (
matches VARCHAR,
result VARCHAR,
year VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What were the matches where the teams finished in the first group stage, in 1998?
| SELECT matches FROM table_name_95 WHERE result = "first group stage" AND year = "1998" | 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 Founder, SUM(Revenue) FROM Products AS T1 JOIN Manufacturers AS T2 ON T1.Manufacturer = T2.Code GROUP BY Founder ORDER BY SUM(Revenue) | nvbench |
CREATE TABLE table_name_45 (
engine_type VARCHAR,
model VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which engine type was used in the model 2.3 v5?
| SELECT engine_type FROM table_name_45 WHERE model = "2.3 v5" | sql_create_context |
CREATE TABLE table_32845 (
"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.
-- On what date was South Melbourne the away team?
| SELECT "Date" FROM table_32845 WHERE "Away team" = 'south melbourne' | wikisql |
CREATE TABLE table_311 (
"Player" text,
"Position" text,
"School" text,
"Hometown" text,
"College" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which player is from Utah?
| SELECT "Player" FROM table_311 WHERE "College" = 'Utah' | wikisql |
CREATE TABLE t_kc21_t_kc22 (
MED_CLINIC_ID text,
MED_EXP_DET_ID number
)
CREATE TABLE t_kc22 (
AMOUNT number,
CHA_ITEM_LEV number,
DATA_ID text,
DIRE_TYPE number,
DOSE_FORM text,
DOSE_UNIT text,
EACH_DOSAGE text,
EXP_OCC_DATE time,
FLX_MED_ORG_ID text,
FXBZ number,
H... | SELECT COUNT(*) FROM t_kc21 WHERE t_kc21.MED_SER_ORG_NO = '2962064' AND t_kc21.IN_HOSP_DATE BETWEEN '2007-04-07' AND '2016-11-18' | css |
CREATE TABLE table_45487 (
"Name" text,
"Gain" real,
"Loss" real,
"Long" real,
"Avg/G" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the long with a loss lower than 133 and more than 0 gain with an avg/G of 29.8?
| SELECT AVG("Long") FROM table_45487 WHERE "Loss" < '133' AND "Gain" > '0' AND "Avg/G" = '29.8' | wikisql |
CREATE TABLE table_40128 (
"Office" text,
"Republican ticket" text,
"Democratic ticket" text,
"Socialist ticket" text,
"Prohibition ticket" text,
"Progressive ticket" text,
"Independence League ticket" text
)
-- Using valid SQLite, answer the following questions for the tables provided abo... | SELECT "Socialist ticket" FROM table_40128 WHERE "Democratic ticket" = 'thomas j. kreuzer' | wikisql |
CREATE TABLE constructorstandings (
constructorstandingsid number,
raceid number,
constructorid number,
points number,
position number,
positiontext text,
wins number
)
CREATE TABLE circuits (
circuitid number,
circuitref text,
name text,
location text,
country text,
... | SELECT T2.name, T2.year FROM results AS T1 JOIN races AS T2 ON T1.raceid = T2.raceid JOIN drivers AS T3 ON T1.driverid = T3.driverid WHERE T3.forename = "Lewis" | spider |
CREATE TABLE medication (
medicationid number,
patientunitstayid number,
drugname text,
dosage text,
routeadmin text,
drugstarttime time,
drugstoptime time
)
CREATE TABLE vitalperiodic (
vitalperiodicid number,
patientunitstayid number,
temperature number,
sao2 number,
h... | SELECT 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 = '030-28944')) AND lab.labname = 'anion gap' AND DATETIME(lab.labresulttime, 'start o... | eicu |
CREATE TABLE table_70975 (
"Place" text,
"Player" text,
"Country" text,
"Score" text,
"To par" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What United States player has a score of 69-73-68=210?
| SELECT "Player" FROM table_70975 WHERE "Score" = '69-73-68=210' AND "Country" = 'united states' | wikisql |
CREATE TABLE captain (
Captain_ID int,
Name text,
Ship_ID int,
age text,
Class text,
Rank text
)
CREATE TABLE Ship (
Ship_ID int,
Name text,
Type text,
Built_Year real,
Class text,
Flag text
)
-- Using valid SQLite, answer the following questions for the tables provide... | SELECT Rank, COUNT(Rank) FROM captain GROUP BY Rank | nvbench |
CREATE TABLE icustays (
row_id number,
subject_id number,
hadm_id number,
icustay_id number,
first_careunit text,
last_careunit text,
first_wardid number,
last_wardid number,
intime time,
outtime time
)
CREATE TABLE procedures_icd (
row_id number,
subject_id number,
... | SELECT microbiologyevents.charttime FROM microbiologyevents WHERE microbiologyevents.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 15107) AND microbiologyevents.spec_type_desc = 'immunology' AND DATETIME(microbiologyevents.charttime, 'start of year') = DATETIME(CURRENT_TIME(), 'sta... | mimic_iii |
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 School_ID, ACC_Percent FROM basketball_match GROUP BY All_Road | nvbench |
CREATE TABLE table_75048 (
"Stage" text,
"Time" text,
"Name" text,
"Length" text,
"Winner" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the Name of the SS5 Stage?
| SELECT "Name" FROM table_75048 WHERE "Stage" = 'ss5' | wikisql |
CREATE TABLE person_info_hz_info (
RYBH text,
KH number,
KLX number,
YLJGDM number
)
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,
JSB... | SELECT mzjzjlb.JZLSH FROM hz_info JOIN mzjzjlb JOIN person_info_hz_info JOIN person_info ON hz_info.YLJGDM = mzjzjlb.YLJGDM AND hz_info.KH = mzjzjlb.KH AND hz_info.KLX = mzjzjlb.KLX AND person_info_hz_info.KH = hz_info.KH AND person_info_hz_info.KLX = hz_info.KLX AND person_info_hz_info.YLJGDM = hz_info.YLJGDM AND pers... | css |
CREATE TABLE table_name_88 (
Id VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the maximum 1985 GDP for the region where 1990 GDP is less than 267, 2000 GDP is 333 and 2005 GDP is less than 658?
| SELECT MAX(1985) FROM table_name_88 WHERE 1990 < 267 AND 2000 = 333 AND 2005 < 658 | sql_create_context |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.