context stringlengths 11 9.12k | question stringlengths 0 1.06k | SQL stringlengths 2 4.44k | source stringclasses 28
values |
|---|---|---|---|
CREATE TABLE table_name_58 (
points_against VARCHAR,
club VARCHAR
) | What is the Points against for the ystradgynlais rfc club? | SELECT points_against FROM table_name_58 WHERE club = "ystradgynlais rfc" | sql_create_context |
CREATE TABLE people (
People_ID int,
Sex text,
Name text,
Date_of_Birth text,
Height real,
Weight real
)
CREATE TABLE candidate (
Candidate_ID int,
People_ID int,
Poll_Source text,
Date text,
Support_rate real,
Consider_rate real,
Oppose_rate real,
Unsure_rate re... | Give me the comparison about the sum of Weight over the Sex , and group by attribute Sex, and could you show Sex in desc order? | SELECT Sex, SUM(Weight) FROM people GROUP BY Sex ORDER BY Sex DESC | nvbench |
CREATE TABLE table_name_55 (
round VARCHAR,
name VARCHAR
) | Which Round has a Name of john goodyear? | SELECT round FROM table_name_55 WHERE name = "john goodyear" | sql_create_context |
CREATE TABLE table_name_22 (
birth VARCHAR,
ceased_to_be_duke_of_girona VARCHAR
) | WHAT IS THE BIRTH DATE THAT HAS Ceased to be Duke of Girona OF 21 NOVEMBER 1582? | SELECT birth FROM table_name_22 WHERE ceased_to_be_duke_of_girona = "21 november 1582" | sql_create_context |
CREATE TABLE table_name_37 (
italian VARCHAR,
french VARCHAR
) | what is the italian word for the french word 'mer | SELECT italian FROM table_name_37 WHERE french = "mer" | sql_create_context |
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... | 自二零一零年四月五日开始,截止到二零一三年四月九日,患者孔岚翠的病历里有多少种疾病 | SELECT COUNT(DISTINCT IN_DIAG_DIS_CD) FROM t_kc21 WHERE PERSON_NM = '孔岚翠' AND IN_HOSP_DATE BETWEEN '2010-04-05' AND '2013-04-09' | css |
CREATE TABLE EMPLOYEE (
EMP_NUM int,
EMP_LNAME varchar(15),
EMP_FNAME varchar(12),
EMP_INITIAL varchar(1),
EMP_JOBCODE varchar(5),
EMP_HIREDATE datetime,
EMP_DOB datetime
)
CREATE TABLE PROFESSOR (
EMP_NUM int,
DEPT_CODE varchar(10),
PROF_OFFICE varchar(50),
PROF_EXTENSION v... | Find the number of professors with a PhD degree in each department Show bar chart, I want to display by the Y from low to high. | SELECT DEPT_CODE, COUNT(*) FROM PROFESSOR WHERE PROF_HIGH_DEGREE = 'Ph.D.' GROUP BY DEPT_CODE ORDER BY COUNT(*) | nvbench |
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 admission time and lab test name of subject id 22377? | SELECT demographic.admittime, lab.label FROM demographic INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.subject_id = "22377" | mimicsql_data |
CREATE TABLE table_11951237_3 (
season__number INTEGER,
production_code VARCHAR
) | What is the season # where production code is k1505? | SELECT MIN(season__number) FROM table_11951237_3 WHERE production_code = "K1505" | sql_create_context |
CREATE TABLE table_name_13 (
nationality VARCHAR,
ranking VARCHAR,
name VARCHAR
) | What nationality has a ranking less than 7 with tony stenson as the name? | SELECT nationality FROM table_name_13 WHERE ranking < 7 AND name = "tony stenson" | 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 demographic (
subject_id text,
hadm_id text,
name text,
marital_status text,
age text,
dob text,
gender text,
... | what is discharge time and procedure icd9 code of subject id 65759? | SELECT demographic.dischtime, procedures.icd9_code FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.subject_id = "65759" | mimicsql_data |
CREATE TABLE prescriptions (
subject_id text,
hadm_id text,
icustay_id text,
drug_type text,
drug text,
formulary_drug_cd text,
route text,
drug_dose text
)
CREATE TABLE procedures (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
... | give me the number of patients whose days of hospital stay is greater than 1 and procedure short title is hemodialysis? | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.days_stay > "1" AND procedures.short_title = "Hemodialysis" | mimicsql_data |
CREATE TABLE table_55647 (
"Player" text,
"Pos." text,
"From" real,
"School/Country" text,
"Rebs" real,
"Asts" real
) | What is the earliest year a SG has over 650 assists? | SELECT MIN("From") FROM table_55647 WHERE "Pos." = 'sg' AND "Asts" > '650' | wikisql |
CREATE TABLE prescriptions (
subject_id text,
hadm_id text,
icustay_id text,
drug_type text,
drug text,
formulary_drug_cd text,
route text,
drug_dose text
)
CREATE TABLE lab (
subject_id text,
hadm_id text,
itemid text,
charttime text,
flag text,
value_unit text,... | Which patients have hispanic or latino-puerto rican ethnic background? | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.ethnicity = "HISPANIC/LATINO - PUERTO RICAN" | mimicsql_data |
CREATE TABLE table_298883_5 (
reverse VARCHAR,
value VARCHAR
) | What is on the reverse side of the 100 coin? | SELECT reverse FROM table_298883_5 WHERE value = "₩100" | sql_create_context |
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... | 医疗记录中医院0869256的出院诊断,统计其急性支气管炎的最低和最高医疗费总数目都是多少? | SELECT MIN(MED_AMOUT), MAX(MED_AMOUT) FROM t_kc24 WHERE MED_CLINIC_ID IN (SELECT MED_CLINIC_ID FROM t_kc21 WHERE MED_SER_ORG_NO = '0869256' AND OUT_DIAG_DIS_NM = '急性支气管炎') | css |
CREATE TABLE table_23887174_1 (
number_of_cantons__gavars_ VARCHAR,
armenian_name VARCHAR
) | How many different numbers of cantons does the province with the Armenian name have? | SELECT COUNT(number_of_cantons__gavars_) FROM table_23887174_1 WHERE armenian_name = "Վասպուրական" | sql_create_context |
CREATE TABLE table_name_67 (
name VARCHAR,
rank VARCHAR
) | What is the Name of the Players with a Rank of 18? | SELECT name FROM table_name_67 WHERE rank = 18 | sql_create_context |
CREATE TABLE table_name_77 (
year VARCHAR,
opponent VARCHAR,
player VARCHAR
) | What year for geelong player john roberts? | SELECT year FROM table_name_77 WHERE opponent = "geelong" AND player = "john roberts" | sql_create_context |
CREATE TABLE table_46537 (
"Name" text,
"Country" text,
"Loan Club" text,
"Started" text,
"Ended" text,
"Start Source" text
) | What is the start source of the irl country, which ended on 13 April? | SELECT "Start Source" FROM table_46537 WHERE "Country" = 'irl' AND "Ended" = '13 april' | wikisql |
CREATE TABLE table_name_68 (
country VARCHAR,
time VARCHAR
) | What is Country, when Time is 1:29.43.60? | SELECT country FROM table_name_68 WHERE time = "1:29.43.60" | sql_create_context |
CREATE TABLE table_name_38 (
distance VARCHAR,
stages VARCHAR,
year VARCHAR
) | How long was the 16 staged event in 1997? | SELECT distance FROM table_name_38 WHERE stages = "16" AND year = "1997" | sql_create_context |
CREATE TABLE table_name_80 (
wu_xing___五行__ VARCHAR,
korean___rr__ VARCHAR
) | What is Wu Xing ( ) with Korean (RR) of (im)? | SELECT wu_xing___五行__ FROM table_name_80 WHERE korean___rr__ = "임 (im)" | sql_create_context |
CREATE TABLE PostTypes (
Id number,
Name text
)
CREATE TABLE PostHistoryTypes (
Id number,
Name text
)
CREATE TABLE CloseAsOffTopicReasonTypes (
Id number,
IsUniversal boolean,
InputTitle text,
MarkdownInputGuidance text,
MarkdownPostOwnerGuidance text,
MarkdownPrivilegedUserGu... | max number of dupes on a question. | SELECT pl.PostId AS "post_link", COUNT(*) FROM PostLinks AS pl INNER JOIN Posts AS p ON p.Id = pl.PostId WHERE LinkTypeId = 3 GROUP BY PostId HAVING COUNT(*) > 2 ORDER BY 2 DESC | sede |
CREATE TABLE PostHistory (
Id number,
PostHistoryTypeId number,
PostId number,
RevisionGUID other,
CreationDate time,
UserId number,
UserDisplayName text,
Comment text,
Text text,
ContentLicense text
)
CREATE TABLE Votes (
Id number,
PostId number,
VoteTypeId number,... | Users' search by Name and AboutME. | SELECT DISTINCT u.Id AS "user_link", CONCAT('https://stackoverflow.com/users/', u.Id) AS "profile_link", u.DisplayName, u.Location, u.WebsiteUrl, u.AboutMe, u.Views, u.Reputation, u.UpVotes, u.DownVotes, u.EmailHash FROM Users AS u WHERE UPPER(u.AboutMe) LIKE UPPER('%##AboutMe##%') AND UPPER(DisplayName) LIKE UPPER('%#... | sede |
CREATE TABLE table_62584 (
"Player" text,
"Country" text,
"Year(s) won" text,
"Total" real,
"To par" real
) | Which player is from south africa? | SELECT "Player" FROM table_62584 WHERE "Country" = 'south africa' | wikisql |
CREATE TABLE table_44728 (
"Internet Plan" text,
"Downstream" text,
"Upstream" text,
"Bandwidth Included" text,
"Price" text
) | What is the upstream with the price 65 chf? | SELECT "Upstream" FROM table_44728 WHERE "Price" = '65 chf' | wikisql |
CREATE TABLE table_71578 (
"Elector" text,
"Order" text,
"Title" text,
"Elevated" text,
"Elevator" text
) | What's the Order with an Elector of Marino Bulcani? | SELECT "Order" FROM table_71578 WHERE "Elector" = 'marino bulcani' | wikisql |
CREATE TABLE table_name_61 (
finish VARCHAR,
to_par VARCHAR,
year_s__won VARCHAR
) | Which Finish has a To par of 1, and a Year(s) won of 1955? | SELECT finish FROM table_name_61 WHERE to_par = "–1" AND year_s__won = "1955" | sql_create_context |
CREATE TABLE table_name_32 (
nationality VARCHAR,
year VARCHAR,
position VARCHAR
) | What nationality has a year larger than 2009 with a position of power forward? | SELECT nationality FROM table_name_32 WHERE year > 2009 AND position = "power forward" | sql_create_context |
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,... | 医院3995688在00年7月1日到11年6月19日期间的医疗就诊记录里有哪些不是科室4512所负责的? | (SELECT * FROM t_kc21 WHERE MED_SER_ORG_NO = '3995688' AND IN_HOSP_DATE BETWEEN '2000-07-01' AND '2011-06-19') EXCEPT (SELECT * FROM t_kc21 WHERE MED_SER_ORG_NO = '3995688' AND IN_HOSP_DATE BETWEEN '2000-07-01' AND '2011-06-19' AND MED_ORG_DEPT_CD = '4512') | css |
CREATE TABLE table_8150 (
"Game" real,
"Date" text,
"Team" text,
"Score" text,
"High points" text,
"High rebounds" text,
"High assists" text,
"Location Attendance" text,
"Record" text
) | Where was the location attendance when Minnesota played? | SELECT "Location Attendance" FROM table_8150 WHERE "Team" = 'minnesota' | wikisql |
CREATE TABLE customer (
customerid number,
firstname text,
lastname text,
company text,
address text,
city text,
state text,
country text,
postalcode text,
phone text,
fax text,
email text,
supportrepid number
)
CREATE TABLE employee (
employeeid number,
last... | Find the names of all the tracks that contain the word 'you'. | SELECT name FROM track WHERE name LIKE '%you%' | spider |
CREATE TABLE zyjzjlb (
CYBQDM text,
CYBQMC text,
CYCWH text,
CYKSDM text,
CYKSMC text,
CYSJ time,
CYZTDM number,
HZXM text,
JZKSDM text,
JZKSMC text,
JZLSH text,
KH text,
KLX number,
MZBMLX number,
MZJZLSH text,
MZZDBM text,
MZZDMC text,
MZZYZDZZBM... | 被门诊诊断为R76.930这个病的蒋宏深,看看他的检测指标089733的结果定量及其单位 | SELECT jyjgzbb.JCZBJGDL, jyjgzbb.JCZBJGDW FROM person_info JOIN hz_info JOIN txmzjzjlb JOIN jybgb JOIN jyjgzbb ON person_info.RYBH = hz_info.RYBH AND hz_info.YLJGDM = txmzjzjlb.YLJGDM AND hz_info.KH = txmzjzjlb.KH AND hz_info.KLX = txmzjzjlb.KLX AND txmzjzjlb.YLJGDM = jybgb.YLJGDM_MZJZJLB AND txmzjzjlb.JZLSH = jybgb.JZ... | css |
CREATE TABLE table_2031 (
"Year" real,
"Division" real,
"League" text,
"Regular Season" text,
"Playoffs" text,
"Open Cup" text
) | In what season did the team get in the conference finals of the playoffs? | SELECT "Regular Season" FROM table_2031 WHERE "Playoffs" = 'Conference Finals' | wikisql |
CREATE TABLE table_33397 (
"Home team" text,
"Home team score" text,
"Away team" text,
"Away team score" text,
"Venue" text,
"Crowd" real,
"Date" text
) | What was the crowd size when the away team scored 7.19 (61)? | SELECT COUNT("Crowd") FROM table_33397 WHERE "Away team score" = '7.19 (61)' | wikisql |
CREATE TABLE procedures (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE demographic (
subject_id text,
hadm_id text,
name text,
marital_status text,
age text,
dob text,
gender text,
language text,
religion text,
... | what is the marital status and days of hospital stay of subject id 6983? | SELECT demographic.marital_status, demographic.days_stay FROM demographic WHERE demographic.subject_id = "6983" | mimicsql_data |
CREATE TABLE table_44017 (
"Team" text,
"Driver" text,
"Class" text,
"Chassis" text,
"Rounds" text
) | Which driver was in 8 rounds with a chassis of dallara f306? | SELECT "Driver" FROM table_44017 WHERE "Chassis" = 'dallara f306' AND "Rounds" = '8' | wikisql |
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 (
... | get the number of urgent hospital admission patients who have prescription for calcium carbonate. | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE demographic.admission_type = "URGENT" AND prescriptions.drug = "Calcium Carbonate" | mimicsql_data |
CREATE TABLE table_name_8 (
points INTEGER,
place INTEGER
) | Which places have points larger than 10? | SELECT MIN(points) FROM table_name_8 WHERE place > 10 | sql_create_context |
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 jybgb (
BBCJBW text,
BBDM tex... | 患者俞嘉平大腿的各项指标检验结果的详细情况怎么样 | SELECT * FROM person_info JOIN hz_info JOIN mzjzjlb JOIN jybgb JOIN jyjgzbb JOIN mzjzjlb_jybgb ON person_info.RYBH = hz_info.RYBH AND hz_info.YLJGDM = mzjzjlb.YLJGDM AND hz_info.KH = mzjzjlb.KH AND hz_info.KLX = mzjzjlb.KLX AND mzjzjlb.YLJGDM = mzjzjlb_jybgb.YLJGDM_MZJZJLB AND mzjzjlb.JZLSH = jybgb.JZLSH_MZJZJLB AND jy... | css |
CREATE TABLE table_5865 (
"Pick #" text,
"Player" text,
"Position" text,
"Nationality" text,
"NHL team" text,
"College/junior/club team" text
) | What is the Position for the brandon wheat kings (wchl)? | SELECT "Position" FROM table_5865 WHERE "College/junior/club team" = 'brandon wheat kings (wchl)' | wikisql |
CREATE TABLE people (
People_ID int,
Sex text,
Name text,
Date_of_Birth text,
Height real,
Weight real
)
CREATE TABLE candidate (
Candidate_ID int,
People_ID int,
Poll_Source text,
Date text,
Support_rate real,
Consider_rate real,
Oppose_rate real,
Unsure_rate re... | Return a bar chart about the distribution of Date_of_Birth and Height , display in desc by the names please. | SELECT Date_of_Birth, Height FROM people ORDER BY Date_of_Birth DESC | nvbench |
CREATE TABLE table_2971 (
"April 2013 Cum. Rank" real,
"Name" text,
"Rank (all) 2012" real,
"Rank (all) 2013" real,
"2013 Rank (oil companies)" text,
"2013 rev (bil. USD )" text,
"2013 Profit (mil. USD )" real,
"Assets (bil. USD )" text,
"Market cap March 15 (mil. USD )" real
) | What was the Forbers rank (all companies) in 2012 for cenovus energy? | SELECT "Rank (all) 2012" FROM table_2971 WHERE "Name" = 'Cenovus Energy' | wikisql |
CREATE TABLE procedures (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE demographic (
subject_id text,
hadm_id text,
name text,
marital_status text,
age text,
dob text,
gender text,
language text,
religion text,
... | what is minimum age of patients whose marital status is single and primary disease is hypertension;rule out coronary artery disease\cardiac cath? | SELECT MIN(demographic.age) FROM demographic WHERE demographic.marital_status = "SINGLE" AND demographic.diagnosis = "HYPERTENSION;RULE OUT CORONARY ARTERY DISEASE\CARDIAC CATH" | mimicsql_data |
CREATE TABLE student (
student_id int,
lastname varchar,
firstname varchar,
program_id int,
declare_major varchar,
total_credit int,
total_gpa float,
entered_as varchar,
admit_term int,
predicted_graduation_semester int,
degree varchar,
minor varchar,
internship varch... | Can ORALPATH 696 be used for ULCS ? | SELECT COUNT(*) > 0 FROM course INNER JOIN program_course ON program_course.course_id = course.course_id WHERE course.department = 'ORALPATH' AND course.number = 696 AND program_course.category LIKE '%ULCS%' | advising |
CREATE TABLE table_13183076_3 (
us_viewers__million_ VARCHAR,
production_code VARCHAR
) | How many U.S. viewers (million) are there for the episode whose Production code is 3T7051? | SELECT us_viewers__million_ FROM table_13183076_3 WHERE production_code = "3T7051" | sql_create_context |
CREATE TABLE table_71894 (
"Episode" text,
"First aired" text,
"Entrepreneur(s)" text,
"Company or product name" text,
"Money requested (\u00a3)" text,
"Investing Dragon(s)" text
) | Which Investing Dragon(s) belong to Episode 9 with the Entrepreneur Ashley Sayed? | SELECT "Investing Dragon(s)" FROM table_71894 WHERE "Episode" = 'episode 9' AND "Entrepreneur(s)" = 'ashley sayed' | wikisql |
CREATE TABLE voting_record (
stuid number,
registration_date text,
election_cycle text,
president_vote number,
vice_president_vote number,
secretary_vote number,
treasurer_vote number,
class_president_vote number,
class_senator_vote number
)
CREATE TABLE student (
stuid number,
... | Which advisors are advising more than 2 students? | SELECT advisor FROM student GROUP BY advisor HAVING COUNT(*) > 2 | spider |
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... | 在医院6149241中,根据入院诊断疾病名称把不同疾病患者的平均年龄列一下 | SELECT qtb.IN_DIAG_DIS_NM, AVG(qtb.PERSON_AGE) FROM qtb WHERE qtb.MED_SER_ORG_NO = '6149241' GROUP BY qtb.IN_DIAG_DIS_NM UNION SELECT gyb.IN_DIAG_DIS_NM, AVG(gyb.PERSON_AGE) FROM gyb WHERE gyb.MED_SER_ORG_NO = '6149241' GROUP BY gyb.IN_DIAG_DIS_NM UNION SELECT zyb.IN_DIAG_DIS_NM, AVG(zyb.PERSON_AGE) FROM zyb WHERE zyb.... | css |
CREATE TABLE table_name_15 (
to_par VARCHAR,
player VARCHAR
) | What was willie wood's to par? | SELECT to_par FROM table_name_15 WHERE player = "willie wood" | sql_create_context |
CREATE TABLE vitalperiodic (
vitalperiodicid number,
patientunitstayid number,
temperature number,
sao2 number,
heartrate number,
respiration number,
systemicsystolic number,
systemicdiastolic number,
systemicmean number,
observationtime time
)
CREATE TABLE patient (
uniquep... | tell me the top five most common diagnoses of patients with an age of 20s until 2104? | SELECT t1.diagnosisname FROM (SELECT diagnosis.diagnosisname, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM diagnosis WHERE diagnosis.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.age BETWEEN 20 AND 29) AND STRFTIME('%y', diagnosis.diagnosistime) <= '2104' GROUP BY diagnosis.... | eicu |
CREATE TABLE table_14845 (
"Minister" text,
"Party" text,
"Start date" text,
"End date" text,
"Prime Minister" text
) | Name the end date for robert goebbels | SELECT "End date" FROM table_14845 WHERE "Minister" = 'robert goebbels' | wikisql |
CREATE TABLE hz_info (
KH text,
KLX number,
YLJGDM text,
RYBH text
)
CREATE TABLE jybgb (
YLJGDM text,
YLJGDM_MZJZJLB text,
YLJGDM_ZYJZJLB text,
BGDH text,
BGRQ time,
JYLX number,
JZLSH text,
JZLSH_MZJZJLB text,
JZLSH_ZYJZJLB text,
JZLX number,
KSBM text,
... | 号码是23715494511的检验报告单中的标本采集了什么部位? | SELECT BBCJBW FROM jybgb WHERE BGDH = '23715494511' | css |
CREATE TABLE Reviewer (
rID int,
name text
)
CREATE TABLE Rating (
rID int,
mID int,
stars int,
ratingDate date
)
CREATE TABLE Movie (
mID int,
title text,
year int,
director text
) | Give me a scatter chart to show the star rating of the movie and reviewer id, group the title. | SELECT rID, stars FROM Rating AS T1 JOIN Movie AS T2 ON T1.mID = T2.mID GROUP BY title | nvbench |
CREATE TABLE table_1806 (
"No. in series" real,
"No. in season" real,
"Title" text,
"Directed by" text,
"Written by" text,
"Original air date" text,
"Prod. code" text,
"Viewers (millions)" text
) | What's the production code of the episode titled 'He ain't a hottie, he's my brother'? | SELECT "Prod. code" FROM table_1806 WHERE "Title" = 'He Ain''t a Hottie, He''s My Brother' | wikisql |
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
) | Give me a bar chart for how many name of each name, and order by the names in ascending. | SELECT Name, COUNT(Name) FROM Products GROUP BY Name ORDER BY Name | nvbench |
CREATE TABLE table_name_60 (
home_team VARCHAR,
away_team VARCHAR
) | What is the home team score that played away team carlton? | SELECT home_team AS score FROM table_name_60 WHERE away_team = "carlton" | sql_create_context |
CREATE TABLE table_204_951 (
id number,
"candidate" text,
"votes" number,
"percentage" text,
"counties" number,
"delegates" number
) | who received more votes , duncan hunter or alan keyes ? | SELECT "candidate" FROM table_204_951 WHERE "candidate" IN ('duncan hunter', 'alan keyes') ORDER BY "votes" DESC LIMIT 1 | squall |
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... | Count the number of patients on a sulfameth/trimethoprim ds prescription who were hospitalized for more than 17 days. | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE demographic.days_stay > "17" AND prescriptions.drug = "Sulfameth/Trimethoprim DS" | mimicsql_data |
CREATE TABLE table_5067 (
"Game" real,
"Date" text,
"Team" text,
"Score" text,
"High points" text,
"High rebounds" text,
"High assists" text,
"Location Attendance" text,
"Record" text
) | What is the sum of Game on february 28? | SELECT SUM("Game") FROM table_5067 WHERE "Date" = 'february 28' | wikisql |
CREATE TABLE table_name_7 (
type_of_game VARCHAR,
results¹ VARCHAR
) | What type of game had a result of 1:2? | SELECT type_of_game FROM table_name_7 WHERE results¹ = "1:2" | sql_create_context |
CREATE TABLE TagSynonyms (
Id number,
SourceTagName text,
TargetTagName text,
CreationDate time,
OwnerUserId number,
AutoRenameCount number,
LastAutoRename time,
Score number,
ApprovedByUserId number,
ApprovalDate time
)
CREATE TABLE VoteTypes (
Id number,
Name text
)
C... | Top 50 users from UAE. | SELECT ROW_NUMBER() OVER (ORDER BY Reputation DESC) AS "#", Id AS "user_link", Reputation FROM Users WHERE LOWER(Location) LIKE '%united arab emirates%' ORDER BY Reputation DESC LIMIT 150 | sede |
CREATE TABLE vitalperiodic (
vitalperiodicid number,
patientunitstayid number,
temperature number,
sao2 number,
heartrate number,
respiration number,
systemicsystolic number,
systemicdiastolic number,
systemicmean number,
observationtime time
)
CREATE TABLE allergy (
allergy... | tell me the name of the drug to which patient 007-849 was allergic in this hospital encounter? | SELECT allergy.drugname FROM allergy WHERE allergy.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '007-849' AND patient.hospitaldischargetime IS NULL)) | eicu |
CREATE TABLE table_44277 (
"Place" text,
"Player" text,
"Country" text,
"Score" text,
"To par" text,
"Money ( $ )" real
) | What place is South Africa? | SELECT "Place" FROM table_44277 WHERE "Country" = 'south africa' | wikisql |
CREATE TABLE jyjgzbb (
BGDH text,
BGRQ time,
CKZFWDX text,
CKZFWSX number,
CKZFWXX number,
JCFF text,
JCRGH text,
JCRXM text,
JCXMMC text,
JCZBDM text,
JCZBJGDL number,
JCZBJGDW text,
JCZBJGDX text,
JCZBMC text,
JLDW text,
JYRQ time,
JYZBLSH text,
... | 在医院5414853的住院记录里面,列出74171548这位患者住院的时候入院的科室名里不带眼眶字样的住院记录 | SELECT * FROM hz_info JOIN zyjzjlb JOIN hz_info_zyjzjlb ON 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 hz_info_zyjzjlb.JZLSH = zyjzjlb.JZLSH AND hz_info_zyjzjlb.zyjzjlb... | css |
CREATE TABLE table_name_31 (
date VARCHAR,
result VARCHAR
) | What Date has a Result of l 21 34? | SELECT date FROM table_name_31 WHERE result = "l 21–34" | sql_create_context |
CREATE TABLE table_7372 (
"Position" real,
"Team" text,
"Points" real,
"Played" real,
"Drawn" real,
"Lost" real,
"Against" real,
"Difference" text
) | What is the largest lost stat when the difference is - 19? | SELECT MAX("Lost") FROM table_7372 WHERE "Difference" = '- 19' | wikisql |
CREATE TABLE table_name_9 (
constructor VARCHAR,
grid VARCHAR
) | Tell me the constructor for grid of 17 | SELECT constructor FROM table_name_9 WHERE grid = 17 | sql_create_context |
CREATE TABLE table_name_92 (
crowd INTEGER,
home_team VARCHAR
) | How big was the crowd of the Home team of Collingwood? | SELECT MAX(crowd) FROM table_name_92 WHERE home_team = "collingwood" | sql_create_context |
CREATE TABLE table_name_52 (
leading_scorer VARCHAR,
date VARCHAR
) | Who is the leading scorer of the game on 13 February 2008? | SELECT leading_scorer FROM table_name_52 WHERE date = "13 february 2008" | 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 morbid obesity/sda and year of death is less than or equal to 2183? | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.diagnosis = "MORBID OBESITY/SDA" AND demographic.dod_year <= "2183.0" | mimicsql_data |
CREATE TABLE table_68142 (
"Year" text,
"Start" text,
"Qual" text,
"Rank" text,
"Finish" text,
"Laps" real
) | What is the highest laps of the year when the rank was 14? | SELECT MAX("Laps") FROM table_68142 WHERE "Rank" = '14' | wikisql |
CREATE TABLE table_53907 (
"Record" text,
"Year" text,
"Date" text,
"Driver" text,
"Car Make" text,
"Time" text,
"Average Speed (mph)" text
) | What day had a time of 29.816? | SELECT "Date" FROM table_53907 WHERE "Time" = '29.816' | wikisql |
CREATE TABLE table_name_98 (
series_ep VARCHAR,
segment_b VARCHAR
) | What series episode has deli meats under segment B? | SELECT series_ep FROM table_name_98 WHERE segment_b = "deli meats" | sql_create_context |
CREATE TABLE table_15773 (
"Year" text,
"Men's singles" text,
"Women's singles" text,
"Men's doubles" text,
"Women's doubles" text,
"Mixed doubles" text
) | What year was there no competition in Mixed Doubles? | SELECT "Year" FROM table_15773 WHERE "Mixed doubles" = 'no competition' | wikisql |
CREATE TABLE table_33381 (
"Home team" text,
"Home team score" text,
"Away team" text,
"Away team score" text,
"Venue" text,
"Crowd" real,
"Date" text
) | For the game where the away team was North Melbourne, what was the venue? | SELECT "Venue" FROM table_33381 WHERE "Away team" = 'north melbourne' | wikisql |
CREATE TABLE table_name_43 (
home_team VARCHAR,
venue VARCHAR
) | What was the home team score at Kardinia Park? | SELECT home_team AS score FROM table_name_43 WHERE venue = "kardinia park" | sql_create_context |
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 is the most effortless class I can take to satisfy the MDE ? | SELECT DISTINCT course.department, course.name, course.number, program_course.workload, program_course.workload FROM course, program_course WHERE program_course.category LIKE '%MDE%' AND program_course.course_id = course.course_id AND program_course.workload = (SELECT MIN(PROGRAM_COURSEalias1.workload) FROM program_cou... | advising |
CREATE TABLE table_12962773_12 (
year_born INTEGER,
height VARCHAR
) | What year was the player with the height 2.04 born? | SELECT MIN(year_born) FROM table_12962773_12 WHERE height = "2.04" | sql_create_context |
CREATE TABLE table_name_96 (
pick VARCHAR,
hometown_school VARCHAR
) | What number pick was the player with the hometown school of concordia college? | SELECT pick FROM table_name_96 WHERE hometown_school = "concordia college" | sql_create_context |
CREATE TABLE table_name_34 (
rank INTEGER,
total VARCHAR,
silver VARCHAR,
bronze VARCHAR
) | Which rank has a more than 0 silver, 4 bronze, and a total smaller than 10? | SELECT SUM(rank) FROM table_name_34 WHERE silver > 0 AND bronze = 4 AND total < 10 | sql_create_context |
CREATE TABLE table_75667 (
"Call sign" text,
"Frequency MHz" text,
"City of license" text,
"ERP W" text,
"FCC info" text
) | Which FCC info has an ERP W of 100 watts? | SELECT "FCC info" FROM table_75667 WHERE "ERP W" = '100 watts' | wikisql |
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... | 能知道在2015-12-15到2020-02-16内,患者苗曼青在看病时是哪些工号及姓名的医生给检测茶碱的吗 | SELECT jyjgzbb.JCRGH, jyjgzbb.JCRXM FROM person_info JOIN hz_info JOIN mzjzjlb JOIN jybgb JOIN jyjgzbb 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 mzjzj... | css |
CREATE TABLE table_name_39 (
position VARCHAR,
college VARCHAR
) | What position does the saint louis player play? | SELECT position FROM table_name_39 WHERE college = "saint louis" | sql_create_context |
CREATE TABLE table_27496841_3 (
total_points VARCHAR,
place VARCHAR
) | Name the total points for 2 | SELECT total_points FROM table_27496841_3 WHERE place = 2 | sql_create_context |
CREATE TABLE table_35155 (
"Medal" text,
"Name" text,
"Games" text,
"Sport" text,
"Event" text
) | What medal was awarded in the men's freestyle 52 kg? | SELECT "Medal" FROM table_35155 WHERE "Event" = 'men''s freestyle 52 kg' | wikisql |
CREATE TABLE table_10951 (
"Home team" text,
"Home team score" text,
"Away team" text,
"Away team score" text,
"Venue" text,
"Crowd" real,
"Date" text
) | When the away team was geelong, what was the away team score? | SELECT "Away team score" FROM table_10951 WHERE "Away team" = 'geelong' | wikisql |
CREATE TABLE table_26589 (
"#" real,
"Player" text,
"Country" text,
"Points" real,
"Reset points" real,
"Events" real
) | Name the number of events for 3031 | SELECT COUNT("Events") FROM table_26589 WHERE "Points" = '3031' | wikisql |
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 (
... | for how long did the patient id 8323 remain admitted in hospital? also specify death status | SELECT demographic.days_stay, demographic.expire_flag FROM demographic WHERE demographic.subject_id = "8323" | mimicsql_data |
CREATE TABLE jyjgzbb (
BGDH text,
BGRQ time,
CKZFWDX text,
CKZFWSX number,
CKZFWXX number,
JCFF text,
JCRGH text,
JCRXM text,
JCXMMC text,
JCZBDM text,
JCZBJGDL number,
JCZBJGDW text,
JCZBJGDX text,
JCZBMC text,
JLDW text,
JYRQ time,
JYZBLSH text,
... | 患者00569182肘部的各项指标检验结果的数据怎么样? | SELECT * FROM hz_info JOIN mzjzjlb JOIN jybgb JOIN jyjgzbb JOIN jybgb_jyjgzbb ON hz_info.YLJGDM = mzjzjlb.YLJGDM AND hz_info.KH = mzjzjlb.KH AND hz_info.KLX = mzjzjlb.KLX AND mzjzjlb.YLJGDM = jybgb.YLJGDM_MZJZJLB AND mzjzjlb.JZLSH = jybgb.JZLSH_MZJZJLB AND jybgb.YLJGDM = jybgb_jyjgzbb.YLJGDM AND jybgb.BGDH = jyjgzbb.BG... | css |
CREATE TABLE zyjzjlb (
CYBQDM text,
CYBQMC text,
CYCWH text,
CYKSDM text,
CYKSMC text,
CYSJ time,
CYZTDM number,
HZXM text,
JZKSDM text,
JZKSMC text,
JZLSH text,
KH text,
KLX number,
MZBMLX number,
MZJZLSH text,
MZZDBM text,
MZZDMC text,
MZZYZDZZBM... | 门诊诊断患者99012820为特发性肌张力障碍,他的检测指标203759的结果定量以及单位数据分别是什么? | SELECT jyjgzbb.JCZBJGDL, jyjgzbb.JCZBJGDW 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 mzjzjlb.JZZDSM = '特发性肌张力障碍' AND hz_info.RY... | css |
CREATE TABLE table_63248 (
"Date" text,
"Opponent" text,
"Venue" text,
"Result" text,
"Attendance" real
) | Which venue had an opponent of Sunderland and a result of a 1-1 draw? | SELECT "Venue" FROM table_63248 WHERE "Opponent" = 'sunderland' AND "Result" = '1-1' | wikisql |
CREATE TABLE table_26229 (
"No" real,
"Player" text,
"Height (m)" text,
"Height (f)" text,
"Position" text,
"Year born" real,
"Current Club" text
) | name the player for number 5 | SELECT "Player" FROM table_26229 WHERE "No" = '5' | wikisql |
CREATE TABLE table_13011 (
"Country" text,
"Builder" text,
"Location" text,
"Ship" text,
"Class / type" text
) | What is the country of Palmers Shipbuilding and Iron Company? | SELECT "Country" FROM table_13011 WHERE "Builder" = 'palmers shipbuilding and iron company' | wikisql |
CREATE TABLE table_36615 (
"Round" real,
"Pick #" real,
"Overall" real,
"Name" text,
"Position" text,
"College" text
) | What is the Pick # with an Overall of 19? | SELECT MAX("Pick #") FROM table_36615 WHERE "Overall" = '19' | wikisql |
CREATE TABLE table_12652 (
"Perpetrator" text,
"Year" text,
"Location" text,
"Country" text,
"Killed" text
) | Who is the perpetrator in Bait Al-Aqari? | SELECT "Perpetrator" FROM table_12652 WHERE "Location" = 'bait al-aqari' | wikisql |
CREATE TABLE table_name_22 (
uni_number VARCHAR,
bats VARCHAR,
surname VARCHAR
) | What's the Uni# of Timms, who has bats of R? | SELECT uni_number FROM table_name_22 WHERE bats = "r" AND surname = "timms" | sql_create_context |
CREATE TABLE table_name_40 (
score VARCHAR,
place VARCHAR,
player VARCHAR
) | What is Score, when Place is 'T8', and when Player is 'Orville Moody'? | SELECT score FROM table_name_40 WHERE place = "t8" AND player = "orville moody" | sql_create_context |
CREATE TABLE airport_aircraft (
ID int,
Airport_ID int,
Aircraft_ID int
)
CREATE TABLE pilot (
Pilot_Id int(11),
Name varchar(50),
Age int(11)
)
CREATE TABLE match (
Round real,
Location text,
Country text,
Date text,
Fastest_Qualifying text,
Winning_Pilot text,
Win... | What are the descriptions for the aircrafts, and count them by a bar chart | SELECT Description, COUNT(Description) FROM aircraft GROUP BY Description | nvbench |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.