instruction stringlengths 151 7.46k | output stringlengths 2 4.44k | source stringclasses 26
values |
|---|---|---|
CREATE TABLE table_43041 (
"Date" text,
"Time" text,
"Home" text,
"Away" text,
"Score" text,
"Ground" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is Away, when Home is Guelph Gargoyles?
| SELECT "Away" FROM table_43041 WHERE "Home" = 'guelph gargoyles' | wikisql |
CREATE TABLE classroom (
building varchar(15),
room_number varchar(7),
capacity numeric(4,0)
)
CREATE TABLE instructor (
ID varchar(5),
name varchar(20),
dept_name varchar(20),
salary numeric(8,2)
)
CREATE TABLE department (
dept_name varchar(20),
building varchar(15),
budget n... | SELECT building, COUNT(building) FROM department GROUP BY building ORDER BY COUNT(building) | nvbench |
CREATE TABLE table_10812938_5 (
pick__number INTEGER,
cfl_team VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What's the pick number of the player from Toronto Argonauts?
| SELECT MIN(pick__number) FROM table_10812938_5 WHERE cfl_team = "Toronto Argonauts" | sql_create_context |
CREATE TABLE table_65371 (
"Name" text,
"Team" text,
"Qual 1" text,
"Qual 2" text,
"Best" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Name the the Best of rodolfo lav n
| SELECT "Best" FROM table_65371 WHERE "Name" = 'rodolfo lavín' | wikisql |
CREATE TABLE table_11391954_3 (
Half INTEGER
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the minimum number for the half marathon (womens)?
| SELECT MIN(Half) AS marathon__womens_ FROM table_11391954_3 | sql_create_context |
CREATE TABLE table_29678 (
"Tournament" text,
"Games played" real,
"Points per game" text,
"Rebounds per game" text,
"Assists per game" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- How many points per game did he have when he had 1.5 assists per g... | SELECT "Points per game" FROM table_29678 WHERE "Assists per game" = '1.5' | wikisql |
CREATE TABLE prescriptions (
row_id number,
subject_id number,
hadm_id number,
startdate time,
enddate time,
drug text,
dose_val_rx text,
dose_unit_rx text,
route text
)
CREATE TABLE d_icd_diagnoses (
row_id number,
icd9_code text,
short_title text,
long_title text
)... | SELECT MIN(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 = 20693)) AND chartevents.itemid IN (SELECT d_items.itemid FROM d_items WHERE d_items.label = 'admi... | mimic_iii |
CREATE TABLE table_26739 (
"Series No." real,
"Episode No." real,
"Title" text,
"Directed by" text,
"Written by" text,
"UK Ratings (BBC2 Rank)" text,
"Original air date" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Who wrote the episode wh... | SELECT "Written by" FROM table_26739 WHERE "UK Ratings (BBC2 Rank)" = '2.27m (5)' | wikisql |
CREATE TABLE table_44686 (
"Conference" text,
"Bids" real,
"Record" text,
"Win %" real,
"Quarterfinals" text,
"Semifinals" text,
"Final" text,
"Champions" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is Bids, when Champions is '1'... | SELECT "Bids" FROM table_44686 WHERE "Champions" = '1' | wikisql |
CREATE TABLE t_kc21_t_kc22 (
MED_CLINIC_ID text,
MED_EXP_DET_ID number
)
CREATE TABLE t_kc21 (
CLINIC_ID text,
CLINIC_TYPE 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 ... | SELECT SUM(t_kc24.PER_ACC_PAY) FROM t_kc21 JOIN t_kc24 ON t_kc21.MED_CLINIC_ID = t_kc24.MED_CLINIC_ID WHERE t_kc21.PERSON_NM = '邹兴国' AND t_kc24.CLINIC_SLT_DATE BETWEEN '2000-06-10' AND '2005-08-21' | css |
CREATE TABLE table_name_12 (
silver VARCHAR,
republic VARCHAR,
total VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Can you tell me total number of Silver that has the Republic of latvian ssr, and the Total larger than 6?
| SELECT COUNT(silver) FROM table_name_12 WHERE republic = "latvian ssr" AND total > 6 | sql_create_context |
CREATE TABLE d_icd_diagnoses (
row_id number,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE microbiologyevents (
row_id number,
subject_id number,
hadm_id number,
charttime time,
spec_type_desc text,
org_name text
)
CREATE TABLE outputevents (
row_id numb... | SELECT d_items.label FROM d_items WHERE d_items.itemid IN (SELECT t1.itemid FROM (SELECT inputevents_cv.itemid, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM inputevents_cv WHERE DATETIME(inputevents_cv.charttime) <= DATETIME(CURRENT_TIME(), '-1 year') GROUP BY inputevents_cv.itemid) AS t1 WHERE t1.c1 <= 4) | mimic_iii |
CREATE TABLE microbiologyevents (
row_id number,
subject_id number,
hadm_id number,
charttime time,
spec_type_desc text,
org_name text
)
CREATE TABLE icustays (
row_id number,
subject_id number,
hadm_id number,
icustay_id number,
first_careunit text,
last_careunit text,
... | 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 = 'neutrophils') AND labevents.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 31854 AND admiss... | mimic_iii |
CREATE TABLE table_1816947_2 (
highest_attendance_away VARCHAR,
average_attendance_home VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- When the home attendance is 3.123, what's the highest away attendance?
| SELECT highest_attendance_away FROM table_1816947_2 WHERE average_attendance_home = "3.123" | sql_create_context |
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 jyjgzbb.JCZBJGDL, jyjgzbb.JCZBJGDW FROM hz_info JOIN mzjzjlb JOIN jybgb JOIN jyjgzbb 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 mzjzjlb.YLJGDM = jybgb.YLJGDM_MZJZJLB AND mzjzjlb.JZLSH = jybgb.JZLSH_MZJZJLB AND jybgb.Y... | css |
CREATE TABLE medication (
medicationid number,
patientunitstayid number,
drugname text,
dosage text,
routeadmin text,
drugstarttime time,
drugstoptime time
)
CREATE TABLE lab (
labid number,
patientunitstayid number,
labname text,
labresult number,
labresulttime time
)
... | SELECT t1.drugname FROM (SELECT medication.drugname, COUNT(medication.drugstarttime) AS c1 FROM medication WHERE medication.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '007... | eicu |
CREATE TABLE table_16048129_5 (
number_of_families VARCHAR,
_percentage_of_total_deportees VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- How many total families are there in regions with 5.8 percent of the population being made up of deportees?
| SELECT COUNT(number_of_families) FROM table_16048129_5 WHERE _percentage_of_total_deportees = "5.8" | sql_create_context |
CREATE TABLE table_19827 (
"North Carolina" text,
"273.7%" text,
"South Carolina" text,
"132.1%" text,
"Mississippi" text,
"95.8%" text,
"Wisconsin" text,
"59.4%" text,
"Vermont" text,
"32.5%" text
)
-- Using valid SQLite, answer the following questions for the tables provided ... | SELECT "Vermont" FROM table_19827 WHERE "95.8%" = '60.6%' | wikisql |
CREATE TABLE table_52581 (
"Date" text,
"Tournament" text,
"Surface" text,
"Opponent in the final" text,
"Score" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Name the surface for score of 7 6(4), 6 1
| SELECT "Surface" FROM table_52581 WHERE "Score" = '7–6(4), 6–1' | wikisql |
CREATE TABLE requirement (
requirement_id int,
requirement varchar,
college varchar
)
CREATE TABLE comment_instructor (
instructor_id int,
student_id int,
score int,
comment_text varchar
)
CREATE TABLE student_record (
student_id int,
course_id int,
semester int,
grade varc... | SELECT DISTINCT course_offering.end_time, course_offering.friday, course_offering.monday, course_offering.saturday, course_offering.start_time, course_offering.sunday, course_offering.thursday, course_offering.tuesday, course_offering.wednesday FROM course, course_offering, semester WHERE course.course_id = course_offe... | advising |
CREATE TABLE Users (
Id number,
Reputation number,
CreationDate time,
DisplayName text,
LastAccessDate time,
WebsiteUrl text,
Location text,
AboutMe text,
Views number,
UpVotes number,
DownVotes number,
ProfileImageUrl text,
EmailHash text,
AccountId number
)
CRE... | SELECT e.PostId AS "post_link", p.Score, p.CreationDate AS "creation_date", e.CreationDate AS "undeletion_date" FROM PostHistory AS e INNER JOIN Posts AS p ON p.Id = e.PostId WHERE e.PostHistoryTypeId = 13 AND p.PostTypeId = 2 AND p.Id NOT IN (SELECT f.PostId FROM PostHistory AS f WHERE f.PostHistoryTypeId = 12) AND p.... | sede |
CREATE TABLE table_20052 (
"Position" real,
"Team" text,
"Points" real,
"Played" real,
"Won" real,
"Drawn" real,
"Lost" real,
"For" real,
"Against" real,
"Difference" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- When there is a... | SELECT MAX("Drawn") FROM table_20052 WHERE "Lost" = '2' | wikisql |
CREATE TABLE table_203_354 (
id number,
"party" text,
"candidate(s)" text,
"votes" number,
"percentage" number
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- in the 1996 forum , which candidate had the least votes ?
| SELECT "candidate(s)" FROM table_203_354 ORDER BY "votes" LIMIT 1 | squall |
CREATE TABLE table_57677 (
"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.
-- When fitzroy was the home team, how much did the... | SELECT "Away team score" FROM table_57677 WHERE "Home team" = 'fitzroy' | wikisql |
CREATE TABLE table_name_18 (
week__number VARCHAR,
original_artist VARCHAR,
theme VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the Week # when the Beatles were the original artist and the theme was The Beatles?
| SELECT week__number FROM table_name_18 WHERE original_artist = "the beatles" AND theme = "the beatles" | sql_create_context |
CREATE TABLE table_42239 (
"Television service" text,
"Country" text,
"Language" text,
"Content" text,
"HDTV" text,
"Package/Option" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the content when the package/option is qualsiasi and sky ... | SELECT "Content" FROM table_42239 WHERE "Package/Option" = 'qualsiasi' AND "Television service" = 'sky primafila 14' | wikisql |
CREATE TABLE treatment (
treatmentid number,
patientunitstayid number,
treatmentname text,
treatmenttime time
)
CREATE TABLE medication (
medicationid number,
patientunitstayid number,
drugname text,
dosage text,
routeadmin text,
drugstarttime time,
drugstoptime time
)
CREA... | SELECT 1 * (STRFTIME('%j', CURRENT_TIME()) - STRFTIME('%j', 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 = '003-10080' AND patient.hospi... | eicu |
CREATE TABLE prescriptions (
row_id number,
subject_id number,
hadm_id number,
startdate time,
enddate time,
drug text,
dose_val_rx text,
dose_unit_rx text,
route text
)
CREATE TABLE microbiologyevents (
row_id number,
subject_id number,
hadm_id number,
charttime tim... | SELECT COUNT(DISTINCT t1.subject_id) FROM (SELECT admissions.subject_id, procedures_icd.charttime 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 = 'non-invasiv... | mimic_iii |
CREATE TABLE table_18236 (
"District" text,
"Incumbent" text,
"Party" text,
"First elected" real,
"Result" text,
"Candidates" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- To what party does Cardiss Collins belong?
| SELECT "Party" FROM table_18236 WHERE "Incumbent" = 'Cardiss Collins' | wikisql |
CREATE TABLE table_204_721 (
id number,
"rank" number,
"wrestler" text,
"no. of reigns" number,
"combined\ndefenses" number,
"combined\ndays" number
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- what is the difference in the number of combined days ... | SELECT ABS((SELECT "combined\ndays" FROM table_204_721 WHERE "wrestler" = 'kevin steen') - (SELECT "combined\ndays" FROM table_204_721 WHERE "wrestler" = 'davey richards')) | squall |
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 medication (
medi... | SELECT AVG(t1.c1) FROM (SELECT SUM(cost.cost) AS c1 FROM cost WHERE cost.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.patientunitstayid IN (SELECT diagnosis.patientunitstayid FROM diagnosis WHERE diagnosis.diagnosisname = 'coronary artery disease')) AND STRFTIME('%y'... | eicu |
CREATE TABLE table_10695 (
"Party" text,
"1999 Election" real,
"2003 Election" real,
"2007 Election" real,
"May 2010" real,
"2011 Election" real,
"May 2012" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which election, in 2003 had the lowes... | SELECT MIN("2003 Election") FROM table_10695 WHERE "1999 Election" = '57' AND "2007 Election" < '54' | wikisql |
CREATE TABLE hz_info_mzjzjlb (
JZLSH number,
YLJGDM number,
mzjzjlb_id number
)
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,
... | SELECT COUNT(*) FROM mzjzjlb JOIN hz_info_mzjzjlb JOIN hz_info ON hz_info_mzjzjlb.JZLSH = mzjzjlb.JZLSH AND hz_info_mzjzjlb.YLJGDM = hz_info_mzjzjlb.YLJGDM AND hz_info_mzjzjlb.JZLSH = mzjzjlb.JZLSH AND hz_info_mzjzjlb.mzjzjlb_id = mzjzjlb.mzjzjlb_id AND hz_info_mzjzjlb.YLJGDM = hz_info.YLJGDM WHERE hz_info.YLJGDM = '07... | css |
CREATE TABLE table_29218221_2 (
rank VARCHAR,
tues_31_may VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the rank of the rider whose Tues 31 May time was 19' 02.34 118.903mph?
| SELECT rank FROM table_29218221_2 WHERE tues_31_may = "19' 02.34 118.903mph" | sql_create_context |
CREATE TABLE t_kc24 (
MED_SAFE_PAY_ID text,
OVERALL_CD_ORG text,
OVERALL_CD_PERSON text,
MED_CLINIC_ID text,
REF_SLT_FLG number,
CLINIC_SLT_DATE time,
COMP_ID text,
PERSON_ID text,
FLX_MED_ORG_ID text,
INSU_TYPE text,
MED_AMOUT number,
PER_ACC_PAY number,
OVE_PAY numb... | SELECT CLINIC_ID FROM t_kc21 WHERE MED_CLINIC_ID = '61409941156' | css |
CREATE TABLE Customer_Event_Notes (
Customer_Event_Note_ID INTEGER,
Customer_Event_ID INTEGER,
service_type_code CHAR(15),
resident_id INTEGER,
property_id INTEGER,
date_moved_in DATETIME
)
CREATE TABLE Timed_Status_of_Things (
thing_id INTEGER,
Date_and_Date DATETIME,
Status_of_Thi... | SELECT customer_details, COUNT(customer_details) FROM Customers GROUP BY customer_details ORDER BY customer_details | nvbench |
CREATE TABLE table_54180 (
"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 day is st kilda the home side?
| SELECT "Date" FROM table_54180 WHERE "Home team" = 'st kilda' | wikisql |
CREATE TABLE table_name_78 (
works_number INTEGER,
type VARCHAR,
date VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the total works number of the locomotive with 0-6-4t type after 1875?
| SELECT SUM(works_number) FROM table_name_78 WHERE type = "0-6-4t" AND date > 1875 | sql_create_context |
CREATE TABLE table_15318 (
"Year" text,
"Start" text,
"Qual" text,
"Rank" text,
"Finish" text,
"Laps" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- How many laps were in 1958?
| SELECT SUM("Laps") FROM table_15318 WHERE "Year" = '1958' | wikisql |
CREATE TABLE t_kc24 (
ACCOUNT_DASH_DATE time,
ACCOUNT_DASH_FLG number,
CASH_PAY number,
CIVIL_SUBSIDY number,
CKC102 number,
CLINIC_ID text,
CLINIC_SLT_DATE time,
COMP_ID text,
COM_ACC_PAY number,
COM_PAY number,
DATA_ID text,
ENT_ACC_PAY number,
ENT_PAY number,
F... | SELECT SUM(t_kc24.OVE_PAY) FROM t_kc21 JOIN t_kc24 ON t_kc21.MED_CLINIC_ID = t_kc24.MED_CLINIC_ID WHERE t_kc21.PERSON_NM = '柏嘉纳' AND t_kc24.CLINIC_SLT_DATE BETWEEN '2003-05-08' AND '2018-09-10' | css |
CREATE TABLE table_name_66 (
competition VARCHAR,
final_position VARCHAR,
final_round VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What competition had a final round in the finals and the final position winners?
| SELECT competition FROM table_name_66 WHERE final_position = "winners" AND final_round = "finals" | sql_create_context |
CREATE TABLE table_14950 (
"Code Name" text,
"Function (figure)" text,
"Real Name" text,
"Birthplace" text,
"Serial number" text,
"Primary military speciality" text,
"Secondary military speciality" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
... | SELECT "Birthplace" FROM table_14950 WHERE "Real Name" = 'charles ''chuck'' connors' | wikisql |
CREATE TABLE table_name_40 (
height_feet___m VARCHAR,
street_address VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is listsed as the Height feet/m and has a Street address of 2345 Grand Avenue?
| SELECT height_feet___m FROM table_name_40 WHERE street_address = "2345 grand avenue" | sql_create_context |
CREATE TABLE table_23235767_4 (
surface VARCHAR,
championship VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Name the surface for philadelphia
| SELECT surface FROM table_23235767_4 WHERE championship = "Philadelphia" | sql_create_context |
CREATE TABLE table_name_73 (
result VARCHAR,
opponent VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the result of the game against Ayr United?
| SELECT result FROM table_name_73 WHERE opponent = "ayr united" | sql_create_context |
CREATE TABLE table_name_76 (
no_5 VARCHAR,
no_4 VARCHAR,
no_1 VARCHAR,
no_8 VARCHAR,
no_2 VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- When Chloe was number 8, Olivia was number 2, Emma was number 1, and Ava was number 4, who was number 5?
| SELECT no_5 FROM table_name_76 WHERE no_8 = "chloe" AND no_2 = "olivia" AND no_1 = "emma" AND no_4 = "ava" | sql_create_context |
CREATE TABLE table_71532 (
"name" text,
"type" text,
"elevation" text,
"USGS Map" text,
"GNIS ID" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What type has a GNIS ID of 1139805
| SELECT "type" FROM table_71532 WHERE "GNIS ID" = '1139805' | wikisql |
CREATE TABLE table_name_84 (
away_captain VARCHAR,
venue VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Who was the captain of the away team at Adelaide Oval?
| SELECT away_captain FROM table_name_84 WHERE venue = "adelaide oval" | sql_create_context |
CREATE TABLE table_30496 (
"Name" text,
"Corporate name" text,
"Regional district" text,
"Incorporation date (city)" text,
"Population (2011)" real,
"Population (2006)" real,
"Change (%)" text,
"Area (km\u00b2)" text,
"Population density" text
)
-- Using valid SQLite, answer the fo... | SELECT "Corporate name" FROM table_30496 WHERE "Area (km\u00b2)" = '15.63' | wikisql |
CREATE TABLE table_name_50 (
col__m_ INTEGER,
peak VARCHAR,
prominence__m_ VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Name the lowest Col (m) with a Peak of pico basil , and a Prominence (m) smaller than 3,011?
| SELECT MIN(col__m_) FROM table_name_50 WHERE peak = "pico basilé" AND prominence__m_ < 3 OFFSET 011 | sql_create_context |
CREATE TABLE table_204_842 (
id number,
"institution" text,
"city" text,
"state" text,
"team name" text,
"affiliation" text,
"enrollment" number,
"home conference" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- which state is the most re... | SELECT "state" FROM table_204_842 GROUP BY "state" ORDER BY COUNT(*) DESC LIMIT 1 | squall |
CREATE TABLE table_name_12 (
away_team VARCHAR,
home_team VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Who is the home team of South Melbourne?
| SELECT away_team FROM table_name_12 WHERE home_team = "south melbourne" | sql_create_context |
CREATE TABLE table_797 (
"District" text,
"Incumbent" text,
"Party" text,
"First elected" real,
"Result" text,
"Candidates" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- When was incumbent John N. Tillman first elected?
| SELECT MIN("First elected") FROM table_797 WHERE "Incumbent" = 'John N. Tillman' | wikisql |
CREATE TABLE table_name_15 (
date VARCHAR,
opponent VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Name the date when bye was opponent
| SELECT date FROM table_name_15 WHERE opponent = "bye" | sql_create_context |
CREATE TABLE table_name_57 (
gold INTEGER,
total VARCHAR,
silver VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the low gold total for under 2 total and over 0 silvers?
| SELECT MIN(gold) FROM table_name_57 WHERE total < 2 AND silver > 0 | sql_create_context |
CREATE TABLE procedures_icd (
row_id number,
subject_id number,
hadm_id number,
icd9_code text,
charttime time
)
CREATE TABLE diagnoses_icd (
row_id number,
subject_id number,
hadm_id number,
icd9_code text,
charttime time
)
CREATE TABLE labevents (
row_id number,
subje... | SELECT COUNT(DISTINCT t1.subject_id) FROM (SELECT admissions.subject_id, diagnoses_icd.charttime FROM diagnoses_icd JOIN admissions ON diagnoses_icd.hadm_id = admissions.hadm_id WHERE diagnoses_icd.icd9_code = (SELECT d_icd_diagnoses.icd9_code FROM d_icd_diagnoses WHERE d_icd_diagnoses.short_title = 'urin tract infecti... | mimic_iii |
CREATE TABLE procedures (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
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,
... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.admission_type = "EMERGENCY" AND procedures.short_title = "Part sm bowel resect NEC" | mimicsql_data |
CREATE TABLE Invoice_Items (
Invoice_Item_ID INTEGER,
Invoice_ID INTEGER,
Order_ID INTEGER,
Order_Item_ID INTEGER,
Product_ID INTEGER,
Order_Quantity INTEGER,
Other_Item_Details VARCHAR(255)
)
CREATE TABLE Order_Items (
Order_Item_ID INTEGER,
Order_ID INTEGER,
Product_ID INTEGER... | SELECT Product_Name, AVG(Product_Price) FROM Products GROUP BY Product_Name ORDER BY AVG(Product_Price) DESC | 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 prescriptions (
row_id number,
subject_id number,
h... | SELECT prescriptions.drug FROM prescriptions WHERE prescriptions.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 17462) AND DATETIME(prescriptions.startdate, 'start of day') = DATETIME(CURRENT_TIME(), 'start of day', '-0 day') EXCEPT SELECT prescriptions.drug FROM prescriptions WHERE... | mimic_iii |
CREATE TABLE manager_award (
player_id text,
award_id text,
year number,
league_id text,
tie text,
notes number
)
CREATE TABLE all_star (
player_id text,
year number,
game_num number,
game_id text,
team_id text,
league_id text,
gp number,
starting_pos number
)
C... | SELECT salary FROM salary WHERE year = 2001 ORDER BY salary DESC LIMIT 3 | spider |
CREATE TABLE table_36229 (
"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.
-- How many rounds did the match go for the Bellator 7... | SELECT SUM("Round") FROM table_36229 WHERE "Event" = 'bellator 72' | wikisql |
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 regions (
REGION_ID decimal(5,0),
REGION_NAME varchar(25)
)
CREATE TABLE employees (
EMPLOYEE_ID decimal(6,0),
FIRST_NAME varchar(20),
... | SELECT EMAIL, MANAGER_ID FROM employees WHERE NOT DEPARTMENT_ID IN (SELECT DEPARTMENT_ID FROM departments WHERE MANAGER_ID BETWEEN 100 AND 200) | nvbench |
CREATE TABLE table_204_455 (
id number,
"rd." number,
"grand prix" text,
"date" text,
"location" text,
"pole position" text,
"fastest lap" text,
"winning driver" text,
"constructor" text,
"report" text
)
-- Using valid SQLite, answer the following questions for the tables provi... | SELECT "grand prix" FROM table_204_455 WHERE "constructor" = 'benetton-ford' | squall |
CREATE TABLE Player (
pID numeric(5,0),
pName varchar(20),
yCard varchar(3),
HS numeric(5,0)
)
CREATE TABLE Tryout (
pID numeric(5,0),
cName varchar(20),
pPos varchar(8),
decision varchar(3)
)
CREATE TABLE College (
cName varchar(20),
state varchar(2),
enr numeric(5,0)
)
... | SELECT pName, COUNT(pName) FROM Player AS T1 JOIN Tryout AS T2 ON T1.pID = T2.pID GROUP BY pName ORDER BY T1.pName | nvbench |
CREATE TABLE table_46943 (
"Year" real,
"Men's Open" text,
"Women's Open" text,
"Mixed Open" text,
"Men's u20" text,
"Women's u20" text,
"Senior Mixed" text,
"Men's 30" text,
"Women's 30" text,
"Men's 35" text,
"Women's 35" text,
"Men's 40" text,
"Women's 40" text,
... | SELECT "Men's u20" FROM table_46943 WHERE "Men's 45" = 'n/a' | wikisql |
CREATE TABLE table_204_891 (
id number,
"name" text,
"hanzi" text,
"population (2005)" number,
"area (km2)" number
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- which divisions had a population below 15,000 in 2005 ?
| SELECT "name" FROM table_204_891 WHERE "population (2005)" < 15000 | squall |
CREATE TABLE equipment_sequence (
aircraft_code_sequence varchar,
aircraft_code varchar
)
CREATE TABLE fare (
fare_id int,
from_airport varchar,
to_airport varchar,
fare_basis_code text,
fare_airline text,
restriction_code text,
one_direction_cost int,
round_trip_cost int,
r... | 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 = 'CHICAGO' AND CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'INDIAN... | atis |
CREATE TABLE table_9370 (
"Year" text,
"Starts" real,
"Wins" real,
"Top Fives" real,
"Top Tens" real,
"Poles" real,
"Rank" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the total number of top fives in 2010 when casey mears had more... | SELECT COUNT("Top Fives") FROM table_9370 WHERE "Year" = '2010' AND "Wins" > '0' | wikisql |
CREATE TABLE lab (
subject_id text,
hadm_id text,
itemid text,
charttime text,
flag text,
value_unit text,
label text,
fluid text
)
CREATE TABLE prescriptions (
subject_id text,
hadm_id text,
icustay_id text,
drug_type text,
drug text,
formulary_drug_cd text,
... | SELECT diagnoses.long_title, procedures.short_title FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.name = "Cynthia Robinson" | mimicsql_data |
CREATE TABLE table_name_60 (
opponent VARCHAR,
date VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Who was the opponent on the game on April 14, 2007?
| SELECT opponent FROM table_name_60 WHERE date = "april 14, 2007" | sql_create_context |
CREATE TABLE t_kc21 (
CLINIC_ID text,
CLINIC_TYPE 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,
... | SELECT * FROM t_kc21 WHERE t_kc21.PERSON_NM = '袁静娴' AND t_kc21.MED_SER_ORG_NO = '3905191' AND NOT t_kc21.MED_ORG_DEPT_NM LIKE '%放射治疗%' | css |
CREATE TABLE chartevents (
row_id number,
subject_id number,
hadm_id number,
icustay_id number,
itemid number,
charttime time,
valuenum number,
valueuom text
)
CREATE TABLE prescriptions (
row_id number,
subject_id number,
hadm_id number,
startdate time,
enddate time... | SELECT MIN(t1.c1) FROM (SELECT SUM(cost.cost) AS c1 FROM cost WHERE cost.hadm_id IN (SELECT prescriptions.hadm_id FROM prescriptions WHERE prescriptions.drug = 'dobutamine') AND DATETIME(cost.chargetime, 'start of year') = DATETIME(CURRENT_TIME(), 'start of year', '-1 year') GROUP BY cost.hadm_id) AS t1 | mimic_iii |
CREATE TABLE paperkeyphrase (
paperid int,
keyphraseid int
)
CREATE TABLE cite (
citingpaperid int,
citedpaperid int
)
CREATE TABLE paper (
paperid int,
title varchar,
venueid int,
year int,
numciting int,
numcitedby int,
journalid int
)
CREATE TABLE writes (
paperid i... | SELECT DISTINCT paper.venueid FROM keyphrase, paper, paperkeyphrase WHERE keyphrase.keyphrasename = 'Trophic Cascade' AND paperkeyphrase.keyphraseid = keyphrase.keyphraseid AND paper.paperid = paperkeyphrase.paperid | scholar |
CREATE TABLE CloseAsOffTopicReasonTypes (
Id number,
IsUniversal boolean,
InputTitle text,
MarkdownInputGuidance text,
MarkdownPostOwnerGuidance text,
MarkdownPrivilegedUserGuidance text,
MarkdownConcensusDescription text,
CreationDate time,
CreationModeratorId number,
ApprovalDa... | SELECT Location, COUNT(*) FROM Users WHERE UPPER(Location) LIKE '%DALLAS%' OR UPPER(Location) LIKE '%DFW%' GROUP BY Location ORDER BY COUNT(*) DESC | sede |
CREATE TABLE district (
District_ID int,
District_name text,
Headquartered_City text,
City_Population real,
City_Area real
)
CREATE TABLE store (
Store_ID int,
Store_Name text,
Type text,
Area_size real,
Number_of_product_category real,
Ranking int
)
CREATE TABLE store_prod... | SELECT Type, COUNT(*) FROM store GROUP BY Type | nvbench |
CREATE TABLE table_35656 (
"Year" real,
"League" text,
"Class" text,
"Record" text,
"Finish" text,
"Manager" text,
"Playoffs" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Manager of lyman lamb / marty berghammer is in what league?
| SELECT "League" FROM table_35656 WHERE "Manager" = 'lyman lamb / marty berghammer' | wikisql |
CREATE TABLE table_train_243 (
"id" int,
"c_peptide_level" float,
"finger_stick_measurements" bool,
"diabetic" string,
"fasting_blood_glucose_fbg" float,
"hypoglycemia" bool,
"insulin_requirement" float,
"triglyceride_tg" float,
"a1c" float,
"age" float,
"NOUSE" float
)
-- ... | SELECT * FROM table_train_243 WHERE insulin_requirement = 1 AND diabetic = 'ii' AND c_peptide_level < 0.8 AND fasting_blood_glucose_fbg > 150 AND (hypoglycemia = 0 AND finger_stick_measurements = 0) | criteria2sql |
CREATE TABLE treatment (
treatmentid number,
patientunitstayid number,
treatmentname text,
treatmenttime time
)
CREATE TABLE allergy (
allergyid number,
patientunitstayid number,
drugname text,
allergyname text,
allergytime time
)
CREATE TABLE diagnosis (
diagnosisid number,
... | 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 = 'atrial fibrillation' AND STRFTIME('%y', diagnosis.... | eicu |
CREATE TABLE table_6069 (
"Player" text,
"Position" text,
"Date of Birth (Age)" text,
"Caps" real,
"Club/province" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the club/province of player Alberto Sgarbi, who played wing, with less than 2 c... | SELECT "Club/province" FROM table_6069 WHERE "Caps" < '2' AND "Position" = 'wing' AND "Player" = 'alberto sgarbi' | wikisql |
CREATE TABLE diagnoses_icd (
row_id number,
subject_id number,
hadm_id number,
icd9_code text,
charttime time
)
CREATE TABLE icustays (
row_id number,
subject_id number,
hadm_id number,
icustay_id number,
first_careunit text,
last_careunit text,
first_wardid number,
... | SELECT COUNT(DISTINCT admissions.subject_id) FROM admissions WHERE admissions.hadm_id IN (SELECT icustays.hadm_id FROM icustays WHERE icustays.icustay_id IN (SELECT inputevents_cv.icustay_id FROM inputevents_cv WHERE inputevents_cv.itemid IN (SELECT d_items.itemid FROM d_items WHERE d_items.label = 'hcl gtts 75meq/500m... | mimic_iii |
CREATE TABLE table_name_54 (
laps VARCHAR,
rider VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the total number of Laps, when Ride is Aleix Espargaro?
| SELECT COUNT(laps) FROM table_name_54 WHERE rider = "aleix espargaro" | sql_create_context |
CREATE TABLE table_39354 (
"Outcome" text,
"Year" real,
"Championship" text,
"Surface" text,
"Partner" text,
"Opponents in the final" text,
"Score in the final" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which opponent in the final had a... | SELECT "Opponents in the final" FROM table_39354 WHERE "Partner" = 'katarina srebotnik' AND "Championship" = 'wimbledon (4)' | wikisql |
CREATE TABLE PostLinks (
Id number,
CreationDate time,
PostId number,
RelatedPostId number,
LinkTypeId number
)
CREATE TABLE PostHistoryTypes (
Id number,
Name text
)
CREATE TABLE PostTags (
PostId number,
TagId number
)
CREATE TABLE Tags (
Id number,
TagName text,
Cou... | SELECT OwnerUserId AS "user_link", SUM(Score) AS DownSum FROM Posts WHERE Score < 0 AND OwnerUserId > 0 GROUP BY Posts.OwnerUserId ORDER BY DownSum, OwnerUserId LIMIT 100 | sede |
CREATE TABLE CloseAsOffTopicReasonTypes (
Id number,
IsUniversal boolean,
InputTitle text,
MarkdownInputGuidance text,
MarkdownPostOwnerGuidance text,
MarkdownPrivilegedUserGuidance text,
MarkdownConcensusDescription text,
CreationDate time,
CreationModeratorId number,
ApprovalDa... | SELECT Hour, COUNT(*) AS Num FROM (SELECT DATE(0, 'CAST((JULIANDAY(Date) - JULIANDAY(0)) * 24.0 AS INTEGER) hour') AS Hour FROM Badges AS b WHERE Name LIKE '%Constituent%') AS VoteHours GROUP BY Hour ORDER BY Hour DESC | sede |
CREATE TABLE course_prerequisite (
pre_course_id int,
course_id int
)
CREATE TABLE jobs (
job_id int,
job_title varchar,
description varchar,
requirement varchar,
city varchar,
state varchar,
country varchar,
zip int
)
CREATE TABLE comment_instructor (
instructor_id int,
... | SELECT DISTINCT instructor.name 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 course ON course.course_id = course_offering.course_id WHERE course.name L... | advising |
CREATE TABLE table_19487 (
"Pick #" real,
"NFL Team" text,
"Player" text,
"Position" text,
"College" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which team does Robert Brooks play with?
| SELECT "NFL Team" FROM table_19487 WHERE "Player" = 'Robert Brooks' | wikisql |
CREATE TABLE labevents (
row_id number,
subject_id number,
hadm_id number,
itemid number,
charttime time,
valuenum number,
valueuom text
)
CREATE TABLE prescriptions (
row_id number,
subject_id number,
hadm_id number,
startdate time,
enddate time,
drug text,
dose... | SELECT COUNT(DISTINCT t1.subject_id) FROM (SELECT admissions.subject_id, procedures_icd.charttime 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 = 'parent infu... | mimic_iii |
CREATE TABLE table_name_82 (
club VARCHAR,
country VARCHAR,
goals VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What club was in Netherlands and had 22 goals?
| SELECT club FROM table_name_82 WHERE country = "netherlands" AND goals = "22" | sql_create_context |
CREATE TABLE table_name_37 (
loss VARCHAR,
opponent VARCHAR,
date VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Who lost when the mariners played on September 12?
| SELECT loss FROM table_name_37 WHERE opponent = "mariners" AND date = "september 12" | sql_create_context |
CREATE TABLE table_test_2 (
"id" int,
"loss_of_consciousness" bool,
"gender" string,
"bleeding" int,
"systolic_blood_pressure_sbp" int,
"stroke" bool,
"renal_disease" bool,
"hemorrhagic_diathesis" bool,
"transient_ischemic_attack" bool,
"creatinine_clearance_cl" float,
"demen... | SELECT * FROM table_test_2 WHERE renal_disease = 1 OR ((gender = 'male' AND prior_creatinine > 2.5) OR (gender = 'female' AND prior_creatinine > 2)) | criteria2sql |
CREATE TABLE table_name_26 (
title VARCHAR,
label VARCHAR,
year VARCHAR,
Nr VARCHAR,
st VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the song title from 1963 on the Pacific Jazz label, and a Label-Nr of st-81?
| SELECT title FROM table_name_26 WHERE label = "pacific jazz" AND year = 1963 AND label - Nr = st - 81 | sql_create_context |
CREATE TABLE table_58076 (
"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 is the total Crowd with a Home team of coll... | SELECT SUM("Crowd") FROM table_58076 WHERE "Home team" = 'collingwood' | wikisql |
CREATE TABLE hz_info_zyjzjlb (
JZLSH number,
YLJGDM number,
zyjzjlb_id 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,
JSBBRQSJ tim... | SELECT zyjzjlb.CYZTDM FROM zyjzjlb WHERE zyjzjlb.JZLSH = '99842963848' | css |
CREATE TABLE table_26301697_2 (
represents VARCHAR,
height__cm_ VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Name the represents for 1.76 cm
| SELECT represents FROM table_26301697_2 WHERE height__cm_ = "1.76" | sql_create_context |
CREATE TABLE d_labitems (
row_id number,
itemid number,
label text
)
CREATE TABLE labevents (
row_id number,
subject_id number,
hadm_id number,
itemid number,
charttime time,
valuenum number,
valueuom text
)
CREATE TABLE patients (
row_id number,
subject_id number,
... | SELECT procedures_icd.charttime FROM procedures_icd WHERE procedures_icd.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 51177) AND DATETIME(procedures_icd.charttime, 'start of year') = DATETIME(CURRENT_TIME(), 'start of year', '-0 year') ORDER BY procedures_icd.charttime LIMIT 1 | mimic_iii |
CREATE TABLE table_name_18 (
year INTEGER,
competition VARCHAR,
position VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What year was the Competition of World Junior Championships with a 20th (qf) position?
| SELECT AVG(year) FROM table_name_18 WHERE competition = "world junior championships" AND position = "20th (qf)" | 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 zyjzjlb ON hz_info.YLJGDM = zyjzjlb.YLJGDM AND hz_info.KH = zyjzjlb.KH AND hz_info.KLX = zyjzjlb.KLX WHERE hz_info.RYBH = '30900247' AND hz_info.YLJGDM = '7528776' AND NOT zyjzjlb.JZKSMC LIKE '%青光眼%' | css |
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 INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE prescriptions.formulary_drug_cd = "POSA200L" AND lab.fluid = "Urine" | mimicsql_data |
CREATE TABLE STUDENT (
STU_NUM int,
STU_LNAME varchar(15),
STU_FNAME varchar(15),
STU_INIT varchar(1),
STU_DOB datetime,
STU_HRS int,
STU_CLASS varchar(2),
STU_GPA float(8),
STU_TRANSFER numeric,
DEPT_CODE varchar(18),
STU_PHONE varchar(4),
PROF_NUM int
)
CREATE TABLE CO... | SELECT DEPT_CODE, COUNT(*) FROM CLASS AS T1 JOIN COURSE AS T2 ON T1.CRS_CODE = T2.CRS_CODE GROUP BY DEPT_CODE ORDER BY COUNT(*) DESC | nvbench |
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 (SELECT labevents.valuenum FROM labevents WHERE labevents.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 52898 AND admissions.dischtime IS NULL) AND labevents.itemid IN (SELECT d_labitems.itemid FROM d_labitems WHERE d_labitems.label = 'chloride') ORDER BY labevents.charttime... | mimic_iii |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.