context stringlengths 11 9.12k | question stringlengths 0 1.06k | SQL stringlengths 2 4.44k | source stringclasses 28
values |
|---|---|---|---|
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,
ZYLBDM text,
ZYMC text
)
CREATE TABLE zyjzjlb (
YLJGDM text,
JZLSH ... | 60676464号病人的检验报告单对应的检验结果指标均异常的检验报告单号有哪些 | (SELECT jybgb.BGDH FROM hz_info JOIN mzjzjlb JOIN jybgb 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 WHERE hz_info.RYBH = '60676464' AND NOT jybgb.BGDH IN (SELECT BGDH FROM jyjgzbb WHERE JCZ... | css |
CREATE TABLE table_79383 (
"Year" real,
"Game" text,
"Genre" text,
"Platform(s)" text,
"Developer(s)" text
) | What game was in 2001? | SELECT "Game" FROM table_79383 WHERE "Year" = '2001' | wikisql |
CREATE TABLE table_name_29 (
position VARCHAR,
player VARCHAR
) | What position is played by farmar, jordan jordan farmar? | SELECT position FROM table_name_29 WHERE player = "farmar, jordan jordan farmar" | sql_create_context |
CREATE TABLE hz_info (
KH text,
KLX number,
RYBH text,
YLJGDM text
)
CREATE TABLE zyjybgb (
BBCJBW text,
BBDM text,
BBMC text,
BBZT number,
BGDH number,
BGJGDM text,
BGJGMC text,
BGRGH text,
BGRQ time,
BGRXM text,
BGSJ time,
CJRQ time,
JSBBRQSJ time,
... | 从01年3月9号到14年4月7号,患者姜和玉,836622这个指标怎么样 | SELECT * FROM person_info JOIN hz_info JOIN mzjzjlb JOIN zyjybgb JOIN jyjgzbb ON person_info.RYBH = hz_info.RYBH AND hz_info.YLJGDM = mzjzjlb.YLJGDM AND hz_info.KH = mzjzjlb.KH AND hz_info.KLX = mzjzjlb.KLX AND mzjzjlb.YLJGDM = zyjybgb.YLJGDM_MZJZJLB AND mzjzjlb.JZLSH = zyjybgb.JZLSH_MZJZJLB AND zyjybgb.YLJGDM = jyjgzb... | css |
CREATE TABLE treatment (
treatmentid number,
patientunitstayid number,
treatmentname text,
treatmenttime time
)
CREATE TABLE vitalperiodic (
vitalperiodicid number,
patientunitstayid number,
temperature number,
sao2 number,
heartrate number,
respiration number,
systemicsysto... | what are the four most commonly used procedures for patients who had received antiemetic - anticholinergic previously during the same month, until 1 year ago? | SELECT t3.treatmentname FROM (SELECT t2.treatmentname, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM (SELECT patient.uniquepid, treatment.treatmenttime FROM treatment JOIN patient ON treatment.patientunitstayid = patient.patientunitstayid WHERE treatment.treatmentname = 'antiemetic - anticholinergic' AND DATETI... | eicu |
CREATE TABLE Reservations (
Code INTEGER,
Room TEXT,
CheckIn TEXT,
CheckOut TEXT,
Rate REAL,
LastName TEXT,
FirstName TEXT,
Adults INTEGER,
Kids INTEGER
)
CREATE TABLE Rooms (
RoomId TEXT,
roomName TEXT,
beds INTEGER,
bedType TEXT,
maxOccupancy INTEGER,
baseP... | What is the average price of the rooms for each different decor? Show me a bar chart!, and sort y-axis in ascending order. | SELECT decor, AVG(basePrice) FROM Rooms GROUP BY decor ORDER BY AVG(basePrice) | nvbench |
CREATE TABLE table_1876825_5 (
title VARCHAR,
original_air_date VARCHAR
) | What is title of episode aired on March 2, 2003? | SELECT title FROM table_1876825_5 WHERE original_air_date = "March 2, 2003" | sql_create_context |
CREATE TABLE Students (
student_id INTEGER,
date_of_registration DATETIME,
date_of_latest_logon DATETIME,
login_name VARCHAR(40),
password VARCHAR(10),
personal_name VARCHAR(40),
middle_name VARCHAR(40),
family_name VARCHAR(40)
)
CREATE TABLE Student_Tests_Taken (
registration_id IN... | Find the number of courses for each subject in a bar chart, and order by the x axis in ascending. | SELECT subject_name, COUNT(*) FROM Courses AS T1 JOIN Subjects AS T2 ON T1.subject_id = T2.subject_id GROUP BY T1.subject_id ORDER BY subject_name | nvbench |
CREATE TABLE cost (
row_id number,
subject_id number,
hadm_id number,
event_type text,
event_id number,
chargetime time,
cost number
)
CREATE TABLE diagnoses_icd (
row_id number,
subject_id number,
hadm_id number,
icd9_code text,
charttime time
)
CREATE TABLE d_labitems... | until 08/24/2105, what was the first value of arterial bp [diastolic] for patient 23938? | SELECT chartevents.valuenum FROM chartevents WHERE chartevents.icustay_id IN (SELECT icustays.icustay_id FROM icustays WHERE icustays.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 23938)) AND chartevents.itemid IN (SELECT d_items.itemid FROM d_items WHERE d_items.label = 'arterial ... | mimic_iii |
CREATE TABLE affiliated_with (
physician number,
department number,
primaryaffiliation boolean
)
CREATE TABLE block (
blockfloor number,
blockcode number
)
CREATE TABLE nurse (
employeeid number,
name text,
position text,
registered boolean,
ssn number
)
CREATE TABLE patient (... | Which physicians are affiliated with either Surgery or Psychiatry department? Give me their names. | SELECT T1.name FROM physician AS T1 JOIN affiliated_with AS T2 ON T1.employeeid = T2.physician JOIN department AS T3 ON T2.department = T3.departmentid WHERE T3.name = 'Surgery' OR T3.name = 'Psychiatry' | spider |
CREATE TABLE table_10244 (
"Software" text,
"Calculations" text,
"Macros" text,
"Loci" text,
"Animations" text,
"Multilingual" text,
"Proofs" text
) | Is there Loci in the Cinderella software? | SELECT "Loci" FROM table_10244 WHERE "Software" = 'cinderella' | wikisql |
CREATE TABLE table_name_49 (
headquarters VARCHAR,
primary_industry VARCHAR,
name VARCHAR
) | Where is Exxon Mobil, an oil and gas corporation, headquartered? | SELECT headquarters FROM table_name_49 WHERE primary_industry = "oil and gas" AND name = "exxon mobil" | sql_create_context |
CREATE TABLE table_41441 (
"Pos." text,
"Player" text,
"Free Agent Type" text,
"2007 Team" text,
"Contract" text
) | What is the 2007 Team with player Deshaun Foster? | SELECT "2007 Team" FROM table_41441 WHERE "Player" = 'deshaun foster' | 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
) | What are the names of products with price at most 200, and count them by a bar chart, display how many name in desc order. | SELECT Name, COUNT(Name) FROM Products WHERE Price <= 200 GROUP BY Name ORDER BY COUNT(Name) DESC | nvbench |
CREATE TABLE Votes (
Id number,
PostId number,
VoteTypeId number,
UserId number,
CreationDate time,
BountyAmount number
)
CREATE TABLE ReviewTaskTypes (
Id number,
Name text,
Description text
)
CREATE TABLE PostFeedback (
Id number,
PostId number,
IsAnonymous boolean,
... | Top 50 users with most number of comments containing given text. | SELECT ROW_NUMBER() OVER (ORDER BY COUNT(Id) DESC) AS "#", UserId AS "user_link", COUNT(Id) AS c FROM Comments WHERE Text LIKE '%##CommentText##%' AND LENGTH(Text) <= '##CommentLength##' AND NOT UserId IS NULL GROUP BY UserId ORDER BY c DESC LIMIT 50 | sede |
CREATE TABLE table_25493 (
"Game" real,
"Date" text,
"Team" text,
"Score" text,
"High points" text,
"High rebounds" text,
"High assists" text,
"Location Attendance" text,
"Record" text
) | Name the score for 49-31 | SELECT "Score" FROM table_25493 WHERE "Record" = '49-31' | wikisql |
CREATE TABLE table_71875 (
"Date" text,
"Venue" text,
"Score" text,
"Result" text,
"Competition" text
) | Which result has a Date of november 2, 2007? | SELECT "Result" FROM table_71875 WHERE "Date" = 'november 2, 2007' | wikisql |
CREATE TABLE diagnosis (
diagnosisid number,
patientunitstayid number,
diagnosisname text,
diagnosistime time,
icd9code text
)
CREATE TABLE patient (
uniquepid text,
patienthealthsystemstayid number,
patientunitstayid number,
gender text,
age text,
ethnicity text,
hospit... | what procedure was performed on patient 017-30133 for the last time on the last hospital visit? | 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 = '017-30133' AND NOT patient.hospitaldischargetime IS NULL ORDER BY... | eicu |
CREATE TABLE table_42643 (
"Date" text,
"Location" text,
"Country" text,
"Event" text,
"Winner" text,
"Runner-up" text
) | Who was the Runner-up in Hossegor? | SELECT "Runner-up" FROM table_42643 WHERE "Location" = 'hossegor' | wikisql |
CREATE TABLE table_name_59 (
date VARCHAR,
venue VARCHAR
) | When was the game played at Moorabbin Oval? | SELECT date FROM table_name_59 WHERE venue = "moorabbin oval" | sql_create_context |
CREATE TABLE table_72185 (
"Week" text,
"Date" text,
"Opponent" text,
"Result" text,
"Kickoff [a ]" text,
"Game site" text,
"TV" text,
"Attendance" text,
"Record" text
) | Give me the kickoff time of the game that was aired on CBS against the St. Louis Cardinals. | SELECT "Kickoff [a ]" FROM table_72185 WHERE "TV" = 'CBS' AND "Opponent" = 'St. Louis Cardinals' | wikisql |
CREATE TABLE table_name_11 (
venue VARCHAR,
date VARCHAR
) | what was the venue on 7 october 2011? | SELECT venue FROM table_name_11 WHERE date = "7 october 2011" | sql_create_context |
CREATE TABLE table_name_99 (
week_3 VARCHAR,
team VARCHAR
) | Name the week 3 for team of mark/jennifer | SELECT week_3 FROM table_name_99 WHERE team = "mark/jennifer" | sql_create_context |
CREATE TABLE intakeoutput (
intakeoutputid number,
patientunitstayid number,
cellpath text,
celllabel text,
cellvaluenumeric number,
intakeoutputtime time
)
CREATE TABLE lab (
labid number,
patientunitstayid number,
labname text,
labresult number,
labresulttime time
)
CREAT... | has patient 028-22327 taken a cl flush: non-tunneled, pressure/power inj subclav drug in 06/this year? | 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 = '028-22327')) AND intakeoutput.cellpath LIKE '%intake%' AND intakeoutpu... | eicu |
CREATE TABLE table_203_370 (
id number,
"year" number,
"competition" text,
"venue" text,
"position" text,
"event" text,
"notes" text
) | which competition is listed the most in this chart ? | SELECT "competition" FROM table_203_370 GROUP BY "competition" ORDER BY COUNT(*) DESC LIMIT 1 | squall |
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... | how many patients whose drug name is milrinone? | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE prescriptions.drug = "Milrinone" | 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 diagnoses (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
C... | count the number of patients whose discharge location is dead/expired and age is less than 41? | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.discharge_location = "DEAD/EXPIRED" AND demographic.age < "41" | mimicsql_data |
CREATE TABLE ref_calendar (
calendar_date time,
day_number number
)
CREATE TABLE roles (
role_code text,
role_name text,
role_description text
)
CREATE TABLE ref_document_types (
document_type_code text,
document_type_name text,
document_type_description text
)
CREATE TABLE documents_... | Show all role codes with at least 3 employees. | SELECT role_code FROM employees GROUP BY role_code HAVING COUNT(*) >= 3 | spider |
CREATE TABLE movie (
movie_id number,
title text,
year number,
director text,
budget_million number,
gross_worldwide number
)
CREATE TABLE culture_company (
company_name text,
type text,
incorporated_in text,
group_equity_shareholding number,
book_club_id text,
movie_id ... | Return the publisher that has published the most books. | SELECT publisher FROM book_club GROUP BY publisher ORDER BY COUNT(*) DESC LIMIT 1 | spider |
CREATE TABLE Posts (
Id number,
PostTypeId number,
AcceptedAnswerId number,
ParentId number,
CreationDate time,
DeletionDate time,
Score number,
ViewCount number,
Body text,
OwnerUserId number,
OwnerDisplayName text,
LastEditorUserId number,
LastEditorDisplayName text... | Upvoted, but not accepted Answers.. | SELECT b.Id AS "post_link", 'site://questions/' + CAST(MAX(a.Id) AS TEXT) AS "answer_link" FROM Posts AS a INNER JOIN Posts AS b ON a.ParentId = b.Id INNER JOIN Posts AS c ON c.ParentId = b.Id WHERE a.PostTypeId = 2 AND a.OwnerUserId = @UserId AND b.PostTypeId = 1 AND b.AcceptedAnswerId IS NULL AND c.PostTypeId = 2 AND... | sede |
CREATE TABLE table_name_30 (
Id VARCHAR
) | What is 2000, when 1996 is 'A', when 1997 is 'A', and when 2007 is 'A'? | SELECT 2000 FROM table_name_30 WHERE 1996 = "a" AND 1997 = "a" AND 2007 = "a" | sql_create_context |
CREATE TABLE medication (
medicationid number,
patientunitstayid number,
drugname text,
dosage text,
routeadmin text,
drugstarttime time,
drugstoptime time
)
CREATE TABLE cost (
costid number,
uniquepid text,
patienthealthsystemstayid number,
eventtype text,
eventid numb... | how much does patient 018-86978 weigh based on the first measurement until 4 months ago? | SELECT patient.admissionweight FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '018-86978') AND NOT patient.admissionweight IS NULL AND DATETIME(patient.unitadmittime) <= DATETIME(CURRENT_TIME(), '-4 month') ORDER BY patient.unitad... | eicu |
CREATE TABLE table_19013 (
"Rank" real,
"Airport" text,
"Total Passengers 2008" real,
"Total Passengers 2009" real,
"Change 2008/09" text,
"Aircraft movements 2009" real
) | what's the airport with total passengers 2009 being 157933 | SELECT "Airport" FROM table_19013 WHERE "Total Passengers 2009" = '157933' | 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,
... | 在04年11月24日到16年1月8期间,患者52511497被开出药品107476384共有几次? | SELECT COUNT(*) FROM t_kc21 JOIN t_kc22 ON t_kc21.MED_CLINIC_ID = t_kc22.MED_CLINIC_ID WHERE t_kc21.PERSON_ID = '52511497' AND t_kc22.STA_DATE BETWEEN '2004-11-24' AND '2016-01-08' AND t_kc22.SOC_SRT_DIRE_CD = '107476384' | css |
CREATE TABLE table_66609 (
"School" text,
"Location" text,
"Mascot" text,
"Enrollment" real,
"IHSAA Class" text,
"County" text
) | Where is the lacrosse school located? | SELECT "Location" FROM table_66609 WHERE "School" = 'lacrosse' | wikisql |
CREATE TABLE table_name_39 (
crowd INTEGER,
venue VARCHAR
) | Tell me the most crowd for arden street oval venue | SELECT MAX(crowd) FROM table_name_39 WHERE venue = "arden street oval" | sql_create_context |
CREATE TABLE Votes (
Id number,
PostId number,
VoteTypeId number,
UserId number,
CreationDate time,
BountyAmount number
)
CREATE TABLE PostNoticeTypes (
Id number,
ClassId number,
Name text,
Body text,
IsHidden boolean,
Predefined boolean,
PostNoticeDurationId number... | Posts that have ever had [game-systems]. | SELECT Posts.Id AS "post_link", Posts.Tags, PostHistory.CreationDate FROM Posts, PostHistory WHERE Posts.Id = PostHistory.PostId AND PostHistory.Text LIKE '%<game-systems>%' ORDER BY Posts.Id DESC, PostHistory.CreationDate | sede |
CREATE TABLE table_72579 (
"Cardinal direction" text,
"Burmese" text,
"Sanskrit" text,
"English" text,
"Planet" text,
"Sign" text
) | What is the Burmese term for Thursday? | SELECT "Burmese" FROM table_72579 WHERE "English" = 'Thursday' | wikisql |
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
) | For those records from the products and each product's manufacturer, what is the relationship between code and revenue , and group by attribute founder? | SELECT T1.Code, T2.Revenue FROM Products AS T1 JOIN Manufacturers AS T2 ON T1.Manufacturer = T2.Code GROUP BY Founder | nvbench |
CREATE TABLE area (
course_id int,
area varchar
)
CREATE TABLE program_requirement (
program_id int,
category varchar,
min_credit int,
additional_req varchar
)
CREATE TABLE course_tags_count (
course_id int,
clear_grading int,
pop_quiz int,
group_projects int,
inspirational... | Is there anyone else who teaches Medieval Literature besides Prof. Navvab ? | SELECT DISTINCT course.department, course.name, course.number, instructor.name FROM course, course_offering, instructor, offering_instructor WHERE course.course_id = course_offering.course_id AND course.name LIKE '%Medieval Literature%' AND NOT instructor.name LIKE '%Navvab%' AND offering_instructor.instructor_id = ins... | advising |
CREATE TABLE prescriptions (
subject_id text,
hadm_id text,
icustay_id text,
drug_type text,
drug text,
formulary_drug_cd text,
route text,
drug_dose text
)
CREATE TABLE lab (
subject_id text,
hadm_id text,
itemid text,
charttime text,
flag text,
value_unit text,... | how many patients are diagnosed with primary disease left colon cancer and are below age 76? | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.diagnosis = "LEFT COLON CANCER" AND demographic.age < "76" | mimicsql_data |
CREATE TABLE table_1404456_1 (
area__km_2__ VARCHAR,
population_census_2009 VARCHAR
) | what's the area (km 2 ) with population census 2009 being 939370 | SELECT area__km_2__ FROM table_1404456_1 WHERE population_census_2009 = 939370 | sql_create_context |
CREATE TABLE ReviewTasks (
Id number,
ReviewTaskTypeId number,
CreationDate time,
DeletionDate time,
ReviewTaskStateId number,
PostId number,
SuggestedEditId number,
CompletedByReviewTaskId number
)
CREATE TABLE ReviewTaskTypes (
Id number,
Name text,
Description text
)
CRE... | Top users from Paris, France. | SELECT ROW_NUMBER() OVER (ORDER BY Reputation DESC) AS "#", Id AS "user_link", Reputation FROM Users WHERE LOWER(Location) LIKE '%paris%' OR UPPER(Location) LIKE '%PARIS%' ORDER BY Reputation DESC | 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... | 查询在2004年12月3日到2010年2月6日期间医院2121304有多少科室在门诊就诊中开了多于21张检验报告单 | SELECT COUNT(*) FROM (SELECT jybgb.KSBM FROM zzmzjzjlb JOIN jybgb ON zzmzjzjlb.YLJGDM = jybgb.YLJGDM_MZJZJLB AND zzmzjzjlb.JZLSH = jybgb.JZLSH_MZJZJLB WHERE zzmzjzjlb.YLJGDM = '2121304' AND jybgb.BGRQ BETWEEN '2004-12-03' AND '2010-02-06' GROUP BY jybgb.KSBM HAVING COUNT(*) > 21 UNION SELECT jybgb.KSBM FROM fzzmzjzjlb ... | css |
CREATE TABLE ta (
campus_job_id int,
student_id int,
location varchar
)
CREATE TABLE course_offering (
offering_id int,
course_id int,
semester int,
section_number int,
start_time time,
end_time time,
monday varchar,
tuesday varchar,
wednesday varchar,
thursday varch... | Is it always Prof. Aghapi Mordovanakis or Prof. Pj Mcgann who teaches SAC 440 ? | SELECT COUNT(*) = 0 FROM course, course_offering, instructor, offering_instructor WHERE (NOT instructor.name LIKE '%Aghapi Mordovanakis%' AND NOT instructor.name LIKE '%Pj Mcgann%') AND course.course_id = course_offering.course_id AND course.department = 'SAC' AND course.number = 440 AND offering_instructor.instructor_... | advising |
CREATE TABLE table_56430 (
"Episode #" text,
"Title" text,
"Directed by" text,
"Written by" text,
"Original airdate" text
) | Who directed the episode 'Approaching Zero'? | SELECT "Directed by" FROM table_56430 WHERE "Title" = 'approaching zero' | wikisql |
CREATE TABLE table_70145 (
"Year" text,
"Starts" real,
"Cuts made" real,
"Wins" real,
"Top 10" real,
"Top 25" real,
"Earnings (\u20ac)" real,
"Money list rank" real
) | What is the sum of Top 10 performances that have more than 2 wins and is higher than number 16 in the Top 25? | SELECT SUM("Top 10") FROM table_70145 WHERE "Wins" > '2' AND "Top 25" < '16' | wikisql |
CREATE TABLE table_name_24 (
strain VARCHAR,
species VARCHAR
) | What is the Strain name of Species Thiomicrospira crunogena? | SELECT strain FROM table_name_24 WHERE species = "thiomicrospira crunogena" | sql_create_context |
CREATE TABLE table_31357 (
"Season" text,
"Division" text,
"League Apps" real,
"League Goals" real,
"FA Cup Apps" real,
"FA Cup Goals" real,
"Other Apps" real,
"Other Goals" real,
"Total Apps" real,
"Total Goals" real
) | How many league goals did Dunne have in the season where he had 2 league apps? | SELECT "League Goals" FROM table_31357 WHERE "League Apps" = '2' | wikisql |
CREATE TABLE table_name_53 (
game INTEGER,
score VARCHAR
) | What is the lowest game when the score is 102-104? | SELECT MIN(game) FROM table_name_53 WHERE score = "102-104" | sql_create_context |
CREATE TABLE table_42382 (
"Year" real,
"Competition" text,
"Venue" text,
"Position" text,
"Event" text
) | How many years was the 400 m event in the olympic games? | SELECT COUNT("Year") FROM table_42382 WHERE "Competition" = 'olympic games' AND "Event" = '400 m' | wikisql |
CREATE TABLE table_60579 (
"Year (Ceremony)" text,
"Original title" text,
"Film title used in nomination" text,
"Director" text,
"Result" text
) | What's the original title of the nomination title, 'brecha en el silencio'? | SELECT "Original title" FROM table_60579 WHERE "Film title used in nomination" = 'brecha en el silencio' | wikisql |
CREATE TABLE table_name_60 (
event VARCHAR,
games VARCHAR
) | What were the events in the 1976 Innsbruck Games? | SELECT event FROM table_name_60 WHERE games = "1976 innsbruck" | sql_create_context |
CREATE TABLE ReviewTasks (
Id number,
ReviewTaskTypeId number,
CreationDate time,
DeletionDate time,
ReviewTaskStateId number,
PostId number,
SuggestedEditId number,
CompletedByReviewTaskId number
)
CREATE TABLE Votes (
Id number,
PostId number,
VoteTypeId number,
UserId... | Number of Meta users with non-deleted posts in the last year. | SELECT COUNT(DISTINCT OwnerUserId) FROM Posts WHERE CreationDate > DATEADD(year, -1, GETDATE()) | sede |
CREATE TABLE table_name_12 (
to_par VARCHAR,
player VARCHAR
) | What is fuzzy zoeller's to par? | SELECT to_par FROM table_name_12 WHERE player = "fuzzy zoeller" | sql_create_context |
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,
... | 把患者59811387在医院9835816的住院就诊记录列出来,找其中入院科室名含有护理的 | 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 = '59811387' AND hz_info.YLJGDM = '9835816' AND wdmzjzjlb.JZKSMC LIKE '%护理%' UNION SELECT * FROM hz_info JOIN bdmzjzjlb ON hz_info.YLJGDM = bdmzjzjlb.YLJGDM AND hz_i... | css |
CREATE TABLE table_27383 (
"Language" text,
"Punata Municipality" real,
"Villa Rivero Municipality" real,
"San Benito Municipality" real,
"Tacachi Municipality" real,
"Cuchumuela Municipality" real
) | What is the language total number if the Tacachi Municipality is 3? | SELECT COUNT("Language") FROM table_27383 WHERE "Tacachi Municipality" = '3' | wikisql |
CREATE TABLE table_27450976_1 (
title VARCHAR,
production_code VARCHAR
) | What is the title of the episode with a production code of 2j5504? | SELECT title FROM table_27450976_1 WHERE production_code = "2J5504" | sql_create_context |
CREATE TABLE table_203_123 (
id number,
"year" number,
"title" text,
"b-side" text,
"mediums" text,
"label (catalog)" text
) | what title is listed next in the table after autumn beds ? | SELECT "title" FROM table_203_123 WHERE id = (SELECT id FROM table_203_123 WHERE "title" = '"autumn beds"') + 1 | squall |
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 ... | 查查27129454这个病患过往住院诊断证明 | SELECT wdmzjzjlb.ZYZDBM, wdmzjzjlb.ZYZDMC 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 = '27129454' UNION SELECT bdmzjzjlb.ZYZDBM, bdmzjzjlb.ZYZDMC FROM hz_info JOIN bdmzjzjlb ON hz_info.YLJGDM = bdmzjzjlb.YLJGDM AND hz... | css |
CREATE TABLE table_48017 (
"Res." text,
"Record" text,
"Opponent" text,
"Method" text,
"Event" text,
"Round" text
) | What round was the game against Cedric Marks? | SELECT "Round" FROM table_48017 WHERE "Opponent" = 'cedric marks' | wikisql |
CREATE TABLE diagnoses (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE lab (
subject_id text,
hadm_id text,
itemid text,
charttime text,
flag text,
value_unit text,
label text,
fluid text
)
CREATE TABLE demographic (... | Count the number of patients less than 47 years who had a urine fluid lab test. | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.age < "47" AND lab.fluid = "Urine" | mimicsql_data |
CREATE TABLE table_26074 (
"Round" text,
"Clubs remaining" real,
"Clubs involved" real,
"Winners from previous round" text,
"New entries this round" text,
"Leagues entering at this round" text
) | Which round had 24 new entries? | SELECT "Round" FROM table_26074 WHERE "New entries this round" = '24' | wikisql |
CREATE TABLE table_name_52 (
cuts_made INTEGER,
events VARCHAR,
top_5 VARCHAR,
top_10 VARCHAR
) | What is the most cuts made for events with 1 top-5, 2 top-10s, and more than 13 total events? | SELECT MAX(cuts_made) FROM table_name_52 WHERE top_5 = 1 AND top_10 = 2 AND events > 13 | sql_create_context |
CREATE TABLE diagnosis (
diagnosisid number,
patientunitstayid number,
diagnosisname text,
diagnosistime time,
icd9code text
)
CREATE TABLE medication (
medicationid number,
patientunitstayid number,
drugname text,
dosage text,
routeadmin text,
drugstarttime time,
drugst... | what is the total minimum cost of a hospital that includes a drug called naloxone 0.4 mg/ml inj soln since 1 year ago? | SELECT MIN(t1.c1) FROM (SELECT SUM(cost.cost) AS c1 FROM cost WHERE cost.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.patientunitstayid IN (SELECT medication.patientunitstayid FROM medication WHERE medication.drugname = 'naloxone 0.4 mg/ml inj soln')) AND DATETIME(co... | eicu |
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... | 根据不同的出院诊断疾病编码和科室编码,列出编码为0081088的医院所有医疗就诊记录中患者的平均年龄都是什么? | SELECT qtb.MED_ORG_DEPT_CD, qtb.OUT_DIAG_DIS_CD, AVG(qtb.PERSON_AGE) FROM qtb WHERE qtb.MED_SER_ORG_NO = '0081088' GROUP BY qtb.MED_ORG_DEPT_CD, qtb.OUT_DIAG_DIS_CD UNION SELECT gyb.MED_ORG_DEPT_CD, gyb.OUT_DIAG_DIS_CD, AVG(gyb.PERSON_AGE) FROM gyb WHERE gyb.MED_SER_ORG_NO = '0081088' GROUP BY gyb.MED_ORG_DEPT_CD, gyb.... | css |
CREATE TABLE broadcast (
channel_id VARCHAR,
time_of_day VARCHAR
)
CREATE TABLE channel (
name VARCHAR,
channel_id VARCHAR
) | Find the names of the channels that are broadcast in the morning. | SELECT t1.name FROM channel AS t1 JOIN broadcast AS t2 ON t1.channel_id = t2.channel_id WHERE t2.time_of_day = 'Morning' | sql_create_context |
CREATE TABLE table_6888 (
"Tournament" text,
"Wins" real,
"Top-5" real,
"Top-10" real,
"Top-25" real,
"Events" real,
"Cuts made" real
) | What was the sum of Events, when Wins were less than 1, when Top-25 was 3, and when Top-5 was less than 1? | SELECT SUM("Events") FROM table_6888 WHERE "Wins" < '1' AND "Top-25" = '3' AND "Top-5" < '1' | wikisql |
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 ... | Show a bar chart to show different names and credit scores of customers who have taken a loan, and I want to display cust_name in desc order. | SELECT cust_name, credit_score FROM customer AS T1 JOIN loan AS T2 ON T1.cust_ID = T2.cust_ID ORDER BY cust_name DESC | nvbench |
CREATE TABLE table_29765 (
"Stadium" text,
"City" text,
"Capacity" real,
"Matches played" real,
"Overall attendance" real,
"Average attendance per match" real,
"Average attendance as % of Capacity" text,
"Overall goals scored" real,
"Average goals scored per match" text,
"Elevati... | what is the average attendance per match wheree the elevation is 1500 m? | SELECT "Average attendance per match" FROM table_29765 WHERE "Elevation" = '1500 m' | wikisql |
CREATE TABLE mission (
Mission_ID int,
Ship_ID int,
Code text,
Launched_Year int,
Location text,
Speed_knots int,
Fate text
)
CREATE TABLE ship (
Ship_ID int,
Name text,
Type text,
Nationality text,
Tonnage int
) | Return a bar chart showing the total number of ships' nationalities, and list in desc by the total number. | SELECT Nationality, COUNT(Nationality) FROM ship GROUP BY Nationality ORDER BY COUNT(Nationality) 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... | 从08年9月20日开始15年10月18日结束参保人26631603的门诊手术费是多少钱? | SELECT SUM(t_kc22.AMOUNT) FROM gwyjzb JOIN t_kc22 ON gwyjzb.MED_CLINIC_ID = t_kc22.MED_CLINIC_ID WHERE gwyjzb.PERSON_ID = '26631603' AND gwyjzb.CLINIC_TYPE = '门诊' AND t_kc22.STA_DATE BETWEEN '2008-09-20' AND '2015-10-18' AND t_kc22.MED_INV_ITEM_TYPE = '手术费' UNION SELECT SUM(t_kc22.AMOUNT) FROM fgwyjzb JOIN t_kc22 ON fg... | css |
CREATE TABLE table_23285805_8 (
date VARCHAR,
location_attendance VARCHAR
) | On which datebis arco arena 17361 the location attendance? | SELECT date FROM table_23285805_8 WHERE location_attendance = "Arco Arena 17361" | sql_create_context |
CREATE TABLE icustays (
row_id number,
subject_id number,
hadm_id number,
icustay_id number,
first_careunit text,
last_careunit text,
first_wardid number,
last_wardid number,
intime time,
outtime time
)
CREATE TABLE prescriptions (
row_id number,
subject_id number,
h... | did patient 25216 get a diagnosis of atrial flutter since 6 years ago? | SELECT COUNT(*) > 0 FROM diagnoses_icd WHERE diagnoses_icd.icd9_code = (SELECT d_icd_diagnoses.icd9_code FROM d_icd_diagnoses WHERE d_icd_diagnoses.short_title = 'atrial flutter') AND diagnoses_icd.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 25216) AND DATETIME(diagnoses_icd.char... | mimic_iii |
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 mzjzjlb (
HXPLC number,
HZXM ... | 名字是鲁修齐的患者在号码是0966893的医院入院就诊期间有哪些名称包含换药的科室的住院门诊记录? | SELECT * FROM person_info JOIN hz_info JOIN zyjzjlb JOIN hz_info_zyjzjlb ON person_info.RYBH = hz_info.RYBH AND hz_info.YLJGDM = hz_info_zyjzjlb.YLJGDM AND hz_info.KH = zyjzjlb.KH AND hz_info.KLX = zyjzjlb.KLX AND hz_info_zyjzjlb.JZLSH = zyjzjlb.JZLSH AND hz_info_zyjzjlb.YLJGDM = hz_info_zyjzjlb.YLJGDM AND hz_info_zyjz... | 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,
... | 患者韩曼冬在2002年2月11日到2014年2月3日内都做了什么检验把检验结果指标记录中的仪器编号以及名称列出来 | SELECT jyjgzbb.YQBH, jyjgzbb.YQMC FROM person_info JOIN hz_info JOIN mzjzjlb JOIN jyjgzbb ON person_info.RYBH = hz_info.RYBH AND hz_info.YLJGDM = mzjzjlb.YLJGDM AND hz_info.KH = mzjzjlb.KH AND hz_info.KLX = mzjzjlb.KLX AND mzjzjlb.YLJGDM = jyjgzbb.jybgb_YLJGDM_MZJZJLB AND mzjzjlb.JZLSH = jyjgzbb.jybgb_JZLSH_MZJZJLB WHE... | css |
CREATE TABLE table_name_75 (
team__number1 VARCHAR
) | What is the 1st leg that has hapoel jerusalem? | SELECT 1 AS st_leg FROM table_name_75 WHERE team__number1 = "hapoel jerusalem" | sql_create_context |
CREATE TABLE table_203_270 (
id number,
"year" number,
"competition" text,
"venue" text,
"position" text,
"event" text,
"notes" text
) | how many consecutive years did pavel loskutov run in the joongang seoul marathon ? | SELECT COUNT("year") FROM table_203_270 WHERE "competition" = 'joongang seoul marathon' | squall |
CREATE TABLE table_55723 (
"Yard Name" text,
"Location (City, State)" text,
"1st Ship Delivery Date" text,
"Ship Types Delivered" text,
"Total Number of Ways" text
) | What types of ships were made at the Froemming Brothers ship yard? | SELECT "Ship Types Delivered" FROM table_55723 WHERE "Yard Name" = 'froemming brothers' | wikisql |
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... | what is the number of patients whose ethnicity is american indian/alaska native and year of birth is less than 2083? | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.ethnicity = "AMERICAN INDIAN/ALASKA NATIVE" AND demographic.dob_year < "2083" | mimicsql_data |
CREATE TABLE table_21801 (
"Year" real,
"Domestic freight" real,
"Domestic mail" real,
"International freight" real,
"International mail" real,
"Total freight and mail" real,
"Change" text
) | Name the number of international frieghts for domestic mail of 260 | SELECT COUNT("International freight") FROM table_21801 WHERE "Domestic mail" = '260' | wikisql |
CREATE TABLE table_28628309_8 (
player VARCHAR,
category VARCHAR
) | What is the name of the player when the category is listed as field goal percentage? | SELECT player FROM table_28628309_8 WHERE category = "Field goal percentage" | sql_create_context |
CREATE TABLE table_34406 (
"Round" real,
"Player" text,
"Position" text,
"Nationality" text,
"College/Junior/Club Team (League)" text
) | Which Position has a Nationality of canada, and a Player of pat janostin? | SELECT "Position" FROM table_34406 WHERE "Nationality" = 'canada' AND "Player" = 'pat janostin' | wikisql |
CREATE TABLE outputevents (
row_id number,
subject_id number,
hadm_id number,
icustay_id number,
charttime time,
itemid number,
value number
)
CREATE TABLE procedures_icd (
row_id number,
subject_id number,
hadm_id number,
icd9_code text,
charttime time
)
CREATE TABLE c... | what is the yearly maximum chloride, whole blood value for patient 1205? | SELECT MAX(labevents.valuenum) FROM labevents WHERE labevents.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 1205) AND labevents.itemid IN (SELECT d_labitems.itemid FROM d_labitems WHERE d_labitems.label = 'chloride, whole blood') GROUP BY STRFTIME('%y', labevents.charttime) | mimic_iii |
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
) | Return a bar chart on what is the total revenue of each manufacturer?, could you list Y-axis in descending order? | SELECT Name, SUM(Revenue) FROM Manufacturers GROUP BY Name ORDER BY SUM(Revenue) DESC | nvbench |
CREATE TABLE table_3875 (
"Game" real,
"Date" text,
"Team" text,
"Score" text,
"High points" text,
"High rebounds" text,
"High assists" text,
"Location Attendance" text,
"Record" text
) | How many games were played on october 16? | SELECT COUNT("High points") FROM table_3875 WHERE "Date" = 'October 16' | wikisql |
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 cost (
costid num... | when did patient 006-10390 enter the hospital for the first time this year? | SELECT patient.hospitaladmittime FROM patient WHERE patient.uniquepid = '006-10390' AND DATETIME(patient.hospitaladmittime, 'start of year') = DATETIME(CURRENT_TIME(), 'start of year', '-0 year') ORDER BY patient.hospitaladmittime LIMIT 1 | eicu |
CREATE TABLE table_21679 (
"Date" text,
"Opponent" text,
"Home / Away" text,
"Score" text,
"High points" text,
"High rebounds" text,
"High assists" text,
"Location/Attendance" text,
"Record" text
) | Name the date for score of 95-101 | SELECT "Date" FROM table_21679 WHERE "Score" = '95-101' | wikisql |
CREATE TABLE lab (
subject_id text,
hadm_id text,
itemid text,
charttime text,
flag text,
value_unit text,
label text,
fluid text
)
CREATE TABLE prescriptions (
subject_id text,
hadm_id text,
icustay_id text,
drug_type text,
drug text,
formulary_drug_cd text,
... | give me the number of patients whose age is less than 70 and procedure short title is arterial catheterization? | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.age < "70" AND procedures.short_title = "Arterial catheterization" | mimicsql_data |
CREATE TABLE airline (
airline_code varchar,
airline_name text,
note text
)
CREATE TABLE dual_carrier (
main_airline varchar,
low_flight_number int,
high_flight_number int,
dual_airline varchar,
service_name text
)
CREATE TABLE food_service (
meal_code text,
meal_number int,
... | show me flights from PITTSBURGH to PHILADELPHIA on wednesday morning | 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 (((flight.departure_time BETWEEN 0 AND 1200) AND date_day.day_number = 23 AND date_day.month_number = 4 AND date_day.year = 1991 AND days.day_nam... | atis |
CREATE TABLE table_751 (
"District" text,
"Incumbent" text,
"Party" text,
"First elected" real,
"Result" text,
"Candidates" text
) | What candidates were in the election when james patrick sutton was incumbent? | SELECT "Candidates" FROM table_751 WHERE "Incumbent" = 'James Patrick Sutton' | wikisql |
CREATE TABLE Votes (
Id number,
PostId number,
VoteTypeId number,
UserId number,
CreationDate time,
BountyAmount number
)
CREATE TABLE PostNoticeTypes (
Id number,
ClassId number,
Name text,
Body text,
IsHidden boolean,
Predefined boolean,
PostNoticeDurationId number... | select * from Posts where rand() <= .3. | SELECT * FROM Posts WHERE RAND() = 0.3 | sede |
CREATE TABLE table_17588 (
"Rank" real,
"Peak" text,
"Elevation (m)" real,
"Prominence (m)" real,
"Isolation (km)" real,
"Municipality" text,
"County" text
) | What is the number of rank of peak fresvikbreen? | SELECT COUNT("Rank") FROM table_17588 WHERE "Peak" = 'Fresvikbreen' | 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 mzjzjlb (
HXPLC number,
HZXM ... | 门诊诊断为疾病W44.704的病患的游离前列腺特异性抗原数值的平均值是多少最值是多少? | SELECT AVG(jyjgzbb.JCZBJGDL), MIN(jyjgzbb.JCZBJGDL), MAX(jyjgzbb.JCZBJGDL) FROM mzjzjlb JOIN jybgb JOIN jyjgzbb JOIN hz_info_mzjzjlb ON hz_info_mzjzjlb.YLJGDM = jybgb.YLJGDM_MZJZJLB AND mzjzjlb.JZLSH = jybgb.JZLSH_MZJZJLB AND jybgb.YLJGDM = jyjgzbb.YLJGDM AND jybgb.BGDH = jyjgzbb.BGDH AND hz_info_mzjzjlb.JZLSH = mzjzjl... | css |
CREATE TABLE table_20174050_24 (
format VARCHAR,
author VARCHAR
) | how many formats of books authored by day, martin martin day | SELECT COUNT(format) FROM table_20174050_24 WHERE author = "Day, Martin Martin Day" | sql_create_context |
CREATE TABLE inputevents_cv (
row_id number,
subject_id number,
hadm_id number,
icustay_id number,
charttime time,
itemid number,
amount number
)
CREATE TABLE d_items (
row_id number,
itemid number,
label text,
linksto text
)
CREATE TABLE d_icd_diagnoses (
row_id number... | since 2 years ago, patient 50286 has been diagnosed with acute kidney failure nos? | SELECT COUNT(*) > 0 FROM diagnoses_icd WHERE diagnoses_icd.icd9_code = (SELECT d_icd_diagnoses.icd9_code FROM d_icd_diagnoses WHERE d_icd_diagnoses.short_title = 'acute kidney failure nos') AND diagnoses_icd.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 50286) AND DATETIME(diagnose... | mimic_iii |
CREATE TABLE table_60957 (
"County" text,
"Per capita income" text,
"Median household income" text,
"Median family income" text,
"Population" real,
"Number of households" real
) | What is the median household income for Cape Girardeau? | SELECT "Median household income" FROM table_60957 WHERE "County" = 'cape girardeau' | wikisql |
CREATE TABLE train (
Train_ID int,
Name text,
Time text,
Service text
)
CREATE TABLE station (
Station_ID int,
Name text,
Annual_entry_exit real,
Annual_interchanges real,
Total_Passengers real,
Location text,
Main_Services text,
Number_of_Platforms int
)
CREATE TABLE t... | How many locations? Draw a bar chart. | SELECT Location, COUNT(Location) FROM station GROUP BY Location | nvbench |
CREATE TABLE Ref_Budget_Codes (
Budget_Type_Code CHAR(15),
Budget_Type_Description VARCHAR(255)
)
CREATE TABLE Ref_Document_Types (
Document_Type_Code CHAR(15),
Document_Type_Name VARCHAR(255),
Document_Type_Description VARCHAR(255)
)
CREATE TABLE Statements (
Statement_ID INTEGER,
Stateme... | Give me a histogram for how many documents are there of each type?, and rank from high to low by the bar. | SELECT Document_Type_Code, COUNT(*) FROM Documents GROUP BY Document_Type_Code ORDER BY Document_Type_Code DESC | nvbench |
CREATE TABLE table_1057316_1 (
operational_owner_s_ VARCHAR,
build_date VARCHAR
) | Who were the operational owners during the construction date of April 1892? | SELECT operational_owner_s_ FROM table_1057316_1 WHERE build_date = "April 1892" | sql_create_context |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.