context stringlengths 11 9.12k | question stringlengths 0 1.06k | SQL stringlengths 2 4.44k | source stringclasses 28
values |
|---|---|---|---|
CREATE TABLE table_name_54 (
airdate VARCHAR,
length VARCHAR
) | The length of 30 minutes aired on what date? | SELECT airdate FROM table_name_54 WHERE length = "30 minutes" | sql_create_context |
CREATE TABLE table_67876 (
"Year" real,
"Venue" text,
"Winner" text,
"Runner-Up" text,
"Third" text
) | What was the venue when Ben Barker finished third? | SELECT "Venue" FROM table_67876 WHERE "Third" = 'ben barker' | wikisql |
CREATE TABLE prereq (
course_id varchar(8),
prereq_id varchar(8)
)
CREATE TABLE advisor (
s_ID varchar(5),
i_ID varchar(5)
)
CREATE TABLE instructor (
ID varchar(5),
name varchar(20),
dept_name varchar(20),
salary numeric(8,2)
)
CREATE TABLE takes (
ID varchar(5),
course_id va... | A bar chart shows the distribution of dept_name and the amount of dept_name , and group by attribute dept_name. | SELECT dept_name, COUNT(dept_name) FROM instructor GROUP BY dept_name ORDER BY salary | nvbench |
CREATE TABLE zyjzjlb (
YLJGDM text,
JZLSH text,
MZJZLSH text,
KH text,
KLX number,
HZXM text,
WDBZ number,
RYDJSJ time,
RYTJDM number,
RYTJMC text,
JZKSDM text,
JZKSMC text,
RZBQDM text,
RZBQMC text,
RYCWH text,
CYKSDM text,
CYKSMC text,
CYBQDM tex... | 列出医院1827360开出的检验报告单中,在2003-03-10到2010-02-09内不同检测指标名称以及不同检测指标结果定量单位下,检测指标结果定量的平均值是多少,保留平均值最大的22项? | SELECT JCZBMC, JCZBJGDW, AVG(JCZBJGDL) FROM jyjgzbb WHERE YLJGDM = '1827360' AND BGRQ BETWEEN '2003-03-10' AND '2010-02-09' GROUP BY JCZBMC, JCZBJGDW ORDER BY AVG(JCZBJGDL) DESC LIMIT 22 | 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... | count the number of patients whose age is less than 43 and procedure long title is replacement of tube or enterostomy device of small intestine? | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.age < "43" AND procedures.long_title = "Replacement of tube or enterostomy device of small intestine" | mimicsql_data |
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,
... | provide the number of widow patients who are diagnosed with unspecified systolic heart failure. | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE demographic.marital_status = "WIDOWED" AND diagnoses.short_title = "Systolic hrt failure NOS" | mimicsql_data |
CREATE TABLE table_59652 (
"Name" text,
"Years" text,
"Wins" real,
"Losses" real,
"Ties" real,
"Pct." real
) | Which Pct has Years of 1957 1970, and Wins smaller than 78? | SELECT SUM("Pct.") FROM table_59652 WHERE "Years" = '1957–1970' AND "Wins" < '78' | wikisql |
CREATE TABLE table_14960574_6 (
italian_voice_actor VARCHAR,
german_voice_actor VARCHAR
) | Name the italian voice actor for dirk fenselau | SELECT italian_voice_actor FROM table_14960574_6 WHERE german_voice_actor = "Dirk Fenselau" | sql_create_context |
CREATE TABLE person_info_hz_info (
RYBH text,
KH number,
KLX number,
YLJGDM number
)
CREATE TABLE hz_info (
KH text,
KLX number,
YLJGDM text
)
CREATE TABLE jyjgzbb (
BGDH text,
BGRQ time,
CKZFWDX text,
CKZFWSX number,
CKZFWXX number,
JCFF text,
JCRGH text,
J... | 查询病人54632164在医院1907633的门诊诊断信息中不存在牙龈二字的门诊就诊记录详情 | SELECT * FROM hz_info JOIN mzjzjlb 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 person_info_hz_info.KH = hz_info.KH AND person_info_hz_info.KLX = hz_info.KLX AND person_info_hz_info.YLJGDM = hz_info.YLJGDM AND person_info_hz_i... | css |
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 are the three most commonly prescribed drugs for patients who were also prescribed atorvastatin calcium 40 mg po tabs at the same time in 2103? | SELECT t3.drugname FROM (SELECT t2.drugname, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM (SELECT patient.uniquepid, medication.drugstarttime FROM medication JOIN patient ON medication.patientunitstayid = patient.patientunitstayid WHERE medication.drugname = 'atorvastatin calcium 40 mg po tabs' AND STRFTIME('%... | eicu |
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... | 门诊给患者98667689诊断为疾病X64.071,那他的罗马指数(绝经前)的结果定量及单位是什么 | SELECT jyjgzbb.JCZBJGDL, jyjgzbb.JCZBJGDW FROM hz_info JOIN mzjzjlb JOIN jybgb JOIN jyjgzbb JOIN hz_info_mzjzjlb ON hz_info.YLJGDM = hz_info_mzjzjlb.YLJGDM AND hz_info.KH = mzjzjlb.KH AND hz_info.KLX = mzjzjlb.KLX AND hz_info_mzjzjlb.YLJGDM = jybgb.YLJGDM_MZJZJLB AND mzjzjlb.JZLSH = jybgb.JZLSH_MZJZJLB AND jybgb.YLJGDM... | css |
CREATE TABLE table_60910 (
"Season" real,
"Years" text,
"Final Standing" real,
"Points" real,
"Top Goal Scorer" text
) | What is the highest points when the top goal scorer was Khaled Msakni (10), and the final standing is less than 12? | SELECT MAX("Points") FROM table_60910 WHERE "Top Goal Scorer" = 'khaled msakni (10)' AND "Final Standing" < '12' | wikisql |
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 countries (
COUNTRY_ID varchar(2),
COUNTRY_NAME varchar(40),
REGION_ID decimal(10,0)
)
CREATE T... | For those employees who did not have any job in the past, give me the comparison about the amount of job_id over the job_id , and group by attribute job_id by a bar chart. | SELECT JOB_ID, COUNT(JOB_ID) FROM employees WHERE NOT EMPLOYEE_ID IN (SELECT EMPLOYEE_ID FROM job_history) GROUP BY JOB_ID | nvbench |
CREATE TABLE table_5424 (
"Week" real,
"Date" text,
"Opponent" text,
"Result" text,
"Record" text,
"Game Site" text,
"Attendance" real
) | On what date was the game in Week 9 played? | SELECT "Date" FROM table_5424 WHERE "Week" = '9' | wikisql |
CREATE TABLE table_name_95 (
round VARCHAR,
school_club_team VARCHAR,
overall VARCHAR
) | What is the sum of all rounds where a Tennessee State player with an overall rank less than 261 was drafted? | SELECT COUNT(round) FROM table_name_95 WHERE school_club_team = "tennessee state" AND overall < 261 | sql_create_context |
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,
... | 算算医院9301014全部诊疗记录中不同科室统筹基金的开销和全部医疗费用的平均比值 | SELECT gwyjzb.MED_ORG_DEPT_NM, AVG(t_kc24.OVE_PAY) FROM gwyjzb JOIN t_kc24 ON gwyjzb.MED_CLINIC_ID = t_kc24.MED_CLINIC_ID WHERE gwyjzb.MED_SER_ORG_NO = '9301014' GROUP BY gwyjzb.MED_ORG_DEPT_NM UNION SELECT fgwyjzb.MED_ORG_DEPT_NM, AVG(t_kc24.OVE_PAY) FROM fgwyjzb JOIN t_kc24 ON fgwyjzb.MED_CLINIC_ID = t_kc24.MED_CLINI... | 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... | 列出病人王阳焱从0七年八月二十一日起,至0九年一月二日止的所有检验结果指标记录中的检测方法 | SELECT jyjgzbb.JCFF FROM person_info JOIN hz_info JOIN mzjzjlb JOIN jybgb JOIN jyjgzbb JOIN person_info_hz_info ON person_info.RYBH = person_info_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... | css |
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,
... | what is the number of patients whose death status is 1 and diagnoses long title is asthma, unspecified type, unspecified? | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE demographic.expire_flag = "1" AND diagnoses.long_title = "Asthma, unspecified type, unspecified" | mimicsql_data |
CREATE TABLE SuggestedEdits (
Id number,
PostId number,
CreationDate time,
ApprovalDate time,
RejectionDate time,
OwnerUserId number,
Comment text,
Text text,
Title text,
Tags text,
RevisionGUID other
)
CREATE TABLE PostFeedback (
Id number,
PostId number,
IsAnon... | Search comments by comment text. | SELECT COUNT(CASE WHEN p.Score <= -1 THEN 1 END) AS negative, COUNT(CASE WHEN p.Score = 0 THEN 1 END) AS zero, COUNT(CASE WHEN p.Score >= 1 THEN 1 END) AS positive FROM Posts AS p JOIN Comments AS c ON (p.Id = c.PostId) WHERE UPPER(c.Text) LIKE UPPER('%sobreviv ncia%') AND NOT p.ClosedDate IS NULL | sede |
CREATE TABLE route (
train_id int,
station_id int
)
CREATE TABLE train (
id int,
train_number int,
name text,
origin text,
destination text,
time text,
interval text
)
CREATE TABLE weekly_weather (
station_id int,
day_of_week text,
high_temperature int,
low_temperat... | Bar chart of how many local authority from each local authority, and could you order names in descending order? | SELECT local_authority, COUNT(local_authority) FROM station GROUP BY local_authority ORDER BY local_authority DESC | nvbench |
CREATE TABLE outputevents (
row_id number,
subject_id number,
hadm_id number,
icustay_id number,
charttime time,
itemid number,
value number
)
CREATE TABLE microbiologyevents (
row_id number,
subject_id number,
hadm_id number,
charttime time,
spec_type_desc text,
org... | what was the last dose of cinacalcet in 05/this year, prescribed to patient 5658? | SELECT prescriptions.dose_val_rx FROM prescriptions WHERE prescriptions.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 5658) AND prescriptions.drug = 'cinacalcet' AND DATETIME(prescriptions.startdate, 'start of year') = DATETIME(CURRENT_TIME(), 'start of year', '-0 year') AND STRFTI... | mimic_iii |
CREATE TABLE aircraft (
aid number,
name text,
distance number
)
CREATE TABLE employee (
eid number,
name text,
salary number
)
CREATE TABLE flight (
flno number,
origin text,
destination text,
distance number,
departure_date time,
arrival_date time,
price number,
... | What are the aircrafts with top 3 shortest lengthes? List their names. | SELECT name FROM aircraft ORDER BY distance LIMIT 3 | spider |
CREATE TABLE table_name_34 (
nationality VARCHAR,
player VARCHAR
) | What nationality is Gerry Methe? | SELECT nationality FROM table_name_34 WHERE player = "gerry methe" | sql_create_context |
CREATE TABLE table_name_4 (
opponent VARCHAR,
save VARCHAR
) | Who played against Save Of Ni Fu-Deh? | SELECT opponent FROM table_name_4 WHERE save = "ni fu-deh" | 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 diagnoses (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
C... | among patients who had infusion of vasopressor, how many of them were married? | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.marital_status = "MARRIED" AND procedures.short_title = "Infusion of vasopressor" | mimicsql_data |
CREATE TABLE people (
People_ID int,
District text,
Name text,
Party text,
Age int
)
CREATE TABLE debate_people (
Debate_ID int,
Affirmative int,
Negative int,
If_Affirmative_Win bool
)
CREATE TABLE debate (
Debate_ID int,
Date text,
Venue text,
Num_of_Audience int
... | A bar chart showing how many debates are held for each venue. | SELECT Venue, COUNT(Venue) FROM debate GROUP BY Venue | nvbench |
CREATE TABLE table_37162 (
"Rank" text,
"Scorer" text,
"Club" text,
"Goals" real,
"Matches" text
) | Which Club has a Rank of 5? | SELECT "Club" FROM table_37162 WHERE "Rank" = '5' | wikisql |
CREATE TABLE table_name_71 (
game INTEGER,
record VARCHAR
) | What was the game number when record is 59-15? | SELECT MIN(game) FROM table_name_71 WHERE record = "59-15" | sql_create_context |
CREATE TABLE Votes (
Id number,
PostId number,
VoteTypeId number,
UserId number,
CreationDate time,
BountyAmount number
)
CREATE TABLE Posts (
Id number,
PostTypeId number,
AcceptedAnswerId number,
ParentId number,
CreationDate time,
DeletionDate time,
Score number,
... | Some questions where Accepted Answer < Top voted answer and Accepted Answer < 3. | SELECT p.Id AS "post_link", p.Score, a.Score, (SELECT MAX(Score) FROM Posts AS q WHERE q.ParentId = p.Id) FROM Posts AS p, Posts AS a WHERE p.PostTypeId = 1 AND NOT p.AcceptedAnswerId IS NULL AND a.Id = p.AcceptedAnswerId AND (SELECT MAX(Score) FROM Posts AS q WHERE q.ParentId = p.Id) > a.Score AND a.Score > 3 AND p.Ti... | sede |
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_icd_procedures (
row_id number,
icd9_code text,
short_title text,
long_title text
)
CREATE TABL... | what are the five most frequently prescribed drugs that were prescribed during the same hospital visit to the male patients 30s after they have been diagnosed with acute kidney failure nos, last year? | SELECT t3.drug FROM (SELECT t2.drug, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM (SELECT admissions.subject_id, diagnoses_icd.charttime, admissions.hadm_id FROM diagnoses_icd JOIN admissions ON diagnoses_icd.hadm_id = admissions.hadm_id WHERE diagnoses_icd.icd9_code = (SELECT d_icd_diagnoses.icd9_code FROM d_... | mimic_iii |
CREATE TABLE table_19789597_6 (
opponent VARCHAR,
date VARCHAR
) | Who was the game on July 7 played against? | SELECT opponent FROM table_19789597_6 WHERE date = "July 7" | sql_create_context |
CREATE TABLE CloseAsOffTopicReasonTypes (
Id number,
IsUniversal boolean,
InputTitle text,
MarkdownInputGuidance text,
MarkdownPostOwnerGuidance text,
MarkdownPrivilegedUserGuidance text,
MarkdownConcensusDescription text,
CreationDate time,
CreationModeratorId number,
ApprovalDa... | Swagger / RAML / API Blueprint. | SELECT COUNT(*), CONCAT(MONTH(CreationDate), '/1/', YEAR(CreationDate)) AS blueprint FROM Posts WHERE Tags LIKE '%blueprint%' GROUP BY CONCAT(MONTH(CreationDate), '/1/', YEAR(CreationDate)) ORDER BY blueprint DESC LIMIT 20 | sede |
CREATE TABLE table_70239 (
"Stage" text,
"Winner" text,
"General classification" text,
"Points classification" text,
"Mountains classification" text,
"Young rider classification" text,
"Intergiro classification" text,
"Trofeo Fast Team" text
) | During which stage was the Intergiro classification held by Miguel Indurain, the Points classification held by Mario Cipollini, and the Young rider classification held by Leonardo Sierra? | SELECT "Stage" FROM table_70239 WHERE "Intergiro classification" = 'miguel indurain' AND "Points classification" = 'mario cipollini' AND "Young rider classification" = 'leonardo sierra' | wikisql |
CREATE TABLE zyjzjlb (
YLJGDM text,
JZLSH text,
MZJZLSH text,
KH text,
KLX number,
HZXM text,
WDBZ number,
RYDJSJ time,
RYTJDM number,
RYTJMC text,
JZKSDM text,
JZKSMC text,
RZBQDM text,
RZBQMC text,
RYCWH text,
CYKSDM text,
CYKSMC text,
CYBQDM tex... | 找出检测指标结果定量单位、检测指标结果定量、检测指标名称和检验指标记录59220260221相同的有哪些检验指标记录? | SELECT * FROM jyjgzbb WHERE JCZBMC = (SELECT JCZBMC FROM jyjgzbb WHERE JYZBLSH = '59220260221') AND JCZBJGDW = (SELECT JCZBJGDW FROM jyjgzbb WHERE JYZBLSH = '59220260221') AND JCZBJGDL = (SELECT JCZBJGDL FROM jyjgzbb WHERE JYZBLSH = '59220260221') | css |
CREATE TABLE table_name_31 (
last_5 VARCHAR,
rank VARCHAR
) | Which Last 5 has a Rank of 7? | SELECT last_5 FROM table_name_31 WHERE rank = 7 | sql_create_context |
CREATE TABLE table_171320_3 (
region_1 VARCHAR,
region_4 VARCHAR
) | Name the region 1 where region 4 for april 2, 2009 | SELECT region_1 FROM table_171320_3 WHERE region_4 = "April 2, 2009" | sql_create_context |
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... | 在2015年3月27日开始2015年11月9日结束患者彭嘉怡被开出的所有药品的编码是多少?名称是什么?数量是多少?单价是多少?金额是多少? | SELECT t_kc22.SOC_SRT_DIRE_CD, t_kc22.SOC_SRT_DIRE_NM, t_kc22.QTY, t_kc22.UNIVALENT, t_kc22.AMOUNT FROM qtb JOIN t_kc22 ON qtb.MED_CLINIC_ID = t_kc22.MED_CLINIC_ID WHERE qtb.PERSON_NM = '彭嘉怡' AND qtb.IN_HOSP_DATE BETWEEN '2015-03-27' AND '2015-11-09' UNION SELECT t_kc22.SOC_SRT_DIRE_CD, t_kc22.SOC_SRT_DIRE_NM, t_kc22.Q... | css |
CREATE TABLE people (
people_id number,
name text,
height number,
weight number,
date_of_birth text
)
CREATE TABLE entrepreneur (
entrepreneur_id number,
people_id number,
company text,
money_requested number,
investor text
) | Return the investors who have invested in two or more entrepreneurs. | SELECT investor FROM entrepreneur GROUP BY investor HAVING COUNT(*) >= 2 | spider |
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
)
... | count the number of patients whose death status is 1 and diagnoses short title is dmii hprosmlr uncontrold? | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE demographic.expire_flag = "1" AND diagnoses.short_title = "DMII hprosmlr uncontrold" | mimicsql_data |
CREATE TABLE lab (
subject_id text,
hadm_id text,
itemid text,
charttime text,
flag text,
value_unit text,
label text,
fluid text
)
CREATE TABLE demographic (
subject_id text,
hadm_id text,
name text,
marital_status text,
age text,
dob text,
gender text,
... | provide the drug route for the drug oxycodone sr (oxycon tin). | SELECT prescriptions.route FROM prescriptions WHERE prescriptions.drug = "Oxycodone SR (OxyconTIN)" | mimicsql_data |
CREATE TABLE table_43824 (
"Game" real,
"Date" text,
"Opponent" text,
"Score" text,
"Record" text
) | What is the record on 1/17/1980? | SELECT "Record" FROM table_43824 WHERE "Date" = '1/17/1980' | wikisql |
CREATE TABLE treatment (
treatmentid number,
patientunitstayid number,
treatmentname text,
treatmenttime time
)
CREATE TABLE diagnosis (
diagnosisid number,
patientunitstayid number,
diagnosisname text,
diagnosistime time,
icd9code text
)
CREATE TABLE vitalperiodic (
vitalperio... | what are the three most frequent medications that followed within 2 months for the patients that received normal saline administration until 2 years ago? | SELECT t3.drugname FROM (SELECT t2.drugname, 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 = 'normal saline administration' AND DATETIME(treatme... | eicu |
CREATE TABLE team_half (
year INTEGER,
league_id TEXT,
team_id TEXT,
half INTEGER,
div_id TEXT,
div_win TEXT,
rank INTEGER,
g INTEGER,
w INTEGER,
l INTEGER
)
CREATE TABLE pitching_postseason (
player_id TEXT,
year INTEGER,
round TEXT,
team_id TEXT,
league_id ... | Reutrn a bar chart to bin the year into day of the week interval, and return the total number of times the team Boston Red Stockings won in the postseasons, rank y axis in ascending order. | SELECT year, SUM(COUNT(*)) FROM postseason AS T1 JOIN team AS T2 ON T1.team_id_winner = T2.team_id_br WHERE T2.name = 'Boston Red Stockings' ORDER BY SUM(COUNT(*)) | nvbench |
CREATE TABLE table_68160 (
"Year" real,
"Competition" text,
"Venue" text,
"Position" text,
"Event" text
) | What Venue has a Position of 12th (sf)? | SELECT "Venue" FROM table_68160 WHERE "Position" = '12th (sf)' | wikisql |
CREATE TABLE table_26205 (
"Country" text,
"% of all immigrants 2008" text,
"% of all immigrants 2007" text,
"% of all immigrants 2006" text,
"% of all immigrants 2005" text,
"% of all immigrants 2004" text
) | What's the percentage of the immigrants in 2007 in the country with 14.1% of the immigrants in 2006? | SELECT "% of all immigrants 2007" FROM table_26205 WHERE "% of all immigrants 2006" = '14.1%' | wikisql |
CREATE TABLE basketball_match (
Team_ID int,
School_ID int,
Team_Name text,
ACC_Regular_Season text,
ACC_Percent text,
ACC_Home text,
ACC_Road text,
All_Games text,
All_Games_Percent int,
All_Home text,
All_Road text,
All_Neutral text
)
CREATE TABLE university (
Scho... | What is the relationship between Team_ID and School_ID , and group by attribute ACC_Road? | SELECT Team_ID, School_ID FROM basketball_match GROUP BY ACC_Road | nvbench |
CREATE TABLE table_6011 (
"Type" text,
"wheelbase" text,
"M39 series" text,
"M809 series" text,
"M939 series" text
) | Name the M939 series with M809 series of m817 and M39 series of m51 | SELECT "M939 series" FROM table_6011 WHERE "M809 series" = 'm817' AND "M39 series" = 'm51' | wikisql |
CREATE TABLE t_kc24 (
ACCOUNT_DASH_DATE time,
ACCOUNT_DASH_FLG number,
CASH_PAY number,
CIVIL_SUBSIDY number,
CKC102 number,
CLINIC_ID text,
CLINIC_SLT_DATE time,
COMP_ID text,
COM_ACC_PAY number,
COM_PAY number,
DATA_ID text,
ENT_ACC_PAY number,
ENT_PAY number,
F... | 从03.2.18开始,截止到06.1.17,在患者64384565开出的所有药品里,自费金额高于1245.87元的总共有多少 | SELECT COUNT(*) FROM t_kc22 WHERE t_kc22.t_kc21_PERSON_ID = '64384565' AND t_kc22.STA_DATE BETWEEN '2003-02-18' AND '2006-01-17' AND t_kc22.SELF_PAY_AMO > 1245.87 | css |
CREATE TABLE school_bus (
School_ID int,
Driver_ID int,
Years_Working int,
If_full_time bool
)
CREATE TABLE school (
School_ID int,
Grade text,
School text,
Location text,
Type text
)
CREATE TABLE driver (
Driver_ID int,
Name text,
Party text,
Home_city text,
Ag... | Show the type of school and the number of buses for each type, could you list by the bars in descending? | SELECT Type, COUNT(*) FROM school_bus AS T1 JOIN school AS T2 ON T1.School_ID = T2.School_ID GROUP BY T2.Type ORDER BY Type DESC | nvbench |
CREATE TABLE people (
People_ID int,
Sex text,
Name text,
Date_of_Birth text,
Height real,
Weight real
)
CREATE TABLE candidate (
Candidate_ID int,
People_ID int,
Poll_Source text,
Date text,
Support_rate real,
Consider_rate real,
Oppose_rate real,
Unsure_rate re... | Show me the minimal weight by sex in a histogram, sort the bars in asc order. | SELECT Sex, MIN(Weight) FROM people GROUP BY Sex ORDER BY MIN(Weight) | nvbench |
CREATE TABLE table_name_99 (
races VARCHAR,
series VARCHAR,
wins VARCHAR
) | Which Race has the Toyota Racing Series New Zealand and 0 wins? | SELECT races FROM table_name_99 WHERE series = "toyota racing series new zealand" AND wins = "0" | sql_create_context |
CREATE TABLE table_48843 (
"Model number" text,
"sSpec number" text,
"Frequency" text,
"L2 cache" text,
"Mult." text,
"Voltage" text,
"Socket" text,
"Release date" text,
"Part number(s)" text,
"Release price ( USD )" text
) | What is the model number for the processor with sSpec number of sl3jm(kc0)sl3jt(kc0)? | SELECT "Model number" FROM table_48843 WHERE "sSpec number" = 'sl3jm(kc0)sl3jt(kc0)' | wikisql |
CREATE TABLE job_history (
EMPLOYEE_ID decimal(6,0),
START_DATE date,
END_DATE date,
JOB_ID varchar(10),
DEPARTMENT_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 departments (
DEP... | For those employees who do not work in departments with managers that have ids between 100 and 200, draw a scatter chart about the correlation between commission_pct and manager_id . | SELECT COMMISSION_PCT, MANAGER_ID FROM employees WHERE NOT DEPARTMENT_ID IN (SELECT DEPARTMENT_ID FROM departments WHERE MANAGER_ID BETWEEN 100 AND 200) | nvbench |
CREATE TABLE table_28795 (
"Episode" real,
"Title" text,
"Writer" text,
"Director" text,
"Original airdate" text,
"Ratings (Kanto)" text,
"Ratings (Kansai)" text
) | Who is the writer with the ratings 14.8? | SELECT "Writer" FROM table_28795 WHERE "Ratings (Kanto)" = '14.8' | wikisql |
CREATE TABLE Staff (
Staff_ID INTEGER,
Tourist_Attraction_ID INTEGER,
Name VARCHAR(40),
Other_Details VARCHAR(255)
)
CREATE TABLE Shops (
Shop_ID INTEGER,
Shop_Details VARCHAR(255)
)
CREATE TABLE Locations (
Location_ID INTEGER,
Location_Name VARCHAR(255),
Address VARCHAR(255),
... | Show different ways to get to attractions and the number of attractions that can be accessed in the corresponding way. Show the proportion. | SELECT How_to_Get_There, COUNT(*) FROM Tourist_Attractions GROUP BY How_to_Get_There | nvbench |
CREATE TABLE table_11138 (
"model" text,
"max. motive power" text,
"max. torque at rpm" text,
"engine displacement" text,
"engine type" text,
"engine configuration & notes 0-100km/h" text
) | What is the engine type with a model with base 2.4? | SELECT "engine type" FROM table_11138 WHERE "model" = 'base 2.4' | wikisql |
CREATE TABLE table_name_69 (
edition VARCHAR,
date VARCHAR,
region VARCHAR
) | What kind of edition was released September 23, 2008 from the United States? | SELECT edition FROM table_name_69 WHERE date = "september 23, 2008" AND region = "united states" | sql_create_context |
CREATE TABLE table_14880 (
"Date" text,
"Tournament" text,
"Winning score" text,
"To par" text,
"Margin of victory" text,
"Runner(s)-up" text
) | When the Winning score is 74-68-67-75=284, what was the Margin of victory? | SELECT "Margin of victory" FROM table_14880 WHERE "Winning score" = '74-68-67-75=284' | wikisql |
CREATE TABLE table_24565004_8 (
goals¹ VARCHAR,
name VARCHAR
) | What is the number of goals if the name is Xavier Gravelaine? | SELECT goals¹ FROM table_24565004_8 WHERE name = "Xavier Gravelaine" | sql_create_context |
CREATE TABLE Ref_Address_Types (
address_type_code VARCHAR(15),
address_type_description VARCHAR(80)
)
CREATE TABLE Ref_Incident_Type (
incident_type_code VARCHAR(10),
incident_type_description VARCHAR(80)
)
CREATE TABLE Teachers (
teacher_id INTEGER,
address_id INTEGER,
first_name VARCHAR... | Find date_address_from and the amount of date_address_from , and group by attribute other_details and bin date_address_from by weekday, and visualize them by a bar chart. | SELECT date_address_from, COUNT(date_address_from) FROM Student_Addresses GROUP BY other_details ORDER BY monthly_rental DESC | nvbench |
CREATE TABLE table_name_27 (
attendance VARCHAR,
result VARCHAR
) | How many spectators attended the game that ended in a result of w29-7? | SELECT attendance FROM table_name_27 WHERE result = "w29-7" | sql_create_context |
CREATE TABLE tracklists (
albumid number,
position number,
songid number
)
CREATE TABLE instruments (
songid number,
bandmateid number,
instrument text
)
CREATE TABLE performance (
songid number,
bandmate number,
stageposition text
)
CREATE TABLE vocals (
songid number,
ba... | Find all the vocal types. | SELECT DISTINCT type FROM vocals | spider |
CREATE TABLE invoices (
id INTEGER,
customer_id INTEGER,
invoice_date TIMESTAMP,
billing_address VARCHAR(70),
billing_city VARCHAR(40),
billing_state VARCHAR(40),
billing_country VARCHAR(40),
billing_postal_code VARCHAR(10),
total NUMERIC(10,2)
)
CREATE TABLE playlists (
id INTE... | how many tracks does each genre have and what are the names of the top 5? | SELECT T1.name, COUNT(*) FROM genres AS T1 JOIN tracks AS T2 ON T2.genre_id = T1.id GROUP BY T1.id ORDER BY COUNT(*) DESC LIMIT 5 | nvbench |
CREATE TABLE table_46104 (
"Rider" text,
"Manufacturer" text,
"Laps" real,
"Time/Retired" text,
"Grid" real
) | What is the grid average with a +1 lap time and more than 27 laps? | SELECT AVG("Grid") FROM table_46104 WHERE "Time/Retired" = '+1 lap' AND "Laps" > '27' | wikisql |
CREATE TABLE table_name_86 (
constituency_number VARCHAR,
reserved_for___sc___st__none_ VARCHAR,
name VARCHAR
) | When the name is badnawar, and the reserved for (sc / st /none) of none what is the constituency number? | SELECT constituency_number FROM table_name_86 WHERE reserved_for___sc___st__none_ = "none" AND name = "badnawar" | sql_create_context |
CREATE TABLE prescriptions (
row_id number,
subject_id number,
hadm_id number,
startdate time,
enddate time,
drug text,
dose_val_rx text,
dose_unit_rx text,
route text
)
CREATE TABLE procedures_icd (
row_id number,
subject_id number,
hadm_id number,
icd9_code text,
... | count the number of patients who were prescribed allopurinol within 2 months following a resp tract intubat nec procedure in this year. | SELECT COUNT(DISTINCT t1.subject_id) FROM (SELECT admissions.subject_id, procedures_icd.charttime FROM procedures_icd JOIN admissions ON procedures_icd.hadm_id = admissions.hadm_id WHERE procedures_icd.icd9_code = (SELECT d_icd_procedures.icd9_code FROM d_icd_procedures WHERE d_icd_procedures.short_title = 'resp tract ... | mimic_iii |
CREATE TABLE table_69782 (
"Region" text,
"Date" text,
"Label" text,
"Format" text,
"Catalog" text
) | Which format is released on August 29, 1998? | SELECT "Format" FROM table_69782 WHERE "Date" = 'august 29, 1998' | 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... | find out if the patient with id 98220 is married and still living. | SELECT demographic.marital_status, demographic.expire_flag FROM demographic WHERE demographic.subject_id = "98220" | mimicsql_data |
CREATE TABLE table_name_62 (
location VARCHAR,
home_team VARCHAR
) | What was the location of the home game for Slovakia? | SELECT location FROM table_name_62 WHERE home_team = "slovakia" | sql_create_context |
CREATE TABLE ReviewRejectionReasons (
Id number,
Name text,
Description text,
PostTypeId number
)
CREATE TABLE CloseAsOffTopicReasonTypes (
Id number,
IsUniversal boolean,
InputTitle text,
MarkdownInputGuidance text,
MarkdownPostOwnerGuidance text,
MarkdownPrivilegedUserGuidance... | All StackOverflow articles in 2014. | SELECT * FROM Posts WHERE Posts.CreationDate < '2015-01-01' AND Posts.CreationDate > '2014-12-31' LIMIT 5000 | sede |
CREATE TABLE table_name_70 (
total INTEGER,
country VARCHAR,
bronze VARCHAR,
silver VARCHAR
) | Which Total has a Bronze larger than 12, and a Silver larger than 772, and a Country of thailand? | SELECT SUM(total) FROM table_name_70 WHERE bronze > 12 AND silver > 772 AND country = "thailand" | sql_create_context |
CREATE TABLE Claims (
claim_id VARCHAR,
date_claim_made VARCHAR,
Date_Claim_Settled VARCHAR,
Claim_id VARCHAR
)
CREATE TABLE Settlements (
Claim_id VARCHAR
) | List the date the claim was made, the date it was settled and the amount settled for all the claims which had exactly one settlement. | SELECT T1.Claim_id, T1.date_claim_made, T1.Date_Claim_Settled FROM Claims AS T1 JOIN Settlements AS T2 ON T1.Claim_id = T2.Claim_id GROUP BY T1.Claim_id HAVING COUNT(*) = 1 | sql_create_context |
CREATE TABLE table_21177 (
"Cycle no." text,
"Air dates" text,
"Reward" text,
"Immunity" text,
"Eliminated" text,
"Vote" text,
"Finish" text
) | Name the vote for gigit | SELECT "Vote" FROM table_21177 WHERE "Eliminated" = 'Gigit' | wikisql |
CREATE TABLE table_name_29 (
xenon VARCHAR,
helium VARCHAR
) | Which Xenon has a Helium of 5.1? | SELECT xenon FROM table_name_29 WHERE helium = "5.1" | sql_create_context |
CREATE TABLE table_10088101_1 (
no_in_series INTEGER,
production_code VARCHAR
) | What is the episode number that has production code 8abx15? | SELECT MIN(no_in_series) FROM table_10088101_1 WHERE production_code = "8ABX15" | sql_create_context |
CREATE TABLE table_204_980 (
id number,
"name" text,
"type" text,
"elevation\n(ground station)" number,
"elevation\n(mountain station)" number,
"slope length" number,
"capacity\n(persons/hour)" number,
"construction year" number
) | what is the number of capacity for laxalp 2 | SELECT "capacity\n(persons/hour)" FROM table_204_980 WHERE "name" = 'laxeralp 2' | squall |
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... | 查询给患者05485933开替米沙坦片这个药的医院 | SELECT t_kc22.t_kc21_MED_SER_ORG_NO FROM t_kc22 WHERE t_kc22.t_kc21_PERSON_ID = '05485933' AND t_kc22.MED_CLINIC_ID IN (SELECT t_kc22.MED_CLINIC_ID FROM t_kc22 WHERE t_kc22.SOC_SRT_DIRE_NM = '替米沙坦片') | css |
CREATE TABLE PostTags (
PostId number,
TagId number
)
CREATE TABLE Tags (
Id number,
TagName text,
Count number,
ExcerptPostId number,
WikiPostId number
)
CREATE TABLE ReviewTaskResults (
Id number,
ReviewTaskId number,
ReviewTaskResultTypeId number,
CreationDate time,
... | Users with highest percentage of approved edits. | WITH perc_cte AS (SELECT OwnerUserId AS uid, COUNT(Id) AS Total, COUNT(ApprovalDate) AS Approved, COUNT(RejectionDate) AS Rejected, ROUND((COUNT(ApprovalDate)) * 100.0 / (COUNT(Id)), 2) AS PercApproved, ROUND((COUNT(RejectionDate)) * 100.0 / (COUNT(Id)), 2) AS PercRejected FROM SuggestedEdits GROUP BY OwnerUserId) SELE... | sede |
CREATE TABLE table_58760 (
"Team Name" text,
"Schools" text,
"Sports" text,
"Host" text,
"Nickname(s)" text,
"Colors" text,
"Enrollment (2013/14)" real
) | What is the name of the team from cisne fairfield school? | SELECT "Team Name" FROM table_58760 WHERE "Schools" = 'cisne fairfield' | wikisql |
CREATE TABLE table_name_19 (
score VARCHAR,
game VARCHAR,
january VARCHAR
) | Which Score has a Game larger than 47, and a January smaller than 25? | SELECT score FROM table_name_19 WHERE game > 47 AND january < 25 | sql_create_context |
CREATE TABLE table_name_53 (
Id VARCHAR
) | I want to know the 2001 that has a 2004 of a and 2003 of a with 2012 of 3r | SELECT 2001 FROM table_name_53 WHERE 2004 = "a" AND 2003 = "a" AND 2012 = "3r" | sql_create_context |
CREATE TABLE d_icd_procedures (
row_id number,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE labevents (
row_id number,
subject_id number,
hadm_id number,
itemid number,
charttime time,
valuenum number,
valueuom text
)
CREATE TABLE patients (
row_id n... | what was the number of hospitalized patients? | SELECT COUNT(DISTINCT admissions.subject_id) FROM admissions WHERE admissions.dischtime IS NULL | mimic_iii |
CREATE TABLE d_items (
row_id number,
itemid number,
label text,
linksto text
)
CREATE TABLE outputevents (
row_id number,
subject_id number,
hadm_id number,
icustay_id number,
charttime time,
itemid number,
value number
)
CREATE TABLE d_icd_diagnoses (
row_id number,
... | what were the four most frequently prescribed drugs for patients who had also been prescribed dexamethasone sod phosphate at the same time? | SELECT t3.drug FROM (SELECT t2.drug, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM (SELECT admissions.subject_id, prescriptions.startdate FROM prescriptions JOIN admissions ON prescriptions.hadm_id = admissions.hadm_id WHERE prescriptions.drug = 'dexamethasone sod phosphate') AS t1 JOIN (SELECT admissions.subje... | mimic_iii |
CREATE TABLE table_27720737_1 (
series__number VARCHAR,
production_code VARCHAR
) | How many episodes had a production code 120? | SELECT COUNT(series__number) FROM table_27720737_1 WHERE production_code = 120 | sql_create_context |
CREATE TABLE d_icd_procedures (
row_id number,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE inputevents_cv (
row_id number,
subject_id number,
hadm_id number,
icustay_id number,
charttime time,
itemid number,
amount number
)
CREATE TABLE cost (
row_i... | how many days has it been from the last time patient 31854 received a glucose lab test on this hospital encounter? | SELECT 1 * (STRFTIME('%j', CURRENT_TIME()) - STRFTIME('%j', labevents.charttime)) FROM labevents WHERE labevents.itemid IN (SELECT d_labitems.itemid FROM d_labitems WHERE d_labitems.label = 'glucose') AND labevents.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 31854 AND admissions.... | mimic_iii |
CREATE TABLE table_29886 (
"Game" real,
"Date" text,
"Team" text,
"Score" text,
"High points" text,
"High rebounds" text,
"High assists" text,
"Location Attendance" text,
"Record" text
) | What's the record of the @ miami team? | SELECT "Record" FROM table_29886 WHERE "Team" = '@ Miami' | wikisql |
CREATE TABLE table_31487 (
"Pick #" real,
"CFL Team" text,
"Player" text,
"Position" text,
"College" text
) | What is Tyrell Francisco's player position? | SELECT "Position" FROM table_31487 WHERE "Player" = 'Tyrell Francisco' | wikisql |
CREATE TABLE Customer_Addresses (
customer_id INTEGER,
address_id INTEGER,
date_address_from DATETIME,
address_type VARCHAR(15),
date_address_to DATETIME
)
CREATE TABLE Customer_Contact_Channels (
customer_id INTEGER,
channel_code VARCHAR(15),
active_from_date DATETIME,
active_to_da... | Find the 'date became customers' of the customers whose ID is between 10 and 20, and count them by a bar chart | SELECT date_became_customer, COUNT(date_became_customer) FROM Customers WHERE customer_id BETWEEN 10 AND 20 | nvbench |
CREATE TABLE table_51522 (
"Home team" text,
"Home team score" text,
"Away team" text,
"Away team score" text,
"Venue" text,
"Crowd" real,
"Date" text
) | How many spectators had a home team score of 15.14 (104)? | SELECT AVG("Crowd") FROM table_51522 WHERE "Home team score" = '15.14 (104)' | wikisql |
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... | 在2007年12月12日到2020年1月21日内患者34563100就诊过多少个医生? | SELECT COUNT(zzmzjzjlb.ZZYSGH) 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 = '34563100' AND zzmzjzjlb.JZKSRQ BETWEEN '2007-12-12' AND '2020-01-21' UNION SELECT COUNT(fzzmzjzjlb.ZZYSGH) FROM hz_info JOIN fzzmzjzjlb ON h... | css |
CREATE TABLE table_31953 (
"Week" real,
"Date" text,
"Opponent" text,
"Result" text,
"Attendance" text
) | What is the date of week 17? | SELECT "Date" FROM table_31953 WHERE "Week" = '17' | wikisql |
CREATE TABLE table_1965650_10 (
player VARCHAR,
nhl_team VARCHAR
) | What player is from the California Golden Seals? | SELECT player FROM table_1965650_10 WHERE nhl_team = "California Golden Seals" | sql_create_context |
CREATE TABLE demographic (
subject_id text,
hadm_id text,
name text,
marital_status text,
age text,
dob text,
gender text,
language text,
religion text,
admission_type text,
days_stay text,
insurance text,
ethnicity text,
expire_flag text,
admission_location t... | How many patients were admitted to the hospital before the year 2182 and had a lab test protein, total? | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.admityear < "2182" AND lab.label = "Protein, Total" | mimicsql_data |
CREATE TABLE CloseAsOffTopicReasonTypes (
Id number,
IsUniversal boolean,
InputTitle text,
MarkdownInputGuidance text,
MarkdownPostOwnerGuidance text,
MarkdownPrivilegedUserGuidance text,
MarkdownConcensusDescription text,
CreationDate time,
CreationModeratorId number,
ApprovalDa... | ELT Informatica Oracle in Moscow - Mathematics. | WITH USER_BY_TAG AS (SELECT ROW_NUMBER() OVER (ORDER BY Reputation DESC) AS "#", u.Id AS "user_link", u.Reputation FROM Tags AS t INNER JOIN PostTags AS pt ON pt.TagId = t.Id INNER JOIN Posts AS p ON p.ParentId = pt.PostId INNER JOIN Votes AS v ON v.PostId = p.Id AND VoteTypeId = 2 INNER JOIN Users AS u ON u.Id = p.Own... | sede |
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 * FROM person_info JOIN hz_info JOIN zzmzjzjlb JOIN jybgb JOIN jyjgzbb ON person_info.RYBH = hz_info.RYBH AND hz_info.YLJGDM = zzmzjzjlb.YLJGDM AND hz_info.KH = zzmzjzjlb.KH AND hz_info.KLX = zzmzjzjlb.KLX AND zzmzjzjlb.YLJGDM = jybgb.YLJGDM_MZJZJLB AND zzmzjzjlb.JZLSH = jybgb.JZLSH_MZJZJLB AND jybgb.YLJGDM = jy... | css |
CREATE TABLE lab (
subject_id text,
hadm_id text,
itemid text,
charttime text,
flag text,
value_unit text,
label text,
fluid text
)
CREATE TABLE procedures (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE demographic ... | Provide the number of male patients who have a prescription for trazodone hcl medication. | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE demographic.gender = "M" AND prescriptions.drug = "traZODONE HCl" | mimicsql_data |
CREATE TABLE table_70907 (
"Director(s)" text,
"Writer(s)" text,
"Recipient" text,
"Date" text,
"Award" text
) | What date was the award of 6,600 was given? | SELECT "Date" FROM table_70907 WHERE "Award" = '£6,600' | wikisql |
CREATE TABLE diagnoses (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE procedures (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE lab (
subject_id text,
hadm_id text,
... | count the number of patients whose year of death is less than or equal to 2111 and lab test fluid is ascites? | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.dod_year <= "2111.0" AND lab.fluid = "Ascites" | mimicsql_data |
CREATE TABLE table_24126606_2 (
opponent VARCHAR,
week VARCHAR
) | Name the opponent for week 12 | SELECT opponent FROM table_24126606_2 WHERE week = 12 | sql_create_context |
CREATE TABLE table_70077 (
"Goal" text,
"Location" text,
"Lineup" text,
"Assist/pass" text,
"Score" text,
"Result" text,
"Competition" text
) | Which location has a Goal of 2? | SELECT "Location" FROM table_70077 WHERE "Goal" = '2' | wikisql |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.