context stringlengths 11 9.12k | question stringlengths 0 1.06k | SQL stringlengths 2 4.44k | source stringclasses 28
values |
|---|---|---|---|
CREATE TABLE table_name_93 (
overall VARCHAR,
pick__number VARCHAR,
name VARCHAR
) | How much Overall has a Pick # larger than 2, and a Name of claude humphrey? | SELECT COUNT(overall) FROM table_name_93 WHERE pick__number > 2 AND name = "claude humphrey" | sql_create_context |
CREATE TABLE table_73317 (
"Outcome" text,
"Year" real,
"Championship" text,
"Surface" text,
"Partner" text,
"Opponents" text,
"Score" text
) | What was the surface for events held in 1983? | SELECT "Surface" FROM table_73317 WHERE "Year" = '1983' | wikisql |
CREATE TABLE table_25505246_7 (
result VARCHAR,
against VARCHAR
) | What were the round results when Hanne Skak Jensen faced Austria? | SELECT result FROM table_25505246_7 WHERE against = "Austria" | sql_create_context |
CREATE TABLE customers (
customer_id number,
customer_type_code text,
address_line_1 text,
address_line_2 text,
town_city text,
state text,
email_address text,
phone_number text
)
CREATE TABLE products (
product_id number,
parent_product_id number,
product_category_code text... | What are lines 1 and 2 of the addressed of the customer with the email 'vbogisich@example.org'? | SELECT address_line_1, address_line_2 FROM customers WHERE email_address = "vbogisich@example.org" | spider |
CREATE TABLE table_name_85 (
away_team VARCHAR,
venue VARCHAR
) | Who is the away side at corio oval? | SELECT away_team FROM table_name_85 WHERE venue = "corio oval" | sql_create_context |
CREATE TABLE program_requirement (
program_id int,
category varchar,
min_credit int,
additional_req varchar
)
CREATE TABLE offering_instructor (
offering_instructor_id int,
offering_id int,
instructor_id int
)
CREATE TABLE program (
program_id int,
name varchar,
college varchar... | Which courses in Prehistory of Oceania count for the Other requirement ? | SELECT DISTINCT course.department, course.name, course.number FROM course INNER JOIN area ON course.course_id = area.course_id INNER JOIN program_course ON program_course.course_id = course.course_id WHERE (area.area LIKE '%Prehistory of Oceania%' OR course.description LIKE '%Prehistory of Oceania%' OR course.name LIKE... | advising |
CREATE TABLE table_1342256_11 (
incumbent VARCHAR,
first_elected VARCHAR
) | How many incumbents were elected in the 1926 election? | SELECT COUNT(incumbent) FROM table_1342256_11 WHERE first_elected = 1926 | sql_create_context |
CREATE TABLE table_name_19 (
date INTEGER,
opponent VARCHAR
) | What is the average date of the game with the Detroit Red Wings as the opponent? | SELECT AVG(date) FROM table_name_19 WHERE opponent = "detroit red wings" | sql_create_context |
CREATE TABLE table_2897457_8 (
pick__number INTEGER,
player VARCHAR
) | What was the pick number when Paul Krake was selected? | SELECT MIN(pick__number) FROM table_2897457_8 WHERE player = "Paul Krake" | sql_create_context |
CREATE TABLE Participates_in (
stuid INTEGER,
actid INTEGER
)
CREATE TABLE Activity (
actid INTEGER,
activity_name varchar(25)
)
CREATE TABLE Faculty_Participates_in (
FacID INTEGER,
actid INTEGER
)
CREATE TABLE Faculty (
FacID INTEGER,
Lname VARCHAR(15),
Fname VARCHAR(15),
Ra... | For each faculty rank, show the number of faculty members who have it. Visualize by pie chart. | SELECT Rank, COUNT(*) FROM Faculty GROUP BY Rank | nvbench |
CREATE TABLE d_icd_diagnoses (
row_id number,
icd9_code text,
short_title text,
long_title text
)
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... | how many patients were admitted to the hospital until 3 years ago? | SELECT COUNT(DISTINCT admissions.subject_id) FROM admissions WHERE DATETIME(admissions.admittime) <= DATETIME(CURRENT_TIME(), '-3 year') | mimic_iii |
CREATE TABLE table_test_9 (
"id" int,
"ejection_fraction_ef" int,
"anemia" bool,
"child_pugh_class" string,
"systolic_blood_pressure_sbp" int,
"leukopenia" int,
"heart_disease" bool,
"stroke" bool,
"av_block" bool,
"renal_disease" bool,
"hepatic_disease" bool,
"estimated_... | hepatic failure or dysfunction | SELECT * FROM table_test_9 WHERE hepatic_disease = 1 OR hepatic_disease = 1 | criteria2sql |
CREATE TABLE city (
City_ID int,
County_ID int,
Name text,
White real,
Black real,
Amerindian real,
Asian real,
Multiracial real,
Hispanic real
)
CREATE TABLE county_public_safety (
County_ID int,
Name text,
Population int,
Police_officers int,
Residents_per_offi... | How many counties correspond to each police force, display y axis in desc order. | SELECT Police_force, COUNT(*) FROM county_public_safety GROUP BY Police_force ORDER BY COUNT(*) DESC | nvbench |
CREATE TABLE table_name_29 (
loss VARCHAR,
date VARCHAR
) | Name the loss on may 22 | SELECT loss FROM table_name_29 WHERE date = "may 22" | sql_create_context |
CREATE TABLE table_name_76 (
tournament VARCHAR,
surface VARCHAR,
score_in_the_final VARCHAR
) | Which tournament had a clay surface and a score of 6 1, 3 6, 6 2? | SELECT tournament FROM table_name_76 WHERE surface = "clay" AND score_in_the_final = "6–1, 3–6, 6–2" | sql_create_context |
CREATE TABLE table_71075 (
"Date" text,
"Competition" text,
"Round" text,
"Opponent" text,
"Result" text,
"Score" text,
"Home/Away" text,
"Venue" text,
"Goals" text,
"Attendance" real,
"Report" text
) | What result was a date of 20/03/2008 with leeds as the opponent | SELECT "Result" FROM table_71075 WHERE "Opponent" = 'leeds' AND "Date" = '20/03/2008' | 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... | 在06-12-21到15-08-04的就诊结算日期内,把患者褚力言所有医疗就诊记录的编号给列出来 | SELECT t_kc21.MED_CLINIC_ID FROM t_kc21 JOIN t_kc24 JOIN t_kc21_t_kc24 ON t_kc21.MED_CLINIC_ID = t_kc21_t_kc24.MED_CLINIC_ID AND t_kc21_t_kc24.MED_SAFE_PAY_ID = t_kc24.MED_SAFE_PAY_ID WHERE t_kc21.PERSON_NM = '褚力言' AND t_kc24.CLINIC_SLT_DATE BETWEEN '2006-12-21' AND '2015-08-04' | css |
CREATE TABLE zyjzjlb_jybgb (
YLJGDM_ZYJZJLB text,
BGDH number,
YLJGDM number
)
CREATE TABLE mzjzjlb (
HXPLC number,
HZXM text,
JLSJ time,
JZJSSJ time,
JZKSBM text,
JZKSMC text,
JZKSRQ time,
JZLSH text,
JZZDBM text,
JZZDSM text,
JZZTDM number,
JZZTMC text,
... | 住院就诊15461734780是如何入院的?列出途径代码和名称 | SELECT zyjzjlb.RYTJDM, zyjzjlb.RYTJMC FROM zyjzjlb WHERE zyjzjlb.JZLSH = '15461734780' | css |
CREATE TABLE table_55764 (
"Years" text,
"Displacement" text,
"Engine" text,
"Power" text,
"Torque" text
) | What Engine has a Power of 114hp (85kw)? | SELECT "Engine" FROM table_55764 WHERE "Power" = '114hp (85kw)' | wikisql |
CREATE TABLE qtb (
CLINIC_ID 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,
INSU_TYPE text,
IN... | 医疗机构5083520从一一年六月六日开始,截止到二零年四月二十一日,出现疾病诊断结果出院与入院不相同的结果有多少次 | SELECT COUNT(*) FROM qtb WHERE qtb.MED_SER_ORG_NO = '5083520' AND qtb.IN_HOSP_DATE BETWEEN '2011-06-06' AND '2020-04-21' AND qtb.IN_DIAG_DIS_CD <> qtb.OUT_DIAG_DIS_CD UNION SELECT COUNT(*) FROM gyb WHERE gyb.MED_SER_ORG_NO = '5083520' AND gyb.IN_HOSP_DATE BETWEEN '2011-06-06' AND '2020-04-21' AND gyb.IN_DIAG_DIS_CD <> ... | css |
CREATE TABLE table_203_90 (
id number,
"religious\ngroup" text,
"population\n%" text,
"growth\n(1991-2001)" text,
"sex ratio\n(total)" number,
"literacy\n(%)" text,
"work participation\n(%)" text,
"sex ratio\n(rural)" number,
"sex ratio\n(urban)" number,
"sex ratio\n(child)" numb... | how many of these religious groups have a literacy rate of above 60 % ? | SELECT COUNT("religious\ngroup") FROM table_203_90 WHERE "literacy\n(%)" > 60 | squall |
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... | 参保人82087848住院金额是整数的次数有多少次 | SELECT COUNT(*) FROM gwyjzb WHERE gwyjzb.PERSON_ID = '82087848' AND gwyjzb.CLINIC_TYPE = '住院' AND MOD(gwyjzb.MED_AMOUT, 1) = 0 UNION SELECT COUNT(*) FROM fgwyjzb WHERE fgwyjzb.PERSON_ID = '82087848' AND fgwyjzb.CLINIC_TYPE = '住院' AND MOD(fgwyjzb.MED_AMOUT, 1) = 0 | css |
CREATE TABLE table_10474 (
"Rider" text,
"Manufacturer" text,
"Laps" real,
"Time/Retired" text,
"Grid" real
) | What is Time/Retired with a Grid of 12? | SELECT "Time/Retired" FROM table_10474 WHERE "Grid" = '12' | wikisql |
CREATE TABLE table_32743 (
"Rider" text,
"Bike" text,
"Laps" real,
"Time" text,
"Grid" real
) | What grid has 23 laps done by Josh Brookes? | SELECT "Grid" FROM table_32743 WHERE "Laps" = '23' AND "Rider" = 'josh brookes' | wikisql |
CREATE TABLE table_name_16 (
labour_party INTEGER,
fianna_fáil INTEGER
) | What is the lowest number in the Labour Party for the Fianna Fail higher than 5? | SELECT MIN(labour_party) FROM table_name_16 WHERE fianna_fáil > 5 | sql_create_context |
CREATE TABLE table_name_58 (
score VARCHAR,
opponent VARCHAR
) | Which Score has an Opponent of melanie south? | SELECT score FROM table_name_58 WHERE opponent = "melanie south" | sql_create_context |
CREATE TABLE table_34945 (
"Winner" text,
"Score" text,
"Date" text,
"Venue" text,
"Crowd" real
) | Who was the Winner at Campbelltown Sports Stadium? | SELECT "Winner" FROM table_34945 WHERE "Venue" = 'campbelltown sports stadium' | wikisql |
CREATE TABLE table_57556 (
"Runs" text,
"Against" text,
"City/Country" text,
"Venue" text,
"Result" text,
"Year" text
) | Name the place where adelaide oval is | SELECT "City/Country" FROM table_57556 WHERE "Venue" = 'adelaide oval' | wikisql |
CREATE TABLE table_name_56 (
home_team VARCHAR,
venue VARCHAR
) | Which team's home is the Arden Street Oval? | SELECT home_team FROM table_name_56 WHERE venue = "arden street oval" | sql_create_context |
CREATE TABLE table_15145 (
"Player" text,
"Years" text,
"Goals against" real,
"Saves" real,
"Save %" text
) | How many saves did the player with a 92.3% save rate and 217 goals have? | SELECT SUM("Saves") FROM table_15145 WHERE "Save %" = '92.3%' AND "Goals against" > '217' | wikisql |
CREATE TABLE table_name_60 (
stadium VARCHAR,
final_score VARCHAR
) | At what stadium was the final score 31-28? | SELECT stadium FROM table_name_60 WHERE final_score = "31-28" | sql_create_context |
CREATE TABLE table_59223 (
"Opposing Teams" text,
"Against" real,
"Date" text,
"Venue" text,
"Status" text
) | What is the sum of Against, when Opposing Teams is 'South Africa', and when Status is 'First Test'? | SELECT SUM("Against") FROM table_59223 WHERE "Opposing Teams" = 'south africa' AND "Status" = 'first test' | wikisql |
CREATE TABLE table_name_84 (
award VARCHAR,
result VARCHAR
) | What's the award for #100? | SELECT award FROM table_name_84 WHERE result = "#100" | sql_create_context |
CREATE TABLE diagnoses (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE demographic (
subject_id text,
hadm_id text,
name text,
marital_status text,
age text,
dob text,
gender text,
language text,
religion text,
... | count the number of patients whose diagnoses short title is joint replaced hip and drug route is sc? | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE diagnoses.short_title = "Joint replaced hip" AND prescriptions.route = "SC" | mimicsql_data |
CREATE TABLE table_203_364 (
id number,
"year" number,
"driver" text,
"nation of citizenship" text,
"racing series" text,
"type of vehicle" text
) | out of these drivers : nigel mansell , al unser , jr. , michael schumacher , and jeff gordon , all but one has more than one espy award . who only has one espy award ? | SELECT "driver" FROM table_203_364 WHERE "driver" IN ('nigel mansell', 'al unser, jr', 'michael schumacher', 'jeff gordon') GROUP BY "driver" HAVING COUNT(*) = 1 | squall |
CREATE TABLE diagnosis (
diagnosisid number,
patientunitstayid number,
diagnosisname text,
diagnosistime time,
icd9code text
)
CREATE TABLE treatment (
treatmentid number,
patientunitstayid number,
treatmentname text,
treatmenttime time
)
CREATE TABLE vitalperiodic (
vitalperio... | when was the last laboratory test during their first hospital visit for patient 006-224208? | SELECT lab.labresulttime FROM lab WHERE lab.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '006-224208' AND NOT patient.hospitaldischargetime IS NULL ORDER BY patient.hospital... | eicu |
CREATE TABLE candidate (
candidate_id number,
people_id number,
poll_source text,
date text,
support_rate number,
consider_rate number,
oppose_rate number,
unsure_rate number
)
CREATE TABLE people (
people_id number,
sex text,
name text,
date_of_birth text,
height nu... | Give the names of people who did not participate in the candidate election. | SELECT name FROM people WHERE NOT people_id IN (SELECT people_id FROM candidate) | spider |
CREATE TABLE university (
School_ID int,
School text,
Location text,
Founded real,
Affiliation text,
Enrollment real,
Nickname text,
Primary_conference text
)
CREATE TABLE basketball_match (
Team_ID int,
School_ID int,
Team_Name text,
ACC_Regular_Season text,
ACC_Per... | Draw a pie chart about the proportion of All_Games and Team_ID. | SELECT All_Games, Team_ID FROM basketball_match | nvbench |
CREATE TABLE PostTags (
PostId number,
TagId number
)
CREATE TABLE Tags (
Id number,
TagName text,
Count number,
ExcerptPostId number,
WikiPostId number
)
CREATE TABLE ReviewTaskResults (
Id number,
ReviewTaskId number,
ReviewTaskResultTypeId number,
CreationDate time,
... | How many are eligible to DV?. | SELECT COUNT(*) FROM Users WHERE Reputation >= 125 | sede |
CREATE TABLE nuclear_power_plants (
id text,
name text,
latitude text,
longitude text,
country text,
status text,
reactortype text,
reactormodel text,
constructionstartat text,
operationalfrom text,
operationalto text,
capacity text,
lastupdatedat text,
source tex... | How many nuclear power plants are in preparation to be used in Japan? | SELECT COUNT(*) FROM nuclear_power_plants WHERE country = "Japan" AND status = "Under Construction" | geonucleardata |
CREATE TABLE table_15804 (
"Year" real,
"Entrant" text,
"Chassis" text,
"Engine" text,
"Pts." real
) | What year did Ecurie Bleue score more than 0 points? | SELECT AVG("Year") FROM table_15804 WHERE "Pts." > '0' AND "Entrant" = 'ecurie bleue' | wikisql |
CREATE TABLE diagnoses (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE demographic (
subject_id text,
hadm_id text,
name text,
marital_status text,
age text,
dob text,
gender text,
language text,
religion text,
... | what is minimum age of patients whose admission location is trsf within this facility and discharge location is home health care? | SELECT MIN(demographic.age) FROM demographic WHERE demographic.admission_location = "TRSF WITHIN THIS FACILITY" AND demographic.discharge_location = "HOME HEALTH CARE" | mimicsql_data |
CREATE TABLE medication (
medicationid number,
patientunitstayid number,
drugname text,
dosage text,
routeadmin text,
drugstarttime time,
drugstoptime time
)
CREATE TABLE patient (
uniquepid text,
patienthealthsystemstayid number,
patientunitstayid number,
gender text,
a... | how many patients were diagnosed with sepsis in hospital and didn't come back to the hospital in the same month until 2103? | SELECT (SELECT COUNT(DISTINCT t1.uniquepid) FROM (SELECT patient.uniquepid, diagnosis.diagnosistime FROM diagnosis JOIN patient ON diagnosis.patientunitstayid = patient.patientunitstayid WHERE diagnosis.diagnosisname = 'sepsis' AND STRFTIME('%y', diagnosis.diagnosistime) <= '2103') AS t1) - (SELECT COUNT(DISTINCT t2.un... | eicu |
CREATE TABLE table_33168 (
"Home team" text,
"Home team score" text,
"Away team" text,
"Away team score" text,
"Venue" text,
"Crowd" real,
"Date" text
) | What Home team has an Away team score of 8.9 (57)? | SELECT "Home team" FROM table_33168 WHERE "Away team score" = '8.9 (57)' | wikisql |
CREATE TABLE table_name_46 (
kerry_number INTEGER,
bush_number VARCHAR
) | How many votes did Kerry get in the county that gave Bush 189,605 votes? | SELECT AVG(kerry_number) FROM table_name_46 WHERE bush_number = 189 OFFSET 605 | sql_create_context |
CREATE TABLE table_name_79 (
event VARCHAR,
competition VARCHAR,
year VARCHAR
) | Which Event has a Competition of chicago marathon, and a Year larger than 2004? | SELECT event FROM table_name_79 WHERE competition = "chicago marathon" AND year > 2004 | sql_create_context |
CREATE TABLE table_11963601_11 (
high_points VARCHAR,
date VARCHAR
) | Who was the high scorer and how much did they score in the game on May 3? | SELECT high_points FROM table_11963601_11 WHERE date = "May 3" | sql_create_context |
CREATE TABLE t_kc21_t_kc22 (
MED_CLINIC_ID text,
MED_EXP_DET_ID number
)
CREATE TABLE t_kc22 (
AMOUNT number,
CHA_ITEM_LEV number,
DATA_ID text,
DIRE_TYPE number,
DOSE_FORM text,
DOSE_UNIT text,
EACH_DOSAGE text,
EXP_OCC_DATE time,
FLX_MED_ORG_ID text,
FXBZ number,
H... | 从一七年七月二十六日到一八年七月二十四日,患者郑梦露医治过的疾病有多少种 | SELECT COUNT(t_kc21.IN_DIAG_DIS_CD) FROM t_kc21 WHERE t_kc21.PERSON_NM = '郑梦露' AND t_kc21.IN_HOSP_DATE BETWEEN '2017-07-26' AND '2018-07-24' | css |
CREATE TABLE table_78902 (
"Name" text,
"Pos." text,
"Height" text,
"Weight" text,
"Date of Birth" text,
"Club" text
) | What is the weight of the entry that has a date of birth of 1981-11-21? | SELECT "Weight" FROM table_78902 WHERE "Date of Birth" = '1981-11-21' | wikisql |
CREATE TABLE table_2866514_1 (
title VARCHAR,
us_viewers__million_ VARCHAR
) | What are the titles of episodes with 5.66 million US viewers? | SELECT title FROM table_2866514_1 WHERE us_viewers__million_ = "5.66" | sql_create_context |
CREATE TABLE table_64167 (
"Medal" text,
"Name" text,
"Games" text,
"Sport" text,
"Event" text
) | Name Event of Medal of gold and a Name of duncan white? | SELECT "Event" FROM table_64167 WHERE "Medal" = 'gold' AND "Name" = 'duncan white' | wikisql |
CREATE TABLE table_10767 (
"Home team" text,
"Home team score" text,
"Away team" text,
"Away team score" text,
"Venue" text,
"Crowd" real,
"Date" text
) | Who played as the away team when Essendon was the home team? | SELECT "Away team" FROM table_10767 WHERE "Home team" = 'essendon' | wikisql |
CREATE TABLE table_10083 (
"Institution" text,
"Location" text,
"Team Nickname" text,
"Joined TSCHL" real,
"Home Arena" text,
"Capacity" real,
"Team Website" text
) | what is the institution at akron, oh? | SELECT "Institution" FROM table_10083 WHERE "Location" = 'akron, oh' | wikisql |
CREATE TABLE cost (
row_id number,
subject_id number,
hadm_id number,
event_type text,
event_id number,
chargetime time,
cost number
)
CREATE TABLE diagnoses_icd (
row_id number,
subject_id number,
hadm_id number,
icd9_code text,
charttime time
)
CREATE TABLE patients (... | did patient 60136 have crushing injury foot diagnosed in this hospital encounter? | SELECT COUNT(*) > 0 FROM diagnoses_icd WHERE diagnoses_icd.icd9_code = (SELECT d_icd_diagnoses.icd9_code FROM d_icd_diagnoses WHERE d_icd_diagnoses.short_title = 'crushing injury foot') AND diagnoses_icd.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 60136 AND admissions.dischtime I... | mimic_iii |
CREATE TABLE table_name_27 (
engine VARCHAR,
entrant VARCHAR,
points VARCHAR,
tyres VARCHAR
) | Which engine of Rob Walker Racing Team has 47 points and F tyres? | SELECT engine FROM table_name_27 WHERE points = "47" AND tyres = "f" AND entrant = "rob walker racing team" | sql_create_context |
CREATE TABLE table_name_90 (
location VARCHAR,
time VARCHAR
) | At what location was the time 1:54:21? | SELECT location FROM table_name_90 WHERE time = "1:54:21" | sql_create_context |
CREATE TABLE table_name_77 (
wins INTEGER,
top_5 INTEGER
) | Tell me the sum of wins for top 5 less than 1 | SELECT SUM(wins) FROM table_name_77 WHERE top_5 < 1 | sql_create_context |
CREATE TABLE table_name_37 (
year INTEGER,
manager VARCHAR,
playoffs VARCHAR
) | Which Year has a Manager of bobby dews, and Playoffs of lost in 1st round? | SELECT MIN(year) FROM table_name_37 WHERE manager = "bobby dews" AND playoffs = "lost in 1st round" | sql_create_context |
CREATE TABLE table_name_63 (
points INTEGER,
date VARCHAR
) | What were the Points on December 13? | SELECT MAX(points) FROM table_name_63 WHERE date = "december 13" | sql_create_context |
CREATE TABLE table_5032 (
"Res." text,
"Record" text,
"Opponent" text,
"Method" text,
"Event" text,
"Round" real,
"Time" text,
"Location" text
) | Which res has a Record of 3-0? | SELECT "Res." FROM table_5032 WHERE "Record" = '3-0' | wikisql |
CREATE TABLE table_23916272_6 (
title VARCHAR,
season__number VARCHAR
) | List the title for the season episode number of 8. | SELECT title FROM table_23916272_6 WHERE season__number = 8 | sql_create_context |
CREATE TABLE table_204_788 (
id number,
"pos" text,
"no" number,
"driver" text,
"constructor" text,
"laps" number,
"time/retired" text,
"grid" number,
"points" number
) | what is the total of points in all ? | SELECT SUM("points") FROM table_204_788 | squall |
CREATE TABLE table_name_39 (
competition VARCHAR,
man_of_the_match VARCHAR
) | Rick Plant was the man of the match in what competition? | SELECT competition FROM table_name_39 WHERE man_of_the_match = "rick plant" | sql_create_context |
CREATE TABLE table_39981 (
"Rank" text,
"Nation" text,
"Gold" real,
"Silver" real,
"Bronze" real,
"Total" real
) | What is the highest silver medals for Russia with more than 5 bronze medals? | SELECT MAX("Silver") FROM table_39981 WHERE "Nation" = 'russia' AND "Bronze" > '5' | wikisql |
CREATE TABLE table_54114 (
"Driver" text,
"Constructor" text,
"Laps" real,
"Time/Retired" text,
"Grid" real
) | What is the most laps for Ayrton Senna? | SELECT MAX("Laps") FROM table_54114 WHERE "Driver" = 'ayrton senna' | wikisql |
CREATE TABLE table_26842217_12 (
home_team VARCHAR,
broadcast VARCHAR
) | Who was the home team in the game broadcast on the Big East Network? | SELECT home_team FROM table_26842217_12 WHERE broadcast = "Big East Network" | sql_create_context |
CREATE TABLE table_name_64 (
type VARCHAR,
list_entry_number VARCHAR,
name VARCHAR
) | Which type has a list entry number more than 1356436, named Albion Congregational Church? | SELECT type FROM table_name_64 WHERE list_entry_number > 1356436 AND name = "albion congregational church" | sql_create_context |
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 demographic (... | get the number of office admission patients who had ascitic fluid lab test. | 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.fluid = "Ascites" | 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... | 华明哲这个病人被门诊诊断为脑梗死后遗症,他做的检测指标097260的结果定量和单位是啥 | SELECT jyjgzbb.JCZBJGDL, jyjgzbb.JCZBJGDW FROM person_info JOIN hz_info JOIN mzjzjlb JOIN jybgb JOIN jyjgzbb JOIN jybgb_jyjgzbb 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 = j... | css |
CREATE TABLE table_2248 (
"Season" real,
"Series" text,
"Team" text,
"Races" real,
"Wins" real,
"Poles" real,
"F/Laps" real,
"Podiums" real,
"Points" text,
"Position" text
) | How many poles had 78 points? | SELECT COUNT("Poles") FROM table_2248 WHERE "Points" = '78' | wikisql |
CREATE TABLE Students (
student_id VARCHAR,
personal_name VARCHAR
)
CREATE TABLE Student_Course_Enrolment (
date_of_enrolment VARCHAR,
date_of_completion VARCHAR,
student_id VARCHAR
) | List the dates of enrollment and completion of the student with personal name 'Karson'. | SELECT T1.date_of_enrolment, T1.date_of_completion FROM Student_Course_Enrolment AS T1 JOIN Students AS T2 ON T1.student_id = T2.student_id WHERE T2.personal_name = "Karson" | sql_create_context |
CREATE TABLE Lives_in (
stuid INTEGER,
dormid INTEGER,
room_number INTEGER
)
CREATE TABLE Dorm (
dormid INTEGER,
dorm_name VARCHAR(20),
student_capacity INTEGER,
gender VARCHAR(1)
)
CREATE TABLE Has_amenity (
dormid INTEGER,
amenid INTEGER
)
CREATE TABLE Student (
StuID INTEGE... | Find total capacity of dorms for each gender in a bar chart, and could you list by the x-axis from low to high? | SELECT gender, SUM(student_capacity) FROM Dorm GROUP BY gender ORDER BY gender | nvbench |
CREATE TABLE Documents_to_be_Destroyed (
Document_ID INTEGER,
Destruction_Authorised_by_Employee_ID INTEGER,
Destroyed_by_Employee_ID INTEGER,
Planned_Destruction_Date DATETIME,
Actual_Destruction_Date DATETIME,
Other_Details VARCHAR(255)
)
CREATE TABLE All_Documents (
Document_ID INTEGER,
... | Can you draw the trend of how many date in location from over the date in location from? | SELECT Date_in_Location_From, COUNT(Date_in_Location_From) FROM Document_Locations | nvbench |
CREATE TABLE table_name_58 (
school_club_team VARCHAR,
position VARCHAR,
player VARCHAR
) | What School/Club Team has a Player named Juan Dixon and a Position of guard? | SELECT school_club_team FROM table_name_58 WHERE position = "guard" AND player = "juan dixon" | sql_create_context |
CREATE TABLE table_28848697_4 (
year VARCHAR,
tied VARCHAR
) | What is the year listed when tied is listed as 11? | SELECT year FROM table_28848697_4 WHERE tied = 11 | sql_create_context |
CREATE TABLE table_12892 (
"Game" real,
"Date" text,
"Opponent" text,
"Score" text,
"Location/Attendance" text,
"Record" text,
"Streak" text
) | Which Game has an Opponent of @ houston rockets? | SELECT MIN("Game") FROM table_12892 WHERE "Opponent" = '@ houston rockets' | wikisql |
CREATE TABLE mzjzjlb (
HXPLC number,
HZXM text,
JLSJ time,
JZJSSJ time,
JZKSBM text,
JZKSMC text,
JZKSRQ time,
JZLSH text,
JZZDBM text,
JZZDSM text,
JZZTDM number,
JZZTMC text,
KH text,
KLX number,
MJZH text,
ML number,
MZZYZDZZBM text,
MZZYZDZZMC ... | 病患91823210在2008年5月3日以前做过的检验报告在哪些住院门诊?列出住院就诊流水编码 | SELECT zyjzjlb.JZLSH FROM hz_info JOIN zyjzjlb ON hz_info.YLJGDM = zyjzjlb.YLJGDM AND hz_info.KH = zyjzjlb.KH AND hz_info.KLX = zyjzjlb.KLX WHERE hz_info.RYBH = '91823210' AND NOT zyjzjlb.JZLSH IN (SELECT jybgb.JZLSH FROM jybgb WHERE jybgb.BGRQ >= '2008-05-03') | css |
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,... | Calculate the total number of patients who had transient ischemic attack as their primary disease. | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.diagnosis = "TRANSIENT ISCHEMIC ATTACK" | mimicsql_data |
CREATE TABLE table_46256 (
"Res." text,
"Record" text,
"Opponent" text,
"Method" text,
"Event" text,
"Round" real,
"Location" text
) | What is the method of the match with chris ade as the opponent? | SELECT "Method" FROM table_46256 WHERE "Opponent" = 'chris ade' | wikisql |
CREATE TABLE table_name_6 (
est VARCHAR,
city VARCHAR,
state_province VARCHAR,
league VARCHAR
) | In what year was the cfl team in edmonton, alberta established? | SELECT est FROM table_name_6 WHERE state_province = "alberta" AND league = "cfl" AND city = "edmonton" | sql_create_context |
CREATE TABLE table_name_70 (
pick__number VARCHAR,
name VARCHAR
) | What number pick was Bill Athey? | SELECT pick__number FROM table_name_70 WHERE name = "bill athey" | sql_create_context |
CREATE TABLE table_name_77 (
home_team VARCHAR,
away_team VARCHAR
) | What was the score of the home team when they played carlton? | SELECT home_team AS score FROM table_name_77 WHERE away_team = "carlton" | sql_create_context |
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 transfers (
row_id number,
subject_id number,
hadm_... | how many patients during this year were prescribed nicardipine hcl iv? | SELECT COUNT(DISTINCT admissions.subject_id) FROM admissions WHERE admissions.hadm_id IN (SELECT prescriptions.hadm_id FROM prescriptions WHERE prescriptions.drug = 'nicardipine hcl iv' AND DATETIME(prescriptions.startdate, 'start of year') = DATETIME(CURRENT_TIME(), 'start of year', '-0 year')) | mimic_iii |
CREATE TABLE table_name_1 (
name VARCHAR,
avg_g VARCHAR
) | what is the name when avg/g is 13.7? | SELECT name FROM table_name_1 WHERE avg_g = 13.7 | sql_create_context |
CREATE TABLE table_name_42 (
l2_cache VARCHAR,
frequency VARCHAR,
model_number VARCHAR
) | Which L2-Cache has a Frequency of 1333 mhz, and a Model Number of c3 1.3a? | SELECT l2_cache FROM table_name_42 WHERE frequency = "1333 mhz" AND model_number = "c3 1.3a" | sql_create_context |
CREATE TABLE demographic (
subject_id text,
hadm_id text,
name text,
marital_status text,
age text,
dob text,
gender text,
language text,
religion text,
admission_type text,
days_stay text,
insurance text,
ethnicity text,
expire_flag text,
admission_location t... | Among patients born before the year 2047, how many of them had a lab test for cerebrospinal fluid (csf)? | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.dob_year < "2047" AND lab.fluid = "Cerebrospinal Fluid (CSF)" | mimicsql_data |
CREATE TABLE labevents (
row_id number,
subject_id number,
hadm_id number,
itemid number,
charttime time,
valuenum number,
valueuom text
)
CREATE TABLE d_icd_diagnoses (
row_id number,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE cost (
row_id number... | what was the last value of heart rate of patient 1784? | SELECT 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 = 1784)) AND chartevents.itemid IN (SELECT d_items.itemid FROM d_items WHERE d_items.label = 'heart rate... | mimic_iii |
CREATE TABLE table_26168687_5 (
no_in_season INTEGER
) | Name the most number in season | SELECT MIN(no_in_season) FROM table_26168687_5 | sql_create_context |
CREATE TABLE mzjzjlb (
HXPLC number,
HZXM text,
JLSJ time,
JZJSSJ time,
JZKSBM text,
JZKSMC text,
JZKSRQ time,
JZLSH text,
JZZDBM text,
JZZDSM text,
JZZTDM number,
JZZTMC text,
KH text,
KLX number,
MJZH text,
ML number,
MZZYZDZZBM text,
MZZYZDZZMC ... | 在21年8月25日到21年9月5日期间,患者马璇珠曾到医院看过几次病 | SELECT (SELECT COUNT(*) FROM person_info JOIN hz_info JOIN mzjzjlb JOIN hz_info_mzjzjlb ON person_info.RYBH = hz_info.RYBH AND hz_info.YLJGDM = hz_info_mzjzjlb.YLJGDM AND hz_info.KH = mzjzjlb.KH AND hz_info.KLX = mzjzjlb.KLX AND hz_info_mzjzjlb.JZLSH = mzjzjlb.JZLSH AND hz_info_mzjzjlb.YLJGDM = hz_info_mzjzjlb.YLJGDM A... | css |
CREATE TABLE course_prerequisite (
pre_course_id int,
course_id int
)
CREATE TABLE area (
course_id int,
area varchar
)
CREATE TABLE offering_instructor (
offering_instructor_id int,
offering_id int,
instructor_id int
)
CREATE TABLE student (
student_id int,
lastname varchar,
... | How many credits do I have ? | SELECT DISTINCT total_credit FROM student WHERE student_id = 1 | advising |
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 difference between the total amount of input and output of patient 018-115975 on 02/05/2105. | SELECT (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 = '018-115975')) AND intakeoutput.cellpath ... | eicu |
CREATE TABLE table_44081 (
"Game" text,
"Date" text,
"Opponent" text,
"Result" text,
"Falcons points" real,
"Opponents" real,
"Attendance" real
) | What is the average attendance of the game with 38 opponent and less than 14 Falcons points? | SELECT AVG("Attendance") FROM table_44081 WHERE "Opponents" = '38' AND "Falcons points" < '14' | wikisql |
CREATE TABLE table_name_11 (
years_in_orlando VARCHAR,
position VARCHAR
) | Which years in Orlando are featured with the center position? | SELECT years_in_orlando FROM table_name_11 WHERE position = "center" | sql_create_context |
CREATE TABLE code_description (
code varchar,
description text
)
CREATE TABLE time_zone (
time_zone_code text,
time_zone_name text,
hours_from_gmt int
)
CREATE TABLE restriction (
restriction_code text,
advance_purchase int,
stopovers text,
saturday_stay_required text,
minimum_... | are there any flights from DALLAS FORT WORTH to BOSTON leaving before 1000 | 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_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'BOSTON' AND flight.departure_time < 1000 AND flight.to_airport = AIRPORT_SERVICE_1.airpor... | atis |
CREATE TABLE Products (
Code INTEGER,
Name VARCHAR(255),
Price DECIMAL,
Manufacturer INTEGER
)
CREATE TABLE Manufacturers (
Code INTEGER,
Name VARCHAR(255),
Headquarter VARCHAR(255),
Founder VARCHAR(255),
Revenue REAL
) | For those records from the products and each product's manufacturer, show me about the distribution of name and the sum of manufacturer , and group by attribute name in a bar chart, order by the y-axis from low to high. | SELECT T1.Name, T1.Manufacturer FROM Products AS T1 JOIN Manufacturers AS T2 ON T1.Manufacturer = T2.Code GROUP BY T1.Name ORDER BY T1.Manufacturer | nvbench |
CREATE TABLE table_46621 (
"Player" text,
"Nationality" text,
"Position" text,
"Years for Grizzlies" text,
"School/Club Team" text
) | What school/club did gerald wilkins attend? | SELECT "School/Club Team" FROM table_46621 WHERE "Player" = 'gerald wilkins' | wikisql |
CREATE TABLE job_history (
EMPLOYEE_ID decimal(6,0),
START_DATE date,
END_DATE date,
JOB_ID varchar(10),
DEPARTMENT_ID decimal(4,0)
)
CREATE TABLE regions (
REGION_ID decimal(5,0),
REGION_NAME varchar(25)
)
CREATE TABLE employees (
EMPLOYEE_ID decimal(6,0),
FIRST_NAME varchar(20),
... | For those employees who do not work in departments with managers that have ids between 100 and 200, draw a bar chart about the distribution of hire_date and the average of manager_id bin hire_date by weekday. | SELECT HIRE_DATE, AVG(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_204_482 (
id number,
"date" text,
"position" text,
"name" text,
"from" text,
"fee" text
) | what was the transfer fee to transfer kevin watson ? | SELECT "fee" FROM table_204_482 WHERE "name" = 'kevin watson' | squall |
CREATE TABLE table_50066 (
"Year" real,
"Award giving body" text,
"Category" text,
"Nominated for" text,
"Result" text
) | What's the result for the category of best actor in a supporting role? | SELECT "Result" FROM table_50066 WHERE "Category" = 'best actor in a supporting role' | wikisql |
CREATE TABLE table_20443 (
"Party" text,
"Marplan" text,
"Gallup" text,
"National Opinion Polls (NOP)" text,
"Opinion Research Centre (OPC)" text,
"Harris" text
) | What is the percentage of the Labour Party on the Harris Poll | SELECT "Harris" FROM table_20443 WHERE "Party" = 'Labour' | wikisql |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.