instruction
stringlengths
151
7.46k
output
stringlengths
2
4.44k
source
stringclasses
26 values
CREATE TABLE lab ( subject_id text, hadm_id text, itemid text, charttime text, flag text, value_unit text, label text, fluid text ) CREATE TABLE diagnoses ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) CREATE TABLE prescriptions...
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.age < "85" AND lab.label = "MCV"
mimicsql_data
CREATE TABLE lab ( subject_id text, hadm_id text, itemid text, charttime text, flag text, value_unit text, label text, fluid text ) CREATE TABLE demographic ( subject_id text, hadm_id text, name text, marital_status text, age text, dob text, gender text, ...
SELECT 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.icd9_code = "76525" AND lab.fluid = "Cerebrospinal Fluid (CSF)"
mimicsql_data
CREATE TABLE table_27744976_10 ( record VARCHAR, team VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What was the rocket's record when they played against Indiana?
SELECT record FROM table_27744976_10 WHERE team = "Indiana"
sql_create_context
CREATE TABLE table_204_595 ( id number, "rank" number, "nation" text, "gold" number, "silver" number, "bronze" number, "total" number ) -- Using valid SQLite, answer the following questions for the tables provided above. -- what country won more gold medals than any other ?
SELECT "nation" FROM table_204_595 ORDER BY "gold" DESC LIMIT 1
squall
CREATE TABLE table_24588 ( "Year" text, "MAAC" text, "Overall" text, "Regular Season Results" text, "MAAC Tournament Result" text, "NCAA Seed" text, "NCAA Round" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- How many overall in the year 201...
SELECT COUNT("Overall") FROM table_24588 WHERE "Year" = '2010-2011'
wikisql
CREATE TABLE table_72015 ( "Wicket" text, "Runs" text, "Partnerships" text, "Venue" text, "Date" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which partnership has a run number of 27?
SELECT "Partnerships" FROM table_72015 WHERE "Runs" = '27'
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 COUNT(*) FROM gwyjzb WHERE gwyjzb.MED_SER_ORG_NO = '3199188' AND gwyjzb.IN_HOSP_DATE BETWEEN '2001-05-16' AND '2019-07-23' AND gwyjzb.INSURED_STS = '未就业' AND gwyjzb.MED_AMOUT >= 559.51 UNION SELECT COUNT(*) FROM fgwyjzb WHERE fgwyjzb.MED_SER_ORG_NO = '3199188' AND fgwyjzb.IN_HOSP_DATE BETWEEN '2001-05-16' AND '2...
css
CREATE TABLE qtb ( 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_ORG_DEPT_CD, qtb.OUT_DIAG_DIS_NM, AVG(qtb.PERSON_AGE) FROM qtb WHERE qtb.MED_SER_ORG_NO = '0297464' GROUP BY qtb.MED_ORG_DEPT_CD, qtb.OUT_DIAG_DIS_NM UNION SELECT gyb.MED_ORG_DEPT_CD, gyb.OUT_DIAG_DIS_NM, AVG(gyb.PERSON_AGE) FROM gyb WHERE gyb.MED_SER_ORG_NO = '0297464' GROUP BY gyb.MED_ORG_DEPT_CD, gyb....
css
CREATE TABLE microbiologyevents ( row_id number, subject_id number, hadm_id number, charttime time, spec_type_desc text, org_name text ) CREATE TABLE d_items ( row_id number, itemid number, label text, linksto text ) CREATE TABLE d_icd_procedures ( row_id number, icd9_c...
SELECT COUNT(DISTINCT admissions.subject_id) FROM admissions WHERE admissions.hadm_id IN (SELECT procedures_icd.hadm_id FROM procedures_icd WHERE procedures_icd.icd9_code = (SELECT d_icd_procedures.icd9_code FROM d_icd_procedures WHERE d_icd_procedures.short_title = 'creat esophagastr sphinc') AND DATETIME(procedures_i...
mimic_iii
CREATE TABLE table_name_71 ( touchdowns VARCHAR, player VARCHAR, extra_points VARCHAR, position VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- How many touchdowns are there when there were 0 extra points and Hal Weeks had left halfback?
SELECT touchdowns FROM table_name_71 WHERE extra_points = 0 AND position = "left halfback" AND player = "hal weeks"
sql_create_context
CREATE TABLE table_26068 ( "Period" text, "Live births per year" text, "Deaths per year" text, "Natural change per year" text, "CBR*" text, "CDR*" text, "NC*" text, "TFR*" text, "IMR*" real, "Life expectancy total" text, "Life expectancy males" text, "Life expectancy fema...
SELECT MIN("IMR*") FROM table_26068 WHERE "Life expectancy males" = '64.3'
wikisql
CREATE TABLE table_name_81 ( other_deaths VARCHAR, israeli_and_or_foreigner_wounded VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- How many other deaths were in the attack with 242 Israelis and/or foreigners wounded?
SELECT other_deaths FROM table_name_81 WHERE israeli_and_or_foreigner_wounded = "242"
sql_create_context
CREATE TABLE demographic ( subject_id text, hadm_id text, name text, marital_status text, age text, dob text, gender text, language text, religion text, admission_type text, days_stay text, insurance text, ethnicity text, expire_flag text, admission_location t...
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.admission_type = "ELECTIVE" AND demographic.admityear < "2203"
mimicsql_data
CREATE TABLE Badges ( Id number, UserId number, Name text, Date time, Class number, TagBased boolean ) CREATE TABLE Votes ( Id number, PostId number, VoteTypeId number, UserId number, CreationDate time, BountyAmount number ) CREATE TABLE PostHistory ( Id number, ...
SELECT t.TagName, SUM(Posts.Score), COUNT(*) FROM Posts INNER JOIN Posts AS pm ON Posts.ParentId = pm.Id INNER JOIN PostTags AS pt ON pm.Id = pt.PostId INNER JOIN Tags AS t ON t.Id = pt.TagId WHERE Posts.OwnerUserId = '##UserId##' GROUP BY t.TagName ORDER BY SUM(Posts.Score) DESC
sede
CREATE TABLE Student_Tests_Taken ( registration_id INTEGER, date_test_taken DATETIME, test_result VARCHAR(255) ) CREATE TABLE Courses ( course_id INTEGER, author_id INTEGER, subject_id INTEGER, course_name VARCHAR(120), course_description VARCHAR(255) ) CREATE TABLE Subjects ( subj...
SELECT date_of_enrolment, COUNT(date_of_enrolment) FROM Student_Course_Enrolment AS T1 JOIN Student_Tests_Taken AS T2 ON T1.registration_id = T2.registration_id WHERE T2.test_result = "Pass"
nvbench
CREATE TABLE table_name_10 ( location VARCHAR, silver VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which Location has a Silver of japan?
SELECT location FROM table_name_10 WHERE silver = "japan"
sql_create_context
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_ID = '06445268' AND qtb.MED_SER_ORG_NO = '5566440' AND qtb.IN_DIAG_DIS_NM LIKE '%病%' UNION SELECT gyb.MED_CLINIC_ID FROM gyb WHERE gyb.PERSON_ID = '06445268' AND gyb.MED_SER_ORG_NO = '5566440' AND gyb.IN_DIAG_DIS_NM LIKE '%病%' UNION SELECT zyb.MED_CLINIC_ID FROM zyb WH...
css
CREATE TABLE customer ( cust_ID varchar(3), cust_name varchar(20), acc_type char(1), acc_bal int, no_of_loans int, credit_score int, branch_ID int, state varchar(20) ) CREATE TABLE bank ( branch_ID int, bname varchar(20), no_of_customers int, city varchar(10), state ...
SELECT bname, SUM(amount) FROM bank AS T1 JOIN loan AS T2 ON T1.branch_ID = T2.branch_ID GROUP BY T1.bname ORDER BY bname DESC
nvbench
CREATE TABLE table_43962 ( "Bank type" text, "Number of branches" real, "On-site ATMs" real, "Off-site ATMs" real, "Total ATMs" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the total number of branches when the on-site ATMS is 1548, and th...
SELECT SUM("Number of branches") FROM table_43962 WHERE "On-site ATMs" = '1548' AND "Off-site ATMs" > '3672'
wikisql
CREATE TABLE diagnoses ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) CREATE TABLE procedures ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) CREATE TABLE prescriptions ( subject_id text, hadm_id...
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.age < "59" AND lab."CATEGORY" = "Blood Gas"
mimicsql_data
CREATE TABLE PostTags ( PostId number, TagId number ) CREATE TABLE CloseAsOffTopicReasonTypes ( Id number, IsUniversal boolean, InputTitle text, MarkdownInputGuidance text, MarkdownPostOwnerGuidance text, MarkdownPrivilegedUserGuidance text, MarkdownConcensusDescription text, Cr...
SELECT Score, Id AS "post_link" FROM Posts WHERE PostTypeId = 1 ORDER BY Score LIMIT 10
sede
CREATE TABLE Badges ( Id number, UserId number, Name text, Date time, Class number, TagBased boolean ) CREATE TABLE PostTypes ( Id number, Name text ) CREATE TABLE PostLinks ( Id number, CreationDate time, PostId number, RelatedPostId number, LinkTypeId number ) CR...
SELECT OwnerUserId AS "user_link", COUNT(*) AS PostCount, SUM(Score) AS TotalScore FROM Posts WHERE PostTypeId = 1 AND OwnerUserId = @UserId GROUP BY OwnerUserId
sede
CREATE TABLE table_name_16 ( home VARCHAR, date VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which home has a Date of november 7?
SELECT home FROM table_name_16 WHERE date = "november 7"
sql_create_context
CREATE TABLE table_20848569_9 ( no INTEGER, total_goals VARCHAR, total_apps VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Where total goals is 1 and total apps is 33, what is the smallest no.?
SELECT MIN(no) FROM table_20848569_9 WHERE total_goals = 1 AND total_apps = 33
sql_create_context
CREATE TABLE t_kc24 ( ACCOUNT_DASH_DATE time, ACCOUNT_DASH_FLG number, CASH_PAY number, CIVIL_SUBSIDY number, CKC102 number, CLINIC_ID text, CLINIC_SLT_DATE time, COMP_ID text, COM_ACC_PAY number, COM_PAY number, DATA_ID text, ENT_ACC_PAY number, ENT_PAY number, F...
SELECT * FROM t_kc21 WHERE t_kc21.MED_SER_ORG_NO = '2786957' AND t_kc21.IN_HOSP_DATE BETWEEN '2011-07-23' AND '2016-01-23' AND t_kc21.PERSON_NM LIKE '周%'
css
CREATE TABLE table_name_91 ( opponent VARCHAR, series VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which Opponent has a Series of bruins lead 2 1?
SELECT opponent FROM table_name_91 WHERE series = "bruins lead 2–1"
sql_create_context
CREATE TABLE table_79257 ( "Railroad (quantity)" text, "Class" text, "Road numbers" text, "Builder" text, "Build year" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- what is the road numbers when the build year is 1943, the railroad (quantity) is cl...
SELECT "Road numbers" FROM table_79257 WHERE "Build year" = '1943' AND "Railroad (quantity)" = 'clinchfield railroad (12 new, 6 secondhand)'
wikisql
CREATE TABLE regions ( REGION_ID decimal(5,0), REGION_NAME varchar(25) ) CREATE TABLE locations ( LOCATION_ID decimal(4,0), STREET_ADDRESS varchar(40), POSTAL_CODE varchar(12), CITY varchar(30), STATE_PROVINCE varchar(25), COUNTRY_ID varchar(2) ) CREATE TABLE departments ( DEPARTME...
SELECT HIRE_DATE, EMPLOYEE_ID FROM employees WHERE SALARY BETWEEN 8000 AND 12000 AND COMMISSION_PCT <> "null" OR DEPARTMENT_ID <> 40 ORDER BY HIRE_DATE 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_kc22 WHERE t_kc22.MED_CLINIC_ID IN (SELECT t_kc22.MED_CLINIC_ID FROM t_kc22 WHERE t_kc22.t_kc21_PERSON_NM = '魏嘉云' AND t_kc22.t_kc21_MED_SER_ORG_NO = '7989526' AND t_kc22.t_kc21_IN_HOSP_DATE BETWEEN '2002-01-07' AND '2010-01-02')
css
CREATE TABLE table_22575 ( "No. in series" real, "No. in season" real, "Title" text, "Directed by" text, "Written by" text, "Original air date" text, "Production code" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the title of the p...
SELECT "Title" FROM table_22575 WHERE "Production code" = '1ACX09'
wikisql
CREATE TABLE table_27350 ( "Pick #" real, "CFL Team" text, "Player" text, "Position" text, "College" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- How many colleges provided players with positions LB?
SELECT COUNT("College") FROM table_27350 WHERE "Position" = 'LB'
wikisql
CREATE TABLE table_869 ( "Draft Year" real, "Player" text, "Position" text, "Round" real, "Overall" real, "NFL Team" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What team drafted steve scifres?
SELECT "NFL Team" FROM table_869 WHERE "Player" = 'Steve Scifres'
wikisql
CREATE TABLE table_14747043_1 ( class_a VARCHAR, class_aAAAA VARCHAR, Weslaco VARCHAR, class_aAAA VARCHAR, Brownwood VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which is the class A when Weslaco was the class AAAAA and brownwood was the class ...
SELECT class_a FROM table_14747043_1 WHERE class_aAAAA = Weslaco AND class_aAAA = Brownwood
sql_create_context
CREATE TABLE table_name_61 ( byes INTEGER, draws VARCHAR, against VARCHAR, losses VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the highest value for Byes, when Against is less than 1794, when Losses is '6', and when Draws is less than 0?
SELECT MAX(byes) FROM table_name_61 WHERE against < 1794 AND losses = 6 AND draws < 0
sql_create_context
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 class_of_service ( booking_class varchar, rank int, class_description text ) CREATE ...
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 = 'PHILADELPHIA' AND date_day.day_number = 26 AND date_day.month_number = 7 ...
atis
CREATE TABLE table_name_1 ( version VARCHAR, length VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the version shown for the Length of 4:58?
SELECT version FROM table_name_1 WHERE length = "4:58"
sql_create_context
CREATE TABLE table_70129 ( "Player" text, "Test Career" text, "Tests" real, "Catches" real, "Stumpings" real, "Total Dismissals" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Who has a career that has test larger than 41, catches over 33, and a...
SELECT "Test Career" FROM table_70129 WHERE "Tests" > '41' AND "Catches" > '33' AND "Total Dismissals" = '147'
wikisql
CREATE TABLE area ( course_id int, area varchar ) CREATE TABLE ta ( campus_job_id int, student_id int, location varchar ) CREATE TABLE course ( course_id int, name varchar, department varchar, number varchar, credits varchar, advisory_requirement varchar, enforced_requi...
SELECT DISTINCT instructor.name 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 INNER JOIN offering_instructor ON offering_instr...
advising
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, SUM(ID) FROM swimmer GROUP BY meter_200 ORDER BY SUM(ID) DESC
nvbench
CREATE TABLE table_name_26 ( score VARCHAR, date VARCHAR, decision VARCHAR, visitor VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Decision of parent, and a Visitor of Philadelphia, and a Date of January 27 had what score?
SELECT score FROM table_name_26 WHERE decision = "parent" AND visitor = "philadelphia" AND date = "january 27"
sql_create_context
CREATE TABLE t_kc21_t_kc24 ( MED_CLINIC_ID text, MED_SAFE_PAY_ID number ) 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, ...
SELECT COUNT(t_kc21.MED_SER_ORG_NO) FROM t_kc21 WHERE t_kc21.PERSON_ID = '90084471' AND t_kc21.IN_HOSP_DATE BETWEEN '2008-08-17' AND '2018-05-20'
css
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 aircraft ( aircraft_code varchar, aircraft_description varchar, manufacturer varchar,...
SELECT DISTINCT FLIGHT_0.flight_id FROM airport_service AS AIRPORT_SERVICE_0, airport_service AS AIRPORT_SERVICE_1, airport_service AS AIRPORT_SERVICE_2, airport_service AS AIRPORT_SERVICE_3, city AS CITY_0, city AS CITY_1, city AS CITY_2, city AS CITY_3, date_day AS DATE_DAY_0, date_day AS DATE_DAY_1, days AS DAYS_0, ...
atis
CREATE TABLE table_68774 ( "Date" text, "Opponent" text, "Score" text, "Loss" text, "Attendance" real, "Record" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What was score of the Blue Jays' game versus the Indians when their record was 21-19?
SELECT "Score" FROM table_68774 WHERE "Opponent" = 'indians' AND "Record" = '21-19'
wikisql
CREATE TABLE table_31002 ( "Movies" text, "December 25" text, "December 26" text, "December 27" text, "December 28" text, "December 25-28 total" text, "Total 2-week Gross" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- How many figures are p...
SELECT COUNT("December 28") FROM table_31002 WHERE "Movies" = 'Rosario'
wikisql
CREATE TABLE table_19704392_1 ( modified_torque__lb_ft_ VARCHAR, standard_hp VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the modified torque (lb/ft) when the standard hp n/a?
SELECT COUNT(modified_torque__lb_ft_) FROM table_19704392_1 WHERE standard_hp = "n/a"
sql_create_context
CREATE TABLE table_43472 ( "Game" real, "February" real, "Opponent" text, "Score" text, "Record" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the earliest day that had a game against the Boston Bruins?
SELECT MIN("February") FROM table_43472 WHERE "Opponent" = 'boston bruins'
wikisql
CREATE TABLE table_name_94 ( third_place VARCHAR, winner VARCHAR, runner_up VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What person is in the third place when Thomas Enqvist won and a Runner-up was guy forget?
SELECT third_place FROM table_name_94 WHERE winner = "thomas enqvist" AND runner_up = "guy forget"
sql_create_context
CREATE TABLE table_48135 ( "City" text, "Country" text, "IATA" text, "ICAO" text, "Airport" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- what is the country for the city of cardiff?
SELECT "Country" FROM table_48135 WHERE "City" = 'cardiff'
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_items ( row_id number, itemid number, label text, linksto text ) CREATE TABLE out...
SELECT SUM(outputevents.value) FROM outputevents WHERE outputevents.icustay_id IN (SELECT icustays.icustay_id FROM icustays WHERE icustays.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 8116)) AND DATETIME(outputevents.charttime, 'start of day') = DATETIME(CURRENT_TIME(), 'start of ...
mimic_iii
CREATE TABLE table_name_38 ( date VARCHAR, score VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Name the date for score of 1-5
SELECT date FROM table_name_38 WHERE score = "1-5"
sql_create_context
CREATE TABLE table_name_95 ( time VARCHAR, name VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What was Derek Graham's time?
SELECT time FROM table_name_95 WHERE name = "derek graham"
sql_create_context
CREATE TABLE table_15157 ( "Game" real, "Date" text, "Visitor" text, "Score" text, "Home" text, "Decision" text, "Attendance" real, "Series" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Who has Series of 2 3?
SELECT "Visitor" FROM table_15157 WHERE "Series" = '2 – 3'
wikisql
CREATE TABLE Customer_Orders ( order_id INTEGER, customer_id INTEGER, order_date DATETIME, order_status_code VARCHAR(15) ) CREATE TABLE Addresses ( address_id INTEGER, line_1_number_building VARCHAR(80), city VARCHAR(50), zip_postcode VARCHAR(20), state_province_county VARCHAR(50), ...
SELECT T2.customer_name, COUNT(T2.customer_name) FROM Customer_Address_History AS T1 JOIN Customers AS T2 ON T1.customer_id = T2.customer_id JOIN Addresses AS T3 ON T1.address_id = T3.address_id GROUP BY T2.customer_name ORDER BY T2.customer_name
nvbench
CREATE TABLE table_22654073_13 ( game VARCHAR, date VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- How many games were there on May 1?
SELECT COUNT(game) FROM table_22654073_13 WHERE date = "May 1"
sql_create_context
CREATE TABLE table_12562214_1 ( notes VARCHAR, date__from_ VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- what are the notes for date (from) 12 august 1897?
SELECT notes FROM table_12562214_1 WHERE date__from_ = "12 August 1897"
sql_create_context
CREATE TABLE Tags ( Id number, TagName text, Count number, ExcerptPostId number, WikiPostId number ) CREATE TABLE ReviewTaskTypes ( Id number, Name text, Description text ) CREATE TABLE ReviewTaskResults ( Id number, ReviewTaskId number, ReviewTaskResultTypeId number, C...
SELECT u.DisplayName, MONTH(p.CreationDate) + YEAR(p.CreationDate) * 100 AS "mdate", COUNT(u.DisplayName) AS "num" FROM Posts AS p, Users AS u WHERE p.PostTypeId = 2 AND p.OwnerUserId IN ('##uid##') AND p.OwnerUserId = u.Id GROUP BY MONTH(p.CreationDate) + YEAR(p.CreationDate) * 100, u.DisplayName ORDER BY Num DESC
sede
CREATE TABLE table_204_621 ( id number, "no." number, "date" text, "tournament" text, "winning score" text, "margin\nof victory" text, "runner(s)-up" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- what is the total margin of victory in 1963 ...
SELECT "margin\nof victory" FROM table_204_621 WHERE "date" = 1963 AND "tournament" = 'tucson open invitational'
squall
CREATE TABLE table_name_87 ( resolution VARCHAR, official_website VARCHAR, callsign VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Name the resolution for ketftv.com and callsign of kldo-dt2
SELECT resolution FROM table_name_87 WHERE official_website = "ketftv.com" AND callsign = "kldo-dt2"
sql_create_context
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 microlab.culturetakentime FROM microlab WHERE microlab.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '031-3355' AND patient.hospitaldischargetime IS NULL)) AND microla...
eicu
CREATE TABLE gwyjzb ( 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 gwyjzb.MED_CLINIC_ID FROM gwyjzb WHERE gwyjzb.PERSON_ID = '57773140' AND NOT gwyjzb.MED_CLINIC_ID IN (SELECT t_kc22.MED_CLINIC_ID FROM t_kc22 WHERE t_kc22.AMOUNT >= 5299.72) UNION SELECT fgwyjzb.MED_CLINIC_ID FROM fgwyjzb WHERE fgwyjzb.PERSON_ID = '57773140' AND NOT fgwyjzb.MED_CLINIC_ID IN (SELECT t_kc22.MED_CL...
css
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 hz_info JOIN mzjzjlb JOIN jybgb JOIN jyjgzbb JOIN jybgb_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 = jybgb_jyjgzbb.YLJGDM AND jybgb.BGDH = jyjgzbb.BG...
css
CREATE TABLE microlab ( microlabid number, patientunitstayid number, culturesite text, organism text, culturetakentime time ) CREATE TABLE cost ( costid number, uniquepid text, patienthealthsystemstayid number, eventtype text, eventid number, chargetime time, cost number...
SELECT COUNT(DISTINCT t1.uniquepid) FROM (SELECT patient.uniquepid, treatment.treatmenttime, patient.patienthealthsystemstayid FROM treatment JOIN patient ON treatment.patientunitstayid = patient.patientunitstayid WHERE treatment.treatmentname = 'stress ulcer prophylaxis - pantoprazole' AND STRFTIME('%y', treatment.tre...
eicu
CREATE TABLE table_name_60 ( wins INTEGER, goals_conceded VARCHAR, club VARCHAR, points VARCHAR, goals_scored VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- For the club Minija Kretinga, what's the lowest number of wins with points smaller than 2...
SELECT MIN(wins) FROM table_name_60 WHERE points < 25 AND goals_scored = 22 AND club = "minija kretinga" AND goals_conceded < 39
sql_create_context
CREATE TABLE table_13912 ( "Year(s)" text, "Selection show" text, "Venue" text, "National final main host" text, "National final co host" text, "Semi final/heat host" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What was the venue when David J...
SELECT "Venue" FROM table_13912 WHERE "Semi final/heat host" = 'david jacobs'
wikisql
CREATE TABLE table_10420 ( "7:00 PM" text, "8:00 PM" text, "8:30 PM" text, "9:00 PM" text, "9:30 PM" text, "10:00 PM" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What shows for 7:00 PM when the 8:30 PM is tout le monde en parle?
SELECT "7:00 PM" FROM table_10420 WHERE "8:30 PM" = 'tout le monde en parle'
wikisql
CREATE TABLE table_name_34 ( track VARCHAR, date VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Where was the race on 09-13-2008?
SELECT track FROM table_name_34 WHERE date = "09-13-2008"
sql_create_context
CREATE TABLE table_name_7 ( away_team VARCHAR, home_team VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the name of the away team who play Collingwood?
SELECT away_team FROM table_name_7 WHERE home_team = "collingwood"
sql_create_context
CREATE TABLE demographic ( subject_id text, hadm_id text, name text, marital_status text, age text, dob text, gender text, language text, religion text, admission_type text, days_stay text, insurance text, ethnicity text, expire_flag text, admission_location t...
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE demographic.admityear < "2156" AND diagnoses.icd9_code = "5990"
mimicsql_data
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 t_kc21.OUT_DIAG_DOC_CD, t_kc21.OUT_DIAG_DOC_NM FROM t_kc21 WHERE t_kc21.PERSON_ID = '40870332' GROUP BY t_kc21.OUT_DIAG_DOC_CD ORDER BY COUNT(*) DESC
css
CREATE TABLE table_24349 ( "Type of Record" text, "Attendance" real, "Date/Year" text, "Stadium" text, "Result/Games" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the maximal number of people that attended any of these games?
SELECT MAX("Attendance") FROM table_24349
wikisql
CREATE TABLE PostNoticeTypes ( Id number, ClassId number, Name text, Body text, IsHidden boolean, Predefined boolean, PostNoticeDurationId number ) CREATE TABLE ReviewTaskResults ( Id number, ReviewTaskId number, ReviewTaskResultTypeId number, CreationDate time, Rejectio...
SELECT Age, COUNT(Age) AS "number_of_members" FROM Users GROUP BY Age ORDER BY COUNT(Age) DESC
sede
CREATE TABLE table_name_95 ( rank VARCHAR, director_s_ VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What Rank is the director of maximilian jezo-parovsky?
SELECT rank FROM table_name_95 WHERE director_s_ = "maximilian jezo-parovsky"
sql_create_context
CREATE TABLE table_63 ( "Crop (kilotonnes)" text, "New South Wales" real, "Victoria" real, "Queensland" real, "Western Australia" real, "South Australia" real, "Tasmania" real, "Total" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- what'...
SELECT COUNT("Tasmania") FROM table_63 WHERE "New South Wales" = '190'
wikisql
CREATE TABLE train ( Train_ID int, Train_Num text, Name text, From text, Arrival text, Railway_ID int ) CREATE TABLE railway ( Railway_ID int, Railway text, Builder text, Built text, Wheels text, Location text, ObjectNumber text ) CREATE TABLE railway_manage ( R...
SELECT Arrival, COUNT(Arrival) FROM train GROUP BY Arrival ORDER BY Arrival
nvbench
CREATE TABLE FlagTypes ( Id number, Name text, Description text ) CREATE TABLE ReviewTaskTypes ( Id number, Name text, Description text ) CREATE TABLE PostTypes ( Id number, Name text ) CREATE TABLE PostHistoryTypes ( Id number, Name text ) CREATE TABLE PostLinks ( Id num...
SELECT sub.NumQuestions, COUNT(*) AS UserCount FROM (SELECT COUNT(*) AS NumQuestions FROM Posts AS p INNER JOIN Users AS u ON p.OwnerUserId = u.Id WHERE p.PostTypeId = 1 GROUP BY u.Id) AS sub GROUP BY sub.NumQuestions
sede
CREATE TABLE table_name_67 ( proximity VARCHAR, plural VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is Proximity, when Plural is amader (our)?
SELECT proximity FROM table_name_67 WHERE plural = "amader (our)"
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 jybgb.SHRGH, jybgb.SHRXM FROM jybgb WHERE jybgb.BGDH = '09731045975'
css
CREATE TABLE jobs ( JOB_ID varchar(10), JOB_TITLE varchar(35), MIN_SALARY decimal(6,0), MAX_SALARY decimal(6,0) ) CREATE TABLE countries ( COUNTRY_ID varchar(2), COUNTRY_NAME varchar(40), REGION_ID decimal(10,0) ) CREATE TABLE job_history ( EMPLOYEE_ID decimal(6,0), START_DATE date...
SELECT PHONE_NUMBER, MANAGER_ID FROM employees WHERE NOT DEPARTMENT_ID IN (SELECT DEPARTMENT_ID FROM departments WHERE MANAGER_ID BETWEEN 100 AND 200) ORDER BY PHONE_NUMBER DESC
nvbench
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 t3.culturesite FROM (SELECT t2.culturesite, 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 = 'hypoxemia' AND STRFTIME('%y', diagnosis.diag...
eicu
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 < "31" AND prescriptions.route = "IVPCA"
mimicsql_data
CREATE TABLE hz_info ( KH text, KLX number, RYBH text, YLJGDM text ) 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, ...
SELECT wdmzjzjlb.JZLSH FROM person_info JOIN hz_info JOIN wdmzjzjlb ON person_info.RYBH = hz_info.RYBH AND hz_info.YLJGDM = wdmzjzjlb.YLJGDM AND hz_info.KH = wdmzjzjlb.KH AND hz_info.KLX = wdmzjzjlb.KLX WHERE person_info.XM = '袁华皓' AND hz_info.YLJGDM = '3861685' AND wdmzjzjlb.JZKSMC LIKE '%正骨科%' UNION SELECT bdmzjzjlb....
css
CREATE TABLE field ( fieldid int ) CREATE TABLE paper ( paperid int, title varchar, venueid int, year int, numciting int, numcitedby int, journalid int ) CREATE TABLE dataset ( datasetid int, datasetname varchar ) CREATE TABLE keyphrase ( keyphraseid int, keyphrasename...
SELECT DISTINCT COUNT(1) FROM author AS AUTHOR_0, author AS AUTHOR_1, writes AS WRITES_0, writes AS WRITES_1 WHERE AUTHOR_0.authorname = 'ali farhadi' AND AUTHOR_1.authorname = 'steve seitz' AND WRITES_0.authorid = AUTHOR_0.authorid AND WRITES_1.authorid = AUTHOR_1.authorid AND WRITES_1.paperid = WRITES_0.paperid
scholar
CREATE TABLE locations ( LOCATION_ID decimal(4,0), STREET_ADDRESS varchar(40), POSTAL_CODE varchar(12), CITY varchar(30), STATE_PROVINCE varchar(25), COUNTRY_ID varchar(2) ) CREATE TABLE job_history ( EMPLOYEE_ID decimal(6,0), START_DATE date, END_DATE date, JOB_ID varchar(10), ...
SELECT FIRST_NAME, DEPARTMENT_ID FROM employees ORDER BY DEPARTMENT_ID
nvbench
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 t1.treatmentname FROM (SELECT treatment.treatmentname, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM treatment WHERE treatment.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.age BETWEEN 40 AND 49) GROUP BY treatment.treatmentname) AS t1 WHERE t1.c1 <= 3
eicu
CREATE TABLE table_39626 ( "Game" real, "October" real, "Opponent" text, "Score" text, "Record" text, "Points" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the record of game 7?
SELECT "Record" FROM table_39626 WHERE "Game" = '7'
wikisql
CREATE TABLE table_1773908_3 ( dsl_type VARCHAR, provider VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What are all the dsl type offered by the M-Net telecom company?
SELECT dsl_type FROM table_1773908_3 WHERE provider = "M-net"
sql_create_context
CREATE TABLE game ( stadium_id number, id number, season number, date text, home_team text, away_team text, score text, competition text ) CREATE TABLE injury_accident ( game_id number, id number, player text, injury text, number_of_matches text, source text ) C...
SELECT COUNT(*) FROM game WHERE NOT id IN (SELECT game_id FROM injury_accident)
spider
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.marital_status = "DIVORCED" AND lab.label = "Vancomycin"
mimicsql_data
CREATE TABLE table_18064020_21 ( ast VARCHAR, avg VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- How many tackle assists for the player who averages 23.7?
SELECT ast FROM table_18064020_21 WHERE avg = "23.7"
sql_create_context
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 intakeoutput ( in...
SELECT treatment.treatmentname FROM treatment WHERE treatment.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '025-39356')) AND STRFTIME('%y', treatment.treatmenttime) = '2104'...
eicu
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_kc21.OUT_DIAG_DIS_CD, t_kc21.OUT_DIAG_DIS_NM FROM t_kc21 WHERE t_kc21.PERSON_NM = '苗正平' AND t_kc21.MED_SER_ORG_NO = '4845814' AND t_kc21.OUT_DIAG_DOC_NM LIKE '何%'
css
CREATE TABLE t_kc21_t_kc22 ( MED_CLINIC_ID text, MED_EXP_DET_ID number ) 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, C...
SELECT t_kc21.MED_CLINIC_ID, t_kc21.PERSON_ID, t_kc21.PERSON_NM, t_kc21.IDENTITY_CARD, t_kc21.PERSON_SEX, t_kc21.PERSON_AGE FROM t_kc21 JOIN t_kc24 ON t_kc21.MED_CLINIC_ID = t_kc24.MED_CLINIC_ID WHERE t_kc24.MED_AMOUT = (SELECT t_kc24.MED_AMOUT FROM t_kc24 WHERE t_kc24.MED_CLINIC_ID = '82639761234')
css
CREATE TABLE candidate ( Candidate_ID int, People_ID int, Poll_Source text, Date text, Support_rate real, Consider_rate real, Oppose_rate real, Unsure_rate real ) CREATE TABLE people ( People_ID int, Sex text, Name text, Date_of_Birth text, Height real, Weight re...
SELECT AVG(Weight), MIN(Weight) FROM people GROUP BY Sex
nvbench
CREATE TABLE basketball_match ( Team_ID int, School_ID int, Team_Name text, ACC_Regular_Season text, ACC_Percent text, ACC_Home text, ACC_Road text, All_Games text, All_Games_Percent int, All_Home text, All_Road text, All_Neutral text ) CREATE TABLE university ( Scho...
SELECT ACC_Regular_Season, ACC_Percent FROM basketball_match ORDER BY ACC_Percent DESC
nvbench
CREATE TABLE table_11014 ( "Driver" text, "Constructor" text, "Laps" real, "Time/Retired" text, "Grid" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the Time/Retired for less than 52 laps in grid 19?
SELECT "Time/Retired" FROM table_11014 WHERE "Laps" < '52' AND "Grid" = '19'
wikisql
CREATE TABLE table_61482 ( "Tie no" text, "Home team" text, "Score" text, "Away team" text, "Date" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Who played against the away team hereford united?
SELECT "Home team" FROM table_61482 WHERE "Away team" = 'hereford united'
wikisql
CREATE TABLE Parking_Fines ( council_tax_id INTEGER, cmi_cross_ref_id INTEGER ) CREATE TABLE Benefits_Overpayments ( council_tax_id INTEGER, cmi_cross_ref_id INTEGER ) CREATE TABLE CMI_Cross_References ( cmi_cross_ref_id INTEGER, master_customer_id INTEGER, source_system_code CHAR(15) ) C...
SELECT council_tax_id, cmi_cross_ref_id FROM Parking_Fines
nvbench
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 prescriptions ( subject_id text, hadm_id...
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE demographic.admityear < "2168" AND diagnoses.long_title = "Hepatitis, unspecified"
mimicsql_data
CREATE TABLE intakeoutput ( intakeoutputid number, patientunitstayid number, cellpath text, celllabel text, cellvaluenumeric number, intakeoutputtime time ) CREATE TABLE microlab ( microlabid number, patientunitstayid number, culturesite text, organism text, culturetakentime...
SELECT t3.drugname FROM (SELECT t2.drugname, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM (SELECT patient.uniquepid, diagnosis.diagnosistime, patient.patienthealthsystemstayid FROM diagnosis JOIN patient ON diagnosis.patientunitstayid = patient.patientunitstayid WHERE diagnosis.diagnosisname = 'sepsis' AND STR...
eicu
CREATE TABLE table_19220 ( "Episode" text, "Broadcast date" text, "Run time" text, "Viewers (in millions)" text, "Archive" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What are all the episodes with an episode run time of 24:01?
SELECT "Episode" FROM table_19220 WHERE "Run time" = '24:01'
wikisql