instruction stringlengths 151 7.46k | output stringlengths 2 4.44k | source stringclasses 26
values |
|---|---|---|
CREATE TABLE table_50371 (
"Start Date/Time" text,
"Duration" text,
"End Time" text,
"Spacecraft" text,
"Crew" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- The EVA that started on 8 July 12:38 went for how long?
| SELECT "Duration" FROM table_50371 WHERE "Start Date/Time" = '8 july 12:38' | wikisql |
CREATE TABLE table_16677738_1 (
finsbury_division VARCHAR,
inns_of_court_and_chancery VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- When 1546 is inns of court and chancery what is the finsbury division?
| SELECT finsbury_division FROM table_16677738_1 WHERE inns_of_court_and_chancery = 1546 | sql_create_context |
CREATE TABLE table_name_7 (
laps VARCHAR,
grid VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- WHAT IS THE LAPS WITH A GRID OF 26?
| SELECT laps FROM table_name_7 WHERE grid = "26" | sql_create_context |
CREATE TABLE table_62815 (
"Game" real,
"Date" text,
"Opponent" text,
"Venue" text,
"Result" text,
"Attendance" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- How many games have a Result of 4 0, and an Attendance larger than 12,256?
| SELECT COUNT("Game") FROM table_62815 WHERE "Result" = '4–0' AND "Attendance" > '12,256' | wikisql |
CREATE TABLE table_56772 (
"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.
-- Windy hill is the home to what team?
| SELECT "Home team" FROM table_56772 WHERE "Venue" = 'windy hill' | wikisql |
CREATE TABLE table_24399615_8 (
airdate VARCHAR,
cable_rank VARCHAR,
viewers VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- When 656000 is the amount of viewers and n/a is the cable rank what is the airdate?
| SELECT airdate FROM table_24399615_8 WHERE cable_rank = "N/A" AND viewers = 656000 | sql_create_context |
CREATE TABLE t_kc22 (
AMOUNT number,
CHA_ITEM_LEV number,
DATA_ID text,
DIRE_TYPE number,
DOSE_FORM text,
DOSE_UNIT text,
EACH_DOSAGE text,
EXP_OCC_DATE time,
FLX_MED_ORG_ID text,
FXBZ number,
HOSP_DOC_CD text,
HOSP_DOC_NM text,
MED_DIRE_CD text,
MED_DIRE_NM text,... | SELECT t_kc21.MED_SER_ORG_NO FROM t_kc21 WHERE t_kc21.PERSON_ID = '05485933' AND t_kc21.MED_CLINIC_ID IN (SELECT t_kc21_t_kc22.MED_CLINIC_ID FROM t_kc22 WHERE t_kc22.SOC_SRT_DIRE_NM = '替米沙坦片') | css |
CREATE TABLE table_78669 (
"Date" text,
"Venue" text,
"Score" text,
"Result" text,
"Competition" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which competition took place on October 11, 2006?
| SELECT "Competition" FROM table_78669 WHERE "Date" = 'october 11, 2006' | wikisql |
CREATE TABLE table_name_73 (
to_par VARCHAR,
player VARCHAR,
total VARCHAR,
country VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Lee Trevino of the United States with a total greater than 294 had what To par?
| SELECT to_par FROM table_name_73 WHERE total > 294 AND country = "united states" AND player = "lee trevino" | 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 WHERE demographic.diagnosis = "ABDOMINAL ABSCESS" AND demographic.dod_year <= "2132.0" | mimicsql_data |
CREATE TABLE table_16263 (
"Religious group" text,
"Population %" text,
"Growth (1991\u20132001)" text,
"Sex ratio (total)" real,
"Literacy (%)" text,
"Work participation (%)" text,
"Sex ratio (rural)" real,
"Sex ratio (urban)" real,
"Sex ratio (child)" real
)
-- Using valid SQLite... | SELECT "Population %" FROM table_16263 WHERE "Sex ratio (rural)" = '953' | wikisql |
CREATE TABLE table_24472 (
"Stage" real,
"Winner" text,
"General classification" text,
"Points classification" text,
"Mountains classification" text,
"Asian rider classification" text,
"Team classification" text,
"Asian team classification" text
)
-- Using valid SQLite, answer the foll... | SELECT COUNT("Asian team classification") FROM table_24472 WHERE "Asian rider classification" = 'Samai Amari' | 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 (SELECT patient.admissionweight FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '006-161415' AND NOT patient.hospitaldischargetime IS NULL ORDER BY patient.hospitaladmittime LIMIT 1) AND NOT patient.admissionweight IS NULL O... | eicu |
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 hz_info (
KH text,
KLX number... | SELECT zzmzjzjlb.JZLSH FROM hz_info JOIN zzmzjzjlb ON hz_info.YLJGDM = zzmzjzjlb.YLJGDM AND hz_info.KH = zzmzjzjlb.KH AND hz_info.KLX = zzmzjzjlb.KLX WHERE hz_info.RYBH = '56570950' AND NOT zzmzjzjlb.JZLSH IN (SELECT jybgb.JZLSH FROM jybgb WHERE jybgb.BGRQ <= '2007-10-09') UNION SELECT fzzmzjzjlb.JZLSH FROM hz_info JOI... | css |
CREATE TABLE table_65031 (
"Party" text,
"Burnley" real,
"Chorley" real,
"Fylde" real,
"Hyndburn" real,
"Lancaster" real,
"Pendle" real,
"Preston" real,
"Ribble Valley" real,
"Rossendale" real,
"South Ribble" real,
"West Lancashire" real,
"Wyre" real,
"Total" real... | SELECT MAX("West Lancashire") FROM table_65031 WHERE "Pendle" > '1' AND "Rossendale" > '2' | wikisql |
CREATE TABLE table_20866024_4 (
gvw__kg_ton_ VARCHAR,
model_designation VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the GVW for model 97H00?
| SELECT gvw__kg_ton_ FROM table_20866024_4 WHERE model_designation = "97H00" | sql_create_context |
CREATE TABLE table_name_87 (
result VARCHAR,
film VARCHAR,
award VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is Result, when Film is 'Dharma Chakram', and when Award is 'Nandi Award for Best Actor'?
| SELECT result FROM table_name_87 WHERE film = "dharma chakram" AND award = "nandi award for best actor" | sql_create_context |
CREATE TABLE table_64665 (
"Date" text,
"Venue" text,
"Score" text,
"Result" text,
"Competition" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- At what venue was the 2010 FIFA World Cup Qualification?
| SELECT "Venue" FROM table_64665 WHERE "Competition" = '2010 fifa world cup qualification' | wikisql |
CREATE TABLE table_23235546_1 (
score_in_the_final VARCHAR,
outcome VARCHAR,
year VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What was the score in the final when the outcome was winner in 1989?
| SELECT score_in_the_final FROM table_23235546_1 WHERE outcome = "Winner" AND year = 1989 | 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 lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.dod_year <= "2183.0" AND lab.itemid = "51351" | mimicsql_data |
CREATE TABLE table_name_56 (
shooter VARCHAR,
time VARCHAR,
year VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which shooter's time is more than 8.97 and has a year prior to 2013?
| SELECT shooter FROM table_name_56 WHERE time > 8.97 AND year < 2013 | sql_create_context |
CREATE TABLE customer_event_notes (
customer_event_note_id number,
customer_event_id number,
service_type_code text,
resident_id number,
property_id number,
date_moved_in time
)
CREATE TABLE customers (
customer_id number,
customer_details text
)
CREATE TABLE residents (
resident_i... | SELECT T1.customer_id, T1.customer_details FROM customers AS T1 JOIN customer_events AS T2 ON T1.customer_id = T2.customer_id GROUP BY T1.customer_id HAVING COUNT(*) >= 3 | spider |
CREATE TABLE university (
School_ID int,
School text,
Location text,
Founded real,
Affiliation text,
Enrollment real,
Nickname text,
Primary_conference text
)
CREATE TABLE basketball_match (
Team_ID int,
School_ID int,
Team_Name text,
ACC_Regular_Season text,
ACC_Per... | SELECT Team_Name, All_Games_Percent FROM basketball_match ORDER BY All_Games_Percent | nvbench |
CREATE TABLE person_info (
CSD text,
CSRQ time,
GJDM text,
GJMC text,
JGDM text,
JGMC text,
MZDM text,
MZMC text,
RYBH text,
XBDM number,
XBMC text,
XLDM text,
XLMC text,
XM text,
ZYLBDM text,
ZYMC text
)
CREATE TABLE jybgb (
BBCJBW text,
BBDM tex... | SELECT jybgb.JYXMDM, jybgb.JYXMMC FROM jybgb WHERE jybgb.BGDH = '92893885398' | css |
CREATE TABLE table_name_22 (
erp_w VARCHAR,
call_sign VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the ERP W for K236AM?
| SELECT erp_w FROM table_name_22 WHERE call_sign = "k236am" | sql_create_context |
CREATE TABLE table_35570 (
"Version" text,
"Length" text,
"Album" text,
"Remixed by" text,
"Year" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What's the Length with the Version of Album Version?
| SELECT "Length" FROM table_35570 WHERE "Version" = 'album version' | wikisql |
CREATE TABLE table_63136 (
"Match" real,
"Date" text,
"Competition or tour" text,
"Ground" text,
"Opponent" text,
"Score1" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What ground had Portsmouth reserves as an opponent?
| SELECT "Ground" FROM table_63136 WHERE "Opponent" = 'portsmouth reserves' | wikisql |
CREATE TABLE enzyme (
Id VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- How many kinds of enzymes are there?
| SELECT COUNT(*) FROM enzyme | sql_create_context |
CREATE TABLE diagnoses (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE demographic (
subject_id text,
hadm_id text,
name text,
marital_status text,
age text,
dob text,
gender text,
language text,
religion text,
... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.diagnosis = "SEPSIS" AND lab.fluid = "Urine" | mimicsql_data |
CREATE TABLE diagnoses_icd (
row_id number,
subject_id number,
hadm_id number,
icd9_code text,
charttime time
)
CREATE TABLE transfers (
row_id number,
subject_id number,
hadm_id number,
icustay_id number,
eventtype text,
careunit text,
wardid number,
intime time,
... | SELECT admissions.admittime FROM admissions WHERE admissions.subject_id = 90663 AND admissions.admission_location = 'clinic referral/premature' AND DATETIME(admissions.admittime, 'start of year') = DATETIME(CURRENT_TIME(), 'start of year', '-0 year') ORDER BY admissions.admittime LIMIT 1 | mimic_iii |
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', medication.drugstarttime)) FROM medication WHERE medication.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '022-784... | eicu |
CREATE TABLE table_name_11 (
event VARCHAR,
method VARCHAR,
record VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What Event used submission (rear naked choke) with 9-4?
| SELECT event FROM table_name_11 WHERE method = "submission (rear naked choke)" AND record = "9-4" | sql_create_context |
CREATE TABLE table_name_63 (
name_ VARCHAR,
b_ VARCHAR,
Pwin_percentage VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the name of the person with a PWin% of .696?
| SELECT name_ AS "b_" FROM table_name_63 WHERE Pwin_percentage = 0.696 | sql_create_context |
CREATE TABLE table_9895 (
"Ship" text,
"Guns" text,
"Commander" text,
"Complement" real,
"Notes" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which commander received complement larger than 240 , guns of 66 and ship of revolutie?
| SELECT "Commander" FROM table_9895 WHERE "Complement" > '240' AND "Guns" = '66' AND "Ship" = 'revolutie' | wikisql |
CREATE TABLE grapes (
ID INTEGER,
Grape TEXT,
Color TEXT
)
CREATE TABLE wine (
No INTEGER,
Grape TEXT,
Winery TEXT,
Appelation TEXT,
State TEXT,
Name TEXT,
Year INTEGER,
Price INTEGER,
Score INTEGER,
Cases INTEGER,
Drink TEXT
)
CREATE TABLE appellations (
No... | SELECT Grape, COUNT(Grape) FROM wine GROUP BY Grape ORDER BY COUNT(Grape) | nvbench |
CREATE TABLE CLASS (
CLASS_CODE varchar(5),
CRS_CODE varchar(10),
CLASS_SECTION varchar(2),
CLASS_TIME varchar(20),
CLASS_ROOM varchar(8),
PROF_NUM int
)
CREATE TABLE ENROLL (
CLASS_CODE varchar(5),
STU_NUM int,
ENROLL_GRADE varchar(50)
)
CREATE TABLE STUDENT (
STU_NUM int,
... | SELECT EMP_FNAME, COUNT(EMP_FNAME) FROM PROFESSOR AS T1 JOIN EMPLOYEE AS T2 ON T1.EMP_NUM = T2.EMP_NUM GROUP BY EMP_FNAME ORDER BY EMP_FNAME | nvbench |
CREATE TABLE invoice_items (
invoice_item_id number,
invoice_id number,
order_id number,
order_item_id number,
product_id number,
order_quantity number,
other_item_details text
)
CREATE TABLE invoices (
invoice_id number,
order_id number,
payment_method_code text,
product_id... | SELECT DISTINCT product_name FROM products WHERE product_price > (SELECT AVG(product_price) FROM products) | spider |
CREATE TABLE Customers (
customer_id INTEGER,
customer_address_id INTEGER,
customer_status_code VARCHAR(15),
date_became_customer DATETIME,
date_of_birth DATETIME,
first_name VARCHAR(80),
last_name VARCHAR(80),
amount_outstanding DOUBLE,
email_address VARCHAR(250),
phone_number V... | SELECT customer_status_code, COUNT(*) FROM Customers GROUP BY customer_status_code | nvbench |
CREATE TABLE microbiologyevents (
row_id number,
subject_id number,
hadm_id number,
charttime time,
spec_type_desc text,
org_name text
)
CREATE TABLE labevents (
row_id number,
subject_id number,
hadm_id number,
itemid number,
charttime time,
valuenum number,
valueuo... | SELECT labevents.charttime FROM labevents WHERE labevents.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 61527) AND DATETIME(labevents.charttime, 'start of year') = DATETIME(CURRENT_TIME(), 'start of year', '-1 year') AND STRFTIME('%m', labevents.charttime) = '03' ORDER BY labevents... | mimic_iii |
CREATE TABLE Badges (
Id number,
UserId number,
Name text,
Date time,
Class number,
TagBased boolean
)
CREATE TABLE ReviewTasks (
Id number,
ReviewTaskTypeId number,
CreationDate time,
DeletionDate time,
ReviewTaskStateId number,
PostId number,
SuggestedEditId number... | SELECT PostId AS "post_link", t.Name, po.CreationDate FROM PostHistory AS p INNER JOIN PostHistoryTypes AS t ON p.PostHistoryTypeId = t.Id INNER JOIN Posts AS po ON p.PostId = po.Id WHERE PostHistoryTypeId IN (19, 20) AND UserId = '##UserId:int##' | sede |
CREATE TABLE table_9171 (
"Date" text,
"Venue" text,
"Score" text,
"Result" text,
"Competition" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What was the venue when the result was 3-2?
| SELECT "Venue" FROM table_9171 WHERE "Result" = '3-2' | wikisql |
CREATE TABLE table_name_15 (
attendance INTEGER,
loss VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- How many were in attendance for the loss of rekar (4 5)?
| SELECT SUM(attendance) FROM table_name_15 WHERE loss = "rekar (4–5)" | sql_create_context |
CREATE TABLE table_3933 (
"Round" real,
"Race" text,
"Pole position" text,
"Fastest lap" text,
"Most laps led" text,
"Driver" text,
"Team" text,
"Manufacturer" text,
"Report" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Who was the... | SELECT "Driver" FROM table_3933 WHERE "Round" = '4' | wikisql |
CREATE TABLE table_204_442 (
id number,
"institution" text,
"location" text,
"enrollment" number,
"nickname" text,
"varsity\nsports" number,
"rugby\nsince" text,
"head coach" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- has viginia tec... | SELECT "institution" FROM table_204_442 WHERE "institution" IN ('virginia tech', 'wake forest') ORDER BY "rugby\nsince" LIMIT 1 | squall |
CREATE TABLE table_name_53 (
points INTEGER,
year VARCHAR,
chassis VARCHAR,
engine VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the highest points for the JBW chassis with a climax straight-4 engine, later than 1961?
| SELECT MAX(points) FROM table_name_53 WHERE chassis = "jbw" AND engine = "climax straight-4" AND year > 1961 | sql_create_context |
CREATE TABLE table_name_95 (
race_number VARCHAR,
driver VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- what is the race number of bob wollek
| SELECT race_number FROM table_name_95 WHERE driver = "bob wollek" | sql_create_context |
CREATE TABLE city (
city_code varchar,
city_name varchar,
state_code varchar,
country_name varchar,
time_zone_code varchar
)
CREATE TABLE flight_fare (
flight_id int,
fare_id int
)
CREATE TABLE flight_stop (
flight_id int,
stop_number int,
stop_days text,
stop_airport text,... | SELECT DISTINCT flight.flight_id FROM airport_service AS AIRPORT_SERVICE_0, airport_service AS AIRPORT_SERVICE_1, city AS CITY_0, city AS CITY_1, date_day, days, flight WHERE (CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'ATLANTA' AND date_day.day_number = 22 AND date_day.month_number = 3 AND d... | atis |
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 AVG(t_kc22.SELF_PAY_PRO) FROM t_kc21 JOIN t_kc22 ON t_kc21.MED_CLINIC_ID = t_kc22.MED_CLINIC_ID WHERE t_kc21.MED_SER_ORG_NO = '0734088' AND t_kc22.STA_DATE BETWEEN '2016-12-12' AND '2020-02-04' | css |
CREATE TABLE table_name_76 (
rank VARCHAR,
gatchaman VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the rank of the gatchaman of Jinpei?
| SELECT rank FROM table_name_76 WHERE gatchaman = "jinpei" | sql_create_context |
CREATE TABLE VoteTypes (
Id number,
Name text
)
CREATE TABLE Votes (
Id number,
PostId number,
VoteTypeId number,
UserId number,
CreationDate time,
BountyAmount number
)
CREATE TABLE ReviewTaskResults (
Id number,
ReviewTaskId number,
ReviewTaskResultTypeId number,
Crea... | SELECT Users.DisplayName, COUNT(*) AS questions FROM Tags INNER JOIN PostTags ON PostTags.TagId = Tags.Id INNER JOIN Posts ON Posts.ParentId = PostTags.PostId INNER JOIN Users ON Users.Id = Posts.OwnerUserId WHERE Tags.Id = 34113 AND Posts.CreationDate > '2015-01-01 00:00:00' GROUP BY Users.DisplayName ORDER BY questio... | sede |
CREATE TABLE table_33928 (
"Model Number" text,
"Stepping" text,
"Frequency" text,
"L2 Cache" text,
"Multi 1" text,
"V Core" text,
"Socket" text,
"Release Date" text,
"Part Number(s)" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Wh... | SELECT "Frequency" FROM table_33928 WHERE "Multi 1" = '7.5×' | wikisql |
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 (SELECT COUNT(*) 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 = '13034482' AND mzjzjlb.JZKSRQ BETWEEN '2003-04-25' AND '2009-02-02') + (SELECT COUNT(*) FROM hz_info JOIN wdmzjzjlb ON hz_info.YLJGDM = wdmzjzjlb.YLJGDM AND... | css |
CREATE TABLE table_34590 (
"Position" real,
"Team" text,
"Points" real,
"Played" real,
"Drawn" real,
"Lost" real,
"Against" real,
"Difference" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which average's against score has 2 as a differ... | SELECT AVG("Against") FROM table_34590 WHERE "Difference" = '2' AND "Lost" = '5' | wikisql |
CREATE TABLE table_name_31 (
laps INTEGER,
time_retired VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the top lap that had a tyre time?
| SELECT MAX(laps) FROM table_name_31 WHERE time_retired = "tyre" | sql_create_context |
CREATE TABLE table_name_80 (
callsign VARCHAR,
icao VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the callsign where the ICAO is AAR?
| SELECT callsign FROM table_name_80 WHERE icao = "aar" | sql_create_context |
CREATE TABLE table_243664_1 (
game_cost VARCHAR,
railroad VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Name the game coast for chicago and north western
| SELECT game_cost FROM table_243664_1 WHERE railroad = "Chicago and North Western" | sql_create_context |
CREATE TABLE table_name_93 (
tournament VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the tournament when 2010 is q2, and 2009 is 1r?
| SELECT tournament FROM table_name_93 WHERE 2010 = "q2" AND 2009 = "1r" | sql_create_context |
CREATE TABLE d_labitems (
row_id number,
itemid number,
label text
)
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,
lan... | SELECT 24 * (STRFTIME('%j', CURRENT_TIME()) - STRFTIME('%j', labevents.charttime)) FROM labevents WHERE labevents.itemid IN (SELECT d_labitems.itemid FROM d_labitems WHERE d_labitems.label = 'sodium, whole blood') AND labevents.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 9566 AND... | mimic_iii |
CREATE TABLE table_51697 (
"Year" real,
"Theme" text,
"Artist" text,
"Mintage" text,
"Issue Price" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What was the issue price in the year 2008?
| SELECT SUM("Issue Price") FROM table_51697 WHERE "Year" = '2008' | wikisql |
CREATE TABLE table_19017269_5 (
world INTEGER,
latin_america_caribbean VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is population in the world when 788 (8.1%)?
| SELECT MIN(world) FROM table_19017269_5 WHERE latin_america_caribbean = "788 (8.1%)" | sql_create_context |
CREATE TABLE professor (
emp_num number,
dept_code text,
prof_office text,
prof_extension text,
prof_high_degree text
)
CREATE TABLE department (
dept_code text,
dept_name text,
school_code text,
emp_num number,
dept_address text,
dept_extension text
)
CREATE TABLE enroll (... | SELECT dept_address FROM department WHERE dept_name = 'History' | spider |
CREATE TABLE table_16724844_1 (
mens_open VARCHAR,
womens_40 VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What were the results of the mens open when the womens 40 was Sydney Scorpions defeated Hunter Hornets?
| SELECT mens_open FROM table_16724844_1 WHERE womens_40 = "Sydney Scorpions defeated Hunter Hornets" | sql_create_context |
CREATE TABLE table_23433 (
"No. in series" real,
"No. in season" real,
"Title" text,
"Directed by" text,
"Written by" text,
"Original air date" text,
"Production code" text,
"U.S. viewers (millions)" text
)
-- Using valid SQLite, answer the following questions for the tables provided a... | SELECT COUNT("Directed by") FROM table_23433 WHERE "No. in series" = '38' | 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_kc21.OUT_DIAG_DIS_CD, t_kc21.OUT_DIAG_DIS_NM FROM t_kc21 WHERE t_kc21.PERSON_NM = '奚丽珠' AND t_kc21.MED_CLINIC_ID IN (SELECT t_kc24.MED_CLINIC_ID FROM t_kc24 WHERE t_kc24.MED_AMOUT >= 381.88) | css |
CREATE TABLE mzb (
CLINIC_ID text,
COMP_ID text,
DATA_ID text,
DIFF_PLACE_FLG number,
FERTILITY_STS number,
FLX_MED_ORG_ID text,
HOSP_LEV number,
HOSP_STS number,
IDENTITY_CARD text,
INPT_AREA_BED text,
INSURED_IDENTITY number,
INSURED_STS text,
INSU_TYPE text,
IN... | SELECT qtb.IN_DIAG_DIS_CD, qtb.IN_DIAG_DIS_NM FROM qtb WHERE qtb.PERSON_ID = '81282369' UNION SELECT gyb.IN_DIAG_DIS_CD, gyb.IN_DIAG_DIS_NM FROM gyb WHERE gyb.PERSON_ID = '81282369' UNION SELECT zyb.IN_DIAG_DIS_CD, zyb.IN_DIAG_DIS_NM FROM zyb WHERE zyb.PERSON_ID = '81282369' UNION SELECT mzb.IN_DIAG_DIS_CD, mzb.IN_DIAG... | css |
CREATE TABLE diagnoses (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE demographic (
subject_id text,
hadm_id text,
name text,
marital_status text,
age text,
dob text,
gender text,
language text,
religion text,
... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.diagnosis = "MESENTERIC ISCHEMIA" AND procedures.short_title = "Chordae tendineae ops" | mimicsql_data |
CREATE TABLE table_4942 (
"Rank" text,
"Name" text,
"Height m / feet" text,
"Floors" text,
"Notes" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What's the rank for Daewoo Business Center when the notes are cancelled?
| SELECT "Rank" FROM table_4942 WHERE "Notes" = 'cancelled' AND "Name" = 'daewoo business center' | 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 prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE demographic.admission_type = "ELECTIVE" AND prescriptions.drug = "Propofol" | mimicsql_data |
CREATE TABLE table_name_26 (
rank INTEGER,
studio VARCHAR,
gross VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the average rank of the movie from Paramount Studios that grossed $200,512,643?
| SELECT AVG(rank) FROM table_name_26 WHERE studio = "paramount" AND gross = "$200,512,643" | sql_create_context |
CREATE TABLE table_20760407_1 (
game INTEGER,
bruins_points VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What game did the Bruins have 56 points?
| SELECT MAX(game) FROM table_20760407_1 WHERE bruins_points = 56 | sql_create_context |
CREATE TABLE medication (
medicationid number,
patientunitstayid number,
drugname text,
dosage text,
routeadmin text,
drugstarttime time,
drugstoptime time
)
CREATE TABLE patient (
uniquepid text,
patienthealthsystemstayid number,
patientunitstayid number,
gender text,
a... | SELECT STRFTIME('%j', patient.hospitaldischargetime) - STRFTIME('%j', patient.hospitaladmittime) FROM patient WHERE patient.uniquepid = '025-51835' AND NOT patient.hospitaladmittime IS NULL ORDER BY patient.hospitaladmittime LIMIT 1 | eicu |
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_CLINIC_ID text,
MED_DIRE_CD tex... | SELECT t_kc22.SOC_SRT_DIRE_CD, t_kc22.SOC_SRT_DIRE_NM FROM t_kc21 JOIN t_kc22 ON t_kc21.MED_CLINIC_ID = t_kc22.MED_CLINIC_ID WHERE t_kc21.MED_SER_ORG_NO = '4618778' GROUP BY t_kc22.SOC_SRT_DIRE_CD ORDER BY SUM(t_kc22.AMOUNT) DESC LIMIT 10 | css |
CREATE TABLE table_61539 (
"Res." text,
"Record" text,
"Opponent" text,
"Method" text,
"Event" text,
"Round" real,
"Time" text,
"Location" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What Method was used with opponent Kenneth Allen?
| SELECT "Method" FROM table_61539 WHERE "Opponent" = 'kenneth allen' | wikisql |
CREATE TABLE gyb (
CLINIC_ID text,
COMP_ID text,
DATA_ID text,
DIFF_PLACE_FLG number,
FERTILITY_STS number,
FLX_MED_ORG_ID text,
HOSP_LEV number,
HOSP_STS number,
IDENTITY_CARD text,
INPT_AREA_BED text,
INSURED_IDENTITY number,
INSURED_STS text,
INSU_TYPE text,
IN... | SELECT AVG(t_kc24.MED_AMOUT) FROM t_kc24 WHERE t_kc24.MED_CLINIC_ID IN (SELECT qtb.MED_CLINIC_ID FROM qtb WHERE qtb.PERSON_AGE >= 15 UNION SELECT gyb.MED_CLINIC_ID FROM gyb WHERE gyb.PERSON_AGE >= 15 UNION SELECT zyb.MED_CLINIC_ID FROM zyb WHERE zyb.PERSON_AGE >= 15 UNION SELECT mzb.MED_CLINIC_ID FROM mzb WHERE mzb.PER... | css |
CREATE TABLE table_46752 (
"Place" text,
"Player" text,
"Country" text,
"Score" real,
"To par" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is Scott Hoch with a Score of 66 Country?
| SELECT "Country" FROM table_46752 WHERE "Score" = '66' AND "Player" = 'scott hoch' | wikisql |
CREATE TABLE cinema (
Cinema_ID int,
Name text,
Openning_year int,
Capacity int,
Location text
)
CREATE TABLE schedule (
Cinema_ID int,
Film_ID int,
Date text,
Show_times_per_day int,
Price float
)
CREATE TABLE film (
Film_ID int,
Rank_in_series int,
Number_in_seaso... | SELECT Title, MAX(T1.Price) FROM schedule AS T1 JOIN film AS T2 ON T1.Film_ID = T2.Film_ID GROUP BY Title | nvbench |
CREATE TABLE table_name_87 (
reg_season VARCHAR,
record VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the regular season info that had a record of 20-10?
| SELECT reg_season FROM table_name_87 WHERE record = "20-10" | sql_create_context |
CREATE TABLE jybgb (
YLJGDM text,
YLJGDM_MZJZJLB text,
YLJGDM_ZYJZJLB text,
BGDH text,
BGRQ time,
JYLX number,
JZLSH text,
JZLSH_MZJZJLB text,
JZLSH_ZYJZJLB text,
JZLX number,
KSBM text,
KSMC text,
SQRGH text,
SQRXM text,
BGRGH text,
BGRXM text,
SHRGH ... | (SELECT * 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.BGDH WHERE hz_info.RYBH = ... | css |
CREATE TABLE member (
member_id number,
member_name text,
party_id text,
in_office text
)
CREATE TABLE party (
party_id number,
minister text,
took_office text,
left_office text,
region_id number,
party_name text
)
CREATE TABLE region (
region_id number,
region_name tex... | SELECT member_name FROM member EXCEPT SELECT T1.member_name FROM member AS T1 JOIN party_events AS T2 ON T1.member_id = T2.member_in_charge_id | spider |
CREATE TABLE table_10812938_4 (
college VARCHAR,
cfl_team VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which college is aligned to the Saskatchewan Roughriders?
| SELECT college FROM table_10812938_4 WHERE cfl_team = "Saskatchewan Roughriders" | 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 diagnoses (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
C... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE demographic.days_stay > "11" AND prescriptions.drug_type = "BASE" | mimicsql_data |
CREATE TABLE table_77609 (
"Episode" text,
"Rating" real,
"Share" real,
"Rating/Share (18\u201349)" text,
"Viewers (millions)" real,
"Weekly Rank" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the average rating for 'a lost puppy dog'?
| SELECT AVG("Rating") FROM table_77609 WHERE "Episode" = 'a lost puppy dog' | wikisql |
CREATE TABLE table_60219 (
"Place" text,
"Player" text,
"Country" text,
"Score" text,
"To par" text,
"Money ( $ )" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What was the average money when the score was 74-72-75-71=292?
| SELECT AVG("Money ( $ )") FROM table_60219 WHERE "Score" = '74-72-75-71=292' | wikisql |
CREATE TABLE table_21436373_12 (
attendance VARCHAR,
date_year VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- what is the attendance in 2011 records
| SELECT attendance FROM table_21436373_12 WHERE date_year = "2011" | sql_create_context |
CREATE TABLE txmzjzjlb (
HXPLC number,
HZXM text,
JLSJ time,
JZJSSJ time,
JZKSBM text,
JZKSMC text,
JZKSRQ time,
JZLSH number,
JZZDBM text,
JZZDSM text,
JZZTDM number,
JZZTMC text,
KH text,
KLX number,
MJZH text,
ML number,
MZZYZDZZBM text,
MZZYZDZ... | SELECT COUNT(*) FROM txmzjzjlb WHERE txmzjzjlb.JZKSBM = '16206' AND txmzjzjlb.JZKSRQ BETWEEN '2000-12-12' AND '2001-10-14' UNION SELECT COUNT(*) FROM ftxmzjzjlb WHERE ftxmzjzjlb.JZKSBM = '16206' AND ftxmzjzjlb.JZKSRQ BETWEEN '2000-12-12' AND '2001-10-14' | css |
CREATE TABLE table_74285 (
"#" text,
"Player" text,
"Country" text,
"Score" text,
"To par" text,
"Winnings ($)" real,
"After" real,
"Before" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the player listed when the score is 68-70... | SELECT "Player" FROM table_74285 WHERE "Score" = '68-70-68-69=275' | wikisql |
CREATE TABLE elimination (
elimination_id text,
wrestler_id text,
team text,
eliminated_by text,
elimination_move text,
time text
)
CREATE TABLE wrestler (
wrestler_id number,
name text,
reign text,
days_held text,
location text,
event text
)
-- Using valid SQLite, ans... | SELECT T2.name, T1.team FROM elimination AS T1 JOIN wrestler AS T2 ON T1.wrestler_id = T2.wrestler_id ORDER BY T2.days_held DESC | spider |
CREATE TABLE hz_info (
KH text,
KLX number,
YLJGDM text
)
CREATE TABLE jybgb (
BBCJBW text,
BBDM text,
BBMC text,
BBZT number,
BGDH text,
BGJGDM text,
BGJGMC text,
BGRGH text,
BGRQ time,
BGRXM text,
BGSJ time,
CJRQ time,
JSBBRQSJ time,
JSBBSJ time,
... | SELECT * 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 person_info_hz_i... | css |
CREATE TABLE table_44206 (
"Round" real,
"Pick" real,
"Player" text,
"Nationality" text,
"School/Club Team" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is Pick, when Player is 'Dexter Bailey'?
| SELECT "Pick" FROM table_44206 WHERE "Player" = 'dexter bailey' | wikisql |
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 AVG(intakeoutput.cellvaluenumeric) FROM intakeoutput WHERE intakeoutput.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '012-20116' AND patient.hospitaldischargetime IS ... | eicu |
CREATE TABLE table_4103 (
"No. in series" real,
"No. in season" real,
"Title" text,
"Director" text,
"Writer(s)" text,
"Original air date" text,
"Production code" text,
"U.S. Viewers (million)" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
... | SELECT "Director" FROM table_4103 WHERE "No. in season" = '11' | wikisql |
CREATE TABLE table_6737 (
"Date" real,
"Tournament" text,
"Surface" text,
"Partner" text,
"Opponent in the final" text,
"Score in the final" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- When has a Surface of clay, and an Opponent in the final ... | SELECT "Date" FROM table_6737 WHERE "Surface" = 'clay' AND "Opponent in the final" = 'andrés gómez javier sánchez' | wikisql |
CREATE TABLE person_info (
RYBH text,
XBDM number,
XBMC text,
XM text,
CSRQ time,
CSD text,
MZDM text,
MZMC text,
GJDM text,
GJMC text,
JGDM text,
JGMC text,
XLDM text,
XLMC text,
ZYLBDM text,
ZYMC text
)
CREATE TABLE jyjgzbb (
JYZBLSH text,
YLJGD... | SELECT * FROM person_info JOIN hz_info JOIN zyjzjlb ON person_info.RYBH = hz_info.RYBH AND hz_info.YLJGDM = zyjzjlb.YLJGDM AND hz_info.KH = zyjzjlb.KH AND hz_info.KLX = zyjzjlb.KLX WHERE person_info.XM = '范修然' AND hz_info.YLJGDM = '7077773' AND zyjzjlb.JZKSMC LIKE '%药房%' | css |
CREATE TABLE table_49214 (
"Game" real,
"Date" text,
"Team" text,
"Score" text,
"High points" text,
"High rebounds" text,
"High assists" text,
"Location Attendance" text,
"Record" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What i... | SELECT "Score" FROM table_49214 WHERE "High points" = 'luis scola (18)' AND "High rebounds" = 'luis scola (11)' | wikisql |
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 wdmzjzjlb (
HXPLC number,
HZX... | SELECT wdmzjzjlb.YLJGDM FROM hz_info JOIN wdmzjzjlb ON hz_info.YLJGDM = wdmzjzjlb.YLJGDM AND hz_info.KH = wdmzjzjlb.KH AND hz_info.KLX = wdmzjzjlb.KLX WHERE hz_info.RYBH = '34588710' UNION SELECT bdmzjzjlb.YLJGDM FROM hz_info JOIN bdmzjzjlb ON hz_info.YLJGDM = bdmzjzjlb.YLJGDM AND hz_info.KH = bdmzjzjlb.KH AND hz_info.... | css |
CREATE TABLE round (
Round_ID int,
Member_ID int,
Decoration_Theme text,
Rank_in_Round int
)
CREATE TABLE member (
Member_ID int,
Name text,
Country text,
College_ID int
)
CREATE TABLE college (
College_ID int,
Name text,
Leader_Name text,
College_Location text
)
-- U... | SELECT T1.Name, COUNT(T1.Name) FROM college AS T1 JOIN member AS T2 ON T1.College_ID = T2.College_ID GROUP BY T1.Name ORDER BY COUNT(T1.Name) | nvbench |
CREATE TABLE table_74428 (
"Date" text,
"Episode" real,
"Official rating 4+" text,
"Share 4+" text,
"Official rating 16-39" text,
"Share 16-39" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- what is the official rating 16-39 for the episode with... | SELECT "Official rating 16-39" FROM table_74428 WHERE "Share 16-39" = '22,77%' | wikisql |
CREATE TABLE table_40117 (
"Week" real,
"Date" text,
"Opponent" text,
"Result" text,
"Attendance" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- When was the game that had 58,025 people in attendance?
| SELECT "Date" FROM table_40117 WHERE "Attendance" = '58,025' | wikisql |
CREATE TABLE semester (
semester_id int,
semester varchar,
year int
)
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... | SELECT DISTINCT instructor.name, program_course.workload FROM instructor INNER JOIN offering_instructor ON offering_instructor.instructor_id = instructor.instructor_id INNER JOIN course_offering ON offering_instructor.offering_id = course_offering.offering_id INNER JOIN program_course ON program_course.course_id = cour... | advising |
CREATE TABLE procedures (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE demographic (
subject_id text,
hadm_id text,
name text,
marital_status text,
age text,
dob text,
gender text,
language text,
religion text,
... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE demographic.age < "55" AND prescriptions.formulary_drug_cd = "SYRG1" | mimicsql_data |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.