instruction stringlengths 151 7.46k | output stringlengths 2 4.44k | source stringclasses 26
values |
|---|---|---|
CREATE TABLE table_713 (
"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.
-- What is the result for barney frank?
| SELECT "Result" FROM table_713 WHERE "Incumbent" = 'Barney Frank' | wikisql |
CREATE TABLE table_23014476_1 (
gore__number VARCHAR,
others__percentage VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Name the gore number for others % being 5.3%
| SELECT gore__number FROM table_23014476_1 WHERE others__percentage = "5.3%" | sql_create_context |
CREATE TABLE table_43425 (
"Rank" text,
"Nation" text,
"Gold" real,
"Silver" real,
"Bronze" real,
"Total" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which nations have more than 1 gold medal and 4 silver medals?
| SELECT "Nation" FROM table_43425 WHERE "Gold" > '1' AND "Silver" = '4' | wikisql |
CREATE TABLE table_55909 (
"Year" text,
"Language" text,
"Title" text,
"Translator" text,
"Company" text,
"Pages" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the language for translators ritah meltser and amatsyah porat?
| SELECT "Language" FROM table_55909 WHERE "Translator" = 'ritah meltser and amatsyah porat' | 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 COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.diagnosis = "ANGIOEDEMA" AND lab."CATEGORY" = "Blood Gas" | mimicsql_data |
CREATE TABLE t_kc21 (
MED_CLINIC_ID text,
OVERALL_CD_ORG text,
OVERALL_CD_PERSON text,
COMP_ID text,
PERSON_ID text,
PERSON_NM text,
IDENTITY_CARD text,
SOC_SRT_CARD text,
PERSON_SEX number,
PERSON_AGE number,
IN_HOSP_DATE time,
OUT_HOSP_DATE time,
DIFF_PLACE_FLG numb... | SELECT t_kc21.MED_ORG_DEPT_CD, AVG(t_kc24.OVE_PAY / t_kc24.MED_AMOUT) FROM t_kc21 JOIN t_kc24 ON t_kc21.MED_CLINIC_ID = t_kc24.MED_CLINIC_ID WHERE t_kc21.MED_SER_ORG_NO = '5365915' GROUP BY t_kc21.MED_ORG_DEPT_CD | css |
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 * FROM hz_info JOIN mzjzjlb JOIN jybgb JOIN jyjgzbb JOIN hz_info_mzjzjlb ON hz_info.YLJGDM = hz_info_mzjzjlb.YLJGDM AND hz_info.KH = mzjzjlb.KH AND hz_info.KLX = mzjzjlb.KLX AND hz_info_mzjzjlb.YLJGDM = jybgb.YLJGDM_MZJZJLB AND mzjzjlb.JZLSH = jybgb.JZLSH_MZJZJLB AND jybgb.YLJGDM = jyjgzbb.YLJGDM AND jybgb.BGDH ... | css |
CREATE TABLE table_75332 (
"Rank" real,
"Player" text,
"Country" text,
"Earnings ( $ )" real,
"Events" real,
"Wins" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- How many events are in South Africa?
| SELECT SUM("Events") FROM table_75332 WHERE "Country" = 'south africa' | wikisql |
CREATE TABLE table_name_17 (
constellation VARCHAR,
object_type VARCHAR,
ngc_number VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What Constellation has a Object type of globular cluster and a NGC number of 5986?
| SELECT constellation FROM table_name_17 WHERE object_type = "globular cluster" AND ngc_number = 5986 | sql_create_context |
CREATE TABLE table_name_77 (
entrant VARCHAR,
laps VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Can you tell me the Entrant that has the Laps of 17?
| SELECT entrant FROM table_name_77 WHERE laps = 17 | sql_create_context |
CREATE TABLE table_203_549 (
id number,
"player" text,
"team" text,
"date" text,
"opponent" text,
"venue" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- which teams faced off at miller park ?
| SELECT "team" FROM table_203_549 WHERE "venue" = 'miller park' UNION SELECT "opponent" FROM table_203_549 WHERE "venue" = 'miller park' | squall |
CREATE TABLE table_18798 (
"Player" text,
"Played" real,
"Sets Won" real,
"Sets Lost" real,
"Legs Won" real,
"Legs Lost" real,
"100+" real,
"140+" real,
"180s" real,
"High Checkout" real,
"3-dart Average" text
)
-- Using valid SQLite, answer the following questions for the ... | SELECT "Sets Won" FROM table_18798 WHERE "140+" = '16' | wikisql |
CREATE TABLE table_name_64 (
total INTEGER,
finish VARCHAR,
year_won VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which Total has a Finish of t64, and a Year won larger than 2006?
| SELECT MAX(total) FROM table_name_64 WHERE finish = "t64" AND year_won > 2006 | sql_create_context |
CREATE TABLE fgwyjzb (
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 SUM(t_kc22.AMOUNT) FROM gwyjzb JOIN t_kc22 ON gwyjzb.MED_CLINIC_ID = t_kc22.MED_CLINIC_ID WHERE gwyjzb.PERSON_NM = '陶依美' AND gwyjzb.CLINIC_TYPE = '门诊' AND t_kc22.STA_DATE BETWEEN '2017-05-19' AND '2021-11-23' AND t_kc22.MED_INV_ITEM_TYPE = '西药费' UNION SELECT SUM(t_kc22.AMOUNT) FROM fgwyjzb JOIN t_kc22 ON fgwyjzb... | css |
CREATE TABLE table_203_519 (
id number,
"pos" number,
"no" number,
"driver" text,
"team" text,
"laps" number,
"time/retired" text,
"grid" number,
"points" number
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- what is the total point diffe... | SELECT MAX("points") - MIN("points") FROM table_203_519 | squall |
CREATE TABLE table_58787 (
"Game" real,
"Date" text,
"Opponent" text,
"Result" text,
"Raiders points" real,
"Opponents" real,
"Raiders first downs" real,
"Record" text,
"Attendance" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What... | SELECT MIN("Opponents") FROM table_58787 WHERE "Raiders points" > '38' AND "Attendance" > '51,267' | wikisql |
CREATE TABLE comment_instructor (
instructor_id int,
student_id int,
score int,
comment_text varchar
)
CREATE TABLE student (
student_id int,
lastname varchar,
firstname varchar,
program_id int,
declare_major varchar,
total_credit int,
total_gpa float,
entered_as varchar... | SELECT DISTINCT course.department, course.name, course.number FROM course INNER JOIN program_course ON program_course.course_id = course.course_id WHERE course.has_exams = 'N' AND course.has_projects = 'Y' AND program_course.category LIKE 'ULCS' | advising |
CREATE TABLE table_46850 (
"Position" real,
"Team" text,
"Played" real,
"Drawn" real,
"Lost" real,
"Goals For" real,
"Goals Against" real,
"Goal Difference" text,
"Points 1" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the ... | SELECT COUNT("Played") FROM table_46850 WHERE "Points 1" = '80' AND "Goals For" > '77' | wikisql |
CREATE TABLE table_43950 (
"Locale" text,
"Skip" text,
"Ends Won" real,
"Ends Lost" real,
"Blank Ends" real,
"Stolen Ends" real,
"Shot %" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- In italy, when the stolen ends were 10 and blank ends we... | SELECT MIN("Ends Won") FROM table_43950 WHERE "Stolen Ends" = '10' AND "Locale" = 'italy' AND "Blank Ends" < '14' | wikisql |
CREATE TABLE table_65408 (
"Date" text,
"Internet Explorer" text,
"Chrome" text,
"Firefox" text,
"Safari" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What was the percentage of safari when internet explorer was 20.27%?
| SELECT "Safari" FROM table_65408 WHERE "Internet Explorer" = '20.27%' | wikisql |
CREATE TABLE table_2503102_2 (
chassis VARCHAR,
team VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What chassis is on the car repped by team rahal letterman lanigan racing?
| SELECT chassis FROM table_2503102_2 WHERE team = "Rahal Letterman Lanigan Racing" | sql_create_context |
CREATE TABLE Ref_Colors (
color_code VARCHAR(15),
color_description VARCHAR(80)
)
CREATE TABLE Products (
product_id INTEGER,
color_code VARCHAR(15),
product_category_code VARCHAR(15),
product_name VARCHAR(80),
typical_buying_price VARCHAR(20),
typical_selling_price VARCHAR(20),
pro... | SELECT product_category_description, COUNT(product_category_description) FROM Ref_Product_Categories AS T1 JOIN Products AS T2 ON T1.product_category_code = T2.product_category_code WHERE T2.product_description LIKE '%t%' GROUP BY product_category_description ORDER BY product_category_description DESC | nvbench |
CREATE TABLE cost (
costid number,
uniquepid text,
patienthealthsystemstayid number,
eventtype text,
eventid number,
chargetime time,
cost number
)
CREATE TABLE treatment (
treatmentid number,
patientunitstayid number,
treatmentname text,
treatmenttime time
)
CREATE TABLE i... | SELECT 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 = '030-64961')) AND DATETIME(lab.labresulttime, 'start of year') = DATETIME(CURRENT_TI... | eicu |
CREATE TABLE table_dev_2 (
"id" int,
"nutrient_absorption" bool,
"systolic_blood_pressure_sbp" int,
"active_metabolic" bool,
"hepatic_disease" bool,
"surgery" bool,
"diastolic_blood_pressure_dbp" int,
"gastrointestinal_disease" bool,
"organ_failure" bool,
"NOUSE" float
)
-- Usi... | SELECT * FROM table_dev_2 WHERE organ_failure = 1 | criteria2sql |
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 JOB_ID, COUNT(JOB_ID) FROM employees WHERE SALARY > (SELECT MAX(SALARY) FROM employees WHERE JOB_ID = 'PU_MAN') GROUP BY JOB_ID ORDER BY JOB_ID DESC | nvbench |
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 WHERE demographic.age < "47" AND demographic.days_stay > "6" | mimicsql_data |
CREATE TABLE table_39338 (
"Rank" real,
"Country/Territory" text,
"Miss World" real,
"1st Runner-up" real,
"2nd Runner-up" real,
"3rd Runner-up" real,
"4th Runner-up" real,
"5th Runner-up" real,
"6th Runner-up" real,
"Semifinalists" real,
"Total" real
)
-- Using valid SQLit... | SELECT SUM("4th Runner-up") FROM table_39338 WHERE "3rd Runner-up" = '2' AND "Country/Territory" = 'venezuela' | wikisql |
CREATE TABLE Invoices (
invoice_number INTEGER,
order_id INTEGER,
invoice_date DATETIME
)
CREATE TABLE Customers (
customer_id INTEGER,
customer_first_name VARCHAR(50),
customer_middle_initial VARCHAR(1),
customer_last_name VARCHAR(50),
gender VARCHAR(1),
email_address VARCHAR(255),... | SELECT product_id, COUNT(DISTINCT order_id) FROM Order_Items | nvbench |
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 demographic (
subject_id text,
hadm_id text,
name text,
marital_status text,
age text,
dob te... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE demographic.dob_year < "2104" AND prescriptions.route = "TD" | mimicsql_data |
CREATE TABLE table_name_72 (
draws VARCHAR,
team VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- How many draws did Durham have?
| SELECT draws FROM table_name_72 WHERE team = "durham" | sql_create_context |
CREATE TABLE table_45041 (
"Round" real,
"Pick" real,
"Player" text,
"Nationality" text,
"College/junior/club team" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What was the lowest pick number for a united states player picked before round 7?
| SELECT MIN("Pick") FROM table_45041 WHERE "Round" > '7' AND "Nationality" = 'united states' | wikisql |
CREATE TABLE table_name_64 (
gold INTEGER,
total VARCHAR,
silver VARCHAR,
bronze VARCHAR,
type VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the average gold of the winter athlete with 1 bronze, less than 3 silver, and less than 4 total ... | SELECT AVG(gold) FROM table_name_64 WHERE bronze = 1 AND type = "winter" AND silver < 3 AND total < 4 | sql_create_context |
CREATE TABLE Document_Locations (
Document_ID INTEGER,
Location_Code CHAR(15),
Date_in_Location_From DATETIME,
Date_in_Locaton_To DATETIME
)
CREATE TABLE All_Documents (
Document_ID INTEGER,
Date_Stored DATETIME,
Document_Type_Code CHAR(15),
Document_Name CHAR(255),
Document_Descrip... | SELECT Date_in_Locaton_To, COUNT(Date_in_Locaton_To) FROM Document_Locations GROUP BY Date_in_Locaton_To ORDER BY Date_in_Locaton_To DESC | nvbench |
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 procedures ON demographic.hadm_id = procedures.hadm_id INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE procedures.long_title = "(Aorto)coronary bypass of two coronary arteries" AND lab.fluid = "Urine" | mimicsql_data |
CREATE TABLE user (
uid int,
user_id varchar,
name varchar
)
CREATE TABLE review (
rid int,
business_id varchar,
user_id varchar,
rating float,
text longtext,
year int,
month varchar
)
CREATE TABLE checkin (
cid int,
business_id varchar,
count int,
day varchar
)... | SELECT user.name FROM business, tip, user WHERE business.name = 'Barrio Cafe' AND tip.business_id = business.business_id AND tip.year = 2015 AND user.user_id = tip.user_id | yelp |
CREATE TABLE table_name_27 (
teams VARCHAR,
home VARCHAR,
season VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What teams has a home of 1-0, in the season 1988-89?
| SELECT teams FROM table_name_27 WHERE home = "1-0" AND season = "1988-89" | sql_create_context |
CREATE TABLE student (
stuid number,
lname text,
fname text,
age number,
sex text,
major number,
advisor number,
city_code text
)
CREATE TABLE video_games (
gameid number,
gname text,
gtype text
)
CREATE TABLE plays_games (
stuid number,
gameid number,
hours_pla... | SELECT SUM(gamesplayed) FROM sportsinfo WHERE sportname = "Football" AND onscholarship = 'Y' | spider |
CREATE TABLE table_name_26 (
total INTEGER,
player VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the average total for Tiger Woods?
| SELECT AVG(total) FROM table_name_26 WHERE player = "tiger woods" | sql_create_context |
CREATE TABLE table_40255 (
"Spoofed Title" text,
"Actual Title" text,
"Writer" text,
"Artist" text,
"Issue" real,
"Date" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which artist has a Spoofed title in June 1992?
| SELECT "Artist" FROM table_40255 WHERE "Date" = 'june 1992' | wikisql |
CREATE TABLE table_name_34 (
title VARCHAR,
type VARCHAR,
year VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which Title has a Type of album in 1983?
| SELECT title FROM table_name_34 WHERE type = "album" AND year = 1983 | sql_create_context |
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 PostTags.PostId, Tags.TagName, PostTags.TagId FROM PostTags INNER JOIN Posts ON PostTags.PostId = Posts.Id INNER JOIN Tags ON PostTags.TagId = Tags.Id WHERE PostTags.PostId IN (SELECT Posts.Id FROM Posts INNER JOIN PostTags ON Posts.Id = PostTags.PostId INNER JOIN Tags ON PostTags.TagId = Tags.Id WHERE YEAR(Post... | sede |
CREATE TABLE table_77143 (
"Rank" real,
"Mountain Peak" text,
"Region" text,
"Mountain Range" text,
"Location" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which Mountain Range has a Region of haiti, and a Location of 18.3601 n 71.9764 w?
| SELECT "Mountain Range" FROM table_77143 WHERE "Region" = 'haiti' AND "Location" = '18.3601°n 71.9764°w' | wikisql |
CREATE TABLE patients (
row_id number,
subject_id number,
gender text,
dob time,
dod time
)
CREATE TABLE d_labitems (
row_id number,
itemid number,
label text
)
CREATE TABLE prescriptions (
row_id number,
subject_id number,
hadm_id number,
startdate time,
enddate ti... | SELECT AVG(t1.c1) FROM (SELECT SUM(cost.cost) AS c1 FROM cost WHERE cost.hadm_id IN (SELECT labevents.hadm_id FROM labevents WHERE labevents.itemid IN (SELECT d_labitems.itemid FROM d_labitems WHERE d_labitems.label = 'ck-mb index')) AND DATETIME(cost.chargetime, 'start of year') = DATETIME(CURRENT_TIME(), 'start of ye... | mimic_iii |
CREATE TABLE hz_info (
KH text,
KLX number,
YLJGDM text,
RYBH text
)
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,... | SELECT MZBMLX, MZZDBM, MZZDMC FROM zyjzjlb WHERE JZLSH = '42916483908' | css |
CREATE TABLE Products (
Code INTEGER,
Name VARCHAR(255),
Price DECIMAL,
Manufacturer INTEGER
)
CREATE TABLE Manufacturers (
Code INTEGER,
Name VARCHAR(255),
Headquarter VARCHAR(255),
Founder VARCHAR(255),
Revenue REAL
)
-- Using valid SQLite, answer the following questions for the... | SELECT Founder, AVG(Manufacturer) FROM Products AS T1 JOIN Manufacturers AS T2 ON T1.Manufacturer = T2.Code GROUP BY Founder ORDER BY Founder DESC | nvbench |
CREATE TABLE table_name_8 (
stadium VARCHAR,
past_season VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- what stadium has a prior record of 7th?
| SELECT stadium FROM table_name_8 WHERE past_season = "7th" | sql_create_context |
CREATE TABLE trained_in (
physician number,
treatment number,
certificationdate time,
certificationexpires time
)
CREATE TABLE nurse (
employeeid number,
name text,
position text,
registered boolean,
ssn number
)
CREATE TABLE block (
blockfloor number,
blockcode number
)
C... | SELECT name FROM appointment AS T1 JOIN patient AS T2 ON T1.patient = T2.ssn | spider |
CREATE TABLE table_name_34 (
gold INTEGER,
silver VARCHAR,
nation VARCHAR,
bronze VARCHAR,
total VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- How many golds have a Bronze of 0, a Total larger than 1, a Nation of chad, and a Silver larger than 0... | SELECT SUM(gold) FROM table_name_34 WHERE bronze = 0 AND total > 1 AND nation = "chad" AND silver > 0 | sql_create_context |
CREATE TABLE table_16999 (
"Season" real,
"Position" real,
"Win/Loss" text,
"Coach" text,
"Captain" text,
"Dudley Tuckey Medal" text,
"Leading goalkicker" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- who is the dudley tuckey medal where le... | SELECT "Dudley Tuckey Medal" FROM table_16999 WHERE "Leading goalkicker" = 'Scott Simister (46)' | wikisql |
CREATE TABLE Student (
StuID INTEGER,
LName VARCHAR(12),
Fname VARCHAR(12),
Age INTEGER,
Sex VARCHAR(1),
Major INTEGER,
Advisor INTEGER,
city_code VARCHAR(3)
)
CREATE TABLE Allergy_Type (
Allergy VARCHAR(20),
AllergyType VARCHAR(20)
)
CREATE TABLE Has_Allergy (
StuID INTEGE... | SELECT Sex, AVG(Age) FROM Student GROUP BY Sex | nvbench |
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 gwyjzb.MAIN_COND_DES FROM gwyjzb WHERE gwyjzb.MED_CLINIC_ID = '88548403439' UNION SELECT fgwyjzb.MAIN_COND_DES FROM fgwyjzb WHERE fgwyjzb.MED_CLINIC_ID = '88548403439' | css |
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 MIN(t_kc24.MED_AMOUT), MAX(t_kc24.MED_AMOUT) FROM t_kc24 WHERE t_kc24.MED_CLINIC_ID IN (SELECT gwyjzb.MED_CLINIC_ID FROM gwyjzb WHERE gwyjzb.MED_SER_ORG_NO = '5713275' AND gwyjzb.OUT_DIAG_DIS_CD = 'Y71.248' UNION SELECT fgwyjzb.MED_CLINIC_ID FROM fgwyjzb WHERE fgwyjzb.MED_SER_ORG_NO = '5713275' AND fgwyjzb.OUT_D... | css |
CREATE TABLE table_52634 (
"Pick" real,
"Player" text,
"Team" text,
"Position" text,
"School" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is catcher Josh Donaldson's pick number?
| SELECT "Pick" FROM table_52634 WHERE "Position" = 'catcher' AND "Player" = 'josh donaldson' | wikisql |
CREATE TABLE table_name_61 (
team VARCHAR,
year VARCHAR,
chassis VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What team has jordan 193 chassis after 1990?
| SELECT team FROM table_name_61 WHERE year > 1990 AND chassis = "jordan 193" | sql_create_context |
CREATE TABLE requirement (
requirement_id int,
requirement varchar,
college varchar
)
CREATE TABLE offering_instructor (
offering_instructor_id int,
offering_id int,
instructor_id int
)
CREATE TABLE program_requirement (
program_id int,
category varchar,
min_credit int,
additio... | SELECT DISTINCT semester.semester, semester.year FROM course, course_offering, instructor, offering_instructor, semester WHERE course.course_id = course_offering.course_id AND course.number = 872 AND course_offering.semester = semester.semester_id AND instructor.name LIKE '%Sara Holliday%' AND offering_instructor.instr... | advising |
CREATE TABLE zzmzjzjlb (
HXPLC number,
HZXM text,
JLSJ time,
JZJSSJ time,
JZKSBM text,
JZKSMC text,
JZKSRQ time,
JZLSH number,
JZZDBM text,
JZZDSM text,
JZZTDM number,
JZZTMC text,
KH text,
KLX number,
MJZH text,
ML number,
MZZYZDZZBM text,
MZZYZDZ... | SELECT jyjgzbb.JCZBJGDL, jyjgzbb.JCZBJGDW FROM person_info JOIN hz_info JOIN zzmzjzjlb JOIN jybgb JOIN jyjgzbb 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.JZ... | css |
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 COUNT(*) > 0 FROM intakeoutput WHERE intakeoutput.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '022-6959')) AND intakeoutput.cellpath LIKE '%output%' AND intakeoutput... | eicu |
CREATE TABLE table_8846 (
"Year" real,
"Ship" text,
"Departed From" text,
"Departed On" text,
"Returned On" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- From how many years did tampa, FL depart?
| SELECT SUM("Year") FROM table_8846 WHERE "Departed From" = 'tampa, fl' | wikisql |
CREATE TABLE table_30108930_6 (
cfl_team VARCHAR,
pick__number VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which CFL team got pick 34?
| SELECT cfl_team FROM table_30108930_6 WHERE pick__number = 34 | 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 treatment (
treat... | SELECT patient.uniquepid FROM patient WHERE patient.patientunitstayid IN (SELECT diagnosis.patientunitstayid FROM diagnosis WHERE diagnosis.diagnosisname = 'cardiac arrest' AND DATETIME(diagnosis.diagnosistime) <= DATETIME(CURRENT_TIME(), '-4 year')) | eicu |
CREATE TABLE table_36247 (
"District" text,
"Incumbent" text,
"Party" text,
"First elected" real,
"Result" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which district had a first elected in 1882 with a result of re-elected?
| SELECT "District" FROM table_36247 WHERE "First elected" = '1882' AND "Result" = 're-elected' | wikisql |
CREATE TABLE bdmzjzjlb (
CYBQDM text,
CYBQMC text,
CYCWH text,
CYKSDM text,
CYKSMC text,
CYSJ time,
CYZTDM number,
HZXM text,
JZKSDM text,
JZKSMC text,
JZLSH number,
KH text,
KLX number,
MZBMLX number,
MZJZLSH text,
MZZDBM text,
MZZDMC text,
MZZYZD... | SELECT * FROM hz_info JOIN wdmzjzjlb ON hz_info.YLJGDM = wdmzjzjlb.YLJGDM AND hz_info.KH = wdmzjzjlb.KH AND hz_info.KLX = wdmzjzjlb.KLX WHERE hz_info.RYBH = '00758065' AND hz_info.YLJGDM = '2859179' AND wdmzjzjlb.CYKSMC LIKE '%眼外伤%' UNION SELECT * FROM hz_info JOIN bdmzjzjlb ON hz_info.YLJGDM = bdmzjzjlb.YLJGDM AND hz_... | css |
CREATE TABLE diagnoses (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE demographic (
subject_id text,
hadm_id text,
name text,
marital_status text,
age text,
dob text,
gender text,
language text,
religion text,
... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE demographic.marital_status = "SINGLE" AND diagnoses.long_title = "Other preterm infants, 2,500 grams and over" | mimicsql_data |
CREATE TABLE Badges (
Id number,
UserId number,
Name text,
Date time,
Class number,
TagBased boolean
)
CREATE TABLE CloseAsOffTopicReasonTypes (
Id number,
IsUniversal boolean,
InputTitle text,
MarkdownInputGuidance text,
MarkdownPostOwnerGuidance text,
MarkdownPrivilege... | SELECT PostType = pt.Name, Posts = COUNT(*), Views = SUM(COALESCE(p.ViewCount, parent.ViewCount)), Start = TIME_TO_STR(@startDate, '%B'), Finish = TIME_TO_STR(@endDate, '%B') FROM Posts AS p LEFT JOIN Posts AS parent ON p.ParentId = parent.Id JOIN Users AS u ON p.OwnerUserId = u.Id JOIN PostTypes AS pt ON p.PostTypeId ... | sede |
CREATE TABLE time_zone (
time_zone_code text,
time_zone_name text,
hours_from_gmt int
)
CREATE TABLE code_description (
code varchar,
description text
)
CREATE TABLE fare (
fare_id int,
from_airport varchar,
to_airport varchar,
fare_basis_code text,
fare_airline text,
restr... | 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 = 'ATLANTA' AND CITY_2.ci... | atis |
CREATE TABLE table_50156 (
"Season" text,
"Player" text,
"School" text,
"Position" text,
"Class" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is Position, when Player is 'Kevin Durant category:articles with hCards'?
| SELECT "Position" FROM table_50156 WHERE "Player" = 'kevin durant category:articles with hcards' | wikisql |
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 patient.hospitaladmittime FROM patient WHERE patient.uniquepid = '035-4428' AND patient.hospitaladmitsource = 'floor' AND DATETIME(patient.hospitaladmittime) >= DATETIME(CURRENT_TIME(), '-2 year') ORDER BY patient.hospitaladmittime DESC LIMIT 1 | eicu |
CREATE TABLE table_name_99 (
capacity___mw__ INTEGER,
rank VARCHAR,
province VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- what is the least capacity (mw) when the rank is less than 46 and the province is newfoundland and labrador?
| SELECT MIN(capacity___mw__) FROM table_name_99 WHERE rank < 46 AND province = "newfoundland and labrador" | sql_create_context |
CREATE TABLE station (
id INTEGER,
name TEXT,
lat NUMERIC,
long NUMERIC,
dock_count INTEGER,
city TEXT,
installation_date TEXT
)
CREATE TABLE status (
station_id INTEGER,
bikes_available INTEGER,
docks_available INTEGER,
time TEXT
)
CREATE TABLE trip (
id INTEGER,
d... | SELECT city, COUNT(*) FROM station GROUP BY city | nvbench |
CREATE TABLE instructor (
instructor_id int,
name varchar,
uniqname varchar
)
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,
... | SELECT COUNT(*) > 0 FROM course, course_offering, semester WHERE (course.description LIKE '%colloquium%' OR course.name LIKE '%colloquium%') AND (course.description LIKE '%Advanced Personality Psychology%' OR course.name LIKE '%Advanced Personality Psychology%') AND course.course_id = course_offering.course_id AND seme... | advising |
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 SOC_SRT_DIRE_CD, SOC_SRT_DIRE_NM, UNIVALENT FROM t_kc22 WHERE MED_CLINIC_ID IN (SELECT MED_CLINIC_ID FROM t_kc21 WHERE PERSON_ID = '97703801' AND MED_SER_ORG_NO = '4175966') ORDER BY UNIVALENT DESC LIMIT 1 | css |
CREATE TABLE table_79915 (
"Name" text,
"Street address" text,
"Years as tallest" text,
"Height feet / m" text,
"Floors" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- How many floors does the Blue Diamond have?
| SELECT SUM("Floors") FROM table_79915 WHERE "Name" = 'blue diamond' | wikisql |
CREATE TABLE table_203_576 (
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.
-- how many total medals were given out ?
| SELECT SUM("total") FROM table_203_576 | squall |
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 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 = 'cont inv me... | mimic_iii |
CREATE TABLE table_32896 (
"Region" text,
"Host" text,
"Venue" text,
"City" text,
"State" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What city is located in Oklahoma?
| SELECT "City" FROM table_32896 WHERE "State" = 'oklahoma' | wikisql |
CREATE TABLE table_72144 (
"Pick #" real,
"CFL Team" text,
"Player" text,
"Position" text,
"College" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which player from the 2004 CFL draft attended Wilfrid Laurier?
| SELECT "Player" FROM table_72144 WHERE "College" = 'Wilfrid Laurier' | wikisql |
CREATE TABLE wrestler (
Wrestler_ID int,
Name text,
Reign text,
Days_held text,
Location text,
Event text
)
CREATE TABLE Elimination (
Elimination_ID text,
Wrestler_ID text,
Team text,
Eliminated_By text,
Elimination_Move text,
Time text
)
-- Using valid SQLite, answer... | SELECT Team, COUNT(*) FROM Elimination GROUP BY Team ORDER BY Team DESC | nvbench |
CREATE TABLE table_8834 (
"Place" text,
"Player" text,
"Country" text,
"Score" text,
"To par" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is Place, when Player is 'Justin Leonard'?
| SELECT "Place" FROM table_8834 WHERE "Player" = 'justin leonard' | wikisql |
CREATE TABLE table_33192 (
"Team" text,
"Game" real,
"Draw" real,
"Loss" real,
"Goal Gain" real,
"Goal Loss" real,
"Goal Diff" real,
"Point" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the highest loss before game 14?
| SELECT MAX("Loss") FROM table_33192 WHERE "Game" < '14' | wikisql |
CREATE TABLE mzjzjlb (
HXPLC number,
HZXM text,
JLSJ time,
JZJSSJ time,
JZKSBM text,
JZKSMC text,
JZKSRQ time,
JZLSH text,
JZZDBM text,
JZZDSM text,
JZZTDM number,
JZZTMC text,
KH text,
KLX number,
MJZH text,
ML number,
MZZYZDZZBM text,
MZZYZDZZMC ... | SELECT zyjzjlb.ZYZDBM, zyjzjlb.ZYZDMC 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.person_info_XM = '袁康安' | css |
CREATE TABLE table_20602 (
"Country" text,
"Donor payment" text,
"Children per donor" text,
"Donor anonymity" text,
"Allowed recipients" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What are the children per donor in the country where the allowed ... | SELECT "Children per donor" FROM table_20602 WHERE "Allowed recipients" = 'Married or in cohabitation' | wikisql |
CREATE TABLE table_24518 (
"Period" real,
"Civilians" text,
"Security forces" text,
"Insurgents" text,
"Total per period" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What are the civilian total when the security force total is 36?
| SELECT "Civilians" FROM table_24518 WHERE "Security forces" = '36' | wikisql |
CREATE TABLE table_name_88 (
time VARCHAR,
nationality VARCHAR,
heat VARCHAR,
lane VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the time in a heat smaller than 5, in Lane 5, for Vietnam?
| SELECT time FROM table_name_88 WHERE heat < 5 AND lane = 5 AND nationality = "vietnam" | sql_create_context |
CREATE TABLE table_name_54 (
category VARCHAR,
for_the_show VARCHAR,
year VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- For 2006 what category has the Show of kasautii zindagii kay?
| SELECT category FROM table_name_54 WHERE for_the_show = "kasautii zindagii kay" AND year = 2006 | 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 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 '2004-02-29' AND '2019-02-16' GROUP BY t_kc22.SOC_SRT_DIRE_CD ORDER BY COUNT(*) DESC LIMIT 1 | css |
CREATE TABLE table_54248 (
"Year" real,
"Award" text,
"Category" text,
"Nominee" text,
"Result" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- How many years does simon baker appear as a nominee?
| SELECT COUNT("Year") FROM table_54248 WHERE "Nominee" = 'simon baker' | 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 t_kc21.MED_CLINIC_ID FROM t_kc21 WHERE t_kc21.PERSON_ID = '63491444' AND NOT t_kc21.MED_CLINIC_ID IN (SELECT t_kc22.MED_CLINIC_ID FROM t_kc22 WHERE t_kc22.AMOUNT <= 3235.03) | css |
CREATE TABLE microlab (
microlabid number,
patientunitstayid number,
culturesite text,
organism text,
culturetakentime time
)
CREATE TABLE diagnosis (
diagnosisid number,
patientunitstayid number,
diagnosisname text,
diagnosistime time,
icd9code text
)
CREATE TABLE treatment (
... | SELECT COUNT(*) > 0 FROM intakeoutput WHERE intakeoutput.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '002-75209')) AND intakeoutput.cellpath LIKE '%intake%' AND intakeoutpu... | eicu |
CREATE TABLE producer (
pid int,
gender text,
name text,
nationality text,
birth_city text,
birth_year int
)
CREATE TABLE movie (
mid int,
title text,
release_year int,
title_aka text,
budget text
)
CREATE TABLE keyword (
id int,
keyword text
)
CREATE TABLE tv_seri... | SELECT COUNT(DISTINCT (actor.name)) FROM actor, cast, movie WHERE cast.aid = actor.aid AND movie.mid = cast.msid AND movie.title = 'Grumpier Old Men' | imdb |
CREATE TABLE table_name_77 (
record VARCHAR,
score VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What was the record at the game with a score of 21-16?
| SELECT record FROM table_name_77 WHERE score = "21-16" | sql_create_context |
CREATE TABLE table_name_15 (
proto_germanic_origin VARCHAR,
sound__allophone_ VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the Proto-Germanic origin associated with an allophone of [[[|k]]]?
| SELECT proto_germanic_origin FROM table_name_15 WHERE sound__allophone_ = "[[[|k]]]" | 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 icustays (
row_id number,
... | SELECT t3.drug FROM (SELECT t2.drug, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM (SELECT admissions.subject_id, diagnoses_icd.charttime, admissions.hadm_id 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_... | mimic_iii |
CREATE TABLE enzyme (
name VARCHAR,
LOCATION VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- List the names and the locations that the enzymes can make an effect.
| SELECT name, LOCATION FROM enzyme | sql_create_context |
CREATE TABLE technician (
technician_id real,
Name text,
Team text,
Starting_Year real,
Age int
)
CREATE TABLE machine (
Machine_ID int,
Making_Year int,
Class text,
Team text,
Machine_series text,
value_points real,
quality_rank int
)
CREATE TABLE repair_assignment (
... | SELECT Name, COUNT(*) FROM repair_assignment AS T1 JOIN technician AS T2 ON T1.technician_id = T2.technician_id GROUP BY T2.Name ORDER BY COUNT(*) | nvbench |
CREATE TABLE medication (
medicationid number,
patientunitstayid number,
drugname text,
dosage text,
routeadmin text,
drugstarttime time,
drugstoptime time
)
CREATE TABLE vitalperiodic (
vitalperiodicid number,
patientunitstayid number,
temperature number,
sao2 number,
h... | SELECT COUNT(DISTINCT t1.uniquepid) FROM (SELECT patient.uniquepid, diagnosis.diagnosistime FROM diagnosis JOIN patient ON diagnosis.patientunitstayid = patient.patientunitstayid WHERE diagnosis.diagnosisname = 'hypotension' AND DATETIME(diagnosis.diagnosistime) >= DATETIME(CURRENT_TIME(), '-3 year')) AS t1 JOIN (SELEC... | 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 d_labitems (
row_id number,
itemid number,
label text
)
CREATE TABLE procedures_icd (
... | SELECT d_icd_procedures.short_title FROM d_icd_procedures WHERE d_icd_procedures.icd9_code IN (SELECT t3.icd9_code FROM (SELECT t2.icd9_code, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM (SELECT admissions.subject_id, diagnoses_icd.charttime, admissions.hadm_id FROM diagnoses_icd JOIN admissions ON diagnoses_i... | mimic_iii |
CREATE TABLE table_name_31 (
rank VARCHAR,
notes VARCHAR,
time VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the Rank of the Player with a Time of 7:20.32 and Notes of FB?
| SELECT COUNT(rank) FROM table_name_31 WHERE notes = "fb" AND time = "7:20.32" | sql_create_context |
CREATE TABLE table_name_86 (
freq_currently VARCHAR,
frequency VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which freq currently has 0 657?
| SELECT freq_currently FROM table_name_86 WHERE frequency = "0 657" | sql_create_context |
CREATE TABLE table_911 (
"Local Government Area" text,
"Principal town" text,
"Land Area (km\u00b2)" text,
"Population 2011 census" real,
"Density" text,
"Region" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- How many people live in the area of... | SELECT "Population 2011 census" FROM table_911 WHERE "Local Government Area" = 'Sorell' | wikisql |
CREATE TABLE table_name_99 (
game INTEGER,
location VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the earliest game played at the TD Waterhouse Centre?
| SELECT MIN(game) FROM table_name_99 WHERE location = "td waterhouse centre" | sql_create_context |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.