context stringlengths 11 9.12k | question stringlengths 0 1.06k | SQL stringlengths 2 4.44k | source stringclasses 28
values |
|---|---|---|---|
CREATE TABLE table_name_78 (
result VARCHAR,
date VARCHAR
) | What is the Result of the game on November 24, 1946? | SELECT result FROM table_name_78 WHERE date = "november 24, 1946" | sql_create_context |
CREATE TABLE cost (
row_id number,
subject_id number,
hadm_id number,
event_type text,
event_id number,
chargetime time,
cost number
)
CREATE TABLE transfers (
row_id number,
subject_id number,
hadm_id number,
icustay_id number,
eventtype text,
careunit text,
war... | tell me the maximum heart rate of patient 20033 on the first intensive care unit visit? | SELECT MAX(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 = 20033) AND NOT icustays.outtime IS NULL ORDER BY icustays.intime LIMIT 1) AND chartevents.itemid ... | mimic_iii |
CREATE TABLE table_name_23 (
team VARCHAR,
laps VARCHAR
) | Can you tell me the Team that has the Laps of 379? | SELECT team FROM table_name_23 WHERE laps = 379 | sql_create_context |
CREATE TABLE table_name_25 (
points INTEGER,
grid VARCHAR
) | What are grid 4's average points? | SELECT AVG(points) FROM table_name_25 WHERE grid = 4 | sql_create_context |
CREATE TABLE table_50893 (
"Race Title" text,
"Circuit" text,
"City / State" text,
"Date" text,
"Winner" text,
"Team" text
) | On what date did Dick Johnson with at Calder? | SELECT "Date" FROM table_50893 WHERE "Winner" = 'dick johnson' AND "Race Title" = 'calder' | wikisql |
CREATE TABLE table_25539502_1 (
position VARCHAR,
team VARCHAR
) | What was his position when the team was FMS International? | SELECT position FROM table_25539502_1 WHERE team = "FMS International" | sql_create_context |
CREATE TABLE table_name_84 (
margin_of_victory VARCHAR,
winning_score VARCHAR
) | What was the margin of victory when the winning score was 9 (72-68-64-67=271)? | SELECT margin_of_victory FROM table_name_84 WHERE winning_score = −9(72 - 68 - 64 - 67 = 271) | sql_create_context |
CREATE TABLE table_70863 (
"School" text,
"Team" text,
"Division Record" text,
"Overall Record" text,
"Season Outcome" text
) | What is the School, when the Team is Golden Knights? | SELECT "School" FROM table_70863 WHERE "Team" = 'golden knights' | wikisql |
CREATE TABLE table_name_81 (
winner VARCHAR,
type VARCHAR,
date VARCHAR
) | Who was the winner with a mountain stage type on 22 May? | SELECT winner FROM table_name_81 WHERE type = "mountain stage" AND date = "22 may" | sql_create_context |
CREATE TABLE table_9690 (
"Year" real,
"Lansing (LAN)" text,
"Detroit (DTW)" text,
"Grand Rapids (GRR)" text,
"Flint (FNT)" text,
"Kalamazoo (AZO)" text,
"Saginaw (MBS)" text
) | What was the passenger fare for Lansing, when the passenger fare for Kalamazoo was $599.39? | SELECT "Lansing (LAN)" FROM table_9690 WHERE "Kalamazoo (AZO)" = '$599.39' | wikisql |
CREATE TABLE table_70810 (
"Date" text,
"Course" text,
"Distance" text,
"Winner" text,
"Race Leader" text
) | What is the date of the Rome to Florence course? | SELECT "Date" FROM table_70810 WHERE "Course" = 'rome to florence' | wikisql |
CREATE TABLE table_33077 (
"sliding tackle" text,
"spear tackle" text,
"dump tackle" text,
"body tackle" text,
"ankle tap" text,
"diving tackle" text,
"bumping/blocking" text,
"shoulder charge" text,
"steal/intercept ball" text,
"Chicken wing" text
) | Which sliding tackle has no dump tackle and a restricted shoulder charge? | SELECT "sliding tackle" FROM table_33077 WHERE "dump tackle" = 'no' AND "shoulder charge" = 'restricted' | wikisql |
CREATE TABLE table_203_533 (
id number,
"season" number,
"level" text,
"division" text,
"section" text,
"position" text,
"movements" text
) | how many times has the team played in divison 1 since 2000 ? | SELECT COUNT(*) FROM table_203_533 WHERE "division" = 'division 1' AND "season" >= 2000 | squall |
CREATE TABLE hz_info_zyjzjlb (
JZLSH number,
YLJGDM number,
zyjzjlb_id number
)
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 tim... | 在2007-03-13之后,患者潘锐泽有哪些住院就诊的检验报告单?查查住院就诊的流水号 | SELECT zyjzjlb.JZLSH FROM person_info JOIN hz_info JOIN zyjzjlb JOIN hz_info_zyjzjlb ON person_info.RYBH = hz_info.RYBH AND hz_info.YLJGDM = hz_info_zyjzjlb.YLJGDM AND hz_info.KH = zyjzjlb.KH AND hz_info.KLX = zyjzjlb.KLX AND hz_info_zyjzjlb.JZLSH = zyjzjlb.JZLSH AND hz_info_zyjzjlb.YLJGDM = hz_info_zyjzjlb.YLJGDM AND ... | css |
CREATE TABLE table_name_80 (
league_goals INTEGER,
total_goals VARCHAR,
league_cup_goals VARCHAR
) | What was the sum of league goals where the toal was 8 and league cup goals were larger than 0? | SELECT SUM(league_goals) FROM table_name_80 WHERE total_goals = 8 AND league_cup_goals > 0 | sql_create_context |
CREATE TABLE table_name_77 (
events INTEGER,
tournament VARCHAR,
top_25 VARCHAR
) | What is the largest number of events with the Masters Tournament and less than 4 in the top-25? | SELECT MAX(events) FROM table_name_77 WHERE tournament = "masters tournament" AND top_25 < 4 | sql_create_context |
CREATE TABLE table_43419 (
"Background" text,
"Original Team" text,
"Hometown" text,
"Result" text,
"Raised" text
) | What is the Background of the contestant with a Hometown listed as Los Angeles, California? | SELECT "Background" FROM table_43419 WHERE "Hometown" = 'los angeles, california' | wikisql |
CREATE TABLE table_56879 (
"Race" text,
"Circuit" text,
"Date" text,
"Pole position" text,
"Fastest lap" text,
"Winning driver" text,
"Constructor" text,
"Tyre" text,
"Report" text
) | Name the winning driver with circuit of monza | SELECT "Winning driver" FROM table_56879 WHERE "Circuit" = 'monza' | wikisql |
CREATE TABLE table_25691838_2 (
introductory_phrase VARCHAR,
production_code VARCHAR
) | What was the introductory phrase for the episode with the production bode 6026? | SELECT introductory_phrase FROM table_25691838_2 WHERE production_code = 6026 | sql_create_context |
CREATE TABLE table_name_75 (
points INTEGER,
game VARCHAR,
opponent VARCHAR
) | Which Points have a Game larger than 25, and an Opponent of dallas stars? | SELECT AVG(points) FROM table_name_75 WHERE game > 25 AND opponent = "dallas stars" | sql_create_context |
CREATE TABLE student_record (
student_id int,
course_id int,
semester int,
grade varchar,
how varchar,
transfer_source varchar,
earn_credit varchar,
repeat_term varchar,
test_id varchar
)
CREATE TABLE program (
program_id int,
name varchar,
college varchar,
introduct... | On Friday , does CDB 582 have a class ? | SELECT DISTINCT course_offering.friday FROM course INNER JOIN course_offering ON course.course_id = course_offering.course_id INNER JOIN semester ON semester.semester_id = course_offering.semester WHERE course.department = 'CDB' AND course.number = 582 AND semester.semester = 'WN' AND semester.year = 2016 | advising |
CREATE TABLE table_name_82 (
time INTEGER,
lane VARCHAR,
nationality VARCHAR
) | What is the time with fewer than 5 lanes for the United States? | SELECT SUM(time) FROM table_name_82 WHERE lane < 5 AND nationality = "united states" | sql_create_context |
CREATE TABLE table_20298 (
"#" real,
"Advocate # 1" text,
"Advocate # 2" text,
"Root of All Evil" text,
"Poll winner" text,
"Original air date" text
) | Name the air date for andy kindler for donald trump | SELECT "Original air date" FROM table_20298 WHERE "Advocate # 1" = 'Andy Kindler for Donald Trump' | wikisql |
CREATE TABLE table_name_89 (
country VARCHAR,
score VARCHAR,
player VARCHAR
) | What Country has a 67 score by Phil Mickelson? | SELECT country FROM table_name_89 WHERE score = 67 AND player = "phil mickelson" | sql_create_context |
CREATE TABLE t_kc22 (
AMOUNT number,
CHA_ITEM_LEV number,
DATA_ID text,
DIRE_TYPE number,
DOSE_FORM text,
DOSE_UNIT text,
EACH_DOSAGE text,
EXP_OCC_DATE time,
FLX_MED_ORG_ID text,
FXBZ number,
HOSP_DOC_CD text,
HOSP_DOC_NM text,
MED_CLINIC_ID text,
MED_DIRE_CD tex... | 就诊结算日期在08年1月19日到12年6月21日期间内的患者方颖慧所有医疗就诊记录编号都是啥? | 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 '2008-01-19' AND '2012-06-21' | css |
CREATE TABLE table_204_135 (
id number,
"position" number,
"club" text,
"played" number,
"points" number,
"wins" number,
"draws" number,
"losses" number,
"goals for" number,
"goals against" number,
"goal difference" number
) | what club had the same goals against as granada cf had goals for ? | SELECT "club" FROM table_204_135 WHERE "club" <> 'granada cf' AND "goals against" = (SELECT "goals for" FROM table_204_135 WHERE "club" = 'granada cf') | squall |
CREATE TABLE cost (
row_id number,
subject_id number,
hadm_id number,
event_type text,
event_id number,
chargetime time,
cost number
)
CREATE TABLE chartevents (
row_id number,
subject_id number,
hadm_id number,
icustay_id number,
itemid number,
charttime time,
v... | did the value of creatinine of patient 41014 last measured on the first hospital visit be greater than second to last measured on the first hospital visit? | SELECT (SELECT labevents.valuenum FROM labevents WHERE labevents.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 41014 AND NOT admissions.dischtime IS NULL ORDER BY admissions.admittime LIMIT 1) AND labevents.itemid IN (SELECT d_labitems.itemid FROM d_labitems WHERE d_labitems.label ... | mimic_iii |
CREATE TABLE demographic (
subject_id text,
hadm_id text,
name text,
marital_status text,
age text,
dob text,
gender text,
language text,
religion text,
admission_type text,
days_stay text,
insurance text,
ethnicity text,
expire_flag text,
admission_location t... | how many patients whose drug name is gastroview (diatrizoate meglumine & sodium)? | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE prescriptions.drug = "Gastroview (Diatrizoate Meglumine & Sodium)" | mimicsql_data |
CREATE TABLE competition (
Competition_ID int,
Year real,
Competition_type text,
Country text
)
CREATE TABLE club (
Club_ID int,
name text,
Region text,
Start_year text
)
CREATE TABLE competition_result (
Competition_ID int,
Club_ID_1 int,
Club_ID_2 int,
Score text
)
C... | Show the number of different competition types with a bar graph, and I want to display from high to low by the Competition_type. | SELECT Competition_type, COUNT(Competition_type) FROM competition GROUP BY Competition_type ORDER BY Competition_type DESC | nvbench |
CREATE TABLE table_name_88 (
date VARCHAR,
country VARCHAR,
format VARCHAR
) | What is the date for the United Kingdom with an LP format? | SELECT date FROM table_name_88 WHERE country = "united kingdom" AND format = "lp" | sql_create_context |
CREATE TABLE table_name_8 (
state VARCHAR,
mountain_peak VARCHAR
) | Which state is Mount Chiginagak located in? | SELECT state FROM table_name_8 WHERE mountain_peak = "mount chiginagak" | sql_create_context |
CREATE TABLE table_name_5 (
college VARCHAR,
position VARCHAR,
school VARCHAR
) | What college has a position of defensive line and Grant high school? | SELECT college FROM table_name_5 WHERE position = "defensive line" AND school = "grant high school" | sql_create_context |
CREATE TABLE table_22860_1 (
age__before_ VARCHAR,
maghreb VARCHAR
) | What are all ages for Maghreb is Maarifiense? | SELECT age__before_ FROM table_22860_1 WHERE maghreb = "Maarifiense" | sql_create_context |
CREATE TABLE table_62576 (
"Team 1" text,
"Score" text,
"Team 2" text,
"1st round" text,
"2nd round" text
) | What shows for 2nd round when the team 1 was Rc Strasbourg (d1)? | SELECT "2nd round" FROM table_62576 WHERE "Team 1" = 'rc strasbourg (d1)' | wikisql |
CREATE TABLE table_42877 (
"Episode" text,
"Rating" real,
"Share" real,
"Rating/Share (18-49)" text,
"Viewers (millions)" real,
"Rank (Timeslot)" text,
"Rank (Night)" text,
"Rank (Week)" text
) | What is the average share for episodes with over 7.82 viewers, ranks of 3 and a weekly rank of 54? | SELECT AVG("Share") FROM table_42877 WHERE "Viewers (millions)" > '7.82' AND "Rank (Timeslot)" = '3' AND "Rank (Week)" = '54' | wikisql |
CREATE TABLE table_1893 (
"No. in series" real,
"Title" text,
"Directed by" text,
"Written by" text,
"Original air date" text,
"Production code" text,
"U.S. viewers (million)" text
) | Name the number of production code for 5.08 | SELECT COUNT("Production code") FROM table_1893 WHERE "U.S. viewers (million)" = '5.08' | 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... | How many patients were admitted before the year 2167 with a lab test name reticulocyte count, automated? | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.admityear < "2167" AND lab.label = "Reticulocyte Count, Automated" | mimicsql_data |
CREATE TABLE hz_info (
KH text,
KLX number,
RYBH text,
YLJGDM text
)
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,... | 患者98927870为检测指标229548从06年10月2日到2011年7月16日之内的医务人员工号与姓名都是什么? | SELECT jyjgzbb.JCRGH, jyjgzbb.JCRXM 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 jyjgzbb.JYRQ BETWEEN '2006-10-02' AND '2011-07-1... | css |
CREATE TABLE table_47372 (
"Game" real,
"Date" text,
"Team" text,
"Score" text,
"High points" text,
"High rebounds" text,
"High assists" text,
"Location Attendance" text,
"Record" text
) | who had the high rebounds when the team was @ toronto? | SELECT "High rebounds" FROM table_47372 WHERE "Team" = '@ toronto' | wikisql |
CREATE TABLE table_32680 (
"Home team" text,
"Home team score" text,
"Away team" text,
"Away team score" text,
"Venue" text,
"Crowd" real,
"Date" text
) | What is the crowd with an Away team score of 8.11 (59)? | SELECT AVG("Crowd") FROM table_32680 WHERE "Away team score" = '8.11 (59)' | wikisql |
CREATE TABLE table_23766 (
"Year ended" real,
"Revenue (\u20acmillion)" real,
"Earnings before interest and taxes (\u20acm)" text,
"Net profit (\u20acm)" text,
"Earnings per share (\u20ac)" text
) | Name the ebit for eps being 1.78 | SELECT "Earnings before interest and taxes (\u20acm)" FROM table_23766 WHERE "Earnings per share (\u20ac)" = '1.78' | wikisql |
CREATE TABLE table_name_80 (
purse__ INTEGER,
dates VARCHAR
) | What is the highest Purse for aug 3 5? | SELECT MAX(purse__) AS $_ FROM table_name_80 WHERE dates = "aug 3–5" | sql_create_context |
CREATE TABLE table_name_25 (
circumstances VARCHAR,
date VARCHAR
) | What happened on 2009-03-14? | SELECT circumstances FROM table_name_25 WHERE date = "2009-03-14" | sql_create_context |
CREATE TABLE table_name_23 (
record VARCHAR,
date VARCHAR
) | What is the record on august 18? | SELECT record FROM table_name_23 WHERE date = "august 18" | sql_create_context |
CREATE TABLE table_204_882 (
id number,
"number" number,
"builder" text,
"entered service" text,
"withdrawn" text,
"notes" text
) | what is the total number of different builders in the table ? | SELECT COUNT(DISTINCT "builder") FROM table_204_882 | squall |
CREATE TABLE procedures (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
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 t... | how many patients whose language is spanish are aged below 83 years? | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.language = "SPAN" AND demographic.age < "83" | mimicsql_data |
CREATE TABLE PostLinks (
Id number,
CreationDate time,
PostId number,
RelatedPostId number,
LinkTypeId number
)
CREATE TABLE PostNotices (
Id number,
PostId number,
PostNoticeTypeId number,
CreationDate time,
DeletionDate time,
ExpiryDate time,
Body text,
OwnerUserId... | Recent Java questions from higher-rep users. | SELECT DISTINCT A.Id, A.CreationDate, C.Reputation, A.Score, A.AcceptedAnswerId, A.Title, A.Body FROM Posts AS A INNER JOIN PostTypes AS B ON A.PostTypeId = B.Id INNER JOIN Users AS C ON A.OwnerUserId = C.Id INNER JOIN PostTags AS D ON A.Id = D.PostId INNER JOIN Tags AS E ON D.TagId = E.Id WHERE A.CreationDate > DATEAD... | sede |
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... | 患者37544109在2015年2月26日到2020年8月30日内所做的检测丙戊酸的检查是哪个医务人员工号及姓名都是什么? | SELECT jyjgzbb.JCRGH, jyjgzbb.JCRXM FROM hz_info JOIN mzjzjlb JOIN jybgb JOIN jyjgzbb JOIN hz_info_mzjzjlb ON hz_info.YLJGDM = hz_info_mzjzjlb.YLJGDM AND hz_info.KH = mzjzjlb.KH AND hz_info.KLX = mzjzjlb.KLX AND hz_info_mzjzjlb.YLJGDM = jybgb.YLJGDM_MZJZJLB AND mzjzjlb.JZLSH = jybgb.JZLSH_MZJZJLB AND jybgb.YLJGDM = jyj... | css |
CREATE TABLE table_5502 (
"Week" real,
"Date" text,
"Opponent" text,
"Result" text,
"Attendance" real
) | What was the latest week that had a game on November 18, 1951? | SELECT MAX("Week") FROM table_5502 WHERE "Date" = 'november 18, 1951' | wikisql |
CREATE TABLE SuggestedEditVotes (
Id number,
SuggestedEditId number,
UserId number,
VoteTypeId number,
CreationDate time,
TargetUserId number,
TargetRepChange number
)
CREATE TABLE Comments (
Id number,
PostId number,
Score number,
Text text,
CreationDate time,
UserD... | find questions for waffles hat. | SELECT Id AS "post_link", CreationDate, Tags, AnswerCount FROM Posts WHERE DeletionDate IS NULL AND ClosedDate IS NULL AND PostTypeId = 1 AND Score <= -3 ORDER BY LastActivityDate | sede |
CREATE TABLE Rooms (
RoomId TEXT,
roomName TEXT,
beds INTEGER,
bedType TEXT,
maxOccupancy INTEGER,
basePrice INTEGER,
decor TEXT
)
CREATE TABLE Reservations (
Code INTEGER,
Room TEXT,
CheckIn TEXT,
CheckOut TEXT,
Rate REAL,
LastName TEXT,
FirstName TEXT,
Adul... | A pie chart for finding the number of the name of rooms booked by some customers whose first name contains ROY. | SELECT roomName, COUNT(roomName) FROM Reservations AS T1 JOIN Rooms AS T2 ON T1.Room = T2.RoomId WHERE FirstName LIKE '%ROY%' GROUP BY roomName | nvbench |
CREATE TABLE table_name_19 (
score VARCHAR,
away_team VARCHAR
) | What was the score for the away team, southport? | SELECT score FROM table_name_19 WHERE away_team = "southport" | sql_create_context |
CREATE TABLE movie (
mid int,
title text,
release_year int,
title_aka text,
budget text
)
CREATE TABLE company (
id int,
name text,
country_code varchar
)
CREATE TABLE genre (
gid int,
genre text
)
CREATE TABLE made_by (
id int,
msid int,
pid int
)
CREATE TABLE ca... | What are all the movies featuring ' Kerry Washington ' ? | SELECT movie.title FROM actor, cast, movie WHERE actor.name = 'Kerry Washington' AND cast.aid = actor.aid AND movie.mid = cast.msid | imdb |
CREATE TABLE table_40078 (
"Date" text,
"Cover model" text,
"Centerfold model" text,
"Interview subject" text,
"Pictorials" text
) | In the issue in which the Interview subject was Jesse Jackson, who were there Pictorials of? | SELECT "Pictorials" FROM table_40078 WHERE "Interview subject" = 'jesse jackson' | wikisql |
CREATE TABLE table_77911 (
"Round" real,
"Pick" real,
"Name" text,
"Position" text,
"School" text
) | What is the number of the pick for round 11? | SELECT SUM("Pick") FROM table_77911 WHERE "Round" = '11' | 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... | 排出葛晴画患者医疗记录医疗费总额不少于6196.22元的中出院诊断疾病的编码是什么?其名称叫什么? | SELECT qtb.OUT_DIAG_DIS_CD, qtb.OUT_DIAG_DIS_NM FROM qtb WHERE qtb.PERSON_NM = '葛晴画' AND qtb.MED_CLINIC_ID IN (SELECT t_kc24.MED_CLINIC_ID FROM t_kc24 WHERE t_kc24.MED_AMOUT >= 6196.22) UNION SELECT gyb.OUT_DIAG_DIS_CD, gyb.OUT_DIAG_DIS_NM FROM gyb WHERE gyb.PERSON_NM = '葛晴画' AND gyb.MED_CLINIC_ID IN (SELECT t_kc24.MED... | css |
CREATE TABLE table_name_82 (
date VARCHAR,
effect VARCHAR,
place VARCHAR
) | What is Date, when Effect is 'Shot Down', and when Place is 'South of Stanley Airport'? | SELECT date FROM table_name_82 WHERE effect = "shot down" AND place = "south of stanley airport" | sql_create_context |
CREATE TABLE table_dev_44 (
"id" int,
"gender" string,
"arterial_ph" float,
"systolic_blood_pressure_sbp" int,
"serum_bicarbonate" int,
"anion_gap" int,
"diabetic" string,
"diabetic_ketoacidosis" bool,
"blood_glucose" int,
"diastolic_blood_pressure_dbp" int,
"positive_serum_k... | for subjects with type ii diabetes mellitus: in subjects taking metformin, serum creatinine > 1.4 mg / dl in female subjects and > 1.5 mg / dl in male subjects | SELECT * FROM table_dev_44 WHERE diabetic = 'ii' AND metformin = 1 AND ((gender = 'male' AND serum_creatinine > 1.5) OR (gender = 'female' AND serum_creatinine > 1.4)) | criteria2sql |
CREATE TABLE table_28882 (
"District" text,
"Incumbent" text,
"Party" text,
"First elected" text,
"Result" text,
"Candidates" text
) | What party did robert p. letcher represent? | SELECT "Party" FROM table_28882 WHERE "Incumbent" = 'Robert P. Letcher' | wikisql |
CREATE TABLE table_1733457_1 (
others_percentage VARCHAR,
county VARCHAR
) | Name the others % for johnson | SELECT others_percentage FROM table_1733457_1 WHERE county = "Johnson" | sql_create_context |
CREATE TABLE table_20968 (
"Runs" text,
"Wicket" text,
"Batting partners" text,
"Batting team" text,
"Fielding team" text,
"Venue" text,
"Season" text
) | How many total batting partners were most successful in the 2006 season? | SELECT COUNT("Batting partners") FROM table_20968 WHERE "Season" = '2006' | wikisql |
CREATE TABLE table_name_83 (
venue VARCHAR,
tournament VARCHAR
) | Where was the mediterranean games held? | SELECT venue FROM table_name_83 WHERE tournament = "mediterranean games" | sql_create_context |
CREATE TABLE genre (
g_name text,
rating text,
most_popular_in text
)
CREATE TABLE files (
f_id number,
artist_name text,
file_size text,
duration text,
formats text
)
CREATE TABLE artist (
artist_name text,
country text,
gender text,
preferred_genre text
)
CREATE TABL... | What are the different names and countries of origins for all artists whose song ratings are above 9? | SELECT DISTINCT T1.artist_name, T1.country FROM artist AS T1 JOIN song AS T2 ON T1.artist_name = T2.artist_name WHERE T2.rating > 9 | spider |
CREATE TABLE flight_stop (
flight_id int,
stop_number int,
stop_days text,
stop_airport text,
arrival_time int,
arrival_airline text,
arrival_flight_number int,
departure_time int,
departure_airline text,
departure_flight_number int,
stop_time int
)
CREATE TABLE month (
... | do any of the SAN FRANCISCO to BOSTON flights leave on friday | 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, date_day, days, flight WHERE (CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'BOSTON' AND date_day.day_number = 25 AND date_day.month_number = 6 AND da... | atis |
CREATE TABLE table_204_920 (
id number,
"goal" number,
"date" text,
"location" text,
"opponent" text,
"lineup" text,
"min" number,
"assist/pass" text,
"score" text,
"result" text,
"competition" text
) | how many competitions were not friendly ? | SELECT COUNT(*) FROM table_204_920 WHERE "goal" <> 'friendly' | squall |
CREATE TABLE airline (
airline_code varchar,
airline_name text,
note text
)
CREATE TABLE flight_fare (
flight_id int,
fare_id int
)
CREATE TABLE class_of_service (
booking_class varchar,
rank int,
class_description text
)
CREATE TABLE fare (
fare_id int,
from_airport varchar,
... | wednesday morning flights between BALTIMORE and NEWARK | 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, date_day, days, flight WHERE ((CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'NEWARK' AND date_day.day_number = 23 AND date_day.month_number = 4 AND d... | atis |
CREATE TABLE table_23285805_4 (
team VARCHAR,
record VARCHAR
) | If the record is 5-8, what is the team name? | SELECT team FROM table_23285805_4 WHERE record = "5-8" | sql_create_context |
CREATE TABLE table_13050 (
"Team 1" text,
"Agg." text,
"Team 2" text,
"1st leg" text,
"2nd leg" text
) | What team 1 has sloga jugomagnat as team 2? | SELECT "Team 1" FROM table_13050 WHERE "Team 2" = 'sloga jugomagnat' | 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... | 列出就诊结算日期在2005-12-31到2011-07-11内期间,患者吴涵润的所有医疗就诊记录编号是哪些? | SELECT t_kc24.MED_CLINIC_ID FROM t_kc24 WHERE t_kc24.t_kc21_PERSON_NM = '吴涵润' AND t_kc24.CLINIC_SLT_DATE BETWEEN '2005-12-31' AND '2011-07-11' | css |
CREATE TABLE table_name_1 (
females___percentage_ VARCHAR,
males_rank VARCHAR,
females_rank VARCHAR,
state VARCHAR
) | How many Females (%) have Females Rank smaller than 21, and a State of kerala, and Males Rank larger than 1? | SELECT COUNT(females___percentage_) FROM table_name_1 WHERE females_rank < 21 AND state = "kerala" AND males_rank > 1 | sql_create_context |
CREATE TABLE Player (
player_name VARCHAR,
player_api_id VARCHAR
)
CREATE TABLE Player_Attributes (
player_api_id VARCHAR,
dribbling VARCHAR
) | What are the names of players who have the best dribbling? | SELECT DISTINCT T1.player_name FROM Player AS T1 JOIN Player_Attributes AS T2 ON T1.player_api_id = T2.player_api_id WHERE T2.dribbling = (SELECT MAX(overall_rating) FROM Player_Attributes) | sql_create_context |
CREATE TABLE gwyjzb (
CLINIC_ID text,
CLINIC_TYPE text,
COMP_ID text,
DATA_ID text,
DIFF_PLACE_FLG number,
FERTILITY_STS number,
FLX_MED_ORG_ID text,
HOSP_LEV number,
HOSP_STS number,
IDENTITY_CARD text,
INPT_AREA_BED text,
INSURED_IDENTITY number,
INSURED_STS text,
... | 在00年8月14日至12年6月6日之间编号为3907255的医疗机构里的患者对医疗项目自付比例的平均值为多少? | SELECT AVG(t_kc22.SELF_PAY_PRO) FROM gwyjzb JOIN t_kc22 ON gwyjzb.MED_CLINIC_ID = t_kc22.MED_CLINIC_ID WHERE gwyjzb.MED_SER_ORG_NO = '3907255' AND t_kc22.STA_DATE BETWEEN '2000-08-14' AND '2012-06-06' UNION SELECT AVG(t_kc22.SELF_PAY_PRO) FROM fgwyjzb JOIN t_kc22 ON fgwyjzb.MED_CLINIC_ID = t_kc22.MED_CLINIC_ID WHERE fg... | css |
CREATE TABLE table_name_83 (
eliminated VARCHAR,
week__number INTEGER
) | Tell me the eliminated for week # larger than 4 | SELECT eliminated FROM table_name_83 WHERE week__number > 4 | 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 ... | 患者吕建茗所有检验报告单中的标本采集部位在2008年7月2日到2019年5月18日期间内都是那几个部位? | SELECT jybgb.BBCJBW FROM person_info JOIN hz_info JOIN mzjzjlb JOIN jybgb ON person_info.RYBH = hz_info.RYBH AND hz_info.YLJGDM = mzjzjlb.YLJGDM AND hz_info.KH = mzjzjlb.KH AND hz_info.KLX = mzjzjlb.KLX AND mzjzjlb.YLJGDM = jybgb.YLJGDM_MZJZJLB AND mzjzjlb.JZLSH = jybgb.JZLSH_MZJZJLB WHERE person_info.XM = '吕建茗' AND jy... | css |
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... | 从02年6月25日至21年1月22日期间,病患鲁嘉歆被开出的所有检验报告单的检验报告单号都有哪些? | SELECT jybgb.BGDH FROM person_info JOIN hz_info JOIN mzjzjlb JOIN jybgb 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.YLJGDM = jybgb.YLJGDM_MZJZJLB AND mzjzjlb.JZLSH = jybgb.JZLSH_MZJZJLB ... | css |
CREATE TABLE table_79276 (
"Class" text,
"Wheel arrangement" text,
"Fleet number(s)" text,
"Manufacturer" text,
"Year made" text,
"Quantity made" text,
"Quantity preserved" text,
"Year(s) retired" text
) | What is the quantity preserved to the locomotive with a quantity made of 6? | SELECT "Quantity preserved" FROM table_79276 WHERE "Quantity made" = '6' | wikisql |
CREATE TABLE table_2668352_11 (
first_elected INTEGER
) | Name the least first elected | SELECT MIN(first_elected) FROM table_2668352_11 | sql_create_context |
CREATE TABLE table_17641314_3 (
school VARCHAR
) | Name the minimum 11-12 enrollment for washington school | SELECT MIN(11 AS _12_enrollment) FROM table_17641314_3 WHERE school = "Washington" | sql_create_context |
CREATE TABLE table_69338 (
"Year" real,
"Team" text,
"Co-Drivers" text,
"Class" text,
"Laps" real,
"Pos." text,
"Class Pos." text
) | What class had fewer than 336 laps in 2004? | SELECT "Class" FROM table_69338 WHERE "Laps" < '336' AND "Year" = '2004' | wikisql |
CREATE TABLE table_49870 (
"Series Sorted" text,
"Title" text,
"Author" text,
"Featuring" text,
"Released" text
) | who is the author when the title is destination: nerva? | SELECT "Author" FROM table_49870 WHERE "Title" = 'destination: nerva' | wikisql |
CREATE TABLE table_name_45 (
israeli_and_or_foreigner_wounded VARCHAR,
israeli_deaths INTEGER
) | How many Israelis and or foreigners were wounded in the attack with more than 1 Israeli death? | SELECT israeli_and_or_foreigner_wounded FROM table_name_45 WHERE israeli_deaths > 1 | sql_create_context |
CREATE TABLE table_68714 (
"Rank" real,
"Station" text,
"City" text,
"State" text,
"Boardings and deboardings" real
) | At south station what was the total rank when boarding and deboardings were smaller than 1,360,162? | SELECT SUM("Rank") FROM table_68714 WHERE "Station" = 'south station' AND "Boardings and deboardings" < '1,360,162' | wikisql |
CREATE TABLE microlab (
microlabid number,
patientunitstayid number,
culturesite text,
organism text,
culturetakentime time
)
CREATE TABLE allergy (
allergyid number,
patientunitstayid number,
drugname text,
allergyname text,
allergytime time
)
CREATE TABLE treatment (
trea... | in 2104, what were the top five most frequent specimen tests ordered for patients during the same month after the diagnosis of bone fracture(s) - pelvis? | SELECT t3.culturesite FROM (SELECT t2.culturesite, 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 = 'bone fracture(s) - pelvis' AND STRFTIME('%y'... | eicu |
CREATE TABLE t_kc22 (
MED_EXP_DET_ID text,
OVERALL_CD_ORG text,
OVERALL_CD_PERSON text,
MED_CLINIC_ID text,
MED_EXP_BILL_ID text,
SOC_SRT_DIRE_CD text,
SOC_SRT_DIRE_NM text,
DIRE_TYPE number,
CHA_ITEM_LEV number,
MED_INV_ITEM_TYPE text,
MED_DIRE_CD text,
MED_DIRE_NM text,... | 75946441538这个医疗就诊中,把开出的所有名字中有替的药品及其金额列出来 | SELECT SOC_SRT_DIRE_CD, SOC_SRT_DIRE_NM, AMOUNT FROM t_kc22 WHERE MED_CLINIC_ID = '75946441538' AND SOC_SRT_DIRE_NM LIKE '%替%' | css |
CREATE TABLE table_name_50 (
total INTEGER,
nangun VARCHAR,
nanquan VARCHAR,
rank VARCHAR
) | WHAT IS THE TOTAL WITH A NANQUAN OF 9.72, RANK BIGGER THAN 3, NANGUN SMALLER THAN 9.5? | SELECT MIN(total) FROM table_name_50 WHERE nanquan = 9.72 AND rank > 3 AND nangun < 9.5 | sql_create_context |
CREATE TABLE table_61647 (
"Place" text,
"Player" text,
"Country" text,
"Score" text,
"To par" text
) | What was United States place when the player was Fred Couples? | SELECT "Place" FROM table_61647 WHERE "Country" = 'united states' AND "Player" = 'fred couples' | wikisql |
CREATE TABLE table_name_11 (
tournament VARCHAR,
opponent VARCHAR
) | What tournament is lesley joseph the opponent? | SELECT tournament FROM table_name_11 WHERE opponent = "lesley joseph" | sql_create_context |
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 demographic ... | count the number of patients whose primary disease is pneumonia? | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.diagnosis = "PNEUMONIA" | mimicsql_data |
CREATE TABLE prescriptions (
row_id number,
subject_id number,
hadm_id number,
startdate time,
enddate time,
drug text,
dose_val_rx text,
dose_unit_rx text,
route text
)
CREATE TABLE procedures_icd (
row_id number,
subject_id number,
hadm_id number,
icd9_code text,
... | how many patients were diagnosed with lung contusion-closed who did not return to the hospital within the same month since 6 years ago? | SELECT (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 = 'lung contu... | mimic_iii |
CREATE TABLE area (
course_id int,
area varchar
)
CREATE TABLE program (
program_id int,
name varchar,
college varchar,
introduction varchar
)
CREATE TABLE course_prerequisite (
pre_course_id int,
course_id int
)
CREATE TABLE course_offering (
offering_id int,
course_id int,
... | What are the available classes this Spring-Summer ? | SELECT DISTINCT course.department, course.name, course.number FROM course, course_offering, semester WHERE course.course_id = course_offering.course_id AND course.department = 'EECS' AND semester.semester = 'Spring-Summer' AND semester.semester_id = course_offering.semester AND semester.year = 2016 | advising |
CREATE TABLE table_16939 (
"Date" text,
"Tournament" text,
"Location" text,
"Purse( $ )" real,
"Winner" text,
"Score" text,
"1st Prize( $ )" real
) | What was the score for the Toshiba Senior Classic? | SELECT "Score" FROM table_16939 WHERE "Tournament" = 'Toshiba Senior Classic' | wikisql |
CREATE TABLE table_name_73 (
belarusian__bgn_pcgn_ VARCHAR,
population__2010_ VARCHAR,
status VARCHAR,
foundation VARCHAR
) | What Belarusian has a status of Raion a foundation of 1514 and a 2010 population of 8100? | SELECT belarusian__bgn_pcgn_ FROM table_name_73 WHERE status = "raion" AND foundation = "1514" AND population__2010_ = "8100" | sql_create_context |
CREATE TABLE t_kc24 (
ACCOUNT_DASH_DATE time,
ACCOUNT_DASH_FLG number,
CASH_PAY number,
CIVIL_SUBSIDY number,
CKC102 number,
CLINIC_ID text,
CLINIC_SLT_DATE time,
COMP_ID text,
COM_ACC_PAY number,
COM_PAY number,
DATA_ID text,
ENT_ACC_PAY number,
ENT_PAY number,
F... | 在01年8月16日到06年10月1日之间给患者68819999开出盐酸美金刚口服溶液这个药品的总次数是多少次? | SELECT COUNT(*) FROM t_kc22 WHERE t_kc22.t_kc21_PERSON_ID = '68819999' AND t_kc22.STA_DATE BETWEEN '2001-08-16' AND '2006-10-01' AND t_kc22.SOC_SRT_DIRE_NM = '盐酸美金刚口服溶液' | css |
CREATE TABLE city (
city_code varchar,
city_name varchar,
state_code varchar,
country_name varchar,
time_zone_code varchar
)
CREATE TABLE time_interval (
period text,
begin_time int,
end_time int
)
CREATE TABLE time_zone (
time_zone_code text,
time_zone_name text,
hours_fro... | list the nonstop flights from MIAMI to WASHINGTON | 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 = 'MIAMI' AND CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'WASHING... | atis |
CREATE TABLE table_204_734 (
id number,
"first name" text,
"surname" text,
"death year" number,
"beginning of\nservice" text,
"end of\nservice" text,
"notes" text
) | how long was pilzbach 's period of service ? | SELECT "end of\nservice" - "beginning of\nservice" FROM table_204_734 WHERE "first name" = 'pilzbach' | squall |
CREATE TABLE table_75485 (
"Game" real,
"October" real,
"Opponent" text,
"Score" text,
"Record" text
) | Name the least game for record of 1-0-2 | SELECT MIN("Game") FROM table_75485 WHERE "Record" = '1-0-2' | wikisql |
CREATE TABLE table_204_535 (
id number,
"pos" text,
"rider" text,
"manufacturer" text,
"laps" number,
"time/retired" text,
"grid" number,
"points" number
) | of those in the top 15 positions , who earned the least number of points ? | SELECT "rider" FROM table_204_535 WHERE "pos" <= 15 ORDER BY "points" LIMIT 1 | squall |
CREATE TABLE table_21976 (
"Episode" text,
"Broadcast date" text,
"Run time" text,
"Viewers (in millions)" text,
"Archive" text
) | How many million viewers watched the episode that runs 25:55 minutes? | SELECT "Viewers (in millions)" FROM table_21976 WHERE "Run time" = '25:55' | wikisql |
CREATE TABLE course_offering (
offering_id int,
course_id int,
semester int,
section_number int,
start_time time,
end_time time,
monday varchar,
tuesday varchar,
wednesday varchar,
thursday varchar,
friday varchar,
saturday varchar,
sunday varchar,
has_final_proje... | For next semester , who is teaching PHARMACY 620 ? | SELECT DISTINCT instructor.name FROM instructor INNER JOIN offering_instructor ON offering_instructor.instructor_id = instructor.instructor_id INNER JOIN course_offering ON offering_instructor.offering_id = course_offering.offering_id INNER JOIN course ON course.course_id = course_offering.course_id INNER JOIN semester... | advising |
CREATE TABLE table_21735 (
"Class" text,
"Part 1" text,
"Part 2" text,
"Part 3" text,
"Part 4" text,
"Verb meaning" text
) | Name the class for schliefen | SELECT "Class" FROM table_21735 WHERE "Part 3" = 'schliefen' | wikisql |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.