context stringlengths 11 9.12k | question stringlengths 0 1.06k | SQL stringlengths 2 4.44k | source stringclasses 28
values |
|---|---|---|---|
CREATE TABLE table_name_98 (
constructor VARCHAR,
grid VARCHAR
) | What is the name of the Constructor with a 19 Grid? | SELECT constructor FROM table_name_98 WHERE grid = 19 | sql_create_context |
CREATE TABLE table_9031 (
"Date" text,
"Time" text,
"ACC Team" text,
"Big Ten Team" text,
"Location" text,
"Television" text,
"Attendance" real,
"Winner" text,
"Challenge Leader" text
) | What is the location of the game that was televised on ESPNU at 7:15 pm on Tue., Nov. 27? | SELECT "Location" FROM table_9031 WHERE "Television" = 'espnu' AND "Time" = '7:15 pm' AND "Date" = 'tue., nov. 27' | wikisql |
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... | 从2000年12月26日到2006年5月18日这段时间内,病人74743913所有检验结果指标记录中的检测方法列一下 | SELECT jyjgzbb.JCFF FROM hz_info JOIN mzjzjlb JOIN zyjybgb JOIN jyjgzbb ON hz_info.YLJGDM = mzjzjlb.YLJGDM AND hz_info.KH = mzjzjlb.KH AND hz_info.KLX = mzjzjlb.KLX AND mzjzjlb.YLJGDM = zyjybgb.YLJGDM_MZJZJLB AND mzjzjlb.JZLSH = zyjybgb.JZLSH_MZJZJLB AND zyjybgb.YLJGDM = jyjgzbb.YLJGDM AND zyjybgb.BGDH = jyjgzbb.BGDH W... | css |
CREATE TABLE table_65448 (
"Rank" real,
"Athletes" text,
"Country" text,
"Time" text,
"Notes" text
) | What is the Rank of the Guam Player? | SELECT AVG("Rank") FROM table_65448 WHERE "Country" = 'guam' | wikisql |
CREATE TABLE demographic (
subject_id text,
hadm_id text,
name text,
marital_status text,
age text,
dob text,
gender text,
language text,
religion text,
admission_type text,
days_stay text,
insurance text,
ethnicity text,
expire_flag text,
admission_location t... | give me the number of patients whose primary disease is overdose and year of death is less than or equal to 2168? | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.diagnosis = "OVERDOSE" AND demographic.dod_year <= "2168.0" | mimicsql_data |
CREATE TABLE table_name_75 (
year INTEGER,
class VARCHAR,
wins VARCHAR
) | Class of 500cc, and a Wins smaller than 0 had what average year? | SELECT AVG(year) FROM table_name_75 WHERE class = "500cc" AND wins < 0 | sql_create_context |
CREATE TABLE table_59708 (
"Opposing Team" text,
"Against" real,
"Date" text,
"Venue" text,
"Status" text,
"Report" text
) | What report has gauteng falcons as the opposing team? | SELECT "Report" FROM table_59708 WHERE "Opposing Team" = 'gauteng falcons' | wikisql |
CREATE TABLE table_52410 (
"Date" text,
"Visitor" text,
"Score" text,
"Home" text,
"Leading scorer" text,
"Attendance" real,
"Record" text
) | Who was the leading scorer on 9 January 2008? | SELECT "Leading scorer" FROM table_52410 WHERE "Date" = '9 january 2008' | 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_DIRE_CD text,
MED_DIRE_NM text,... | 患者691571030在医疗机构2703962的既往病历里检查过多少次,时间是从00年1月26日到19年6月3日 | SELECT COUNT(*) FROM t_kc21 JOIN t_kc22 JOIN t_kc21_t_kc22 ON t_kc21.MED_CLINIC_ID = t_kc21_t_kc22.MED_CLINIC_ID AND t_kc21_t_kc22.MED_EXP_DET_ID = t_kc22.MED_EXP_DET_ID WHERE t_kc21.PERSON_ID = '91571030' AND t_kc22.STA_DATE BETWEEN '2000-01-26' AND '2000-08-16' AND t_kc21.MED_SER_ORG_NO = '2703962' AND t_kc22.MED_INV... | css |
CREATE TABLE lab (
subject_id text,
hadm_id text,
itemid text,
charttime text,
flag text,
value_unit text,
label text,
fluid text
)
CREATE TABLE procedures (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE demographic ... | give me the number of patients whose marital status is single and procedure short title is tonsil&adenoid biopsy? | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.marital_status = "SINGLE" AND procedures.short_title = "Tonsil&adenoid biopsy" | mimicsql_data |
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 prescription... | provide the number of patients whose admission type is urgent and diagnoses long title is acute salpingitis and oophoritis? | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE demographic.admission_type = "URGENT" AND diagnoses.long_title = "Acute salpingitis and oophoritis" | mimicsql_data |
CREATE TABLE chartevents (
row_id number,
subject_id number,
hadm_id number,
icustay_id number,
itemid number,
charttime time,
valuenum number,
valueuom text
)
CREATE TABLE outputevents (
row_id number,
subject_id number,
hadm_id number,
icustay_id number,
charttime ... | how many days has it been since the last time patient 57050 was diagnosed with a hx-ven thrombosis/embols during their current hospital visit? | SELECT 1 * (STRFTIME('%j', CURRENT_TIME()) - STRFTIME('%j', diagnoses_icd.charttime)) FROM diagnoses_icd WHERE diagnoses_icd.icd9_code = (SELECT d_icd_diagnoses.icd9_code FROM d_icd_diagnoses WHERE d_icd_diagnoses.short_title = 'hx-ven thrombosis/embols') AND diagnoses_icd.hadm_id IN (SELECT admissions.hadm_id FROM adm... | mimic_iii |
CREATE TABLE table_203_387 (
id number,
"parish est" number,
"church" text,
"city" text,
"current bldg begun" number,
"weekly collections" text,
"notes" number
) | in what city was each parish established in 1964 located ? | SELECT "city" FROM table_203_387 WHERE "parish est" = 1964 | squall |
CREATE TABLE semester (
semester_id int,
semester varchar,
year int
)
CREATE TABLE course_tags_count (
course_id int,
clear_grading int,
pop_quiz int,
group_projects int,
inspirational int,
long_lectures int,
extra_credit int,
few_tests int,
good_feedback int,
tough_... | Which classes has Dr. Robert Rossana taught in the past ? | SELECT DISTINCT course.department, course.name, course.number FROM course, course_offering, instructor, offering_instructor WHERE course_offering.semester < (SELECT SEMESTERalias0.semester_id FROM semester AS SEMESTERalias0 WHERE SEMESTERalias0.semester = 'WN' AND SEMESTERalias0.year = 2016) AND course.course_id = cour... | advising |
CREATE TABLE table_name_56 (
melbourne VARCHAR,
adelaide VARCHAR,
auckland VARCHAR
) | What is the result for Melbourne when Adelaide is no, and Auckland is yes? | SELECT melbourne FROM table_name_56 WHERE adelaide = "no" AND auckland = "yes" | sql_create_context |
CREATE TABLE table_204_684 (
id number,
"wrestler:" text,
"times:" number,
"date:" text,
"location:" text,
"notes:" text
) | who is the only wsl title holder from texas ? | SELECT "wrestler:" FROM table_204_684 WHERE "location:" = 'texas' | squall |
CREATE TABLE zyjybgb (
BBCJBW text,
BBDM text,
BBMC text,
BBZT number,
BGDH number,
BGJGDM text,
BGJGMC text,
BGRGH text,
BGRQ time,
BGRXM text,
BGSJ time,
CJRQ time,
JSBBRQSJ time,
JSBBSJ time,
JYBBH text,
JYJGMC text,
JYJSGH text,
JYJSQM text,
... | 日期均在2014-02-18之前的患者94709761的哪些住院就诊记录对应的检验报告单的报告?列出住院有什么就诊流水号? | 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 = '94709761' AND NOT zyjzjlb.JZLSH IN (SELECT zyjybgb.JZLSH FROM zyjybgb WHERE zyjybgb.BGRQ >= '2014-02-18' UNION SELECT mzjybgb.JZLSH FROM mzjybgb WHERE mzjybgb... | css |
CREATE TABLE table_name_82 (
country VARCHAR,
city VARCHAR
) | What is Country, when City is 'Zamboanga'? | SELECT country FROM table_name_82 WHERE city = "zamboanga" | sql_create_context |
CREATE TABLE table_name_14 (
orbit VARCHAR,
specific_orbital_energy VARCHAR
) | specific orbital energy of 29.8 mj/kg has what orbit? | SELECT orbit FROM table_name_14 WHERE specific_orbital_energy = "−29.8 mj/kg" | sql_create_context |
CREATE TABLE prescriptions (
subject_id text,
hadm_id text,
icustay_id text,
drug_type text,
drug text,
formulary_drug_cd text,
route text,
drug_dose text
)
CREATE TABLE lab (
subject_id text,
hadm_id text,
itemid text,
charttime text,
flag text,
value_unit text,... | what is the average age of patients admitted under urgency and posses medicaid insurance? | SELECT AVG(demographic.age) FROM demographic WHERE demographic.admission_type = "URGENT" AND demographic.insurance = "Medicaid" | mimicsql_data |
CREATE TABLE table_1099080_1 (
condition VARCHAR,
prothrombin_time VARCHAR,
bleeding_time VARCHAR
) | How many conditions have an unaffected prothrombin time and a prolonged bleeding time | SELECT COUNT(condition) FROM table_1099080_1 WHERE prothrombin_time = "Unaffected" AND bleeding_time = "Prolonged" | sql_create_context |
CREATE TABLE ReviewTasks (
Id number,
ReviewTaskTypeId number,
CreationDate time,
DeletionDate time,
ReviewTaskStateId number,
PostId number,
SuggestedEditId number,
CompletedByReviewTaskId number
)
CREATE TABLE Tags (
Id number,
TagName text,
Count number,
ExcerptPostId... | What is my accepted answer percentage rate. On avg how often are answers I give, accepted | SELECT COUNT(*) AS answers, COUNT(q.Id) AS accepted, CAST(COUNT(q.Id) AS FLOAT) / COUNT(*) * 100 AS AcceptedPercentage FROM Posts AS a LEFT JOIN Posts AS q ON q.AcceptedAnswerId = a.Id WHERE a.PostTypeId = 2 | sede |
CREATE TABLE fgwyjzb (
CLINIC_ID text,
CLINIC_TYPE text,
COMP_ID text,
DATA_ID text,
DIFF_PLACE_FLG number,
FERTILITY_STS number,
FLX_MED_ORG_ID text,
HOSP_LEV number,
HOSP_STS number,
IDENTITY_CARD text,
INPT_AREA_BED text,
INSURED_IDENTITY number,
INSURED_STS text,
... | 号码为13281397团伙成员最经常去的医院排序? | SELECT gwyjzb.MED_SER_ORG_NO FROM gwyjzb WHERE gwyjzb.PERSON_ID = '13281397' GROUP BY gwyjzb.MED_SER_ORG_NO ORDER BY COUNT(*) DESC UNION SELECT fgwyjzb.MED_SER_ORG_NO FROM fgwyjzb WHERE fgwyjzb.PERSON_ID = '13281397' GROUP BY fgwyjzb.MED_SER_ORG_NO ORDER BY COUNT(*) DESC | css |
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,... | 在哪几次医疗记录中病患77275514被开出过金钱数额超过9201.03人民币的药物?怎样列出医疗就诊编号? | SELECT MED_CLINIC_ID FROM t_kc21 WHERE PERSON_ID = '77275514' AND MED_CLINIC_ID IN (SELECT MED_CLINIC_ID FROM t_kc22 WHERE AMOUNT > 9201.03) | css |
CREATE TABLE table_75540 (
"Player" text,
"Touchdowns" real,
"Extra points" real,
"Field goals" real,
"Safeties" real,
"Points" real
) | How many Touchdowns have a Player of rolla bigelow, and an Extra points smaller than 0? | SELECT SUM("Touchdowns") FROM table_75540 WHERE "Player" = 'rolla bigelow' AND "Extra points" < '0' | 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... | count the number of patients admitted via physician referral/normal delivery who have diagnoses icd9 code 43411. | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE demographic.admission_location = "PHYS REFERRAL/NORMAL DELI" AND diagnoses.icd9_code = "43411" | mimicsql_data |
CREATE TABLE table_name_82 (
combined VARCHAR,
overall INTEGER
) | What is the combined of the overalls less than 34? | SELECT combined FROM table_name_82 WHERE overall < 34 | sql_create_context |
CREATE TABLE table_name_58 (
years VARCHAR,
free_or_pay VARCHAR
) | Name the Years that have a free + pay? | SELECT years FROM table_name_58 WHERE free_or_pay = "free + pay" | sql_create_context |
CREATE TABLE table_18668 (
"District" text,
"Incumbent" text,
"Party" text,
"First elected" real,
"Result" text,
"Candidates" text
) | What was the result in the election in which the incumbent was Denver S. Church? | SELECT "Result" FROM table_18668 WHERE "Incumbent" = 'Denver S. Church' | wikisql |
CREATE TABLE table_26914854_3 (
incoming_manager VARCHAR,
date_of_vacancy VARCHAR
) | Who is the incoming manager when the date of vacancy was 21 march 2011? | SELECT incoming_manager FROM table_26914854_3 WHERE date_of_vacancy = "21 March 2011" | sql_create_context |
CREATE TABLE table_name_68 (
crowd INTEGER,
home_team VARCHAR
) | What was the lowest attendance at a Fitzroy match? | SELECT MIN(crowd) FROM table_name_68 WHERE home_team = "fitzroy" | sql_create_context |
CREATE TABLE table_8476 (
"Election" real,
"Candidate" text,
"Number of votes" text,
"Share of votes" text,
"Outcome of election" text
) | What is the outcome of the election with edward mahama as a candidate and 73,494 votes? | SELECT "Outcome of election" FROM table_8476 WHERE "Candidate" = 'edward mahama' AND "Number of votes" = '73,494' | 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
) | For those records from the products and each product's manufacturer, draw a bar chart about the distribution of name and revenue , and group by attribute name, rank from low to high by the y-axis. | SELECT T1.Name, T2.Revenue FROM Products AS T1 JOIN Manufacturers AS T2 ON T1.Manufacturer = T2.Code GROUP BY T1.Name, T1.Name ORDER BY T2.Revenue | nvbench |
CREATE TABLE table_41424 (
"Tournament" text,
"2003" text,
"2004" text,
"2012" text,
"2013" text
) | What is the tournament in 2012 results that has a 2003 results of 2r and played at Wimbledon? | SELECT "2012" FROM table_41424 WHERE "2003" = '2r' AND "Tournament" = 'wimbledon' | wikisql |
CREATE TABLE table_204_772 (
id number,
"team" text,
"county" text,
"wins" number,
"years won" number
) | what is the total of wins on the chart | SELECT SUM("wins") FROM table_204_772 | squall |
CREATE TABLE Person (
name varchar(20),
age INTEGER,
city TEXT,
gender TEXT,
job TEXT
)
CREATE TABLE PersonFriend (
name varchar(20),
friend varchar(20),
year INTEGER
) | A bar chart about what is average age for different job title?, and display names from low to high order. | SELECT job, AVG(age) FROM Person GROUP BY job ORDER BY job | nvbench |
CREATE TABLE table_7991 (
"Game" text,
"Date" text,
"Opponent" text,
"Score" text,
"Location/Attendance" text,
"Record" text
) | What's the record of the game on Nov 13? | SELECT "Record" FROM table_7991 WHERE "Date" = 'nov 13' | wikisql |
CREATE TABLE intakeoutput (
intakeoutputid number,
patientunitstayid number,
cellpath text,
celllabel text,
cellvaluenumeric number,
intakeoutputtime time
)
CREATE TABLE cost (
costid number,
uniquepid text,
patienthealthsystemstayid number,
eventtype text,
eventid number,
... | how much is the bleeding scan cost? | SELECT DISTINCT cost.cost FROM cost WHERE cost.eventtype = 'treatment' AND cost.eventid IN (SELECT treatment.treatmentid FROM treatment WHERE treatment.treatmentname = 'bleeding scan') | eicu |
CREATE TABLE PostTypes (
Id number,
Name text
)
CREATE TABLE TagSynonyms (
Id number,
SourceTagName text,
TargetTagName text,
CreationDate time,
OwnerUserId number,
AutoRenameCount number,
LastAutoRename time,
Score number,
ApprovedByUserId number,
ApprovalDate time
)
C... | Score Of Comments and PostId. | SELECT COUNT(*) AS CommentCount, Score, PostId AS "post_link" FROM Comments WHERE UserId = @UserId GROUP BY Score, PostId ORDER BY Score DESC | sede |
CREATE TABLE time_interval (
period text,
begin_time int,
end_time int
)
CREATE TABLE food_service (
meal_code text,
meal_number int,
compartment text,
meal_description varchar
)
CREATE TABLE aircraft (
aircraft_code varchar,
aircraft_description varchar,
manufacturer varchar,
... | what type of aircraft flies from PITTSBURGH to BALTIMORE | SELECT DISTINCT aircraft.aircraft_code FROM aircraft, airport_service AS AIRPORT_SERVICE_0, airport_service AS AIRPORT_SERVICE_1, city AS CITY_0, city AS CITY_1, equipment_sequence, flight WHERE CITY_0.city_code = AIRPORT_SERVICE_0.city_code AND CITY_0.city_name = 'PITTSBURGH' AND CITY_1.city_code = AIRPORT_SERVICE_1.c... | atis |
CREATE TABLE table_name_2 (
surface VARCHAR,
track VARCHAR
) | What is the surface of the track at the indianapolis speedrome? | SELECT surface FROM table_name_2 WHERE track = "indianapolis speedrome" | sql_create_context |
CREATE TABLE table_56813 (
"Player" text,
"Pos." text,
"From" real,
"School/Country" text,
"Rebs" real,
"Asts" real
) | How many players from bethel? | SELECT COUNT("From") FROM table_56813 WHERE "School/Country" = 'bethel' | wikisql |
CREATE TABLE player (
pid number,
pname text,
ycard text,
hs number
)
CREATE TABLE tryout (
pid number,
cname text,
ppos text,
decision text
)
CREATE TABLE college (
cname text,
state text,
enr number
) | How many students whose are playing the role of goalie? | SELECT COUNT(*) FROM tryout WHERE ppos = 'goalie' | spider |
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 founder and the sum of revenue , and group by attribute founder in a bar chart, I want to list X in desc order please. | SELECT Founder, SUM(Revenue) FROM Products AS T1 JOIN Manufacturers AS T2 ON T1.Manufacturer = T2.Code GROUP BY Founder ORDER BY Founder DESC | nvbench |
CREATE TABLE table_31559 (
"Name" text,
"Circuit" text,
"Date" text,
"Winning driver" text,
"Winning constructor" text,
"Report" text
) | Tell me the circuit for alfa romeo swedish ice race | SELECT "Circuit" FROM table_31559 WHERE "Winning constructor" = 'alfa romeo' AND "Name" = 'swedish ice race' | wikisql |
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 hz_info (
KH text,
KLX number... | 咱们医院的在00年4月27日到2000年12月12日内病人65980310的所有检验结果指标记录的检测人为韩乐音的检验指标流水号是多少号? | SELECT jyjgzbb.JYZBLSH FROM hz_info JOIN mzjzjlb JOIN jyjgzbb ON hz_info.YLJGDM = mzjzjlb.YLJGDM AND hz_info.KH = mzjzjlb.KH AND hz_info.KLX = mzjzjlb.KLX AND mzjzjlb.YLJGDM = jyjgzbb.jybgb_YLJGDM_MZJZJLB AND mzjzjlb.JZLSH = jyjgzbb.jybgb_JZLSH_MZJZJLB WHERE hz_info.RYBH = '65980310' AND jyjgzbb.JYRQ BETWEEN '2000-04-2... | css |
CREATE TABLE table_1629 (
"Rank" real,
"Administrative Division" text,
"Area (km\u00b2)" real,
"Area (sq mi)" real,
"National Share (%)" text,
"Comparable Country" text
) | What comparable country has a national share of 1.08? | SELECT "Comparable Country" FROM table_1629 WHERE "National Share (%)" = '1.08' | wikisql |
CREATE TABLE basketball_match (
Team_ID int,
School_ID int,
Team_Name text,
ACC_Regular_Season text,
ACC_Percent text,
ACC_Home text,
ACC_Road text,
All_Games text,
All_Games_Percent int,
All_Home text,
All_Road text,
All_Neutral text
)
CREATE TABLE university (
Scho... | Draw a scatterplot of team id vs school_id where team id is on the x-axis and points are colored by ACC_Road | SELECT Team_ID, School_ID FROM basketball_match GROUP BY ACC_Road | nvbench |
CREATE TABLE table_name_30 (
year VARCHAR,
competition VARCHAR
) | What was the year that had Anugerah Bintang Popular Berita Harian 23 as competition? | SELECT COUNT(year) FROM table_name_30 WHERE competition = "anugerah bintang popular berita harian 23" | sql_create_context |
CREATE TABLE table_26804862_1 (
season__number VARCHAR,
production_code VARCHAR
) | When 3.89 is the production code how many season numbers are there? | SELECT COUNT(season__number) FROM table_26804862_1 WHERE production_code = "3.89" | sql_create_context |
CREATE TABLE table_48076 (
"Total Points" real,
"Name" text,
"Career Games" text,
"Position" text,
"Years Played" text,
"Scored 1,500 Points" text,
"Date and Opponent" text
) | Name the Date and an Opponent which has a f Position and Career Games of 123 games? | SELECT "Date and Opponent" FROM table_48076 WHERE "Position" = 'f' AND "Career Games" = '123 games' | wikisql |
CREATE TABLE table_252 (
"Player" text,
"No." text,
"Nationality" text,
"Position" text,
"Years for Jazz" text,
"School/Club Team" text
) | What school or team does Al Jefferson play for? | SELECT "School/Club Team" FROM table_252 WHERE "Player" = 'Al Jefferson' | wikisql |
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... | 名字叫郎高义的病患他的身高和体重都是多少? | SELECT mzjzjlb.SG, mzjzjlb.TZ FROM person_info JOIN hz_info JOIN mzjzjlb JOIN person_info_hz_info ON person_info.RYBH = person_info_hz_info.RYBH AND hz_info.YLJGDM = mzjzjlb.YLJGDM AND hz_info.KH = mzjzjlb.KH AND hz_info.KLX = mzjzjlb.KLX AND person_info_hz_info.KH = hz_info.KH AND person_info_hz_info.KLX = hz_info.KLX... | 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 demographic (
subject_id text,
hadm_id text,
name text,
marital_status text,
age text,
dob te... | what is maximum days of hospital stay of patients whose primary disease is st elevated myocardial infarction\cardiac cath? | SELECT MAX(demographic.days_stay) FROM demographic WHERE demographic.diagnosis = "ST ELEVATED MYOCARDIAL INFARCTION\CARDIAC CATH" | mimicsql_data |
CREATE TABLE area (
course_id int,
area varchar
)
CREATE TABLE course_prerequisite (
pre_course_id int,
course_id int
)
CREATE TABLE semester (
semester_id int,
semester varchar,
year int
)
CREATE TABLE ta (
campus_job_id int,
student_id int,
location varchar
)
CREATE TABLE p... | Is CJS 591 offering sections on days other than Monday next semester ? | SELECT DISTINCT course_offering.section_number FROM course, course_offering, semester WHERE course_offering.monday = 'N' AND course.course_id = course_offering.course_id AND course.department = 'CJS' AND course.number = 591 AND semester.semester = 'FA' AND semester.semester_id = course_offering.semester AND semester.ye... | advising |
CREATE TABLE table_23970 (
"Model Type" text,
"Model Designation" text,
"Engine" text,
"Wheelbase (mm/inch)" text,
"GVW (kg/ton)" text,
"Axle Ratio" text
) | How many different engines are there for the model with model designation 97G00? | SELECT COUNT("Engine") FROM table_23970 WHERE "Model Designation" = '97G00' | wikisql |
CREATE TABLE table_8416 (
"School" text,
"Locality" text,
"Ages" text,
"Report" text,
"Website" text
) | What is the Website of the Cheadle Hulme School with a Report of Ofsted for Ages 4-19? | SELECT "Website" FROM table_8416 WHERE "Report" = 'ofsted' AND "Ages" = '4-19' AND "Locality" = 'cheadle hulme' | wikisql |
CREATE TABLE department_store_chain (
dept_store_chain_id number,
dept_store_chain_name text
)
CREATE TABLE addresses (
address_id number,
address_details text
)
CREATE TABLE order_items (
order_item_id number,
order_id number,
product_id number
)
CREATE TABLE staff_department_assignments... | Return the average total amount purchased and total value purchased for the supplier who supplies the greatest number of products. | SELECT AVG(total_amount_purchased), AVG(total_value_purchased) FROM product_suppliers WHERE supplier_id = (SELECT supplier_id FROM product_suppliers GROUP BY supplier_id ORDER BY COUNT(*) DESC LIMIT 1) | spider |
CREATE TABLE table_name_88 (
points_against VARCHAR,
try_diff VARCHAR
) | What is Points Against, when Try Diff is +22? | SELECT points_against FROM table_name_88 WHERE try_diff = "+22" | sql_create_context |
CREATE TABLE table_42405 (
"Team 1" text,
"Agg." text,
"Team 2" text,
"1st leg" text,
"2nd leg" text
) | Which team 1 has team 2, Gomera? | SELECT "Team 1" FROM table_42405 WHERE "Team 2" = 'gomera' | wikisql |
CREATE TABLE table_54935 (
"Year" text,
"Team" text,
"Comp" text,
"Rate" text,
"RAtt" text,
"RYds" text,
"RAvg" text
) | In 1983, what was the RAtt? | SELECT "RAtt" FROM table_54935 WHERE "Year" = '1983' | wikisql |
CREATE TABLE table_49400 (
"Date" text,
"Venue" text,
"Opponents" text,
"Score" text,
"Round" text
) | What is the Round din Ullevaal? | SELECT "Round" FROM table_49400 WHERE "Venue" = 'ullevaal' | wikisql |
CREATE TABLE table_78078 (
"Goal" real,
"Date" text,
"Venue" text,
"Score" text,
"Result" text,
"Competition" text
) | What is the Venue for Goal number 1? | SELECT "Venue" FROM table_78078 WHERE "Goal" = '1' | wikisql |
CREATE TABLE restaurant (
id int,
name varchar,
food_type varchar,
city_name varchar,
rating "decimal
)
CREATE TABLE geographic (
city_name varchar,
county varchar,
region varchar
)
CREATE TABLE location (
restaurant_id int,
house_number int,
street_name varchar,
city_n... | how many chinese places are there in the bay area ? | SELECT COUNT(*) FROM geographic, restaurant WHERE geographic.region = 'bay area' AND restaurant.city_name = geographic.city_name AND restaurant.food_type = 'chinese' | restaurants |
CREATE TABLE table_26561498_1 (
directed_by VARCHAR,
production_code VARCHAR
) | who directed and produced 176452? | SELECT directed_by FROM table_26561498_1 WHERE production_code = 176452 | sql_create_context |
CREATE TABLE table_name_83 (
date VARCHAR,
score VARCHAR
) | What date has 136-134 as the score? | SELECT date FROM table_name_83 WHERE score = "136-134" | sql_create_context |
CREATE TABLE outputevents (
row_id number,
subject_id number,
hadm_id number,
icustay_id number,
charttime time,
itemid number,
value number
)
CREATE TABLE chartevents (
row_id number,
subject_id number,
hadm_id number,
icustay_id number,
itemid number,
charttime tim... | is there any record of microbiology test done for patient 32163 this year? | SELECT COUNT(*) > 0 FROM microbiologyevents WHERE microbiologyevents.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 32163) AND DATETIME(microbiologyevents.charttime, 'start of year') = DATETIME(CURRENT_TIME(), 'start of year', '-0 year') | mimic_iii |
CREATE TABLE table_22210 (
"Series #" real,
"Season #" real,
"Title" text,
"Directed by" text,
"Written by" text,
"Original air date" text,
"U.S. viewers (millions)" text
) | How many original air dates totaled 26.06 million viewers? | SELECT COUNT("Original air date") FROM table_22210 WHERE "U.S. viewers (millions)" = '26.06' | wikisql |
CREATE TABLE ta (
campus_job_id int,
student_id int,
location varchar
)
CREATE TABLE course_prerequisite (
pre_course_id int,
course_id int
)
CREATE TABLE jobs (
job_id int,
job_title varchar,
description varchar,
requirement varchar,
city varchar,
state varchar,
countr... | Name the courses that I need to take before MUSPERF 781 . | SELECT DISTINCT COURSE_0.department, COURSE_0.name, COURSE_0.number FROM course AS COURSE_0, course AS COURSE_1, course_prerequisite WHERE COURSE_0.course_id = course_prerequisite.pre_course_id AND NOT COURSE_0.course_id IN (SELECT STUDENT_RECORDalias0.course_id FROM student_record AS STUDENT_RECORDalias0 WHERE STUDENT... | advising |
CREATE TABLE table_38690 (
"Career Card" text,
"Starting career/salary" text,
"2nd career/salary" text,
"3rd career/salary" text,
"4th career/salary" text,
"5th career/salary" text,
"6th career/salary" text
) | 5th career/salary of automotive designer ($350,000-degree) had what career card? | SELECT "Career Card" FROM table_38690 WHERE "5th career/salary" = 'automotive designer ($350,000-degree)' | wikisql |
CREATE TABLE table_19528 (
"No. in series" real,
"Title" text,
"Directed by" text,
"Written by" text,
"Original air date" text,
"Production code" text
) | What is the first number in series that had the production code 1ACX03? | SELECT MAX("No. in series") FROM table_19528 WHERE "Production code" = '1ACX03' | wikisql |
CREATE TABLE table_name_11 (
years VARCHAR,
engine_code VARCHAR
) | During which years was the model with the Engine code of m54b25 manufactured? | SELECT years FROM table_name_11 WHERE engine_code = "m54b25" | sql_create_context |
CREATE TABLE table_name_90 (
crowd INTEGER,
venue VARCHAR
) | What was the highest attendance at Junction Oval? | SELECT MAX(crowd) FROM table_name_90 WHERE venue = "junction oval" | sql_create_context |
CREATE TABLE table_name_10 (
weight VARCHAR,
name VARCHAR
) | Name the Weight which has a Name of bal zs h rai category:articles with hcards? | SELECT weight FROM table_name_10 WHERE name = "balázs hárai category:articles with hcards" | sql_create_context |
CREATE TABLE table_28358 (
"Road race" text,
"Distance" text,
"Location" text,
"Country" text,
"Month held" text
) | How long was the great manchester run? | SELECT "Distance" FROM table_28358 WHERE "Road race" = 'Great Manchester Run' | wikisql |
CREATE TABLE table_name_8 (
catalogue__number VARCHAR,
country VARCHAR
) | What is the catalogue number for Brazil? | SELECT catalogue__number FROM table_name_8 WHERE country = "brazil" | 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,
... | provide the number of patients whose admission location is phys referral/normal deli and drug code is cefe1i? | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE demographic.admission_location = "PHYS REFERRAL/NORMAL DELI" AND prescriptions.formulary_drug_cd = "CEFE1I" | mimicsql_data |
CREATE TABLE dual_carrier (
main_airline varchar,
low_flight_number int,
high_flight_number int,
dual_airline varchar,
service_name text
)
CREATE TABLE airline (
airline_code varchar,
airline_name text,
note text
)
CREATE TABLE airport (
airport_code varchar,
airport_name text,... | what kind of ground transportation is there in PHILADELPHIA | SELECT DISTINCT ground_service.transport_type FROM city, ground_service WHERE city.city_name = 'PHILADELPHIA' AND ground_service.city_code = city.city_code | atis |
CREATE TABLE table_12731 (
"Tie no" real,
"Home team" text,
"Score" text,
"Away team" text,
"Attendance" real
) | What is Score, when Attendance is '303'? | SELECT "Score" FROM table_12731 WHERE "Attendance" = '303' | wikisql |
CREATE TABLE Manufacturers (
Code INTEGER,
Name VARCHAR(255),
Headquarter VARCHAR(255),
Founder VARCHAR(255),
Revenue REAL
)
CREATE TABLE Products (
Code INTEGER,
Name VARCHAR(255),
Price DECIMAL,
Manufacturer INTEGER
) | How many different products are produced in each headquarter city. Visualize by bar chart. | SELECT Headquarter, COUNT(DISTINCT T1.Name) FROM Products AS T1 JOIN Manufacturers AS T2 ON T1.Manufacturer = T2.Code | nvbench |
CREATE TABLE table_63296 (
"Rank" real,
"Lane" real,
"Athlete" text,
"Nationality" text,
"Time" real,
"React" real
) | Who was the athlete with react of 0.185? | SELECT "Athlete" FROM table_63296 WHERE "React" = '0.185' | wikisql |
CREATE TABLE code_description (
code varchar,
description text
)
CREATE TABLE ground_service (
city_code text,
airport_code text,
transport_type text,
ground_fare int
)
CREATE TABLE time_interval (
period text,
begin_time int,
end_time int
)
CREATE TABLE fare (
fare_id int,
... | what is the earliest departure time from BOSTON to DENVER | SELECT DISTINCT flight.departure_time 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 = 'BOSTON' AND CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'D... | atis |
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... | 列出在医院5511402中患者41068843就诊科室名称不包含肠镜的所有门诊就诊记录的流水号是什么? | SELECT txmzjzjlb.JZLSH FROM hz_info JOIN txmzjzjlb ON hz_info.YLJGDM = txmzjzjlb.YLJGDM AND hz_info.KH = txmzjzjlb.KH AND hz_info.KLX = txmzjzjlb.KLX WHERE hz_info.RYBH = '41068843' AND hz_info.YLJGDM = '5511402' AND NOT txmzjzjlb.JZKSMC LIKE '%肠镜%' UNION SELECT ftxmzjzjlb.JZLSH FROM hz_info JOIN ftxmzjzjlb ON hz_info.... | css |
CREATE TABLE table_61376 (
"Round" text,
"Opponents" text,
"Home" text,
"Away" text,
"Aggregate" text
) | What away is there for the q3 round? | SELECT "Away" FROM table_61376 WHERE "Round" = 'q3' | wikisql |
CREATE TABLE table_39614 (
"Round" real,
"Pick #" real,
"Overall" real,
"Name" text,
"Position" text,
"College" text
) | What is BYU's lowest pick? | SELECT MIN("Pick #") FROM table_39614 WHERE "College" = 'byu' | wikisql |
CREATE TABLE table_11111116_6 (
original_air_date VARCHAR,
written_by VARCHAR
) | The episode written by Rebecca Dameron aired on what date? | SELECT original_air_date FROM table_11111116_6 WHERE written_by = "Rebecca Dameron" | sql_create_context |
CREATE TABLE table_17601 (
"Rank" real,
"Fastest time (s)" text,
"Wind (m/s)" text,
"Athlete" text,
"Nation" text,
"Date" text,
"Location" text
) | Nigeria had the fastest time once. | SELECT COUNT("Fastest time (s)") FROM table_17601 WHERE "Nation" = 'Nigeria' | wikisql |
CREATE TABLE countries (
country_id text,
country_name text,
region_id number
)
CREATE TABLE locations (
location_id number,
street_address text,
postal_code text,
city text,
state_province text,
country_id text
)
CREATE TABLE employees (
employee_id number,
first_name text... | display the department name, city, and state province for each department. | SELECT T1.department_name, T2.city, T2.state_province FROM departments AS T1 JOIN locations AS T2 ON T2.location_id = T1.location_id | 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... | 在2019-05-06之前,患者42116254有哪些住院就诊的检验报告单?看一下住院就诊流水号 | SELECT zyjzjlb.JZLSH FROM hz_info JOIN zyjzjlb JOIN person_info_hz_info JOIN person_info ON hz_info.YLJGDM = zyjzjlb.YLJGDM AND hz_info.KH = zyjzjlb.KH AND hz_info.KLX = zyjzjlb.KLX AND person_info_hz_info.KH = hz_info.KH AND person_info_hz_info.KLX = hz_info.KLX AND person_info_hz_info.YLJGDM = hz_info.YLJGDM AND pers... | css |
CREATE TABLE table_name_12 (
opponent VARCHAR,
date VARCHAR
) | What's the opponent for July 2? | SELECT opponent FROM table_name_12 WHERE date = "july 2" | sql_create_context |
CREATE TABLE table_60552 (
"Election" text,
"1st Member" text,
"1st Party" text,
"2nd Member" text,
"2nd Party" text
) | What 2nd Party has an Election of 1885? | SELECT "2nd Party" FROM table_60552 WHERE "Election" = '1885' | 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,
... | 想知道被门诊诊断为K44.X89这个疾病的那些病人的籍贯代码、名称以及相应人数 | SELECT person_info.JGDM, person_info.JGMC, COUNT(person_info.RYBH) FROM person_info JOIN hz_info JOIN mzjzjlb 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 WHERE mzjzjlb.JZZDBM = 'K44.X89' GROUP BY person_info.JGDM | css |
CREATE TABLE writes (
paperid int,
authorid int
)
CREATE TABLE cite (
citingpaperid int,
citedpaperid int
)
CREATE TABLE keyphrase (
keyphraseid int,
keyphrasename varchar
)
CREATE TABLE field (
fieldid int
)
CREATE TABLE venue (
venueid int,
venuename varchar
)
CREATE TABLE pap... | What has Luke S Zettlemoyer published in the last 8 years ? | SELECT DISTINCT writes.paperid FROM author, paper, writes WHERE author.authorname = 'Luke S Zettlemoyer' AND paper.year >= YEAR(CURDATE()) - 8 AND writes.authorid = author.authorid AND writes.paperid = paper.paperid | scholar |
CREATE TABLE table_24997 (
"Province, Community" text,
"Contestant" text,
"Age" real,
"Height" text,
"Hometown" text,
"Geographical Regions" text
) | How many different cities are represented by contestants whose height stands at 1.80? | SELECT COUNT("Hometown") FROM table_24997 WHERE "Height" = '1.80' | wikisql |
CREATE TABLE table_name_83 (
location VARCHAR,
opponent VARCHAR
) | What is the Location when the Opponent shows vs. #23 south carolina? | SELECT location FROM table_name_83 WHERE opponent = "vs. #23 south carolina" | sql_create_context |
CREATE TABLE table_37991 (
"Date" text,
"Opponent" text,
"Site" text,
"Result" text,
"Attendance" text
) | What is the name of the Opponent when the Result was w48-0? | SELECT "Opponent" FROM table_37991 WHERE "Result" = 'w48-0' | wikisql |
CREATE TABLE PostTypes (
Id number,
Name text
)
CREATE TABLE PostTags (
PostId number,
TagId number
)
CREATE TABLE CloseAsOffTopicReasonTypes (
Id number,
IsUniversal boolean,
InputTitle text,
MarkdownInputGuidance text,
MarkdownPostOwnerGuidance text,
MarkdownPrivilegedUserGui... | Distribution of HNQs based on hours until entering. | WITH times_cte AS (SELECT p.Id AS pid, p.CreationDate AS cre, ph.CreationDate AS hot, FLOOR(CAST(CAST((JULIANDAY(CreationDate) - JULIANDAY(p.CreationDate)) * 1440.0 AS INT) AS FLOAT) / 60) AS time FROM PostHistory AS ph INNER JOIN Posts AS p ON ph.PostId = p.Id WHERE ph.PostHistoryTypeId = 52) SELECT time, COUNT(pid) A... | sede |
CREATE TABLE table_name_98 (
winning_driver VARCHAR,
winning_team VARCHAR,
circuit VARCHAR
) | Name the winning driver for mobilecast impul and twin ring motegi | SELECT winning_driver FROM table_name_98 WHERE winning_team = "mobilecast impul" AND circuit = "twin ring motegi" | sql_create_context |
CREATE TABLE fzzmzjzjlb (
HXPLC number,
HZXM text,
JLSJ time,
JZJSSJ time,
JZKSBM text,
JZKSMC text,
JZKSRQ time,
JZLSH number,
JZZDBM text,
JZZDSM text,
JZZTDM number,
JZZTMC text,
KH text,
KLX number,
MJZH text,
ML number,
MZZYZDZZBM text,
MZZYZD... | 门诊诊断给患者29164002的诊断为前列腺增生,他000470这个检测指标的结果定量及其单位是什么 | SELECT jyjgzbb.JCZBJGDL, jyjgzbb.JCZBJGDW FROM hz_info JOIN zzmzjzjlb JOIN jybgb JOIN jyjgzbb ON hz_info.YLJGDM = zzmzjzjlb.YLJGDM AND hz_info.KH = zzmzjzjlb.KH AND hz_info.KLX = zzmzjzjlb.KLX AND zzmzjzjlb.YLJGDM = jybgb.YLJGDM_MZJZJLB AND zzmzjzjlb.JZLSH = jybgb.JZLSH_MZJZJLB AND jybgb.YLJGDM = jyjgzbb.YLJGDM AND jyb... | css |
CREATE TABLE allergy (
allergyid number,
patientunitstayid number,
drugname text,
allergyname text,
allergytime time
)
CREATE TABLE diagnosis (
diagnosisid number,
patientunitstayid number,
diagnosisname text,
diagnosistime time,
icd9code text
)
CREATE TABLE vitalperiodic (
... | patient 004-86136 was diagnosed during their first hospital visit for the last time with what? | SELECT diagnosis.diagnosisname FROM diagnosis WHERE diagnosis.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '004-86136' AND NOT patient.hospitaldischargetime IS NULL ORDER BY... | eicu |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.