context stringlengths 11 9.12k | question stringlengths 0 1.06k | SQL stringlengths 2 4.44k | source stringclasses 28
values |
|---|---|---|---|
CREATE TABLE table_1059743_2 (
rank VARCHAR,
points VARCHAR
) | How many countries got 796.7 points? | SELECT COUNT(rank) FROM table_1059743_2 WHERE points = "796.7" | sql_create_context |
CREATE TABLE table_19367 (
"Team" text,
"Average" text,
"Points" real,
"Played" real,
"1986-87" text,
"1987-88" text,
"1988-89" real
) | how many points did the team that scored 27 points in the 1987-88 season score? | SELECT COUNT("Played") FROM table_19367 WHERE "1987-88" = '27' | wikisql |
CREATE TABLE driver (
driver_id number,
name text,
party text,
home_city text,
age number
)
CREATE TABLE school (
school_id number,
grade text,
school text,
location text,
type text
)
CREATE TABLE school_bus (
school_id number,
driver_id number,
years_working number... | Show the school name and type for schools without a school bus. | SELECT school, type FROM school WHERE NOT school_id IN (SELECT school_id FROM school_bus) | spider |
CREATE TABLE table_14903881_1 (
womens_doubles VARCHAR,
mixed_doubles VARCHAR
) | Name the womens doubles when mixed doubles is potten ruth scott | SELECT womens_doubles FROM table_14903881_1 WHERE mixed_doubles = "Potten Ruth Scott" | sql_create_context |
CREATE TABLE table_test_31 (
"id" int,
"ejection_fraction_ef" int,
"macular_disease" bool,
"systemic" bool,
"alt" float,
"iud" bool,
"condom_with_spermicide" bool,
"gender" string,
"meropenem" bool,
"non_q_wave_myocardial_infarction" bool,
"hbcab" bool,
"unstable_angina" ... | patients with positive results of any of the following serological tests: human immunodeficiency virus ( hiv ) _ 1 antibody, hepatitis b virus ( hbv ) surface antigen ( hbsag ) , anti _ hepatitis b core antibody ( hbcab ) , and anti _ hepatitis c virus ( hcv ) antibody ( hcv ab ) . | SELECT * FROM table_test_31 WHERE serological_tests = 1 OR (hiv_infection = 1 OR hbv_surface_antigen_hbsag = 1 OR anti_hepatitis_b_core_antibody = 1 OR hbcab = 1 OR anti_hepatitis_c_virus_hcv_antibody = 1 OR hcv_ab = 1) | criteria2sql |
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... | what is the number of patients whose age is less than 55 and drug code is phyt1l? | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE demographic.age < "55" AND prescriptions.formulary_drug_cd = "PHYT1L" | mimicsql_data |
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... | 从一一年九月七日到一八年七月十七日,医疗机构6788679给患者51816664做过多少次检查 | SELECT COUNT(*) FROM t_kc21 JOIN t_kc22 ON t_kc21.MED_CLINIC_ID = t_kc22.MED_CLINIC_ID WHERE t_kc21.PERSON_ID = '51816664' AND t_kc22.STA_DATE BETWEEN '2011-09-07' AND '2018-07-17' AND t_kc21.MED_SER_ORG_NO = '6788679' AND t_kc22.MED_INV_ITEM_TYPE = '检查费' | css |
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... | 列出在2005-01-17到2018-07-17内患者许兰梦所有检验报告单中有哪些标本采集部位? | SELECT jybgb.BBCJBW FROM person_info JOIN hz_info JOIN mzjzjlb JOIN jybgb ON person_info.RYBH = hz_info.RYBH AND hz_info.YLJGDM = mzjzjlb.YLJGDM AND hz_info.KH = mzjzjlb.KH AND hz_info.KLX = mzjzjlb.KLX AND mzjzjlb.YLJGDM = jybgb.YLJGDM_MZJZJLB AND mzjzjlb.JZLSH = jybgb.JZLSH_MZJZJLB WHERE person_info.XM = '许兰梦' AND jy... | css |
CREATE TABLE transfers (
row_id number,
subject_id number,
hadm_id number,
icustay_id number,
eventtype text,
careunit text,
wardid number,
intime time,
outtime time
)
CREATE TABLE diagnoses_icd (
row_id number,
subject_id number,
hadm_id number,
icd9_code text,
... | what was the first time that the arterial bp [diastolic] of patient 7400 was, on 01/15/last year, greater than 83.0? | SELECT chartevents.charttime 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 = 7400)) AND chartevents.itemid IN (SELECT d_items.itemid FROM d_items WHERE d_items.label = 'arterial ... | mimic_iii |
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 text,
icustay_id text,
drug_type text,
drug text,
formulary_drug_cd text,
route text,
drug_dose text
)
... | how many patients whose ethnicity is white and procedure short title is sm bowel exteriorization? | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.ethnicity = "WHITE" AND procedures.short_title = "Sm bowel exteriorization" | mimicsql_data |
CREATE TABLE table_79586 (
"Year" real,
"Game" text,
"Genre" text,
"Platform" text,
"Publisher" text
) | Which Genre has a Game of donkey kong country? | SELECT "Genre" FROM table_79586 WHERE "Game" = 'donkey kong country' | wikisql |
CREATE TABLE table_name_73 (
outcome VARCHAR,
tournament VARCHAR
) | What is the Outcome of the jounieh tournament? | SELECT outcome FROM table_name_73 WHERE tournament = "jounieh" | sql_create_context |
CREATE TABLE regions (
REGION_ID decimal(5,0),
REGION_NAME varchar(25)
)
CREATE TABLE jobs (
JOB_ID varchar(10),
JOB_TITLE varchar(35),
MIN_SALARY decimal(6,0),
MAX_SALARY decimal(6,0)
)
CREATE TABLE locations (
LOCATION_ID decimal(4,0),
STREET_ADDRESS varchar(40),
POSTAL_CODE varc... | For those employees whose salary is in the range of 8000 and 12000 and commission is not null or department number does not equal to 40, return a bar chart about the distribution of hire_date and the sum of manager_id bin hire_date by time. | SELECT HIRE_DATE, SUM(MANAGER_ID) FROM employees WHERE SALARY BETWEEN 8000 AND 12000 AND COMMISSION_PCT <> "null" OR DEPARTMENT_ID <> 40 | nvbench |
CREATE TABLE medication (
medicationid number,
patientunitstayid number,
drugname text,
dosage text,
routeadmin text,
drugstarttime time,
drugstoptime time
)
CREATE TABLE treatment (
treatmentid number,
patientunitstayid number,
treatmentname text,
treatmenttime time
)
CREA... | tell me the top three most common output events that were until 1 year ago? | SELECT t1.celllabel FROM (SELECT intakeoutput.celllabel, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM intakeoutput WHERE intakeoutput.cellpath LIKE '%output%' AND DATETIME(intakeoutput.intakeoutputtime) <= DATETIME(CURRENT_TIME(), '-1 year') GROUP BY intakeoutput.celllabel) AS t1 WHERE t1.c1 <= 3 | eicu |
CREATE TABLE countries (
COUNTRY_ID varchar(2),
COUNTRY_NAME varchar(40),
REGION_ID decimal(10,0)
)
CREATE TABLE regions (
REGION_ID decimal(5,0),
REGION_NAME varchar(25)
)
CREATE TABLE job_history (
EMPLOYEE_ID decimal(6,0),
START_DATE date,
END_DATE date,
JOB_ID varchar(10),
... | Create a bar chart showing manager_id across last name, and show by the X-axis in ascending please. | SELECT LAST_NAME, MANAGER_ID FROM employees ORDER BY LAST_NAME | nvbench |
CREATE TABLE table_2260452_1 (
race_time VARCHAR,
team VARCHAR
) | If the team is Billy Ballew Motorsports, what is the race time? | SELECT race_time FROM table_2260452_1 WHERE team = "Billy Ballew Motorsports" | sql_create_context |
CREATE TABLE table_16538 (
"No. in series" real,
"No. in season" real,
"Title" text,
"Directed by" text,
"Written by" text,
"Original air date" text,
"U.S. viewers (millions)" text
) | How many millions of viewers watched the 'Throwing Heat' episode? | SELECT "U.S. viewers (millions)" FROM table_16538 WHERE "Title" = 'Throwing Heat' | wikisql |
CREATE TABLE chartevents (
row_id number,
subject_id number,
hadm_id number,
icustay_id number,
itemid number,
charttime time,
valuenum number,
valueuom text
)
CREATE TABLE d_labitems (
row_id number,
itemid number,
label text
)
CREATE TABLE microbiologyevents (
row_id ... | what were the four most most common specimen tests in 2101? | SELECT t1.spec_type_desc FROM (SELECT microbiologyevents.spec_type_desc, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM microbiologyevents WHERE STRFTIME('%y', microbiologyevents.charttime) = '2101' GROUP BY microbiologyevents.spec_type_desc) AS t1 WHERE t1.c1 <= 4 | mimic_iii |
CREATE TABLE game (
stadium_id int,
id int,
Season int,
Date text,
Home_team text,
Away_team text,
Score text,
Competition text
)
CREATE TABLE injury_accident (
game_id int,
id int,
Player text,
Injury text,
Number_of_matches text,
Source text
)
CREATE TABLE sta... | Bar chart x axis away team y axis the number of away team, sort by the bars in asc. | SELECT Away_team, COUNT(Away_team) FROM game GROUP BY Away_team ORDER BY Away_team | nvbench |
CREATE TABLE t_kc22 (
MED_EXP_DET_ID text,
OVERALL_CD_ORG text,
OVERALL_CD_PERSON text,
MED_CLINIC_ID text,
MED_EXP_BILL_ID text,
SOC_SRT_DIRE_CD text,
SOC_SRT_DIRE_NM text,
DIRE_TYPE number,
CHA_ITEM_LEV number,
MED_INV_ITEM_TYPE text,
MED_DIRE_CD text,
MED_DIRE_NM text,... | 蜜炼川贝枇杷膏在医疗就诊35017294126中所属的三大目录类别分别是什么? | SELECT DIRE_TYPE FROM t_kc22 WHERE MED_CLINIC_ID = '35017294126' AND SOC_SRT_DIRE_NM = '蜜炼川贝枇杷膏' | css |
CREATE TABLE grapes (
ID INTEGER,
Grape TEXT,
Color TEXT
)
CREATE TABLE wine (
No INTEGER,
Grape TEXT,
Winery TEXT,
Appelation TEXT,
State TEXT,
Name TEXT,
Year INTEGER,
Price INTEGER,
Score INTEGER,
Cases INTEGER,
Drink TEXT
)
CREATE TABLE appellations (
No... | What are the number of the wines that have prices lower than 50 and have appelations in Monterey county?, sort y-axis from high to low order please. | SELECT Name, COUNT(Name) FROM appellations AS T1 JOIN wine AS T2 ON T1.Appelation = T2.Appelation WHERE T1.County = "Monterey" AND T2.Price < 50 GROUP BY Name ORDER BY COUNT(Name) DESC | nvbench |
CREATE TABLE table_28834 (
"Rnd" real,
"Circuit" text,
"Lites 1 Race One Winning Team" text,
"Lites 2 Race One Winning Team" text,
"Lites 1 Race Two Winning Team" text,
"Lites 2 Race Two Winning Team" text
) | On which circuit was the lites race two winning team #13 Inspire Motorsports? | SELECT "Circuit" FROM table_28834 WHERE "Lites 1 Race Two Winning Team" = '#13 Inspire Motorsports' | wikisql |
CREATE TABLE market (
Market_ID int,
Country text,
Number_cities int
)
CREATE TABLE film (
Film_ID int,
Title text,
Studio text,
Director text,
Gross_in_dollar int
)
CREATE TABLE film_market_estimation (
Estimation_ID int,
Low_Estimate real,
High_Estimate real,
Film_ID ... | Return a scatter on what are the low and high estimates of film markets? | SELECT Low_Estimate, High_Estimate FROM film_market_estimation | nvbench |
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,
... | give me the number of patients whose primary disease is hemopytsis and days of hospital stay is greater than 3? | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.diagnosis = "HEMOPYTSIS" AND demographic.days_stay > "3" | mimicsql_data |
CREATE TABLE paperdataset (
paperid int,
datasetid int
)
CREATE TABLE keyphrase (
keyphraseid int,
keyphrasename varchar
)
CREATE TABLE cite (
citingpaperid int,
citedpaperid int
)
CREATE TABLE field (
fieldid int
)
CREATE TABLE writes (
paperid int,
authorid int
)
CREATE TABLE ... | what are commonly cited papers by tom mitchell and oren etzioni ? | SELECT DISTINCT author.authorname, cite.citedpaperid, COUNT(cite.citedpaperid) FROM author, cite, paper, writes WHERE author.authorname IN ('tom mitchell', 'oren etzioni') AND paper.paperid = cite.citedpaperid AND writes.authorid = author.authorid AND writes.paperid = paper.paperid GROUP BY cite.citedpaperid, author.au... | scholar |
CREATE TABLE locations (
LOCATION_ID decimal(4,0),
STREET_ADDRESS varchar(40),
POSTAL_CODE varchar(12),
CITY varchar(30),
STATE_PROVINCE varchar(25),
COUNTRY_ID varchar(2)
)
CREATE TABLE employees (
EMPLOYEE_ID decimal(6,0),
FIRST_NAME varchar(20),
LAST_NAME varchar(25),
EMAIL v... | For those employees whose salary is in the range of 8000 and 12000 and commission is not null or department number does not equal to 40, find job_id and the average of department_id , and group by attribute job_id, and visualize them by a bar chart. | SELECT JOB_ID, AVG(DEPARTMENT_ID) FROM employees WHERE SALARY BETWEEN 8000 AND 12000 AND COMMISSION_PCT <> "null" OR DEPARTMENT_ID <> 40 GROUP BY JOB_ID | nvbench |
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... | since 2103 how many patients were diagnosed with atrial fibrillation within 2 months after the diagnosis of need prphyl vc vrl hepat? | SELECT COUNT(DISTINCT t1.subject_id) FROM (SELECT admissions.subject_id, diagnoses_icd.charttime 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_icd_diagnoses WHERE d_icd_diagnoses.short_title = 'atrial fibrillatio... | mimic_iii |
CREATE TABLE table_58931 (
"Place" text,
"Player" text,
"Country" text,
"Score" text,
"To par" text
) | What place did the golfer take whose country is South Africa? | SELECT "Place" FROM table_58931 WHERE "Country" = 'south africa' | wikisql |
CREATE TABLE hz_info (
KH text,
KLX number,
RYBH text,
YLJGDM text
)
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,
... | 何阳夏患者的检验报告单对应的检验结果指标均异常有哪些?列出异常的检验报告单号都是哪些? | SELECT jybgb.BGDH FROM person_info JOIN hz_info JOIN mzjzjlb JOIN jybgb ON person_info.RYBH = hz_info.RYBH AND hz_info.YLJGDM = mzjzjlb.YLJGDM AND hz_info.KH = mzjzjlb.KH AND hz_info.KLX = mzjzjlb.KLX AND mzjzjlb.YLJGDM = jybgb.YLJGDM_MZJZJLB AND mzjzjlb.JZLSH = jybgb.JZLSH_MZJZJLB WHERE person_info.XM = '何阳夏' AND NOT ... | css |
CREATE TABLE film_actor (
actor_id number,
film_id number,
last_update time
)
CREATE TABLE inventory (
inventory_id number,
film_id number,
store_id number,
last_update time
)
CREATE TABLE city (
city_id number,
city text,
country_id number,
last_update time
)
CREATE TABLE... | Which customer, who has made at least one payment, has spent the least money? List his or her first name, last name, and the id. | SELECT T1.first_name, T1.last_name, T1.customer_id FROM customer AS T1 JOIN payment AS T2 ON T1.customer_id = T2.customer_id GROUP BY T1.customer_id ORDER BY SUM(amount) LIMIT 1 | spider |
CREATE TABLE table_11515 (
"Home team" text,
"Home team score" text,
"Away team" text,
"Away team score" text,
"Venue" text,
"Crowd" real,
"Date" text
) | In the game with the venue of mcg, what was the attendance? | SELECT "Crowd" FROM table_11515 WHERE "Venue" = 'mcg' | wikisql |
CREATE TABLE lab (
labid number,
patientunitstayid number,
labname text,
labresult number,
labresulttime time
)
CREATE TABLE intakeoutput (
intakeoutputid number,
patientunitstayid number,
cellpath text,
celllabel text,
cellvaluenumeric number,
intakeoutputtime time
)
CREAT... | what are the five most commonly ordered lab tests for patients with age 60 or above until 1 year ago? | SELECT t1.labname FROM (SELECT lab.labname, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM lab WHERE lab.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.age >= 60) AND DATETIME(lab.labresulttime) <= DATETIME(CURRENT_TIME(), '-1 year') GROUP BY lab.labname) AS t1 WHERE t1.c1 <= 5 | eicu |
CREATE TABLE building (
building_id text,
Name text,
Street_address text,
Years_as_tallest text,
Height_feet int,
Floors int
)
CREATE TABLE Institution (
Institution_id text,
Institution text,
Location text,
Founded real,
Type text,
Enrollment int,
Team text,
Pri... | Bar chart x axis type y axis total number of enrollment, and could you sort bars in asc order? | SELECT Type, SUM(Enrollment) FROM Institution GROUP BY Type ORDER BY Type | nvbench |
CREATE TABLE table_20746062_1 (
result VARCHAR,
record VARCHAR
) | What was the result of the game when they were 2-1? | SELECT result FROM table_20746062_1 WHERE record = "2-1" | sql_create_context |
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,
... | 这家号码是1054385的医院结算的医疗就诊记录里有哪些是在03年3月19号到08年5月29号期间非异地结算的? | SELECT * FROM t_kc21 WHERE t_kc21.MED_SER_ORG_NO = '1054385' AND t_kc21.IN_HOSP_DATE BETWEEN '2003-03-19' AND '2008-05-29' EXCEPT SELECT * FROM t_kc21 WHERE t_kc21.MED_SER_ORG_NO = '1054385' AND t_kc21.IN_HOSP_DATE BETWEEN '2003-03-19' AND '2008-05-29' AND t_kc21.REMOTE_SETTLE_FLG = '异地1' OR t_kc21.REMOTE_SETTLE_FLG = ... | css |
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,
... | how many patients whose age is less than 50 and lab test category is blood gas? | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.age < "50" AND lab."CATEGORY" = "Blood Gas" | mimicsql_data |
CREATE TABLE table_17746 (
"No." real,
"P" text,
"Name" text,
"Country" text,
"Age" real,
"Loan Club" text,
"Started" text,
"Ended" text,
"Start Source" text,
"End Source" text
) | What was the position (P) for Clapham? | SELECT "P" FROM table_17746 WHERE "Name" = 'Clapham' | wikisql |
CREATE TABLE table_13333 (
"Location" text,
"Year" real,
"Champion" text,
"Runner-up" text,
"Score" text,
"Name" text
) | What is the location for 2012? | SELECT "Location" FROM table_13333 WHERE "Year" = '2012' | wikisql |
CREATE TABLE CLASS (
CLASS_CODE varchar(5),
CRS_CODE varchar(10),
CLASS_SECTION varchar(2),
CLASS_TIME varchar(20),
CLASS_ROOM varchar(8),
PROF_NUM int
)
CREATE TABLE PROFESSOR (
EMP_NUM int,
DEPT_CODE varchar(10),
PROF_OFFICE varchar(50),
PROF_EXTENSION varchar(4),
PROF_HIG... | What is the total credit does each department offer. | SELECT DEPT_CODE, SUM(CRS_CREDIT) FROM COURSE GROUP BY DEPT_CODE | 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 procedures (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
... | what is the drug name and drug route of drug code nyst500t? | SELECT prescriptions.drug, prescriptions.route FROM prescriptions WHERE prescriptions.formulary_drug_cd = "NYST500T" | mimicsql_data |
CREATE TABLE table_name_43 (
bronze VARCHAR,
total VARCHAR,
rank VARCHAR
) | What is the total number of bronzes with totals under 4 and ranks of 10? | SELECT COUNT(bronze) FROM table_name_43 WHERE total < 4 AND rank = "10" | sql_create_context |
CREATE TABLE jyjgzbb (
BGDH text,
BGRQ time,
CKZFWDX text,
CKZFWSX number,
CKZFWXX number,
JCFF text,
JCRGH text,
JCRXM text,
JCXMMC text,
JCZBDM text,
JCZBJGDL number,
JCZBJGDW text,
JCZBJGDX text,
JCZBMC text,
JLDW text,
JYRQ time,
JYZBLSH text,
... | 在医院5241360中,病患鲁俊健在名中包括肾内的就诊科室的所有门诊就诊记录的流水号是什么 | SELECT mzjzjlb.JZLSH FROM person_info JOIN hz_info JOIN mzjzjlb JOIN hz_info_mzjzjlb ON person_info.RYBH = hz_info.RYBH AND hz_info.YLJGDM = hz_info_mzjzjlb.YLJGDM AND hz_info.KH = mzjzjlb.KH AND hz_info.KLX = mzjzjlb.KLX AND hz_info_mzjzjlb.JZLSH = mzjzjlb.JZLSH AND hz_info_mzjzjlb.YLJGDM = hz_info_mzjzjlb.YLJGDM AND ... | css |
CREATE TABLE table_18956 (
"Club" text,
"Played" text,
"Won" text,
"Drawn" text,
"Lost" text,
"Points for" text,
"Points against" text,
"Tries for" text,
"Points" text
) | What club has 536 points for? | SELECT "Club" FROM table_18956 WHERE "Points for" = '536' | wikisql |
CREATE TABLE table_53281 (
"Draw" real,
"Artist" text,
"Song" text,
"Points" real,
"Place" real
) | What song is later than place 2 and has a draw number of 1? | SELECT "Song" FROM table_53281 WHERE "Place" > '2' AND "Draw" = '1' | wikisql |
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... | Top users sorted by percentage of answers on closed questions. | SELECT Id AS "user_link", Reputation, (SELECT COUNT(*) FROM Posts WHERE OwnerUserId = Users.Id AND PostTypeId = 2) AS TotalAnswers, (SELECT COUNT(*) FROM Posts AS aPosts LEFT JOIN Posts AS qPosts ON qPosts.PostTypeId = 1 AND qPosts.Id = aPosts.ParentId WHERE aPosts.OwnerUserId = Users.Id AND aPosts.PostTypeId = 2 AND N... | sede |
CREATE TABLE table_40486 (
"Tournament" text,
"2004" text,
"2005" text,
"2006" text,
"2007" text
) | What is the 2005 that has a grand slam tournaments in 2007? | SELECT "2005" FROM table_40486 WHERE "2007" = 'grand slam tournaments' | wikisql |
CREATE TABLE table_12293 (
"Main contestant" text,
"Co-contestant (Yaar vs. Pyaar)" text,
"Date performed" text,
"Scores by each individual judge" text,
"Total score/week" text,
"Position" text,
"Status" text
) | What Scores by each individual judge has a Status of eliminated, and a Date performed of august 13? | SELECT "Scores by each individual judge" FROM table_12293 WHERE "Status" = 'eliminated' AND "Date performed" = 'august 13' | wikisql |
CREATE TABLE table_17102076_10 (
location_attendance VARCHAR,
score VARCHAR
) | Name the number of location attendance for l 141 143 (ot) | SELECT COUNT(location_attendance) FROM table_17102076_10 WHERE score = "L 141–143 (OT)" | sql_create_context |
CREATE TABLE t_kc24 (
ACCOUNT_DASH_DATE time,
ACCOUNT_DASH_FLG number,
CASH_PAY number,
CIVIL_SUBSIDY number,
CKC102 number,
CLINIC_ID text,
CLINIC_SLT_DATE time,
COMP_ID text,
COM_ACC_PAY number,
COM_PAY number,
DATA_ID text,
ENT_ACC_PAY number,
ENT_PAY number,
F... | 病人71927625购买的九味镇心颗粒都是在哪些医院买的? | SELECT t_kc21.MED_SER_ORG_NO FROM t_kc21 WHERE t_kc21.PERSON_ID = '71927625' AND t_kc21.MED_CLINIC_ID IN (SELECT t_kc21_t_kc22.MED_CLINIC_ID FROM t_kc22 WHERE t_kc22.SOC_SRT_DIRE_NM = '九味镇心颗粒') | css |
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,
... | count the number of patients whose diagnoses long title is other psoriasis? | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE diagnoses.long_title = "Other psoriasis" | mimicsql_data |
CREATE TABLE table_name_54 (
goals_conceded VARCHAR,
place VARCHAR,
played VARCHAR
) | If the place is smaller than 8 and they played more than 18, what is the total number of goals conceded? | SELECT COUNT(goals_conceded) FROM table_name_54 WHERE place < 8 AND played > 18 | sql_create_context |
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
)
... | What is the number of private insurance patients who have had red blood cells lab tests? | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.insurance = "Private" AND lab.label = "Red Blood Cells" | mimicsql_data |
CREATE TABLE hz_info (
KH text,
KLX number,
RYBH text,
YLJGDM text
)
CREATE TABLE hz_info_zyjzjlb (
JZLSH number,
YLJGDM number,
zyjzjlb_id number
)
CREATE TABLE mzjzjlb (
HXPLC number,
HZXM text,
JLSJ time,
JZJSSJ time,
JZKSBM text,
JZKSMC text,
JZKSRQ time,
... | 咱们医院的在00年4月27日到2000年12月12日内病人65980310的所有检验结果指标记录的检测人为韩乐音的检验指标流水号是多少号? | SELECT jyjgzbb.JYZBLSH 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... | css |
CREATE TABLE table_11447 (
"Date" text,
"Winning Team" text,
"Losing Team" text,
"Score" text,
"Venue" text
) | What is the date of the game at the Pro Player Stadium that had a score of 4-1? | SELECT "Date" FROM table_11447 WHERE "Venue" = 'pro player stadium' AND "Score" = '4-1' | wikisql |
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,
... | 列出患者花春雪被开出的所有药品的编码、名称、数量、单价、金额是多少,在2000-04-01到2018-05-25这十八年内? | SELECT t_kc22.SOC_SRT_DIRE_CD, t_kc22.SOC_SRT_DIRE_NM, t_kc22.QTY, t_kc22.UNIVALENT, t_kc22.AMOUNT FROM gwyjzb JOIN t_kc22 ON gwyjzb.MED_CLINIC_ID = t_kc22.MED_CLINIC_ID WHERE gwyjzb.PERSON_NM = '花春雪' AND gwyjzb.IN_HOSP_DATE BETWEEN '2000-04-01' AND '2018-05-25' UNION SELECT t_kc22.SOC_SRT_DIRE_CD, t_kc22.SOC_SRT_DIRE_... | css |
CREATE TABLE table_10006830_1 (
description VARCHAR,
aircraft VARCHAR
) | What if the description of a ch-47d chinook? | SELECT description FROM table_10006830_1 WHERE aircraft = "CH-47D Chinook" | sql_create_context |
CREATE TABLE table_17621978_11 (
series VARCHAR,
date VARCHAR
) | Name the total number of series for april 26 | SELECT COUNT(series) FROM table_17621978_11 WHERE date = "April 26" | sql_create_context |
CREATE TABLE table_name_1 (
bronze INTEGER,
rank VARCHAR,
total VARCHAR
) | What is the average Bronze for rank 3 and total is more than 8? | SELECT AVG(bronze) FROM table_name_1 WHERE rank = "3" AND total > 8 | sql_create_context |
CREATE TABLE pilot (
Name VARCHAR,
Age VARCHAR
) | What are the name of pilots aged 25 or older? | SELECT Name FROM pilot WHERE Age >= 25 | sql_create_context |
CREATE TABLE table_9564 (
"Place" text,
"Player" text,
"Country" text,
"Score" text,
"To par" text
) | Which Place has a Player of lee trevino? | SELECT "Place" FROM table_9564 WHERE "Player" = 'lee trevino' | wikisql |
CREATE TABLE table_12792876_2 (
lost VARCHAR,
points_against VARCHAR
) | How many loses corresponded to giving up 714 points? | SELECT lost FROM table_12792876_2 WHERE points_against = "714" | sql_create_context |
CREATE TABLE table_name_18 (
fastest_lap VARCHAR,
round VARCHAR
) | I want the fastest lap for round of 16 | SELECT fastest_lap FROM table_name_18 WHERE round = 16 | sql_create_context |
CREATE TABLE table_7840 (
"Rank" real,
"Title" text,
"Studio" text,
"Director" text,
"Gross" text
) | WHAT IS THE GROSS WITH A DIRECTOR OF RICHARD TUGGLE? | SELECT "Gross" FROM table_7840 WHERE "Director" = 'richard tuggle' | wikisql |
CREATE TABLE table_45944 (
"Ethnicity" text,
"Islam" text,
"Christianity" text,
"Judaism" text,
"Buddhism" text,
"Other" text,
"Atheism" text
) | What is the Judaism percentage associated with Buddhism at 0.01% and Other at 0.13%? | SELECT "Judaism" FROM table_45944 WHERE "Other" = '0.13%' AND "Buddhism" = '0.01%' | wikisql |
CREATE TABLE table_name_33 (
total VARCHAR,
slalom_points VARCHAR
) | What are the total points for the skier with 3.18 slalom points? | SELECT total FROM table_name_33 WHERE slalom_points = "3.18" | 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... | Visualize a bar chart about the distribution of All_Home and School_ID , and group by attribute ACC_Road, order in asc by the y axis. | SELECT All_Home, School_ID FROM basketball_match GROUP BY ACC_Road, All_Home ORDER BY School_ID | nvbench |
CREATE TABLE table_8951 (
"Pick #" real,
"CFL Team" text,
"Player" text,
"Position" text,
"College" text
) | Can you tell me the Position that has the CFL Team of toronto? | SELECT "Position" FROM table_8951 WHERE "CFL Team" = 'toronto' | 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 diagnoses (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE prescriptions... | Calculate the number of patients with episodic mood disord nos, born before 1837. | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE demographic.dob_year < "1837" AND diagnoses.short_title = "Episodic mood disord NOS" | mimicsql_data |
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 demographic (
subject_id text,
hadm_id t... | what is insurance of subject name jerry deberry? | SELECT demographic.insurance FROM demographic WHERE demographic.name = "Jerry Deberry" | mimicsql_data |
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... | what is discharge location of subject name jerry deberry? | SELECT demographic.discharge_location FROM demographic WHERE demographic.name = "Jerry Deberry" | mimicsql_data |
CREATE TABLE table_73791 (
"Number" real,
"Name" text,
"Games Played" real,
"Games Started" real,
"Goals" real,
"Assists" real,
"Points" real,
"Shots" real
) | How many games played catagories are there for Lauren McGee? | SELECT COUNT("Games Played") FROM table_73791 WHERE "Name" = 'Lauren McGee' | wikisql |
CREATE TABLE table_66636 (
"Draw" real,
"Artist" text,
"Song" text,
"Percentage" text,
"Place" real
) | What is the average draws for the song 'Europe is My Home!'? | SELECT AVG("Draw") FROM table_66636 WHERE "Song" = 'europe is my home!' | wikisql |
CREATE TABLE table_203_109 (
id number,
"treaty" text,
"organization" text,
"introduced" number,
"signed" number,
"ratified" number
) | how many treaties had been introduced by 1986 ? | SELECT COUNT("treaty") FROM table_203_109 WHERE "ratified" >= 1986 | squall |
CREATE TABLE procedures (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE lab (
subject_id text,
hadm_id text,
itemid text,
charttime text,
flag text,
value_unit text,
label text,
fluid text
)
CREATE TABLE demographic ... | provide the number of patients whose ethnicity is white and diagnoses short title is hyperlipidemia nec/nos? | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE demographic.ethnicity = "WHITE" AND diagnoses.short_title = "Hyperlipidemia NEC/NOS" | mimicsql_data |
CREATE TABLE table_name_96 (
years_for_grizzlies VARCHAR,
position VARCHAR,
school_club_team VARCHAR
) | Which years did the player from Providence play for the Grizzlies as small forward? | SELECT years_for_grizzlies FROM table_name_96 WHERE position = "small forward" AND school_club_team = "providence" | sql_create_context |
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... | 门诊就诊58644015598有几份检验报告单 | SELECT COUNT(*) FROM zyjybgb WHERE zyjybgb.JZLSH = '58644015598' UNION SELECT COUNT(*) FROM mzjybgb WHERE mzjybgb.JZLSH = '58644015598' | css |
CREATE TABLE table_name_67 (
player VARCHAR,
country VARCHAR,
place VARCHAR,
score VARCHAR
) | Who is the player from the United States with a t6 place and a 71-70-76-72=289 score? | SELECT player FROM table_name_67 WHERE country = "united states" AND place = "t6" AND score = 71 - 70 - 76 - 72 = 289 | sql_create_context |
CREATE TABLE restriction (
restriction_code text,
advance_purchase int,
stopovers text,
saturday_stay_required text,
minimum_stay int,
maximum_stay int,
application text,
no_discounts text
)
CREATE TABLE aircraft (
aircraft_code varchar,
aircraft_description varchar,
manufac... | find a flight from SAN FRANCISCO to BOSTON on wednesday | SELECT DISTINCT flight.flight_id FROM airport_service AS AIRPORT_SERVICE_0, airport_service AS AIRPORT_SERVICE_1, city AS CITY_0, city AS CITY_1, date_day, days, flight WHERE (CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'BOSTON' AND date_day.day_number = 23 AND date_day.month_number = 4 AND da... | atis |
CREATE TABLE departments (
DEPARTMENT_ID decimal(4,0),
DEPARTMENT_NAME varchar(30),
MANAGER_ID decimal(6,0),
LOCATION_ID decimal(4,0)
)
CREATE TABLE employees (
EMPLOYEE_ID decimal(6,0),
FIRST_NAME varchar(20),
LAST_NAME varchar(25),
EMAIL varchar(25),
PHONE_NUMBER varchar(20),
... | Draw a bar chart of first name versus manager_id, and list bar from high to low order. | SELECT FIRST_NAME, MANAGER_ID FROM employees ORDER BY FIRST_NAME DESC | nvbench |
CREATE TABLE table_name_23 (
location VARCHAR,
name VARCHAR
) | Where is pine valley? | SELECT location FROM table_name_23 WHERE name = "pine valley" | sql_create_context |
CREATE TABLE table_66107 (
"School (IHSAA ID#)" text,
"Location" text,
"Mascot" text,
"# / County" text,
"Year Joined" real,
"Year Left" real,
"Conference Joined" text
) | Which conference joined in 1954 with a beavers mascot? | SELECT "Conference Joined" FROM table_66107 WHERE "Year Joined" = '1954' AND "Mascot" = 'beavers' | 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... | give me the number of patients whose diagnoses long title is benign neoplasm of spinal meninges and drug type is base? | 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 = "Benign neoplasm of spinal meninges" AND prescriptions.drug_type = "BASE" | mimicsql_data |
CREATE TABLE lab (
labid number,
patientunitstayid number,
labname text,
labresult number,
labresulttime time
)
CREATE TABLE microlab (
microlabid number,
patientunitstayid number,
culturesite text,
organism text,
culturetakentime time
)
CREATE TABLE medication (
medication... | for the first time in this month, when was patient 022-187132 prescribed ondansetron 4 mg po tbdp and famotidine 20 mg po tabs at the same time? | SELECT t1.drugstarttime FROM (SELECT patient.uniquepid, medication.drugstarttime FROM medication JOIN patient ON medication.patientunitstayid = patient.patientunitstayid WHERE medication.drugname = 'ondansetron 4 mg po tbdp' AND patient.uniquepid = '022-187132' AND DATETIME(medication.drugstarttime, 'start of month') =... | eicu |
CREATE TABLE lab (
labid number,
patientunitstayid number,
labname text,
labresult number,
labresulttime time
)
CREATE TABLE patient (
uniquepid text,
patienthealthsystemstayid number,
patientunitstayid number,
gender text,
age text,
ethnicity text,
hospitalid number,
... | count the number of patients who had a vte prophylaxis - low molecular weight heparin within the same hospital visit after having been diagnosed with hyponatremia until 2100. | SELECT COUNT(DISTINCT t1.uniquepid) FROM (SELECT patient.uniquepid, diagnosis.diagnosistime, patient.patienthealthsystemstayid FROM diagnosis JOIN patient ON diagnosis.patientunitstayid = patient.patientunitstayid WHERE diagnosis.diagnosisname = 'hyponatremia' AND STRFTIME('%y', diagnosis.diagnosistime) <= '2100') AS t... | eicu |
CREATE TABLE table_53825 (
"Date" text,
"Tournament" text,
"Winning score" text,
"Margin of victory" text,
"Runner(s)-up" text
) | What was the Winning score when the Margin of victory is 5 strokes and the Date was 6 Sep 2009? | SELECT "Winning score" FROM table_53825 WHERE "Margin of victory" = '5 strokes' AND "Date" = '6 sep 2009' | wikisql |
CREATE TABLE table_name_99 (
state VARCHAR,
council_votes INTEGER
) | Which country has less than 4 votes? | SELECT state FROM table_name_99 WHERE council_votes < 4 | sql_create_context |
CREATE TABLE patient (
uniquepid text,
patienthealthsystemstayid number,
patientunitstayid number,
gender text,
age text,
ethnicity text,
hospitalid number,
wardid number,
admissionheight number,
admissionweight number,
dischargeweight number,
hospitaladmittime time,
... | what was the first type of the hospital admission of patient 025-23610 until 2 years ago? | SELECT patient.hospitaladmitsource FROM patient WHERE patient.uniquepid = '025-23610' AND DATETIME(patient.hospitaladmittime) <= DATETIME(CURRENT_TIME(), '-2 year') ORDER BY patient.hospitaladmittime LIMIT 1 | eicu |
CREATE TABLE table_61467 (
"Date" text,
"Venue" text,
"Score" text,
"Result" text,
"Competition" text
) | What score has friendly as the competition? | SELECT "Score" FROM table_61467 WHERE "Competition" = 'friendly' | wikisql |
CREATE TABLE PostHistoryTypes (
Id number,
Name text
)
CREATE TABLE CloseReasonTypes (
Id number,
Name text,
Description text
)
CREATE TABLE PostTags (
PostId number,
TagId number
)
CREATE TABLE Tags (
Id number,
TagName text,
Count number,
ExcerptPostId number,
WikiPo... | Interesting questions, per comments on them. | SELECT Id AS "comment_link" FROM Comments WHERE (LOWER(Text) LIKE 'interesting question%' OR LOWER(Text) LIKE 'an interesting question%') AND LENGTH(Text) <= 25 ORDER BY CreationDate DESC | sede |
CREATE TABLE airline (
airline_code varchar,
airline_name text,
note text
)
CREATE TABLE aircraft (
aircraft_code varchar,
aircraft_description varchar,
manufacturer varchar,
basic_type varchar,
engines int,
propulsion varchar,
wide_body varchar,
wing_span int,
length in... | flights from BALTIMORE to SAN FRANCISCO | SELECT DISTINCT flight.flight_id FROM airport_service AS AIRPORT_SERVICE_0, airport_service AS AIRPORT_SERVICE_1, city AS CITY_0, city AS CITY_1, flight WHERE CITY_0.city_code = AIRPORT_SERVICE_0.city_code AND CITY_0.city_name = 'BALTIMORE' AND CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'SAN ... | atis |
CREATE TABLE ReviewTaskTypes (
Id number,
Name text,
Description text
)
CREATE TABLE PendingFlags (
Id number,
FlagTypeId number,
PostId number,
CreationDate time,
CloseReasonTypeId number,
CloseAsOffTopicReasonTypeId number,
DuplicateOfQuestionId number,
BelongsOnBaseHostAd... | SO Users with Gold Badges Related to a Given Tag. Does what it says on the tin. Enter a valid Tag, and if there is anyone with a Gold badge for that tag, get all the available info for them. Change:
WHERE UPPER(b.name) LIKE UPPER('%' + ##Tag:string## + '%') AND b.TagBased = 1 AND b.Class = 1
to
WHERE UPPER(b.n... | SELECT * FROM Badges WHERE TagBased = 1 | sede |
CREATE TABLE table_2818164_7 (
title VARCHAR,
no_in_series VARCHAR
) | Which title has 147 as no. in series? | SELECT title FROM table_2818164_7 WHERE no_in_series = 147 | 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... | did the value of mcv of patient 002-41152 last measured on the last hospital visit be greater than first measured on the last hospital visit? | SELECT (SELECT lab.labresult FROM lab WHERE lab.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '002-41152' AND NOT patient.hospitaldischargetime IS NULL ORDER BY patient.hospi... | eicu |
CREATE TABLE table_11222744_2 (
studio VARCHAR,
catalog_number VARCHAR
) | where catalog number is 81258 , what are all the studio ? | SELECT studio FROM table_11222744_2 WHERE catalog_number = "81258" | sql_create_context |
CREATE TABLE table_42463 (
"Country" text,
"Date" text,
"Label" text,
"Format" text,
"Catalog" text
) | What date is the release when the label was Parlophone and the catalog was 582 2912? | SELECT "Date" FROM table_42463 WHERE "Label" = 'parlophone' AND "Catalog" = '582 2912' | wikisql |
CREATE TABLE table_name_19 (
losses INTEGER,
points VARCHAR,
wins VARCHAR,
position VARCHAR
) | What is the most losses for teams with under 2 wins, more than 6 points, and a position under 11? | SELECT MAX(losses) FROM table_name_19 WHERE wins < 2 AND position < 11 AND points > 6 | sql_create_context |
CREATE TABLE table_204_828 (
id number,
"whitworth size (in)" number,
"core diameter (in)" number,
"threads per inch" number,
"pitch (in)" number,
"tapping drill size" text
) | does any whitworth size have the same core diameter as the number drill 26 ? | SELECT "whitworth size (in)" FROM table_204_828 WHERE "tapping drill size" = 'number drill 26 (3.7 mm)' | squall |
CREATE TABLE table_61125 (
"Place" text,
"Player" text,
"Country" text,
"Score" text,
"To par" text
) | Which player is from Northern Ireland? | SELECT "Player" FROM table_61125 WHERE "Country" = 'northern ireland' | wikisql |
CREATE TABLE t_kc21_t_kc24 (
MED_CLINIC_ID text,
MED_SAFE_PAY_ID number
)
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,
... | 编号10110310的参保人自04.7.21起,到08.6.22止,所有开出的药品中,单一药品最大购买次数有多少次 | SELECT COUNT(*) FROM t_kc21 JOIN t_kc22 ON t_kc21.MED_CLINIC_ID = t_kc22.MED_CLINIC_ID WHERE t_kc21.PERSON_ID = '10110310' AND t_kc22.STA_DATE BETWEEN '2004-07-21' AND '2008-06-22' GROUP BY t_kc22.SOC_SRT_DIRE_CD ORDER BY COUNT(*) DESC LIMIT 1 | 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 wdmzjzjlb (
HXPLC number,
HZX... | 哪个人门诊就诊中开出的检验报告单21844290233 | SELECT person_info.XM FROM person_info JOIN hz_info JOIN wdmzjzjlb JOIN jybgb ON person_info.RYBH = hz_info.RYBH AND hz_info.YLJGDM = wdmzjzjlb.YLJGDM AND hz_info.KH = wdmzjzjlb.KH AND hz_info.KLX = wdmzjzjlb.KLX AND wdmzjzjlb.YLJGDM = jybgb.YLJGDM_MZJZJLB AND wdmzjzjlb.JZLSH = jybgb.JZLSH_MZJZJLB WHERE jybgb.BGDH = '2... | css |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.