instruction stringlengths 151 7.46k | output stringlengths 2 4.44k | source stringclasses 26
values |
|---|---|---|
CREATE TABLE coach (
coach_id number,
coach_name text,
gender text,
club_id number,
rank number
)
CREATE TABLE match_result (
rank number,
club_id number,
gold number,
big_silver number,
small_silver number,
bronze number,
points number
)
CREATE TABLE player (
playe... | SELECT player_name, residence FROM player WHERE occupation <> "Researcher" | spider |
CREATE TABLE table_2417345_4 (
date_successor_seated VARCHAR,
successor VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- When was successor David Atwood (R) seated?
| SELECT date_successor_seated FROM table_2417345_4 WHERE successor = "David Atwood (R)" | sql_create_context |
CREATE TABLE diagnoses_icd (
row_id number,
subject_id number,
hadm_id number,
icd9_code text,
charttime time
)
CREATE TABLE cost (
row_id number,
subject_id number,
hadm_id number,
event_type text,
event_id number,
chargetime time,
cost number
)
CREATE TABLE labevents ... | SELECT AVG(labevents.valuenum) FROM labevents WHERE labevents.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 15794) AND labevents.itemid IN (SELECT d_labitems.itemid FROM d_labitems WHERE d_labitems.label = 'reticulocyte count, automated') AND DATETIME(labevents.charttime, 'start of... | mimic_iii |
CREATE TABLE Product_Characteristics (
product_id INTEGER,
characteristic_id INTEGER,
product_characteristic_value VARCHAR(50)
)
CREATE TABLE Ref_Product_Categories (
product_category_code VARCHAR(15),
product_category_description VARCHAR(80),
unit_of_measure VARCHAR(20)
)
CREATE TABLE Ref_Cha... | 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 COUNT(product_category_description) | nvbench |
CREATE TABLE paperfield (
fieldid int,
paperid int
)
CREATE TABLE paperkeyphrase (
paperid int,
keyphraseid int
)
CREATE TABLE journal (
journalid int,
journalname varchar
)
CREATE TABLE cite (
citingpaperid int,
citedpaperid int
)
CREATE TABLE dataset (
datasetid int,
datase... | SELECT DISTINCT writes.paperid FROM author, writes WHERE author.authorname = 'Adam B Smith' AND writes.authorid = author.authorid | scholar |
CREATE TABLE table_65253 (
"Name" text,
"Height" text,
"Weight" text,
"Spike" text,
"2008 club" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- what is the name when 2008 club is vc nova?
| SELECT "Name" FROM table_65253 WHERE "2008 club" = 'vc nova' | 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 demographic (
subject_id text,
hadm_id text,
name text,
marital_status text,
age text,
dob text,
gender text,
... | SELECT MAX(demographic.age) FROM demographic WHERE demographic.diagnosis = "BRAIN MASS;INTRACRANIAL HEMORRHAGE" AND demographic.dod_year < "2180.0" | mimicsql_data |
CREATE TABLE table_11439 (
"NGC number" real,
"Object type" text,
"Constellation" text,
"Right ascension ( J2000 )" text,
"Declination ( J2000 )" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What Object Type has a 03 32 Declination (J2000)?
| SELECT "Object type" FROM table_11439 WHERE "Declination ( J2000 )" = '°03′32″' | wikisql |
CREATE TABLE inputevents_cv (
row_id number,
subject_id number,
hadm_id number,
icustay_id number,
charttime time,
itemid number,
amount number
)
CREATE TABLE microbiologyevents (
row_id number,
subject_id number,
hadm_id number,
charttime time,
spec_type_desc text,
... | SELECT MIN(inputevents_cv.amount) FROM inputevents_cv WHERE inputevents_cv.icustay_id IN (SELECT icustays.icustay_id FROM icustays WHERE icustays.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 15257)) AND inputevents_cv.itemid IN (SELECT d_items.itemid FROM d_items WHERE d_items.lab... | mimic_iii |
CREATE TABLE People (
person_id INTEGER,
first_name VARCHAR(255),
middle_name VARCHAR(255),
last_name VARCHAR(255),
cell_mobile_number VARCHAR(40),
email_address VARCHAR(40),
login_name VARCHAR(40),
password VARCHAR(40)
)
CREATE TABLE Student_Course_Registrations (
student_id INTEGE... | SELECT course_name, COUNT(course_name) FROM Courses GROUP BY course_name ORDER BY course_name | nvbench |
CREATE TABLE table_10052 (
"Place" text,
"Player" text,
"Country" text,
"Score" text,
"To par" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Who is the player from Japan?
| SELECT "Player" FROM table_10052 WHERE "Country" = 'japan' | wikisql |
CREATE TABLE Manufacturers (
Code INTEGER,
Name VARCHAR(255),
Headquarter VARCHAR(255),
Founder VARCHAR(255),
Revenue REAL
)
CREATE TABLE Products (
Code INTEGER,
Name VARCHAR(255),
Price DECIMAL,
Manufacturer INTEGER
)
-- Using valid SQLite, answer the following questions for the... | SELECT T2.Founder, T1.Code FROM Products AS T1 JOIN Manufacturers AS T2 ON T1.Manufacturer = T2.Code GROUP BY T2.Founder ORDER BY T2.Founder | nvbench |
CREATE TABLE procedures_icd (
row_id number,
subject_id number,
hadm_id number,
icd9_code text,
charttime time
)
CREATE TABLE d_labitems (
row_id number,
itemid number,
label text
)
CREATE TABLE d_icd_diagnoses (
row_id number,
icd9_code text,
short_title text,
long_tit... | SELECT admissions.subject_id FROM admissions WHERE admissions.hadm_id IN (SELECT diagnoses_icd.hadm_id FROM diagnoses_icd WHERE diagnoses_icd.icd9_code = (SELECT d_icd_diagnoses.icd9_code FROM d_icd_diagnoses WHERE d_icd_diagnoses.short_title = 'hx of liver malignancy') AND STRFTIME('%y', diagnoses_icd.charttime) >= '2... | mimic_iii |
CREATE TABLE cost (
row_id number,
subject_id number,
hadm_id number,
event_type text,
event_id number,
chargetime time,
cost number
)
CREATE TABLE d_items (
row_id number,
itemid number,
label text,
linksto text
)
CREATE TABLE microbiologyevents (
row_id number,
su... | SELECT d_icd_diagnoses.short_title FROM d_icd_diagnoses WHERE d_icd_diagnoses.icd9_code IN (SELECT t1.icd9_code FROM (SELECT diagnoses_icd.icd9_code, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM diagnoses_icd WHERE diagnoses_icd.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.age BETWEEN... | mimic_iii |
CREATE TABLE medication (
medicationid number,
patientunitstayid number,
drugname text,
dosage text,
routeadmin text,
drugstarttime time,
drugstoptime time
)
CREATE TABLE allergy (
allergyid number,
patientunitstayid number,
drugname text,
allergyname text,
allergytime t... | SELECT medication.drugstarttime FROM medication WHERE medication.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '033-24126')) AND medication.routeadmin = 'ivpb' ORDER BY medic... | eicu |
CREATE TABLE hz_info (
KH text,
KLX number,
YLJGDM text,
RYBH text
)
CREATE TABLE person_info (
RYBH text,
XBDM number,
XBMC text,
XM text,
CSRQ time,
CSD text,
MZDM text,
MZMC text,
GJDM text,
GJMC text,
JGDM text,
JGMC text,
XLDM text,
XLMC text... | SELECT SHRGH, SHRXM FROM jybgb WHERE JZLSH = '44774327755' | css |
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_diagnoses (
row_id number,
icd9_code text,
sh... | SELECT labevents.valuenum FROM labevents WHERE labevents.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 3277) AND labevents.itemid IN (SELECT d_labitems.itemid FROM d_labitems WHERE d_labitems.label = 'rdw') AND STRFTIME('%y-%m', labevents.charttime) >= '2104-05' ORDER BY labevents.... | mimic_iii |
CREATE TABLE Customers (
customer_id INTEGER,
payment_method_code VARCHAR(15),
customer_number VARCHAR(20),
customer_name VARCHAR(80),
customer_address VARCHAR(255),
customer_phone VARCHAR(80),
customer_email VARCHAR(80)
)
CREATE TABLE Products (
product_id INTEGER,
product_type_cod... | SELECT date_to, COUNT(date_to) 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 ORDER BY COUNT(date_to) DESC | nvbench |
CREATE TABLE table_64039 (
"Driver" text,
"Starts" real,
"Finishes" real,
"Wins" real,
"Podiums" real,
"Stage wins" real,
"Points" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What's the number of stage wins for Federico Villagra having mo... | SELECT COUNT("Stage wins") FROM table_64039 WHERE "Finishes" > '1' AND "Podiums" < '1' AND "Driver" = 'federico villagra' AND "Starts" < '8' | wikisql |
CREATE TABLE table_name_14 (
home_team VARCHAR,
tie_no VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What home team has 10 as the tie no?
| SELECT home_team FROM table_name_14 WHERE tie_no = "10" | sql_create_context |
CREATE TABLE table_64316 (
"Round" text,
"Date" text,
"Opponent" text,
"Venue" text,
"Result" text,
"Attendance" text,
"Report" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What date was the opponent VFL Sindelfingen?
| SELECT "Date" FROM table_64316 WHERE "Opponent" = 'vfl sindelfingen' | wikisql |
CREATE TABLE table_56735 (
"Game" real,
"Date" text,
"Team" text,
"Score" text,
"High points" text,
"High rebounds" text,
"High assists" text,
"Location Attendance" text,
"Record" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- On Feb... | SELECT "Location Attendance" FROM table_56735 WHERE "Date" = 'february 10' | wikisql |
CREATE TABLE table_64666 (
"World record" text,
"Snatch" text,
"Mu Shuangshuang ( CHN )" text,
"139kg" text,
"Doha , Qatar" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What's the snatch when the 139kg was 305kg and the Olympic Record was the worl... | SELECT "Snatch" FROM table_64666 WHERE "World record" = 'olympic record' AND "139kg" = '305kg' | wikisql |
CREATE TABLE person_info (
CSD text,
CSRQ time,
GJDM text,
GJMC text,
JGDM text,
JGMC text,
MZDM text,
MZMC text,
RYBH text,
XBDM number,
XBMC text,
XLDM text,
XLMC text,
XM text,
ZYLBDM text,
ZYMC text
)
CREATE TABLE jyjgzbb (
BGDH text,
BGRQ tim... | SELECT jyjgzbb.JCFF 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_in... | css |
CREATE TABLE zyjzjlb (
CYBQDM text,
CYBQMC text,
CYCWH text,
CYKSDM text,
CYKSMC text,
CYSJ time,
CYZTDM number,
HZXM text,
JZKSDM text,
JZKSMC text,
JZLSH text,
KH text,
KLX number,
MZBMLX number,
MZJZLSH text,
MZZDBM text,
MZZDMC text,
MZZYZDZZBM... | SELECT zzmzjzjlb.JZZDBM, zzmzjzjlb.JZZDSM FROM zzmzjzjlb WHERE zzmzjzjlb.JZLSH = '54031732875' UNION SELECT fzzmzjzjlb.JZZDBM, fzzmzjzjlb.JZZDSM FROM fzzmzjzjlb WHERE fzzmzjzjlb.JZLSH = '54031732875' | css |
CREATE TABLE table_12226390_6 (
title VARCHAR,
production_code VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What's the title of the episode with a production code 136?
| SELECT title FROM table_12226390_6 WHERE production_code = 136 | sql_create_context |
CREATE TABLE ship (
Ship_ID int,
Name text,
Type text,
Nationality text,
Tonnage int
)
CREATE TABLE mission (
Mission_ID int,
Ship_ID int,
Code text,
Launched_Year int,
Location text,
Speed_knots int,
Fate text
)
-- Using valid SQLite, answer the following questions fo... | SELECT Nationality, COUNT(Nationality) FROM ship GROUP BY Type, Nationality ORDER BY Nationality DESC | nvbench |
CREATE TABLE medication (
medicationid number,
patientunitstayid number,
drugname text,
dosage text,
routeadmin text,
drugstarttime time,
drugstoptime time
)
CREATE TABLE microlab (
microlabid number,
patientunitstayid number,
culturesite text,
organism text,
culturetake... | SELECT COUNT(DISTINCT t1.uniquepid) FROM (SELECT patient.uniquepid, diagnosis.diagnosistime FROM diagnosis JOIN patient ON diagnosis.patientunitstayid = patient.patientunitstayid WHERE diagnosis.diagnosisname = 'respiratory arrest' AND STRFTIME('%y', diagnosis.diagnosistime) = '2102') AS t1 JOIN (SELECT patient.uniquep... | eicu |
CREATE TABLE table_1184 (
"No." real,
"Date" text,
"Tournament" text,
"Winning score" text,
"To par" text,
"Margin of victory" text,
"Runner(s)-up" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What was the margin of victory at the Hawaiian... | SELECT "Margin of victory" FROM table_1184 WHERE "Tournament" = 'Hawaiian Open' | wikisql |
CREATE TABLE player (
pid number,
pname text,
ycard text,
hs number
)
CREATE TABLE tryout (
pid number,
cname text,
ppos text,
decision text
)
CREATE TABLE college (
cname text,
state text,
enr number
)
-- Using valid SQLite, answer the following questions for the tables ... | SELECT COUNT(DISTINCT ppos) FROM tryout | spider |
CREATE TABLE table_203_731 (
id number,
"pos." text,
"city" text,
"population\n(ab)" number,
"surface\n(km2)" number,
"density\n(ab/km2)" number,
"altitude\n(mslm)" number
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- what is the density of the ... | SELECT "density\n(ab/km2)" FROM table_203_731 ORDER BY "pos." DESC LIMIT 1 | squall |
CREATE TABLE PostTags (
PostId number,
TagId number
)
CREATE TABLE Badges (
Id number,
UserId number,
Name text,
Date time,
Class number,
TagBased boolean
)
CREATE TABLE ReviewTasks (
Id number,
ReviewTaskTypeId number,
CreationDate time,
DeletionDate time,
ReviewTa... | SELECT (CAST(TIME_TO_STR(p.CreationDate, '%Y') AS FLOAT) + (TIME_TO_STR(p.CreationDate, '%m') / 12.0)), COUNT(*) AS questions, COUNT(p.ClosedDate) AS closed_questions, SUM(p.Score * 1.0) AS total_score, SUM(p.AnswerCount * 1.0) AS total_answers, SUM(p.CommentCount * 1.0) AS total_comment, SUM(p.FavoriteCount * 1.0) AS ... | sede |
CREATE TABLE table_39357 (
"Outcome" text,
"Year" real,
"Championship" text,
"Surface" text,
"Partner" text,
"Opponents in the final" text,
"Score in the final" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What was the outcome when the opp... | SELECT "Outcome" FROM table_39357 WHERE "Opponents in the final" = 'serena williams venus williams' AND "Surface" = 'hard' | wikisql |
CREATE TABLE table_60766 (
"Date" text,
"Venue" text,
"Score" text,
"Result" text,
"Competition" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What competition was played on 2 June 1992?
| SELECT "Competition" FROM table_60766 WHERE "Date" = '2 june 1992' | wikisql |
CREATE TABLE table_16011 (
"Nomination" text,
"Actors Name" text,
"Film Name" text,
"Director" text,
"Country" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What was the actors name for fuchzhou and nomination was best non-professional actor?
| SELECT "Actors Name" FROM table_16011 WHERE "Film Name" = 'Fuchzhou' AND "Nomination" = 'Best Non-Professional Actor' | wikisql |
CREATE TABLE table_127 (
"1953" text,
"party" text,
"Manhattan" text,
"The Bronx" text,
"Brooklyn" text,
"Queens" text,
"Richmond [Staten Is.]" text,
"Total" real,
"%" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What percentage of... | SELECT "The Bronx" FROM table_127 WHERE "Manhattan" = '29.9%' | wikisql |
CREATE TABLE table_name_55 (
laps VARCHAR,
driver VARCHAR,
grid VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- how many laps was the driver jacques villeneuve and the grid more than 7?
| SELECT COUNT(laps) FROM table_name_55 WHERE driver = "jacques villeneuve" AND grid > 7 | sql_create_context |
CREATE TABLE table_name_87 (
status VARCHAR,
against VARCHAR,
date VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What's the status with an against over 20 on 18/11/1995?
| SELECT status FROM table_name_87 WHERE against > 20 AND date = "18/11/1995" | sql_create_context |
CREATE TABLE table_name_96 (
year VARCHAR,
tournament_name VARCHAR,
runners_up VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What year was the Grand Prix Passing Shot Bordeaux that had Runners-up of Diego Nargiso?
| SELECT year FROM table_name_96 WHERE tournament_name = "grand prix passing shot bordeaux" AND runners_up = "diego nargiso" | sql_create_context |
CREATE TABLE table_36271 (
"Stage" text,
"Winner" text,
"General classification" text,
"Points classification" text,
"Mountains classification" text,
"Asian rider classification" text,
"Team classification" text,
"Asian team classification" text
)
-- Using valid SQLite, answer the foll... | SELECT "Stage" FROM table_36271 WHERE "Winner" = 'jeremy hunt' | wikisql |
CREATE TABLE table_train_16 (
"id" int,
"bleeding" int,
"brain_hernia" bool,
"allergy_to_granisetron" bool,
"intraperitoneal_infection" bool,
"intestinal_obstruction" bool,
"tumor" bool,
"NOUSE" float
)
-- Using valid SQLite, answer the following questions for the tables provided above... | SELECT * FROM table_train_16 WHERE bleeding = 1 OR brain_hernia = 1 | criteria2sql |
CREATE TABLE table_31452 (
"Game" real,
"Date" text,
"Team" text,
"Score" text,
"High points" text,
"High rebounds" text,
"High assists" text,
"Location Attendance" text,
"Record" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- in dec... | SELECT "High points" FROM table_31452 WHERE "Date" = 'December 7' | wikisql |
CREATE TABLE ReviewTasks (
Id number,
ReviewTaskTypeId number,
CreationDate time,
DeletionDate time,
ReviewTaskStateId number,
PostId number,
SuggestedEditId number,
CompletedByReviewTaskId number
)
CREATE TABLE PostNotices (
Id number,
PostId number,
PostNoticeTypeId number... | SELECT p.Id AS "post_link", p.Tags FROM Posts AS p INNER JOIN PostTags AS pt ON p.Id = pt.PostId INNER JOIN Tags AS t ON t.Id = pt.TagId WHERE ' ' + p.Title + ' ' LIKE ' %' + t.TagName + ' %' OR ' ' + p.Body + ' ' LIKE ' %' + t.TagName + ' %' LIMIT 10 | sede |
CREATE TABLE table_76571 (
"Official Name" text,
"Status" text,
"Area km 2" real,
"Population" real,
"Census Ranking" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- When the status is rural community what's the lowest area in kilometers squared?
| SELECT MIN("Area km 2") FROM table_76571 WHERE "Status" = 'rural community' | wikisql |
CREATE TABLE PendingFlags (
Id number,
FlagTypeId number,
PostId number,
CreationDate time,
CloseReasonTypeId number,
CloseAsOffTopicReasonTypeId number,
DuplicateOfQuestionId number,
BelongsOnBaseHostAddress text
)
CREATE TABLE SuggestedEditVotes (
Id number,
SuggestedEditId nu... | SELECT AVG(CAST((JULIANDAY(CreationDate) - JULIANDAY(B.postCreationDate)) * 86400.0 AS INT) * 1.0) FROM Posts AS A JOIN (SELECT AcceptedAnswerId, CreationDate AS postCreationDate FROM Posts WHERE NOT AcceptedAnswerId LIKE ' ' AND TIME_TO_STR(CreationDate, '%Y') LIKE '2017') AS B ON A.Id = B.AcceptedAnswerId | sede |
CREATE TABLE table_74582 (
"Home team" text,
"Home team score" text,
"Away team" text,
"Away team score" text,
"Venue" text,
"Crowd" real,
"Date" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What was the score for the home team St Kilda?
| SELECT "Home team score" FROM table_74582 WHERE "Home team" = 'st kilda' | wikisql |
CREATE TABLE table_name_42 (
crowd INTEGER,
venue VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- How many people attended the game at Lake Oval?
| SELECT SUM(crowd) FROM table_name_42 WHERE venue = "lake oval" | sql_create_context |
CREATE TABLE table_name_51 (
date VARCHAR,
record VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- When is the record 5-4?
| SELECT date FROM table_name_51 WHERE record = "5-4" | 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 diagnoses (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE procedures (
... | 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 = "Phosphate, Urine" | mimicsql_data |
CREATE TABLE participants (
participant_type_code VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- How many participants belong to the type 'Organizer'?
| SELECT COUNT(*) FROM participants WHERE participant_type_code = 'Organizer' | sql_create_context |
CREATE TABLE table_name_75 (
points INTEGER,
entrant VARCHAR,
year VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What was the average points for Hopkins before 1956?
| SELECT AVG(points) FROM table_name_75 WHERE entrant = "hopkins" AND year < 1956 | sql_create_context |
CREATE TABLE table_name_68 (
date VARCHAR,
winner VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Name the date for luciano pagliarini
| SELECT date FROM table_name_68 WHERE winner = "luciano pagliarini" | sql_create_context |
CREATE TABLE table_name_31 (
rider VARCHAR,
rounds VARCHAR,
motorcycle VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Who is riding the Ducati 999 RS in Round 7?
| SELECT rider FROM table_name_31 WHERE rounds = "7" AND motorcycle = "ducati 999 rs" | sql_create_context |
CREATE TABLE program_course (
program_id int,
course_id int,
workload int,
category varchar
)
CREATE TABLE program (
program_id int,
name varchar,
college varchar,
introduction varchar
)
CREATE TABLE semester (
semester_id int,
semester varchar,
year int
)
CREATE TABLE com... | SELECT DISTINCT course.department, course.name, course.number, program_course.workload, program_course.workload FROM course, program_course WHERE program_course.category LIKE '%PreMajor%' AND program_course.course_id = course.course_id AND program_course.workload = (SELECT MIN(PROGRAM_COURSEalias1.workload) FROM progra... | advising |
CREATE TABLE table_65880 (
"Constituency number" text,
"Name" text,
"Reserved for ( SC / ST /None)" text,
"District" text,
"Number of electorates (2009)" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the district when the reserved for (SC /... | SELECT "District" FROM table_65880 WHERE "Reserved for ( SC / ST /None)" = 'none' AND "Number of electorates (2009)" > '190,441' AND "Name" = 'indore-2' | wikisql |
CREATE TABLE table_38356 (
"Week" real,
"Date" text,
"Opponent" text,
"Result" text,
"Game site" text,
"Attendance" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What was the date of the week 9 game?
| SELECT "Date" FROM table_38356 WHERE "Week" = '9' | wikisql |
CREATE TABLE SuggestedEditVotes (
Id number,
SuggestedEditId number,
UserId number,
VoteTypeId number,
CreationDate time,
TargetUserId number,
TargetRepChange number
)
CREATE TABLE CloseAsOffTopicReasonTypes (
Id number,
IsUniversal boolean,
InputTitle text,
MarkdownInputGui... | SELECT Id AS "post_link", Score, ViewCount, Title, Body, Tags FROM Posts AS c WHERE ViewCount != 0 AND ParentId IS NULL AND AcceptedAnswerId IS NULL AND Tags LIKE '%<windows-phone%' AND CreationDate BETWEEN '01/01/2017' AND '12/31/2017' ORDER BY ViewCount DESC | sede |
CREATE TABLE CloseAsOffTopicReasonTypes (
Id number,
IsUniversal boolean,
InputTitle text,
MarkdownInputGuidance text,
MarkdownPostOwnerGuidance text,
MarkdownPrivilegedUserGuidance text,
MarkdownConcensusDescription text,
CreationDate time,
CreationModeratorId number,
ApprovalDa... | SELECT p.Id AS "post_link", p.Score, u.Id AS "user_link", a.Score AS "Accepted Score", au.Id AS "user_link" FROM Posts AS p JOIN Posts AS a ON p.AcceptedAnswerId = a.Id JOIN Users AS u ON p.OwnerUserId = u.Id JOIN Users AS au ON a.OwnerUserId = au.Id WHERE p.PostTypeId = 1 AND p.Score >= '##MinScore:int##' AND NOT p.Ac... | sede |
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 zzmzjzjlb ON hz_info.YLJGDM = zzmzjzjlb.YLJGDM AND hz_info.KH = zzmzjzjlb.KH AND hz_info.KLX = zzmzjzjlb.KLX WHERE hz_info.RYBH = '23602060' AND hz_info.YLJGDM = '9638787' AND zzmzjzjlb.JZZDSM LIKE '%后遗症%' UNION SELECT * FROM hz_info JOIN fzzmzjzjlb ON hz_info.YLJGDM = fzzmzjzjlb.YLJGDM AND h... | css |
CREATE TABLE table_14465871_2 (
provider VARCHAR,
application VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which providers use exchange server?
| SELECT provider FROM table_14465871_2 WHERE application = "Exchange Server" | sql_create_context |
CREATE TABLE university (
School_ID int,
School text,
Location text,
Founded real,
Affiliation text,
Enrollment real,
Nickname text,
Primary_conference text
)
CREATE TABLE basketball_match (
Team_ID int,
School_ID int,
Team_Name text,
ACC_Regular_Season text,
ACC_Per... | SELECT Team_ID, School_ID FROM basketball_match GROUP BY ACC_Regular_Season | nvbench |
CREATE TABLE labevents (
row_id number,
subject_id number,
hadm_id number,
itemid number,
charttime time,
valuenum number,
valueuom text
)
CREATE TABLE prescriptions (
row_id number,
subject_id number,
hadm_id number,
startdate time,
enddate time,
drug text,
dose... | SELECT prescriptions.drug FROM prescriptions WHERE prescriptions.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 95892) AND DATETIME(prescriptions.startdate, 'start of year') = DATETIME(CURRENT_TIME(), 'start of year', '-0 year') AND STRFTIME('%m', prescriptions.startdate) = '12' ORD... | mimic_iii |
CREATE TABLE table_203_377 (
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.
-- which nations have won only one medal ?
| SELECT "nation" FROM table_203_377 WHERE "total" = 1 | squall |
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.KSBM, jybgb.KSMC FROM hz_info JOIN mzjzjlb JOIN jybgb JOIN person_info_hz_info JOIN person_info ON hz_info.YLJGDM = mzjzjlb.YLJGDM AND hz_info.KH = mzjzjlb.KH AND hz_info.KLX = mzjzjlb.KLX AND mzjzjlb.YLJGDM = jybgb.YLJGDM_MZJZJLB AND mzjzjlb.JZLSH = jybgb.JZLSH_MZJZJLB AND person_info_hz_info.KH = hz_info... | css |
CREATE TABLE table_24995 (
"Year" text,
"Date" text,
"Driver" text,
"Team" text,
"Manufacturer" text,
"Laps" text,
"Miles (km)" text,
"Race Time" text,
"Average Speed (mph)" text,
"Report" text
)
-- Using valid SQLite, answer the following questions for the tables provided abov... | SELECT "Laps" FROM table_24995 WHERE "Race Time" = '4:17:18' | wikisql |
CREATE TABLE table_203_677 (
id number,
"year" number,
"competition" text,
"venue" text,
"position" text,
"event" text,
"notes" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- which event did anton lyuboslavskiy finish in first ?
| SELECT "event" FROM table_203_677 WHERE "position" = 1 | squall |
CREATE TABLE table_50980 (
"Outcome" text,
"Date" text,
"Championship" text,
"Surface" text,
"Opponent" text,
"Score" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What was the surface for the opponent Marcos Baghdatis?
| SELECT "Surface" FROM table_50980 WHERE "Opponent" = 'marcos baghdatis' | wikisql |
CREATE TABLE table_24123 (
"Game" real,
"Date" text,
"Opponent" text,
"Result" text,
"Black Knights points" real,
"Opponents" real,
"Record" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Name the date for result loss for duke
| SELECT "Date" FROM table_24123 WHERE "Result" = 'Loss' AND "Opponent" = 'Duke' | wikisql |
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 COUNT(*) FROM (SELECT t_kc21.MED_ORG_DEPT_CD FROM t_kc21 JOIN t_kc24 ON t_kc21.MED_CLINIC_ID = t_kc24.MED_CLINIC_ID WHERE t_kc21.MED_SER_ORG_NO = '2816651' AND t_kc24.CLINIC_SLT_DATE BETWEEN '2011-09-10' AND '2017-11-08' GROUP BY t_kc21.MED_ORG_DEPT_CD HAVING SUM(t_kc24.MED_AMOUT) < 6027.82) AS T | css |
CREATE TABLE HOST (
Name VARCHAR,
Host_ID VARCHAR
)
CREATE TABLE party_host (
Name VARCHAR,
Host_ID VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- List the names of hosts who did not serve as a host of any party in our record.
| SELECT Name FROM HOST WHERE NOT Host_ID IN (SELECT Host_ID FROM party_host) | sql_create_context |
CREATE TABLE table_204_12 (
id number,
"area served" text,
"city of license" text,
"vc" number,
"rf" number,
"callsign" text,
"network" text,
"notes" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- tell me the number of stations licensed ... | SELECT COUNT(*) FROM table_204_12 WHERE "city of license" = 'fort wayne' | 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 COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE diagnoses.long_title = "Body Mass Index less than 19, adult" AND prescriptions.drug_type = "BASE" | mimicsql_data |
CREATE TABLE table_20588 (
"Institution" text,
"Location" text,
"Founded" real,
"Type" text,
"Enrollment" real,
"Nickname" text,
"Joined" text,
"Left" text,
"Current Conference" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Name the... | SELECT MAX("Enrollment") FROM table_20588 WHERE "Institution" = 'St. Andrews University' | wikisql |
CREATE TABLE table_name_50 (
body_width_mm VARCHAR,
body_length_mm VARCHAR,
pins VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- How much Body Width/mm has a Body Length/mm of 18.4, and Pins of 40?
| SELECT COUNT(body_width_mm) FROM table_name_50 WHERE body_length_mm = 18.4 AND pins = "40" | sql_create_context |
CREATE TABLE table_name_21 (
podcast_date VARCHAR,
episode_number VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the date for the podcast episode number 103?
| SELECT podcast_date FROM table_name_21 WHERE episode_number = 103 | sql_create_context |
CREATE TABLE table_22916979_2 (
census_designated_place VARCHAR,
population__2000_census_ VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- what is the total number of census designated places with a population of 10581?
| SELECT COUNT(census_designated_place) FROM table_22916979_2 WHERE population__2000_census_ = 10581 | sql_create_context |
CREATE TABLE table_70839 (
"Year" real,
"Entrant" text,
"Chassis" text,
"Engine" text,
"Points" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the total amount of points that Christy has in the years before 1954?
| SELECT SUM("Points") FROM table_70839 WHERE "Entrant" = 'christy' AND "Year" < '1954' | wikisql |
CREATE TABLE hz_info (
KH text,
KLX number,
RYBH text,
YLJGDM text
)
CREATE TABLE jybgb_jyjgzbb (
JYZBLSH number,
YLJGDM text,
jyjgzbb_id number
)
CREATE TABLE zyjzjlb (
CYBQDM text,
CYBQMC text,
CYCWH text,
CYKSDM text,
CYKSMC text,
CYSJ time,
CYZTDM number,
... | SELECT jyjgzbb.JCZBMC, jyjgzbb.JCZBJGDW, AVG(jyjgzbb.JCZBJGDL) FROM jyjgzbb JOIN jybgb_jyjgzbb JOIN jybgb ON jybgb_jyjgzbb.JYZBLSH = jyjgzbb.JYZBLSH AND jybgb_jyjgzbb.jyjgzbb_id = jyjgzbb.jyjgzbb_id AND jybgb_jyjgzbb.YLJGDM = jybgb.YLJGDM WHERE jybgb.YLJGDM = '6930520' AND jyjgzbb.BGRQ BETWEEN '2005-06-06' AND '2009-07... | css |
CREATE TABLE table_13050003_2 (
blocks VARCHAR,
points VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Who are the blockers where points are scored by Zach Randolph (24)?
| SELECT blocks FROM table_13050003_2 WHERE points = "Zach Randolph (24)" | sql_create_context |
CREATE TABLE table_name_71 (
seasons VARCHAR,
coach VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- How many seasons has John Mcfadden coached?
| SELECT COUNT(seasons) FROM table_name_71 WHERE coach = "john mcfadden" | sql_create_context |
CREATE TABLE table_25591 (
"Stage" real,
"Winner" text,
"General classification" text,
"Mountains classification" text,
"Points classification" text,
"Sprints classification" text,
"Team classification" text
)
-- Using valid SQLite, answer the following questions for the tables provided ab... | SELECT "Points classification" FROM table_25591 WHERE "Stage" = '3' | wikisql |
CREATE TABLE table_17650 (
"#" real,
"Athlete (NOC)" text,
"Shooting" text,
"Fencing" text,
"Swimming" text,
"Riding" text,
"Running" text,
"Total" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What's Eduardo Salas' riding score?
| SELECT "Riding" FROM table_17650 WHERE "Athlete (NOC)" = 'Eduardo Salas' | wikisql |
CREATE TABLE table_56142 (
"Episode" text,
"1st edition" text,
"2nd edition" text,
"3rd edition" text,
"4th edition" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the 1st Edition for Episode 11?
| SELECT "1st edition" FROM table_56142 WHERE "Episode" = '11' | wikisql |
CREATE TABLE d_icd_procedures (
row_id number,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE d_items (
row_id number,
itemid number,
label text,
linksto text
)
CREATE TABLE prescriptions (
row_id number,
subject_id number,
hadm_id number,
startdate ti... | SELECT MIN(labevents.valuenum) FROM labevents WHERE labevents.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 16715) AND labevents.itemid IN (SELECT d_labitems.itemid FROM d_labitems WHERE d_labitems.label = 'epithelial cells') AND STRFTIME('%y', labevents.charttime) >= '2105' GROUP ... | mimic_iii |
CREATE TABLE customers (
customer_id VARCHAR,
customer_name VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Find the IDs of customers whose name contains 'Diana'.
| SELECT customer_id FROM customers WHERE customer_name LIKE "%Diana%" | sql_create_context |
CREATE TABLE departments (
DEPARTMENT_ID decimal(4,0),
DEPARTMENT_NAME varchar(30),
MANAGER_ID decimal(6,0),
LOCATION_ID decimal(4,0)
)
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... | SELECT HIRE_DATE, SUM(SALARY) FROM employees | nvbench |
CREATE TABLE table_80400 (
"Place" text,
"Player" text,
"Country" text,
"Score" text,
"To par" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What country does Rocco Mediate play for?
| SELECT "Country" FROM table_80400 WHERE "Player" = 'rocco mediate' | wikisql |
CREATE TABLE table_5889 (
"Year" real,
"Men's singles" text,
"Women's singles" text,
"Men's doubles" text,
"Women's doubles" text,
"Mixed doubles" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Women's singles of astrid eidenbenz, and a Men's do... | SELECT "Mixed doubles" FROM table_5889 WHERE "Women's singles" = 'astrid eidenbenz' AND "Men's doubles" = 'no competition' | wikisql |
CREATE TABLE mzb (
CLINIC_ID text,
COMP_ID text,
DATA_ID text,
DIFF_PLACE_FLG number,
FERTILITY_STS number,
FLX_MED_ORG_ID text,
HOSP_LEV number,
HOSP_STS number,
IDENTITY_CARD text,
INPT_AREA_BED text,
INSURED_IDENTITY number,
INSURED_STS text,
INSU_TYPE text,
IN... | SELECT * FROM qtb WHERE qtb.PERSON_NM = '凤乐和' AND qtb.MED_SER_ORG_NO = '2365508' AND qtb.MED_ORG_DEPT_NM LIKE '%科学%' UNION SELECT * FROM gyb WHERE gyb.PERSON_NM = '凤乐和' AND gyb.MED_SER_ORG_NO = '2365508' AND gyb.MED_ORG_DEPT_NM LIKE '%科学%' UNION SELECT * FROM zyb WHERE zyb.PERSON_NM = '凤乐和' AND zyb.MED_SER_ORG_NO = '23... | 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(DISTINCT patient.patientunitstayid) FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '013-27480') | eicu |
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.CKZFWXX, jyjgzbb.CKZFWSX FROM zzmzjzjlb JOIN jybgb JOIN jyjgzbb ON zzmzjzjlb.YLJGDM = jybgb.YLJGDM_MZJZJLB AND zzmzjzjlb.JZLSH = jybgb.JZLSH_MZJZJLB AND jybgb.YLJGDM = jyjgzbb.YLJGDM AND jybgb.BGDH = jyjgzbb.BGDH WHERE zzmzjzjlb.JZZDSM = '由于使用酒精引起的精神病性障碍' AND jyjgzbb.JCZBDM = '686489' UNION SELECT jyjgzb... | css |
CREATE TABLE table_name_70 (
against INTEGER,
losses VARCHAR,
ntfa_div_2 VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Old Scotch had less than 9 losses and how much against?
| SELECT SUM(against) FROM table_name_70 WHERE losses < 9 AND ntfa_div_2 = "old scotch" | 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 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 diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE demographic.dob_year < "1882" AND diagnoses.short_title = "Chordae tendinae rupture" | mimicsql_data |
CREATE TABLE ReviewTaskTypes (
Id number,
Name text,
Description text
)
CREATE TABLE CloseReasonTypes (
Id number,
Name text,
Description text
)
CREATE TABLE PostNotices (
Id number,
PostId number,
PostNoticeTypeId number,
CreationDate time,
DeletionDate time,
ExpiryDat... | WITH qaedits AS (SELECT (SELECT COUNT(*) FROM Posts WHERE PostTypeId = 1 AND LastEditorUserId = Users.Id) AS QuestionEdits, (SELECT COUNT(*) FROM Posts WHERE PostTypeId = 2 AND LastEditorUserId = Users.Id) AS AnswerEdits FROM Users WHERE Id = '##UserId##'), edits AS (SELECT QuestionEdits, AnswerEdits, QuestionEdits + A... | sede |
CREATE TABLE table_79541 (
"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 City with an IATA of MUC?
| SELECT "City" FROM table_79541 WHERE "IATA" = 'muc' | wikisql |
CREATE TABLE t_kc21_t_kc22 (
MED_CLINIC_ID text,
MED_EXP_DET_ID number
)
CREATE TABLE t_kc21 (
CLINIC_ID text,
CLINIC_TYPE text,
COMP_ID text,
DATA_ID text,
DIFF_PLACE_FLG number,
FERTILITY_STS number,
FLX_MED_ORG_ID text,
HOSP_LEV number,
HOSP_STS number,
IDENTITY_CARD ... | SELECT t_kc21.FLX_MED_ORG_ID FROM t_kc21 WHERE t_kc21.MED_CLINIC_ID = '56302259723' | css |
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 prescriptions.formulary_drug_cd, prescriptions.route FROM prescriptions WHERE prescriptions.drug = "Lidocaine Jelly 2% (Urojet)" | 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 WHERE demographic.days_stay > "2" AND diagnoses.long_title = "Tricuspid valve disorders, specified as nonrheumatic" | mimicsql_data |
CREATE TABLE table_name_69 (
chroma_format VARCHAR,
picture_coding_types VARCHAR,
name VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What Chroma Format that has both Picture Coding Types of i, p, b, and the Name of main profile?
| SELECT chroma_format FROM table_name_69 WHERE picture_coding_types = "i, p, b" AND name = "main profile" | sql_create_context |
CREATE TABLE table_67258 (
"School" text,
"Location" text,
"Mascot" text,
"# / County" text,
"Enrollment 08-09" real,
"IHSAA Class" text,
"Year Joined" real,
"Previous Conference" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- what is th... | SELECT "Mascot" FROM table_67258 WHERE "Enrollment 08-09" = '320' | wikisql |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.