instruction stringlengths 151 7.46k | output stringlengths 2 4.44k | source stringclasses 26
values |
|---|---|---|
CREATE TABLE table_19517621_3 (
title VARCHAR,
written_by VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the title for the episode that written by Michael Miller?
| SELECT title FROM table_19517621_3 WHERE written_by = "Michael Miller" | sql_create_context |
CREATE TABLE table_45311 (
"Season" real,
"Team 1" text,
"Score" text,
"Team 2" text,
"Venue" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Can you tell me the Season that has the Team 2 of hanoi acb?
| SELECT "Season" FROM table_45311 WHERE "Team 2" = 'hanoi acb' | wikisql |
CREATE TABLE table_8351 (
"Date" text,
"Region" text,
"Label" text,
"Catalogue" text,
"Format" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What region is the Gold Vinyl format from?
| SELECT "Region" FROM table_8351 WHERE "Format" = 'gold vinyl' | wikisql |
CREATE TABLE table_name_66 (
home_team VARCHAR,
away_team VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- When collingwood was the away team, what was the home team?
| SELECT home_team FROM table_name_66 WHERE away_team = "collingwood" | sql_create_context |
CREATE TABLE table_name_26 (
date VARCHAR,
score VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the Date of the game with a Score of 6 4, 6 2?
| SELECT date FROM table_name_26 WHERE score = "6–4, 6–2" | sql_create_context |
CREATE TABLE jobs (
JOB_ID varchar(10),
JOB_TITLE varchar(35),
MIN_SALARY decimal(6,0),
MAX_SALARY decimal(6,0)
)
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 countries (
COUNT... | SELECT JOB_ID, AVG(DEPARTMENT_ID) FROM employees WHERE SALARY BETWEEN 8000 AND 12000 AND COMMISSION_PCT <> "null" OR DEPARTMENT_ID <> 40 GROUP BY JOB_ID ORDER BY AVG(DEPARTMENT_ID) | nvbench |
CREATE TABLE table_65153 (
"Place" text,
"Player" text,
"Country" text,
"Score" real,
"To par" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which Country has a Score of 67?
| SELECT "Country" FROM table_65153 WHERE "Score" = '67' | wikisql |
CREATE TABLE CloseAsOffTopicReasonTypes (
Id number,
IsUniversal boolean,
InputTitle text,
MarkdownInputGuidance text,
MarkdownPostOwnerGuidance text,
MarkdownPrivilegedUserGuidance text,
MarkdownConcensusDescription text,
CreationDate time,
CreationModeratorId number,
ApprovalDa... | SELECT rate.TimeGroup AS "year", rate.Rate AS Questions FROM (SELECT COUNT(DISTINCT PostId) AS Rate, YEAR(Posts.CreationDate) AS TimeGroup FROM Tags, PostTags, Posts WHERE Tags.Id = PostTags.TagId AND Posts.Id = PostId AND Tags.TagName IN ('uml', 'enterprise-architect') GROUP BY YEAR(Posts.CreationDate)) AS rate ORDER ... | sede |
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 procedures ON demographic.hadm_id = procedures.hadm_id WHERE procedures.long_title = "Open and other left hemicolectomy" | mimicsql_data |
CREATE TABLE jybgb (
BBCJBW text,
BBDM text,
BBMC text,
BBZT number,
BGDH text,
BGJGDM text,
BGJGMC text,
BGRGH text,
BGRQ time,
BGRXM text,
BGSJ time,
CJRQ time,
JSBBRQSJ time,
JSBBSJ time,
JYBBH text,
JYJGMC text,
JYJSGH text,
JYJSQM text,
JY... | SELECT jyjgzbb.JYZBLSH FROM person_info JOIN hz_info JOIN mzjzjlb JOIN jybgb JOIN jyjgzbb ON person_info.RYBH = hz_info.RYBH AND hz_info.YLJGDM = mzjzjlb.YLJGDM AND hz_info.KH = mzjzjlb.KH AND hz_info.KLX = mzjzjlb.KLX AND mzjzjlb.YLJGDM = jybgb.YLJGDM_MZJZJLB AND mzjzjlb.JZLSH = jybgb.JZLSH_MZJZJLB AND jybgb.YLJGDM = ... | css |
CREATE TABLE table_name_87 (
high_hill_zone VARCHAR,
mid_hill_zone VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which mid-hill zone has a slightly warm temperature?
| SELECT high_hill_zone FROM table_name_87 WHERE mid_hill_zone = "slightly warm temperature" | sql_create_context |
CREATE TABLE stadium (
ID int,
name text,
Capacity int,
City text,
Country text,
Opening_year int
)
CREATE TABLE record (
ID int,
Result text,
Swimmer_ID int,
Event_ID int
)
CREATE TABLE event (
ID int,
Name text,
Stadium_ID int,
Year text
)
CREATE TABLE swimme... | SELECT Nationality, SUM(ID) FROM swimmer GROUP BY Nationality ORDER BY Nationality | nvbench |
CREATE TABLE table_41145 (
"Date" text,
"Rocket" text,
"Type" text,
"Launch site" text,
"Satellite" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the type of the gps iif-10 satellite?
| SELECT "Type" FROM table_41145 WHERE "Satellite" = 'gps iif-10' | wikisql |
CREATE TABLE table_name_43 (
pursuit VARCHAR,
event VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Name the pursuit for 1994 lillehammer
| SELECT pursuit FROM table_name_43 WHERE event = "1994 lillehammer" | sql_create_context |
CREATE TABLE table_40571 (
"Name" text,
"Rank" real,
"Out of" real,
"Source" text,
"Year" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which Name was in the Year 2001?
| SELECT "Name" FROM table_40571 WHERE "Year" = '2001' | 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_CLINIC_ID text,
MED_DIRE_CD tex... | SELECT qtb.MED_CLINIC_ID FROM qtb WHERE qtb.PERSON_NM = '谢雅云' AND qtb.MED_CLINIC_ID IN (SELECT t_kc22.MED_CLINIC_ID FROM t_kc22 WHERE t_kc22.AMOUNT >= 1942.72) UNION SELECT gyb.MED_CLINIC_ID FROM gyb WHERE gyb.PERSON_NM = '谢雅云' AND gyb.MED_CLINIC_ID IN (SELECT t_kc22.MED_CLINIC_ID FROM t_kc22 WHERE t_kc22.AMOUNT >= 194... | css |
CREATE TABLE Elimination (
Elimination_ID text,
Wrestler_ID text,
Team text,
Eliminated_By text,
Elimination_Move text,
Time text
)
CREATE TABLE wrestler (
Wrestler_ID int,
Name text,
Reign text,
Days_held text,
Location text,
Event text
)
-- Using valid SQLite, answer... | SELECT Location, COUNT(Location) FROM wrestler GROUP BY Location | nvbench |
CREATE TABLE fare_basis (
fare_basis_code text,
booking_class text,
class_type text,
premium text,
economy text,
discounted text,
night text,
season text,
basis_days text
)
CREATE TABLE airline (
airline_code varchar,
airline_name text,
note text
)
CREATE TABLE restrict... | 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 = 'PHILADELPHIA' AND CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'B... | atis |
CREATE TABLE table_203_102 (
id number,
"event" text,
"performance" text,
"athlete" text,
"nation" text,
"place" text,
"date" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- which person set at least 2 world records ?
| SELECT "athlete" FROM table_203_102 GROUP BY "athlete" HAVING COUNT(*) >= 2 | squall |
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 demographic.admission_location, diagnoses.short_title FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE demographic.subject_id = "3623" | mimicsql_data |
CREATE TABLE time_zone (
time_zone_code text,
time_zone_name text,
hours_from_gmt int
)
CREATE TABLE date_day (
month_number int,
day_number int,
year int,
day_name varchar
)
CREATE TABLE state (
state_code text,
state_name text,
country_name text
)
CREATE TABLE airport (
... | SELECT DISTINCT fare.fare_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_0.city_code = AIRPORT_SERVICE_0.city_code AND CITY_0.city_name = 'DENVER' AND CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_... | atis |
CREATE TABLE table_222771_1 (
alpha_2_code VARCHAR,
alpha_3_code VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the alpha 2 code for the area also known as NZL?
| SELECT alpha_2_code FROM table_222771_1 WHERE alpha_3_code = "NZL" | sql_create_context |
CREATE TABLE book_club (
book_club_id number,
year number,
author_or_editor text,
book_title text,
publisher text,
category text,
result text
)
CREATE TABLE culture_company (
company_name text,
type text,
incorporated_in text,
group_equity_shareholding number,
book_club_... | SELECT AVG(budget_million), MAX(budget_million), MIN(budget_million) FROM movie WHERE year < 2000 | spider |
CREATE TABLE table_55057 (
"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.
-- If the Home team had a score of 21.22 (148), wha... | SELECT SUM("Crowd") FROM table_55057 WHERE "Home team score" = '21.22 (148)' | wikisql |
CREATE TABLE table_name_42 (
game VARCHAR,
record VARCHAR,
march VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- How many games ended in a record of 30-28-4, with a March more than 1?
| SELECT COUNT(game) FROM table_name_42 WHERE record = "30-28-4" AND march > 1 | sql_create_context |
CREATE TABLE jybgb (
BBCJBW text,
BBDM text,
BBMC text,
BBZT number,
BGDH text,
BGJGDM text,
BGJGMC text,
BGRGH text,
BGRQ time,
BGRXM text,
BGSJ time,
CJRQ time,
JSBBRQSJ time,
JSBBSJ time,
JYBBH text,
JYJGMC text,
JYJSGH text,
JYJSQM text,
JY... | SELECT * FROM hz_info JOIN 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 table_27278 (
"Pick #" real,
"CFL Team" text,
"Player" text,
"Position" text,
"College" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Name the position for michael warner
| SELECT "Position" FROM table_27278 WHERE "Player" = 'Michael Warner' | wikisql |
CREATE TABLE table_43450 (
"Frequency" text,
"Call sign" text,
"Branding" text,
"Format" text,
"Owner" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which Format has a Frequency of 100.5 fm?
| SELECT "Format" FROM table_43450 WHERE "Frequency" = '100.5 fm' | wikisql |
CREATE TABLE table_77862 (
"Home team" text,
"Home team score" text,
"Away team" text,
"Away team score" text,
"Venue" text,
"Date" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Name the home team for carlton away team
| SELECT "Home team" FROM table_77862 WHERE "Away team" = 'carlton' | wikisql |
CREATE TABLE management (
department_ID int,
head_ID int,
temporary_acting text
)
CREATE TABLE head (
head_ID int,
name text,
born_state text,
age real
)
CREATE TABLE department (
Department_ID int,
Name text,
Creation text,
Ranking int,
Budget_in_Billions real,
Num... | SELECT Name, SUM(Num_Employees) FROM department AS T1 JOIN management AS T2 ON T1.department_ID = T2.department_ID WHERE T2.temporary_acting = 'Yes' GROUP BY Name | nvbench |
CREATE TABLE semester (
semester_id int,
semester varchar,
year int
)
CREATE TABLE course_tags_count (
course_id int,
clear_grading int,
pop_quiz int,
group_projects int,
inspirational int,
long_lectures int,
extra_credit int,
few_tests int,
good_feedback int,
tough_... | SELECT DISTINCT course.department, course.name, course.number FROM course INNER JOIN course_offering ON course.course_id = course_offering.course_id INNER JOIN semester ON semester.semester_id = course_offering.semester INNER JOIN program_course ON program_course.course_id = course_offering.course_id WHERE program_cour... | advising |
CREATE TABLE table_16414 (
"Romaji title" text,
"Japanese title" text,
"Release date" text,
"Reference" text,
"Oricon" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What rank is on the Japanese singles chart?
| SELECT COUNT("Oricon") FROM table_16414 WHERE "Japanese title" = '愛のバカ' | wikisql |
CREATE TABLE PostNoticeTypes (
Id number,
ClassId number,
Name text,
Body text,
IsHidden boolean,
Predefined boolean,
PostNoticeDurationId number
)
CREATE TABLE Posts (
Id number,
PostTypeId number,
AcceptedAnswerId number,
ParentId number,
CreationDate time,
Deletio... | SELECT * FROM Posts | sede |
CREATE TABLE Customers_Cards (
card_id INTEGER,
customer_id INTEGER,
card_type_code VARCHAR(15),
card_number VARCHAR(80),
date_valid_from DATETIME,
date_valid_to DATETIME,
other_card_details VARCHAR(255)
)
CREATE TABLE Financial_Transactions (
transaction_id INTEGER,
previous_transa... | SELECT card_type_code, COUNT(card_type_code) FROM Customers_Cards GROUP BY card_type_code ORDER BY card_type_code DESC | nvbench |
CREATE TABLE table_20861261_4 (
weight VARCHAR,
college VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- How much does the player from Southern California weight?
| SELECT weight FROM table_20861261_4 WHERE college = "Southern California" | sql_create_context |
CREATE TABLE jyjgzbb (
BGDH text,
BGRQ time,
CKZFWDX text,
CKZFWSX number,
CKZFWXX number,
JCFF text,
JCRGH text,
JCRXM text,
JCXMMC text,
JCZBDM text,
JCZBJGDL number,
JCZBJGDW text,
JCZBJGDX text,
JCZBMC text,
JLDW text,
JYRQ time,
JYZBLSH text,
... | SELECT zyjybgb.BGDH FROM zyjybgb WHERE zyjybgb.JZLSH = '13021515758' AND NOT zyjybgb.KSMC LIKE '%手术%' UNION SELECT mzjybgb.BGDH FROM mzjybgb WHERE mzjybgb.JZLSH = '13021515758' AND NOT mzjybgb.KSMC LIKE '%手术%' | css |
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 final_timi >= 2 | criteria2sql |
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 COUNT(*) FROM t_kc22 WHERE t_kc22.t_kc21_PERSON_NM = '郑丹红' AND t_kc22.STA_DATE BETWEEN '2001-08-25' AND '2014-08-03' AND t_kc22.SELF_PAY_PRO < 0.85 | css |
CREATE TABLE table_6164 (
"Round" real,
"Pick #" real,
"Overall" real,
"Name" text,
"Position" text,
"College" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the sum of the pick numbers where the player was picked in round 5 and overall ... | SELECT SUM("Pick #") FROM table_6164 WHERE "Round" = '5' AND "Overall" > '159' | wikisql |
CREATE TABLE Songs (
SongId VARCHAR,
songid VARCHAR,
title VARCHAR
)
CREATE TABLE Performance (
bandmate VARCHAR,
SongId VARCHAR
)
CREATE TABLE Instruments (
instrument VARCHAR,
songid VARCHAR,
bandmateid VARCHAR
)
CREATE TABLE Band (
id VARCHAR,
lastname VARCHAR
)
-- Using ... | SELECT T4.instrument FROM Performance AS T1 JOIN Band AS T2 ON T1.bandmate = T2.id JOIN Songs AS T3 ON T3.songid = T1.songid JOIN Instruments AS T4 ON T4.songid = T3.songid AND T4.bandmateid = T2.id WHERE T2.lastname = "Heilo" AND T3.title = "Le Pop" | sql_create_context |
CREATE TABLE table_name_90 (
skip VARCHAR,
second VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which skip has Zrinka Muhek as Second?
| SELECT skip FROM table_name_90 WHERE second = "zrinka muhek" | sql_create_context |
CREATE TABLE table_name_37 (
weight INTEGER,
result VARCHAR,
distance VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the largest weight wth a Result of , and a Distance of 7f?
| SELECT MAX(weight) FROM table_name_37 WHERE result = "–" AND distance = "7f" | sql_create_context |
CREATE TABLE table_name_81 (
us_hot_100 VARCHAR,
album VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Name the US Hot 100 for album of I like you
| SELECT us_hot_100 FROM table_name_81 WHERE album = "i like you" | sql_create_context |
CREATE TABLE table_name_1 (
round VARCHAR,
time VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the number of rounds that took place for the fight that lasted 6:21?
| SELECT COUNT(round) FROM table_name_1 WHERE time = "6:21" | sql_create_context |
CREATE TABLE ReviewTaskResultTypes (
Id number,
Name text,
Description text
)
CREATE TABLE SuggestedEditVotes (
Id number,
SuggestedEditId number,
UserId number,
VoteTypeId number,
CreationDate time,
TargetUserId number,
TargetRepChange number
)
CREATE TABLE FlagTypes (
Id ... | SELECT q.Id AS "post_link", a.Score AS "answer_score" FROM Posts AS q, Posts AS a WHERE NOT q.Tags LIKE '%<' + @excluded_tag + '>%' AND (q.Body LIKE '%' + @text + '%' OR q.Title LIKE '%' + @text + '%') AND a.ParentId = q.Id AND a.OwnerUserId = @user ORDER BY 'answer_score' DESC | sede |
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 MIN(patient.admissionweight) FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '030-28944') AND NOT patient.admissionweight IS NULL AND STRFTIME('%y-%m', patient.unitadmittime) >= '2105-08' GROUP BY STRFTIME('%y', patient.unit... | eicu |
CREATE TABLE zyb (
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.MED_CLINIC_ID FROM qtb WHERE qtb.PERSON_NM = '周哲彦' AND qtb.MED_SER_ORG_NO = '0211238' AND NOT qtb.IN_DIAG_DIS_NM LIKE '%包括%' UNION SELECT gyb.MED_CLINIC_ID FROM gyb WHERE gyb.PERSON_NM = '周哲彦' AND gyb.MED_SER_ORG_NO = '0211238' AND NOT gyb.IN_DIAG_DIS_NM LIKE '%包括%' UNION SELECT zyb.MED_CLINIC_ID FROM zyb WH... | css |
CREATE TABLE mzjzjlb (
YLJGDM text,
JZLSH text,
KH text,
KLX number,
MJZH text,
HZXM text,
NLS number,
NLY number,
ZSEBZ number,
JZZTDM number,
JZZTMC text,
JZJSSJ time,
TXBZ number,
ZZBZ number,
WDBZ number,
JZKSBM text,
JZKSMC text,
JZKSRQ time,
... | SELECT SQRGH, SQRXM FROM jybgb WHERE BGDH = '03066452017' | css |
CREATE TABLE table_22115 (
"District" text,
"Incumbent" text,
"Party" text,
"First elected" real,
"Results" text,
"Candidates" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- How many parties were first elected in 1994?
| SELECT COUNT("Party") FROM table_22115 WHERE "First elected" = '1994' | 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 COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE demographic.admission_type = "EMERGENCY" AND diagnoses.short_title = "Do not resusctate status" | mimicsql_data |
CREATE TABLE prescriptions (
subject_id text,
hadm_id text,
icustay_id text,
drug_type text,
drug text,
formulary_drug_cd text,
route text,
drug_dose text
)
CREATE TABLE procedures (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE diagnoses.long_title = "Secondary neuroendocrine tumor of bone" AND lab.flag = "abnormal" | mimicsql_data |
CREATE TABLE table_60962 (
"Class" text,
"Team" text,
"Drivers" text,
"Laps" real,
"Qual Pos" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Who are the drivers with 133 laps in OC class?
| SELECT "Drivers" FROM table_60962 WHERE "Laps" = '133' AND "Class" = 'oc' | wikisql |
CREATE TABLE dorm_amenity (
amenid number,
amenity_name text
)
CREATE TABLE dorm (
dormid number,
dorm_name text,
student_capacity number,
gender text
)
CREATE TABLE lives_in (
stuid number,
dormid number,
room_number number
)
CREATE TABLE student (
stuid number,
lname tex... | SELECT COUNT(*), AVG(age), city_code FROM student WHERE sex = 'M' GROUP BY city_code | 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_CLINIC_ID text,
MED_DIRE_CD tex... | SELECT t_kc22.SOC_SRT_DIRE_CD, t_kc22.SOC_SRT_DIRE_NM FROM t_kc22 WHERE t_kc22.t_kc21_PERSON_NM = '范雅韶' AND t_kc22.MED_INV_ITEM_TYPE = '治疗费' | css |
CREATE TABLE table_name_70 (
event VARCHAR,
position VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the event that is in 8th position?
| SELECT event FROM table_name_70 WHERE position = "8th" | sql_create_context |
CREATE TABLE station (
id INTEGER,
name TEXT,
lat NUMERIC,
long NUMERIC,
dock_count INTEGER,
city TEXT,
installation_date TEXT
)
CREATE TABLE weather (
date TEXT,
max_temperature_f INTEGER,
mean_temperature_f INTEGER,
min_temperature_f INTEGER,
max_dew_point_f INTEGER,
... | SELECT name, id FROM station AS T1 JOIN status AS T2 ON T1.id = T2.station_id WHERE T2.bikes_available > 12 ORDER BY name | 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 d_icd_procedures (
row_id number,
icd9_code text,
s... | SELECT COUNT(*) > 0 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 = 1912)) AND chartevents.itemid IN (SELECT d_items.itemid FROM d_items WHERE d_items.label = 'respiratory rate' ... | mimic_iii |
CREATE TABLE time_zone (
time_zone_code text,
time_zone_name text,
hours_from_gmt int
)
CREATE TABLE food_service (
meal_code text,
meal_number int,
compartment text,
meal_description varchar
)
CREATE TABLE date_day (
month_number int,
day_number int,
year int,
day_name var... | 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 = 'PITTSBURGH' AND CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'PHI... | atis |
CREATE TABLE journal (
journalid int,
journalname varchar
)
CREATE TABLE author (
authorid int,
authorname varchar
)
CREATE TABLE paperdataset (
paperid int,
datasetid int
)
CREATE TABLE paperkeyphrase (
paperid int,
keyphraseid int
)
CREATE TABLE field (
fieldid int
)
CREATE TA... | SELECT DISTINCT COUNT(DISTINCT writes.paperid) FROM author, writes WHERE author.authorname = 'Srinivasan Iyer' AND writes.authorid = author.authorid | scholar |
CREATE TABLE PostHistoryTypes (
Id number,
Name text
)
CREATE TABLE FlagTypes (
Id number,
Name text,
Description text
)
CREATE TABLE Posts (
Id number,
PostTypeId number,
AcceptedAnswerId number,
ParentId number,
CreationDate time,
DeletionDate time,
Score number,
... | SELECT MONTH(p.CreationDate), COUNT(p.Id), (SELECT COUNT(q.Id) FROM Posts AS q WHERE YEAR(q.CreationDate) = '##Year##' AND MONTH(q.CreationDate) = MONTH(p.CreationDate) AND q.Score > 0 AND q.PostTypeId = 1), (SELECT COUNT(r.Id) FROM Posts AS r WHERE YEAR(r.CreationDate) = '##Year##' AND MONTH(r.CreationDate) = MONTH(p.... | sede |
CREATE TABLE available_policies (
policy_id number,
policy_type_code text,
customer_phone text
)
CREATE TABLE services (
service_id number,
service_name text
)
CREATE TABLE customers_policies (
customer_id number,
policy_id number,
date_opened time,
date_closed time
)
CREATE TABLE... | SELECT DISTINCT t3.policy_type_code FROM customers AS t1 JOIN customers_policies AS t2 ON t1.customer_id = t2.customer_id JOIN available_policies AS t3 ON t2.policy_id = t3.policy_id WHERE t1.customer_name = (SELECT t1.customer_name FROM customers AS t1 JOIN customers_policies AS t2 ON t1.customer_id = t2.customer_id G... | spider |
CREATE TABLE table_name_42 (
rank INTEGER,
location VARCHAR,
current_seating_capacity VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is Lowest Rank, when Location is Rio De Janeiro, Brazil, and when Current Seating Capacity is less than 78,838?
| SELECT MIN(rank) FROM table_name_42 WHERE location = "rio de janeiro, brazil" AND current_seating_capacity < 78 OFFSET 838 | sql_create_context |
CREATE TABLE table_77294 (
"Rank" real,
"City" text,
"2010 Pop" real,
"2000 Pop" real,
"\u0394 Current Pop" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What was the 2010 population of frankfort which has a rank smaller than 14?
| SELECT AVG("2010 Pop") FROM table_77294 WHERE "City" = 'frankfort' AND "Rank" < '14' | wikisql |
CREATE TABLE table_39654 (
"Shirt No" real,
"Nationality" text,
"Player" text,
"Birth Date" text,
"Height" real,
"Position" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the name of the player who is a height of 182?
| SELECT "Player" FROM table_39654 WHERE "Height" = '182' | wikisql |
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 t1.drugname FROM (SELECT medication.drugname, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM medication WHERE medication.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.age BETWEEN 20 AND 29) AND STRFTIME('%y', medication.drugstarttime) <= '2102' GROUP BY medication.drugn... | eicu |
CREATE TABLE table_name_43 (
english VARCHAR,
twie VARCHAR,
Limburgish VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the English word for twie?
| SELECT english FROM table_name_43 WHERE DUTCH(Limburgish) = twie | sql_create_context |
CREATE TABLE team (
Team_id int,
Name text
)
CREATE TABLE match_season (
Season real,
Player text,
Position text,
Country int,
Team int,
Draft_Pick_Number int,
Draft_Class text,
College text
)
CREATE TABLE country (
Country_id int,
Country_name text,
Capital text,
... | SELECT Country_name, COUNT(*) FROM country AS T1 JOIN match_season AS T2 ON T1.Country_id = T2.Country GROUP BY T1.Country_name ORDER BY COUNT(*) DESC | nvbench |
CREATE TABLE t_kc24 (
ACCOUNT_DASH_DATE time,
ACCOUNT_DASH_FLG number,
CASH_PAY number,
CIVIL_SUBSIDY number,
CKC102 number,
CLINIC_ID text,
CLINIC_SLT_DATE time,
COMP_ID text,
COM_ACC_PAY number,
COM_PAY number,
DATA_ID text,
ENT_ACC_PAY number,
ENT_PAY number,
F... | SELECT t_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 = '6951170' GROUP BY t_kc22.SOC_SRT_DIRE_CD ORDER BY COUNT(*) DESC LIMIT 1 | css |
CREATE TABLE table_5669 (
"Date" text,
"Opponent" text,
"Score" text,
"Loss" text,
"Record" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Who was the opponent when Hoeft (19-14) took the loss?
| SELECT "Opponent" FROM table_5669 WHERE "Loss" = 'hoeft (19-14)' | wikisql |
CREATE TABLE table_27893892_2 (
attendance INTEGER,
date VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- what was the participation for saturday, may 12
| SELECT MAX(attendance) FROM table_27893892_2 WHERE date = "Saturday, May 12" | sql_create_context |
CREATE TABLE lab (
subject_id text,
hadm_id text,
itemid text,
charttime text,
flag text,
value_unit text,
label text,
fluid text
)
CREATE TABLE 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 WHERE demographic.gender = "F" AND demographic.ethnicity = "UNKNOWN/NOT SPECIFIED" | mimicsql_data |
CREATE TABLE PendingFlags (
Id number,
FlagTypeId number,
PostId number,
CreationDate time,
CloseReasonTypeId number,
CloseAsOffTopicReasonTypeId number,
DuplicateOfQuestionId number,
BelongsOnBaseHostAddress text
)
CREATE TABLE PostsWithDeleted (
Id number,
PostTypeId number,
... | SELECT DISTINCT my.PostId AS "post_link", my.Id, type.Name, other.UserId FROM Posts AS p JOIN PostHistory AS my ON p.Id = my.PostId JOIN PostHistory AS other ON p.Id = other.PostId JOIN PostHistoryTypes AS type ON my.PostHistoryTypeId = type.Id ORDER BY my.Id DESC | sede |
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 SUM(t_kc24.OVE_PAY) FROM t_kc24 WHERE t_kc24.t_kc21_MED_SER_ORG_NO = '0655890' AND t_kc24.CLINIC_SLT_DATE BETWEEN '2013-01-21' AND '2020-01-10' | css |
CREATE TABLE compartment_class (
compartment varchar,
class_type varchar
)
CREATE TABLE time_interval (
period text,
begin_time int,
end_time int
)
CREATE TABLE class_of_service (
booking_class varchar,
rank int,
class_description text
)
CREATE TABLE time_zone (
time_zone_code tex... | 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, flight_stop WHERE (CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'SAN FRANCISCO' AND CIT... | atis |
CREATE TABLE stadium (
ID int,
name text,
Capacity int,
City text,
Country text,
Opening_year int
)
CREATE TABLE event (
ID int,
Name text,
Stadium_ID int,
Year text
)
CREATE TABLE swimmer (
ID int,
name text,
Nationality text,
meter_100 real,
meter_200 text... | SELECT meter_200, COUNT(meter_200) FROM swimmer GROUP BY meter_200 ORDER BY meter_200 | nvbench |
CREATE TABLE table_name_40 (
notes VARCHAR,
authors VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which Notes has Authors of zhou clarke zhang?
| SELECT notes FROM table_name_40 WHERE authors = "zhou clarke zhang" | sql_create_context |
CREATE TABLE CloseReasonTypes (
Id number,
Name text,
Description text
)
CREATE TABLE SuggestedEdits (
Id number,
PostId number,
CreationDate time,
ApprovalDate time,
RejectionDate time,
OwnerUserId number,
Comment text,
Text text,
Title text,
Tags text,
Revision... | SELECT Id, Body, Title, Tags, AnswerCount, Score, ViewCount, CommentCount FROM Posts WHERE CreationDate >= '2019-01-01' AND CreationDate <= '2019-03-31' AND PostTypeId = 1 AND Tags LIKE '%python%' LIMIT 20000 | sede |
CREATE TABLE table_55123 (
"Episode #" real,
"# in Season" real,
"Episode Name" text,
"Airdate" text,
"Location" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which air date has 5 for # in season?
| SELECT "Airdate" FROM table_55123 WHERE "# in Season" = '5' | wikisql |
CREATE TABLE table_54091 (
"Date" text,
"Visitor" text,
"Score" text,
"Home" text,
"Leading scorer" text,
"Attendance" real,
"Record" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What was the score when the nets were the visitors and atten... | SELECT "Score" FROM table_54091 WHERE "Attendance" > '16,494' AND "Visitor" = 'nets' | wikisql |
CREATE TABLE Ship (
Ship_ID int,
Name text,
Type text,
Built_Year real,
Class text,
Flag text
)
CREATE TABLE captain (
Captain_ID int,
Name text,
Ship_ID int,
age text,
Class text,
Rank text
)
-- Using valid SQLite, answer the following questions for the tables provide... | SELECT Rank, COUNT(Rank) FROM captain GROUP BY Rank ORDER BY COUNT(Rank) DESC | nvbench |
CREATE TABLE table_8167 (
"Week" real,
"Date" text,
"Opponent" text,
"Result" text,
"Record" text,
"Game site" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What team was the opponent with a record of 5 0?
| SELECT "Opponent" FROM table_8167 WHERE "Record" = '5–0' | wikisql |
CREATE TABLE table_204_374 (
id number,
"event" text,
"gold" number,
"silver" number,
"bronze" number,
"total" number,
"ranking" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- which year was their highest ranking ?
| SELECT "event" FROM table_204_374 ORDER BY "ranking" LIMIT 1 | squall |
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 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 '2005-12-06' AND '2015-09-07' GROUP BY t_kc22.SOC_SRT_DIRE_CD ORDER BY COUNT(*) DESC LIMIT 1 | css |
CREATE TABLE table_27730 (
"Number" real,
"Name" text,
"Vertices" text,
"Hypotenuse 0 c" text,
"Vertical 0 b" text,
"Horizontal 0 a" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Name the horizontal 0 for ry
| SELECT "Horizontal 0 a" FROM table_27730 WHERE "Hypotenuse 0 c" = '明弦(RY日月)' | wikisql |
CREATE TABLE table_name_61 (
city_of_license__market VARCHAR,
station VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the city containing the KDKA-TV station?
| SELECT city_of_license__market FROM table_name_61 WHERE station = "kdka-tv" | sql_create_context |
CREATE TABLE table_name_32 (
bronze INTEGER,
total INTEGER
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Name the average bronze for total less than 1
| SELECT AVG(bronze) FROM table_name_32 WHERE total < 1 | sql_create_context |
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 COUNT(*) > 0 FROM medication WHERE medication.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '029-584')) AND DATETIME(medication.drugstarttime, 'start of year') = DATET... | eicu |
CREATE TABLE table_name_22 (
tournament VARCHAR,
score_in_the_final VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- what tornament had the scores 6 7, 6 2, 6 4?
| SELECT tournament FROM table_name_22 WHERE score_in_the_final = "6–7, 6–2, 6–4" | sql_create_context |
CREATE TABLE table_26980923_2 (
capacity VARCHAR,
team VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the capacity for dundee united?
| SELECT capacity FROM table_26980923_2 WHERE team = "Dundee United" | sql_create_context |
CREATE TABLE table_71974 (
"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 12 september 2006
| SELECT "Surface" FROM table_71974 WHERE "Date" = '12 september 2006' | wikisql |
CREATE TABLE jyjgzbb (
BGDH text,
BGRQ time,
CKZFWDX text,
CKZFWSX number,
CKZFWXX number,
JCFF text,
JCRGH text,
JCRXM text,
JCXMMC text,
JCZBDM text,
JCZBJGDL number,
JCZBJGDW text,
JCZBJGDX text,
JCZBMC text,
JLDW text,
JYRQ time,
JYZBLSH text,
... | SELECT * FROM person_info JOIN hz_info JOIN zyjzjlb JOIN person_info_hz_info ON person_info.RYBH = person_info_hz_info.RYBH AND hz_info.YLJGDM = zyjzjlb.YLJGDM AND hz_info.KH = zyjzjlb.KH AND hz_info.KLX = zyjzjlb.KLX AND person_info_hz_info.KH = hz_info.KH AND person_info_hz_info.KLX = hz_info.KLX AND person_info_hz_i... | css |
CREATE TABLE table_27787 (
"Position" real,
"Race number" text,
"Sail number" text,
"Yacht" text,
"State/country" text,
"Yacht type" text,
"LOA (Metres)" text,
"Skipper" text,
"Elapsed time d:hh:mm:ss" text
)
-- Using valid SQLite, answer the following questions for the tables prov... | SELECT "Skipper" FROM table_27787 WHERE "Sail number" = 'AUS60000' | wikisql |
CREATE TABLE ReviewTaskStates (
Id number,
Name text,
Description text
)
CREATE TABLE PostHistoryTypes (
Id number,
Name text
)
CREATE TABLE ReviewTaskResultTypes (
Id number,
Name text,
Description text
)
CREATE TABLE Badges (
Id number,
UserId number,
Name text,
Date... | SELECT link = CONCAT('http://meta.puzzling.stackexchange.com/a/', Id) FROM Posts WHERE ParentId = @questionnaire_question_id AND OwnerUserId = @candidate_user_id | sede |
CREATE TABLE table_39079 (
"Game" real,
"October" real,
"Opponent" text,
"Score" text,
"Record" text,
"Points" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which October is the lowest one that has an Opponent of washington capitals?
| SELECT MIN("October") FROM table_39079 WHERE "Opponent" = 'washington capitals' | wikisql |
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.admission_type FROM demographic WHERE demographic.subject_id = "29961" | mimicsql_data |
CREATE TABLE table_63173 (
"Year" real,
"Category" text,
"Nominee(s)" text,
"Episode" text,
"Result" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What was the category of the award that John Frank Levey was nominated for after 1995?
| SELECT "Category" FROM table_63173 WHERE "Nominee(s)" = 'john frank levey' AND "Year" > '1995' | wikisql |
CREATE TABLE procedures (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE lab (
subject_id text,
hadm_id text,
itemid text,
charttime text,
flag text,
value_unit text,
label text,
fluid text
)
CREATE TABLE prescription... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE demographic.days_stay > "8" AND diagnoses.long_title = "Ostium secundum type atrial septal defect" | mimicsql_data |
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.KSBM, jybgb.KSMC FROM person_info JOIN hz_info JOIN zzmzjzjlb JOIN jybgb ON person_info.RYBH = hz_info.RYBH AND hz_info.YLJGDM = zzmzjzjlb.YLJGDM AND hz_info.KH = zzmzjzjlb.KH AND hz_info.KLX = zzmzjzjlb.KLX AND zzmzjzjlb.YLJGDM = jybgb.YLJGDM_MZJZJLB AND zzmzjzjlb.JZLSH = jybgb.JZLSH_MZJZJLB WHERE person_... | css |
CREATE TABLE table_name_20 (
tracks VARCHAR,
catalog VARCHAR,
length VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the Tracks of the release in Catalog BA 222304 with a Length of 2:57?
| SELECT tracks FROM table_name_20 WHERE catalog = "ba 222304" AND length = "2:57" | 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 diagnoses (
... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.gender = "M" AND procedures.short_title = "Endosc destr stomach les" | mimicsql_data |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.