context stringlengths 11 9.12k | question stringlengths 0 1.06k | SQL stringlengths 2 4.44k | source stringclasses 28
values |
|---|---|---|---|
CREATE TABLE table_30011 (
"Shirt Number" real,
"Player Name" text,
"Games Played" real,
"Total Points" real,
"2-Points" real,
"3-Points" real,
"Free Throw" real
) | Name the least games played for 6 points | SELECT MIN("Games Played") FROM table_30011 WHERE "Total Points" = '6' | wikisql |
CREATE TABLE table_25342713_5 (
blocks VARCHAR,
points VARCHAR
) | How many players 89 points? | SELECT COUNT(blocks) FROM table_25342713_5 WHERE points = 89 | sql_create_context |
CREATE TABLE table_202_45 (
id number,
"rank" number,
"wrestler" text,
"no. of reigns" number,
"combined days" number
) | which professional wrestler has had the most number of reigns as nwa world heavyweight champion ? | SELECT "wrestler" FROM table_202_45 ORDER BY "no. of reigns" DESC LIMIT 1 | squall |
CREATE TABLE diagnoses (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE prescriptions (
subject_id text,
hadm_id text,
icustay_id text,
drug_type text,
drug text,
formulary_drug_cd text,
route text,
drug_dose text
)
C... | How many patients were admitted to emergency before the year 2166? | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.admission_type = "EMERGENCY" AND demographic.admityear < "2166" | mimicsql_data |
CREATE TABLE table_train_150 (
"id" int,
"gender" string,
"pregnancy_or_lactation" bool,
"hiv_infection" bool,
"hepatic_disease" bool,
"liver_disease" bool,
"abnormality" bool,
"triglyceride_tg" float,
"NOUSE" float
) | positive pregnancy test in female of childbearing potential ( at screening and visit 2 / periods 1 _ 3 / day 1 ) ; | SELECT * FROM table_train_150 WHERE gender = 'female' AND pregnancy_or_lactation = 1 | criteria2sql |
CREATE TABLE table_name_27 (
competition VARCHAR,
date VARCHAR
) | What is the competition on 23 February 1929? | SELECT competition FROM table_name_27 WHERE date = "23 february 1929" | sql_create_context |
CREATE TABLE table_867 (
"Draft Year" real,
"Player" text,
"Position" text,
"Round" real,
"Overall" real,
"NFL Team" text
) | What numer pick in the draft for jerry hill? | SELECT COUNT("Overall") FROM table_867 WHERE "Player" = 'Jerry Hill' | wikisql |
CREATE TABLE table_name_25 (
venue VARCHAR,
away_team VARCHAR
) | What is the venue when melbourne is the away team? | SELECT venue FROM table_name_25 WHERE away_team = "melbourne" | sql_create_context |
CREATE TABLE table_15201666_3 (
derby_county INTEGER
) | Name the most derby county | SELECT MAX(derby_county) FROM table_15201666_3 | sql_create_context |
CREATE TABLE table_15816 (
"Date" text,
"Opponent" text,
"Score" text,
"Loss" text,
"Attendance" text
) | On what Date had a Score of 5-2 and a Loss of Greinke (1-2)? | SELECT "Date" FROM table_15816 WHERE "Score" = '5-2' AND "Loss" = 'greinke (1-2)' | 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 demographic (
subject_id text,
hadm_id text,
name text,
marital_status text,
age text,
dob text,
gender text,
... | how many patients below 24 years of age followed the procedure endoscopic removal of stone(s) from biliary tract? | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.age < "24" AND procedures.long_title = "Endoscopic removal of stone(s) from biliary tract" | mimicsql_data |
CREATE TABLE table_57943 (
"Generation" text,
"Years" text,
"Engine" text,
"Power" text,
"Torque" text,
"Induction" text
) | What is the power of an engine of 1972? | SELECT "Power" FROM table_57943 WHERE "Years" = '1972' | wikisql |
CREATE TABLE mission (
mission_id number,
ship_id number,
code text,
launched_year number,
location text,
speed_knots number,
fate text
)
CREATE TABLE ship (
ship_id number,
name text,
type text,
nationality text,
tonnage number
) | Show the distinct fate of missions that involve ships with nationality 'United States | SELECT DISTINCT T1.fate FROM mission AS T1 JOIN ship AS T2 ON T1.ship_id = T2.ship_id WHERE T2.nationality = "United States" | spider |
CREATE TABLE table_30062172_3 (
gt3_winner VARCHAR,
pole_position VARCHAR
) | When tim bridgman gregor fisken is the pole position who is the gt3 winner? | SELECT gt3_winner FROM table_30062172_3 WHERE pole_position = "Tim Bridgman Gregor Fisken" | sql_create_context |
CREATE TABLE table_26769_1 (
population__july_2009_est_ VARCHAR,
population_density_per_km² VARCHAR
) | What was the population of a country with a population density of 14.3/km (/sqmi)? | SELECT population__july_2009_est_ FROM table_26769_1 WHERE population_density_per_km² = "14.3/km² (/sqmi)" | sql_create_context |
CREATE TABLE Accounts (
account_id INTEGER,
customer_id INTEGER,
account_name VARCHAR(50),
other_account_details VARCHAR(255)
)
CREATE TABLE Customers (
customer_id INTEGER,
customer_first_name VARCHAR(20),
customer_last_name VARCHAR(20),
customer_address VARCHAR(255),
customer_phon... | Show the card type codes and the number of transactions with a bar chart, and show in descending by the total number please. | SELECT card_type_code, COUNT(*) FROM Financial_Transactions AS T1 JOIN Customers_Cards AS T2 ON T1.card_id = T2.card_id GROUP BY T2.card_type_code ORDER BY COUNT(*) DESC | nvbench |
CREATE TABLE actor (
aid int,
gender text,
name text,
nationality text,
birth_city text,
birth_year int
)
CREATE TABLE written_by (
id int,
msid int,
wid int
)
CREATE TABLE tv_series (
sid int,
title text,
release_year int,
num_of_seasons int,
num_of_episodes in... | which movie has the most number of actors from China ? | SELECT movie.title FROM actor, cast, movie WHERE actor.nationality = 'China' AND cast.aid = actor.aid AND movie.mid = cast.msid GROUP BY movie.title ORDER BY COUNT(DISTINCT (actor.name)) DESC LIMIT 1 | imdb |
CREATE TABLE lab (
labid number,
patientunitstayid number,
labname text,
labresult number,
labresulttime time
)
CREATE TABLE vitalperiodic (
vitalperiodicid number,
patientunitstayid number,
temperature number,
sao2 number,
heartrate number,
respiration number,
systemics... | calculate the duration of stay during patient 022-3289's last stay in the intensive care unit. | SELECT STRFTIME('%j', patient.unitdischargetime) - STRFTIME('%j', patient.unitadmittime) FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '022-3289') AND NOT patient.unitadmittime IS NULL ORDER BY patient.unitadmittime DESC LIMIT 1 | 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 lab (
subject_id text,
hadm_id text,
... | what is the number of patients whose item id is 50971? | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE lab.itemid = "50971" | mimicsql_data |
CREATE TABLE table_7243 (
"Conference" text,
"# of Bids" real,
"Record" text,
"Win %" text,
"Round of 32" text,
"Sweet Sixteen" text,
"Elite Eight" text,
"Final Four" text,
"Championship Game" text
) | What Round 32 had a # of bids smaller than 2? | SELECT "Round of 32" FROM table_7243 WHERE "# of Bids" < '2' | wikisql |
CREATE TABLE table_10953197_6 (
no_in_season INTEGER
) | give the least number of times an episode was shown from 1997-1998 | SELECT MIN(no_in_season) FROM table_10953197_6 | sql_create_context |
CREATE TABLE table_35146 (
"Tournament" text,
"1998" text,
"2000" text,
"2001" text,
"2002" text,
"2003" text,
"2004" text,
"2005" text,
"2006" text,
"2007" text,
"2008" text,
"2009" text,
"2010" text,
"2011" text,
"2012" text,
"Career SR" text,
"Caree... | Which 2012 has a 2007 of 0 / 4? | SELECT "2012" FROM table_35146 WHERE "2007" = '0 / 4' | wikisql |
CREATE TABLE table_32115 (
"Name" text,
"Martyred" real,
"Place" text,
"Beatified" real,
"Canonised" real
) | When was John Hoan Trinh Doan / St. John Hoan, who was beatified in 1909 and canonised after 1988, martyred? | SELECT MAX("Martyred") FROM table_32115 WHERE "Beatified" = '1909' AND "Name" = 'john hoan trinh doan / st. john hoan' AND "Canonised" > '1988' | wikisql |
CREATE TABLE table_15945862_1 (
july VARCHAR,
march VARCHAR
) | March 0.41 in July? | SELECT july FROM table_15945862_1 WHERE march = "0.41" | sql_create_context |
CREATE TABLE lab (
labid number,
patientunitstayid number,
labname text,
labresult number,
labresulttime time
)
CREATE TABLE treatment (
treatmentid number,
patientunitstayid number,
treatmentname text,
treatmenttime time
)
CREATE TABLE medication (
medicationid number,
pat... | show the total amount of patient 011-29258's output until 08/17/2100. | SELECT SUM(intakeoutput.cellvaluenumeric) FROM intakeoutput WHERE intakeoutput.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '011-29258')) AND intakeoutput.cellpath LIKE '%ou... | eicu |
CREATE TABLE table_name_5 (
score VARCHAR,
location VARCHAR
) | Location of brendan byrne arena had what score? | SELECT score FROM table_name_5 WHERE location = "brendan byrne arena" | sql_create_context |
CREATE TABLE Lives_in (
stuid INTEGER,
dormid INTEGER,
room_number INTEGER
)
CREATE TABLE Dorm_amenity (
amenid INTEGER,
amenity_name VARCHAR(25)
)
CREATE TABLE Student (
StuID INTEGER,
LName VARCHAR(12),
Fname VARCHAR(12),
Age INTEGER,
Sex VARCHAR(1),
Major INTEGER,
Ad... | Find the average age for students with different sex in a bar chart, could you list Y from high to low order? | SELECT Sex, AVG(Age) FROM Student GROUP BY Sex ORDER BY AVG(Age) DESC | nvbench |
CREATE TABLE person_info (
CSD text,
CSRQ time,
GJDM text,
GJMC text,
JGDM text,
JGMC text,
MZDM text,
MZMC text,
RYBH text,
XBDM number,
XBMC text,
XLDM text,
XLMC text,
XM text,
ZYLBDM text,
ZYMC text
)
CREATE TABLE mzjzjlb (
HXPLC number,
HZXM ... | 列出姓蒋的检测人负责的所有检测指标在医疗就诊59894458645中,名称是什么?结果定量是什么?结果定量单位是什么? | SELECT jyjgzbb.JCZBMC, jyjgzbb.JCZBJGDL, jyjgzbb.JCZBJGDW FROM jybgb JOIN jyjgzbb JOIN jybgb_jyjgzbb ON jybgb.YLJGDM = jybgb_jyjgzbb.YLJGDM AND jybgb.BGDH = jyjgzbb.BGDH AND jybgb_jyjgzbb.JYZBLSH = jyjgzbb.JYZBLSH AND jybgb_jyjgzbb.jyjgzbb_id = jyjgzbb.jyjgzbb_id WHERE jybgb.JZLSH = '59894458645' AND jyjgzbb.JCRXM LIKE... | css |
CREATE TABLE table_name_44 (
director_s_ VARCHAR,
writer_s_ VARCHAR
) | Who was the director that worked with Dana Dorian as the writer? | SELECT director_s_ FROM table_name_44 WHERE writer_s_ = "dana dorian" | sql_create_context |
CREATE TABLE table_name_89 (
csa_cma_2009_population INTEGER,
state__province VARCHAR
) | What's the CSA/CMA Population in IA-IL? | SELECT MAX(csa_cma_2009_population) FROM table_name_89 WHERE state__province = "ia-il" | sql_create_context |
CREATE TABLE table_27225944_3 (
replaced_by VARCHAR,
team VARCHAR
) | Name the replaced by for slaven belupo | SELECT replaced_by FROM table_27225944_3 WHERE team = "Slaven Belupo" | sql_create_context |
CREATE TABLE table_name_35 (
capacity INTEGER,
team VARCHAR
) | what is the capacity for the team ibenik? | SELECT MIN(capacity) FROM table_name_35 WHERE team = "šibenik" | sql_create_context |
CREATE TABLE mzjzjlb_jybgb (
YLJGDM_MZJZJLB text,
BGDH number,
YLJGDM number
)
CREATE TABLE person_info (
CSD text,
CSRQ time,
GJDM text,
GJMC text,
JGDM text,
JGMC text,
MZDM text,
MZMC text,
RYBH text,
XBDM number,
XBMC text,
XLDM text,
XLMC text,
X... | 患者的门诊诊断为2型糖尿病的低密度脂蛋白胆固醇的参考值范围下限和上限均为什么? | SELECT jyjgzbb.CKZFWXX, jyjgzbb.CKZFWSX FROM mzjzjlb JOIN jybgb JOIN jyjgzbb JOIN mzjzjlb_jybgb ON mzjzjlb.YLJGDM = mzjzjlb_jybgb.YLJGDM_MZJZJLB AND mzjzjlb.JZLSH = jybgb.JZLSH_MZJZJLB AND jybgb.YLJGDM = jyjgzbb.YLJGDM AND jybgb.BGDH = jyjgzbb.BGDH AND mzjzjlb_jybgb.YLJGDM = jybgb.YLJGDM AND mzjzjlb_jybgb.BGDH = 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 procedures (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE prescription... | what is the number of patients whose primary disease is newborn and procedure icd9 code is 4311? | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.diagnosis = "NEWBORN" AND procedures.icd9_code = "4311" | mimicsql_data |
CREATE TABLE table_204_190 (
id number,
"rank" number,
"city" text,
"county" text,
"state" text,
"percentage" text
) | which county has the most representation ? | SELECT "county" FROM table_204_190 GROUP BY "county" ORDER BY SUM("percentage") DESC LIMIT 1 | squall |
CREATE TABLE flight_fare (
flight_id int,
fare_id int
)
CREATE TABLE airline (
airline_code varchar,
airline_name text,
note text
)
CREATE TABLE class_of_service (
booking_class varchar,
rank int,
class_description text
)
CREATE TABLE time_zone (
time_zone_code text,
time_zone... | what flights are available from DALLAS FORT WORTH to ATLANTA | SELECT DISTINCT flight.flight_id FROM airport_service AS AIRPORT_SERVICE_0, airport_service AS AIRPORT_SERVICE_1, city AS CITY_0, city AS CITY_1, flight WHERE CITY_0.city_code = AIRPORT_SERVICE_0.city_code AND CITY_0.city_name = 'DALLAS FORT WORTH' AND CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name... | atis |
CREATE TABLE table_name_29 (
points_for VARCHAR,
lost VARCHAR
) | What is the points when the lost was 11? | SELECT points_for FROM table_name_29 WHERE lost = "11" | sql_create_context |
CREATE TABLE order_items (
order_id number,
product_id number,
order_quantity text
)
CREATE TABLE addresses (
address_id number,
address_content text,
city text,
zip_postcode text,
state_province_county text,
country text,
other_address_details text
)
CREATE TABLE products (
... | Tell me the number of orders with 'Second time' as order detail. | SELECT COUNT(*) FROM customer_orders WHERE order_details = "Second time" | spider |
CREATE TABLE publication_keyword (
kid int,
pid int
)
CREATE TABLE publication (
abstract varchar,
cid int,
citation_num int,
jid int,
pid int,
reference_num int,
title varchar,
year int
)
CREATE TABLE domain_author (
aid int,
did int
)
CREATE TABLE cite (
cited in... | return me the papers after 2000 . | SELECT title FROM publication WHERE year > 2000 | academic |
CREATE TABLE outputevents (
row_id number,
subject_id number,
hadm_id number,
icustay_id number,
charttime time,
itemid number,
value number
)
CREATE TABLE procedures_icd (
row_id number,
subject_id number,
hadm_id number,
icd9_code text,
charttime time
)
CREATE TABLE c... | how many patients had been in the ward 16? | SELECT COUNT(DISTINCT admissions.subject_id) FROM admissions WHERE admissions.hadm_id IN (SELECT transfers.hadm_id FROM transfers WHERE transfers.wardid = 16) | mimic_iii |
CREATE TABLE procedures (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE lab (
subject_id text,
hadm_id text,
itemid text,
charttime text,
flag text,
value_unit text,
label text,
fluid text
)
CREATE TABLE diagnoses (
... | what is the number of patients whose diagnoses long title is 29-30 completed weeks of gestation and lab test category is blood gas? | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE diagnoses.long_title = "29-30 completed weeks of gestation" AND lab."CATEGORY" = "Blood Gas" | mimicsql_data |
CREATE TABLE table_29296103_10 (
runner_up VARCHAR,
tournament VARCHAR,
champion VARCHAR
) | How many runner ups were there for the cologne , germany carpet $75,000 s32/d16 when the champion was matt doyle 1 6, 6 1, 6 2? | SELECT COUNT(runner_up) FROM table_29296103_10 WHERE tournament = "Cologne , Germany Carpet – $75,000 – S32/D16" AND champion = "Matt Doyle 1–6, 6–1, 6–2" | sql_create_context |
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,
... | provide the number of patients whose diagnoses long title is other preterm infants, 1,250-1,499 grams? | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE diagnoses.long_title = "Other preterm infants, 1,250-1,499 grams" | mimicsql_data |
CREATE TABLE table_33148 (
"Home team" text,
"Home team score" text,
"Away team" text,
"Away team score" text,
"Venue" text,
"Crowd" real,
"Date" text
) | Where was the game held when the away team scored 10.12 (72)? | SELECT "Venue" FROM table_33148 WHERE "Away team score" = '10.12 (72)' | wikisql |
CREATE TABLE table_29658 (
"Outcome" text,
"Year" real,
"Tournament" text,
"Surface" text,
"Partner" text,
"Opponents" text,
"Score" text
) | Who were Petrova's opponents with Vania King? | SELECT "Opponents" FROM table_29658 WHERE "Partner" = 'Vania King' | wikisql |
CREATE TABLE inputevents_cv (
row_id number,
subject_id number,
hadm_id number,
icustay_id number,
charttime time,
itemid number,
amount number
)
CREATE TABLE d_items (
row_id number,
itemid number,
label text,
linksto text
)
CREATE TABLE icustays (
row_id number,
s... | how many days has elapsed since the first time during their current hospital visit patient 28443 had received a creatine kinase (ck) lab test? | 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 = 'creatine kinase (ck)') AND labevents.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 28443 AN... | mimic_iii |
CREATE TABLE table_14984126_1 (
game_site VARCHAR,
result VARCHAR
) | what's the game site with result being l 24 34 | SELECT game_site FROM table_14984126_1 WHERE result = "L 24–34" | sql_create_context |
CREATE TABLE table_23303 (
"English Name" text,
"Chinese Name (Simplified / Traditional)" text,
"Pinyin" text,
"Population" real,
"Post Code" real
) | What's the post code of the county with the Chinese name / ? | SELECT MIN("Post Code") FROM table_23303 WHERE "Chinese Name (Simplified / Traditional)" = '潜山县 / 潛山縣' | wikisql |
CREATE TABLE Ref_Incident_Type (
incident_type_code VARCHAR(10),
incident_type_description VARCHAR(80)
)
CREATE TABLE Behavior_Incident (
incident_id INTEGER,
incident_type_code VARCHAR(10),
student_id INTEGER,
date_incident_start DATETIME,
date_incident_end DATETIME,
incident_summary V... | What is the number of start dates for incidents with incident type code 'NOISE'? Bin by year and return a bar chart, and I want to order in descending by the Y-axis. | SELECT date_incident_start, COUNT(date_incident_start) FROM Behavior_Incident WHERE incident_type_code = "NOISE" ORDER BY COUNT(date_incident_start) DESC | nvbench |
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 number of patients have primary disease named sdh and lab test fluid is cerebrospinal fluid (csf)? | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.diagnosis = "SDH" AND lab.fluid = "Cerebrospinal Fluid (CSF)" | mimicsql_data |
CREATE TABLE table_34974 (
"Week" real,
"Date" text,
"Opponent" text,
"Result" text,
"Record" text,
"Game Site" text,
"Attendance" real
) | What is the attendance of the game on week 4? | SELECT "Attendance" FROM table_34974 WHERE "Week" = '4' | wikisql |
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... | 在医院2864800编码为01420537的患者入院诊断疾病名称不包含脑瘫的医疗就诊记录编码是什么? | SELECT gwyjzb.MED_CLINIC_ID FROM gwyjzb WHERE gwyjzb.PERSON_ID = '01420537' AND gwyjzb.MED_SER_ORG_NO = '2864800' AND NOT gwyjzb.IN_DIAG_DIS_NM LIKE '%脑瘫%' UNION SELECT fgwyjzb.MED_CLINIC_ID FROM fgwyjzb WHERE fgwyjzb.PERSON_ID = '01420537' AND fgwyjzb.MED_SER_ORG_NO = '2864800' AND NOT fgwyjzb.IN_DIAG_DIS_NM LIKE '%脑瘫... | css |
CREATE TABLE table_48967 (
"Team #1" text,
"Agg." text,
"Team #2" text,
"1st leg" text,
"2nd leg" text
) | Which Team #1 had a 2nd leg score of 88-83? | SELECT "Team #1" FROM table_48967 WHERE "2nd leg" = '88-83' | 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... | 患者70820807以前的治疗方案查一下 | SELECT t_kc22.SOC_SRT_DIRE_CD, t_kc22.SOC_SRT_DIRE_NM FROM t_kc22 WHERE t_kc22.t_kc21_PERSON_ID = '70820807' AND t_kc22.MED_INV_ITEM_TYPE = '治疗费' | css |
CREATE TABLE table_49289 (
"Winner" text,
"Country" text,
"Winter Olympics" real,
"FIS Nordic World Ski Championships" real,
"Holmenkollen" text
) | Which country has a FIS Nordic World Ski Championship before 1989, was in the winter Olympics before 1980, and has a Holmenkollen of 1956? | SELECT "Country" FROM table_49289 WHERE "FIS Nordic World Ski Championships" < '1989' AND "Winter Olympics" < '1980' AND "Holmenkollen" = '1956' | wikisql |
CREATE TABLE table_77376 (
"Opposing Team" text,
"Against" real,
"Date" text,
"Venue" text,
"Status" text
) | Which venue had an against score smaller than 18 when the opposing team was North Auckland? | SELECT "Venue" FROM table_77376 WHERE "Against" < '18' AND "Opposing Team" = 'north auckland' | wikisql |
CREATE TABLE table_name_83 (
pole_position VARCHAR,
grand_prix VARCHAR
) | What is the Pole Position for the German Grand Prix | SELECT pole_position FROM table_name_83 WHERE grand_prix = "german grand prix" | sql_create_context |
CREATE TABLE table_79511 (
"Week" real,
"Date" text,
"Opponent" text,
"Result" text,
"Attendance" text
) | Who was the Opponent on November 27, 2005? | SELECT "Opponent" FROM table_79511 WHERE "Date" = 'november 27, 2005' | wikisql |
CREATE TABLE table_23249 (
"Rank" real,
"Couple" text,
"Judges" real,
"Public" real,
"Total" real,
"Vote percentage" text,
"Result" text
) | When 8 is the public what are the results? | SELECT "Result" FROM table_23249 WHERE "Public" = '8' | wikisql |
CREATE TABLE outputevents (
row_id number,
subject_id number,
hadm_id number,
icustay_id number,
charttime time,
itemid number,
value number
)
CREATE TABLE prescriptions (
row_id number,
subject_id number,
hadm_id number,
startdate time,
enddate time,
drug text,
... | count the number of times patient 46528 had received an extracran-intracr bypass during the last hospital visit. | SELECT COUNT(*) FROM procedures_icd WHERE procedures_icd.icd9_code = (SELECT d_icd_procedures.icd9_code FROM d_icd_procedures WHERE d_icd_procedures.short_title = 'extracran-intracr bypass') AND procedures_icd.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 46528 AND NOT admissions.d... | mimic_iii |
CREATE TABLE PostTypes (
Id number,
Name text
)
CREATE TABLE PostFeedback (
Id number,
PostId number,
IsAnonymous boolean,
VoteTypeId number,
CreationDate time
)
CREATE TABLE VoteTypes (
Id number,
Name text
)
CREATE TABLE Comments (
Id number,
PostId number,
Score num... | Questions from reasonably high-rep users. | SELECT p.Id, p.Title, u.Id, u.Reputation FROM Posts AS p INNER JOIN Users AS u ON p.OwnerUserId = u.Id WHERE u.Reputation > 300 | sede |
CREATE TABLE icustays (
row_id number,
subject_id number,
hadm_id number,
icustay_id number,
first_careunit text,
last_careunit text,
first_wardid number,
last_wardid number,
intime time,
outtime time
)
CREATE TABLE procedures_icd (
row_id number,
subject_id number,
... | what was the name of a drug patient 89202 was first prescribed until 28 months ago? | SELECT prescriptions.drug FROM prescriptions WHERE prescriptions.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 89202) AND DATETIME(prescriptions.startdate) <= DATETIME(CURRENT_TIME(), '-28 month') ORDER BY prescriptions.startdate LIMIT 1 | mimic_iii |
CREATE TABLE table_name_39 (
pole_position VARCHAR,
location VARCHAR
) | What was the pole position for jerez? | SELECT pole_position FROM table_name_39 WHERE location = "jerez" | sql_create_context |
CREATE TABLE table_203_253 (
id number,
"model" text,
"frame" text,
"years mfg'd" text,
"caliber(s)" text,
"production" text,
"barrel" text,
"notes" text
) | name the models that had the same caliber as the remington beals navy model revolver . | SELECT "model" FROM table_203_253 WHERE "model" <> 'remington-beals navy model revolver' AND "caliber(s)" = (SELECT "caliber(s)" FROM table_203_253 WHERE "model" = 'remington-beals navy model revolver') | squall |
CREATE TABLE patients (
row_id number,
subject_id number,
gender text,
dob time,
dod time
)
CREATE TABLE diagnoses_icd (
row_id number,
subject_id number,
hadm_id number,
icd9_code text,
charttime time
)
CREATE TABLE chartevents (
row_id number,
subject_id number,
h... | have patient 14467's been normal today in arterial bp [diastolic]? | SELECT COUNT(*) > 0 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 = 14467)) AND chartevents.itemid IN (SELECT d_items.itemid FROM d_items WHERE d_items.label = 'arterial bp [dias... | mimic_iii |
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... | 在门诊诊断出得了疾病N61.918的病号的他们的叶酸数值的平均值以及最值都是多少? | SELECT AVG(jyjgzbb.JCZBJGDL), MIN(jyjgzbb.JCZBJGDL), MAX(jyjgzbb.JCZBJGDL) FROM txmzjzjlb JOIN jybgb JOIN jyjgzbb ON txmzjzjlb.YLJGDM = jybgb.YLJGDM_MZJZJLB AND txmzjzjlb.JZLSH = jybgb.JZLSH_MZJZJLB AND jybgb.YLJGDM = jyjgzbb.YLJGDM AND jybgb.BGDH = jyjgzbb.BGDH WHERE txmzjzjlb.JZZDBM = 'N61.918' AND jyjgzbb.JCZBMC = '... | css |
CREATE TABLE table_name_50 (
group_position VARCHAR,
result_f_a VARCHAR,
date VARCHAR
) | Which Group position has Result F A of 0 1 on 1 november 2006? | SELECT group_position FROM table_name_50 WHERE result_f_a = "0–1" AND date = "1 november 2006" | sql_create_context |
CREATE TABLE table_name_9 (
home VARCHAR,
decision VARCHAR,
date VARCHAR
) | Which home has a Decision of kolzig, and a Date of november 5? | SELECT home FROM table_name_9 WHERE decision = "kolzig" AND date = "november 5" | sql_create_context |
CREATE TABLE table_79662 (
"Date" text,
"Tournament" text,
"Surface" text,
"Opponent in final" text,
"Score" text,
"Prize Money" text
) | What is the surface for the Volos tournament? | SELECT "Surface" FROM table_79662 WHERE "Tournament" = 'volos' | wikisql |
CREATE TABLE table_34297 (
"Grand Cru" text,
"Region" text,
"Village" text,
"Wine style" text,
"Vineyard surface (2010)" text
) | Which Village has a Region of C te De Nuits, Wine Styles of Red Wine, and a Grand Cru of Latrici res-Chambertin? | SELECT "Village" FROM table_34297 WHERE "Region" = 'côte de nuits' AND "Wine style" = 'red wine' AND "Grand Cru" = 'latricières-chambertin' | 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 demographic (
subject_id text,
hadm_id text,
name text,
marital_status text,
age text,
dob te... | what is the gender and procedure long title of subject id 2560? | SELECT demographic.gender, procedures.long_title FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.subject_id = "2560" | mimicsql_data |
CREATE TABLE table_name_61 (
stepping VARCHAR,
part_number_s_ VARCHAR
) | What's the stepping amount for adh4450iaa5do? | SELECT stepping FROM table_name_61 WHERE part_number_s_ = "adh4450iaa5do" | sql_create_context |
CREATE TABLE t_kc21 (
CLINIC_ID text,
CLINIC_TYPE text,
COMP_ID text,
DATA_ID text,
DIFF_PLACE_FLG number,
FERTILITY_STS number,
FLX_MED_ORG_ID text,
HOSP_LEV number,
HOSP_STS number,
IDENTITY_CARD text,
INPT_AREA_BED text,
INSURED_IDENTITY number,
INSURED_STS text,
... | 列出患者26713291的所有医疗就诊记录编号在就诊结算日期13年9月2日到16年5月24日期间内的有哪些? | SELECT t_kc21.MED_CLINIC_ID FROM t_kc24 JOIN t_kc21_t_kc24 JOIN t_kc21 ON t_kc21_t_kc24.MED_SAFE_PAY_ID = t_kc24.MED_SAFE_PAY_ID AND t_kc21_t_kc24.MED_CLINIC_ID = t_kc21.MED_CLINIC_ID WHERE t_kc24.PERSON_ID = '26713291' AND t_kc24.CLINIC_SLT_DATE BETWEEN '2013-09-02' AND '2016-05-24' | css |
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... | 查一下有哪些检验指标记录在检测指标名称与结果定量单位上和记录63771807598相同,但结果定量小于等于他的 | SELECT * FROM jyjgzbb WHERE JCZBMC = (SELECT JCZBMC FROM jyjgzbb WHERE JYZBLSH = '63771807598') AND JCZBJGDW = (SELECT JCZBJGDW FROM jyjgzbb WHERE JYZBLSH = '63771807598') AND JCZBJGDL <= (SELECT JCZBJGDL FROM jyjgzbb WHERE JYZBLSH = '63771807598') | css |
CREATE TABLE company (
company_id number,
rank number,
company text,
headquarters text,
main_industry text,
sales_billion number,
profits_billion number,
assets_billion number,
market_value number
)
CREATE TABLE station_company (
station_id number,
company_id number,
ran... | Show the manager name for gas stations belonging to the ExxonMobil company. | SELECT T3.manager_name FROM station_company AS T1 JOIN company AS T2 ON T1.company_id = T2.company_id JOIN gas_station AS T3 ON T1.station_id = T3.station_id WHERE T2.company = 'ExxonMobil' | spider |
CREATE TABLE transfers (
row_id number,
subject_id number,
hadm_id number,
icustay_id number,
eventtype text,
careunit text,
wardid number,
intime time,
outtime time
)
CREATE TABLE diagnoses_icd (
row_id number,
subject_id number,
hadm_id number,
icd9_code text,
... | on the first icu visit', what was minimum arterial bp [systolic] of patient 17667? | 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 = 17667) AND NOT icustays.outtime IS NULL ORDER BY icustays.intime LIMIT 1) AND chartevents.itemid ... | mimic_iii |
CREATE TABLE table_76451 (
"Res." text,
"Record" text,
"Opponent" text,
"Method" text,
"Event" text,
"Round" real,
"Time" text,
"Location" text
) | What round was it when the method was TKO (would not stand up from Butt Scoot)? | SELECT AVG("Round") FROM table_76451 WHERE "Method" = 'tko (would not stand up from butt scoot)' | wikisql |
CREATE TABLE table_76354 (
"Tie no" text,
"Home team" text,
"Score" text,
"Away team" text,
"Date" text
) | Who was the away team against the home team Sheffield United? | SELECT "Away team" FROM table_76354 WHERE "Home team" = 'sheffield united' | wikisql |
CREATE TABLE table_name_43 (
date VARCHAR,
record VARCHAR
) | What date was the record 21-11? | SELECT date FROM table_name_43 WHERE record = "21-11" | sql_create_context |
CREATE TABLE table_name_28 (
year INTEGER,
winner VARCHAR
) | What is the latest year when Phil Anderson won? | SELECT MAX(year) FROM table_name_28 WHERE winner = "phil anderson" | sql_create_context |
CREATE TABLE table_name_24 (
to_par VARCHAR,
score VARCHAR
) | What was the to par for the game with a score of 74-69-66=209? | SELECT to_par FROM table_name_24 WHERE score = 74 - 69 - 66 = 209 | sql_create_context |
CREATE TABLE table_name_2 (
date VARCHAR,
opponent VARCHAR
) | What date was gabriela paz-franco the opponent? | SELECT date FROM table_name_2 WHERE opponent = "gabriela paz-franco" | sql_create_context |
CREATE TABLE offering_instructor (
offering_instructor_id int,
offering_id int,
instructor_id int
)
CREATE TABLE program_requirement (
program_id int,
category varchar,
min_credit int,
additional_req varchar
)
CREATE TABLE course_offering (
offering_id int,
course_id int,
semes... | Show me 300 -level courses that are easy . | SELECT DISTINCT course.name, course.number, program_course.workload FROM course, program_course WHERE course.department = 'EECS' AND course.number BETWEEN 300 AND 300 + 100 AND program_course.course_id = course.course_id AND program_course.workload < 3 ORDER BY program_course.workload | advising |
CREATE TABLE table_2072 (
"#" real,
"Volume line" text,
"Volume title" text,
"Creators" text,
"Material collected" text,
"Publication date" text,
"ISBN" text
) | Name the umbr of creators for flash of two worlds | SELECT COUNT("Creators") FROM table_2072 WHERE "Volume title" = 'Flash of Two Worlds' | wikisql |
CREATE TABLE table_name_98 (
_kah__atau_tidak_ VARCHAR,
language_dialect VARCHAR
) | what is -kah (atau tidak when basikal is basikal and language dialect is malay language (informal)? | SELECT _kah__atau_tidak_ FROM table_name_98 WHERE "basikal" = "basikal" AND language_dialect = "malay language (informal)" | 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 prescriptions (
row_id number,
subject_id number,
hadm_id number,
startdate time,
enddate time... | how much miconazole powder 2% was last prescribed to patient 41132 until 38 months ago dosage? | SELECT prescriptions.dose_val_rx FROM prescriptions WHERE prescriptions.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 41132) AND prescriptions.drug = 'miconazole powder 2%' AND DATETIME(prescriptions.startdate) <= DATETIME(CURRENT_TIME(), '-38 month') ORDER BY prescriptions.startda... | mimic_iii |
CREATE TABLE table_25814 (
"Game" real,
"Date" text,
"Team" text,
"Score" text,
"High points" text,
"High rebounds" text,
"High assists" text,
"Location Attendance" text,
"Record" text
) | Who did the most high assists during the game played on February 6? | SELECT "High assists" FROM table_25814 WHERE "Date" = 'February 6' | wikisql |
CREATE TABLE table_78871 (
"Team" text,
"City" text,
"Venue" text,
"Capacity" real,
"Head Coach" text,
"Team Captain" text,
"Past Season" text
) | What is the Capacity of the Venue of Head Coach Ali Asghar Modir Roosta? | SELECT MAX("Capacity") FROM table_78871 WHERE "Head Coach" = 'ali asghar modir roosta' | wikisql |
CREATE TABLE t_kc24 (
MED_SAFE_PAY_ID text,
OVERALL_CD_ORG text,
OVERALL_CD_PERSON text,
MED_CLINIC_ID text,
REF_SLT_FLG number,
CLINIC_SLT_DATE time,
COMP_ID text,
PERSON_ID text,
FLX_MED_ORG_ID text,
INSU_TYPE text,
MED_AMOUT number,
PER_ACC_PAY number,
OVE_PAY numb... | 在医院7485822患者云曼冬入院诊断疾病名称包含楔状缺损的是什么医疗就诊记录编号? | SELECT MED_CLINIC_ID FROM t_kc21 WHERE PERSON_NM = '云曼冬' AND MED_SER_ORG_NO = '7485822' AND IN_DIAG_DIS_NM LIKE '%楔状缺损%' | css |
CREATE TABLE table_41095 (
"Ship" text,
"13.5-inch/1400lb" real,
"13.5-inch/1250lb" real,
"12-inch" real,
"Total" real
) | What is the lowest 13.5-inch/1400lb with a 13.5-inch/1250lb of more than 1, and a 12-inch smaller than 8? | SELECT MIN("13.5-inch/1400lb") FROM table_41095 WHERE "13.5-inch/1250lb" > '1' AND "12-inch" < '8' | wikisql |
CREATE TABLE jobs (
job_id int,
job_title varchar,
description varchar,
requirement varchar,
city varchar,
state varchar,
country varchar,
zip int
)
CREATE TABLE gsi (
course_offering_id int,
student_id int
)
CREATE TABLE area (
course_id int,
area varchar
)
CREATE TAB... | How many classes across all departments are being offered next semester ? | SELECT COUNT(DISTINCT course_offering.course_id) FROM course_offering, semester WHERE semester.semester = 'FA' AND semester.semester_id = course_offering.semester AND semester.year = 2016 | advising |
CREATE TABLE table_14634 (
"Team" text,
"Manager" text,
"Captain" text,
"Kit manufacturer" text,
"Shirt sponsor" text
) | Who is the captain of the manchester city team? | SELECT "Captain" FROM table_14634 WHERE "Team" = 'manchester city' | wikisql |
CREATE TABLE table_70414 (
"Year" real,
"Competition" text,
"Venue" text,
"Position" text,
"Performance" text
) | What was the earliest year in which long jump was performed in the world indoor Championships in 5th position? | SELECT MIN("Year") FROM table_70414 WHERE "Performance" = 'long jump' AND "Competition" = 'world indoor championships' AND "Position" = '5th' | wikisql |
CREATE TABLE table_1099080_1 (
bleeding_time VARCHAR,
condition VARCHAR
) | What was the bleeding time for the factor x deficiency as seen in amyloid purpura | SELECT bleeding_time FROM table_1099080_1 WHERE condition = "Factor X deficiency as seen in amyloid purpura" | sql_create_context |
CREATE TABLE table_name_21 (
position VARCHAR,
round VARCHAR,
nationality VARCHAR
) | What is the position of the player from round 2 from Sweden? | SELECT position FROM table_name_21 WHERE round = 2 AND nationality = "sweden" | sql_create_context |
CREATE TABLE hz_info (
KH text,
KLX number,
RYBH text,
YLJGDM text
)
CREATE TABLE jybgb (
BBCJBW text,
BBDM text,
BBMC text,
BBZT number,
BGDH text,
BGJGDM text,
BGJGMC text,
BGRGH text,
BGRQ time,
BGRXM text,
BGSJ time,
CJRQ time,
JSBBRQSJ time,
... | 患者卫夏岚以前出现过哪些异常的反应 | SELECT * 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.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 diagnoses (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE procedures (
... | calculate the minimum age of female patients who are aged 20 years or more. | SELECT MIN(demographic.age) FROM demographic WHERE demographic.gender = "F" AND demographic.age >= "20" | mimicsql_data |
CREATE TABLE table_name_21 (
to_par VARCHAR,
year_s__won VARCHAR,
country VARCHAR,
total VARCHAR
) | What is the To par of the United States, when the Total was 145, in 2004? | SELECT to_par FROM table_name_21 WHERE country = "united states" AND total = 145 AND year_s__won = "2004" | sql_create_context |
CREATE TABLE zyjybgb (
BBCJBW text,
BBDM text,
BBMC text,
BBZT number,
BGDH number,
BGJGDM text,
BGJGMC text,
BGRGH text,
BGRQ time,
BGRXM text,
BGSJ time,
CJRQ time,
JSBBRQSJ time,
JSBBSJ time,
JYBBH text,
JYJGMC text,
JYJSGH text,
JYJSQM text,
... | 检验报告单54790820335的检验技师工号是多少,叫什么名字 | SELECT zyjybgb.JYJSGH, zyjybgb.JYJSQM FROM zyjybgb WHERE zyjybgb.BGDH = '54790820335' UNION SELECT mzjybgb.JYJSGH, mzjybgb.JYJSQM FROM mzjybgb WHERE mzjybgb.BGDH = '54790820335' | css |
CREATE TABLE table_37962 (
"Year" real,
"Award" text,
"Category" text,
"Nominee" text,
"Result" text
) | What was the result for the best musical revival category? | SELECT "Result" FROM table_37962 WHERE "Category" = 'best musical revival' | wikisql |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.