instruction stringlengths 151 7.46k | output stringlengths 2 4.44k | source stringclasses 26
values |
|---|---|---|
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 lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.discharge_location = "SNF" AND lab.label = "Potassium" | mimicsql_data |
CREATE TABLE table_55356 (
"Season" text,
"Stage Reached" text,
"Against" text,
"Score" text,
"Venue" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the stage reached for venue edmonton green?
| SELECT "Stage Reached" FROM table_55356 WHERE "Venue" = 'edmonton green' | wikisql |
CREATE TABLE Subjects (
subject_id INTEGER,
subject_name VARCHAR(120)
)
CREATE TABLE Course_Authors_and_Tutors (
author_id INTEGER,
author_tutor_ATB VARCHAR(3),
login_name VARCHAR(40),
password VARCHAR(40),
personal_name VARCHAR(80),
middle_name VARCHAR(80),
family_name VARCHAR(80),... | SELECT date_of_enrolment, COUNT(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" | nvbench |
CREATE TABLE table_name_20 (
wins INTEGER,
year VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- How many wins were there in 1994?
| SELECT SUM(wins) FROM table_name_20 WHERE year = 1994 | sql_create_context |
CREATE TABLE CloseReasonTypes (
Id number,
Name text,
Description text
)
CREATE TABLE PostHistory (
Id number,
PostHistoryTypeId number,
PostId number,
RevisionGUID other,
CreationDate time,
UserId number,
UserDisplayName text,
Comment text,
Text text,
ContentLicense... | SELECT COUNT(*) FROM (SELECT DISTINCT Users.Id FROM Users JOIN Comments ON (Comments.UserId = Users.Id) WHERE DATEDIFF(day, Comments.CreationDate, 2016 - 8 - 24) <= 7 UNION SELECT DISTINCT Users.Id FROM Users JOIN Posts ON (Posts.OwnerUserId = Users.Id) WHERE DATEDIFF(day, Posts.CreationDate, 2016 - 8 - 24) <= 7 UNION ... | sede |
CREATE TABLE table_12286195_1 (
background VARCHAR,
result VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the background of the celebrity who had the result 13 the celebrity apprentice (2008-03-27)?
| SELECT background FROM table_12286195_1 WHERE result = "13 The celebrity Apprentice (2008-03-27)" | sql_create_context |
CREATE TABLE d_icd_diagnoses (
row_id number,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE diagnoses_icd (
row_id number,
subject_id number,
hadm_id number,
icd9_code text,
charttime time
)
CREATE TABLE outputevents (
row_id number,
subject_id number,
... | SELECT COUNT(*) FROM prescriptions WHERE prescriptions.drug = 'potassium chl 20 meq / 1000 ml d5lr' AND STRFTIME('%y', prescriptions.startdate) <= '2104' | mimic_iii |
CREATE TABLE volume (
volume_id number,
volume_issue text,
issue_date text,
weeks_on_top number,
song text,
artist_id number
)
CREATE TABLE artist (
artist_id number,
artist text,
age number,
famous_title text,
famous_release_date text
)
CREATE TABLE music_festival (
id... | SELECT category FROM music_festival GROUP BY category HAVING COUNT(*) > 1 | spider |
CREATE TABLE instructor (
instructor_id int,
name varchar,
uniqname varchar
)
CREATE TABLE program (
program_id int,
name varchar,
college varchar,
introduction varchar
)
CREATE TABLE jobs (
job_id int,
job_title varchar,
description varchar,
requirement varchar,
city v... | SELECT DISTINCT course_offering.friday, course_offering.monday, course_offering.saturday, course_offering.sunday, course_offering.thursday, course_offering.tuesday, course_offering.wednesday FROM course INNER JOIN course_offering ON course.course_id = course_offering.course_id INNER JOIN semester ON semester.semester_i... | advising |
CREATE TABLE t_kc21 (
MED_CLINIC_ID text,
OVERALL_CD_ORG text,
OVERALL_CD_PERSON text,
COMP_ID text,
PERSON_ID text,
PERSON_NM text,
IDENTITY_CARD text,
SOC_SRT_CARD text,
PERSON_SEX number,
PERSON_AGE number,
IN_HOSP_DATE time,
OUT_HOSP_DATE time,
DIFF_PLACE_FLG numb... | SELECT COUNT(*) FROM t_kc21 JOIN t_kc22 ON t_kc21.MED_CLINIC_ID = t_kc22.MED_CLINIC_ID WHERE t_kc21.PERSON_ID = '08630771' AND t_kc22.STA_DATE BETWEEN '2001-09-16' AND '2021-07-12' AND t_kc21.MED_SER_ORG_NO = '8807369' AND t_kc22.MED_INV_ITEM_TYPE = '检查费' | css |
CREATE TABLE table_name_58 (
circuit VARCHAR,
winning_driver VARCHAR,
name VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What circuit did Luigi Villoresi win the Lausanne Grand Prix?
| SELECT circuit FROM table_name_58 WHERE winning_driver = "luigi villoresi" AND name = "lausanne grand prix" | 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 transfers.wardid FROM transfers WHERE transfers.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 15945 AND admissions.dischtime IS NULL) AND NOT transfers.wardid IS NULL ORDER BY transfers.intime LIMIT 1 | mimic_iii |
CREATE TABLE PostNoticeTypes (
Id number,
ClassId number,
Name text,
Body text,
IsHidden boolean,
Predefined boolean,
PostNoticeDurationId number
)
CREATE TABLE PostHistoryTypes (
Id number,
Name text
)
CREATE TABLE CloseReasonTypes (
Id number,
Name text,
Description t... | SELECT Posts.Id AS "post_link", COUNT(DISTINCT RevisionGUID) AS Revisions FROM PostHistory JOIN Posts ON PostHistory.PostId = Posts.Id WHERE Posts.CommunityOwnedDate IS NULL AND Posts.OwnerUserId = '##UserId##' AND PostHistory.PostHistoryTypeId IN (1, 2, 3, 4, 5, 6, 7, 8, 9) GROUP BY Posts.Id HAVING COUNT(DISTINCT Revi... | sede |
CREATE TABLE table_name_18 (
date_of_birth VARCHAR,
block INTEGER
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the Date of Birth with a Block that is larger than 342?
| SELECT date_of_birth FROM table_name_18 WHERE block > 342 | sql_create_context |
CREATE TABLE table_37706 (
"Year" real,
"Chassis" text,
"Engine" text,
"Start" real,
"Finish" real,
"Team" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What was the finish associated with under 11 starts, a honda engine, before 2003?
| SELECT AVG("Finish") FROM table_37706 WHERE "Start" < '11' AND "Engine" = 'honda' AND "Year" < '2003' | wikisql |
CREATE TABLE table_80389 (
"Team" text,
"Manager" text,
"Captain" text,
"Kit manufacturer" text,
"Shirt sponsor" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which captain has billy bonds as the manager?
| SELECT "Captain" FROM table_80389 WHERE "Manager" = 'billy bonds' | wikisql |
CREATE TABLE department (
dept_name varchar(20),
building varchar(15),
budget numeric(12,2)
)
CREATE TABLE teaches (
ID varchar(5),
course_id varchar(8),
sec_id varchar(8),
semester varchar(6),
year numeric(4,0)
)
CREATE TABLE section (
course_id varchar(8),
sec_id varchar(8),
... | SELECT dept_name, MIN(salary) FROM instructor GROUP BY dept_name ORDER BY MIN(salary) DESC | nvbench |
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.JCRGH, jyjgzbb.JCRXM FROM hz_info JOIN mzjzjlb JOIN jybgb JOIN jyjgzbb ON hz_info.YLJGDM = mzjzjlb.YLJGDM AND hz_info.KH = mzjzjlb.KH AND hz_info.KLX = mzjzjlb.KLX AND mzjzjlb.YLJGDM = jybgb.YLJGDM_MZJZJLB AND mzjzjlb.JZLSH = jybgb.JZLSH_MZJZJLB AND jybgb.YLJGDM = jyjgzbb.YLJGDM AND jybgb.BGDH = jyjgzbb.... | css |
CREATE TABLE d_labitems (
row_id number,
itemid number,
label text
)
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 inputevents_cv (
... | SELECT d_icd_procedures.short_title FROM d_icd_procedures WHERE d_icd_procedures.icd9_code IN (SELECT t3.icd9_code FROM (SELECT t2.icd9_code, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM (SELECT admissions.subject_id, diagnoses_icd.charttime FROM diagnoses_icd JOIN admissions ON diagnoses_icd.hadm_id = admissi... | mimic_iii |
CREATE TABLE table_22649 (
"Year" real,
"Player" text,
"Country" text,
"Score" text,
"To Par" text,
"Margin" real,
"Earnings ($)" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What country does robert allenby represent?
| SELECT "Country" FROM table_22649 WHERE "Player" = 'Robert Allenby' | wikisql |
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 regions (
REGION_ID decimal(5,0),
REGION_NAME varchar(25)
)
CREATE TABLE jobs (
JOB_ID varchar(... | SELECT JOB_ID, SUM(DEPARTMENT_ID) FROM employees WHERE NOT EMPLOYEE_ID IN (SELECT EMPLOYEE_ID FROM job_history) GROUP BY JOB_ID | nvbench |
CREATE TABLE table_name_68 (
date_of_appointment VARCHAR,
replaced_by VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- When was the appointment date for the manager replaced by Lucien Favre?
| SELECT date_of_appointment FROM table_name_68 WHERE replaced_by = "lucien favre" | sql_create_context |
CREATE TABLE code_description (
code varchar,
description text
)
CREATE TABLE city (
city_code varchar,
city_name varchar,
state_code varchar,
country_name varchar,
time_zone_code varchar
)
CREATE TABLE flight_stop (
flight_id int,
stop_number int,
stop_days text,
stop_airp... | SELECT DISTINCT flight.flight_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, flight WHERE (((flight.to_airport = AIRPORT_SERVICE_1.airport_code AND CITY_1.city_code = AIRPORT_SERVICE_1.city_code AN... | atis |
CREATE TABLE area (
course_id int,
area varchar
)
CREATE TABLE program (
program_id int,
name varchar,
college varchar,
introduction varchar
)
CREATE TABLE course_prerequisite (
pre_course_id int,
course_id int
)
CREATE TABLE course_offering (
offering_id int,
course_id int,
... | SELECT COUNT(DISTINCT instructor.instructor_id) FROM course, course_offering, instructor, offering_instructor, semester WHERE course.course_id = course_offering.course_id AND course.department = 'BIT' AND course.number = 644 AND offering_instructor.instructor_id = instructor.instructor_id AND offering_instructor.offeri... | advising |
CREATE TABLE table_16639 (
"Rd." real,
"Grand Prix" text,
"Pole Position" text,
"Fastest Lap" text,
"Winning Driver" text,
"Constructor" text,
"Report" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What number is the Canadian Grand Prix on ... | SELECT "Rd." FROM table_16639 WHERE "Grand Prix" = 'Canadian Grand Prix' | 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 medication.drugname FROM medication WHERE medication.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.uniquepid = '025-50213') AND DATETIME(medication.drugstarttime, 'start of day') = DATETIME(CURRENT_TIME(), 'start of day', '-0 day') EXCEPT SELECT medication.drugname FROM medica... | eicu |
CREATE TABLE table_1938 (
"Athlete" text,
"Class" text,
"Event" text,
"Round 1" text,
"Round 2" text,
"Round 3" text,
"1/8 Finals" text,
"Quarterfinals" text,
"Semifinals" text,
"Final/ Bronze medal contest" text
)
-- Using valid SQLite, answer the following questions for the t... | SELECT "1/8 Finals" FROM table_1938 WHERE "Round 1" = 'N/A' | wikisql |
CREATE TABLE allergy (
allergyid number,
patientunitstayid number,
drugname text,
allergyname text,
allergytime time
)
CREATE TABLE lab (
labid number,
patientunitstayid number,
labname text,
labresult number,
labresulttime time
)
CREATE TABLE vitalperiodic (
vitalperiodici... | SELECT 1 * (STRFTIME('%j', CURRENT_TIME()) - STRFTIME('%j', patient.hospitaladmittime)) FROM patient WHERE patient.uniquepid = '027-165214' AND patient.hospitaldischargetime IS NULL | eicu |
CREATE TABLE table_name_16 (
location VARCHAR,
event VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which Location has an Event of king of the cage: flash point?
| SELECT location FROM table_name_16 WHERE event = "king of the cage: flash point" | 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_kc21 JOIN t_kc22 ON t_kc21.MED_CLINIC_ID = t_kc22.MED_CLINIC_ID WHERE t_kc21.PERSON_NM = '蒋艳卉' AND t_kc22.STA_DATE BETWEEN '2009-09-25' AND '2020-10-29' AND t_kc22.SELF_PAY_PRO < 0.68 | css |
CREATE TABLE table_1601027_1 (
termination VARCHAR,
us_msrp VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which terminations correspond to a US MSRP of $49?
| SELECT termination FROM table_1601027_1 WHERE us_msrp = "$49" | sql_create_context |
CREATE TABLE Allergy_Type (
Allergy VARCHAR(20),
AllergyType VARCHAR(20)
)
CREATE TABLE Student (
StuID INTEGER,
LName VARCHAR(12),
Fname VARCHAR(12),
Age INTEGER,
Sex VARCHAR(1),
Major INTEGER,
Advisor INTEGER,
city_code VARCHAR(3)
)
CREATE TABLE Has_Allergy (
StuID INTEGE... | SELECT city_code, COUNT(*) FROM Student GROUP BY city_code ORDER BY city_code DESC | nvbench |
CREATE TABLE lab (
labid number,
patientunitstayid number,
labname text,
labresult number,
labresulttime time
)
CREATE TABLE vitalperiodic (
vitalperiodicid number,
patientunitstayid number,
temperature number,
sao2 number,
heartrate number,
respiration number,
systemics... | SELECT patient.hospitaladmittime FROM patient WHERE patient.uniquepid = '029-8147' AND DATETIME(patient.hospitaladmittime) <= DATETIME(CURRENT_TIME(), '-4 year') ORDER BY patient.hospitaladmittime LIMIT 1 | eicu |
CREATE TABLE diagnoses (
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 prescriptions... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.admission_location = "TRANSFER FROM HOSP/EXTRAM" AND demographic.diagnosis = "BLADDER CANCER/SDA" | mimicsql_data |
CREATE TABLE table_20124 (
"Time" text,
"12:00 PM" text,
"01:00 PM" text,
"02:00 PM" text,
"03:00 PM" text,
"04:00 PM" text,
"05:00 PM" text,
"05:55 PM" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What are the names of the episodes th... | SELECT "02:00 PM" FROM table_20124 | wikisql |
CREATE TABLE table_61935 (
"Summoned" text,
"Elected" text,
"Assembled" text,
"Dissolved" text,
"1st member" text,
"2nd member" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the assembled date of the parliament with an unknown 2nd membe... | SELECT "Assembled" FROM table_61935 WHERE "2nd member" = 'unknown' AND "Elected" = '1482/83' | wikisql |
CREATE TABLE table_15713 (
"Tournament" text,
"1996" text,
"1997" text,
"1999" text,
"2000" text,
"2001" text,
"2002" text,
"2003" text,
"2004" text,
"2005" text,
"2009" text,
"2010" text,
"2011" text
)
-- Using valid SQLite, answer the following questions for the t... | SELECT "1999" FROM table_15713 WHERE "2003" = 'q1' AND "2002" = 'q3' | wikisql |
CREATE TABLE aircraft (
Aircraft VARCHAR,
Description VARCHAR,
Aircraft_ID VARCHAR
)
CREATE TABLE airport_aircraft (
Aircraft_ID VARCHAR,
Airport_ID VARCHAR
)
CREATE TABLE airport (
Airport_ID VARCHAR,
Total_Passengers INTEGER
)
-- Using valid SQLite, answer the following questions for t... | SELECT T1.Aircraft, T1.Description FROM aircraft AS T1 JOIN airport_aircraft AS T2 ON T1.Aircraft_ID = T2.Aircraft_ID JOIN airport AS T3 ON T2.Airport_ID = T3.Airport_ID WHERE T3.Total_Passengers > 10000000 | sql_create_context |
CREATE TABLE table_204_805 (
id number,
"name" text,
"club" text,
"date of departure" text,
"replacement" text,
"date of appointment" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- how many changes incolved pattaya united ?
| SELECT COUNT(*) FROM table_204_805 WHERE "club" = 'pattaya united' | squall |
CREATE TABLE table_name_77 (
bronze INTEGER,
gold VARCHAR,
silver VARCHAR,
rank VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the total number of bronzes associated with 1 silver, ranks under 6 and under 6 golds?
| SELECT SUM(bronze) FROM table_name_77 WHERE silver = 1 AND rank < 6 AND gold < 6 | 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 transfers.wardid FROM transfers WHERE transfers.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 70267) AND NOT transfers.wardid IS NULL AND STRFTIME('%y', transfers.intime) >= '2104' ORDER BY transfers.intime 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 COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE demographic.ethnicity = "WHITE" AND diagnoses.long_title = "Panic disorder without agoraphobia" | mimicsql_data |
CREATE TABLE table_name_14 (
attendance VARCHAR,
record VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What was the attendance at the game when the record was 49-61?
| SELECT attendance FROM table_name_14 WHERE record = "49-61" | sql_create_context |
CREATE TABLE cost (
costid number,
uniquepid text,
patienthealthsystemstayid number,
eventtype text,
eventid number,
chargetime time,
cost number
)
CREATE TABLE treatment (
treatmentid number,
patientunitstayid number,
treatmentname text,
treatmenttime time
)
CREATE TABLE i... | SELECT diagnosis.diagnosisname FROM diagnosis WHERE diagnosis.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '028-23341' AND NOT patient.hospitaldischargetime IS NULL ORDER BY... | eicu |
CREATE TABLE gsi (
course_offering_id int,
student_id int
)
CREATE TABLE program_requirement (
program_id int,
category varchar,
min_credit int,
additional_req varchar
)
CREATE TABLE offering_instructor (
offering_instructor_id int,
offering_id int,
instructor_id int
)
CREATE TABL... | SELECT DISTINCT name, number FROM course WHERE credits = 14 AND department = 'EECS' | advising |
CREATE TABLE table_3298 (
"Season" real,
"Series" text,
"Team" text,
"Races" real,
"Wins" real,
"Poles" real,
"F/Laps" real,
"Podiums" real,
"Points" text,
"Position" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- How many series... | SELECT COUNT("Races") FROM table_3298 WHERE "Points" = '15' | wikisql |
CREATE TABLE t_kc22 (
MED_EXP_DET_ID text,
OVERALL_CD_ORG text,
OVERALL_CD_PERSON text,
MED_CLINIC_ID text,
MED_EXP_BILL_ID text,
SOC_SRT_DIRE_CD text,
SOC_SRT_DIRE_NM text,
DIRE_TYPE number,
CHA_ITEM_LEV number,
MED_INV_ITEM_TYPE text,
MED_DIRE_CD text,
MED_DIRE_NM text,... | SELECT MED_CLINIC_ID FROM t_kc21 WHERE PERSON_ID = '59512324' AND NOT MED_CLINIC_ID IN (SELECT MED_CLINIC_ID FROM t_kc22 WHERE AMOUNT < 9835.59) | css |
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 chartevents.valuenum FROM chartevents WHERE chartevents.icustay_id IN (SELECT icustays.icustay_id FROM icustays WHERE icustays.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 11362)) AND chartevents.itemid IN (SELECT d_items.itemid FROM d_items WHERE d_items.label = 'admit ht'... | mimic_iii |
CREATE TABLE allergy (
allergyid number,
patientunitstayid number,
drugname text,
allergyname text,
allergytime time
)
CREATE TABLE medication (
medicationid number,
patientunitstayid number,
drugname text,
dosage text,
routeadmin text,
drugstarttime time,
drugstoptime t... | SELECT t1.drugstarttime FROM (SELECT patient.uniquepid, medication.drugstarttime FROM medication JOIN patient ON medication.patientunitstayid = patient.patientunitstayid WHERE medication.drugname = 'acetaminophen 325 mg po tabs' AND patient.uniquepid = '010-16627' AND DATETIME(medication.drugstarttime) >= DATETIME(CURR... | eicu |
CREATE TABLE table_24008 (
"Game" real,
"Date" text,
"Opponent" text,
"Result" text,
"Hurricanes points" real,
"Opponents" real,
"Record" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What was the record after the game in which the Hurrican... | SELECT "Record" FROM table_24008 WHERE "Hurricanes points" = '24' | wikisql |
CREATE TABLE table_20954 (
"Year" real,
"Edmonton Hundred" real,
"Elthorne Hundred" real,
"Gore Hundred" real,
"Isleworth Hundred" real,
"Holborn Division" real,
"Finsbury Division" real,
"Kensington Division" real,
"Tower Division" real,
"Spelthorne Hundred" real,
"Within th... | SELECT "Inns of Court and Chancery" FROM table_20954 WHERE "Without the Walls" = '70489' | wikisql |
CREATE TABLE table_46663 (
"Country" text,
"Preliminary" real,
"Interview" real,
"Swimsuit" real,
"Evening Gown" real,
"Average" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the sum of Swimsuit scores where the average score is 9.733 a... | SELECT SUM("Swimsuit") FROM table_46663 WHERE "Average" = '9.733' AND "Interview" > '9.654' | wikisql |
CREATE TABLE table_75567 (
"Name" text,
"Pada 1" text,
"Pada 2" text,
"Pada 3" text,
"Pada 4" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What kind of Pada 1 has a Pada 2 of sa?
| SELECT "Pada 1" FROM table_75567 WHERE "Pada 2" = 'सा sa' | wikisql |
CREATE TABLE Faculty (
FacID INTEGER,
Lname VARCHAR(15),
Fname VARCHAR(15),
Rank VARCHAR(15),
Sex VARCHAR(1),
Phone INTEGER,
Room VARCHAR(5),
Building VARCHAR(13)
)
CREATE TABLE Student (
StuID INTEGER,
LName VARCHAR(12),
Fname VARCHAR(12),
Age INTEGER,
Sex VARCHAR(1... | SELECT Rank, COUNT(Rank) FROM Faculty GROUP BY Rank ORDER BY Rank DESC | nvbench |
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 mzjzjlb.JZLSH FROM hz_info JOIN mzjzjlb ON hz_info.YLJGDM = mzjzjlb.YLJGDM AND hz_info.KH = mzjzjlb.KH AND hz_info.KLX = mzjzjlb.KLX WHERE hz_info.RYBH = '31549527' AND NOT mzjzjlb.JZLSH IN (SELECT jybgb.JZLSH FROM jybgb WHERE jybgb.BGRQ <= '2006-04-16') | css |
CREATE TABLE table_24676 (
"No" real,
"Driver" text,
"Entrant" text,
"Constructor" text,
"Chassis" text,
"Engine" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Name the entrant for benedicto campos
| SELECT "Entrant" FROM table_24676 WHERE "Driver" = 'Benedicto Campos' | wikisql |
CREATE TABLE table_22265261_1 (
sp VARCHAR,
position VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What was the Sp of the 2nd Position?
| SELECT COUNT(sp) FROM table_22265261_1 WHERE position = "2nd" | sql_create_context |
CREATE TABLE table_49592 (
"Rank" real,
"Company" text,
"Country" text,
"Industry" text,
"Sales (billion $)" real,
"Profits (billion $)" real,
"Assets (billion $)" real,
"Market Value (billion $)" real
)
-- Using valid SQLite, answer the following questions for the tables provided abov... | SELECT MIN("Sales (billion $)") FROM table_49592 WHERE "Company" = 'bp' | wikisql |
CREATE TABLE table_name_47 (
crowd INTEGER,
home_team VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What was the smallest crowd size for a home game for Richmond?
| SELECT MIN(crowd) FROM table_name_47 WHERE home_team = "richmond" | sql_create_context |
CREATE TABLE PostsWithDeleted (
Id number,
PostTypeId number,
AcceptedAnswerId number,
ParentId number,
CreationDate time,
DeletionDate time,
Score number,
ViewCount number,
Body text,
OwnerUserId number,
OwnerDisplayName text,
LastEditorUserId number,
LastEditorDispl... | SELECT CASE WHEN PostTypeId = 1 THEN 'Questions' ELSE 'Answers' END AS "post_type", CASE WHEN VoteTypeId = 2 THEN 'Up Votes' ELSE 'Down Votes' END AS "vote_type", COUNT(*) AS "count" FROM Posts AS p INNER JOIN Votes AS v ON p.Id = v.PostId WHERE p.ClosedDate IS NULL AND (p.PostTypeId = 1 OR p.PostTypeId = 2) AND (v.Vot... | sede |
CREATE TABLE table_name_48 (
enrollment INTEGER,
location VARCHAR,
mascot VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the highest enrollment in Lagrange where the mascot is panthers?
| SELECT MAX(enrollment) FROM table_name_48 WHERE location = "lagrange" AND mascot = "panthers" | 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 MIN(demographic.age) FROM demographic WHERE demographic.expire_flag = "0" AND demographic.diagnosis = "MORBID OBESITY/SDA" | mimicsql_data |
CREATE TABLE table_49493 (
"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.
-- What is Result, when Film Title Used In Nomination is 'Kuei-Mei,... | SELECT "Result" FROM table_49493 WHERE "Film title used in nomination" = 'kuei-mei, a woman' | wikisql |
CREATE TABLE countries (
COUNTRY_ID varchar(2),
COUNTRY_NAME varchar(40),
REGION_ID decimal(10,0)
)
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 T... | SELECT JOB_ID, SUM(EMPLOYEE_ID) FROM employees WHERE HIRE_DATE < '2002-06-21' GROUP BY JOB_ID ORDER BY JOB_ID | nvbench |
CREATE TABLE table_11297 (
"Year" real,
"Title" text,
"Format" text,
"Studio" text,
"Release Date" text,
"Copyright Information" text,
"Catalog Number" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the release date of vhs super call... | SELECT "Release Date" FROM table_11297 WHERE "Format" = 'vhs' AND "Title" = 'super callanetics' | wikisql |
CREATE TABLE pitching (
player_id text,
year number,
stint number,
team_id text,
league_id text,
w number,
l number,
g number,
gs number,
cg number,
sho number,
sv number,
ipouts number,
h number,
er number,
hr number,
bb number,
so number,
bao... | SELECT SUM(T1.salary) FROM salary AS T1 JOIN team AS T2 ON T1.team_id = T2.team_id_br WHERE T2.name = 'Boston Red Stockings' AND T1.year = 2010 | spider |
CREATE TABLE table_20946 (
"Round" real,
"Circuit" text,
"Date" text,
"Pole Position" text,
"Fastest Lap" text,
"Winning Driver" text,
"Winning Team" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Who had the fastest lap in the race won by T... | SELECT "Fastest Lap" FROM table_20946 WHERE "Winning Team" = 'Team Impul' AND "Circuit" = 'Twin Ring Motegi' | wikisql |
CREATE TABLE table_name_99 (
kit_manufacturer VARCHAR,
team VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which Kit manufacturer sponsers Arsenal?
| SELECT kit_manufacturer FROM table_name_99 WHERE team = "arsenal" | 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 prescriptions... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.marital_status = "SINGLE" AND demographic.ethnicity = "ASIAN" | mimicsql_data |
CREATE TABLE table_name_84 (
venue VARCHAR,
against VARCHAR,
opposing_team VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which venue had an against score smaller than 18 when the opposing team was North Auckland?
| SELECT venue FROM table_name_84 WHERE against < 18 AND opposing_team = "north auckland" | sql_create_context |
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 diagnoses.short_title = "Chr airway obstruct NEC" | mimicsql_data |
CREATE TABLE table_1118 (
"Episode #" real,
"The W\u00f8rd" text,
"Guest" text,
"Introductory phrase" text,
"Original Airdate" text,
"Production Code" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What was the inroductory phase for the episode ... | SELECT "Introductory phrase" FROM table_1118 WHERE "Production Code" = '4005' | 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 mzjzjlb.MZZYZDZZBM, mzjzjlb.MZZYZDZZMC FROM mzjzjlb WHERE mzjzjlb.JZLSH = '74461685601' | css |
CREATE TABLE SuggestedEdits (
Id number,
PostId number,
CreationDate time,
ApprovalDate time,
RejectionDate time,
OwnerUserId number,
Comment text,
Text text,
Title text,
Tags text,
RevisionGUID other
)
CREATE TABLE ReviewTasks (
Id number,
ReviewTaskTypeId number,
... | SELECT Posts.Body FROM Posts WHERE CreationDate >= '2016-12-01 00:00:01' | sede |
CREATE TABLE table_79019 (
"Place" text,
"Player" text,
"Country" text,
"Score" text,
"To par" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What country is player thomas bj rn from?
| SELECT "Country" FROM table_79019 WHERE "Player" = 'thomas bjørn' | wikisql |
CREATE TABLE table_name_15 (
home_team VARCHAR,
venue VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What did the home team score at Princes Park?
| SELECT home_team AS score FROM table_name_15 WHERE venue = "princes park" | sql_create_context |
CREATE TABLE table_name_99 (
to_par VARCHAR,
player VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the To par for Lanny Wadkins?
| SELECT to_par FROM table_name_99 WHERE player = "lanny wadkins" | sql_create_context |
CREATE TABLE table_name_62 (
gender VARCHAR,
roll VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which gender had a roll of 627?
| SELECT gender FROM table_name_62 WHERE roll = 627 | sql_create_context |
CREATE TABLE table_54053 (
"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 the crowd is over 14,1... | SELECT "Away team" FROM table_54053 WHERE "Crowd" > '14,112' AND "Away team score" = '11.11 (77)' | wikisql |
CREATE TABLE course_prerequisite (
pre_course_id int,
course_id int
)
CREATE TABLE area (
course_id int,
area varchar
)
CREATE TABLE offering_instructor (
offering_instructor_id int,
offering_id int,
instructor_id int
)
CREATE TABLE student (
student_id int,
lastname varchar,
... | SELECT DISTINCT course.department, course.name, course.number FROM course, course_offering, semester WHERE course.course_id = course_offering.course_id AND course.department = 'EECS' AND course.number BETWEEN 300 AND 300 + 100 AND semester.semester = 'FA' AND semester.semester_id = course_offering.semester AND semester... | advising |
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 diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE demographic.dod_year <= "2131.0" AND diagnoses.icd9_code = "20972" | mimicsql_data |
CREATE TABLE t_kc21 (
MED_CLINIC_ID text,
OVERALL_CD_ORG text,
OVERALL_CD_PERSON text,
COMP_ID text,
PERSON_ID text,
PERSON_NM text,
IDENTITY_CARD text,
SOC_SRT_CARD text,
PERSON_SEX number,
PERSON_AGE number,
IN_HOSP_DATE time,
OUT_HOSP_DATE time,
DIFF_PLACE_FLG numb... | SELECT MED_ORG_DEPT_CD, MED_ORG_DEPT_NM, AVG(IN_HOSP_DAYS) FROM t_kc21 WHERE MED_SER_ORG_NO = '2471866' GROUP BY MED_ORG_DEPT_CD ORDER BY AVG(IN_HOSP_DAYS) | css |
CREATE TABLE Projects (
Project_ID INTEGER,
Project_Details VARCHAR(255)
)
CREATE TABLE Accounts (
Account_ID INTEGER,
Statement_ID INTEGER,
Account_Details VARCHAR(255)
)
CREATE TABLE Ref_Document_Types (
Document_Type_Code CHAR(15),
Document_Type_Name VARCHAR(255),
Document_Type_Desc... | SELECT Budget_Type_Description, COUNT(Budget_Type_Description) FROM Documents_with_Expenses AS T1 JOIN Ref_Budget_Codes AS T2 ON T1.Budget_Type_Code = T2.Budget_Type_Code GROUP BY Budget_Type_Description ORDER BY COUNT(Budget_Type_Description) | nvbench |
CREATE TABLE race (
race_id number,
name text,
class text,
date text,
track_id text
)
CREATE TABLE track (
track_id number,
name text,
location text,
seating number,
year_opened number
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- S... | SELECT name, seating FROM track WHERE year_opened > 2000 ORDER BY seating | spider |
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 COUNT(t_kc21.MED_SER_ORG_NO) FROM t_kc21 WHERE t_kc21.PERSON_NM = '水雯华' AND t_kc21.IN_HOSP_DATE BETWEEN '2001-12-24' AND '2008-04-20' | css |
CREATE TABLE table_name_91 (
team_2 VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the 1st round with a team 2 paris sg (d1)?
| SELECT 1 AS st_round FROM table_name_91 WHERE team_2 = "paris sg (d1)" | sql_create_context |
CREATE TABLE table_48390 (
"Player" text,
"Attempts" real,
"Yards" real,
"Avg Yards" real,
"Long" real,
"Touchdowns" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the total number of Attempts, when Touchdowns is 6?
| SELECT COUNT("Attempts") FROM table_48390 WHERE "Touchdowns" = '6' | wikisql |
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-77687')) AND intakeoutput.cellpath LIKE '%intake%' AND intakeoutput.ce... | eicu |
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 demographic.insurance, demographic.diagnosis FROM demographic WHERE demographic.subject_id = "8990" | mimicsql_data |
CREATE TABLE diagnoses_icd (
row_id number,
subject_id number,
hadm_id number,
icd9_code text,
charttime time
)
CREATE TABLE inputevents_cv (
row_id number,
subject_id number,
hadm_id number,
icustay_id number,
charttime time,
itemid number,
amount number
)
CREATE TABLE... | SELECT COUNT(DISTINCT t1.subject_id) FROM (SELECT admissions.subject_id, COUNT(*) AS c1 FROM procedures_icd JOIN admissions ON procedures_icd.hadm_id = admissions.hadm_id WHERE procedures_icd.icd9_code = (SELECT d_icd_procedures.icd9_code FROM d_icd_procedures WHERE d_icd_procedures.short_title = 'ins nondrug elut cor ... | mimic_iii |
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 vitalperiodic.heartrate FROM vitalperiodic WHERE vitalperiodic.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '016-129') AND NOT patient.unitdischargetime IS NULL ORDER... | eicu |
CREATE TABLE program_course (
program_id int,
course_id int,
workload int,
category varchar
)
CREATE TABLE program (
program_id int,
name varchar,
college varchar,
introduction varchar
)
CREATE TABLE semester (
semester_id int,
semester varchar,
year int
)
CREATE TABLE com... | SELECT DISTINCT course.department, course.name, course.number FROM course, course_offering, semester WHERE course.course_id = course_offering.course_id AND course.department = 'EECS' AND semester.semester = 'WN' AND semester.semester_id = course_offering.semester AND semester.year = 2016 ORDER BY course.department | advising |
CREATE TABLE table_name_18 (
year VARCHAR,
genre VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What year has a genre the platform game?
| SELECT year FROM table_name_18 WHERE genre = "platform game" | sql_create_context |
CREATE TABLE table_1590652_4 (
margin_of_victory VARCHAR,
date VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Name th margin of victory when date is 10 jul 2011
| SELECT margin_of_victory FROM table_1590652_4 WHERE date = "10 Jul 2011" | sql_create_context |
CREATE TABLE t_kc21 (
MED_CLINIC_ID text,
OVERALL_CD_ORG text,
OVERALL_CD_PERSON text,
COMP_ID text,
PERSON_ID text,
PERSON_NM text,
IDENTITY_CARD text,
SOC_SRT_CARD text,
PERSON_SEX number,
PERSON_AGE number,
IN_HOSP_DATE time,
OUT_HOSP_DATE time,
DIFF_PLACE_FLG numb... | SELECT COUNT(*) FROM t_kc21 WHERE PERSON_NM = '王芳茵' AND CLINIC_TYPE = '住院' AND MOD(MED_AMOUT, 1) = 0 | css |
CREATE TABLE job_history (
EMPLOYEE_ID decimal(6,0),
START_DATE date,
END_DATE date,
JOB_ID varchar(10),
DEPARTMENT_ID decimal(4,0)
)
CREATE TABLE locations (
LOCATION_ID decimal(4,0),
STREET_ADDRESS varchar(40),
POSTAL_CODE varchar(12),
CITY varchar(30),
STATE_PROVINCE varchar(... | SELECT JOB_ID, SALARY FROM employees WHERE NOT DEPARTMENT_ID IN (SELECT DEPARTMENT_ID FROM departments WHERE MANAGER_ID BETWEEN 100 AND 200) ORDER BY SALARY DESC | nvbench |
CREATE TABLE table_name_52 (
location VARCHAR,
res VARCHAR,
record VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Tell me the location for win with record of 8-5
| SELECT location FROM table_name_52 WHERE res = "win" AND record = "8-5" | sql_create_context |
CREATE TABLE date_day (
month_number int,
day_number int,
year int,
day_name varchar
)
CREATE TABLE time_interval (
period text,
begin_time int,
end_time int
)
CREATE TABLE flight_leg (
flight_id int,
leg_number int,
leg_flight int
)
CREATE TABLE days (
days_code varchar,
... | SELECT DISTINCT flight.flight_id FROM airport_service AS AIRPORT_SERVICE_0, airport_service AS AIRPORT_SERVICE_1, city AS CITY_0, city AS CITY_1, fare, flight, flight_fare WHERE (CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'DENVER' AND fare.fare_basis_code = 'QX' AND NOT fare.round_trip_cost I... | atis |
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 mzjzjlb.JZLSH FROM person_info JOIN hz_info JOIN mzjzjlb 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 WHERE person_info.XM = '柏婉娜' AND NOT mzjzjlb.JZLSH IN (SELECT jybgb.JZLSH FROM jybgb WHERE jybgb.BGRQ <= '2006-07-09') | css |
CREATE TABLE table_13956521_2 (
original_airdate VARCHAR,
writer_s_ VARCHAR,
director VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- how many original airdate with writer(s) being becky hartman edwards and director being adam nimoy
| SELECT COUNT(original_airdate) FROM table_13956521_2 WHERE writer_s_ = "Becky Hartman Edwards" AND director = "Adam Nimoy" | sql_create_context |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.