context stringlengths 11 9.12k | question stringlengths 0 1.06k | SQL stringlengths 2 4.44k | source stringclasses 28
values |
|---|---|---|---|
CREATE TABLE regions (
REGION_ID decimal(5,0),
REGION_NAME varchar(25)
)
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),
... | For those employees who was hired before 2002-06-21, visualize a bar chart about the distribution of hire_date and the sum of manager_id bin hire_date by time, order by the Y in descending. | SELECT HIRE_DATE, SUM(MANAGER_ID) FROM employees WHERE HIRE_DATE < '2002-06-21' ORDER BY SUM(MANAGER_ID) DESC | nvbench |
CREATE TABLE table_2986 (
"No. in series" real,
"No. in season" real,
"Title" text,
"Directed by" text,
"Written by" text,
"Original air date" text,
"Production code" real
) | Name the number of airdates for 14 | SELECT COUNT("Original air date") FROM table_2986 WHERE "No. in season" = '14' | wikisql |
CREATE TABLE table_name_53 (
crowd VARCHAR,
home_team VARCHAR
) | What was the crowd size when the home team was Hawthorn? | SELECT crowd FROM table_name_53 WHERE home_team = "hawthorn" | sql_create_context |
CREATE TABLE table_65309 (
"Points" real,
"Name" text,
"Club" text,
"Tries" real,
"Drop" real
) | How many Points have a Name of stephen myler, and Tries smaller than 0? | SELECT SUM("Points") FROM table_65309 WHERE "Name" = 'stephen myler' AND "Tries" < '0' | wikisql |
CREATE TABLE table_42381 (
"Date" text,
"Tournament" text,
"Surface" text,
"Opponent" text,
"Score" text
) | What was the surface for the opponent Roger Federer? | SELECT "Surface" FROM table_42381 WHERE "Opponent" = 'roger federer' | 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 intakeoutput (
in... | when was patient 015-59871's heartrate the last time measured greater than 124.0 on the last intensive care unit visit? | SELECT vitalperiodic.observationtime FROM vitalperiodic WHERE vitalperiodic.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '015-59871') AND NOT patient.unitdischargetime IS NU... | eicu |
CREATE TABLE table_11674 (
"Race" text,
"Date" text,
"Location" text,
"Pole Position" text,
"Fastest Lap" text,
"Race Winner" text,
"Constructor" text,
"Report" text
) | Who was the Constructor for the Long Beach race with Niki Lauda as winner? | SELECT "Constructor" FROM table_11674 WHERE "Race Winner" = 'niki lauda' AND "Location" = 'long beach' | wikisql |
CREATE TABLE table_1341472_34 (
result VARCHAR,
district VARCHAR
) | Name the result for New York 11 | SELECT result FROM table_1341472_34 WHERE district = "New York 11" | sql_create_context |
CREATE TABLE diagnosis (
diagnosisid number,
patientunitstayid number,
diagnosisname text,
diagnosistime time,
icd9code text
)
CREATE TABLE microlab (
microlabid number,
patientunitstayid number,
culturesite text,
organism text,
culturetakentime time
)
CREATE TABLE cost (
c... | show the differences in the paco2 of patient 012-37411 second measured on the current hospital visit compared to the first value measured on the current 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 = '012-37411' AND patient.hospitaldischargetime IS NULL)) AND lab.labname = 'paco2... | eicu |
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... | how many patients admitted before the year 2158 had lab test for myelocytes? | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.admityear < "2158" AND lab.label = "Myelocytes" | mimicsql_data |
CREATE TABLE table_36621 (
"Fraction" text,
"Ellipsis" text,
"Vinculum" text,
"Dots" text,
"Parentheses" text
) | What fraction has a value for dots of 0.\dot{3}? | SELECT "Fraction" FROM table_36621 WHERE "Dots" = '0.\dot{3}' | wikisql |
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,
... | 列出患者70892680所有检验结果指标记录中的检测方法在2012年3月29日到2020年7月23日之间都是什么? | SELECT jyjgzbb.JCFF FROM hz_info JOIN mzjzjlb JOIN jyjgzbb ON hz_info.YLJGDM = mzjzjlb.YLJGDM AND hz_info.KH = mzjzjlb.KH AND hz_info.KLX = mzjzjlb.KLX AND mzjzjlb.YLJGDM = jyjgzbb.jybgb_YLJGDM_MZJZJLB AND mzjzjlb.JZLSH = jyjgzbb.jybgb_JZLSH_MZJZJLB WHERE hz_info.RYBH = '70892680' AND jyjgzbb.JYRQ BETWEEN '2012-03-29' ... | css |
CREATE TABLE table_name_98 (
year INTEGER,
competition VARCHAR
) | What is the Year the competition the british empire and commonwealth games were held? | SELECT SUM(year) FROM table_name_98 WHERE competition = "british empire and commonwealth games" | sql_create_context |
CREATE TABLE table_1057 (
"Stage" real,
"Winner" text,
"General classification" text,
"Points classification" text,
"Mountains classification" text,
"Young rider classification" text,
"Team classification" text,
"Combativity award" text
) | Who won the stage when Fumiyuki Beppu won the combativity award? | SELECT "Winner" FROM table_1057 WHERE "Combativity award" = 'Fumiyuki Beppu' | wikisql |
CREATE TABLE table_13665 (
"Driver" text,
"Starts" real,
"Finishes" real,
"Wins" real,
"Podiums" real,
"Stage wins" real,
"Points" real
) | What is the average number of podiums for drivers with under 12 finishes and under 1 start? | SELECT AVG("Podiums") FROM table_13665 WHERE "Finishes" < '12' AND "Starts" < '1' | wikisql |
CREATE TABLE table_2159506_3 (
state__class_ VARCHAR,
reason_for_change VARCHAR
) | Name the state class for resigned november 3, 1964 | SELECT state__class_ FROM table_2159506_3 WHERE reason_for_change = "Resigned November 3, 1964" | sql_create_context |
CREATE TABLE admissions (
row_id number,
subject_id number,
hadm_id number,
admittime time,
dischtime time,
admission_type text,
admission_location text,
discharge_location text,
insurance text,
language text,
marital_status text,
ethnicity text,
age number
)
CREATE ... | since 2103 how many patients were diagnosed with hypertension nos in the same month after they had previously been diagnosed with hyperlipidemia nec/nos? | 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 = 'hypertension nos')... | mimic_iii |
CREATE TABLE table_44065 (
"Season" text,
"Games" real,
"Yellow Cards" real,
"Red Cards" real,
"Average Cards a game" real
) | Which Average Cards a game has a Season of 2004/2005, and a Red Cards larger than 3? | SELECT MIN("Average Cards a game") FROM table_44065 WHERE "Season" = '2004/2005' AND "Red Cards" > '3' | wikisql |
CREATE TABLE table_204_42 (
id number,
"season" number,
"level" text,
"division" text,
"section" text,
"position" text,
"movements" text
) | what was the last position that the team achieved ? | SELECT "position" FROM table_204_42 ORDER BY "season" DESC LIMIT 1 | squall |
CREATE TABLE table_204_992 (
id number,
"team" text,
"manager" text,
"city" text,
"stadium" text,
"capacity" text
) | what is the most amount of people that can attend a deportivo saprissa game in ricardo saprissa ? | SELECT "capacity" FROM table_204_992 WHERE "team" = 'deportivo saprissa' AND "stadium" = 'ricardo saprissa' | squall |
CREATE TABLE t_kc21 (
MED_CLINIC_ID text,
OVERALL_CD_ORG text,
OVERALL_CD_PERSON text,
COMP_ID text,
PERSON_ID text,
PERSON_NM text,
IDENTITY_CARD text,
SOC_SRT_CARD text,
PERSON_SEX number,
PERSON_AGE number,
IN_HOSP_DATE time,
OUT_HOSP_DATE time,
DIFF_PLACE_FLG numb... | 查询入院诊断为持续的躯体形式的疼痛障碍的最低和最高医疗费总额,主要针对医院7280779的医疗记录 | SELECT MIN(MED_AMOUT), MAX(MED_AMOUT) FROM t_kc24 WHERE MED_CLINIC_ID IN (SELECT MED_CLINIC_ID FROM t_kc21 WHERE MED_SER_ORG_NO = '7280779' AND IN_DIAG_DIS_NM = '持续的躯体形式的疼痛障碍') | css |
CREATE TABLE table_55171 (
"Home team" text,
"Home team score" text,
"Away team" text,
"Away team score" text,
"Venue" text,
"Crowd" real,
"Date" text
) | What date did Carlton play as the away team? | SELECT "Date" FROM table_55171 WHERE "Away team" = 'carlton' | 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 admission year is less than 2184 and diagnoses icd9 code is 72888? | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE demographic.admityear < "2184" AND diagnoses.icd9_code = "72888" | mimicsql_data |
CREATE TABLE table_name_41 (
player VARCHAR,
date VARCHAR
) | Which player played on 07/06/1997? | SELECT player FROM table_name_41 WHERE date = "07/06/1997" | sql_create_context |
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,
... | find the number of patients who are married and have been diagnosed with pyelonephritis, unspecified. | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE demographic.marital_status = "MARRIED" AND diagnoses.long_title = "Pyelonephritis, unspecified" | mimicsql_data |
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... | 在11年9月23日到2013年3月8日期间医疗机构8653860下属的科室289处理的住院就诊数统共有多少? | SELECT COUNT(*) FROM wdmzjzjlb WHERE wdmzjzjlb.YLJGDM = '8653860' AND wdmzjzjlb.JZKSDM = '289' AND wdmzjzjlb.RYDJSJ BETWEEN '2011-09-23' AND '2013-03-08' UNION SELECT COUNT(*) FROM bdmzjzjlb WHERE bdmzjzjlb.YLJGDM = '8653860' AND bdmzjzjlb.JZKSDM = '289' AND bdmzjzjlb.RYDJSJ BETWEEN '2011-09-23' AND '2013-03-08' | css |
CREATE TABLE mzjybgb (
BBCJBW text,
BBDM text,
BBMC text,
BBZT number,
BGDH number,
BGJGDM text,
BGJGMC text,
BGRGH text,
BGRQ time,
BGRXM text,
BGSJ time,
CJRQ time,
JSBBRQSJ time,
JSBBSJ time,
JYBBH text,
JYJGMC text,
JYJSGH text,
JYJSQM text,
... | 编号为S25.293疾病的患者其身体里降钙素原的参考值范围中的上限与下限分别达到多些? | SELECT jyjgzbb.CKZFWXX, jyjgzbb.CKZFWSX FROM mzjzjlb JOIN zyjybgb JOIN jyjgzbb ON mzjzjlb.YLJGDM = zyjybgb.YLJGDM_MZJZJLB AND mzjzjlb.JZLSH = zyjybgb.JZLSH_MZJZJLB AND zyjybgb.YLJGDM = jyjgzbb.YLJGDM AND zyjybgb.BGDH = jyjgzbb.BGDH WHERE mzjzjlb.JZZDBM = 'S25.293' AND jyjgzbb.JCZBMC = '降钙素原' UNION SELECT jyjgzbb.CKZFWX... | css |
CREATE TABLE table_name_62 (
years VARCHAR,
model VARCHAR
) | What years show Model of 2.0 tdi (cr) dpf? | SELECT years FROM table_name_62 WHERE model = "2.0 tdi (cr) dpf" | sql_create_context |
CREATE TABLE Third_Party_Companies (
company_id INTEGER,
company_type VARCHAR(5),
company_name VARCHAR(255),
company_address VARCHAR(255),
other_company_details VARCHAR(255)
)
CREATE TABLE Skills (
skill_id INTEGER,
skill_code VARCHAR(20),
skill_description VARCHAR(255)
)
CREATE TABLE ... | Show the number of engineers for different other details in a bar chart. | SELECT other_details, COUNT(other_details) FROM Maintenance_Engineers AS T1 JOIN Engineer_Skills AS T2 ON T1.engineer_id = T2.engineer_id JOIN Skills AS T3 ON T2.skill_id = T3.skill_id GROUP BY other_details | nvbench |
CREATE TABLE table_name_54 (
name VARCHAR,
builder VARCHAR
) | What is Name, when Builder is 'Kerr Stuart'? | SELECT name FROM table_name_54 WHERE builder = "kerr stuart" | sql_create_context |
CREATE TABLE table_15555661_2 (
percentage_of_total_area VARCHAR,
percentage_protected VARCHAR
) | What is the percentage of total area in the ecozone that the percentage protected is 8.06? | SELECT percentage_of_total_area FROM table_15555661_2 WHERE percentage_protected = "8.06" | sql_create_context |
CREATE TABLE table_name_80 (
weight VARCHAR,
pos VARCHAR,
team VARCHAR
) | What is the total weight of players who play the G position for the Los Angeles D-Fenders? | SELECT COUNT(weight) FROM table_name_80 WHERE pos = "g" AND team = "los angeles d-fenders" | sql_create_context |
CREATE TABLE table_name_57 (
points VARCHAR,
draw INTEGER
) | What is the number of points when the draws are more than 1? | SELECT COUNT(points) FROM table_name_57 WHERE draw > 1 | sql_create_context |
CREATE TABLE table_78981 (
"Perpetrator" text,
"Date" text,
"Year" real,
"Location" text,
"Country" text,
"Killed" real,
"Injured" text
) | What is Injured, when Country is 'Afghanistan'? | SELECT "Injured" FROM table_78981 WHERE "Country" = 'afghanistan' | wikisql |
CREATE TABLE table_27529608_21 (
qtr_final__week_ INTEGER,
name_name_of_act VARCHAR
) | What is the quarterfinal week for Austin Anderson? | SELECT MIN(qtr_final__week_) FROM table_27529608_21 WHERE name_name_of_act = "Austin Anderson" | sql_create_context |
CREATE TABLE countries (
COUNTRY_ID varchar(2),
COUNTRY_NAME varchar(40),
REGION_ID decimal(10,0)
)
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 T... | For those employees who do not work in departments with managers that have ids between 100 and 200, what is the relationship between employee_id and manager_id ? | SELECT EMPLOYEE_ID, 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_30354 (
"Late Old English (Anglian)" text,
"Early Middle English" text,
"Late Middle English" text,
"Early Modern English" text,
"Modern English" text,
"Example" text
) | What is the Early Modern English phonology used in the example b g > 'bough'; pl g > pl h > 'plough'? | SELECT "Early Modern English" FROM table_30354 WHERE "Example" = 'bōg > "bough"; plōg > plōh > "plough' | wikisql |
CREATE TABLE table_name_10 (
week_4 VARCHAR,
week_1 VARCHAR
) | What kind of Week 4 has a Week 1 of sheila levell? | SELECT week_4 FROM table_name_10 WHERE week_1 = "sheila levell" | sql_create_context |
CREATE TABLE table_18230 (
"District" text,
"Incumbent" text,
"Party" text,
"First elected" real,
"Result" text,
"Candidates" text
) | Which party does Del Latta belong to? | SELECT "Party" FROM table_18230 WHERE "Incumbent" = 'Del Latta' | wikisql |
CREATE TABLE table_57684 (
"Home team" text,
"Home team score" text,
"Away team" text,
"Away team score" text,
"Venue" text,
"Crowd" real,
"Date" text
) | What is the away team that played at punt road oval? | SELECT "Away team" FROM table_57684 WHERE "Venue" = 'punt road oval' | wikisql |
CREATE TABLE Manufacturers (
Code INTEGER,
Name VARCHAR(255),
Headquarter VARCHAR(255),
Founder VARCHAR(255),
Revenue REAL
)
CREATE TABLE Products (
Code INTEGER,
Name VARCHAR(255),
Price DECIMAL,
Manufacturer INTEGER
) | For those records from the products and each product's manufacturer, visualize a bar chart about the distribution of name and the average of price , and group by attribute name. | SELECT T2.Name, T1.Price FROM Products AS T1 JOIN Manufacturers AS T2 ON T1.Manufacturer = T2.Code GROUP BY T2.Name | nvbench |
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 allergy (
allergy... | when was the last time patient 002-41152 was having greater than 86.0 sao2 on last month/16? | SELECT vitalperiodic.observationtime FROM vitalperiodic WHERE vitalperiodic.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '002-41152')) AND vitalperiodic.sao2 > 86.0 AND NOT ... | eicu |
CREATE TABLE table_22834834_3 (
year INTEGER,
opponent_in_the_final VARCHAR
) | What is the last year that Andre Agassi was the final opponent? | SELECT MAX(year) FROM table_22834834_3 WHERE opponent_in_the_final = "Andre Agassi" | sql_create_context |
CREATE TABLE table_name_49 (
method VARCHAR,
event VARCHAR
) | What is Method, when Event is 'Reality Submission Fighting 2'? | SELECT method FROM table_name_49 WHERE event = "reality submission fighting 2" | 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... | what is the number of patients whose admission type is elective and blood as their lab test fluid? | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.admission_type = "ELECTIVE" AND lab.fluid = "Blood" | mimicsql_data |
CREATE TABLE table_name_57 (
finishes INTEGER,
driver VARCHAR,
podiums VARCHAR,
stage_wins VARCHAR
) | What's the finishes for Lambros Athanassoulas having 0 podiums and 0 stage wins? | SELECT SUM(finishes) FROM table_name_57 WHERE podiums = 0 AND stage_wins = 0 AND driver = "lambros athanassoulas" | 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... | 看一下患者苏智敏被门诊诊断为疾病G27.457时,直接胆红素二代的结果定量及其单位是怎样的 | SELECT jyjgzbb.JCZBJGDL, jyjgzbb.JCZBJGDW FROM person_info JOIN hz_info JOIN txmzjzjlb JOIN jybgb JOIN jyjgzbb ON person_info.RYBH = hz_info.RYBH AND hz_info.YLJGDM = txmzjzjlb.YLJGDM AND hz_info.KH = txmzjzjlb.KH AND hz_info.KLX = txmzjzjlb.KLX AND txmzjzjlb.YLJGDM = jybgb.YLJGDM_MZJZJLB AND txmzjzjlb.JZLSH = jybgb.JZ... | css |
CREATE TABLE table_3799 (
"Branding" text,
"Callsign" text,
"Frequency" text,
"Power (kW)" text,
"Location" text
) | What is the frequency of the station located in polangui, albay? | SELECT "Frequency" FROM table_3799 WHERE "Location" = 'Polangui, Albay' | wikisql |
CREATE TABLE table_12303563_1 (
winners INTEGER,
nation VARCHAR
) | How many times did kingfisher east bengal fc win? | SELECT MIN(winners) FROM table_12303563_1 WHERE nation = "Kingfisher East Bengal FC" | sql_create_context |
CREATE TABLE table_name_76 (
partial_thromboplastin_time VARCHAR,
prothrombin_time VARCHAR,
condition VARCHAR
) | Which Partial thromboplastin time has a Prothrombin time of prolonged and a Condition of factor v deficiency? | SELECT partial_thromboplastin_time FROM table_name_76 WHERE prothrombin_time = "prolonged" AND condition = "factor v deficiency" | sql_create_context |
CREATE TABLE table_53377 (
"Rd #" real,
"Pick #" real,
"Player" text,
"Team (League)" text,
"Reg GP" real
) | What is the total of pick numbers with a Reg GP larger than 0? | SELECT COUNT("Pick #") FROM table_53377 WHERE "Reg GP" > '0' | wikisql |
CREATE TABLE table_name_83 (
division VARCHAR,
team VARCHAR,
season VARCHAR
) | What division is Traktor Tashkent in 2005? | SELECT division FROM table_name_83 WHERE team = "traktor tashkent" AND season = "2005" | sql_create_context |
CREATE TABLE table_name_90 (
race_leader VARCHAR,
course VARCHAR
) | Who's the race leader of Cuneo to Turin? | SELECT race_leader FROM table_name_90 WHERE course = "cuneo to turin" | sql_create_context |
CREATE TABLE PostTypes (
Id number,
Name text
)
CREATE TABLE ReviewRejectionReasons (
Id number,
Name text,
Description text,
PostTypeId number
)
CREATE TABLE ReviewTaskResults (
Id number,
ReviewTaskId number,
ReviewTaskResultTypeId number,
CreationDate time,
RejectionReas... | TOP 50 Posts - Hibernate - pt-br. | SELECT Posts.Id AS "post_link", CreationDate, ViewCount, Score FROM Posts INNER JOIN PostTags ON Posts.Id = PostTags.PostId INNER JOIN Tags ON Tags.Id = PostTags.TagId WHERE LOWER(Tags) LIKE '%hibernate%' AND LOWER(Tags.TagName) = 'hibernate' ORDER BY Score DESC, ViewCount DESC, CreationDate DESC LIMIT 50 | sede |
CREATE TABLE table_name_60 (
method VARCHAR,
opponent VARCHAR
) | Tell me the method for stanislav nuschik | SELECT method FROM table_name_60 WHERE opponent = "stanislav nuschik" | sql_create_context |
CREATE TABLE table_name_57 (
gold INTEGER,
bronze VARCHAR,
silver VARCHAR,
rank VARCHAR
) | What is the sum of Gold, when Silver is greater than 6, when Rank is 1, and when Bronze is less than 61? | SELECT SUM(gold) FROM table_name_57 WHERE silver > 6 AND rank = "1" AND bronze < 61 | sql_create_context |
CREATE TABLE table_70646 (
"Player" text,
"Date" text,
"Original Team" text,
"Offer Team" text,
"Result" text
) | What date has Vancouver Canucks as the original team, Ryan Kesler as the player, and matched as the Result? | SELECT "Date" FROM table_70646 WHERE "Original Team" = 'vancouver canucks' AND "Result" = 'matched' AND "Player" = 'ryan kesler' | wikisql |
CREATE TABLE table_26631526_1 (
release_date___xbox360__ VARCHAR,
artist VARCHAR
) | Name the release date xbox 360 for sea wolf | SELECT release_date___xbox360__ FROM table_26631526_1 WHERE artist = "Sea Wolf" | sql_create_context |
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 outputevents (
row_id number,
subject_id number,
hadm_id number,
icustay_id number,
charttime ... | what would be patient 30826's monthly minimum weight this year? | SELECT MIN(chartevents.valuenum) FROM chartevents WHERE chartevents.icustay_id IN (SELECT icustays.icustay_id FROM icustays WHERE icustays.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 30826)) AND chartevents.itemid IN (SELECT d_items.itemid FROM d_items WHERE d_items.label = 'admi... | mimic_iii |
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 number of patients had procedure under procedure icd9 code 4341? | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE procedures.icd9_code = "4341" | mimicsql_data |
CREATE TABLE table_66595 (
"Round" real,
"Date" text,
"Home" text,
"Result" text,
"Visitor" text,
"Venue" text,
"Attendance" real
) | Which Result has a Round larger than 17? | SELECT "Result" FROM table_66595 WHERE "Round" > '17' | wikisql |
CREATE TABLE table_name_82 (
silver INTEGER,
bronze INTEGER
) | What is the sum of all silver medals with more than 2 bronze? | SELECT SUM(silver) FROM table_name_82 WHERE bronze > 2 | sql_create_context |
CREATE TABLE diagnosis (
diagnosisid number,
patientunitstayid number,
diagnosisname text,
diagnosistime time,
icd9code text
)
CREATE TABLE allergy (
allergyid number,
patientunitstayid number,
drugname text,
allergyname text,
allergytime time
)
CREATE TABLE vitalperiodic (
... | tell me the three diagnoses that had the lowest four year survival rate? | SELECT t4.diagnosisname FROM (SELECT t3.diagnosisname, DENSE_RANK() OVER (ORDER BY t3.c1 DESC) AS c2 FROM (SELECT t2.diagnosisname, 100 - SUM(CASE WHEN patient.hospitaldischargestatus = 'alive' THEN 1 WHEN STRFTIME('%j', patient.hospitaldischargetime) - STRFTIME('%j', t2.diagnosistime) > 4 * 365 THEN 1 ELSE 0 END) * 10... | eicu |
CREATE TABLE table_37277 (
"Date" text,
"Episode" real,
"Performer 1" text,
"Performer 2" text,
"Performer 3" text,
"Performer 4" text
) | What is the lowest episode number where john bird was the 4th performer? | SELECT MIN("Episode") FROM table_37277 WHERE "Performer 4" = 'john bird' | wikisql |
CREATE TABLE diagnoses (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE lab (
subject_id text,
hadm_id text,
itemid text,
charttime text,
flag text,
value_unit text,
label text,
fluid text
)
CREATE TABLE prescriptions... | what is the number of patients whose year of birth is less than 2092 and diagnoses short title is adv eff cardiovasc nec? | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE demographic.dob_year < "2092" AND diagnoses.short_title = "Adv eff cardiovasc NEC" | mimicsql_data |
CREATE TABLE table_name_93 (
nickname VARCHAR,
club VARCHAR
) | What was the nickname of the team in the East Geelong club? | SELECT nickname FROM table_name_93 WHERE club = "east geelong" | sql_create_context |
CREATE TABLE fgwyjzb (
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,
... | 整理出患者年龄在3岁以下的医疗记录的平均医疗费总额 | SELECT AVG(t_kc24.MED_AMOUT) FROM t_kc24 WHERE t_kc24.MED_CLINIC_ID IN (SELECT gwyjzb.MED_CLINIC_ID FROM gwyjzb WHERE gwyjzb.PERSON_AGE <= 3 UNION SELECT fgwyjzb.MED_CLINIC_ID FROM fgwyjzb WHERE fgwyjzb.PERSON_AGE <= 3) | css |
CREATE TABLE flight_leg (
flight_id int,
leg_number int,
leg_flight int
)
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 TA... | i need the earliest flight from DENVER to BOSTON that serves DINNER | 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, food_service WHERE ((CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'BOSTON' AND flight.to_airport = AIRPORT_SERVICE_1.airport_code AND food_se... | atis |
CREATE TABLE table_26087 (
"Rank" real,
"Rider" text,
"Mon 24 Aug" text,
"Tues 25 Aug" text,
"Wed 26 Aug" text,
"Thurs 27 Aug" text,
"Fri 28 Aug" text,
"Sat 29 Aug" text
) | What time was achieved on Saturday 29th August by the rider who recorded 25' 01.89 90.438mph on Friday 28th August? | SELECT "Sat 29 Aug" FROM table_26087 WHERE "Fri 28 Aug" = '25'' 01.89 90.438mph' | wikisql |
CREATE TABLE region (
Region_ID int,
Region_name text,
Date text,
Label text,
Format text,
Catalogue text
)
CREATE TABLE party_events (
Event_ID int,
Event_Name text,
Party_ID int,
Member_in_charge_ID int
)
CREATE TABLE party (
Party_ID int,
Minister text,
Took_offi... | Compare the total number of each minister using a bar graph, rank in descending by the x-axis. | SELECT Minister, COUNT(Minister) FROM party GROUP BY Minister ORDER BY Minister DESC | nvbench |
CREATE TABLE table_203_724 (
id number,
"rank" number,
"nation" text,
"gold" number,
"silver" number,
"bronze" number,
"total" number
) | what nation leads the medal count ? | SELECT "nation" FROM table_203_724 ORDER BY "total" DESC LIMIT 1 | squall |
CREATE TABLE table_50269 (
"City" text,
"Country" text,
"IATA" text,
"ICAO" text,
"Airport" text
) | What is the ICAO for Seewoosagur Ramgoolam airport? | SELECT "ICAO" FROM table_50269 WHERE "Airport" = 'seewoosagur ramgoolam airport' | 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 lab (
subject_id text,
hadm_id text,
itemid text,
charttime text,
flag text,
value_unit text,... | give me the number of patients whose gender is f and lab test name is vancomycin? | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.gender = "F" AND lab.label = "Vancomycin" | mimicsql_data |
CREATE TABLE table_40200 (
"Date" text,
"Tournament" text,
"Surface" text,
"Opponent in the final" text,
"Score" text
) | For the tournament played on a hard surface and ending with a score of Walkover, who was the Finals opponent? | SELECT "Opponent in the final" FROM table_40200 WHERE "Surface" = 'hard' AND "Score" = 'walkover' | wikisql |
CREATE TABLE table_74979 (
"Round" real,
"Pick #" real,
"Overall" real,
"Name" text,
"Position" text,
"College" text
) | What was the first Round with a Pick # greater than 1 and 140 Overall? | SELECT MIN("Round") FROM table_74979 WHERE "Pick #" > '1' AND "Overall" > '140' | wikisql |
CREATE TABLE table_5899 (
"Player" text,
"Touchdowns" real,
"Extra points" real,
"Field goals" real,
"Points" real
) | Which Extra points is the lowest one that has a Player of rheinschild, and Touchdowns larger than 1? | SELECT MIN("Extra points") FROM table_5899 WHERE "Player" = 'rheinschild' AND "Touchdowns" > '1' | wikisql |
CREATE TABLE table_57286 (
"Date" text,
"Visitor" text,
"Score" text,
"Home" text,
"Leading scorer" text,
"Record" text
) | Who was the visiting team that played against the Kings? | SELECT "Visitor" FROM table_57286 WHERE "Home" = 'kings' | wikisql |
CREATE TABLE table_26040604_1 (
die_size__mm_2__ INTEGER,
sm_count VARCHAR
) | What is the minimum die size for an SM count of exactly 2? | SELECT MIN(die_size__mm_2__) FROM table_26040604_1 WHERE sm_count = 2 | sql_create_context |
CREATE TABLE table_name_70 (
team VARCHAR,
high_points VARCHAR
) | What team has a high score with tracy mcgrady (24)? | SELECT team FROM table_name_70 WHERE high_points = "tracy mcgrady (24)" | sql_create_context |
CREATE TABLE table_43692 (
"Place" text,
"Player" text,
"Country" text,
"Score" real,
"To par" text
) | What is the country of player chi-chi rodr guez, who has an e to par? | SELECT "Country" FROM table_43692 WHERE "To par" = 'e' AND "Player" = 'chi-chi rodríguez' | wikisql |
CREATE TABLE table_66871 (
"Region" text,
"Date" text,
"Label" text,
"Format" text,
"Catalog" text,
"Note" text
) | Name the label with catalog of mhcl-20005 | SELECT "Label" FROM table_66871 WHERE "Catalog" = 'mhcl-20005' | wikisql |
CREATE TABLE table_35943 (
"Outcome" text,
"Date" text,
"Tournament" text,
"Surface" text,
"Partner" text,
"Opponents in the final" text,
"Score in the final" text
) | For the tournament played on 26 February 2006, what surface was used? | SELECT "Surface" FROM table_35943 WHERE "Date" = '26 february 2006' | wikisql |
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... | A bar chart showing the average weight for each gender. | SELECT Sex, AVG(Weight) FROM people GROUP BY Sex | nvbench |
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 discharge location is dead/expired and procedure short title is ven cath renal dialysis? | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.discharge_location = "DEAD/EXPIRED" AND procedures.short_title = "Ven cath renal dialysis" | mimicsql_data |
CREATE TABLE table_30106 (
"Player" text,
"Matches" real,
"Innings" real,
"Runs" real,
"Average" text,
"Highest score" text,
"100s" real,
"50s" real
) | What is the average for the player with 313 runs? | SELECT "Average" FROM table_30106 WHERE "Runs" = '313' | wikisql |
CREATE TABLE table_name_86 (
years VARCHAR,
roll VARCHAR
) | When is a Roll of 9? | SELECT years FROM table_name_86 WHERE roll = 9 | sql_create_context |
CREATE TABLE table_30455 (
"Player" text,
"Cap(s)" real,
"Goal(s)" real,
"International Debut" text,
"Club(s)" text
) | When rory fallon category:articles with hcards is the player when is the international debut? | SELECT "International Debut" FROM table_30455 WHERE "Player" = 'Rory Fallon Category:Articles with hCards' | 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 allergy (
allergy... | until 4 years ago, what were the top four most frequently diagnosed diagnoses that patients were diagnosed with within 2 months after being diagnosed with cerebral subdural hematoma - secondary to trauma? | SELECT t3.diagnosisname FROM (SELECT t2.diagnosisname, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM (SELECT patient.uniquepid, diagnosis.diagnosistime FROM diagnosis JOIN patient ON diagnosis.patientunitstayid = patient.patientunitstayid WHERE diagnosis.diagnosisname = 'cerebral subdural hematoma - secondary t... | eicu |
CREATE TABLE table_18137 (
"District" text,
"Incumbent" text,
"Party" text,
"First elected" real,
"Results" text,
"Candidates" text
) | Name the incumbent for texas 22 district | SELECT "Incumbent" FROM table_18137 WHERE "District" = 'Texas 22' | wikisql |
CREATE TABLE table_name_23 (
previous_conference VARCHAR,
year_joined VARCHAR,
ihsaa_class VARCHAR
) | Which Previous conference has a Year joined smaller than 1976, and an IHSAA Class of A? | SELECT previous_conference FROM table_name_23 WHERE year_joined < 1976 AND ihsaa_class = "a" | sql_create_context |
CREATE TABLE farm (
farm_id number,
year number,
total_horses number,
working_horses number,
total_cattle number,
oxen number,
bulls number,
cows number,
pigs number,
sheep_and_goats number
)
CREATE TABLE farm_competition (
competition_id number,
year number,
theme t... | What are the census rankings of cities that do not have the status 'Village'? | SELECT census_ranking FROM city WHERE status <> "Village" | spider |
CREATE TABLE table_32459 (
"Home team" text,
"Home team score" text,
"Away team" text,
"Away team score" text,
"Venue" text,
"Crowd" real,
"Date" text
) | What is the average crowd size when the home side scores 4.10 (34)? | SELECT "Crowd" FROM table_32459 WHERE "Home team score" = '4.10 (34)' | wikisql |
CREATE TABLE table_name_82 (
result VARCHAR,
opponent VARCHAR
) | What was the score of the game against the St. Louis Cardinals? | SELECT result FROM table_name_82 WHERE opponent = "st. louis cardinals" | sql_create_context |
CREATE TABLE zzmzjzjlb (
HXPLC number,
HZXM text,
JLSJ time,
JZJSSJ time,
JZKSBM text,
JZKSMC text,
JZKSRQ time,
JZLSH number,
JZZDBM text,
JZZDSM text,
JZZTDM number,
JZZTMC text,
KH text,
KLX number,
MJZH text,
ML number,
MZZYZDZZBM text,
MZZYZDZ... | 患者92569406自二零零九年三月十六日开始,截止到二零一八年十一月二十五日,由哪几位医务人员为其检测指标591618的,查查这些医务人员的工号及姓名 | SELECT jyjgzbb.JCRGH, jyjgzbb.JCRXM 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.BGD... | css |
CREATE TABLE station_company (
Station_ID int,
Company_ID int,
Rank_of_the_Year int
)
CREATE TABLE company (
Company_ID int,
Rank int,
Company text,
Headquarters text,
Main_Industry text,
Sales_billion real,
Profits_billion real,
Assets_billion real,
Market_Value real
)
... | How many companies in each headquarter? Plot a pie chart. | SELECT Headquarters, COUNT(Headquarters) FROM company GROUP BY Headquarters | nvbench |
CREATE TABLE table_23864 (
"Party" text,
"Seats Contested" real,
"Seats Won" real,
"No. of Votes" real,
"% of Votes" text,
"% in Seats contested" text,
"Seats Forfeited" real,
"2003 Seats" real
) | What is the percentage seats contested for the revolutionary socialist party? | SELECT "% in Seats contested" FROM table_23864 WHERE "Party" = 'Revolutionary Socialist Party' | wikisql |
CREATE TABLE table_20372 (
"N\u00b0" real,
"Television service" text,
"Country" text,
"Language" text,
"Content" text,
"DAR" text,
"HDTV" text,
"Package/Option" text
) | How many values of HDTV correspond to television service of la sorgente sat 1? | SELECT COUNT("HDTV") FROM table_20372 WHERE "Television service" = 'La Sorgente Sat 1' | wikisql |
CREATE TABLE lab (
subject_id text,
hadm_id text,
itemid text,
charttime text,
flag text,
value_unit text,
label text,
fluid text
)
CREATE TABLE prescriptions (
subject_id text,
hadm_id text,
icustay_id text,
drug_type text,
drug text,
formulary_drug_cd text,
... | what is the number of patients who had uptake ratio lab test with 43 days of hospitalization? | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.days_stay > "43" AND lab.label = "Uptake Ratio" | mimicsql_data |
CREATE TABLE table_62477 (
"Tie no" text,
"Home team" text,
"Score" text,
"Away team" text,
"Date" text
) | What is Date, when Tie no is '3'? | SELECT "Date" FROM table_62477 WHERE "Tie no" = '3' | wikisql |
CREATE TABLE table_18220102_1 (
award_winning_film VARCHAR,
opening_film VARCHAR
) | How many award-winning films have the opening film of encounters at the end of the world? | SELECT COUNT(award_winning_film) FROM table_18220102_1 WHERE opening_film = "Encounters at the End of the World" | sql_create_context |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.