context stringlengths 11 9.12k | question stringlengths 0 1.06k | SQL stringlengths 2 4.44k | source stringclasses 28
values |
|---|---|---|---|
CREATE TABLE table_name_33 (
tv_time VARCHAR,
week VARCHAR,
opponent VARCHAR
) | WHAT IS THE TV TIME WOTH A WEEK BIGGER THAN 15, WITH THE OAKLAND RAIDERS AS OPPONENT? | SELECT tv_time FROM table_name_33 WHERE week > 15 AND opponent = "oakland raiders" | 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... | 编码为2768334的医院科室的最长医疗住院时长少于16天有几个? | SELECT COUNT(*) FROM (SELECT gwyjzb.MED_ORG_DEPT_CD FROM gwyjzb WHERE gwyjzb.MED_SER_ORG_NO = '2768334' GROUP BY gwyjzb.MED_ORG_DEPT_CD HAVING MAX(gwyjzb.IN_HOSP_DAYS) < 16 UNION SELECT fgwyjzb.MED_ORG_DEPT_CD FROM fgwyjzb WHERE fgwyjzb.MED_SER_ORG_NO = '2768334' GROUP BY fgwyjzb.MED_ORG_DEPT_CD HAVING MAX(fgwyjzb.IN_H... | css |
CREATE TABLE table_57633 (
"Home team" text,
"Home team score" text,
"Away team" text,
"Away team score" text,
"Venue" text,
"Crowd" real,
"Date" text
) | Who was the away team playing against collingwood? | SELECT "Away team" FROM table_57633 WHERE "Home team" = 'collingwood' | wikisql |
CREATE TABLE schedule (
Cinema_ID int,
Film_ID int,
Date text,
Show_times_per_day int,
Price float
)
CREATE TABLE film (
Film_ID int,
Rank_in_series int,
Number_in_season int,
Title text,
Directed_by text,
Original_air_date text,
Production_code text
)
CREATE TABLE cine... | Plot sum capacity over openning year in a line chart, and could you display X-axis in ascending order? | SELECT Openning_year, SUM(Capacity) FROM cinema ORDER BY Openning_year | nvbench |
CREATE TABLE table_1198175_1 (
position VARCHAR,
drafted VARCHAR
) | What is the position when drafted is 1974,r11,p11? | SELECT position FROM table_1198175_1 WHERE drafted = "1974,R11,P11" | 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... | 阿司匹林肠溶片在医疗就诊11695631701中的收费项目等级是什么? | SELECT t_kc22.CHA_ITEM_LEV FROM t_kc22 JOIN t_kc21_t_kc22 JOIN t_kc21 ON t_kc21_t_kc22.MED_EXP_DET_ID = t_kc22.MED_EXP_DET_ID AND t_kc21_t_kc22.MED_CLINIC_ID = t_kc21.MED_CLINIC_ID WHERE t_kc21.MED_CLINIC_ID = '11695631701' AND t_kc22.SOC_SRT_DIRE_NM = '阿司匹林肠溶片' | css |
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,
... | 2006-07-05到2011-05-15期间,张梦竹患者看过几次门诊在9146029医疗机构 | SELECT COUNT(*) FROM person_info JOIN hz_info JOIN mzjzjlb 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 WHERE person_info.XM = '张梦竹' AND mzjzjlb.JZKSRQ BETWEEN '2006-07-05' AND '2011-05-15' AND mzjzjlb.YLJGDM = '9146029' | css |
CREATE TABLE table_33879 (
"Date" text,
"Opponent" text,
"Score" text,
"Loss" text,
"Record" text
) | Record of 89-67 had what loss? | SELECT "Loss" FROM table_33879 WHERE "Record" = '89-67' | 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 patient (
uniquep... | what was the last ward id that patient 015-91239 went in the current hospital visit? | SELECT patient.wardid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '015-91239' AND patient.hospitaldischargetime IS NULL) ORDER BY patient.unitadmittime DESC LIMIT 1 | eicu |
CREATE TABLE table_204_624 (
id number,
"school" text,
"team name" text,
"town" text,
"county" text,
"enrollment (2010-11 & 2011-12)" number,
"primary mshsaa class*" number,
"football class" number
) | how many schools are there in this conference ? | SELECT COUNT("school") FROM table_204_624 | squall |
CREATE TABLE table_58147 (
"Home team" text,
"Home team score" text,
"Away team" text,
"Away team score" text,
"Venue" text,
"Crowd" real,
"Date" text
) | What was the away team that had a score of 4.13 (37)? | SELECT "Away team" FROM table_58147 WHERE "Away team score" = '4.13 (37)' | wikisql |
CREATE TABLE table_9863 (
"Name" text,
"Position" text,
"Height" text,
"Weight" real,
"Year" text,
"Home Town" text
) | What is the height of the player that weighs 240? | SELECT "Height" FROM table_9863 WHERE "Weight" = '240' | 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... | provide the number of patients whose marital status is divorced and drug route is pr? | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE demographic.marital_status = "DIVORCED" AND prescriptions.route = "PR" | mimicsql_data |
CREATE TABLE hz_info_zyjzjlb (
JZLSH number,
YLJGDM number,
zyjzjlb_id number
)
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 t... | 在00年9月13日到2005年5月12日期间病号56678015的所有检验结果指标记录的检测人为戚雪卉的检验指标流水号是多少? | 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_name_12 (
written_by VARCHAR,
directed_by VARCHAR
) | Who wrote the episode that was directed by dan lerner? | SELECT written_by FROM table_name_12 WHERE directed_by = "dan lerner" | sql_create_context |
CREATE TABLE table_953 (
"Book title" text,
"Issues" real,
"Writer" text,
"Artist(s)" text,
"Publication dates" text
) | timothy truman worked on what dates | SELECT "Publication dates" FROM table_953 WHERE "Artist(s)" = 'Timothy Truman' | wikisql |
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
)
... | how many patients whose admission location is phys referral/normal deli and item id is 50983? | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.admission_location = "PHYS REFERRAL/NORMAL DELI" AND lab.itemid = "50983" | 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 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 admission type is urgent and drug route is oral? | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE demographic.admission_type = "URGENT" AND prescriptions.route = "ORAL" | mimicsql_data |
CREATE TABLE table_204_15 (
id number,
"year" number,
"date" text,
"venue" text,
"city" text,
"country" text,
"notes" text
) | where was the previous acm multimedia workshop held at in 2012 ? | SELECT "venue" FROM table_204_15 WHERE "year" = 2012 | squall |
CREATE TABLE table_dev_46 (
"id" int,
"ogtt" int,
"systolic_blood_pressure_sbp" int,
"neuromuscular_disease" bool,
"renal_disease" bool,
"hepatic_disease" bool,
"active_oncologic_disease" bool,
"hematologic_disease" bool,
"diastolic_blood_pressure_dbp" int,
"muscular_disease" boo... | hypertension > 180 mmhg systolic, > 110 mmhg diastolic office blood pressure | SELECT * FROM table_dev_46 WHERE hypertension = 1 OR (systolic_blood_pressure_sbp > 180 OR diastolic_blood_pressure_dbp > 110) | criteria2sql |
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... | 在11-02-09到20-05-11期间,60366088的患者被开出多少次药品3367-2 | SELECT COUNT(*) FROM t_kc21 JOIN t_kc22 ON t_kc21.MED_CLINIC_ID = t_kc22.MED_CLINIC_ID WHERE t_kc21.PERSON_ID = '60366088' AND t_kc22.STA_DATE BETWEEN '2011-02-09' AND '2020-05-11' AND t_kc22.SOC_SRT_DIRE_CD = '3367-2' | css |
CREATE TABLE table_1901751_1 (
original_west_end_performer VARCHAR,
character VARCHAR
) | Who is the Original west end performer for the character Martha? | SELECT original_west_end_performer FROM table_1901751_1 WHERE character = "Martha" | sql_create_context |
CREATE TABLE table_15205 (
"Date" text,
"Opponent" text,
"Score" text,
"Loss" text,
"Record" text
) | What was the loss of the game with a record of 54 42? | SELECT "Loss" FROM table_15205 WHERE "Record" = '54–42' | wikisql |
CREATE TABLE treatment (
treatmentid number,
patientunitstayid number,
treatmentname text,
treatmenttime time
)
CREATE TABLE allergy (
allergyid number,
patientunitstayid number,
drugname text,
allergyname text,
allergytime time
)
CREATE TABLE intakeoutput (
intakeoutputid numb... | what are the three most frequent microbiology tests that followed within 2 months for those who received normal saline administration - aggressive volume resuscitation (>250 mls/hr) since 2104? | SELECT t3.culturesite FROM (SELECT t2.culturesite, 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 - aggressive vo... | eicu |
CREATE TABLE table_36453 (
"Date" text,
"Opponent" text,
"Score" text,
"Loss" text,
"Time" text,
"Att." real,
"Record" text
) | Which Record is on july 31? | SELECT "Record" FROM table_36453 WHERE "Date" = 'july 31' | wikisql |
CREATE TABLE table_75295 (
"Position" text,
"Game 1" text,
"Game 2" text,
"Game 3" text,
"Exhibition*" text
) | Wjat game 3 has ian french as a game of 2? | SELECT "Game 3" FROM table_75295 WHERE "Game 2" = 'ian french' | wikisql |
CREATE TABLE table_26420 (
"Outcome" text,
"Year" real,
"Championship" text,
"Surface" text,
"Partner" text,
"Opponents" text,
"Score" text
) | Name the number of surfaces for 4-6, 2-6 | SELECT COUNT("Surface") FROM table_26420 WHERE "Score" = '4-6, 2-6' | wikisql |
CREATE TABLE table_26139378_1 (
viewers__in_millions_ VARCHAR,
episode__number VARCHAR
) | How many millions of viewers did Episode number 16 have? | SELECT viewers__in_millions_ FROM table_26139378_1 WHERE episode__number = 16 | sql_create_context |
CREATE TABLE table_62697 (
"Name" text,
"Position" text,
"League Apps" text,
"League Goals" real,
"FA Cup Apps" text,
"FA Cup Goals" real,
"League Cup Apps" text,
"League Cup Goals" real,
"FLT Apps" text,
"FLT Goals" real,
"Total Apps" text,
"Total Goals" real
) | What is the league cup app with league cup goals more than 0? | SELECT "League Cup Apps" FROM table_62697 WHERE "League Cup Goals" > '0' | wikisql |
CREATE TABLE table_name_11 (
scrapped_sold VARCHAR,
name_as_rebuilt VARCHAR
) | Which Scrapped/Sold has a Name as rebuilt of trostan? | SELECT scrapped_sold FROM table_name_11 WHERE name_as_rebuilt = "trostan" | sql_create_context |
CREATE TABLE Ref_Transaction_Types (
transaction_type_code VARCHAR(10),
transaction_type_description VARCHAR(80)
)
CREATE TABLE Sales (
sales_transaction_id INTEGER,
sales_details VARCHAR(255)
)
CREATE TABLE Lots (
lot_id INTEGER,
investor_id INTEGER,
lot_details VARCHAR(255)
)
CREATE TAB... | Find the transaction type descriptions and dates if the share count is smaller than 10, group by transaction type, count the date of transaction, and bin the date into the weekday interval Show the result with a grouping line chart, order by the x axis in ascending. | SELECT T2.date_of_transaction, COUNT(T2.date_of_transaction) FROM Ref_Transaction_Types AS T1 JOIN Transactions AS T2 ON T1.transaction_type_code = T2.transaction_type_code WHERE T2.share_count < 10 GROUP BY transaction_type_description ORDER BY date_of_transaction | nvbench |
CREATE TABLE table_name_74 (
host VARCHAR,
country VARCHAR
) | What was the host of Horrid Henry? | SELECT host FROM table_name_74 WHERE country = "horrid henry" | sql_create_context |
CREATE TABLE table_203_84 (
id number,
"rank" number,
"name" text,
"height\nft (m)" text,
"floors" number,
"year" text,
"coordinates" text,
"notes" text
) | indicate how many of the buildings in oakland which stand at least 200 ft tall have more than 20 floors . | SELECT COUNT("name") FROM table_203_84 WHERE "height\nft (m)" >= 200 AND "floors" > 20 | squall |
CREATE TABLE table_name_42 (
attendance VARCHAR,
h___a VARCHAR,
opponents VARCHAR
) | What's the total attendance for H/A of A and opponents of wolverhampton wanderers? | SELECT COUNT(attendance) FROM table_name_42 WHERE h___a = "a" AND opponents = "wolverhampton wanderers" | sql_create_context |
CREATE TABLE table_203_485 (
id number,
"year" text,
"show" text,
"role" text,
"notes" text
) | how many different tv shows was gauri tejwani in before 2000 ? | SELECT COUNT("show") FROM table_203_485 WHERE "year" < 2000 | squall |
CREATE TABLE table_name_23 (
motorcycle VARCHAR,
rider VARCHAR
) | Anthony West ride which Motorcyle? | SELECT motorcycle FROM table_name_23 WHERE rider = "anthony west" | sql_create_context |
CREATE TABLE jyjgzbb (
JYZBLSH text,
YLJGDM text,
BGDH text,
BGRQ time,
JYRQ time,
JCRGH text,
JCRXM text,
SHRGH text,
SHRXM text,
JCXMMC text,
JCZBDM text,
JCFF text,
JCZBMC text,
JCZBJGDX text,
JCZBJGDL number,
JCZBJGDW text,
SBBM text,
YQBH text... | 列出患者马展鹏被开出的所有检验报告单的检验报告单号有多少在2021-08-09到2021-11-14内? | (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 jyb... | css |
CREATE TABLE table_name_88 (
score VARCHAR,
country VARCHAR
) | What was the score for the golfer from the country of fiji? | SELECT COUNT(score) FROM table_name_88 WHERE country = "fiji" | sql_create_context |
CREATE TABLE table_71167 (
"School" text,
"Grades" text,
"Affiliation" text,
"Student Body" text,
"Enrollment" real
) | What's the Student Body with an Affiliation of Roman Catholic and has an Enrollment of 502? | SELECT "Student Body" FROM table_71167 WHERE "Affiliation" = 'roman catholic' AND "Enrollment" = '502' | wikisql |
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 jyjgzbb.JCRGH, jyjgzbb.JCRXM FROM person_info JOIN hz_info JOIN mzjzjlb JOIN jybgb JOIN jyjgzbb JOIN mzjzjlb_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 = mzjzjlb_jybgb.YLJGDM_MZJZJLB AND mzjzjlb.JZLSH =... | css |
CREATE TABLE table_37981 (
"Week" real,
"Date" text,
"Time" text,
"Opponent" text,
"Result" text,
"Game site" text,
"NFL Recap" text,
"Record" text
) | What is the Time of the game at Arrowhead Stadium with an NFL Recap of recap? | SELECT "Time" FROM table_37981 WHERE "NFL Recap" = 'recap' AND "Game site" = 'arrowhead stadium' | wikisql |
CREATE TABLE table_name_71 (
gold VARCHAR,
silver VARCHAR,
nation VARCHAR
) | How many golds were there for Iceland with more than 15 silver? | SELECT COUNT(gold) FROM table_name_71 WHERE silver > 15 AND nation = "iceland" | sql_create_context |
CREATE TABLE book (
Book_ID int,
Title text,
Issues real,
Writer text
)
CREATE TABLE publication (
Publication_ID int,
Book_ID int,
Publisher text,
Publication_Date text,
Price real
) | Show different publishers together with the number of publications they have in a bar chart, and I want to rank y axis from high to low order. | SELECT Publisher, COUNT(*) FROM publication GROUP BY Publisher ORDER BY COUNT(*) DESC | nvbench |
CREATE TABLE table_17901155_4 (
viewers__millions_ VARCHAR,
no_in_season VARCHAR
) | How many million viewers watched episode 6? | SELECT viewers__millions_ FROM table_17901155_4 WHERE no_in_season = 6 | sql_create_context |
CREATE TABLE Votes (
Id number,
PostId number,
VoteTypeId number,
UserId number,
CreationDate time,
BountyAmount number
)
CREATE TABLE PostNotices (
Id number,
PostId number,
PostNoticeTypeId number,
CreationDate time,
DeletionDate time,
ExpiryDate time,
Body text,
... | Up vs Down votes by day of week of Question. | SELECT p.Id AS "post_link", CASE WHEN PostTypeId = 1 THEN 'Question' ELSE 'Answer' END AS "post_type", t.TagName, SUM(CASE WHEN VoteTypeId = 2 THEN 1 ELSE 0 END) AS UpVotes, SUM(CASE WHEN VoteTypeId = 3 THEN 1 ELSE 0 END) AS DownVotes FROM Votes AS v JOIN Posts AS p ON v.PostId = p.Id LEFT JOIN PostTags AS pt ON p.Id =... | sede |
CREATE TABLE table_name_48 (
goals_scored INTEGER,
points VARCHAR,
place VARCHAR
) | What is the average goals scored of the team who scored 44 points and placed higher than 5? | SELECT AVG(goals_scored) FROM table_name_48 WHERE points = "44" AND place > 5 | sql_create_context |
CREATE TABLE table_name_37 (
year_s__won VARCHAR,
total VARCHAR
) | What are the years won with a total of 282? | SELECT year_s__won FROM table_name_37 WHERE total = 282 | 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 intakeoutput (
in... | is the heartrate of patient 015-91239 last measured on the current intensive care unit visit greater than its value second to last measured on the current intensive care unit visit? | SELECT (SELECT vitalperiodic.heartrate FROM vitalperiodic WHERE vitalperiodic.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '015-91239') AND patient.unitdischargetime IS NULL... | eicu |
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... | get me the number of white ethnic background patients who had hyaline casts lab test. | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.ethnicity = "WHITE" AND lab.label = "Hyaline Casts" | mimicsql_data |
CREATE TABLE table_name_19 (
date VARCHAR,
event VARCHAR
) | What is the Date of the athlete in the shot put Event? | SELECT date FROM table_name_19 WHERE event = "shot put" | sql_create_context |
CREATE TABLE table_name_64 (
to_par VARCHAR,
player VARCHAR
) | What is the To Par of Fredrik Jacobson? | SELECT to_par FROM table_name_64 WHERE player = "fredrik jacobson" | sql_create_context |
CREATE TABLE table_74273 (
"Pick" real,
"Player" text,
"Position" text,
"Nationality" text,
"NHL team" text,
"College/junior/club team" text
) | Name the pick for matthew scorsune | SELECT "Pick" FROM table_74273 WHERE "Player" = 'Matthew Scorsune' | wikisql |
CREATE TABLE election (
Election_ID int,
Counties_Represented text,
District int,
Delegate text,
Party int,
First_Elected real,
Committee text
)
CREATE TABLE party (
Party_ID int,
Year real,
Party text,
Governor text,
Lieutenant_Governor text,
Comptroller text,
A... | Show the county name and population of all counties with a pie chart. | SELECT County_name, Population FROM county | nvbench |
CREATE TABLE procedures_icd (
row_id number,
subject_id number,
hadm_id number,
icd9_code text,
charttime time
)
CREATE TABLE d_icd_procedures (
row_id number,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE diagnoses_icd (
row_id number,
subject_id number,... | when did patient 69761 first come to the hospital this year through the clinic referral/premature? | SELECT admissions.admittime FROM admissions WHERE admissions.subject_id = 69761 AND admissions.admission_location = 'clinic referral/premature' AND DATETIME(admissions.admittime, 'start of year') = DATETIME(CURRENT_TIME(), 'start of year', '-0 year') ORDER BY admissions.admittime LIMIT 1 | mimic_iii |
CREATE TABLE table_name_23 (
rank INTEGER,
total VARCHAR,
gold VARCHAR,
bronze VARCHAR
) | What is the rank when there was less than 1 gold, 0 bronze, and more than 1 total? | SELECT SUM(rank) FROM table_name_23 WHERE gold < 1 AND bronze = 0 AND total > 1 | sql_create_context |
CREATE TABLE table_25085059_1 (
cfl_team VARCHAR,
college VARCHAR
) | What CFL team got their draft pick from North Dakota? | SELECT cfl_team FROM table_25085059_1 WHERE college = "North Dakota" | 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,
... | 09年10月8日到13年11月23日期间,患者84974890的369859指标是怎样的 | SELECT * FROM hz_info JOIN zzmzjzjlb JOIN jybgb JOIN jyjgzbb ON 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 = jyjgzbb.YLJGDM AND jybgb.BGDH = jyjgzbb.BGDH WHERE hz_i... | css |
CREATE TABLE table_204_296 (
id number,
"rank" number,
"athlete" text,
"qual" number,
"final" number,
"total" number,
"notes" text
) | what is the number of athletes from the us ? | SELECT COUNT("athlete") FROM table_204_296 WHERE "athlete" = 'usa' | squall |
CREATE TABLE pilot_record (
Record_ID int,
Pilot_ID int,
Aircraft_ID int,
Date text
)
CREATE TABLE pilot (
Pilot_ID int,
Pilot_name text,
Rank int,
Age int,
Nationality text,
Position text,
Join_Year int,
Team text
)
CREATE TABLE aircraft (
Aircraft_ID int,
Orde... | What are the different nationalities of pilots? Show each nationality and the number of pilots of each nationality Show bar chart, display in asc by the total number. | SELECT Nationality, COUNT(*) FROM pilot GROUP BY Nationality ORDER BY COUNT(*) | nvbench |
CREATE TABLE table_55802 (
"Year" real,
"Record" text,
"Finish" text,
"Manager" text,
"Playoffs" text
) | Tell me the average year with a record of 33-33 | SELECT AVG("Year") FROM table_55802 WHERE "Record" = '33-33' | wikisql |
CREATE TABLE table_name_65 (
status VARCHAR,
name VARCHAR
) | What is the current status of the person named Nicholls? | SELECT status FROM table_name_65 WHERE name = "nicholls" | sql_create_context |
CREATE TABLE domain_keyword (
did int,
kid int
)
CREATE TABLE cite (
cited int,
citing int
)
CREATE TABLE conference (
cid int,
homepage varchar,
name varchar
)
CREATE TABLE domain (
did int,
name varchar
)
CREATE TABLE publication_keyword (
kid int,
pid int
)
CREATE TAB... | return me the number of papers published in the VLDB conference before 2000 . | SELECT COUNT(DISTINCT (publication.title)) FROM conference, publication WHERE conference.name = 'VLDB' AND publication.cid = conference.cid AND publication.year < 2000 | academic |
CREATE TABLE table_72999 (
"Round" real,
"Date" text,
"Grand Prix" text,
"Circuit" text,
"Pole Position" text,
"Fastest Lap" text,
"Race Winner" text
) | Which round 5 Grand Prix had Daijiro Hiura at pole position? | SELECT "Grand Prix" FROM table_72999 WHERE "Pole Position" = 'Daijiro Hiura' AND "Round" = '5' | wikisql |
CREATE TABLE table_204_511 (
id number,
"number" number,
"driver" text,
"entrant" text,
"chassis" text,
"engine" text,
"tyre" text
) | who was the last driver to finish driving a jaguar ? | SELECT "driver" FROM table_204_511 WHERE "engine" = 'jaguar' ORDER BY "number" DESC LIMIT 1 | squall |
CREATE TABLE table_45864 (
"Player" text,
"Club" text,
"Games" real,
"Goals" real,
"Assists" real,
"Points" real
) | What is the average Assists, when Club is Iserlohn Roosters,when Points is 71, and when Goals is greater than 44? | SELECT AVG("Assists") FROM table_45864 WHERE "Club" = 'iserlohn roosters' AND "Points" = '71' AND "Goals" > '44' | 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... | 编码为4141380的医院非科室小儿营养科在2016年11月9日到2019年4月9日期间负责的所有医疗就诊记录都是什么? | SELECT * FROM gwyjzb WHERE gwyjzb.MED_SER_ORG_NO = '4141380' AND gwyjzb.IN_HOSP_DATE BETWEEN '2016-11-09' AND '2019-04-09' UNION SELECT * FROM fgwyjzb WHERE fgwyjzb.MED_SER_ORG_NO = '4141380' AND fgwyjzb.IN_HOSP_DATE BETWEEN '2016-11-09' AND '2019-04-09' EXCEPT SELECT * FROM gwyjzb WHERE gwyjzb.MED_SER_ORG_NO = '414138... | css |
CREATE TABLE table_name_7 (
points INTEGER,
team VARCHAR,
year VARCHAR
) | How many points did team Rothmans Honda have in 1992? | SELECT MIN(points) FROM table_name_7 WHERE team = "rothmans honda" AND year = 1992 | sql_create_context |
CREATE TABLE table_name_61 (
location VARCHAR,
year VARCHAR
) | What is the location in 2007? | SELECT location FROM table_name_61 WHERE year = 2007 | sql_create_context |
CREATE TABLE table_25030 (
"Date" text,
"Builder" text,
"Type" text,
"Operator" text,
"Number" text,
"Withdrawn" text,
"Status" text
) | List the date for number 1. | SELECT "Date" FROM table_25030 WHERE "Number" = '1' | 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 diagnoses_icd (
row_id numbe... | how many patients who had been diagnosed with embl suprfcl ves low ext since 2101? | SELECT COUNT(DISTINCT admissions.subject_id) FROM admissions WHERE admissions.hadm_id IN (SELECT diagnoses_icd.hadm_id FROM diagnoses_icd WHERE diagnoses_icd.icd9_code = (SELECT d_icd_diagnoses.icd9_code FROM d_icd_diagnoses WHERE d_icd_diagnoses.short_title = 'embl suprfcl ves low ext') AND STRFTIME('%y', diagnoses_ic... | mimic_iii |
CREATE TABLE table_60866 (
"South West DFL" text,
"Wins" real,
"Byes" real,
"Losses" real,
"Draws" real,
"Against" real
) | How much Against has Draws of 2, and Losses smaller than 4? | SELECT SUM("Against") FROM table_60866 WHERE "Draws" = '2' AND "Losses" < '4' | wikisql |
CREATE TABLE PostLinks (
Id number,
CreationDate time,
PostId number,
RelatedPostId number,
LinkTypeId number
)
CREATE TABLE CloseReasonTypes (
Id number,
Name text,
Description text
)
CREATE TABLE TagSynonyms (
Id number,
SourceTagName text,
TargetTagName text,
Creatio... | How many SO answers per month?. | SELECT u.DisplayName, MONTH(p.CreationDate) + YEAR(p.CreationDate) * 100 AS "mdate", COUNT(u.DisplayName) AS "num" FROM Posts AS p, Users AS u WHERE p.PostTypeId = 2 AND p.OwnerUserId IN ('##SOid##') AND p.OwnerUserId = u.Id GROUP BY MONTH(p.CreationDate) + YEAR(p.CreationDate) * 100, u.DisplayName ORDER BY Num DESC | sede |
CREATE TABLE table_name_76 (
chassis VARCHAR,
engine VARCHAR,
team VARCHAR,
tyres VARCHAR
) | What Chassis did Team BMS Scuderia Italia use with G Tyres and a Ferrari 037 3.5 v12 engine? | SELECT chassis FROM table_name_76 WHERE team = "bms scuderia italia" AND tyres = "g" AND engine = "ferrari 037 3.5 v12" | sql_create_context |
CREATE TABLE table_203_184 (
id number,
"tie no" number,
"home team" text,
"score" text,
"away team" text,
"attendance" text
) | how many points have the away teams scored all together ? | SELECT SUM("score") FROM table_203_184 | 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... | 在06年4月6日至18年5月21日内10元期间里,参保人李勇锐10元以内为小金额结算总共是多少次? | SELECT COUNT(*) FROM gwyjzb JOIN t_kc24 ON gwyjzb.MED_CLINIC_ID = t_kc24.MED_CLINIC_ID WHERE gwyjzb.PERSON_NM = '李勇锐' AND t_kc24.CLINIC_SLT_DATE BETWEEN '2006-04-06' AND '2018-05-21' AND t_kc24.MED_AMOUT <= 10 UNION SELECT COUNT(*) FROM fgwyjzb JOIN t_kc24 ON fgwyjzb.MED_CLINIC_ID = t_kc24.MED_CLINIC_ID WHERE fgwyjzb.P... | css |
CREATE TABLE table_name_67 (
loss VARCHAR,
date VARCHAR
) | How much did they lose by on April 26? | SELECT loss FROM table_name_67 WHERE date = "april 26" | sql_create_context |
CREATE TABLE table_51035 (
"Date" text,
"Series" text,
"Circuit" text,
"City / State" text,
"Winner" text,
"Team" text
) | What circuit has volvo cars australia as the team? | SELECT "Circuit" FROM table_51035 WHERE "Team" = 'volvo cars australia' | wikisql |
CREATE TABLE offering_instructor (
offering_instructor_id int,
offering_id int,
instructor_id int
)
CREATE TABLE student_record (
student_id int,
course_id int,
semester int,
grade varchar,
how varchar,
transfer_source varchar,
earn_credit varchar,
repeat_term varchar,
t... | Has the person Anuj Kumar ever taught the class BIOPHYS 521 ? | SELECT COUNT(*) > 0 FROM course, course_offering, instructor, offering_instructor WHERE course.course_id = course_offering.course_id AND course.department = 'BIOPHYS' AND course.number = 521 AND instructor.name LIKE '%Anuj Kumar%' AND offering_instructor.instructor_id = instructor.instructor_id AND offering_instructor.... | advising |
CREATE TABLE table_79392 (
"Model" text,
"Years" text,
"Engine code" text,
"Power" text,
"Torque" text
) | What model is the n m (lb ft)@1500-2500 torque? | SELECT "Model" FROM table_79392 WHERE "Torque" = 'n·m (lb·ft)@1500-2500' | wikisql |
CREATE TABLE table_63448 (
"Locks & Dam" text,
"Location [L ]" text,
"River Mile" real,
"Lock Side" text,
"Lock Lift/Drop (in feet)" text,
"Pool Length (miles)" text
) | What is the location of the river mile that is larger than 938.9, and Olmsted Locks and Dam? | SELECT "Location [L ]" FROM table_63448 WHERE "River Mile" > '938.9' AND "Locks & Dam" = 'olmsted locks and dam' | wikisql |
CREATE TABLE table_30449 (
"Player" text,
"Cap(s)" real,
"Goal(s)" real,
"International Debut" text,
"Club(s)" text
) | What club did the championship player come from who had 10 goals? | SELECT "Club(s)" FROM table_30449 WHERE "Goal(s)" = '10' | wikisql |
CREATE TABLE table_204_161 (
id number,
"name" text,
"1968 cf\ndesignator" text,
"place of\nmanufacture" text,
"primary\nrole(s)" text,
"service\nperiod" text,
"#\nused" number
) | which hawker had more in service . the hawker hart or the hawker hind ? | SELECT "name" FROM table_204_161 WHERE "name" IN ('hawker hart', 'hawker hind') ORDER BY "#\nused" DESC LIMIT 1 | squall |
CREATE TABLE table_23064 (
"Draw" real,
"Artist" text,
"Original" text,
"English Meaning" text,
"Language" text,
"Authors" text
) | What was the draw for the english meaning Eyes that Never Lie? | SELECT "Draw" FROM table_23064 WHERE "Language" = 'English' AND "English Meaning" = 'Eyes That Never Lie' | 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 procedures (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE demographic ... | how many patients below 68 years had the procedure long title venous catheterization for renal dialysis? | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.age < "68" AND procedures.long_title = "Venous catheterization for renal dialysis" | mimicsql_data |
CREATE TABLE table_47845 (
"Res." text,
"Record" text,
"Opponent" text,
"Method" text,
"Event" text,
"Round" real,
"Time" text
) | What is the average round for the record of 1-1? | SELECT AVG("Round") FROM table_47845 WHERE "Record" = '1-1' | 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... | what is the number of patients whose admission year is less than 2120 and lab test name is albumin, urine? | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.admityear < "2120" AND lab.label = "Albumin, Urine" | mimicsql_data |
CREATE TABLE table_1342149_18 (
party VARCHAR,
result VARCHAR,
district VARCHAR
) | What party's candidate was re-elected in the Louisiana 6 district? | SELECT party FROM table_1342149_18 WHERE result = "Re-elected" AND district = "Louisiana 6" | sql_create_context |
CREATE TABLE Staff_Roles (
role_code VARCHAR(10),
role_description VARCHAR(255)
)
CREATE TABLE Document_Types (
document_type_code VARCHAR(10),
document_description VARCHAR(255)
)
CREATE TABLE Grants (
grant_id INTEGER,
organisation_id INTEGER,
grant_amount DECIMAL(19,4),
grant_start_d... | A bar chart for listing the number of the description of the outcomes for all projects, and could you list by the X in asc? | SELECT outcome_description, COUNT(outcome_description) FROM Research_Outcomes AS T1 JOIN Project_Outcomes AS T2 ON T1.outcome_code = T2.outcome_code GROUP BY outcome_description ORDER BY outcome_description | nvbench |
CREATE TABLE table_name_52 (
tennis VARCHAR,
school VARCHAR
) | What is the tennis status for youngstown state? | SELECT tennis FROM table_name_52 WHERE school = "youngstown state" | sql_create_context |
CREATE TABLE table_name_2 (
country VARCHAR,
score VARCHAR
) | What Country scored 72-65-73=210? | SELECT country FROM table_name_2 WHERE score = 72 - 65 - 73 = 210 | sql_create_context |
CREATE TABLE institution (
institution VARCHAR,
LOCATION VARCHAR,
founded VARCHAR,
TYPE VARCHAR
) | Show the names and locations of institutions that are founded after 1990 and have the type 'Private'. | SELECT institution, LOCATION FROM institution WHERE founded > 1990 AND TYPE = 'Private' | sql_create_context |
CREATE TABLE patients (
row_id number,
subject_id number,
gender text,
dob time,
dod time
)
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
)
CR... | in 10/this year, what was the minimum bands value for patient 23002? | SELECT MIN(labevents.valuenum) FROM labevents WHERE labevents.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 23002) AND labevents.itemid IN (SELECT d_labitems.itemid FROM d_labitems WHERE d_labitems.label = 'bands') AND DATETIME(labevents.charttime, 'start of year') = DATETIME(CURRE... | mimic_iii |
CREATE TABLE domain_publication (
did int,
pid int
)
CREATE TABLE journal (
homepage varchar,
jid int,
name varchar
)
CREATE TABLE domain_conference (
cid int,
did int
)
CREATE TABLE domain (
did int,
name varchar
)
CREATE TABLE conference (
cid int,
homepage varchar,
... | return me the number of the keywords related to ' H. V. Jagadish ' . | SELECT COUNT(DISTINCT (keyword.keyword)) FROM author, keyword, publication, publication_keyword, writes WHERE author.name = 'H. V. Jagadish' AND publication_keyword.kid = keyword.kid AND publication.pid = publication_keyword.pid AND writes.aid = author.aid AND writes.pid = publication.pid | academic |
CREATE TABLE gsi (
course_offering_id int,
student_id int
)
CREATE TABLE course_tags_count (
course_id int,
clear_grading int,
pop_quiz int,
group_projects int,
inspirational int,
long_lectures int,
extra_credit int,
few_tests int,
good_feedback int,
tough_tests int,
... | Are there courses I must take before ITALIAN 235 ? | SELECT DISTINCT COURSE_0.department, COURSE_0.name, COURSE_0.number FROM course AS COURSE_0, course AS COURSE_1, course_prerequisite WHERE COURSE_0.course_id = course_prerequisite.pre_course_id AND NOT COURSE_0.course_id IN (SELECT STUDENT_RECORDalias0.course_id FROM student_record AS STUDENT_RECORDalias0 WHERE STUDENT... | advising |
CREATE TABLE table_38628 (
"Call sign" text,
"Frequency MHz" text,
"City of license" text,
"ERP W" real,
"Class" text,
"FCC info" text
) | What is the FCC information of 104.5 fm frequency? | SELECT "FCC info" FROM table_38628 WHERE "Frequency MHz" = '104.5 fm' | wikisql |
CREATE TABLE table_name_48 (
score VARCHAR,
player VARCHAR,
country VARCHAR,
place VARCHAR
) | Can you tell me the Score that has the Country of united states, and the Place of t2, and the Player of tom watson? | SELECT score FROM table_name_48 WHERE country = "united states" AND place = "t2" AND player = "tom watson" | sql_create_context |
CREATE TABLE employment (
Company_ID int,
People_ID int,
Year_working int
)
CREATE TABLE company (
Company_ID real,
Name text,
Headquarters text,
Industry text,
Sales_in_Billion real,
Profits_in_Billion real,
Assets_in_Billion real,
Market_Value_in_Billion real
)
CREATE TAB... | How many companies are there in each headquarters? Return a stacked bar chart to group by industry and headquearters, and count by headquarters, and rank X from high to low order. | SELECT Headquarters, COUNT(Headquarters) FROM company GROUP BY Industry, Headquarters ORDER BY Headquarters DESC | nvbench |
CREATE TABLE table_79076 (
"Number" real,
"Year Start" real,
"Year End" real,
"Name" text,
"Home Club" text
) | Which Number has a Year Start smaller than 1874, and a Year End larger than 1873? | SELECT MAX("Number") FROM table_79076 WHERE "Year Start" < '1874' AND "Year End" > '1873' | wikisql |
CREATE TABLE table_41624 (
"Rider" text,
"Bike" text,
"Laps" real,
"Time" text,
"Grid" real
) | What is the Bike with 18 laps and +41.280 as the time? | SELECT "Bike" FROM table_41624 WHERE "Laps" = '18' AND "Time" = '+41.280' | wikisql |
CREATE TABLE table_16078390_2 (
location VARCHAR,
team_nickname VARCHAR
) | Where is the university located that's nicknamed the Wolves? | SELECT location FROM table_16078390_2 WHERE team_nickname = "Wolves" | sql_create_context |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.